addCourse.vue 1.2 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading"
  3. element-loading-text="小可正在努力生成中,请稍等...">
  4. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止
  5. </div>
  6. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken"
  7. @click="cancelAjax('teacherTask')">停止</div>
  8. <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
  9. <div class="courseTop">
  10. <!-- <div class="stepsNav">
  11. <el-breadcrumb separator-class="el-icon-arrow-right">
  12. <el-breadcrumb-item :to="{
  13. path:
  14. '/course?userid=' +
  15. userid +
  16. '&oid=' +
  17. oid +
  18. '&org=' +
  19. org +
  20. '&role=' +
  21. role,
  22. }">课程管理</el-breadcrumb-item>
  23. <el-breadcrumb-item>
  24. <span style="color: rgb(15, 126, 255)">添加课程</span>
  25. </el-breadcrumb-item>
  26. </el-breadcrumb>
  27. </div> -->
  28. <div class="r_pub_button_retrun" style="margin-left: auto" @click="retrunCourse">返回</div>
  29. </div>
  30. <div class="right" style="height: calc(100% - 36px); margin-top: 36px;"
  31. :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  32. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  33. <!-- @mouseenter="stepDisplay(true)"
  34. @mouseleave="stepDisplay(false)" -->
  35. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  36. <div class="stepBg" v-if="false">
  37. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  38. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  39. <div>
  40. <img src="../../../assets/icon/first.png" alt />
  41. </div>
  42. <div>填写基本信息</div>
  43. </div>
  44. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  45. <div>
  46. <img src="../../../assets/icon/firstNo.png" alt />
  47. </div>
  48. <div>填写基本信息</div>
  49. </div>
  50. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  51. </div>
  52. <!-- <div
  53. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  54. class="second"
  55. @click="navSteps(2)"
  56. >
  57. <div style="margin: 5px 10px 0 0; width: 2rem">
  58. <img src="../../../assets/icon/second.png" alt />
  59. </div>
  60. <div>选择课程模板</div>
  61. </div>
  62. <div
  63. v-else-if="cidType === 0 && isStepDisplay"
  64. class="secondNo"
  65. @click="navSteps(2)"
  66. >
  67. <div>
  68. <img src="../../../assets/icon/secondNo.png" alt />
  69. </div>
  70. <div>选择课程模板</div>
  71. </div> -->
  72. <!-- <div
  73. v-if="isStepDisplay"
  74. class="stepBorder"
  75. :class="{ 'border-active': steps > 2 }"
  76. ></div> -->
  77. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  78. <div>
  79. <img src="../../../assets/icon/third.png" alt />
  80. </div>
  81. <div>上传课程内容</div>
  82. </div>
  83. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  84. <div>
  85. <img src="../../../assets/icon/thirdNo.png" alt />
  86. </div>
  87. <div>上传课程内容</div>
  88. </div>
  89. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  90. <div v-if="steps > 3 && isStepDisplay" class="four">
  91. <div>
  92. <img src="../../../assets/icon/four.png" alt />
  93. </div>
  94. <div>上传完成</div>
  95. </div>
  96. <div v-else-if="isStepDisplay" class="fourNo">
  97. <div>
  98. <img src="../../../assets/icon/fourNo.png" alt />
  99. </div>
  100. <div>上传完成</div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  105. style="padding: 0" :style="{
  106. height:
  107. !isStepDisplay && !isBtnDisplay
  108. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  109. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  110. }">
  111. <!-- <div class="updateMask" :style="{
  112. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  113. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  114. <div class="whiteBg" style="background: unset; padding: 0">
  115. <div>
  116. <div class="basic_box" style="padding: 0">
  117. <div class="big_box">
  118. <div class="left_first">
  119. <div :class="{
  120. updateTips:
  121. cid && userid != courseUserid && role != '1',
  122. }">
  123. <div style="width: 100%">
  124. <div class="course_input_box2">
  125. <div class="course_input_box">
  126. <div class="bb_courseIcon">
  127. <img src="../../../assets/icon/new/course.png" />
  128. </div>
  129. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName"
  130. @change="setCover" />
  131. </div>
  132. <div style=" margin-bottom: 15px; display:flex;">
  133. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  134. style="justify-content: center; min-width: 150px;"></el-switch>
  135. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  136. style="justify-content: center; min-width: 175px"></el-switch>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  142. <span>类型</span>
  143. <!-- 学科+ 主题+ 未来+ -->
  144. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  145. style="display: flex; align-items: center">
  146. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  147. :key="index">
  148. <el-radio :label="item.name">{{
  149. item.name
  150. }}</el-radio>
  151. </div>
  152. </el-radio-group>
  153. </div>
  154. <div class="both">
  155. <div class="choose">
  156. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  157. <span v-if="
  158. CourseTypeJson[item.id].length > 0 &&
  159. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  160. ? pTypeCheck.indexOf(item.id) != -1
  161. : true)
  162. ">{{ item.name }}:</span>
  163. <el-checkbox-group v-model="courseTypeId" @change="typeChange" v-if="
  164. CourseTypeJson[item.id].length > 0 &&
  165. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  166. ? pTypeCheck.indexOf(item.id) != -1
  167. : true)
  168. ">
  169. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  170. item1.name }}</el-checkbox>
  171. </el-checkbox-group>
  172. <!-- <div
  173. v-else
  174. style="font-size: 14px; margin-left: -8px"
  175. >
  176. 暂无
  177. </div> -->
  178. </div>
  179. </div>
  180. </div>
  181. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  182. <div class="info_box_t_box">
  183. <span>输出语言:</span>
  184. <el-radio-group v-model="languageSetting" style="display: flex; align-items: center"
  185. @change="changeLang">
  186. <div class="all_choose info_radio">
  187. <el-radio :label="0">简体中文</el-radio>
  188. </div>
  189. <div class="all_choose info_radio" style="margin-left: 10px">
  190. <el-radio :label="1">繁体中文</el-radio>
  191. </div>
  192. <div class="all_choose info_radio" style="margin-left: 10px">
  193. <el-radio :label="2">English</el-radio>
  194. </div>
  195. </el-radio-group>
  196. </div>
  197. </div>
  198. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  199. <div class="info_box_t_box">
  200. <!-- <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  201. style="justify-content: center; min-width: 175px"></el-switch> -->
  202. <span>生成模式:</span>
  203. <el-radio-group v-model="isuseT" style="display: flex; align-items: center"
  204. @change="changeIsuseT">
  205. <div class="all_choose info_radio">
  206. <el-radio :label="false">从零开始生成</el-radio>
  207. </div>
  208. <div class="all_choose info_radio" style="margin-left: 10px">
  209. <el-radio :label="true">从已有教案生成</el-radio>
  210. </div>
  211. <div class="all_choose info_radio" style="margin-left: 10px">
  212. <el-radio :label="1">对话模式生成</el-radio>
  213. </div>
  214. <div class="all_choose info_radio" style="margin-left: 10px">
  215. <el-radio :label="2">头脑风暴模式生成</el-radio>
  216. </div>
  217. </el-radio-group>
  218. </div>
  219. </div>
  220. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  221. <div class="info_box_t_box">
  222. <span>生成风格:</span>
  223. <div class="mode_box">
  224. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  225. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  226. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  227. </div>
  228. </div>
  229. </div>
  230. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  231. <div class="info_box_t_box">
  232. <span>课程节数:</span>
  233. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  234. <span>节</span>
  235. </div>
  236. <div class="info_box_t_box">
  237. <span>课程时长:</span>
  238. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  239. <span>min</span>
  240. </div>
  241. </div> -->
  242. </div>
  243. <div class="right_first" v-loading="imageloading2">
  244. <!-- <div class="ai_box">
  245. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  246. </div> -->
  247. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  248. 上传封面
  249. </div>
  250. <div style="width: 100%">
  251. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  252. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  253. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  254. <div v-if="cover.length == 0">点击添加封面</div>
  255. <div class="cover_mask">
  256. <img src="../../../assets/icon/new/cover_update.png" /><span
  257. style="margin-top: 5px">修改封面</span>
  258. </div>
  259. </div>
  260. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  261. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  262. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  263. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  264. <i class="el-icon-plus"></i>
  265. </el-upload> -->
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  273. <div class="whiteBg" style="border-radius: 0">
  274. <div class="c_info_title">
  275. 课程权限设置
  276. </div>
  277. <div class="wb_j_box">
  278. <div class="wb_j_box_content">
  279. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  280. (dialogVisibleClass = true),
  281. (classSearch = ''),
  282. (gradeId = ''),
  283. getClass()
  284. ">添加班级</button>
  285. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  286. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  287. getClassC(tc) }}</span>
  288. </div> -->
  289. <div class="wb_j_box_btn" @click="
  290. (dialogVisibleClass = true),
  291. (classSearch = ''),
  292. (gradeId = ''),
  293. getClass()
  294. ">
  295. <div class="wb_j_box_title">授课班级</div>
  296. <div class="wb_j_box_btn_c">
  297. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  298. v-if="checkboxList2.length" popper-class="text_tooltip2">
  299. <div class="wb_j_box_span">
  300. {{ getListClassC(checkboxList2) }}
  301. </div>
  302. </el-tooltip>
  303. <div v-else class="wb_j_box_span">请选择授课班级</div>
  304. <div class="wb_j_box_arrow"></div>
  305. </div>
  306. </div>
  307. </div>
  308. <div class="wb_j_box_content">
  309. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  310. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  311. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  312. checkBoolean
  313. ? checkboxList3
  314. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  315. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  316. </div> -->
  317. <div class="wb_j_box_btn" @click="openMember">
  318. <div class="wb_j_box_title">协同人员</div>
  319. <div class="wb_j_box_btn_c">
  320. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  321. v-if="checkboxList3.length" popper-class="text_tooltip2">
  322. <div class="wb_j_box_span">
  323. {{ getListMan2(checkboxList3) }}
  324. </div>
  325. </el-tooltip>
  326. <div v-else class="wb_j_box_span">请选择协同人员</div>
  327. <div class="wb_j_box_arrow"></div>
  328. </div>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  334. <div class="c_info_title">目标管理</div>
  335. <div style="margin: 0 auto; padding: 0 20px">
  336. <div style="
  337. width: 95%;
  338. min-height: 200px;
  339. border: 1px solid #cad1dc;
  340. border-radius: 4px;
  341. position: relative;
  342. ">
  343. <div class="e_add_top">
  344. <div class="e_add_title">
  345. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  346. 清除
  347. </button>
  348. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  349. 添加
  350. </button>
  351. <!-- <span>当前使用目标管理</span>
  352. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  353. <img
  354. src="../../../assets/line.png"
  355. class="cru_line"
  356. style="
  357. width: 125px;
  358. height: 20px;
  359. bottom: -10px;
  360. left: 155px;
  361. "
  362. /> -->
  363. </div>
  364. <div style="
  365. display: flex;
  366. flex-direction: row;
  367. align-items: center;
  368. ">
  369. <!-- <el-button
  370. type="primary"
  371. size="small"
  372. @click="dialogVisiblemb = true"
  373. >添加目标管理</el-button
  374. >
  375. <el-button
  376. type="primary"
  377. size="small"
  378. @click="deleteEva()"
  379. >清除内容</el-button
  380. > -->
  381. <!-- <div class="e_add_delete" @click="deleteEva()">
  382. <img src="../../../assets/icon/delete.png" alt="" />
  383. </div> -->
  384. </div>
  385. </div>
  386. <div v-if="evalua == ''">
  387. <div class="noneBox">
  388. <img src="../../../assets/icon/new/eva_none.png" />
  389. <span>请添加目标管理</span>
  390. </div>
  391. </div>
  392. <div class="e_add_content" v-else>
  393. <div class="e_add_list_pbox">
  394. <div class="e_add_list_pbox_title">
  395. <span class="type_title">切换模式</span>
  396. <div class="type_content">
  397. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  398. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  399. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  400. </div>
  401. </div>
  402. <div class="e_add_list_pbox_content">
  403. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  404. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  405. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  406. v-if="typeMode == 3">
  407. </SeeBoard>
  408. </div>
  409. </div>
  410. </div>
  411. </div>
  412. </div>
  413. </div>
  414. </div>
  415. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  416. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  417. <div style="position: relative;
  418. background: #fff;
  419. box-sizing: border-box;
  420. padding: 1px 20px 10px;
  421. width: 100%;
  422. border-radius: 10px;">
  423. <div style="
  424. display: flex;
  425. flex-direction: row;
  426. justify-content: space-between;
  427. align-items: center;
  428. " :style="{
  429. margin: true
  430. ? '20px 0 10px'
  431. : '20px 0 0',
  432. }">
  433. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  434. 已有教案
  435. <div class="add_info_box" style="margin: 0 0 0 auto">
  436. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  437. 上传已有教案
  438. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  439. style="display: none" v-if="inputShow" @change="
  440. beforeUploadInfo2(
  441. $event,
  442. 14
  443. )
  444. " />
  445. </button>
  446. <button class="c_pub_button_add" @click="clickGenTT"
  447. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  448. 一键智能总结生成
  449. </button>
  450. </div>
  451. </div>
  452. </div>
  453. <div>
  454. <div class="add_chapters_box add_c_none" v-if="
  455. teacherInfoData &&
  456. teacherInfoData.length == 0
  457. ">
  458. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  459. <span>暂时还没有内容,快去添加吧</span>
  460. </div>
  461. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  462. <div @dragstart="
  463. dragStart(item1, index1, 0)
  464. " @dragover.prevent="
  465. dragOver(index1, 0)
  466. " @dragend="dragEnd()" :draggable="isdrag ==
  467. 'chapter-' + 0 + '-' + index1
  468. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  469. getChapterData(
  470. $event,
  471. index1,
  472. item1.type
  473. )
  474. " :class="{
  475. dragOverTop2:
  476. newIndex === index1 &&
  477. typeIndex ==
  478. 'chapter-' +
  479. 0 +
  480. '-' +
  481. index1 &&
  482. oldIndex > index1 &&
  483. dragType == 'drag',
  484. dragOverBottom2:
  485. newIndex === index1 &&
  486. typeIndex ==
  487. 'chapter-' +
  488. 0 +
  489. '-' +
  490. index1 &&
  491. oldIndex < index1 &&
  492. dragType == 'drag',
  493. }">
  494. <div class="chapter_upload_o" style="
  495. position: relative;
  496. display: flex;
  497. align-items: center;
  498. ">
  499. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  500. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  501. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  502. </div>
  503. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  504. </div>
  505. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  506. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  507. </div>
  508. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  509. </div>
  510. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  511. </div>
  512. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  513. </div>
  514. </div>
  515. <div class="chapter_upload_n">
  516. <input readonly="true" v-if="
  517. item1.type == 2 ||
  518. item1.type == 3 ||
  519. item1.type == 12 ||
  520. item1.type == 13 ||
  521. item1.type == 7
  522. " :placeholder="item1.name" style="
  523. border: none;
  524. outline: none;
  525. width: 80%;
  526. minwidth: 215px;
  527. z-index: 99;
  528. font-size: 14px;
  529. white-space: nowrap;
  530. overflow: hidden;
  531. text-overflow: ellipsis;
  532. " />
  533. </div>
  534. <div class="chapter_upload_ic">
  535. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  536. <div class="chapter_upload_ic_r" @click.stop="
  537. deleteTeacherInfoData(
  538. $event,
  539. index1
  540. )
  541. ">
  542. <div></div>
  543. </div>
  544. </div>
  545. </div>
  546. </div>
  547. </div>
  548. </div>
  549. <div v-if="
  550. teacherinfoproVisible
  551. " class="mask">
  552. <div class="progressBox">
  553. <div class="lbox">
  554. <img src="../../../assets/loading.gif" />上传中,请稍后
  555. </div>
  556. <div style="margin-bottom: 10px">
  557. <span>{{
  558. teacherinfoisFinishSize
  559. }}</span>
  560. /
  561. <span>{{
  562. teacherinfoisAllSize
  563. }}</span>
  564. </div>
  565. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  566. ? teacherinfoprogress
  567. : 0
  568. " style="width: 80%"></el-progress> -->
  569. </div>
  570. </div>
  571. </div>
  572. </div>
  573. <div class="whiteBg" :style="{ minHeight: teacherTextLoading ? '250px' : 'auto'}"
  574. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;position: relative"
  575. v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..."
  576. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  577. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken"
  578. @click="cancelAjax('teacherText')">停止</div>
  579. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  580. <div class="c_info_title">
  581. 已有教案摘要
  582. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  583. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  584. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '右键已有教案摘要-提取摘要按钮')"
  585. @click="openAiDialog(2, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '点击已有教案摘要-提取摘要按钮')">提取摘要</button>
  586. </el-tooltip>
  587. </div>
  588. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  589. <div style="width: calc(100%);" class='op_task_box'>
  590. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  591. v-model="teacherCourseText" placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  592. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText"
  593. v-else-if="teacherTextLoading"></div>
  594. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  595. <div class="op_box" :class="{op_box_isquote: isQuote['aiteacherTextDetail']}">
  596. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  597. <div class="op_box_right">
  598. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  599. <div class="r_pub_button_op"
  600. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '右键已有教案摘要-智能优化按钮')"
  601. @click="openAiDialog(2, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '点击已有教案摘要-智能优化按钮')">
  602. 智能优化</div>
  603. </el-tooltip>
  604. <div class="r_pub_button_edit" style="margin-left:10px"
  605. @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击已有教案摘要-确定/编辑按钮')">
  606. {{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  607. <el-switch style="margin-left: 10px" v-model="isQuote['aiteacherTextDetail']" active-text="引用"
  608. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  609. @change="handleSwitchChange('aiteacherTextDetail'), addCourseBehavior('courseBehavior', '点击已有教案摘要-引用按钮')"></el-switch>
  610. </div>
  611. </div>
  612. </div>
  613. </div>
  614. </div>
  615. </div>
  616. <div class="whiteBg" :style="{ minHeight: targetTextLoading ? '250px' : 'auto'}"
  617. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading"
  618. element-loading-text="小可正在努力生成中,请稍等..."
  619. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  620. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1"
  621. @click="cancelAjax('target1')">停止</div>
  622. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  623. <div class="c_info_title">
  624. 课程目标
  625. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  626. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  627. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '右键课程目标-提取目标按钮')"
  628. @click="openAiDialog(2, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '点击课程目标-提取目标按钮')">提取目标</button>
  629.                   </el-tooltip>
  630. </div>
  631. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  632. <div style="width: calc(100%);" class='op_task_box'>
  633. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  634. v-model="targetCourseText" placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  635. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText"
  636. v-else-if="targetTextLoading"></div>
  637. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  638. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail']}">
  639. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  640. <div class="op_box_right">
  641. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  642. <div class="r_pub_button_op"
  643. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  644. @click="openAiDialog(2, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">
  645. 智能优化</div>
  646. </el-tooltip>
  647. <div class="r_pub_button_edit" style="margin-left:10px"
  648. @click="targetCourseTextB = !targetCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">
  649. {{ targetCourseTextB ? '确定' : '编辑'}}</div>
  650. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail']" active-text="引用"
  651. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  652. @change="handleSwitchChange('aitargetTextDetail'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  653. </div>
  654. </div>
  655. </div>
  656. </div>
  657. </div>
  658. </div>
  659. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  660. <div style="position: relative;
  661. background: #fff;
  662. box-sizing: border-box;
  663. padding: 1px 20px 10px;
  664. width: 100%;
  665. border-radius: 10px;">
  666. <div style="
  667. display: flex;
  668. flex-direction: row;
  669. justify-content: space-between;
  670. align-items: center;
  671. " :style="{
  672. margin: true
  673. ? '20px 0 10px'
  674. : '20px 0 0',
  675. }">
  676. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  677. 系统推荐参考资料
  678. <div class="add_info_box" style="margin: 0 0 0 auto">
  679. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  680. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  681. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  682. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  683.  </el-tooltip>
  684. </div>
  685. </div>
  686. </div>
  687. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  688. <div class="add_chapters_box add_c_none" v-if="
  689. cankaoInfoData &&
  690. cankaoInfoData.length == 0
  691. ">
  692. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  693. <span>暂时还没有内容,快去添加吧</span>
  694. </div>
  695. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  696. <div @dragstart="
  697. dragStart(item1, index1, 0)
  698. " @dragover.prevent="
  699. dragOver(index1, 0)
  700. " @dragend="dragEnd()" :draggable="isdrag ==
  701. 'chapter-' + 0 + '-' + index1
  702. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  703. getChapterData(
  704. $event,
  705. index1,
  706. item1.type
  707. )
  708. " :class="{
  709. dragOverTop2:
  710. newIndex === index1 &&
  711. typeIndex ==
  712. 'chapter-' +
  713. 0 +
  714. '-' +
  715. index1 &&
  716. oldIndex > index1 &&
  717. dragType == 'drag',
  718. dragOverBottom2:
  719. newIndex === index1 &&
  720. typeIndex ==
  721. 'chapter-' +
  722. 0 +
  723. '-' +
  724. index1 &&
  725. oldIndex < index1 &&
  726. dragType == 'drag',
  727. }">
  728. <div class="chapter_upload_o" style="
  729. position: relative;
  730. display: flex;
  731. align-items: center;
  732. ">
  733. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  734. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  735. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  736. </div>
  737. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  738. </div>
  739. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  740. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  741. </div>
  742. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  743. </div>
  744. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  745. </div>
  746. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  747. </div>
  748. </div>
  749. <div class="chapter_upload_n">
  750. <input readonly="true" v-if="
  751. item1.type == 2 ||
  752. item1.type == 3 ||
  753. item1.type == 12 ||
  754. item1.type == 13 ||
  755. item1.type == 7
  756. " :placeholder="item1.name" style="
  757. border: none;
  758. outline: none;
  759. width: 80%;
  760. minwidth: 215px;
  761. z-index: 99;
  762. font-size: 14px;
  763. white-space: nowrap;
  764. overflow: hidden;
  765. text-overflow: ellipsis;
  766. " />
  767. </div>
  768. <div class="chapter_upload_ic">
  769. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  770. <div class="chapter_upload_ic_r" @click.stop="
  771. deleteCankaoInfoData(
  772. $event,
  773. index1
  774. )
  775. ">
  776. <div></div>
  777. </div>
  778. </div>
  779. </div>
  780. </div>
  781. </div>
  782. </div>
  783. </div>
  784. </div>
  785. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  786. v-if="(!yiKeTemplateArray.includes(templateid))">
  787. <div style="position: relative;
  788. background: #fff;
  789. box-sizing: border-box;
  790. padding: 1px 20px 10px;
  791. width: 100%;
  792. border-radius: 10px;">
  793. <div style="
  794. display: flex;
  795. flex-direction: row;
  796. justify-content: space-between;
  797. align-items: center;
  798. " :style="{
  799. margin: true
  800. ? '20px 0 10px'
  801. : '20px 0 0',
  802. }">
  803. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  804. 参考标准
  805. <div class="add_info_box" style="margin: 0 0 0 auto">
  806. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  807. 上传参考标准
  808. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  809. style="display: none" v-if="inputShow" @change="
  810. beforeUploadInfo2(
  811. $event,
  812. 19
  813. )
  814. " />
  815. </button>
  816. </div>
  817. </div>
  818. </div>
  819. <div>
  820. <div class="add_chapters_box add_c_none" v-if="
  821. knowInfoData &&
  822. knowInfoData.length == 0
  823. ">
  824. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  825. <span>暂时还没有内容,快去添加吧</span>
  826. </div>
  827. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  828. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
  829. getChapterData(
  830. $event,
  831. index1,
  832. item1.type
  833. )
  834. ">
  835. <div class="chapter_upload_o" style="
  836. position: relative;
  837. display: flex;
  838. align-items: center;
  839. ">
  840. <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }"
  841. @click="checkKnowInfoData(item1.fileid)"></div>
  842. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  843. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  844. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  845. </div>
  846. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  847. </div>
  848. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  849. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  850. </div>
  851. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  852. </div>
  853. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  854. </div>
  855. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  856. </div>
  857. </div>
  858. <div class="chapter_upload_n">
  859. <input readonly="true" v-if="
  860. item1.type == 2 ||
  861. item1.type == 3 ||
  862. item1.type == 12 ||
  863. item1.type == 13 ||
  864. item1.type == 7
  865. " :placeholder="item1.name" @click.stop="
  866. checkChpater3($event, index1, item1)
  867. " style="
  868. border: none;
  869. outline: none;
  870. width: 80%;
  871. minwidth: 215px;
  872. z-index: 99;
  873. font-size: 14px;
  874. white-space: nowrap;
  875. overflow: hidden;
  876. text-overflow: ellipsis;
  877. " />
  878. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  879. border: none;
  880. outline: none;
  881. width: 80%;
  882. white-space: nowrap;
  883. overflow: hidden;
  884. text-overflow: ellipsis;
  885. " readonly="true" @click="
  886. selectAttText(index1)
  887. " />
  888. <input :placeholder="item1.title ? item1.title : '链接'
  889. " v-if="item1.type == 8" style="
  890. border: none;
  891. outline: none;
  892. width: 80%;
  893. white-space: nowrap;
  894. overflow: hidden;
  895. text-overflow: ellipsis;
  896. " readonly="true" @click="selectLine(index1)" />
  897. <input :placeholder="item1.title ? item1.title : '链接'
  898. " v-if="item1.type == 14" style="
  899. border: none;
  900. outline: none;
  901. width: 80%;
  902. white-space: nowrap;
  903. overflow: hidden;
  904. text-overflow: ellipsis;
  905. " readonly="true" @click="
  906. openUpdateSource(index1)
  907. " />
  908. </div>
  909. <div class="chapter_upload_ic">
  910. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  911. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  912. checkChpater3($event, index1, item1)
  913. ">
  914. <div></div>
  915. </div>
  916. <div class="chapter_upload_ic_r" @click.stop="
  917. deleteKnowInfoData(
  918. $event,
  919. index1
  920. )
  921. ">
  922. <div></div>
  923. </div>
  924. </div>
  925. </div>
  926. </div>
  927. </div>
  928. </div>
  929. <div v-if="
  930. knowinfoproVisible
  931. " class="mask">
  932. <div class="progressBox">
  933. <div class="lbox">
  934. <img src="../../../assets/loading.gif" />上传中,请稍后
  935. </div>
  936. <div style="margin-bottom: 10px">
  937. <span>{{
  938. knowinfoisFinishSize
  939. }}</span>
  940. /
  941. <span>{{
  942. knowinfoisAllSize
  943. }}</span>
  944. </div>
  945. </div>
  946. </div>
  947. </div>
  948. </div>
  949. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;"
  950. v-if="(!yiKeTemplateArray.includes(templateid))" :style="{padding: interFindPan ? '0 0 15px' : '0 0 0'}">
  951. <div style="position: relative;
  952. background: #fff;
  953. box-sizing: border-box;
  954. width: 100%;
  955. border-radius: 10px;" :style="{padding: interFindPan ? '1px 20px 10px' : '1px 20px 1px'}">
  956. <div style="
  957. display: flex;
  958. flex-direction: row;
  959. justify-content: space-between;
  960. align-items: center;
  961. " :style="{
  962. margin: true
  963. ? '20px 0 10px'
  964. : '20px 0 0',
  965. }">
  966. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  967. 检索资料
  968. <div class="add_info_box" style="margin: 0 0 0 auto;align-items:center">
  969. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  970. @click="interFindPan = !interFindPan,forceUpdate2()">{{ interFindPan ? '折叠' : '展开'}}</button>
  971. </div>
  972. </div>
  973. </div>
  974. <div class="know_serach" v-show="interFindPan">
  975. <div class="know_serach_box" v-if="getTypeC(2).length || getTypeC(1).length">
  976. <span>检索项:</span>
  977. <el-select v-if="getTypeC(2).length" v-model="typeC1" placeholder="请选择年级" @change="forceUpdate()" style="width: 150px;margin-right: 10px;" clearable multiple :collapse-tags="true" :collapse-tags-tooltip="true">
  978. <el-option v-for="(e, eIndex) in getTypeC(2)" :key="eIndex" :label="e" :value="e">
  979. </el-option>
  980. </el-select>
  981. <el-select v-if="getTypeC(1).length" v-model="typeC2" placeholder="请选择学科" @change="forceUpdate()" style="width: 150px;margin-right: 10px;" clearable multiple :collapse-tags="true" :collapse-tags-tooltip="true">
  982. <el-option v-for="(e, eIndex) in getTypeC(1)" :key="eIndex" :label="e" :value="e">
  983. </el-option>
  984. </el-select>
  985. </div>
  986. <div class="know_serach_box">
  987. <span>检索关键词:</span>
  988. <input type="text" placeholder="请输入检索关键词" class="binfo_input" v-model="searchFileName"
  989. style="width: 100%;margin: 0 5px 0 0;min-height: 36px;box-sizing: border-box;height: 36px;" />
  990. <button class="c_pub_button_add" @click="startFindMatchingContents">点击检索资料</button>
  991. </div>
  992. <!-- <div class="know_serach_box" v-if="getTypeC(2)">
  993. <span>筛选年级:</span>
  994. <div>{{getTypeC(2)}}</div>
  995. </div>
  996. <div class="know_serach_box" v-if="getTypeC(1)">
  997. <span>筛选学科:</span>
  998. <div>{{getTypeC(1)}}</div>
  999. </div> -->
  1000. <div class="know_serach_box" v-if="this.knowInfoData3.length">
  1001. <span>筛选项:</span>
  1002. <el-select v-model="knowFileType1" placeholder="请选择册数" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1003. <el-option v-for="(e, eIndex) in knowFileTypeArray1" :key="eIndex" :label="e" :value="e">
  1004. </el-option>
  1005. </el-select>
  1006. <el-select v-model="knowFileType2" placeholder="请选择单元" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1007. <el-option v-for="(e, eIndex) in 10" :key="eIndex" :label="`第${e}单元`" :value="e">
  1008. </el-option>
  1009. </el-select>
  1010. <el-select v-model="knowFileType" placeholder="请选择类型" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1011. <el-option v-for="(e, eIndex) in knowFileTypeArray" :key="eIndex" :label="e" :value="e">
  1012. </el-option>
  1013. </el-select>
  1014. <button class="c_pub_button_confirm" style="margin: 0 10px 0 0px;" @click="knowFileType1 = '',knowFileType2 = '',knowFileType = ''">重置</button>
  1015. <button v-loading="isfindMatchingContents" class="c_pub_button_confirm" style="margin: 0 0 0 0px;" @click="panFind" v-if="findMatchingContentsPage != 1">下一页</button>
  1016. <button class="c_pub_button_stopeped" style="margin: 0 0 0 10px;" @click="cancelAjax('findMatchingContents')" v-if="isfindMatchingContents">停止</button>
  1017. </div>
  1018. </div>
  1019. <div style="display: flex; align-items: center;" v-show="interFindPan">
  1020. <div v-loading="knowInfoDataLoading" element-loading-text="小可正在努力生成中,请稍等..."
  1021. style="height: 400px; width:calc(50% - 50px);">
  1022. <div class="c_pub_button_confirm stopBtn" v-if="knowInfoDataLoading && isfindMatchingContents"
  1023. @click="cancelAjax('findMatchingContents')">停止</div>
  1024. <div class="add_chapters_check_box" v-if="allknowInfoData3() && allknowInfoData3().length">
  1025. <div class="add_chapters_check" @click="checkAllKnowInfoData3()">
  1026. <div class="chapter_upload_check" :class="{ checked: panknowInfoData3CheckAll() }"></div>
  1027. <div style="margin-left: 5px">全选</div>
  1028. </div>
  1029. </div>
  1030. <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
  1031. allknowInfoData3() &&
  1032. allknowInfoData3().length == 0
  1033. ">
  1034. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1035. <span>暂时还没有内容,快去检索吧</span>
  1036. </div>
  1037. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:calc(100% - 50px);overflow: auto;padding: 0;">
  1038. <div class="chapter_upload">
  1039. <div class="chapter_upload_o" style="position: relative; display: flex; align-items: center; padding: 0 10px;box-sizing: border-box;">
  1040. <div class="chapter_upload_check" style="min-width: 50px; background: unset;text-align: center; font-size: 14px;">选中</div>
  1041. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1042. <div class="chapter_upload_l_i2" style="background: unset"></div>
  1043. </div>
  1044. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px); margin-top:0">
  1045. <div class="chapter_upload_box" style="color: #000">文件名</div>
  1046. </div>
  1047. <div class="chapter_upload_type">文件类型</div>
  1048. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center; font-size: 14px;">操作</div>
  1049. </div>
  1050. </div>
  1051. <!-- @scroll="panFind" -->
  1052. <div class="chapter_upload_box_file">
  1053. <div class="chapter_upload" v-for="(item1, index1) in allknowInfoData3()" :key="item1.id" @click="
  1054. getChapterData(
  1055. $event,
  1056. index1,
  1057. item1.type
  1058. )
  1059. ">
  1060. <div class="chapter_upload_o" style="
  1061. position: relative;
  1062. display: flex;
  1063. align-items: center;
  1064. padding: 0 10px;
  1065. box-sizing: border-box;
  1066. ">
  1067. <div class="chapter_upload_check file-loading-class"
  1068. :class="{ checked: knowFileids3.indexOf(item1.url) != -1 }"
  1069. @click="checkKnowInfoData3(item1.url)" style="min-width: 50px;text-align: center;background-size: 15px 15px;background-repeat: no-repeat;background-position: center;"></div>
  1070. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1071. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1072. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1073. </div>
  1074. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1075. </div>
  1076. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1077. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1078. </div>
  1079. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1080. </div>
  1081. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1082. </div>
  1083. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1084. </div>
  1085. </div>
  1086. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px)">
  1087. <el-tooltip :content="item1.name" placement="top" effect="dark">
  1088. <!-- content to trigger tooltip here -->
  1089. <div v-if="
  1090. item1.type == 2 ||
  1091. item1.type == 3 ||
  1092. item1.type == 12 ||
  1093. item1.type == 13 ||
  1094. item1.type == 7
  1095. " @click.stop="
  1096. checkChpater3($event, index1, item1)
  1097. " class="chapter_upload_box" >{{ item1.name }}</div>
  1098. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  1099. selectAttText(index1)
  1100. " >{{ item1.name }}</div>
  1101. <div v-if="item1.type == 8" class="chapter_upload_box" @click="selectLine(index1)" >{{ item1.title ? item1.title : '链接' }}</div>
  1102. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  1103. openUpdateSource(index1)
  1104. " >{{ item1.title ? item1.title : '链接' }}</div>
  1105. </el-tooltip>
  1106. </div>
  1107. <div class="chapter_upload_type">
  1108. {{ getFileType(item1.name) }}
  1109. </div>
  1110. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center;margin:0 10px 0px auto;">
  1111. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1112. <div class="chapter_upload_ic_check" style="margin: 0" v-if="item1.type == 3" @click.stop="
  1113. checkChpater3($event, index1, item1)
  1114. ">
  1115. <div></div>
  1116. </div>
  1117. <!-- <div class="chapter_upload_ic_r" @click.stop="
  1118. deleteKnowInfoData3(
  1119. $event,
  1120. index1
  1121. )
  1122. ">
  1123. <div></div>
  1124. </div> -->
  1125. </div>
  1126. </div>
  1127. </div>
  1128. </div>
  1129. </div>
  1130. </div>
  1131. <div style="margin: 0 5px; min-width: fit-content">
  1132. <button class="c_pub_button_confirm" @click="useUrl">
  1133. 使用
  1134. <svg t="1730970226429" class="right_icon" viewBox="0 0 1024 1024" version="1.1"
  1135. xmlns="http://www.w3.org/2000/svg" p-id="1465" width="128" height="128">
  1136. <path
  1137. d="M236.552013 926.853955a55.805997 55.805997 0 0 0 0 80.454996 59.682997 59.682997 0 0 0 82.794996 0l468.099978-455.081978a55.805997 55.805997 0 0 0 0-80.453996L319.348009 16.689999a59.682997 59.682997 0 0 0-82.794996 0 55.805997 55.805997 0 0 0 0 80.454996L663.401993 511.999975 236.624013 926.853955z"
  1138. p-id="1466" fill="#ffffff"></path>
  1139. </svg>
  1140. </button>
  1141. </div>
  1142. <div style="height: 400px; width:calc(50% - 50px);position: relative;">
  1143. <div class="add_chapters_check_box" v-if="knowInfoData2 && knowInfoData2.length">
  1144. <div class="add_chapters_check" @click="checkAllKnowInfoData2()" v-if="knowInfoData2 && knowInfoData2.length">
  1145. <div class="chapter_upload_check" :class="{ checked: knowFileids2.length == knowInfoData2.length }"></div>
  1146. <div style="margin-left: 5px">全选</div>
  1147. </div>
  1148. <button v-if="knowFileids2.length" class="c_pub_button_confirm" style="margin: 0 0 0 10px;" @click="deleteCheckAllKnowInfoData2()">删除</button>
  1149. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)" style="margin: 0 0 0 auto;">
  1150. 上传知识库
  1151. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1152. style="display: none" v-if="inputShow" @change="beforeUploadInfo2($event, 20)" />
  1153. </button>
  1154. </div>
  1155. <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
  1156. knowInfoData2 &&
  1157. knowInfoData2.length == 0
  1158. ">
  1159. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1160. <span>暂时还没有内容,快去添加吧</span>
  1161. </div>
  1162. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:calc(100% - 50px);overflow: auto;padding: 0;" ref="rightKnow">
  1163. <div class="chapter_upload">
  1164. <div class="chapter_upload_o" style="position: relative; display: flex; align-items: center; padding: 0 10px;box-sizing: border-box;">
  1165. <div class="chapter_upload_check" style="min-width: 50px; background: unset;text-align: center; font-size: 14px;">选中</div>
  1166. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1167. <div class="chapter_upload_l_i2" style="background: unset"></div>
  1168. </div>
  1169. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px); margin-top:0">
  1170. <div class="chapter_upload_box" style="color: #000">文件名</div>
  1171. </div>
  1172. <div class="chapter_upload_type">文件类型</div>
  1173. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center; font-size: 14px;">操作</div>
  1174. </div>
  1175. </div>
  1176. <div class="chapter_upload_box_file">
  1177. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData2" :key="item1.id" @click="
  1178. getChapterData(
  1179. $event,
  1180. index1,
  1181. item1.type
  1182. )
  1183. ">
  1184. <div class="chapter_upload_o" style="
  1185. position: relative;
  1186. display: flex;
  1187. align-items: center;
  1188. padding: 0 10px;
  1189. box-sizing: border-box;
  1190. ">
  1191. <div class="chapter_upload_check file-loading-class"
  1192. :class="{ checked: knowFileids2.indexOf(item1.fileid) != -1 }"
  1193. @click="checkKnowInfoData2(item1.fileid)" v-loading="!item1.fileid" style="min-width: 50px;text-align: center;background-size: 15px 15px;background-repeat: no-repeat;background-position: center;"></div>
  1194. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1195. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1196. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1197. </div>
  1198. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1199. </div>
  1200. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1201. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1202. </div>
  1203. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1204. </div>
  1205. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1206. </div>
  1207. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1208. </div>
  1209. </div>
  1210. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px)">
  1211. <el-tooltip :content="item1.name" placement="top" effect="dark">
  1212. <!-- content to trigger tooltip here -->
  1213. <div v-if="
  1214. item1.type == 2 ||
  1215. item1.type == 3 ||
  1216. item1.type == 12 ||
  1217. item1.type == 13 ||
  1218. item1.type == 7
  1219. " @click.stop="
  1220. checkChpater3($event, index1, item1)
  1221. " class="chapter_upload_box">{{ item1.name }}</div>
  1222. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  1223. selectAttText(index1)
  1224. ">{{ item1.name }}</div>
  1225. <div v-if="item1.type == 8" class="chapter_upload_box" @click="selectLine(index1)">{{ item1.title ? item1.title : '链接' }}</div>
  1226. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  1227. openUpdateSource(index1)
  1228. ">{{ item1.title ? item1.title : '链接' }}</div>
  1229. </el-tooltip>
  1230. </div>
  1231. <div class="chapter_upload_type">
  1232. {{ getFileType(item1.name) }}
  1233. </div>
  1234. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center;margin:0 10px 0px auto;">
  1235. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1236. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1237. checkChpater3($event, index1, item1)
  1238. ">
  1239. <div></div>
  1240. </div>
  1241. <div class="chapter_upload_ic_r" @click.stop="
  1242. deleteKnowInfoData2(
  1243. $event,
  1244. index1
  1245. )
  1246. ">
  1247. <div></div>
  1248. </div>
  1249. </div>
  1250. </div>
  1251. </div>
  1252. </div>
  1253. </div>
  1254. <div v-if="
  1255. knowinfoproVisible2
  1256. " class="mask">
  1257. <div class="progressBox">
  1258. <div class="lbox">
  1259. <img src="../../../assets/loading.gif" />上传中,请稍后
  1260. </div>
  1261. <div style="margin-bottom: 10px">
  1262. <span>{{
  1263. knowinfoisFinishSize2
  1264. }}</span>
  1265. /
  1266. <span>{{
  1267. knowinfoisAllSize2
  1268. }}</span>
  1269. </div>
  1270. </div>
  1271. </div>
  1272. </div>
  1273. </div>
  1274. <!-- <div v-if="
  1275. knowinfoproVisible2
  1276. " class="mask">
  1277. <div class="progressBox">
  1278. <div class="lbox">
  1279. <img src="../../../assets/loading.gif" />上传中,请稍后
  1280. </div>
  1281. <div style="margin-bottom: 10px">
  1282. <span>{{
  1283. knowinfoisFinishSize2
  1284. }}</span>
  1285. /
  1286. <span>{{
  1287. knowinfoisAllSize2
  1288. }}</span>
  1289. </div>
  1290. </div>
  1291. </div> -->
  1292. </div>
  1293. </div>
  1294. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  1295. v-if="(!yiKeTemplateArray.includes(templateid)) && infoData2.length">
  1296. <div style="position: relative;
  1297. background: #fff;
  1298. box-sizing: border-box;
  1299. padding: 1px 20px 10px;
  1300. width: 100%;
  1301. border-radius: 10px;">
  1302. <div style="
  1303. display: flex;
  1304. flex-direction: row;
  1305. justify-content: space-between;
  1306. align-items: center;
  1307. " :style="{
  1308. margin: true
  1309. ? '20px 0 10px'
  1310. : '20px 0 0',
  1311. }">
  1312. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1313. 知识库
  1314. <div class="add_info_box" style="margin: 0 0 0 auto">
  1315. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1316. 上传补充资料
  1317. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1318. style="display: none" v-if="inputShow" @change="
  1319. beforeUploadInfo2(
  1320. $event,
  1321. 15
  1322. )
  1323. " />
  1324. </button>
  1325. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="knowFileids.length">
  1326. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1327. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  1328. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  1329.  </el-tooltip> -->
  1330. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1331. @click="openAiDialog(2, 'aiSearchFile2')" v-if="knowFileids.length">智能检索资料</button>
  1332. </div>
  1333. </div>
  1334. </div>
  1335. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等..."
  1336. :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  1337. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken"
  1338. @click="cancelAjax('file')">停止</div>
  1339. <div class="add_chapters_box add_c_none" v-if="
  1340. infoData2 &&
  1341. infoData2.length == 0
  1342. ">
  1343. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1344. <span>暂时还没有内容,快去添加吧</span>
  1345. </div>
  1346. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1347. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  1348. getChapterData(
  1349. $event,
  1350. index1,
  1351. item1.type
  1352. )
  1353. ">
  1354. <div class="chapter_upload_o" style="
  1355. position: relative;
  1356. display: flex;
  1357. align-items: center;
  1358. ">
  1359. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }"
  1360. @click="checkInfoData(item1.fileid, item1)"></div>
  1361. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1362. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1363. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1364. </div>
  1365. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1366. </div>
  1367. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1368. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1369. </div>
  1370. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1371. </div>
  1372. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1373. </div>
  1374. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1375. </div>
  1376. </div>
  1377. <div class="chapter_upload_n">
  1378. <input readonly="true" v-if="
  1379. item1.type == 2 ||
  1380. item1.type == 3 ||
  1381. item1.type == 12 ||
  1382. item1.type == 13 ||
  1383. item1.type == 7
  1384. " :placeholder="item1.name" @click.stop="
  1385. checkChpater2($event, index1 )
  1386. " style="
  1387. border: none;
  1388. outline: none;
  1389. width: 80%;
  1390. minwidth: 215px;
  1391. z-index: 99;
  1392. font-size: 14px;
  1393. white-space: nowrap;
  1394. overflow: hidden;
  1395. text-overflow: ellipsis;
  1396. " />
  1397. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1398. border: none;
  1399. outline: none;
  1400. width: 80%;
  1401. white-space: nowrap;
  1402. overflow: hidden;
  1403. text-overflow: ellipsis;
  1404. " readonly="true" @click="
  1405. selectAttText(index1)
  1406. " />
  1407. <input :placeholder="item1.title ? item1.title : '链接'
  1408. " v-if="item1.type == 8" style="
  1409. border: none;
  1410. outline: none;
  1411. width: 80%;
  1412. white-space: nowrap;
  1413. overflow: hidden;
  1414. text-overflow: ellipsis;
  1415. " readonly="true" @click="selectLine(index1)" />
  1416. <input :placeholder="item1.title ? item1.title : '链接'
  1417. " v-if="item1.type == 14" 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="
  1425. openUpdateSource(index1)
  1426. " />
  1427. </div>
  1428. <div class="chapter_upload_ic">
  1429. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1430. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1431. checkChpater2($event, index1 )
  1432. ">
  1433. <div></div>
  1434. </div>
  1435. <div class="chapter_upload_ic_r" @click.stop="
  1436. deleteInfoData2(
  1437. $event,
  1438. index1
  1439. )
  1440. ">
  1441. <div></div>
  1442. </div>
  1443. </div>
  1444. </div>
  1445. </div>
  1446. </div>
  1447. </div>
  1448. <div v-if="
  1449. infoproVisible
  1450. " class="mask">
  1451. <div class="progressBox">
  1452. <div class="lbox">
  1453. <img src="../../../assets/loading.gif" />上传中,请稍后
  1454. </div>
  1455. <div style="margin-bottom: 10px">
  1456. <span>{{
  1457. infoisFinishSize
  1458. }}</span>
  1459. /
  1460. <span>{{
  1461. infoisAllSize
  1462. }}</span>
  1463. </div>
  1464. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1465. ? infoprogress
  1466. : 0
  1467. " style="width: 80%"></el-progress> -->
  1468. </div>
  1469. </div>
  1470. </div>
  1471. </div>
  1472. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="(isuseT === 2)">
  1473. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1474. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1475. 课程概况<span class="inter_setting" @click="openInterPanSetting2" v-if="istemplate == 1"></span>
  1476. <div class="inter_setting_panel" v-show="interSetting">
  1477. <div class="panel_title">配置工作流</div>
  1478. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1479. <div class="panel_input">
  1480. <input type="text" :placeholder="'请输入agentid'" class="binfo_input" v-model="r_agentid" />
  1481. <div class="panel_input_record">
  1482. <span>议程和问题引导</span>
  1483. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordstart"
  1484. placeholder="议程和问题引导"></textarea>
  1485. </div>
  1486. <div class="panel_input_record">
  1487. <span>查看进度</span>
  1488. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordCheckJindu"
  1489. placeholder="查看进度"></textarea>
  1490. </div>
  1491. <div class="panel_input_record">
  1492. <span>总结并生成课程概况</span>
  1493. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordCourseD"
  1494. placeholder="总结并生成课程概况"></textarea>
  1495. </div>
  1496. </div>
  1497. <div class="panel_button" style="justify-content: flex-end;">
  1498. <button class="c_pub_button_confirm" @click="setAgentid2" style="margin-right: 10px;">确认</button>
  1499. <button class="c_pub_button_return" @click="cancelInterSetting2">取消</button>
  1500. </div>
  1501. </div>
  1502. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1503. @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1504. </div>
  1505. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1506. <div style="width: calc(100%);height: 100%" class='op_task_box inter_voiceBox'>
  1507. <recordV :videoText2.sync="recordVideoText" :audioUrl2.sync="recordAudioUrl"></recordV>
  1508. </div>
  1509. <div class="inter_box" v-show="interPan" style="margin: 0 0 0 10px;max-width: 50%;max-height:500px;">
  1510. <aiBoxCourseDetail v-if="aiJson.recordAgentid && chatid" :languageSetting="languageSetting"
  1511. :courseId="chatid" :courseText2.sync="courseText" :viedoText="recordVideoText"
  1512. :agentid="aiJson.recordAgentid" :recordstart="aiJson.recordstart"
  1513. :recordCheckJindu="aiJson.recordCheckJindu" :recordCourseD="aiJson.recordCourseD"
  1514. :courseInfo="course_info" :fileids='[...knowFileids, ...knowFileids2]'></aiBoxCourseDetail>
  1515. </div>
  1516. </div>
  1517. </div>
  1518. </div>
  1519. <div class="whiteBg" :style="{ minHeight: textLoading ? '250px' : 'auto'}"
  1520. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading"
  1521. element-loading-text="小可正在努力生成中,请稍等..."
  1522. v-if="(!(isuseT === true) && !(isuseT === 1) && !(isuseT === 2) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid)) || (isuseT === 2 && courseText)">
  1523. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken"
  1524. @click="cancelAjax('text')">停止</div>
  1525. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1526. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  1527. 课程简要描述
  1528. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1529. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1530. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1), addCourseBehavior('courseBehavior', '右键课程简要描述-AI优化按钮')"
  1531. @click="openAiDialog(2, 'aiDetail',1), addCourseBehavior('courseBehavior', '点击课程简要描述-AI优化按钮')">AI优化</button>
  1532. </el-tooltip>
  1533. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;"
  1534. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">生成概况和目标</button>
  1535. </div>
  1536. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1537. <div style="width: calc(100%);" class='op_task_box'>
  1538. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1539. placeholder="请输入课程简要描述" v-if="courseTextB" @change="textAreaChange('courseText')"></textarea>
  1540. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText"
  1541. v-else-if="textLoading"></div>
  1542. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  1543. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1544. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1545. <div class="op_box_right">
  1546. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1547. <div class="r_pub_button_op"
  1548. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2), addCourseBehavior('courseBehavior', '右键课程简要描述-智能优化按钮')"
  1549. @click="openAiDialog(2, 'aiDetail', 2), addCourseBehavior('courseBehavior', '点击课程简要描述-智能优化按钮')">
  1550. 智能优化</div>
  1551. </el-tooltip>
  1552. <div class="r_pub_button_edit" style="margin-left:10px"
  1553. @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程简要描述-确定/编辑按钮')">
  1554. {{ courseTextB ? '确定' : '编辑'}}</div>
  1555. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用"
  1556. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  1557. @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程简要描述-引用按钮')"></el-switch>
  1558. </div>
  1559. </div>
  1560. </div>
  1561. </div>
  1562. </div>
  1563. </div>
  1564. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading"
  1565. element-loading-text="小可正在努力生成中,请稍等..." v-if="(isuseT === 1)">
  1566. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1567. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1568. 课程概况<span class="inter_setting" @click="openInterPanSetting"></span>
  1569. <div class="inter_setting_panel" v-show="interSetting">
  1570. <div class="panel_title">配置工作流</div>
  1571. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1572. <div class="panel_input">
  1573. <input type="text" :placeholder="this.aiJson.agentid ? this.aiJson.agentid : '请输入agentid'"
  1574. class="binfo_input" v-model="agentid" />
  1575. </div>
  1576. <div class="panel_button">
  1577. <button class="c_pub_button_confirm" @click="setAgentid">确认</button>
  1578. <button class="c_pub_button_confirm" @click="rebuildAgentid" v-if="istemplate != 1">复原</button>
  1579. <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
  1580. </div>
  1581. </div>
  1582. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1583. @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1584. </div>
  1585. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1586. <div class="inter_box" v-show="interPan">
  1587. <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl"
  1588. frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
  1589. </div>
  1590. <div style="width: calc(100%);height: 100%" class='op_task_box'
  1591. :class="{inter_Detailbox: !courseTextB && interPan}">
  1592. <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
  1593. placeholder="请输入课程简要描述" v-if="courseTextB && interPan"
  1594. @change="textAreaChange('courseText')"></textarea>
  1595. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1596. placeholder="请输入课程简要描述" v-else-if="courseTextB && !interPan"
  1597. @change="textAreaChange('courseText')"></textarea>
  1598. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText"
  1599. :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-else-if="textLoading"></div>
  1600. <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}"
  1601. v-html="MarkdownT(courseText)" v-else></div>
  1602. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1603. <div class="op_remark"></div>
  1604. <div class="op_box_right">
  1605. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1606. <div class="r_pub_button_op"
  1607. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1608. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1609. </el-tooltip> -->
  1610. <div class="r_pub_button_edit" style="margin-left:10px"
  1611. @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程概况-确定/编辑按钮')">
  1612. {{ courseTextB ? '确定' : '编辑'}}</div>
  1613. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用"
  1614. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  1615. @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程概况-引用按钮')"></el-switch>
  1616. </div>
  1617. </div>
  1618. </div>
  1619. </div>
  1620. </div>
  1621. </div>
  1622. <div class="whiteBg" :style="{ minHeight: targetTextLoading2 ? '250px' : 'auto'}"
  1623. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2"
  1624. element-loading-text="小可正在努力生成中,请稍等..."
  1625. 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'">
  1626. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2"
  1627. @click="cancelAjax('target2')">停止</div>
  1628. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1629. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  1630. 课程目标
  1631. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  1632. 上传补充资料
  1633. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1634. style="display: none" v-if="inputShow" @change="
  1635. beforeUploadInfo2(
  1636. $event,
  1637. 16
  1638. )
  1639. " />
  1640. </button>
  1641. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  1642. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1643. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  1644. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  1645. </el-tooltip>
  1646. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1647. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1648. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '右键课程目标-生成目标按钮')"
  1649. @click="openAiDialog(2, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '点击课程目标-生成目标按钮')"
  1650. ref="aitargetTextDetail3">生成目标</button>
  1651. </el-tooltip>
  1652. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  1653. <div class="add_chapters_box add_c_none" v-if="
  1654. mubiaoInfoData &&
  1655. mubiaoInfoData.length == 0
  1656. ">
  1657. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1658. <span>暂时还没有内容,快去添加吧</span>
  1659. </div>
  1660. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1661. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  1662. getChapterData(
  1663. $event,
  1664. index1,
  1665. item1.type
  1666. )
  1667. ">
  1668. <div class="chapter_upload_o" style="
  1669. position: relative;
  1670. display: flex;
  1671. align-items: center;
  1672. ">
  1673. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1674. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1675. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1676. </div>
  1677. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1678. </div>
  1679. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1680. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1681. </div>
  1682. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1683. </div>
  1684. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1685. </div>
  1686. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1687. </div>
  1688. </div>
  1689. <div class="chapter_upload_n">
  1690. <input readonly="true" v-if="
  1691. item1.type == 2 ||
  1692. item1.type == 3 ||
  1693. item1.type == 12 ||
  1694. item1.type == 13 ||
  1695. item1.type == 7
  1696. " :placeholder="item1.name" @click.stop="
  1697. checkChpater3($event, index1, item1)
  1698. " style="
  1699. border: none;
  1700. outline: none;
  1701. width: 80%;
  1702. minwidth: 215px;
  1703. z-index: 99;
  1704. font-size: 14px;
  1705. white-space: nowrap;
  1706. overflow: hidden;
  1707. text-overflow: ellipsis;
  1708. " />
  1709. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1710. border: none;
  1711. outline: none;
  1712. width: 80%;
  1713. white-space: nowrap;
  1714. overflow: hidden;
  1715. text-overflow: ellipsis;
  1716. " readonly="true" @click="
  1717. selectAttText(index1)
  1718. " />
  1719. <input :placeholder="item1.title ? item1.title : '链接'
  1720. " v-if="item1.type == 8" style="
  1721. border: none;
  1722. outline: none;
  1723. width: 80%;
  1724. white-space: nowrap;
  1725. overflow: hidden;
  1726. text-overflow: ellipsis;
  1727. " readonly="true" @click="selectLine(index1)" />
  1728. <input :placeholder="item1.title ? item1.title : '链接'
  1729. " v-if="item1.type == 14" style="
  1730. border: none;
  1731. outline: none;
  1732. width: 80%;
  1733. white-space: nowrap;
  1734. overflow: hidden;
  1735. text-overflow: ellipsis;
  1736. " readonly="true" @click="
  1737. openUpdateSource(index1)
  1738. " />
  1739. </div>
  1740. <div class="chapter_upload_ic">
  1741. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1742. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1743. checkChpater3($event, index1, item1)
  1744. ">
  1745. <div></div>
  1746. </div>
  1747. <div class="chapter_upload_ic_r" @click.stop="
  1748. deletemubiaoInfoData(
  1749. $event,
  1750. index1
  1751. )
  1752. ">
  1753. <div></div>
  1754. </div>
  1755. </div>
  1756. </div>
  1757. </div>
  1758. </div>
  1759. </div>
  1760. <div v-if="
  1761. mubiaoinfoproVisible
  1762. " class="mask">
  1763. <div class="progressBox">
  1764. <div class="lbox">
  1765. <img src="../../../assets/loading.gif" />上传中,请稍后
  1766. </div>
  1767. <div style="margin-bottom: 10px">
  1768. <span>{{
  1769. mubiaoinfoisFinishSize
  1770. }}</span>
  1771. /
  1772. <span>{{
  1773. mubiaoinfoisAllSize
  1774. }}</span>
  1775. </div>
  1776. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1777. ? mubiaoinfoprogress
  1778. : 0
  1779. " style="width: 80%"></el-progress> -->
  1780. </div>
  1781. </div>
  1782. </div>
  1783. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1784. <div style="width: calc(100%);" class='op_task_box'>
  1785. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  1786. v-model="targetCourseText2" placeholder="请输入课程目标" v-if="targetCourseText2B"
  1787. @change="textAreaChange('targetCourseText2')"></textarea>
  1788. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2"
  1789. v-else-if="targetTextLoading2"></div>
  1790. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1791. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail2']}">
  1792. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1793. <div class="op_box_right">
  1794. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1795. <div class="r_pub_button_op"
  1796. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  1797. @click="openAiDialog(2, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">
  1798. 智能优化</div>
  1799. </el-tooltip>
  1800. <div class="r_pub_button_edit" style="margin-left:10px"
  1801. @click="targetCourseText2B = !targetCourseText2B,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">
  1802. {{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1803. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail2']" active-text="引用"
  1804. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  1805. @change="handleSwitchChange('aitargetTextDetail2'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  1806. </div>
  1807. </div>
  1808. </div>
  1809. </div>
  1810. </div>
  1811. </div>
  1812. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  1813. v-if="yiKeTemplateArray.includes(templateid)">
  1814. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1815. <div class="c_info_title">
  1816. 补充资料
  1817. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1818. </div>
  1819. <div class="buchong_box">
  1820. <span>暂时还没有内容,快去添加吧~</span>
  1821. </div>
  1822. </div> -->
  1823. <div style="position: relative;
  1824. background: #fff;
  1825. box-sizing: border-box;
  1826. padding: 1px 20px 10px;
  1827. width: 100%;
  1828. border-radius: 10px;">
  1829. <div style="
  1830. display: flex;
  1831. flex-direction: row;
  1832. justify-content: space-between;
  1833. align-items: center;
  1834. " :style="{
  1835. margin: true
  1836. ? '20px 0 10px'
  1837. : '20px 0 0',
  1838. }">
  1839. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1840. 补充资料
  1841. <div class="add_info_box" style="margin: 0 0 0 auto">
  1842. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1843. 上传补充资料
  1844. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1845. style="display: none" v-if="inputShow" @change="
  1846. beforeUploadInfo2(
  1847. $event,
  1848. 13
  1849. )
  1850. " />
  1851. </button>
  1852. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1853. 图文
  1854. </button>
  1855. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1856. 链接
  1857. </button>
  1858. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1859. 代码
  1860. </button>
  1861. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1862. 资源
  1863. </button> -->
  1864. </div>
  1865. </div>
  1866. </div>
  1867. <div>
  1868. <div class="add_chapters_box add_c_none" v-if="
  1869. infoData &&
  1870. infoData.length == 0
  1871. ">
  1872. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1873. <span>暂时还没有内容,快去添加吧</span>
  1874. </div>
  1875. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1876. <div @dragstart="
  1877. dragStart(item1, index1, 0)
  1878. " @dragover.prevent="
  1879. dragOver(index1, 0)
  1880. " @dragend="dragEnd()" :draggable="isdrag ==
  1881. 'chapter-' + 0 + '-' + index1
  1882. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1883. getChapterData(
  1884. $event,
  1885. index1,
  1886. item1.type
  1887. )
  1888. " :class="{
  1889. dragOverTop2:
  1890. newIndex === index1 &&
  1891. typeIndex ==
  1892. 'chapter-' +
  1893. 0 +
  1894. '-' +
  1895. index1 &&
  1896. oldIndex > index1 &&
  1897. dragType == 'drag',
  1898. dragOverBottom2:
  1899. newIndex === index1 &&
  1900. typeIndex ==
  1901. 'chapter-' +
  1902. 0 +
  1903. '-' +
  1904. index1 &&
  1905. oldIndex < index1 &&
  1906. dragType == 'drag',
  1907. }">
  1908. <!-- <div @mousedown="
  1909. isdrag =
  1910. 'chapter-' + 0 + '-' + index1
  1911. " @mouseup="isdrag = ''" @touchstart="
  1912. isdrag =
  1913. 'chapter-' + 0 + '-' + index1
  1914. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1915. <div class="chapter_upload_o" style="
  1916. position: relative;
  1917. display: flex;
  1918. align-items: center;
  1919. ">
  1920. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1921. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1922. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1923. </div>
  1924. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1925. </div>
  1926. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1927. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1928. </div>
  1929. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1930. </div>
  1931. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1932. </div>
  1933. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1934. </div>
  1935. </div>
  1936. <div class="chapter_upload_n">
  1937. <input readonly="true" v-if="
  1938. item1.type == 2 ||
  1939. item1.type == 3 ||
  1940. item1.type == 12 ||
  1941. item1.type == 13 ||
  1942. item1.type == 7
  1943. " :placeholder="item1.name" @click="
  1944. updataVideoT(
  1945. $event,
  1946. index1
  1947. )
  1948. " style="
  1949. border: none;
  1950. outline: none;
  1951. width: 80%;
  1952. minwidth: 215px;
  1953. z-index: 99;
  1954. font-size: 14px;
  1955. white-space: nowrap;
  1956. overflow: hidden;
  1957. text-overflow: ellipsis;
  1958. " />
  1959. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1960. border: none;
  1961. outline: none;
  1962. width: 80%;
  1963. white-space: nowrap;
  1964. overflow: hidden;
  1965. text-overflow: ellipsis;
  1966. " readonly="true" @click="
  1967. selectAttText(index1)
  1968. " />
  1969. <input :placeholder="item1.title ? item1.title : '链接'
  1970. " v-if="item1.type == 8" style="
  1971. border: none;
  1972. outline: none;
  1973. width: 80%;
  1974. white-space: nowrap;
  1975. overflow: hidden;
  1976. text-overflow: ellipsis;
  1977. " readonly="true" @click="selectLine(index1)" />
  1978. <input :placeholder="item1.title ? item1.title : '链接'
  1979. " v-if="item1.type == 14" style="
  1980. border: none;
  1981. outline: none;
  1982. width: 80%;
  1983. white-space: nowrap;
  1984. overflow: hidden;
  1985. text-overflow: ellipsis;
  1986. " readonly="true" @click="
  1987. openUpdateSource(index1)
  1988. " />
  1989. </div>
  1990. <div class="chapter_upload_ic">
  1991. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1992. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1993. <div class="chapter_upload_up" @click="
  1994. upCd(
  1995. $event,
  1996. index1
  1997. )
  1998. "></div>
  1999. <div class="chapter_upload_down" @click="
  2000. downCd(
  2001. $event,
  2002. index1
  2003. )
  2004. "></div>
  2005. </div>
  2006. <div class="chapter_upload_ic_edit" v-if="
  2007. item1.type == 2 ||
  2008. item1.type == 3 ||
  2009. item1.type == 12 ||
  2010. item1.type == 13 ||
  2011. item1.type == 7
  2012. " @click.stop="
  2013. updataVideoT(
  2014. $event,
  2015. index1
  2016. )
  2017. ">
  2018. <div></div>
  2019. </div>
  2020. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2021. selectAttText(index1)
  2022. ">
  2023. <div></div>
  2024. </div>
  2025. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2026. @click="selectLine(index1)">
  2027. <div></div>
  2028. </div>
  2029. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2030. openUpdateSource(index1)
  2031. ">
  2032. <div></div>
  2033. </div> -->
  2034. <div class="chapter_upload_ic_r" @click.stop="
  2035. deleteInfoData(
  2036. $event,
  2037. index1
  2038. )
  2039. ">
  2040. <div></div>
  2041. </div>
  2042. </div>
  2043. </div>
  2044. </div>
  2045. </div>
  2046. </div>
  2047. <div v-if="
  2048. infoproVisible
  2049. " class="mask">
  2050. <div class="progressBox">
  2051. <!-- <div id="closePro" class="closeCss">
  2052. <img src="../../../../assets/icon/close.png" alt />
  2053. </div> -->
  2054. <div class="lbox">
  2055. <img src="../../../assets/loading.gif" />上传中,请稍后
  2056. </div>
  2057. <div style="margin-bottom: 10px">
  2058. <span>{{
  2059. infoisFinishSize
  2060. }}M</span>
  2061. /
  2062. <span>{{
  2063. infoisAllSize
  2064. }}M</span>
  2065. </div>
  2066. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  2067. ? infoprogress
  2068. : 0
  2069. " style="width: 80%"></el-progress>
  2070. </div>
  2071. </div>
  2072. </div>
  2073. </div>
  2074. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  2075. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2076. <div class="c_info_title">
  2077. 补充描述
  2078. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2079. </div>
  2080. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  2081. <div style="width: calc(100%)">
  2082. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  2083. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  2084. </div>
  2085. </div>
  2086. </div>
  2087. </div>
  2088. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2089. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3' && isOutline">
  2090. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2091. <div class="c_info_title">
  2092. 课程大纲
  2093. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  2094. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2095. @contextmenu.prevent="openAiDialog(1, 'aiOutline')" @click="openAiDialog(2, 'aiOutline')"
  2096. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  2097. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2098. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')" @click="openAiDialog(2, 'aiOutline2')"
  2099. v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  2100. </el-tooltip>
  2101. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2102. @click="openAiDialog2(2, 'aiOutline'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')"
  2103. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">{{panOutline() > 0 ?
  2104. '重新生成大纲' : '生成大纲'}}</button>
  2105. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2106. @click="openAiDialog2(2, 'aiOutline2'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')"
  2107. v-if="(templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">{{panOutline() > 0
  2108. ? '重新生成大纲' : '生成大纲'}}</button>
  2109. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2110. </div>
  2111. <div class="task_outline">
  2112. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  2113. <div class="outline_task">
  2114. <div class="title">任务{{ index + 1 }}</div>
  2115. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2116. v-model="item.task" />
  2117. <div class="outline_btn">
  2118. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2119. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2120. @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)"
  2121. @click="openAiDialog(2, 'aiOutlineDetail2', index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-${item.taskDetail2 ? '重新生成任务' : '生成任务'}按钮`)">{{
  2122. item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  2123. </el-tooltip>
  2124. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2125. @click="addTaskBorder2(1, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在上面加入一个任务按钮`)">在上面加入一个任务</button>
  2126. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2127. @click="addTaskBorder2(2, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在下面加入一个任务按钮`)">在下面加入一个任务</button>
  2128. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2129. @click="deleteTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-删除按钮`)"
  2130. v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  2131. </div>
  2132. </div>
  2133. <div class="outline_detail"
  2134. :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}"
  2135. v-loading="taskDetailLoading.indexOf('task-' + index) !== -1"
  2136. element-loading-text="小可正在努力生成中,请稍等...">
  2137. <div div class="c_pub_button_confirm stopBtn"
  2138. v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]"
  2139. @click="cancelAjax('outlineTask', index)">停止</div>
  2140. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2141. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"
  2142. @change="textAreaChange('taskDetail2', index)"></textarea>
  2143. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2"
  2144. v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  2145. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  2146. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail1-'+index]}">
  2147. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2148. <div class="op_box_right">
  2149. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2150. <div class="r_pub_button_op"
  2151. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `右键课程大纲-任务${index + 1}-智能优化按钮`)"
  2152. @click="openAiDialog(2, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-智能优化按钮`)">
  2153. 智能优化</div>
  2154. </el-tooltip>
  2155. <div class="r_pub_button_edit" style="margin-left:10px"
  2156. @click="editTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-确定/编辑按钮`)">
  2157. {{
  2158. item.isTask2 ? '确定' : '编辑'}}</div>
  2159. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail1-'+index]" active-text="引用"
  2160. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2161. @change="handleSwitchChange('aiDetail1-'+index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-引用按钮`)"></el-switch>
  2162. </div>
  2163. </div>
  2164. </div>
  2165. </div>
  2166. </div>
  2167. </div>
  2168. </div>
  2169. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2170. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 0 || istemplate == 1)">
  2171. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2172. <div class="c_info_title">
  2173. 概念群
  2174. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2175. @click="openAiDialog2(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-重新生成概念群按钮`)">{{cpote.cpote1
  2176. ? '重新生成概念群' : '生成概念群'}}</button>
  2177. </div>
  2178. <div class="task_outline">
  2179. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  2180. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  2181. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  2182. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1"
  2183. v-else-if="cpotetLoading.cpote1"></div>
  2184. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  2185. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote1']}">
  2186. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2187. <div class="op_box_right">
  2188. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2189. <div class="r_pub_button_op"
  2190. @contextmenu.prevent="openAiDialog(1, 'aiCpote1'), addCourseBehavior('courseBehavior', `右键概念群-智能优化按钮`)"
  2191. @click="openAiDialog(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-智能优化按钮`)">
  2192. 智能优化</div>
  2193. </el-tooltip>
  2194. <div class="r_pub_button_edit" style="margin-left:10px"
  2195. @click="editCpote('cpote1s'), addCourseBehavior('courseBehavior', `点击概念群-确定/编辑按钮`)">{{
  2196. cpote.cpote1s ? '确定' : '编辑'}}</div>
  2197. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote1']" active-text="引用"
  2198. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2199. @change="handleSwitchChange('aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-引用按钮`)"></el-switch>
  2200. </div>
  2201. </div>
  2202. </div>
  2203. </div>
  2204. </div>
  2205. </div>
  2206. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2207. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 1 || istemplate == 1)">
  2208. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2209. <div class="c_info_title">
  2210. 问题链
  2211. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2212. @click="openAiDialog2(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-重新生成问题链按钮`)">{{cpote.cpote2
  2213. ? '重新生成问题链' : '生成问题链'}}</button>
  2214. </div>
  2215. <div class="task_outline">
  2216. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  2217. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  2218. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  2219. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2"
  2220. v-else-if="cpotetLoading.cpote2"></div>
  2221. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  2222. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote2']}">
  2223. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2224. <div class="op_box_right">
  2225. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2226. <div class="r_pub_button_op"
  2227. @contextmenu.prevent="openAiDialog(1, 'aiCpote2'), addCourseBehavior('courseBehavior', `右键问题链-智能优化按钮`)"
  2228. @click="openAiDialog(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-智能优化按钮`)">
  2229. 智能优化</div>
  2230. </el-tooltip>
  2231. <div class="r_pub_button_edit" style="margin-left:10px"
  2232. @click="editCpote('cpote2s'), addCourseBehavior('courseBehavior', `点击问题链-确定/编辑按钮`)">{{
  2233. cpote.cpote2s ? '确定' : '编辑'}}</div>
  2234. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote2']" active-text="引用"
  2235. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2236. @change="handleSwitchChange('aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-引用按钮`)"></el-switch>
  2237. </div>
  2238. </div>
  2239. </div>
  2240. </div>
  2241. </div>
  2242. </div>
  2243. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2244. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 2 || istemplate == 1)">
  2245. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2246. <div class="c_info_title">
  2247. 目标层
  2248. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2249. @click="openAiDialog2(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-重新生成目标层按钮`)">{{cpote.cpote3
  2250. ? '重新生成目标层' : '生成目标层'}}</button>
  2251. </div>
  2252. <div class="task_outline">
  2253. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  2254. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  2255. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  2256. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3"
  2257. v-else-if="cpotetLoading.cpote3"></div>
  2258. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  2259. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote3']}">
  2260. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2261. <div class="op_box_right">
  2262. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2263. <div class="r_pub_button_op"
  2264. @contextmenu.prevent="openAiDialog(1, 'aiCpote3'), addCourseBehavior('courseBehavior', `右键目标层-智能优化按钮`)"
  2265. @click="openAiDialog(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-智能优化按钮`)">
  2266. 智能优化</div>
  2267. </el-tooltip>
  2268. <div class="r_pub_button_edit" style="margin-left:10px"
  2269. @click="editCpote('cpote3s'), addCourseBehavior('courseBehavior', `点击目标层-确定/编辑按钮`)">{{
  2270. cpote.cpote3s ? '确定' : '编辑'}}</div>
  2271. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote3']" active-text="引用"
  2272. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2273. @change="handleSwitchChange('aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-引用按钮`)"></el-switch>
  2274. </div>
  2275. </div>
  2276. </div>
  2277. </div>
  2278. </div>
  2279. </div>
  2280. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2281. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 3 || istemplate == 1)">
  2282. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2283. <div class="c_info_title">
  2284. 任务簇
  2285. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2286. @click="openAiDialog2(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-重新生成任务簇按钮`)">{{cpote.cpote4
  2287. ? '重新生成任务簇' : '生成任务簇'}}</button>
  2288. </div>
  2289. <div class="task_outline">
  2290. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  2291. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  2292. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  2293. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4"
  2294. v-else-if="cpotetLoading.cpote4"></div>
  2295. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  2296. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote4']}">
  2297. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2298. <div class="op_box_right">
  2299. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2300. <div class="r_pub_button_op"
  2301. @contextmenu.prevent="openAiDialog(1, 'aiCpote4'), addCourseBehavior('courseBehavior', `右键任务簇-智能优化按钮`)"
  2302. @click="openAiDialog(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-智能优化按钮`)">
  2303. 智能优化</div>
  2304. </el-tooltip>
  2305. <div class="r_pub_button_edit" style="margin-left:10px"
  2306. @click="editCpote('cpote4s'), addCourseBehavior('courseBehavior', `点击任务簇-确定/编辑按钮`)">{{
  2307. cpote.cpote4s ? '确定' : '编辑'}}</div>
  2308. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote4']" active-text="引用"
  2309. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2310. @change="handleSwitchChange('aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-引用按钮`)"></el-switch>
  2311. </div>
  2312. </div>
  2313. </div>
  2314. </div>
  2315. </div>
  2316. </div>
  2317. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  2318. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2319. <div class="c_info_title">
  2320. 教案
  2321. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  2322. v-if="istemplate == 1 && dArray.length && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  2323. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2324. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  2325. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  2326. </el-tooltip>
  2327. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2328. @click="openAiDialog2(2, 'aiTeacher2'), addCourseBehavior('courseBehavior', `点击教案-重新生成教案按钮`)"
  2329. v-if="istemplate != 1">重新生成教案</button>
  2330. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  2331. v-if="panTeacher() == 0 && istemplate == 1 && (templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3')">
  2332. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2333. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  2334. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  2335. </el-tooltip>
  2336. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2337. </div>
  2338. <div class="task_outline">
  2339. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  2340. <div class="outline_task">
  2341. <div class="title">任务{{ index + 1 }}</div>
  2342. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2343. v-model="item.task" />
  2344. </div>
  2345. <div class="outline_detail"
  2346. :style="{ minHeight: taskDetailLoading5.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}"
  2347. v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1"
  2348. element-loading-text="小可正在努力生成中,请稍等...">
  2349. <div div class="c_pub_button_confirm stopBtn"
  2350. v-if="taskDetailLoading5.indexOf('task-' + index) !== -1"
  2351. @click="cancelAjax('teacherDetail2', index)">停止</div>
  2352. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  2353. v-model="item.taskDetail3" v-if="item.isTask3"
  2354. @change="textAreaChange('taskDetail3', index)"></textarea>
  2355. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3"
  2356. v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  2357. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  2358. <div class="op_box" :class="{op_box_isquote: isQuote['teacherDetail2-'+index]}">
  2359. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2360. <div class="op_box_right">
  2361. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2362. <div class="r_pub_button_op"
  2363. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `右键教案-任务${index + 1}-智能优化按钮`)"
  2364. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-智能优化按钮`)">
  2365. 智能优化</div>
  2366. </el-tooltip>
  2367. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  2368. item.isTask3 ? '确定' : '编辑'}}</div>
  2369. <el-switch style="margin-left: 10px" v-model="isQuote['teacherDetail2-'+index]"
  2370. active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2371. @change="handleSwitchChange('teacherDetail2-'+index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-引用按钮`)"></el-switch>
  2372. </div>
  2373. </div>
  2374. </div>
  2375. </div>
  2376. </div>
  2377. </div>
  2378. </div>
  2379. <div class="info_btnBox3" v-if="istemplate != 1">
  2380. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2381. goTo(
  2382. '/course?userid=' +
  2383. userid +
  2384. '&oid=' +
  2385. oid +
  2386. '&org=' +
  2387. org +
  2388. '&role=' +
  2389. role
  2390. )
  2391. ">
  2392. 返回课程
  2393. </button>
  2394. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2395. {{ steps == 4 ? "返回课程" : "上一步" }}
  2396. </button>
  2397. <button class="c_pub_button_confirm"
  2398. v-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"
  2399. @click="clickGenTT2">
  2400. {{isuseT === true ? "重新生成概况和目标" : "生成概况和目标"}}
  2401. </button>
  2402. <button class="c_pub_button_confirm"
  2403. v-else-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))"
  2404. @click="clickGenTT2">
  2405. {{isuseT === true ? "重新生成概况" : "生成概况"}}
  2406. </button>
  2407. <button class="c_pub_button_confirm" v-if="isOutline2" @click="exportTeachPlan">
  2408. {{ "导出教案" }}
  2409. </button>
  2410. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  2411. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  2412. <button class="c_pub_button_confirm" @click="nextSteps(2)" @contextmenu.prevent="nextSteps(1)"
  2413. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"
  2414. :class="{
  2415. pub_btn_next_img: steps != 3,
  2416. pub_btn_finish_img: steps == 3,
  2417. }">
  2418. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  2419. </button>
  2420. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)" @contextmenu.prevent="nextSteps(1)"
  2421. :class="{
  2422. pub_btn_next_img: steps != 3,
  2423. pub_btn_finish_img: steps == 3,
  2424. }">
  2425. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid ==
  2426. "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ? cpoteType < 3 ? cpoteType < 2 ? cpoteType
  2427. < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案" : "下一步" }} </button>
  2428. </el-tooltip>
  2429. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  2430. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  2431. pub_btn_next_img: steps != 3,
  2432. pub_btn_finish_img: steps == 3,
  2433. }">下一步2</button>
  2434. </el-tooltip> -->
  2435. </div>
  2436. </div>
  2437. <div class="rightBox" v-if="steps == 2" :style="{
  2438. height:
  2439. !isStepDisplay && !isBtnDisplay
  2440. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  2441. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2442. }">
  2443. <div class="basic_box" style="
  2444. padding: 20px 30px 0px !important;
  2445. box-sizing: border-box;
  2446. height: calc(100% - 80px);
  2447. overflow: auto;
  2448. background: #fff;
  2449. ">
  2450. <!-- <div
  2451. style="
  2452. color: #b8b8b8;
  2453. background: #fff;
  2454. width: 26%;
  2455. height: 40px;
  2456. border-radius: 15px;
  2457. padding-left: 20px;
  2458. line-height: 40px;
  2459. font-size: 17px;
  2460. box-shadow: 0px 1px 2px 2px #e0e0e0;
  2461. "
  2462. >-->
  2463. <div class="right_title" style="border: none; margin: 0; padding: 0">
  2464. 请选择合适的课程模板
  2465. </div>
  2466. <div class="wordbox">
  2467. <div class="wordTeacher" @click="checkTemplate2()">
  2468. <div class="wordPic">
  2469. <img src="../../../assets/icon/new/template_none.png" alt />
  2470. </div>
  2471. <div style="
  2472. margin-top: 10px;
  2473. line-height: 19px;
  2474. overflow: hidden;
  2475. text-overflow: ellipsis;
  2476. white-space: nowrap;
  2477. padding: 0 20px;
  2478. ">
  2479. 空白模板
  2480. </div>
  2481. </div>
  2482. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  2483. <div class="wordPic">
  2484. <img src="../../../assets/icon/new/template.png" alt />
  2485. </div>
  2486. <div style="
  2487. margin-top: 10px;
  2488. line-height: 19px;
  2489. overflow: hidden;
  2490. text-overflow: ellipsis;
  2491. white-space: nowrap;
  2492. padding: 0 20px;
  2493. ">
  2494. {{ aa.title }}
  2495. </div>
  2496. </div>
  2497. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  2498. <div class="wordPic">
  2499. <img src="../../../assets/icon/new/template.png" alt />
  2500. </div>
  2501. <div style="
  2502. margin-top: 10px;
  2503. line-height: 19px;
  2504. overflow: hidden;
  2505. text-overflow: ellipsis;
  2506. white-space: nowrap;
  2507. padding: 0 20px;
  2508. ">
  2509. 简易模板
  2510. </div>
  2511. </div>
  2512. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  2513. <div class="wordPic">
  2514. <img src="../../../assets/icon/new/template.png" alt />
  2515. </div>
  2516. <div style="
  2517. margin-top: 10px;
  2518. line-height: 19px;
  2519. overflow: hidden;
  2520. text-overflow: ellipsis;
  2521. white-space: nowrap;
  2522. padding: 0 20px;
  2523. ">
  2524. 智能粘贴模式
  2525. </div>
  2526. </div>
  2527. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  2528. <div class="wordPic">
  2529. <img src="../../../assets/icon/wordMub.png" alt />
  2530. </div>
  2531. <div style="
  2532. margin-top: 10px;
  2533. line-height: 19px;
  2534. overflow: hidden;
  2535. text-overflow: ellipsis;
  2536. white-space: nowrap;
  2537. padding: 0 20px;
  2538. ">
  2539. 未来小学课程设计
  2540. </div>
  2541. </div> -->
  2542. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  2543. <div class="wordPic">
  2544. <img src="../../../assets/icon/wordMub.png" alt />
  2545. </div>
  2546. <div style="
  2547. margin-top: 10px;
  2548. line-height: 19px;
  2549. overflow: hidden;
  2550. text-overflow: ellipsis;
  2551. white-space: nowrap;
  2552. padding: 0 20px;
  2553. ">
  2554. 我的课程
  2555. </div>
  2556. </div> -->
  2557. </div>
  2558. </div>
  2559. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  2560. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2561. goTo(
  2562. '/course?userid=' +
  2563. userid +
  2564. '&oid=' +
  2565. oid +
  2566. '&org=' +
  2567. org +
  2568. '&role=' +
  2569. role
  2570. )
  2571. ">
  2572. 返回课程
  2573. </button>
  2574. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2575. {{ steps == 4 ? "返回课程" : "上一步" }}
  2576. </button>
  2577. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  2578. pub_btn_next_img: steps != 3,
  2579. pub_btn_finish_img: steps == 3,
  2580. }">
  2581. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  2582. </button>
  2583. </div>
  2584. </div>
  2585. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  2586. height:
  2587. !isStepDisplay && !isBtnDisplay
  2588. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  2589. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2590. }">
  2591. <div class="rb_c_box">
  2592. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1"
  2593. :style="{width: stepShow ? '270px' : '0',minWidth: stepShow ? '270px' : '0',height: stepShow ? '100%' : '0',marginRight: stepShow ? '10px' : '0'}">
  2594. <div class="close_btn" @click="stepShow = !stepShow" :class="!stepShow ? 'close_btn_voice' : ''"
  2595. style="left: 0;right: unset;top: 5px;transform: rotate(180deg);">
  2596. <img src="../../../assets/icon/course/arrow.svg">
  2597. </div>
  2598. <div class="rb_c_nav">
  2599. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1" v-show="stepShow"
  2600. style="margin-left: auto">目录</span>
  2601. <!-- <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span> -->
  2602. <!-- <span class="button-toggle" @click="stepShow = !stepShow">{{ stepShow ? '收缩' : '展开' }}</span> -->
  2603. </div>
  2604. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  2605. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  2606. position: istemplate == 1 ? 'sticky' : 'unset',
  2607. top: istemplate == 1 ? '0' : 'unset'
  2608. }">
  2609. <!-- <div class="navTop">辅助导航</div> -->
  2610. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  2611. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  2612. <div class="nt_taskBox" style="width: 100%;">
  2613. <div class="nt_taskTitle"
  2614. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  2615. unitIndex + 1 }}</div>
  2616. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  2617. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  2618. <span>{{ unitJson[unitIndex].dyName }}</span>
  2619. </el-tooltip>
  2620. </div>
  2621. </div>
  2622. </div> -->
  2623. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  2624. .taskJson" :key="tIndex" :class="{
  2625. dragOverTop:
  2626. newIndex === tIndex &&
  2627. typeIndex == 'task-' + tIndex &&
  2628. oldIndex > tIndex &&
  2629. dragType == 'task',
  2630. dragOverBottom:
  2631. newIndex === tIndex &&
  2632. typeIndex == 'task-' + tIndex &&
  2633. oldIndex < tIndex &&
  2634. dragType == 'task',
  2635. }">
  2636. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  2637. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  2638. class="navTask" :class="{
  2639. isNavTask:
  2640. isClickColor > 0 && isClickColor == tIndex + 1,
  2641. isNavOpen: t.toolOpen,
  2642. }">
  2643. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  2644. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  2645. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  2646. class="chapter_upload_drag"></div>
  2647. <div class="nt_taskBox">
  2648. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  2649. <div class="nt_taskName">
  2650. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2651. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  2652. </el-tooltip>
  2653. </div>
  2654. </div>
  2655. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  2656. 1
  2657. ">
  2658. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  2659. @click.stop="taskMove(1, tIndex)"></div>
  2660. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  2661. @click.stop="taskMove(2, tIndex)"></div>
  2662. </div> -->
  2663. </div>
  2664. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2665. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2666. @click="jumpGj(tIndex, toolIndex2)">
  2667. <div class="gjCss" :class="{
  2668. isGjCss:
  2669. toolIndexType == `gj${tIndex}${toolIndex2}`,
  2670. }">
  2671. <div>工具{{ toolIndex2 + 1 }}:</div>
  2672. <div>
  2673. {{
  2674. toolsData[tool.tool[0]] &&
  2675. toolsData[tool.tool[0]].name
  2676. }}
  2677. </div>
  2678. </div>
  2679. </div>
  2680. </div>
  2681. </div>
  2682. <div>
  2683. <div @click="goToTask(unitJson[unitIndex].chapterInfo[0].taskJson.length)"
  2684. class="navTask" :class="{ isNavTask: isClickColor == unitJson[unitIndex].chapterInfo[0].taskJson.length + 1 }">
  2685. <div class="nt_taskBox" style="padding: 0 0 0 45px;">
  2686. <div class="nt_taskTitle">附件区</div>
  2687. </div>
  2688. </div>
  2689. </div>
  2690. </div>
  2691. <div class="navBottom" v-if="courseState == 1">
  2692. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  2693. dragOverTop:
  2694. newIndex === stageIndex &&
  2695. typeIndex == 'Unit-' + stageIndex &&
  2696. oldIndex > stageIndex &&
  2697. dragType == 'Unit',
  2698. dragOverBottom:
  2699. newIndex === stageIndex &&
  2700. typeIndex == 'Unit-' + stageIndex &&
  2701. oldIndex < stageIndex &&
  2702. dragType == 'Unit',
  2703. }">
  2704. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  2705. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  2706. @click="unitSet2(stageIndex)" class="navStage" :class="{
  2707. isNavStage: stageIndex == unitIndex,
  2708. isNavStageOpen: stage.toolOpen,
  2709. }">
  2710. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  2711. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  2712. class="chapter_upload_drag"></div>
  2713. <div class="nt_taskBox">
  2714. <div class="nt_taskTitle">
  2715. 第{{ stageIndex + 1 }}阶段:
  2716. </div>
  2717. <div class="nt_taskName">
  2718. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  2719. " placement="top">
  2720. <span>{{
  2721. stage.dyName ? stage.dyName : "未命名阶段"
  2722. }}</span>
  2723. </el-tooltip>
  2724. </div>
  2725. </div>
  2726. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  2727. </div>
  2728. <div v-for="(t, tIndex) in unitJson[stageIndex]
  2729. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  2730. dragOverTop:
  2731. newIndex === tIndex &&
  2732. typeIndex == 'task-' + tIndex &&
  2733. ((oldIndex > tIndex &&
  2734. stageIndex == checkUnitIndex) ||
  2735. (oldIndex == tIndex &&
  2736. stageIndex == checkUnitIndex &&
  2737. checkUnitIndex != oldUnitIndex)) &&
  2738. dragType == 'task',
  2739. dragOverBottom:
  2740. newIndex === tIndex &&
  2741. typeIndex == 'task-' + tIndex &&
  2742. oldIndex < tIndex &&
  2743. stageIndex == checkUnitIndex &&
  2744. dragType == 'task',
  2745. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  2746. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  2747. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  2748. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  2749. isNavTask:
  2750. isClickColor > 0 &&
  2751. isClickColor == tIndex + 1 &&
  2752. stageIndex == unitIndex,
  2753. isNavOpen: t.toolOpen,
  2754. }">
  2755. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  2756. <div @mousedown="
  2757. isdrag = 'task-' + stageIndex + '-' + tIndex
  2758. " @mouseup="isdrag = ''" @touchstart="
  2759. isdrag = 'task-' + stageIndex + '-' + tIndex
  2760. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  2761. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  2762. <div class="nt_taskTitle">
  2763. 任务{{ tIndex + 1 }}:
  2764. </div>
  2765. <div class="nt_taskName">
  2766. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2767. <span>{{
  2768. t.task ? t.task : "未命名任务"
  2769. }}</span>
  2770. </el-tooltip>
  2771. </div>
  2772. </div>
  2773. </div>
  2774. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2775. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2776. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  2777. <div class="gjCss" :class="{
  2778. isGjCss:
  2779. toolIndexType ==
  2780. `gj${tIndex}${toolIndex2}${stageIndex}`,
  2781. }">
  2782. <div>工具{{ toolIndex2 + 1 }}:</div>
  2783. <div>
  2784. {{
  2785. toolsData[tool.tool[0]] &&
  2786. toolsData[tool.tool[0]].name
  2787. }}
  2788. </div>
  2789. </div>
  2790. </div>
  2791. </div>
  2792. </div>
  2793. </div>
  2794. </div>
  2795. </div>
  2796. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  2797. <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
  2798. </div>
  2799. </div>
  2800. <div class="rb_c_box_right">
  2801. <div class="rb_c_box_btn" style="justify-content: flex-end">
  2802. <span class="title">{{ courseName }}</span>
  2803. <!-- <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button> -->
  2804. <button class="c_pub_button_return" v-if="steps > 1 && steps != 5 && istemplate != 1"
  2805. @click="lastSteps" style="margin-left: auto;border: none;">
  2806. {{ steps == 4 ? "返回课程" : "上一步" }}
  2807. </button>
  2808. <button class="c_pub_button_confirm3 buttonBoxB">
  2809. <span>一键生成</span>
  2810. <div class="buttonBox">
  2811. <div
  2812. @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">
  2813. 重新生成所有任务</div>
  2814. <div
  2815. @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)"
  2816. v-if="panTool() == 0">一键生成所有工具</div>
  2817. <div
  2818. @click="openAiDialog2(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)"
  2819. v-if="panTool() > 0">重新生成所有工具</div>
  2820. <div @click="allEvaCan(), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有评价按钮`)"
  2821. v-if="panTool() > 0">{{panTaskElist() == 0 && panEvaCont() == 0 ? '一键生成所有评价' : '重新生成所有评价'}}
  2822. </div>
  2823. <div @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案
  2824. </div>
  2825. </div>
  2826. </button>
  2827. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</button> -->
  2828. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)" v-if="panTool() == 0">一键生成所有工具</button> -->
  2829. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="allEvaCan(), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有评价按钮`)" v-if="panTool() > 0 && panTaskElist() == 0 && panEvaCont() == 0">一键生成所有评价</button> -->
  2830. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案</button> -->
  2831. <button class="c_pub_button_confirm" style="margin: 0 0 0 10px;" v-if="steps < 4 && istemplate != 1"
  2832. @click="nextSteps">
  2833. {{ steps == 3 ? "确认上传" : "下一步" }}
  2834. </button>
  2835. </div>
  2836. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  2837. <div v-if="false" style="
  2838. display: flex;
  2839. flex-direction: row;
  2840. align-items: center;
  2841. position: sticky;
  2842. top: 0;
  2843. z-index: 99;
  2844. width: 100%;
  2845. padding: 0 20px 0 20px;
  2846. box-sizing: border-box;
  2847. background: #fff;
  2848. border-radius: 8px;
  2849. ">
  2850. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2851. <div class="cru_selectBox" :style="{
  2852. maxWidth: isPasteTask
  2853. ? 'calc(100% - 335px)'
  2854. : 'calc(100% - 190px)',
  2855. }" v-if="courseState == 1">
  2856. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2857. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2858. <!-- item.dyName ? item.dyName : -->
  2859. <span v-if="
  2860. unitJson[unitJson.length - 1].easy == 4 ||
  2861. unitJson[unitJson.length - 1].easy == 6
  2862. ">{{
  2863. item.dyName
  2864. ? item.dyName
  2865. : "第" + (index + 1) + "阶段"
  2866. }}</span>
  2867. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2868. </div>
  2869. <div class="cru_line" :style="{
  2870. left: offsetLetfPx + 'px',
  2871. }"></div>
  2872. </div>
  2873. <div class="addStageImg" @click="addunit()" v-if="
  2874. !(unitJson[unitJson.length - 1].easy == 4) &&
  2875. !(unitJson[unitJson.length - 1].easy == 6) &&
  2876. courseState == 1
  2877. ">
  2878. <img src="../../../assets/icon/new/addStage.png" alt />
  2879. </div>
  2880. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2881. v-if="courseState == 2" style="margin: 15px 0">
  2882. 新建阶段
  2883. </button>
  2884. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2885. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2886. 阶段顺序
  2887. </button>
  2888. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2889. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2890. 智能粘贴
  2891. </button>
  2892. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2893. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2894. }" style="padding: 0 12px">
  2895. 选择课程模板
  2896. </button>
  2897. </div>
  2898. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2899. :key="index">
  2900. <div v-loading="anLoading[0]" v-if="courseState == 4" style="position: relative;
  2901. background: #fff;
  2902. box-sizing: border-box;
  2903. padding: 1px 20px 10px;
  2904. width: 100%;
  2905. border-radius: 10px;">
  2906. <div style="
  2907. display: flex;
  2908. flex-direction: row;
  2909. justify-content: space-between;
  2910. align-items: center;
  2911. " :style="{
  2912. margin: !item.taskJson[0].isFoldchapter
  2913. ? '20px 0 10px'
  2914. : '20px 0 0',
  2915. }">
  2916. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2917. 学习内容
  2918. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2919. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2920. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2921. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2922. </el-tooltip>
  2923. </div>
  2924. </div>
  2925. <div>
  2926. <div class="add_chapters_box add_c_none" v-if="
  2927. item.taskJson[0].chapterData &&
  2928. item.taskJson[0].chapterData.length == 0
  2929. ">
  2930. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  2931. <span>请添加学习内容</span>
  2932. </div>
  2933. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2934. <div @dragstart="
  2935. dragStart(item1, index1, 0)
  2936. " @dragover.prevent="
  2937. dragOver(index1, 0)
  2938. " @dragend="dragEnd()" :draggable="isdrag ==
  2939. 'chapter-' + 0 + '-' + index1
  2940. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2941. :key="item1.id" @click="
  2942. getChapterData(
  2943. $event,
  2944. unitIndex,
  2945. index,
  2946. index1,
  2947. item1.type
  2948. )
  2949. " :class="{
  2950. dragOverTop2:
  2951. newIndex === index1 &&
  2952. typeIndex ==
  2953. 'chapter-' +
  2954. 0 +
  2955. '-' +
  2956. index1 &&
  2957. oldIndex > index1 &&
  2958. dragType == 'drag',
  2959. dragOverBottom2:
  2960. newIndex === index1 &&
  2961. typeIndex ==
  2962. 'chapter-' +
  2963. 0 +
  2964. '-' +
  2965. index1 &&
  2966. oldIndex < index1 &&
  2967. dragType == 'drag',
  2968. }">
  2969. <div @mousedown="
  2970. isdrag =
  2971. 'chapter-' + 0 + '-' + index1
  2972. " @mouseup="isdrag = ''" @touchstart="
  2973. isdrag =
  2974. 'chapter-' + 0 + '-' + index1
  2975. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2976. <div class="chapter_upload_o" style="
  2977. position: relative;
  2978. display: flex;
  2979. align-items: center;
  2980. ">
  2981. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2982. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2983. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2984. </div>
  2985. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2986. </div>
  2987. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2988. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2989. </div>
  2990. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2991. </div>
  2992. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2993. </div>
  2994. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2995. </div>
  2996. </div>
  2997. <div class="chapter_upload_n">
  2998. <input readonly="true" v-if="
  2999. item1.type == 2 ||
  3000. item1.type == 3 ||
  3001. item1.type == 12 ||
  3002. item1.type == 13 ||
  3003. item1.type == 7
  3004. " :placeholder="item1.name" @click="
  3005. updataVideoT(
  3006. $event,
  3007. unitIndex,
  3008. 0,
  3009. index1
  3010. )
  3011. " style="
  3012. border: none;
  3013. outline: none;
  3014. width: 80%;
  3015. minwidth: 215px;
  3016. z-index: 99;
  3017. font-size: 14px;
  3018. white-space: nowrap;
  3019. overflow: hidden;
  3020. text-overflow: ellipsis;
  3021. " />
  3022. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3023. border: none;
  3024. outline: none;
  3025. width: 80%;
  3026. white-space: nowrap;
  3027. overflow: hidden;
  3028. text-overflow: ellipsis;
  3029. " readonly="true" @click="
  3030. selectAttText(0, index1)
  3031. " />
  3032. <input :placeholder="item1.title ? item1.title : '链接'
  3033. " v-if="item1.type == 8" style="
  3034. border: none;
  3035. outline: none;
  3036. width: 80%;
  3037. white-space: nowrap;
  3038. overflow: hidden;
  3039. text-overflow: ellipsis;
  3040. " readonly="true" @click="selectLine(0, index1)" />
  3041. <input :placeholder="item1.title ? item1.title : '链接'
  3042. " v-if="item1.type == 14" style="
  3043. border: none;
  3044. outline: none;
  3045. width: 80%;
  3046. white-space: nowrap;
  3047. overflow: hidden;
  3048. text-overflow: ellipsis;
  3049. " readonly="true" @click="
  3050. openUpdateSource(0, index1)
  3051. " />
  3052. </div>
  3053. <div class="chapter_upload_ic">
  3054. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3055. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3056. checkChpater( $event, unitIndex, 0, index1 )
  3057. ">
  3058. <div></div>
  3059. </div>
  3060. <div class="chapter_upload_ud" style="z-index: 99">
  3061. <div class="chapter_upload_up" @click="
  3062. upCd(
  3063. $event,
  3064. unitIndex,
  3065. index,
  3066. 0,
  3067. index1
  3068. )
  3069. "></div>
  3070. <div class="chapter_upload_down" @click="
  3071. downCd(
  3072. $event,
  3073. unitIndex,
  3074. index,
  3075. 0,
  3076. index1
  3077. )
  3078. "></div>
  3079. </div>
  3080. <div class="chapter_upload_ic_edit" v-if="
  3081. item1.type == 2 ||
  3082. item1.type == 3 ||
  3083. item1.type == 12 ||
  3084. item1.type == 13 ||
  3085. item1.type == 7
  3086. " @click.stop="
  3087. updataVideoT(
  3088. $event,
  3089. unitIndex,
  3090. 0,
  3091. index1
  3092. )
  3093. ">
  3094. <div></div>
  3095. </div>
  3096. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3097. selectAttText(0, index1)
  3098. ">
  3099. <div></div>
  3100. </div>
  3101. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3102. @click="selectLine(0, index1)">
  3103. <div></div>
  3104. </div>
  3105. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3106. openUpdateSource(0, index1)
  3107. ">
  3108. <div></div>
  3109. </div>
  3110. <div class="chapter_upload_ic_r" @click.stop="
  3111. deleteChapterData(
  3112. $event,
  3113. unitIndex,
  3114. index,
  3115. index1,
  3116. 0
  3117. )
  3118. ">
  3119. <div></div>
  3120. </div>
  3121. </div>
  3122. </div>
  3123. </div>
  3124. </div>
  3125. </div>
  3126. <div class="add_info_box" style="margin: 10px 0 0">
  3127. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3128. 文件
  3129. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple"
  3130. @change="
  3131. beforeUpload2(
  3132. $event,
  3133. unitIndex,
  3134. 13,
  3135. 0
  3136. )
  3137. " />
  3138. </button>
  3139. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  3140. 图文
  3141. </button>
  3142. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  3143. 链接
  3144. </button>
  3145. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  3146. 代码
  3147. </button>
  3148. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  3149. 资源
  3150. </button>
  3151. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  3152. AI生成PPT
  3153. </button>
  3154. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  3155. AI生成教案
  3156. </button>
  3157. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  3158. 智能检索视频
  3159. </button>
  3160. </div>
  3161. <div v-if="
  3162. unitJson[unitIndex].chapterInfo[0].taskJson[
  3163. 0
  3164. ].proVisible
  3165. " class="mask">
  3166. <div class="progressBox">
  3167. <!-- <div id="closePro" class="closeCss">
  3168. <img src="../../../../assets/icon/close.png" alt />
  3169. </div> -->
  3170. <div class="lbox">
  3171. <img src="../../../assets/loading.gif" />上传中,请稍后
  3172. </div>
  3173. <div style="margin-bottom: 10px">
  3174. <span>{{
  3175. unitJson[unitIndex].chapterInfo[0].taskJson[
  3176. 0
  3177. ].isFinishSize
  3178. }}</span>
  3179. /
  3180. <span>{{
  3181. unitJson[unitIndex].chapterInfo[0].taskJson[
  3182. 0
  3183. ].isAllSize
  3184. }}</span>
  3185. </div>
  3186. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3187. 0
  3188. ].progress
  3189. ? unitJson[unitIndex].chapterInfo[0]
  3190. .taskJson[0].progress
  3191. : 0
  3192. " style="width: 80%"></el-progress> -->
  3193. </div>
  3194. </div>
  3195. </div>
  3196. <div class="chapter_box" v-if="courseState == 1">
  3197. <div class="chapter_contentbox">
  3198. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  3199. <div class="cc_input">
  3200. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  3201. v-model="unitJson[unitIndex].dyName" />
  3202. </div>
  3203. <div class="remove" v-if="
  3204. (unitJson.length > 1 || courseState != 2) &&
  3205. !(unitJson[unitJson.length - 1].easy == 4) &&
  3206. !(unitJson[unitJson.length - 1].easy == 6)
  3207. " @click="deleteUnit(unitIndex)"></div>
  3208. </div>
  3209. </div>
  3210. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  3211. margin: 50px 0px 10px;
  3212. font-size: 1.5em;
  3213. font-weight: 700;
  3214. color: #0f7eff;
  3215. ">
  3216. 添加任务
  3217. </div> -->
  3218. <div class="taskBorder" :style="{
  3219. minHeight: unitJson[unitIndex].easy && 'unset',
  3220. borderRadius: itemTaskIndex == 0 ? '0px 0px 10px 10px' : '10px',
  3221. marginTop: itemTaskIndex == 0 ? '0' : '10px',
  3222. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  3223. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex"
  3224. v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  3225. <div style="background: #fff; border-radius: 5px"
  3226. v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]"
  3227. element-loading-text="小可正在努力生成中,请稍等...">
  3228. <div class="c_pub_button_confirm stopBtn"
  3229. v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]"
  3230. @click="cancelAjax('aiTaskGL1', itemTaskIndex)">停止</div>
  3231. <div class="taskTitle">
  3232. <div style="display: flex;width: 100%;justify-content: space-between;">
  3233. <span>任务{{ itemTaskIndex + 1 }}</span>
  3234. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3235. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  3236. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  3237. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  3238. </el-tooltip> -->
  3239. <div style="display: flex">
  3240. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3241. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  3242. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)"
  3243. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)">重新生成任务</button>
  3244. </el-tooltip>
  3245. </div>
  3246. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3247. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  3248. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  3249. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  3250. </el-tooltip> -->
  3251. </div>
  3252. </div>
  3253. <!-- padding: 20px; -->
  3254. <div v-if="unitJson[unitIndex].easy != 1">
  3255. <div :style="{
  3256. marginBottom:
  3257. unitJson[unitIndex].easy == 3 ||
  3258. (unitJson[unitIndex].easy == 5 &&
  3259. itemTask.taskType == 1)
  3260. ? '75px'
  3261. : '0',
  3262. }">
  3263. <div style="
  3264. display: flex;
  3265. margin: 0px 0 20px;
  3266. flex-direction: row;
  3267. justify-content: flex-start;
  3268. align-items: center;
  3269. ">
  3270. <div class="lineTitle">任务概述</div>
  3271. </div>
  3272. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  3273. flex-direction: row;
  3274. justify-content: flex-start;
  3275. align-items: center;
  3276. margin: 0;
  3277. ">
  3278. <!-- <div class="cc_title">
  3279. 任务{{ itemTaskIndex + 1 }}
  3280. </div> -->
  3281. <div class="cc_input">
  3282. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  3283. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3284. itemTaskIndex
  3285. ].task
  3286. " />
  3287. </div>
  3288. <div class="remove" v-if="
  3289. item.taskJson.length > 1 &&
  3290. (!unitJson[unitIndex].easy ||
  3291. unitJson[unitIndex].easy == 6)
  3292. " @click="deleteTask(itemTaskIndex)"></div>
  3293. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  3294. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  3295. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  3296. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  3297. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  3298. </div> -->
  3299. </div>
  3300. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  3301. display: flex;
  3302. margin: 20px 0;
  3303. flex-direction: row;
  3304. justify-content: flex-start;
  3305. align-items: center;
  3306. ">
  3307. <div class="lineTitle">任务描述</div>
  3308. </div> && !itemTask.isFold2-->
  3309. <div v-if="
  3310. easyArray.indexOf(unitJson[unitIndex].easy) ==
  3311. -1
  3312. " style="margin-top: 20px" class="op_task_box"
  3313. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1"
  3314. element-loading-text="小可正在努力生成中,请稍等...">
  3315. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3316. itemTaskIndex
  3317. ].taskDetail
  3318. " @change="change"></editor-bar> -->
  3319. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  3320. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3321. itemTaskIndex
  3322. ].taskDetail
  3323. "></textarea>
  3324. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  3325. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3326. itemTaskIndex
  3327. ].taskDetail
  3328. "></textarea> -->
  3329. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail2-'+itemTaskIndex]}">
  3330. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  3331. <div class="op_box_right">
  3332. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3333. <div class="r_pub_button_op"
  3334. @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  3335. itemTaskIndex
  3336. ], itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)"
  3337. @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  3338. itemTaskIndex
  3339. ], itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)">智能优化</div>
  3340. </el-tooltip>
  3341. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail2-'+itemTaskIndex]"
  3342. active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  3343. @change="handleSwitchChange('aiDetail2-'+itemTaskIndex)"></el-switch>
  3344. </div>
  3345. </div>
  3346. </div>
  3347. </div>
  3348. </div>
  3349. <div v-loading="anLoading[itemTaskIndex]" style="position: relative" v-if="courseState == 5">
  3350. <div style="
  3351. display: flex;
  3352. flex-direction: row;
  3353. justify-content: space-between;
  3354. align-items: center;
  3355. " :style="{
  3356. margin: !itemTask.isFoldchapter
  3357. ? '20px 0 10px'
  3358. : '20px 0 0',
  3359. }">
  3360. <div style="margin-bottom: 10px" class="lineTitle clineTitle">
  3361. 学习内容
  3362. </div>
  3363. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  3364. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  3365. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  3366. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  3367. <!-- <div class="line"></div> -->
  3368. </div>
  3369. <!-- v-if="!itemTask.isFoldchapter" -->
  3370. <div>
  3371. <div class="add_chapters_box add_c_none" v-if="
  3372. itemTask.chapterData &&
  3373. itemTask.chapterData.length == 0
  3374. ">
  3375. <!-- <img
  3376. src="../../../assets/icon/new/c_none.png"
  3377. alt
  3378. /> -->
  3379. <span>请添加学习内容</span>
  3380. </div>
  3381. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3382. <div @dragstart="
  3383. dragStart(item1, index1, itemTaskIndex)
  3384. " @dragover.prevent="
  3385. dragOver(index1, itemTaskIndex)
  3386. " @dragend="dragEnd()" :draggable="
  3387. isdrag ==
  3388. 'chapter-' + itemTaskIndex + '-' + index1
  3389. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3390. :key="item1.id" @click="
  3391. getChapterData(
  3392. $event,
  3393. unitIndex,
  3394. index,
  3395. index1,
  3396. item1.type
  3397. )
  3398. " :class="{
  3399. dragOverTop2:
  3400. newIndex === index1 &&
  3401. typeIndex ==
  3402. 'chapter-' +
  3403. itemTaskIndex +
  3404. '-' +
  3405. index1 &&
  3406. oldIndex > index1 &&
  3407. dragType == 'drag',
  3408. dragOverBottom2:
  3409. newIndex === index1 &&
  3410. typeIndex ==
  3411. 'chapter-' +
  3412. itemTaskIndex +
  3413. '-' +
  3414. index1 &&
  3415. oldIndex < index1 &&
  3416. dragType == 'drag',
  3417. }">
  3418. <div @mousedown="
  3419. isdrag =
  3420. 'chapter-' + itemTaskIndex + '-' + index1
  3421. " @mouseup="isdrag = ''" @touchstart="
  3422. isdrag =
  3423. 'chapter-' + itemTaskIndex + '-' + index1
  3424. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3425. <div class="chapter_upload_o" style="
  3426. position: relative;
  3427. display: flex;
  3428. align-items: center;
  3429. ">
  3430. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3431. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3432. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3433. </div>
  3434. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3435. </div>
  3436. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3437. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3438. </div>
  3439. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3440. </div>
  3441. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3442. </div>
  3443. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3444. </div>
  3445. </div>
  3446. <div class="chapter_upload_n">
  3447. <input readonly="true" v-if="
  3448. item1.type == 2 ||
  3449. item1.type == 3 ||
  3450. item1.type == 12 ||
  3451. item1.type == 13 ||
  3452. item1.type == 7
  3453. " :placeholder="item1.name" @click="
  3454. updataVideoT(
  3455. $event,
  3456. unitIndex,
  3457. itemTaskIndex,
  3458. index1
  3459. )
  3460. " style="
  3461. border: none;
  3462. outline: none;
  3463. width: 80%;
  3464. minwidth: 215px;
  3465. z-index: 99;
  3466. font-size: 14px;
  3467. white-space: nowrap;
  3468. overflow: hidden;
  3469. text-overflow: ellipsis;
  3470. " />
  3471. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3472. border: none;
  3473. outline: none;
  3474. width: 80%;
  3475. white-space: nowrap;
  3476. overflow: hidden;
  3477. text-overflow: ellipsis;
  3478. " readonly="true" @click="
  3479. selectAttText(itemTaskIndex, index1)
  3480. " />
  3481. <input :placeholder="
  3482. item1.title ? item1.title : '链接'
  3483. " v-if="item1.type == 8" style="
  3484. border: none;
  3485. outline: none;
  3486. width: 80%;
  3487. white-space: nowrap;
  3488. overflow: hidden;
  3489. text-overflow: ellipsis;
  3490. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3491. <input :placeholder="
  3492. item1.title ? item1.title : '链接'
  3493. " v-if="item1.type == 14" style="
  3494. border: none;
  3495. outline: none;
  3496. width: 80%;
  3497. white-space: nowrap;
  3498. overflow: hidden;
  3499. text-overflow: ellipsis;
  3500. " readonly="true" @click="
  3501. openUpdateSource(itemTaskIndex, index1)
  3502. " />
  3503. </div>
  3504. <div class="chapter_upload_ic">
  3505. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3506. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3507. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  3508. ">
  3509. <div></div>
  3510. </div>
  3511. <div class="chapter_upload_ud" style="z-index: 99">
  3512. <div class="chapter_upload_up" @click="
  3513. upCd(
  3514. $event,
  3515. unitIndex,
  3516. index,
  3517. itemTaskIndex,
  3518. index1
  3519. )
  3520. "></div>
  3521. <div class="chapter_upload_down" @click="
  3522. downCd(
  3523. $event,
  3524. unitIndex,
  3525. index,
  3526. itemTaskIndex,
  3527. index1
  3528. )
  3529. "></div>
  3530. </div>
  3531. <div class="chapter_upload_ic_edit" v-if="
  3532. item1.type == 2 ||
  3533. item1.type == 3 ||
  3534. item1.type == 12 ||
  3535. item1.type == 13 ||
  3536. item1.type == 7
  3537. " @click.stop="
  3538. updataVideoT(
  3539. $event,
  3540. unitIndex,
  3541. itemTaskIndex,
  3542. index1
  3543. )
  3544. ">
  3545. <div></div>
  3546. </div>
  3547. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3548. selectAttText(itemTaskIndex, index1)
  3549. ">
  3550. <div></div>
  3551. </div>
  3552. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3553. @click="selectLine(itemTaskIndex, index1)">
  3554. <div></div>
  3555. </div>
  3556. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3557. openUpdateSource(itemTaskIndex, index1)
  3558. ">
  3559. <div></div>
  3560. </div>
  3561. <div class="chapter_upload_ic_r" @click.stop="
  3562. deleteChapterData(
  3563. $event,
  3564. unitIndex,
  3565. index,
  3566. index1,
  3567. itemTaskIndex
  3568. )
  3569. ">
  3570. <div></div>
  3571. </div>
  3572. </div>
  3573. </div>
  3574. </div>
  3575. </div>
  3576. </div>
  3577. <!-- v-if="!itemTask.isFoldchapter" -->
  3578. <div class="add_info_box" style="margin: 10px 0 0">
  3579. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3580. 文件
  3581. <input type="file" accept="*" style="display: none" multiple="multiple" v-if="inputShow"
  3582. @change="
  3583. beforeUpload2(
  3584. $event,
  3585. unitIndex,
  3586. 13,
  3587. itemTaskIndex
  3588. )
  3589. " />
  3590. </button>
  3591. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(itemTaskIndex)">
  3592. 图文
  3593. </button>
  3594. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(itemTaskIndex)">
  3595. 链接
  3596. </button>
  3597. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(itemTaskIndex)">
  3598. 代码
  3599. </button>
  3600. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(itemTaskIndex)">
  3601. 资源
  3602. </button>
  3603. <button class="c_pub_button_add pub_btn_add_img"
  3604. @click="openAiCreate(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成PPT按钮`)">
  3605. AI生成PPT
  3606. </button>
  3607. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3608. AI生成教案
  3609. </button> -->
  3610. <button class="c_pub_button_add pub_btn_add_img"
  3611. @click="createTaskAn(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成学历案按钮`)">
  3612. {{ taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex] == true ? '停止生成学历案' :
  3613. 'AI生成学历案'}}
  3614. </button>
  3615. <button class="c_pub_button_add pub_btn_add_img"
  3616. @click="openAiCreateVideo(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-智能检索视频按钮`)">
  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. }}</span>
  3638. /
  3639. <span>{{
  3640. unitJson[unitIndex].chapterInfo[0].taskJson[
  3641. itemTaskIndex
  3642. ].isAllSize
  3643. }}</span>
  3644. </div>
  3645. <!-- <el-progress
  3646. :text-inside="true"
  3647. :stroke-width="20"
  3648. :percentage="
  3649. unitJson[unitIndex].chapterInfo[0].taskJson[
  3650. itemTaskIndex
  3651. ].progress
  3652. ? unitJson[unitIndex].chapterInfo[0]
  3653. .taskJson[itemTaskIndex].progress
  3654. : 0
  3655. "
  3656. style="width: 80%"
  3657. ></el-progress> -->
  3658. </div>
  3659. </div>
  3660. </div>
  3661. <div v-if="
  3662. unitJson[unitIndex].easy == 1 ||
  3663. (unitJson[unitIndex].easy == 5 &&
  3664. itemTask.taskType == 2)
  3665. ">
  3666. <div>
  3667. <div class="add_chapters_box add_c_none" v-if="
  3668. itemTask.chapterData &&
  3669. itemTask.chapterData.length == 0
  3670. ">
  3671. <img src="../../../assets/icon/new/c_none.png" alt />
  3672. </div>
  3673. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3674. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3675. dragOver(index1, itemTaskIndex)
  3676. " @dragend="dragEnd()" :draggable="isdrag ==
  3677. 'chapter-' + itemTaskIndex + '-' + index1
  3678. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3679. :key="item1.id" @click="
  3680. getChapterData(
  3681. $event,
  3682. unitIndex,
  3683. index,
  3684. index1,
  3685. item1.type
  3686. )
  3687. " :class="{
  3688. dragOverTop2:
  3689. newIndex === index1 &&
  3690. typeIndex ==
  3691. 'chapter-' +
  3692. itemTaskIndex +
  3693. '-' +
  3694. index1 &&
  3695. oldIndex > index1,
  3696. dragOverBottom2:
  3697. newIndex === index1 &&
  3698. typeIndex ==
  3699. 'chapter-' +
  3700. itemTaskIndex +
  3701. '-' +
  3702. index1 &&
  3703. oldIndex < index1,
  3704. }">
  3705. <div @mousedown="
  3706. isdrag =
  3707. 'chapter-' + itemTaskIndex + '-' + index1
  3708. " @mouseup="isdrag = ''" @touchstart="
  3709. isdrag =
  3710. 'chapter-' + itemTaskIndex + '-' + index1
  3711. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3712. <div class="chapter_upload_t" style="width: 100%"></div>
  3713. <div class="chapter_upload_o" style="
  3714. position: relative;
  3715. display: flex;
  3716. align-items: center;
  3717. ">
  3718. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3719. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3720. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3721. </div>
  3722. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3723. </div>
  3724. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3725. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3726. </div>
  3727. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3728. </div>
  3729. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3730. </div>
  3731. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3732. </div>
  3733. </div>
  3734. <div class="chapter_upload_n">
  3735. <span style="
  3736. font-size: 14px;
  3737. color: rgb(109, 109, 109);
  3738. height: 14px;
  3739. line-height: 14px;
  3740. " v-if="
  3741. item1.type == 2 ||
  3742. item1.type == 3 ||
  3743. item1.type == 7
  3744. ">{{ item1.text }}-</span>
  3745. <input readonly="true" v-if="
  3746. item1.type == 2 ||
  3747. item1.type == 3 ||
  3748. item1.type == 7
  3749. " :placeholder="item1.name" @click="
  3750. updataVideoT(
  3751. $event,
  3752. unitIndex,
  3753. itemTaskIndex,
  3754. index1
  3755. )
  3756. " style="
  3757. border: none;
  3758. outline: none;
  3759. width: 80%;
  3760. minwidth: 215px;
  3761. z-index: 99;
  3762. font-size: 14px;
  3763. white-space: nowrap;
  3764. overflow: hidden;
  3765. text-overflow: ellipsis;
  3766. " />
  3767. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3768. border: none;
  3769. outline: none;
  3770. width: 80%;
  3771. white-space: nowrap;
  3772. overflow: hidden;
  3773. text-overflow: ellipsis;
  3774. " readonly="true" @click="
  3775. selectAttText(itemTaskIndex, index1)
  3776. " />
  3777. <input :placeholder="item1.title ? item1.title : '链接'
  3778. " v-if="item1.type == 8 || item1.type == 14" style="
  3779. border: none;
  3780. outline: none;
  3781. width: 80%;
  3782. white-space: nowrap;
  3783. overflow: hidden;
  3784. text-overflow: ellipsis;
  3785. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3786. </div>
  3787. <div class="chapter_upload_ic">
  3788. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3789. <div class="chapter_upload_ud" style="z-index: 99">
  3790. <div class="chapter_upload_up" @click="
  3791. upCd(
  3792. $event,
  3793. unitIndex,
  3794. index,
  3795. itemTaskIndex,
  3796. index1
  3797. )
  3798. "></div>
  3799. <div class="chapter_upload_down" @click="
  3800. downCd(
  3801. $event,
  3802. unitIndex,
  3803. index,
  3804. itemTaskIndex,
  3805. index1
  3806. )
  3807. "></div>
  3808. </div>
  3809. <div class="chapter_upload_ic_edit" v-if="
  3810. item1.type == 2 ||
  3811. item1.type == 3 ||
  3812. item1.type == 12 ||
  3813. item1.type == 13 ||
  3814. item1.type == 7
  3815. " @click.stop="
  3816. updataVideoT(
  3817. $event,
  3818. unitIndex,
  3819. itemTaskIndex,
  3820. index1
  3821. )
  3822. ">
  3823. <div></div>
  3824. </div>
  3825. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3826. selectAttText(itemTaskIndex, index1)
  3827. ">
  3828. <div></div>
  3829. </div>
  3830. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3831. @click="selectLine(itemTaskIndex, index1)">
  3832. <div></div>
  3833. </div>
  3834. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3835. openUpdateSource(itemTaskIndex, index1)
  3836. ">
  3837. <div></div>
  3838. </div>
  3839. <div class="chapter_upload_ic_r" @click.stop="
  3840. deleteChapterData(
  3841. $event,
  3842. unitIndex,
  3843. index,
  3844. index1,
  3845. itemTaskIndex
  3846. )
  3847. ">
  3848. <div></div>
  3849. </div>
  3850. </div>
  3851. </div>
  3852. </div>
  3853. </div>
  3854. </div>
  3855. <div class="add_info_box" style="margin: 10px 0 0">
  3856. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3857. <span style="color: red">*</span>
  3858. 教学设计
  3859. <input type="file"
  3860. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3861. style="display: none" v-if="inputShow" @change="
  3862. beforeUpload3(
  3863. $event,
  3864. unitIndex,
  3865. 3,
  3866. itemTaskIndex,
  3867. '教学设计'
  3868. )
  3869. " />
  3870. </button>
  3871. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3872. <span style="color: red">*</span>
  3873. 教学课件
  3874. <input type="file"
  3875. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3876. style="display: none" v-if="inputShow" @change="
  3877. beforeUpload3(
  3878. $event,
  3879. unitIndex,
  3880. 3,
  3881. itemTaskIndex,
  3882. '教学课件'
  3883. )
  3884. " />
  3885. </button>
  3886. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3887. 教学视频
  3888. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3889. style="display: none" v-if="inputShow" @change="
  3890. beforeUpload3(
  3891. $event,
  3892. unitIndex,
  3893. 2,
  3894. itemTaskIndex,
  3895. '教学视频'
  3896. )
  3897. " />
  3898. </button>
  3899. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3900. 教学音频
  3901. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3902. beforeUpload3(
  3903. $event,
  3904. unitIndex,
  3905. 2,
  3906. itemTaskIndex,
  3907. '教学音频'
  3908. )
  3909. " />
  3910. </button>
  3911. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3912. 学习单
  3913. <input type="file"
  3914. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3915. style="display: none" v-if="inputShow" @change="
  3916. beforeUpload3(
  3917. $event,
  3918. unitIndex,
  3919. 3,
  3920. itemTaskIndex,
  3921. '学习单'
  3922. )
  3923. " />
  3924. </button>
  3925. </div>
  3926. <div v-if="
  3927. unitJson[unitIndex].chapterInfo[0].taskJson[
  3928. itemTaskIndex
  3929. ].proVisible
  3930. " class="mask">
  3931. <div class="progressBox">
  3932. <!-- <div id="closePro" class="closeCss">
  3933. <img src="../../../../assets/icon/close.png" alt />
  3934. </div> -->
  3935. <div class="lbox">
  3936. <img src="../../../assets/loading.gif" />上传中,请稍后
  3937. </div>
  3938. <div style="margin-bottom: 10px">
  3939. <span>{{
  3940. unitJson[unitIndex].chapterInfo[0].taskJson[
  3941. itemTaskIndex
  3942. ].isFinishSize
  3943. }}M</span>
  3944. /
  3945. <span>{{
  3946. unitJson[unitIndex].chapterInfo[0].taskJson[
  3947. itemTaskIndex
  3948. ].isAllSize
  3949. }}M</span>
  3950. </div>
  3951. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3952. itemTaskIndex
  3953. ].progress
  3954. ? unitJson[unitIndex].chapterInfo[0]
  3955. .taskJson[itemTaskIndex].progress
  3956. : 0
  3957. " style="width: 80%"></el-progress>
  3958. </div>
  3959. </div>
  3960. </div>
  3961. </div>
  3962. <!-- padding: 20px; -->
  3963. <div style="
  3964. background: #fff;
  3965. border-radius: 5px;
  3966. margin-top: 15px;
  3967. " :style="{paddingBottom: panTaskElist() == 0?'75px':''}">
  3968. <div v-if="
  3969. unitJson[unitIndex].easy == 6 ||
  3970. !unitJson[unitIndex].easy
  3971. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]"
  3972. element-loading-text="小可正在努力生成中,请稍等...">
  3973. <div class="c_pub_button_confirm stopBtn"
  3974. v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]"
  3975. @click="cancelAjax('aiTaskGL2', itemTaskIndex)">停止</div>
  3976. <div style="width: 100%">
  3977. <div style="
  3978. display: flex;
  3979. flex-direction: row;
  3980. align-items: center;
  3981. margin: 5px 0 20px;
  3982. width: 100%
  3983. ">
  3984. <div class="lineTitle clineTitle" style="width: 100%">
  3985. <span>练习内容</span>
  3986. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3987. <div class="r_pub_button_op" style="margin-left:auto;"
  3988. @contextmenu.prevent="openAiDialog(1, 'aiTaskG2', itemTaskIndex)"
  3989. @click="openAiDialog(2, 'aiTaskG2', itemTaskIndex)">{{ panDanTool(itemTask) > 0 ?
  3990. '重新生成工具' : '生成工具' }}</div>
  3991. </el-tooltip>
  3992. </div>
  3993. <!-- <div class="line" style="width: 90%"></div> -->
  3994. </div>
  3995. </div>
  3996. <div class="tools">
  3997. <div class="leftTools" style="width: 100%" v-for="(
  3998. itemTool, toolIndex
  3999. ) in itemTask.toolChoose" :key="toolIndex">
  4000. <div style="
  4001. display: flex;
  4002. flex-direction: row;
  4003. align-items: baseline;
  4004. flex-wrap: nowrap;
  4005. justify-content: flex-start;
  4006. position: relative;
  4007. ">
  4008. <div style="margin-right: 20px; font-weight: bold"
  4009. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4010. 工具 {{ toolIndex + 1 }} :
  4011. </div>
  4012. <div class="chooseWho">
  4013. <div :class="itemTool.toolType == 0
  4014. ? 'isChooseActive'
  4015. : ''
  4016. " @click="
  4017. (itemTool.toolType = 0),
  4018. (itemTool.isFold3 = false),
  4019. $forceUpdate()
  4020. ">
  4021. 互动类
  4022. </div>
  4023. <div :class="itemTool.toolType == 1
  4024. ? 'isChooseActive'
  4025. : ''
  4026. " @click="
  4027. (itemTool.toolType = 1),
  4028. (itemTool.isFold3 = false),
  4029. $forceUpdate()
  4030. ">
  4031. 思维类
  4032. </div>
  4033. <div :class="itemTool.toolType == 6
  4034. ? 'isChooseActive'
  4035. : ''
  4036. " @click="
  4037. (itemTool.toolType = 6),
  4038. (itemTool.isFold3 = false),
  4039. $forceUpdate()
  4040. ">
  4041. 协作类
  4042. </div>
  4043. <div :class="itemTool.toolType == 2
  4044. ? 'isChooseActive'
  4045. : ''
  4046. " @click="
  4047. (itemTool.toolType = 2),
  4048. (itemTool.isFold3 = false),
  4049. $forceUpdate()
  4050. ">
  4051. 测评类
  4052. </div>
  4053. <div :class="itemTool.toolType == 7
  4054. ? 'isChooseActive'
  4055. : ''
  4056. " @click="
  4057. (itemTool.toolType = 7),
  4058. (itemTool.isFold3 = false),
  4059. $forceUpdate()
  4060. ">
  4061. 评价类
  4062. </div>
  4063. <div :class="itemTool.toolType == 3
  4064. ? 'isChooseActive'
  4065. : ''
  4066. " @click="
  4067. (itemTool.toolType = 3),
  4068. (itemTool.isFold3 = false),
  4069. $forceUpdate()
  4070. ">
  4071. 编程类
  4072. </div>
  4073. <div :class="itemTool.toolType == 5
  4074. ? 'isChooseActive'
  4075. : ''
  4076. " @click="
  4077. (itemTool.toolType = 5),
  4078. (itemTool.isFold3 = false),
  4079. $forceUpdate()
  4080. ">
  4081. 学科类
  4082. </div>
  4083. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  4084. " @click="(itemTool.toolType = 4), $forceUpdate()">
  4085. 其他
  4086. </div> -->
  4087. </div>
  4088. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  4089. margin:
  4090. itemTask.toolChoose.length > 1
  4091. ? '0px 35px 0px auto'
  4092. : '0 0 0 auto',
  4093. }" v-if="itemTask.toolChoose.length > 1">
  4094. <div class="chapter_upload_up2" @click.stop="
  4095. upTool(
  4096. $event,
  4097. unitIndex,
  4098. itemTaskIndex,
  4099. toolIndex
  4100. )
  4101. ">
  4102. 上移
  4103. </div>
  4104. <div class="chapter_upload_down2" @click.stop="
  4105. downTool(
  4106. $event,
  4107. unitIndex,
  4108. itemTaskIndex,
  4109. toolIndex
  4110. )
  4111. ">
  4112. 下移
  4113. </div>
  4114. </div>
  4115. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  4116. @click="fold3(itemTaskIndex, toolIndex)"
  4117. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4118. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  4119. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  4120. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4121. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  4122. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4123. v-if="itemTask.toolChoose.length > 1" style="
  4124. position: absolute;
  4125. right: 0;
  4126. top: -5px;
  4127. "></div>
  4128. </div>
  4129. <!-- v-show="!itemTool.isFold3" -->
  4130. <div style="min-height: 163px">
  4131. <div class="toolSort" v-if="itemTool.toolType == 0">
  4132. <!-- <div class="tool">
  4133. <div
  4134. class="whiteBIcon"
  4135. @click="addTools(8, itemTaskIndex, toolIndex)"
  4136. >
  4137. <img src="../../../assets/icon/secondToolList/library.png" alt />
  4138. <div style="margin: 5px 0">素材库</div>
  4139. </div>
  4140. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  4141. <img
  4142. src="../../../assets/icon/checkNo.png"
  4143. alt
  4144. v-if="itemTool.tool.indexOf(8) == -1"
  4145. />
  4146. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  4147. alt /><span>已选择</span></div>
  4148. </div>
  4149. </div>-->
  4150. <!-- <div class="tool">
  4151. <div
  4152. class="whiteBIcon"
  4153. @click="addTools(17, itemTaskIndex, toolIndex)"
  4154. >
  4155. <img
  4156. src="../../../assets/icon/secondToolList/library.png"
  4157. alt
  4158. />
  4159. <div style="margin: 5px 0">学习资料</div>
  4160. </div>
  4161. <div
  4162. class="check"
  4163. @click="addTools(17, itemTaskIndex, toolIndex)"
  4164. >
  4165. <img
  4166. src="../../../assets/icon/checkNo.png"
  4167. alt
  4168. v-if="itemTool.tool.indexOf(17) == -1"
  4169. />
  4170. <img
  4171. src="../../../assets/icon/checkedIs.png"
  4172. alt
  4173. v-else
  4174. />
  4175. </div>10
  4176. </div> -->
  4177. <div class="tool" :class="{
  4178. isToolChoose:
  4179. itemTool.tool.indexOf(10) != -1,
  4180. }" @click="
  4181. addTools(10, itemTaskIndex, toolIndex)
  4182. ">
  4183. <div class="whiteBIcon" @click.stop="
  4184. openTools(itemTaskIndex, 10, toolIndex)
  4185. ">
  4186. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  4187. <div style="margin: 5px 0">倒计时</div>
  4188. </div>
  4189. <div class="noCTool">
  4190. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4191. </div>
  4192. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  4193. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4194. </div>
  4195. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  4196. <img src="../../../assets/icon/checkNo.png" alt
  4197. v-if="itemTool.tool.indexOf(10) == -1" />
  4198. <div class="checkDiv" v-else>
  4199. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4200. </div>
  4201. </div> -->
  4202. </div>
  4203. <div class="tool" :class="{
  4204. isToolChoose:
  4205. itemTool.tool.indexOf(65) != -1,
  4206. }" @click="
  4207. addTools(65, itemTaskIndex, toolIndex)
  4208. ">
  4209. <div class="whiteBIcon" @click.stop="
  4210. addTools(65, itemTaskIndex, toolIndex)
  4211. ">
  4212. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  4213. <div style="margin: 5px 0">挑人</div>
  4214. </div>
  4215. <div class="noCTool">
  4216. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4217. </div>
  4218. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  4219. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4220. </div>
  4221. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  4222. <img src="../../../assets/icon/checkNo.png" alt
  4223. v-if="itemTool.tool.indexOf(65) == -1" />
  4224. <div class="checkDiv" v-else>
  4225. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4226. </div>
  4227. </div> -->
  4228. </div>
  4229. <!-- <div class="tool">
  4230. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  4231. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4232. <div style="margin: 5px 0">学生分组</div>
  4233. </div>
  4234. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4235. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  4236. <div class="checkDiv" v-else>
  4237. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4238. </div>
  4239. </div>
  4240. </div> -->
  4241. <!-- <div class="tool">
  4242. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  4243. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  4244. <div style="margin: 5px 0">交互视频</div>
  4245. </div>
  4246. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  4247. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  4248. <div class="checkDiv" v-else>
  4249. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4250. </div>
  4251. </div>
  4252. </div> -->
  4253. </div>
  4254. <div class="toolSort" v-if="itemTool.toolType == 1">
  4255. <div class="tool" :class="{
  4256. isToolChoose:
  4257. itemTool.tool.indexOf(7) != -1,
  4258. }" @click="
  4259. addTools(7, itemTaskIndex, toolIndex)
  4260. ">
  4261. <div class="whiteBIcon" @click.stop="
  4262. addTools(7, itemTaskIndex, toolIndex)
  4263. ">
  4264. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  4265. <div style="margin: 5px 0">思维网格</div>
  4266. </div>
  4267. <div class="noCTool">
  4268. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4269. </div>
  4270. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  4271. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4272. </div>
  4273. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  4274. <img src="../../../assets/icon/checkNo.png" alt
  4275. v-if="itemTool.tool.indexOf(7) == -1" />
  4276. <div class="checkDiv" v-else>
  4277. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4278. </div>
  4279. </div> -->
  4280. </div>
  4281. <div class="tool" :class="{
  4282. isToolChoose:
  4283. itemTool.tool.indexOf(1) != -1,
  4284. }" @click="
  4285. addTools(1, itemTaskIndex, toolIndex)
  4286. ">
  4287. <div class="whiteBIcon" @click.stop="
  4288. openTools(itemTaskIndex, 1, toolIndex)
  4289. ">
  4290. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4291. <div style="margin: 5px 0">电子白板</div>
  4292. </div>
  4293. <div class="noCTool">
  4294. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4295. </div>
  4296. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  4297. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4298. </div>
  4299. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  4300. <img src="../../../assets/icon/checkNo.png" alt
  4301. v-if="itemTool.tool.indexOf(1) == -1" />
  4302. <div class="checkDiv" v-else>
  4303. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4304. </div>
  4305. </div> -->
  4306. </div>
  4307. <!-- <div class="tool">
  4308. <div
  4309. class="whiteBIcon"
  4310. @click="addTools(2, itemTaskIndex, toolIndex)"
  4311. >
  4312. <img
  4313. src="../../../assets/icon/secondToolList/note.png"
  4314. alt
  4315. />
  4316. <div style="margin: 5px 0">便签</div>
  4317. </div>
  4318. <div
  4319. class="check"
  4320. @click="addTools(2, itemTaskIndex, toolIndex)"
  4321. >
  4322. <img
  4323. src="../../../assets/icon/checkNo.png"
  4324. alt
  4325. v-if="itemTool.tool.indexOf(2) == -1"
  4326. />
  4327. <div class="checkDiv" v-else>
  4328. <img
  4329. src="../../../assets/icon/checkedIs.png"
  4330. alt
  4331. /><span>已选择</span>
  4332. </div>
  4333. </div>
  4334. </div> -->
  4335. <!-- <div class="tool">
  4336. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  4337. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4338. <div style="margin: 5px 0">协同文档</div>
  4339. </div>
  4340. <div
  4341. class="check"
  4342. @click="addTools(6, itemTaskIndex, toolIndex)"
  4343. >
  4344. <img
  4345. src="../../../assets/icon/checkNo.png"
  4346. alt
  4347. v-if="itemTool.tool.indexOf(6) == -1"
  4348. />
  4349. <div class="checkDiv" v-else>
  4350. <img
  4351. src="../../../assets/icon/checkedIs.png"
  4352. alt
  4353. /><span>已选择</span>
  4354. </div>
  4355. </div>
  4356. </div> -->
  4357. <div class="tool" :class="{
  4358. isToolChoose:
  4359. itemTool.tool.indexOf(52) != -1,
  4360. }" @click="
  4361. addTools(52, itemTaskIndex, toolIndex)
  4362. ">
  4363. <div class="whiteBIcon" @click.stop="
  4364. openTools(itemTaskIndex, 52, toolIndex)
  4365. ">
  4366. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4367. <div style="margin: 5px 0">文档</div>
  4368. </div>
  4369. <div class="noCTool">
  4370. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4371. </div>
  4372. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  4373. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4374. </div>
  4375. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  4376. <img src="../../../assets/icon/checkNo.png" alt
  4377. v-if="itemTool.tool.indexOf(52) == -1" />
  4378. <div class="checkDiv" v-else>
  4379. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4380. </div>
  4381. </div> -->
  4382. </div>
  4383. <div class="tool" :class="{
  4384. isToolChoose:
  4385. itemTool.tool.indexOf(3) != -1,
  4386. }" @click="
  4387. addTools(3, itemTaskIndex, toolIndex)
  4388. ">
  4389. <div class="whiteBIcon" @click.stop="
  4390. openTools(itemTaskIndex, 3, toolIndex)
  4391. ">
  4392. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4393. <div style="margin: 5px 0">思维导图</div>
  4394. </div>
  4395. <div class="noCTool">
  4396. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4397. </div>
  4398. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  4399. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4400. </div>
  4401. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  4402. <img src="../../../assets/icon/checkNo.png" alt
  4403. v-if="itemTool.tool.indexOf(3) == -1" />
  4404. <div class="checkDiv" v-else>
  4405. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4406. </div>
  4407. </div> -->
  4408. </div>
  4409. <div class="tool" :class="{
  4410. isToolChoose:
  4411. itemTool.tool.indexOf(48) != -1,
  4412. }" @click="
  4413. addTools(48, itemTaskIndex, toolIndex)
  4414. ">
  4415. <div class="whiteBIcon" @click.stop="
  4416. openTools(itemTaskIndex, 48, toolIndex)
  4417. ">
  4418. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4419. <div style="margin: 5px 0">表格</div>
  4420. </div>
  4421. <div class="noCTool">
  4422. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4423. </div>
  4424. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  4425. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4426. </div>
  4427. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  4428. <img src="../../../assets/icon/checkNo.png" alt
  4429. v-if="itemTool.tool.indexOf(48) == -1" />
  4430. <div class="checkDiv" v-else>
  4431. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4432. </div>
  4433. </div> -->
  4434. </div>
  4435. </div>
  4436. <div class="toolSort" v-if="itemTool.toolType == 6">
  4437. <div class="tool" :class="{
  4438. isToolChoose:
  4439. itemTool.tool.indexOf(49) != -1,
  4440. }" @click="
  4441. addTools(49, itemTaskIndex, toolIndex)
  4442. ">
  4443. <div class="whiteBIcon" @click.stop="
  4444. openTools(itemTaskIndex, 49, toolIndex)
  4445. ">
  4446. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4447. <div style="margin: 5px 0">学生分组</div>
  4448. </div>
  4449. <div class="noCTool">
  4450. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4451. </div>
  4452. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  4453. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4454. </div>
  4455. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4456. <img src="../../../assets/icon/checkNo.png" alt
  4457. v-if="itemTool.tool.indexOf(49) == -1" />
  4458. <div class="checkDiv" v-else>
  4459. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4460. </div>
  4461. </div> -->
  4462. </div>
  4463. </div>
  4464. <div class="toolSort" v-if="itemTool.toolType == 2">
  4465. <!-- <div class="tool">
  4466. <div
  4467. class="whiteBIcon"
  4468. @click="addTools(5, itemTaskIndex, toolIndex)"
  4469. >
  4470. <img
  4471. src="../../../assets/icon/thirdToolList/score.png"
  4472. alt
  4473. />
  4474. <div style="margin: 5px 0">量规评分</div>
  4475. </div>
  4476. <div
  4477. class="check"
  4478. @click="addTools(5, itemTaskIndex, toolIndex)"
  4479. >
  4480. <img
  4481. src="../../../assets/icon/checkNo.png"
  4482. alt
  4483. v-if="itemTool.tool.indexOf(5) == -1"
  4484. />
  4485. <img
  4486. src="../../../assets/icon/checkedIs.png"
  4487. alt
  4488. v-else
  4489. />
  4490. </div>
  4491. </div>-->
  4492. <div class="tool" :class="{
  4493. isToolChoose:
  4494. itemTool.tool.indexOf(4) != -1,
  4495. }" @click="
  4496. addTools(4, itemTaskIndex, toolIndex)
  4497. ">
  4498. <div class="whiteBIcon" @click.stop="
  4499. openTools(itemTaskIndex, 4, toolIndex)
  4500. ">
  4501. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4502. <div style="margin: 5px 0">问卷调查</div>
  4503. </div>
  4504. <div class="noCTool">
  4505. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4506. </div>
  4507. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4508. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4509. </div>
  4510. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4511. <img src="../../../assets/icon/checkNo.png" alt
  4512. v-if="itemTool.tool.indexOf(4) == -1" />
  4513. <div class="checkDiv" v-else>
  4514. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4515. </div>
  4516. </div> -->
  4517. </div>
  4518. <div class="tool" :class="{
  4519. isToolChoose:
  4520. itemTool.tool.indexOf(45) != -1,
  4521. }" @click="
  4522. addTools(45, itemTaskIndex, toolIndex)
  4523. ">
  4524. <div class="whiteBIcon" @click="
  4525. openTools(itemTaskIndex, 45, toolIndex)
  4526. ">
  4527. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4528. <div style="margin: 5px 0">选择题</div>
  4529. </div>
  4530. <div class="noCTool">
  4531. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4532. </div>
  4533. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4534. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4535. </div>
  4536. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4537. <img src="../../../assets/icon/checkNo.png" alt
  4538. v-if="itemTool.tool.indexOf(45) == -1" />
  4539. <div class="checkDiv" v-else>
  4540. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4541. </div>
  4542. </div> -->
  4543. </div>
  4544. <div class="tool" :class="{
  4545. isToolChoose:
  4546. itemTool.tool.indexOf(15) != -1,
  4547. }" @click="
  4548. addTools(15, itemTaskIndex, toolIndex)
  4549. ">
  4550. <div class="whiteBIcon" @click.stop="
  4551. openTools(itemTaskIndex, 15, toolIndex)
  4552. ">
  4553. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4554. <div style="margin: 5px 0">问答</div>
  4555. </div>
  4556. <div class="noCTool">
  4557. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4558. </div>
  4559. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4560. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4561. </div>
  4562. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4563. <img src="../../../assets/icon/checkNo.png" alt
  4564. v-if="itemTool.tool.indexOf(15) == -1" />
  4565. <div class="checkDiv" v-else>
  4566. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4567. </div>
  4568. </div> -->
  4569. </div>
  4570. <div class="tool" :class="{
  4571. isToolChoose:
  4572. itemTool.tool.indexOf(16) != -1,
  4573. }" @click="
  4574. addTools(16, itemTaskIndex, toolIndex)
  4575. ">
  4576. <div class="whiteBIcon" @click.stop="
  4577. addTools(16, itemTaskIndex, toolIndex)
  4578. ">
  4579. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4580. <div style="margin: 5px 0">作业提交</div>
  4581. </div>
  4582. <div class="noCTool">
  4583. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4584. </div>
  4585. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4586. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4587. </div>
  4588. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4589. <img src="../../../assets/icon/checkNo.png" alt
  4590. v-if="itemTool.tool.indexOf(16) == -1" />
  4591. <div class="checkDiv" v-else>
  4592. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4593. </div>
  4594. </div> -->
  4595. </div>
  4596. <div class="tool" :class="{
  4597. isToolChoose:
  4598. itemTool.tool.indexOf(50) != -1,
  4599. }" @click="
  4600. addTools(50, itemTaskIndex, toolIndex)
  4601. ">
  4602. <div class="whiteBIcon" @click.stop="
  4603. addTools(50, itemTaskIndex, toolIndex)
  4604. ">
  4605. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4606. <div style="margin: 5px 0">批量上传</div>
  4607. </div>
  4608. <div class="noCTool">
  4609. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4610. </div>
  4611. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4612. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4613. </div>
  4614. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4615. <img src="../../../assets/icon/checkNo.png" alt
  4616. v-if="itemTool.tool.indexOf(50) == -1" />
  4617. <div class="checkDiv" v-else>
  4618. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4619. </div>
  4620. </div> -->
  4621. </div>
  4622. <!-- <div class="tool">
  4623. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4624. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4625. <div style="margin: 5px 0">个人评价</div>
  4626. </div>
  4627. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4628. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4629. <div class="checkDiv" v-else>
  4630. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4631. </div>
  4632. </div>
  4633. </div> -->
  4634. <div class="tool" :class="{
  4635. isToolChoose:
  4636. itemTool.tool.indexOf(41) != -1,
  4637. }" @click="
  4638. addTools(41, itemTaskIndex, toolIndex)
  4639. ">
  4640. <div class="whiteBIcon" @click.stop="
  4641. openTools(itemTaskIndex, 41, toolIndex)
  4642. ">
  4643. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4644. <div style="margin: 5px 0">选择匹配</div>
  4645. </div>
  4646. <div class="noCTool">
  4647. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4648. </div>
  4649. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4650. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4651. </div>
  4652. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4653. <img src="../../../assets/icon/checkNo.png" alt
  4654. v-if="itemTool.tool.indexOf(41) == -1" />
  4655. <div class="checkDiv" v-else>
  4656. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4657. </div>
  4658. </div> -->
  4659. </div>
  4660. <div class="tool" :class="{
  4661. isToolChoose:
  4662. itemTool.tool.indexOf(47) != -1,
  4663. }" @click="
  4664. addTools(47, itemTaskIndex, toolIndex)
  4665. ">
  4666. <div class="whiteBIcon" @click.stop="
  4667. openTools(itemTaskIndex, 47, toolIndex)
  4668. ">
  4669. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4670. <div style="margin: 5px 0">排序</div>
  4671. </div>
  4672. <div class="noCTool">
  4673. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4674. </div>
  4675. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4676. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4677. </div>
  4678. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4679. <img src="../../../assets/icon/checkNo.png" alt
  4680. v-if="itemTool.tool.indexOf(47) == -1" />
  4681. <div class="checkDiv" v-else>
  4682. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4683. </div>
  4684. </div> -->
  4685. </div>
  4686. <!-- <div class="tool">
  4687. <div
  4688. class="whiteBIcon"
  4689. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4690. >
  4691. <img
  4692. src="../../../assets/icon/thirdToolList/mp3.png"
  4693. alt
  4694. />
  4695. <div style="margin: 5px 0">上传音频</div>
  4696. </div>
  4697. <div
  4698. class="check"
  4699. @click="addTools(42, itemTaskIndex, toolIndex)"
  4700. >
  4701. <img
  4702. src="../../../assets/icon/checkNo.png"
  4703. alt
  4704. v-if="itemTool.tool.indexOf(42) == -1"
  4705. />
  4706. <img
  4707. src="../../../assets/icon/checkedIs.png"
  4708. alt
  4709. v-else
  4710. />
  4711. </div>
  4712. </div> -->
  4713. </div>
  4714. <div class="toolSort" v-if="itemTool.toolType == 3">
  4715. <div class="tool" :class="{
  4716. isToolChoose:
  4717. itemTool.tool.indexOf(18) != -1,
  4718. }" @click="
  4719. addTools(18, itemTaskIndex, toolIndex)
  4720. ">
  4721. <div class="whiteBIcon" @click.stop="
  4722. addTools(18, itemTaskIndex, toolIndex)
  4723. ">
  4724. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4725. <div style="margin: 5px 0">训练平台</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(18) != -1">
  4731. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4732. </div>
  4733. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4734. <img src="../../../assets/icon/checkNo.png" alt
  4735. v-if="itemTool.tool.indexOf(18) == -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(21) != -1,
  4744. }" @click="
  4745. addTools(21, itemTaskIndex, toolIndex)
  4746. ">
  4747. <div class="whiteBIcon" @click.stop="
  4748. addTools(21, itemTaskIndex, toolIndex)
  4749. ">
  4750. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4751. <div style="margin: 5px 0">
  4752. AIoT Blockly
  4753. </div>
  4754. </div>
  4755. <div class="noCTool">
  4756. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4757. </div>
  4758. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4759. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4760. </div>
  4761. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4762. <img src="../../../assets/icon/checkNo.png" alt
  4763. v-if="itemTool.tool.indexOf(21) == -1" />
  4764. <div class="checkDiv" v-else>
  4765. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4766. </div>
  4767. </div> -->
  4768. </div>
  4769. <!-- <div class="tool">
  4770. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4771. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4772. <div style="margin: 5px 0">AI体验</div>
  4773. </div>
  4774. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4775. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4776. <div class="checkDiv" v-else>
  4777. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4778. </div>
  4779. </div>
  4780. </div> -->
  4781. <div class="tool" :class="{
  4782. isToolChoose:
  4783. itemTool.tool.indexOf(23) != -1,
  4784. }" @click="
  4785. addTools(23, itemTaskIndex, toolIndex)
  4786. ">
  4787. <div class="whiteBIcon" @click.stop="
  4788. addTools(23, itemTaskIndex, toolIndex)
  4789. ">
  4790. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4791. <div style="margin: 5px 0">AI Python</div>
  4792. </div>
  4793. <div class="noCTool">
  4794. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4795. </div>
  4796. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4797. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4798. </div>
  4799. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4800. <img src="../../../assets/icon/checkNo.png" alt
  4801. v-if="itemTool.tool.indexOf(23) == -1" />
  4802. <div class="checkDiv" v-else>
  4803. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4804. </div>
  4805. </div> -->
  4806. </div>
  4807. <div class="tool" :class="{
  4808. isToolChoose:
  4809. itemTool.tool.indexOf(24) != -1,
  4810. }" @click="
  4811. addTools(24, itemTaskIndex, toolIndex)
  4812. ">
  4813. <div class="whiteBIcon" @click.stop="
  4814. addTools(24, itemTaskIndex, toolIndex)
  4815. ">
  4816. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4817. <div style="margin: 5px 0">
  4818. AI Blockly
  4819. </div>
  4820. </div>
  4821. <div class="noCTool">
  4822. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4823. </div>
  4824. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4825. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4826. </div>
  4827. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4828. <img src="../../../assets/icon/checkNo.png" alt
  4829. v-if="itemTool.tool.indexOf(24) == -1" />
  4830. <div class="checkDiv" v-else>
  4831. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4832. </div>
  4833. </div> -->
  4834. </div>
  4835. <div class="tool" :class="{
  4836. isToolChoose:
  4837. itemTool.tool.indexOf(32) != -1,
  4838. }" @click="
  4839. addTools(32, itemTaskIndex, toolIndex)
  4840. ">
  4841. <div class="whiteBIcon" @click.stop="
  4842. addTools(32, itemTaskIndex, toolIndex)
  4843. ">
  4844. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4845. <div style="margin: 5px 0">源码编辑</div>
  4846. </div>
  4847. <div class="noCTool">
  4848. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4849. </div>
  4850. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4851. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4852. </div>
  4853. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4854. <img src="../../../assets/icon/checkNo.png" alt
  4855. v-if="itemTool.tool.indexOf(32) == -1" />
  4856. <div class="checkDiv" v-else>
  4857. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4858. </div>
  4859. </div> -->
  4860. </div>
  4861. <div class="tool" :class="{
  4862. isToolChoose:
  4863. itemTool.tool.indexOf(57) != -1,
  4864. }" @click="
  4865. addTools(57, itemTaskIndex, toolIndex)
  4866. ">
  4867. <div class="whiteBIcon" @click.stop="
  4868. openTools(itemTaskIndex, 57, toolIndex)
  4869. ">
  4870. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4871. <div style="margin: 5px 0">CocoPi</div>
  4872. </div>
  4873. <div class="noCTool">
  4874. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4875. </div>
  4876. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4877. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4878. </div>
  4879. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4880. <img src="../../../assets/icon/checkNo.png" alt
  4881. v-if="itemTool.tool.indexOf(57) == -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" :class="{
  4888. isToolChoose:
  4889. itemTool.tool.indexOf(63) != -1,
  4890. }" @click="
  4891. addTools(63, itemTaskIndex, toolIndex)
  4892. ">
  4893. <div class="whiteBIcon" @click.stop="
  4894. addTools(63, itemTaskIndex, toolIndex)
  4895. ">
  4896. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4897. <div style="margin: 5px 0">海龟编程</div>
  4898. </div>
  4899. <div class="noCTool">
  4900. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4901. </div>
  4902. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4903. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4904. </div>
  4905. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4906. <img src="../../../assets/icon/checkNo.png" alt
  4907. v-if="itemTool.tool.indexOf(63) == -1" />
  4908. <div class="checkDiv" v-else>
  4909. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4910. </div>
  4911. </div> -->
  4912. </div>
  4913. <div class="tool" :class="{
  4914. isToolChoose:
  4915. itemTool.tool.indexOf(71) != -1,
  4916. }" @click="
  4917. addTools(71, itemTaskIndex, toolIndex)
  4918. ">
  4919. <div class="whiteBIcon" @click.stop="
  4920. addTools(71, itemTaskIndex, toolIndex)
  4921. ">
  4922. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4923. <div style="margin: 5px 0">AI智能体</div>
  4924. </div>
  4925. <div class="noCTool">
  4926. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4927. </div>
  4928. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4929. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4930. </div>
  4931. </div>
  4932. </div>
  4933. <div class="toolSort" v-if="itemTool.toolType == 7">
  4934. <div class="tool" :class="{
  4935. isToolChoose:
  4936. itemTool.tool.indexOf(40) != -1,
  4937. }" @click.stop="
  4938. addTools(40, itemTaskIndex, toolIndex)
  4939. ">
  4940. <div class="whiteBIcon" @click.stop="
  4941. openTools(itemTaskIndex, 40, toolIndex)
  4942. ">
  4943. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4944. <div style="margin: 5px 0">个人评价</div>
  4945. </div>
  4946. <div class="noCTool">
  4947. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4948. </div>
  4949. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4950. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4951. </div>
  4952. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4953. <img src="../../../assets/icon/checkNo.png" alt
  4954. v-if="itemTool.tool.indexOf(40) == -1" />
  4955. <div class="checkDiv" v-else>
  4956. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4957. </div>
  4958. </div> -->
  4959. </div>
  4960. </div>
  4961. <div class="toolSort" v-if="itemTool.toolType == 5">
  4962. <div class="tool" :class="{
  4963. isToolChoose:
  4964. itemTool.tool.indexOf(28) != -1,
  4965. }" @click="
  4966. addTools(28, itemTaskIndex, toolIndex)
  4967. ">
  4968. <div class="whiteBIcon" @click.stop="
  4969. addTools(28, itemTaskIndex, toolIndex)
  4970. ">
  4971. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4972. <div style="margin: 5px 0">翻译</div>
  4973. </div>
  4974. <div class="noCTool">
  4975. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4976. </div>
  4977. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4978. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4979. </div>
  4980. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4981. <img src="../../../assets/icon/checkNo.png" alt
  4982. v-if="itemTool.tool.indexOf(28) == -1" />
  4983. <div class="checkDiv" v-else>
  4984. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4985. </div>
  4986. </div> -->
  4987. </div>
  4988. <div class="tool" :class="{
  4989. isToolChoose:
  4990. itemTool.tool.indexOf(31) != -1,
  4991. }" @click="
  4992. addTools(31, itemTaskIndex, toolIndex)
  4993. ">
  4994. <div class="whiteBIcon" @click.stop="
  4995. addTools(31, itemTaskIndex, toolIndex)
  4996. ">
  4997. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4998. <div style="margin: 5px 0">数字画板</div>
  4999. </div>
  5000. <div class="noCTool">
  5001. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5002. </div>
  5003. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  5004. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5005. </div>
  5006. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5007. <img src="../../../assets/icon/checkNo.png" alt
  5008. v-if="itemTool.tool.indexOf(31) == -1" />
  5009. <div class="checkDiv" v-else>
  5010. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5011. </div>
  5012. </div> -->
  5013. </div>
  5014. <div class="tool" :class="{
  5015. isToolChoose:
  5016. itemTool.tool.indexOf(39) != -1,
  5017. }" @click="
  5018. addTools(39, itemTaskIndex, toolIndex)
  5019. ">
  5020. <div class="whiteBIcon" @click.stop="
  5021. addTools(39, itemTaskIndex, toolIndex)
  5022. ">
  5023. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5024. <div style="margin: 5px 0">GeoGebra</div>
  5025. </div>
  5026. <div class="noCTool">
  5027. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5028. </div>
  5029. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  5030. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5031. </div>
  5032. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5033. <img src="../../../assets/icon/checkNo.png" alt
  5034. v-if="itemTool.tool.indexOf(39) == -1" />
  5035. <div class="checkDiv" v-else>
  5036. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5037. </div>
  5038. </div> -->
  5039. </div>
  5040. <div class="tool" :class="{
  5041. isToolChoose:
  5042. itemTool.tool.indexOf(66) != -1,
  5043. }" @click="
  5044. addTools(66, itemTaskIndex, toolIndex)
  5045. ">
  5046. <div class="whiteBIcon" @click.stop="
  5047. addTools(66, itemTaskIndex, toolIndex)
  5048. ">
  5049. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  5050. <div style="margin: 5px 0">公式编辑</div>
  5051. </div>
  5052. <div class="noCTool">
  5053. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5054. </div>
  5055. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  5056. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5057. </div>
  5058. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  5059. <img src="../../../assets/icon/checkNo.png" alt
  5060. v-if="itemTool.tool.indexOf(66) == -1" />
  5061. <div class="checkDiv" v-else>
  5062. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5063. </div>
  5064. </div> -->
  5065. </div>
  5066. <!-- <div class="tool">
  5067. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  5068. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  5069. <div style="margin: 5px 0">分子结构</div>
  5070. </div>
  5071. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  5072. <img src="../../../assets/icon/checkNo.png" alt
  5073. v-if="itemTool.tool.indexOf(67) == -1" />
  5074. <div class="checkDiv" v-else>
  5075. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5076. </div>
  5077. </div>
  5078. </div> -->
  5079. <div class="tool" :class="{
  5080. isToolChoose:
  5081. itemTool.tool.indexOf(68) != -1,
  5082. }" @click="
  5083. addTools(68, itemTaskIndex, toolIndex)
  5084. ">
  5085. <div class="whiteBIcon" @click.stop="
  5086. addTools(68, itemTaskIndex, toolIndex)
  5087. ">
  5088. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  5089. <div style="margin: 5px 0">时间轴</div>
  5090. </div>
  5091. <div class="noCTool">
  5092. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5093. </div>
  5094. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  5095. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5096. </div>
  5097. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  5098. <img src="../../../assets/icon/checkNo.png" alt
  5099. v-if="itemTool.tool.indexOf(68) == -1" />
  5100. <div class="checkDiv" v-else>
  5101. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5102. </div>
  5103. </div> -->
  5104. </div>
  5105. <div class="tool" :class="{
  5106. isToolChoose:
  5107. itemTool.tool.indexOf(69) != -1,
  5108. }" @click="
  5109. addTools(69, itemTaskIndex, toolIndex)
  5110. ">
  5111. <div class="whiteBIcon" @click.stop="
  5112. openTools(itemTaskIndex, 69, toolIndex)
  5113. ">
  5114. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  5115. <div style="margin: 5px 0">英语写作</div>
  5116. </div>
  5117. <div class="noCTool">
  5118. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5119. </div>
  5120. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  5121. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5122. </div>
  5123. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  5124. <img src="../../../assets/icon/checkNo.png" alt
  5125. v-if="itemTool.tool.indexOf(4) == -1" />
  5126. <div class="checkDiv" v-else>
  5127. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5128. </div>
  5129. </div> -->
  5130. </div>
  5131. <div class="tool" :class="{
  5132. isToolChoose:
  5133. itemTool.tool.indexOf(70) != -1,
  5134. }" @click="
  5135. addTools(70, itemTaskIndex, toolIndex)
  5136. ">
  5137. <div class="whiteBIcon" @click.stop="
  5138. openTools(itemTaskIndex, 70, toolIndex)
  5139. ">
  5140. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  5141. <div style="margin: 5px 0">英语口语</div>
  5142. </div>
  5143. <div class="noCTool">
  5144. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5145. </div>
  5146. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  5147. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5148. </div>
  5149. </div>
  5150. <!-- <div class="tool">
  5151. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  5152. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  5153. <div style="margin: 5px 0">翻译</div>
  5154. </div>
  5155. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5156. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  5157. <div class="checkDiv" v-else>
  5158. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5159. </div>
  5160. </div>
  5161. </div>
  5162. <div class="tool">
  5163. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  5164. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  5165. <div style="margin: 5px 0">魔盒识字</div>
  5166. </div>
  5167. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  5168. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  5169. <div class="checkDiv" v-else>
  5170. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5171. </div>
  5172. </div>
  5173. </div>
  5174. <div class="tool">
  5175. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  5176. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  5177. <div style="margin: 5px 0">24点</div>
  5178. </div>
  5179. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  5180. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  5181. <div class="checkDiv" v-else>
  5182. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5183. </div>
  5184. </div>
  5185. </div>
  5186. <div class="tool">
  5187. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  5188. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5189. <div style="margin: 5px 0">数学画板</div>
  5190. </div>
  5191. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5192. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  5193. <div class="checkDiv" v-else>
  5194. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5195. </div>
  5196. </div>
  5197. </div>
  5198. <div class="tool">
  5199. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  5200. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5201. <div style="margin: 5px 0">GeoGebra</div>
  5202. </div>
  5203. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5204. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  5205. <div class="checkDiv" v-else>
  5206. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5207. </div>
  5208. </div>
  5209. </div>
  5210. <div class="tool">
  5211. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  5212. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  5213. <div style="margin: 5px 0">模拟驾驶</div>
  5214. </div>
  5215. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  5216. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  5217. <div class="checkDiv" v-else>
  5218. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5219. </div>
  5220. </div>
  5221. </div>
  5222. <div class="tool">
  5223. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  5224. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  5225. <div style="margin: 5px 0">路径搜索</div>
  5226. </div>
  5227. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  5228. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  5229. <div class="checkDiv" v-else>
  5230. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5231. </div>
  5232. </div>
  5233. </div>
  5234. <div class="tool">
  5235. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  5236. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  5237. <div style="margin: 5px 0">深度学习</div>
  5238. </div>
  5239. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  5240. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  5241. <div class="checkDiv" v-else>
  5242. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5243. </div>
  5244. </div>
  5245. </div>
  5246. <div class="tool">
  5247. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  5248. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  5249. <div style="margin: 5px 0">全历史</div>
  5250. </div>
  5251. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  5252. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  5253. <div class="checkDiv" v-else>
  5254. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5255. </div>
  5256. </div>
  5257. </div>
  5258. </div>
  5259. <div class="toolSort" v-if="itemTool.toolType == 4">
  5260. <div class="tool">
  5261. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  5262. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  5263. <div style="margin: 5px 0">课程设计</div>
  5264. </div>
  5265. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  5266. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  5267. <div class="checkDiv" v-else>
  5268. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5269. </div>
  5270. </div>
  5271. </div>
  5272. <div class="tool">
  5273. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  5274. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  5275. <div style="margin: 5px 0">目标管理</div>
  5276. </div>
  5277. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  5278. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  5279. <div class="checkDiv" v-else>
  5280. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5281. </div>
  5282. </div>
  5283. </div> -->
  5284. <!-- <div class="tool">
  5285. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  5286. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  5287. <div style="margin: 5px 0">汉字宫</div>
  5288. </div>
  5289. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  5290. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  5291. <div class="checkDiv" v-else>
  5292. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5293. </div>
  5294. </div>
  5295. </div> -->
  5296. </div>
  5297. </div>
  5298. <!-- v-show="!itemTool.isFold3" -->
  5299. <div class="op_tool_box"
  5300. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1"
  5301. element-loading-text="小可正在努力生成中,请稍等...">
  5302. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  5303. class="binfo_input" style="
  5304. margin: 0 0 20px 0;
  5305. width: 100% !important;
  5306. " v-model="itemTool.toolDetail"></textarea>
  5307. <div class="op_box"
  5308. :class="{op_box_isquote: isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]}">
  5309. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  5310. <div class="op_box_right">
  5311. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5312. <div class="r_pub_button_op"
  5313. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)"
  5314. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)">
  5315. 智能优化</div>
  5316. </el-tooltip>
  5317. <el-switch style="margin-left: 10px"
  5318. v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" active-text="引用"
  5319. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  5320. @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  5321. </div>
  5322. </div>
  5323. </div>
  5324. <evaList :toolsData="toolsData" :unitJson="unitJson" :itemTaskIndex="itemTaskIndex"
  5325. :toolIndex="toolIndex" :knowFileids="knowFileids" :languageSetting="languageSetting"
  5326. :userid="userid" :aiJson="aiJson" @addAppendixEva="addAppendixEva"
  5327. @setEvaList="setEvaList" @addCourseBehavior="addCourseBehavior"
  5328. v-if="panTaskElist() == 0 && pjIndex.indexOf(itemTool.tool[0]) != -1"
  5329. :ref="'evalist'+itemTaskIndex+toolIndex"></evaList>
  5330. </div>
  5331. <button class="c_pub_button_add pub_btn_tool_img"
  5332. @click="addToolFun(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具描述-添加按钮`)"
  5333. style="
  5334. margin: 0 auto;
  5335. padding: 0 30px;
  5336. height: 45px;
  5337. ">
  5338. 添加工具
  5339. </button>
  5340. </div>
  5341. </div>
  5342. <div class="elist_css" v-if="panElist(itemTask) > 0">
  5343. <div class="elist_title">
  5344. <div style=" display: flex; flex-direction: row; align-items: center; margin: 20px 0; ">
  5345. <div class="lineTitle clineTitle" style="width: auto">任务评价体系</div>
  5346. </div>
  5347. <div>
  5348. <MindTask :showBar="false" :mindData="itemTask" style="width: 100%"
  5349. :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' "
  5350. :ref="unitIndex + '-' + itemTaskIndex + 'mindTask'"></MindTask>
  5351. </div>
  5352. </div>
  5353. </div>
  5354. <div class="elist_css" v-if="panTaskElist() > 0"
  5355. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])"
  5356. element-loading-text="小可正在努力生成中,请稍等...">
  5357. <div class="elist_title">
  5358. <div style="
  5359. display: flex;
  5360. flex-direction: row;
  5361. align-items: center;
  5362. margin: 20px 0;
  5363. ">
  5364. <div class="lineTitle clineTitle">评价设置</div>
  5365. <div style="margin-left:auto;display: flex;">
  5366. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  5367. v-if="itemTask.eList && itemTask.eList.length">
  5368. <div class="r_pub_button_op"
  5369. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  5370. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  5371. </el-tooltip>
  5372. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  5373. v-if="itemTask.eList && itemTask.eList.length">
  5374. <div class="r_pub_button_op" style="margin-left:10px;"
  5375. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  5376. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  5377. </el-tooltip>
  5378. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5379. <div class="r_pub_button_op" style="margin-left:10px;"
  5380. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  5381. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList &&
  5382. itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
  5383. </el-tooltip>
  5384. </div>
  5385. <!-- <div class="line" style="width: 90%"></div> -->
  5386. </div>
  5387. </div>
  5388. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5389. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5390. 上传补充资料
  5391. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  5392. style="display: none" v-if="inputShow" @change="
  5393. beforeUploadInfo2(
  5394. $event,
  5395. 18,
  5396. itemTaskIndex
  5397. )
  5398. " />
  5399. </button>
  5400. <div style="margin-top: 10px;width:100%"
  5401. v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  5402. <div class="add_chapters_box add_c_none" v-if="
  5403. pingjiaInfoData[itemTaskIndex] &&
  5404. pingjiaInfoData[itemTaskIndex].length == 0
  5405. ">
  5406. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5407. <span>暂时还没有内容,快去添加吧</span>
  5408. </div>
  5409. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5410. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]"
  5411. :key="item1.id" @click="
  5412. getChapterData(
  5413. $event,
  5414. index1,
  5415. item1.type
  5416. )
  5417. ">
  5418. <div class="chapter_upload_o" style="
  5419. position: relative;
  5420. display: flex;
  5421. align-items: center;
  5422. ">
  5423. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5424. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5425. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5426. </div>
  5427. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5428. </div>
  5429. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5430. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5431. </div>
  5432. <div v-if="item1.type == 14" class="chapter_upload_l_i14"
  5433. style="margin-left: 1px">
  5434. </div>
  5435. <div v-if="item1.type == 12" class="chapter_upload_l_i12"
  5436. style="margin-left: 1px">
  5437. </div>
  5438. <div v-if="item1.type == 13" class="chapter_upload_l_i13"
  5439. style="margin-left: 1px">
  5440. </div>
  5441. </div>
  5442. <div class="chapter_upload_n">
  5443. <input readonly="true" v-if="
  5444. item1.type == 2 ||
  5445. item1.type == 3 ||
  5446. item1.type == 12 ||
  5447. item1.type == 13 ||
  5448. item1.type == 7
  5449. " :placeholder="item1.name" @click.stop="
  5450. checkChpater3($event, index1, item1)
  5451. " style="
  5452. border: none;
  5453. outline: none;
  5454. width: 80%;
  5455. minwidth: 215px;
  5456. z-index: 99;
  5457. font-size: 14px;
  5458. white-space: nowrap;
  5459. overflow: hidden;
  5460. text-overflow: ellipsis;
  5461. " />
  5462. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5463. border: none;
  5464. outline: none;
  5465. width: 80%;
  5466. white-space: nowrap;
  5467. overflow: hidden;
  5468. text-overflow: ellipsis;
  5469. " readonly="true" @click="
  5470. selectAttText(index1)
  5471. " />
  5472. <input :placeholder="item1.title ? item1.title : '链接'
  5473. " v-if="item1.type == 8" style="
  5474. border: none;
  5475. outline: none;
  5476. width: 80%;
  5477. white-space: nowrap;
  5478. overflow: hidden;
  5479. text-overflow: ellipsis;
  5480. " readonly="true" @click="selectLine(index1)" />
  5481. <input :placeholder="item1.title ? item1.title : '链接'
  5482. " v-if="item1.type == 14" style="
  5483. border: none;
  5484. outline: none;
  5485. width: 80%;
  5486. white-space: nowrap;
  5487. overflow: hidden;
  5488. text-overflow: ellipsis;
  5489. " readonly="true" @click="
  5490. openUpdateSource(index1)
  5491. " />
  5492. </div>
  5493. <div class="chapter_upload_ic">
  5494. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5495. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5496. checkChpater3($event, index1, item1)
  5497. ">
  5498. <div></div>
  5499. </div>
  5500. <div class="chapter_upload_ic_r" @click.stop="
  5501. deletepingjiaInfoData(
  5502. $event,
  5503. index1,
  5504. itemTaskIndex
  5505. )
  5506. ">
  5507. <div></div>
  5508. </div>
  5509. </div>
  5510. </div>
  5511. </div>
  5512. </div>
  5513. </div>
  5514. <div v-if="
  5515. pingjiainfoproVisible[itemTaskIndex]
  5516. " class="mask">
  5517. <div class="progressBox">
  5518. <div class="lbox">
  5519. <img src="../../../assets/loading.gif" />上传中,请稍后
  5520. </div>
  5521. <div style="margin-bottom: 10px">
  5522. <span>{{
  5523. pingjiainfoisFinishSize[itemTaskIndex]
  5524. }}</span>
  5525. /
  5526. <span>{{
  5527. pingjiainfoisAllSize[itemTaskIndex]
  5528. }}</span>
  5529. </div>
  5530. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5531. ? pingjiainfoprogress[itemTaskIndex]
  5532. : 0
  5533. " style="width: 80%"></el-progress> -->
  5534. </div>
  5535. </div>
  5536. </div>
  5537. <div class="mbCss">
  5538. <div class="pjCss" :style="{
  5539. width: itemTask.isEvaFold
  5540. ? 'calc(100% - 55%)'
  5541. : 'calc(100% - 120px)',
  5542. }">
  5543. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5544. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5545. <div class="elist_inptu_text">
  5546. <span>目标:</span>
  5547. <!-- <span>核心素养:</span> -->
  5548. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标"
  5549. style="width: calc(100% - 280px);" />
  5550. <el-switch @change="forceUpdate" class="rateSwitch" style="margin-left: auto;"
  5551. v-model="itemTask.eList[eIndex].isai" active-color="#0061FF" active-text="AI评分"
  5552. inactive-text="" active-value="1" inactive-value="2">
  5553. </el-switch>
  5554. </div>
  5555. <div class="elist_inptu_text" v-show="false">
  5556. <!-- <span>评价维度:</span> -->
  5557. <span>能力:</span>
  5558. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5559. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5560. <!-- </el-tooltip> -->
  5561. <!-- <span>评星等级:</span>
  5562. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5563. disabled></el-rate> -->
  5564. <div class="remove" @click="
  5565. deletEList(
  5566. unitIndex,
  5567. itemTaskIndex,
  5568. eIndex
  5569. )
  5570. "></div>
  5571. </div>
  5572. <div class="elist_inptu_text">
  5573. <!-- <span>维度描述:</span> -->
  5574. <span>评价标准:</span>
  5575. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5576. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5577. <div class="remove" @click="
  5578. deletEList(
  5579. unitIndex,
  5580. itemTaskIndex,
  5581. eIndex
  5582. )
  5583. "></div>
  5584. <!-- </el-tooltip> -->
  5585. </div>
  5586. <div class="elist_inptu_text" v-if="evalua">
  5587. <span>目标:</span>
  5588. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5589. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5590. @change="forceUpdate()">
  5591. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5592. :value="e.name">
  5593. </el-option>
  5594. </el-select> -->
  5595. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5596. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5597. </div>
  5598. <div class="elist_inptu_text" style="align-items: flex-start;"
  5599. v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]"
  5600. element-loading-text="小可正在努力生成中,请稍等...">
  5601. <span>评价细则:</span>
  5602. <div style="width: calc(100%);">
  5603. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn"
  5604. v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' :
  5605. '展开细则'}}</div>
  5606. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5607. <div class="ruleBtn"
  5608. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5609. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5610. </el-tooltip>
  5611. <div style="width: calc(100%);" class='op_task_box'
  5612. v-if="itemTask.eList[eIndex].isrule">
  5613. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  5614. v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5615. <div class="op_box">
  5616. <div class="op_remark"></div>
  5617. <div class="op_box_right">
  5618. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5619. <div class="r_pub_button_op"
  5620. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5621. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">
  5622. {{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5623. </el-tooltip>
  5624. </div>
  5625. </div>
  5626. </div>
  5627. </div>
  5628. </div>
  5629. </div>
  5630. </div>
  5631. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5632. style="margin: 35px 35px 0 0">
  5633. <div class="addToolImg">
  5634. <img src="../../../assets/icon/add.png" alt />
  5635. </div>
  5636. <div>添加</div>
  5637. </div> -->
  5638. <div class="eva_btn_box">
  5639. <div class="eva_btn_left_box">
  5640. <button class="c_pub_button_add pub_btn_eval_img"
  5641. @click="addEList(unitIndex, itemTaskIndex)">
  5642. 添加
  5643. </button>
  5644. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5645. @click="openEList(unitIndex, itemTaskIndex)">
  5646. 资源
  5647. </button> -->
  5648. </div>
  5649. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5650. v-if="itemTask.eList && itemTask.eList.length">
  5651. 添加资源模板
  5652. </button>
  5653. </div>
  5654. </div>
  5655. <div v-if="evalua" style="
  5656. border: 1px solid #e5e5e5;
  5657. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5658. " :style="{
  5659. width: itemTask.isEvaFold ? '55%' : '116px',
  5660. }" class="evaCss">
  5661. <!-- <div class="e_add_top">
  5662. <div class="e_add_title">
  5663. <span>当前使用目标管理</span>
  5664. <span>{{ eTitle }}</span>
  5665. <img src="../../../assets/line.png" class="cru_line" style="
  5666. width: 125px;
  5667. height: 20px;
  5668. bottom: -10px;
  5669. left: 155px;
  5670. " />
  5671. </div>
  5672. </div> -->
  5673. <div class="e_add_content" style="width: 100%">
  5674. <div class="e_add_list_pbox" style="width: 100%">
  5675. <div class="e_add_list_pbox_title">
  5676. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5677. <div class="type_content" v-if="itemTask.isEvaFold">
  5678. <span :class="{ active: typeMode == 1 }"
  5679. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5680. <span :class="{ active: typeMode == 2 }"
  5681. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5682. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5683. </div>
  5684. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5685. @click="foldEva(itemTaskIndex)">
  5686. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5687. </div>
  5688. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5689. @click="foldEva(itemTaskIndex)">
  5690. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5691. </div>
  5692. </div>
  5693. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5694. style="min-height: 200px">
  5695. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5696. " v-if="typeMode == 1"></Mind>
  5697. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5698. </Sunburst>
  5699. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5700. v-if="typeMode == 3"></SeeBoard>
  5701. </div>
  5702. </div>
  5703. </div>
  5704. </div>
  5705. </div>
  5706. </div>
  5707. <div class="funBlock" style="padding: 0">
  5708. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5709. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5710. <div>
  5711. {{
  5712. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5713. }}
  5714. </div>
  5715. </div>
  5716. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5717. <div>展开</div>
  5718. <div class="arrow">
  5719. <img src="../../../assets/icon/expand.png" alt />
  5720. </div>
  5721. </div> -->
  5722. </div>
  5723. </div>
  5724. </div>
  5725. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5726. <!-- <div>
  5727. <img src="../../../../assets/icon/new/addStage.png" alt />
  5728. <span>添加任务</span>
  5729. </div> -->
  5730. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5731. 添加任务
  5732. </button>
  5733. </div>
  5734. <div class="appendixBox whiteBg taskBorder" style="background: #fff; margin: 10px 0 10px;"
  5735. :style="{ paddingBottom: appendixPan ? '10px' : '0px', minHeight: appendixPan ? '670px' : 'unset' }" v-if="(appendixTaskCheck != 'all' || appendixTypeCheck != 'all') || allFile().length" v-loading="appendixLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5736. <div class="whiteBg" style="border-radius: 0; ">
  5737. <div class="appendix_info_title" style="margin: 0 20px 0 20px;position:relative; padding: 0 0 15px;">
  5738. <span>附件</span>
  5739. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  5740. @click="appendixPan = !appendixPan">{{ appendixPan ? '折叠' : '展开' }}</button>
  5741. </div>
  5742. <div style="width: 100%; box-sizing: border-box;"
  5743. v-show="appendixPan">
  5744. <div class="appendix_check_box">
  5745. <div class="appendix_check_task">
  5746. <span>任务:</span>
  5747. <div class="checkButton" :class="{ checked: appendixTaskCheck == 'all' }" @click="appendixTaskCheck = 'all'">全部</div>
  5748. <div class="checkButton" :class="{ checked: appendixTaskCheck == (tIndex+1) }" @click="appendixTaskCheck = (tIndex+1)" v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0].taskJson" :key="tIndex">任务{{ tIndex+1 }}</div>
  5749. </div>
  5750. <div class="appendix_check_type">
  5751. <span>文件类型:</span>
  5752. <div class="checkButton" :class="{ checked: appendixTypeCheck == 'all' }" @click="appendixTypeCheck = 'all'">全部</div>
  5753. <div class="checkButton" :class="{ checked: appendixTypeCheck == tIndex }" @click="appendixTypeCheck = t.value" v-for="(t, tIndex) in appendixType" :key="tIndex">{{ t.label }}</div>
  5754. </div>
  5755. <div class="appendix_check_all_box">
  5756. <div class="appendix_check_all" v-if="allFile().length" @click="checkAllappendixFile()">
  5757. <div class="chapter_upload_check" :class="{ checked: panAppendixCheckAll() }"></div>
  5758. <div class="appendix_check_all_text">全选</div>
  5759. </div>
  5760. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="exportAppendixFiles">批量下载</button>
  5761. </div>
  5762. </div>
  5763. <div class="appendix_file_box">
  5764. <div class="add_chapters_box" style="display: flex; flex-direction: column">
  5765. <div style="height: 50px; display: flex ; align-items: center; justify-content: center;" v-if="allFile().length == 0 ">
  5766. <span>暂时还没有内容,快去添加吧</span>
  5767. </div>
  5768. <div class="chapter_upload" v-for="(item1, index1) in allFile()" :key="item1.id">
  5769. <div class="chapter_upload_o"
  5770. style=" position: relative; display: flex; align-items: center; ">
  5771. <div class="chapter_upload_check"
  5772. :class="{ checked: appendixFiles.indexOf(item1.url) != -1 }"
  5773. @click="checkAppendixFile(item1.url)"></div>
  5774. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5775. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5776. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5777. </div>
  5778. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5779. </div>
  5780. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5781. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5782. </div>
  5783. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5784. </div>
  5785. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5786. </div>
  5787. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5788. </div>
  5789. </div>
  5790. <div class="chapter_upload_n" style="width: 100%;">
  5791. <div @click.stop="
  5792. checkChpater3($event, index1, item1)
  5793. " v-if="
  5794. item1.type == 2 ||
  5795. item1.type == 3 ||
  5796. item1.type == 12 ||
  5797. item1.type == 13 ||
  5798. item1.type == 7
  5799. " class="chapter_upload_box">{{ item1.name }}</div>
  5800. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  5801. selectAttText(0, index1)
  5802. ">{{ item1.name }}</div>
  5803. <div v-if="item1.type == 8" class="chapter_upload_box"
  5804. @click="selectLine(0, index1)">{{ item1.title ? item1.title : '链接' }}</div>
  5805. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  5806. openUpdateSource(0, index1)
  5807. ">{{ item1.title ? item1.title : '链接' }}</div>
  5808. </div>
  5809. <div class="chapter_upload_ic">
  5810. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5811. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5812. checkChpater3($event, index1, item1)
  5813. ">
  5814. <div></div>
  5815. </div>
  5816. <div class="chapter_upload_ic_download" @click.stop="downloadFile(item1)">
  5817. <div></div>
  5818. </div>
  5819. </div>
  5820. </div>
  5821. </div>
  5822. </div>
  5823. </div>
  5824. </div>
  5825. </div>
  5826. </div>
  5827. </div>
  5828. <div class="info_btnBox3" v-show="istemplate == 1">
  5829. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5830. goTo(
  5831. '/course?userid=' +
  5832. userid +
  5833. '&oid=' +
  5834. oid +
  5835. '&org=' +
  5836. org +
  5837. '&role=' +
  5838. role
  5839. )
  5840. ">
  5841. 返回课程
  5842. </button>
  5843. <button class="c_pub_button_return pub_btn_last_img"
  5844. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5845. {{ steps == 4 ? "返回课程" : "上一步" }}
  5846. </button>
  5847. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5848. pub_btn_next_img: steps != 3,
  5849. pub_btn_finish_img: steps == 3,
  5850. }">
  5851. {{ steps == 3 ? "确认上传" : "下一步" }}
  5852. </button>
  5853. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5854. '修改模板' : '保存模板'}}</button>
  5855. </div>
  5856. </div>
  5857. </div>
  5858. </div>
  5859. </div>
  5860. <div style="
  5861. width: calc(100% - 20px);
  5862. background: rgb(255, 255, 255);
  5863. border-radius: 10px;
  5864. " v-if="steps == 4">
  5865. <div class="basic_box_success">
  5866. <div class="right_img">
  5867. <img src="../../../assets/icon/right.png" alt />
  5868. </div>
  5869. <div style="font-weight: bold">成功</div>
  5870. <!-- <div>您的课程编号</div>
  5871. <div class="number">{{ number }}</div>-->
  5872. <!-- <div class="success_button">
  5873. <div class="look_course" @click="isNoFinsh">
  5874. 邀请老师协同编辑
  5875. </div>
  5876. <div class="attend_others" @click="goCourse">预览课程</div>
  5877. </div> -->
  5878. </div>
  5879. </div>
  5880. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5881. @mouseleave="btnDisplay(false)" v-if="false">
  5882. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5883. goTo(
  5884. '/course?userid=' +
  5885. userid +
  5886. '&oid=' +
  5887. oid +
  5888. '&org=' +
  5889. org +
  5890. '&role=' +
  5891. role
  5892. )
  5893. ">
  5894. 返回课程
  5895. </button>
  5896. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5897. @click="lastSteps">
  5898. {{ steps == 4 ? "返回课程" : "上一步" }}
  5899. </button>
  5900. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5901. pub_btn_next_img: steps != 3,
  5902. pub_btn_finish_img: steps == 3,
  5903. }">
  5904. {{ steps == 3 ? "确认上传" : "下一步" }}
  5905. </button>
  5906. </div>
  5907. </div>
  5908. </div>
  5909. <div class="leftBar" style="height: calc(100% - 36px - 20px);margin-top: 36px;" v-if="istemplate == 1">
  5910. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson"
  5911. v-if="!yiKeTemplateArray.includes(templateid)" />
  5912. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson"
  5913. v-if="!yiKeTemplateArray.includes(templateid)" />
  5914. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson"
  5915. v-if="!yiKeTemplateArray.includes(templateid)" />
  5916. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5917. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson"
  5918. v-if="!yiKeTemplateArray.includes(templateid)" />
  5919. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson"
  5920. v-if="!yiKeTemplateArray.includes(templateid)" />
  5921. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson"
  5922. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5923. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson"
  5924. v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'" />
  5925. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2"
  5926. @setAiJson="setAiJson" />
  5927. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson"
  5928. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5929. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson"
  5930. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5931. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson"
  5932. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5933. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson"
  5934. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5935. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson"
  5936. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5937. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson"
  5938. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5939. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5940. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5941. @setAiJson="setAiJson" /> -->
  5942. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5943. @setAiJson="setAiJson" />
  5944. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5945. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5946. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5947. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5948. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5949. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5950. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5951. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson" />
  5952. </div>
  5953. <div class="leftBar2 resizable" style="height: calc(100% - 36px - 20px);margin-top: 36px;"
  5954. v-show="istemplate != 1 && isDialog == 1 && chatid && isDisplay">
  5955. <div class="resizer"></div>
  5956. <aiBoxRight :languageSetting="languageSetting" :courseId="chatid" :unitJson="unitJson" :quoteArray="isQuote"
  5957. :teacherCourseText="teacherCourseText" :targetCourseText="targetCourseText" :courseText2="courseText"
  5958. :targetCourseText2="targetCourseText2" :cpote="cpote" @addCourseBehavior="addCourseBehavior"
  5959. :fileids='[...knowFileids, ...knowFileids2]' @setIsQuote="setIsQuote" @addChatAppendixFile="addChatAppendixFile"></aiBoxRight>
  5960. </div>
  5961. <div class="close_btn" @click="closeRight" :class="!isDisplay ? 'close_btn_voice' : ''"
  5962. v-show="istemplate != 1 && isDialog == 1 && chatid">
  5963. <img src="../../../assets/icon/course/arrow.svg">
  5964. </div>
  5965. </div>
  5966. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5967. class="dialog_diy2 customWidth">
  5968. <div>请复制该链接邀请协同编辑</div>
  5969. <div>http://www.boomyon.com/index-zhang.com</div>
  5970. <span slot="footer" class="dialog-footer">
  5971. <el-button type="primary">复制链接分享</el-button>
  5972. <el-button @click="dialogVisible = false">取消</el-button>
  5973. </span>
  5974. </el-dialog>
  5975. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5976. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5977. <el-form>
  5978. <el-form-item label="文档标题">
  5979. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5980. </el-form-item>
  5981. <div>文档简介</div>
  5982. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5983. </el-form>
  5984. <span slot="footer" class="dialog-footer">
  5985. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5986. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5987. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5988. </span>
  5989. </el-dialog>
  5990. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5991. :before-close="handleClose" class="dialog_diy">
  5992. <el-form>
  5993. <el-form-item label="文档标题">
  5994. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5995. </el-form-item>
  5996. <div>文档内容</div>
  5997. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5998. </el-form>
  5999. <span slot="footer" class="dialog-footer">
  6000. <el-button @click="clearChoose">取 消</el-button>
  6001. <el-button type="primary" @click="wordNext()">确定</el-button>
  6002. </span>
  6003. </el-dialog>
  6004. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  6005. :before-close="handleClose" class="dialog_diy">
  6006. <el-form>
  6007. <el-form-item label="文本标题">
  6008. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  6009. placeholder="请输入文本标题..."></el-input>
  6010. </el-form-item>
  6011. <!-- <div>富文本内容</div> -->
  6012. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  6013. </el-form>
  6014. <span slot="footer" class="dialog-footer">
  6015. <el-button @click="clearAttText">取 消</el-button>
  6016. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  6017. </span>
  6018. </el-dialog>
  6019. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  6020. :before-close="handleClose" class="dialog_diy lineCss">
  6021. <el-form>
  6022. <el-form-item label="标题" :label-width="formLabelWidth">
  6023. <span>
  6024. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  6025. </span>
  6026. </el-form-item>
  6027. <el-form-item label="链接" :label-width="formLabelWidth">
  6028. <span>
  6029. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  6030. </span>
  6031. </el-form-item>
  6032. </el-form>
  6033. <span slot="footer" class="dialog-footer">
  6034. <el-button @click="clearLine">取 消</el-button>
  6035. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  6036. </span>
  6037. </el-dialog>
  6038. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  6039. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  6040. <div>
  6041. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  6042. </div>
  6043. <span slot="footer" class="dialog-footer">
  6044. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  6045. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  6046. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  6047. </span>
  6048. </el-dialog>
  6049. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  6050. :before-close="handleClose" class="addNewPP customWidth">
  6051. <div class="people">
  6052. <div class="people_top">
  6053. <div class="people_nav">选择成员</div>
  6054. <div class="people_top_right">
  6055. <div class="people_search">
  6056. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  6057. <div class="search_img" @click="searchStudent">
  6058. <img src="../../../assets/icon/search.png" alt />
  6059. </div>
  6060. </div>
  6061. </div>
  6062. </div>
  6063. <el-checkbox-group v-model="checkboxList" class="people_name">
  6064. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  6065. "暂无学生可选" }}</el-checkbox>
  6066. </el-checkbox-group>
  6067. </div>
  6068. <span slot="footer" class="dialog-footer">
  6069. <el-button @click="dialogVisible3 = false">取 消</el-button>
  6070. <el-button type="primary" @click="isAddPP">确定</el-button>
  6071. </span>
  6072. </el-dialog>
  6073. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  6074. :before-close="handleClose" class="addNewPP2">
  6075. <div class="check_classBox">
  6076. <div class="check_class_right">
  6077. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  6078. 全部
  6079. </div>
  6080. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  6081. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  6082. {{ item.name }}
  6083. </div>
  6084. </el-tooltip>
  6085. </div>
  6086. <div class="check_class_left">
  6087. <div class="check_class_all_box">
  6088. <div class="check_class_left_title">选择班级</div>
  6089. <div style="display: flex; align-items: center; margin-left: auto">
  6090. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  6091. </div>
  6092. </div>
  6093. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  6094. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  6095. </div> -->
  6096. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  6097. v-if="grade2.length">
  6098. <div v-for="item in grade2" :key="item.id" class="class_item">
  6099. <el-checkbox :label="item.id">
  6100. {{ item.name }}
  6101. </el-checkbox>
  6102. </div>
  6103. </el-checkbox-group>
  6104. <div v-if="!grade2.length">暂无数据</div>
  6105. </div>
  6106. </div>
  6107. <span slot="footer" class="dialog-footer">
  6108. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  6109. <el-button type="primary" @click="isAddClass">确定</el-button>
  6110. </span>
  6111. </el-dialog>
  6112. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  6113. :before-close="handleClose" class="addNewPP customWidth">
  6114. <div style="display: flex;justify-content: space-between;">
  6115. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  6116. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  6117. 全部
  6118. </div>
  6119. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  6120. v-for="(i) in CollaborativeTeaList" :key="i.id">
  6121. <el-tooltip placement="top" :content="i.name">
  6122. <span>{{i.name}}</span>
  6123. </el-tooltip>
  6124. </div>
  6125. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  6126. 其他
  6127. </div>
  6128. </div>
  6129. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  6130. <div class="people">
  6131. <div class="people_top">
  6132. <div class="people_top_right">
  6133. <div class="people_search">
  6134. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  6135. <div class="search_img" @click="getTeacher(collid)">
  6136. <img src="../../../assets/icon/search.png" alt />
  6137. </div>
  6138. </div>
  6139. </div>
  6140. <div class="people_nav" style="display: flex; align-items: center">
  6141. <div class="check_class_left_title">选择成员</div>
  6142. <div style="display: flex; align-items: center; margin-left: auto">
  6143. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  6144. </div>
  6145. </div>
  6146. </div>
  6147. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  6148. @change="InviteChange2">
  6149. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  6150. <div class="t_j_box">
  6151. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  6152. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  6153. </el-tooltip>
  6154. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  6155. <span>{{ item.username.split('@')[0] }}</span>
  6156. </el-tooltip>
  6157. <el-tooltip placement="top" :content="item.school">
  6158. <span>{{ item.school }}</span>
  6159. </el-tooltip>
  6160. </div>
  6161. </el-checkbox>
  6162. </el-checkbox-group>
  6163. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  6164. </div>
  6165. </div>
  6166. </div>
  6167. <span slot="footer" class="dialog-footer">
  6168. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  6169. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  6170. </span>
  6171. </el-dialog>
  6172. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  6173. closePan(4);
  6174. }
  6175. " class="dialog_diy fullStyle">
  6176. <div style="height: 100%">
  6177. <div class="a_add_title" style="
  6178. display: flex;
  6179. flex-direction: row;
  6180. align-items: center;
  6181. justify-content: center;
  6182. ">
  6183. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  6184. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6185. </div>
  6186. <div class="a_addBox" style="height: calc(100% - 50px)">
  6187. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  6188. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  6189. <div class="a_add_checkType">
  6190. <span :class="{
  6191. active:
  6192. askJson.askJson[index1].type == '1' ||
  6193. !askJson.askJson[index1].type,
  6194. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  6195. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  6196. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  6197. </div>
  6198. <div class="a_add_head">
  6199. <div style="
  6200. display: flex;
  6201. align-items: center;
  6202. width: 100%;
  6203. margin-right: 20px;
  6204. ">
  6205. <span style="min-width: fit-content">{{
  6206. index1 + 1 + "、"
  6207. }}</span>
  6208. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6209. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  6210. $forceUpdate();
  6211. }
  6212. "></textarea>
  6213. </div>
  6214. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  6215. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  6216. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  6217. </div>
  6218. <div class="a_add_head_div">
  6219. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  6220. </el-button>
  6221. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  6222. </div>
  6223. </div>
  6224. <div class="a_add_body">
  6225. <div class="a_add_input" style="flex-direction: column">
  6226. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  6227. margin: 20px 10px 0 0;
  6228. display: flex;
  6229. align-items: center;
  6230. position: relative;
  6231. ">
  6232. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  6233. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6234. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  6235. @change="() => {
  6236. $forceUpdate();
  6237. }
  6238. "></textarea>
  6239. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  6240. v-if="askJson.askJson[index1].askItem != 1">
  6241. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  6242. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  6243. </div>
  6244. <div class="a_add_body_div">
  6245. <el-button type="primary" size="small"
  6246. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  6247. <el-button type="primary" size="small" @click="
  6248. deletecheckList(askJson.askJson[index1], checkIndex)
  6249. " v-if="askJson.askJson[index1].askItem != 1">删除
  6250. </el-button>
  6251. </div>
  6252. </div>
  6253. </div>
  6254. <!-- <div class="a_add_body_div">
  6255. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  6256. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  6257. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  6258. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  6259. </el-button>
  6260. </div> -->
  6261. </div>
  6262. </div>
  6263. </div>
  6264. </div>
  6265. <span slot="footer" class="dialog-footer">
  6266. <el-button @click="closePan(4)">取 消</el-button>
  6267. <el-button type="primary" @click="addAsk">确 定</el-button>
  6268. </span>
  6269. </el-dialog>
  6270. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  6271. closePan(45);
  6272. }
  6273. " class="dialog_diy fullStyle">
  6274. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  6275. <!-- <div class="a_add_title" style="
  6276. display: flex;
  6277. flex-direction: row;
  6278. align-items: center;
  6279. justify-content: center;
  6280. ">
  6281. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  6282. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6283. </div> -->
  6284. <div class="a_addBox" style="height: 100%">
  6285. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  6286. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  6287. 上传补充资料
  6288. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none"
  6289. v-if="inputShow" @change="
  6290. beforeUploadInfo2(
  6291. $event,
  6292. 17
  6293. )
  6294. " />
  6295. </button>
  6296. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  6297. <div class="add_chapters_box add_c_none" v-if="
  6298. xuanzeInfoData &&
  6299. xuanzeInfoData.length == 0
  6300. ">
  6301. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  6302. <span>暂时还没有内容,快去添加吧</span>
  6303. </div>
  6304. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  6305. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  6306. getChapterData(
  6307. $event,
  6308. index1,
  6309. item1.type
  6310. )
  6311. ">
  6312. <div class="chapter_upload_o" style="
  6313. position: relative;
  6314. display: flex;
  6315. align-items: center;
  6316. ">
  6317. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  6318. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  6319. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  6320. </div>
  6321. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  6322. </div>
  6323. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  6324. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  6325. </div>
  6326. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  6327. </div>
  6328. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  6329. </div>
  6330. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  6331. </div>
  6332. </div>
  6333. <div class="chapter_upload_n">
  6334. <input readonly="true" v-if="
  6335. item1.type == 2 ||
  6336. item1.type == 3 ||
  6337. item1.type == 12 ||
  6338. item1.type == 13 ||
  6339. item1.type == 7
  6340. " :placeholder="item1.name" @click.stop="
  6341. checkChpater3($event, index1, item1)
  6342. " style="
  6343. border: none;
  6344. outline: none;
  6345. width: 80%;
  6346. minwidth: 215px;
  6347. z-index: 99;
  6348. font-size: 14px;
  6349. white-space: nowrap;
  6350. overflow: hidden;
  6351. text-overflow: ellipsis;
  6352. " />
  6353. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  6354. border: none;
  6355. outline: none;
  6356. width: 80%;
  6357. white-space: nowrap;
  6358. overflow: hidden;
  6359. text-overflow: ellipsis;
  6360. " readonly="true" @click="
  6361. selectAttText(index1)
  6362. " />
  6363. <input :placeholder="item1.title ? item1.title : '链接'
  6364. " v-if="item1.type == 8" style="
  6365. border: none;
  6366. outline: none;
  6367. width: 80%;
  6368. white-space: nowrap;
  6369. overflow: hidden;
  6370. text-overflow: ellipsis;
  6371. " readonly="true" @click="selectLine(index1)" />
  6372. <input :placeholder="item1.title ? item1.title : '链接'
  6373. " v-if="item1.type == 14" style="
  6374. border: none;
  6375. outline: none;
  6376. width: 80%;
  6377. white-space: nowrap;
  6378. overflow: hidden;
  6379. text-overflow: ellipsis;
  6380. " readonly="true" @click="
  6381. openUpdateSource(index1)
  6382. " />
  6383. </div>
  6384. <div class="chapter_upload_ic">
  6385. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  6386. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  6387. checkChpater3($event, index1, item1)
  6388. ">
  6389. <div></div>
  6390. </div>
  6391. <div class="chapter_upload_ic_r" @click.stop="
  6392. deletexuanzeInfoData(
  6393. $event,
  6394. index1
  6395. )
  6396. ">
  6397. <div></div>
  6398. </div>
  6399. </div>
  6400. </div>
  6401. </div>
  6402. </div>
  6403. </div>
  6404. <div v-if="
  6405. xuanzeinfoproVisible
  6406. " class="mask">
  6407. <div class="progressBox">
  6408. <div class="lbox">
  6409. <img src="../../../assets/loading.gif" />上传中,请稍后
  6410. </div>
  6411. <div style="margin-bottom: 10px">
  6412. <span>{{
  6413. xuanzeinfoisFinishSize
  6414. }}</span>
  6415. /
  6416. <span>{{
  6417. xuanzeinfoisAllSize
  6418. }}</span>
  6419. </div>
  6420. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  6421. ? xuanzeinfoprogress
  6422. : 0
  6423. " style="width: 80%"></el-progress> -->
  6424. </div>
  6425. </div>
  6426. </div>
  6427. <div style="
  6428. font-size: 16px;
  6429. color: #c7c7c7;
  6430. display: flex;
  6431. align-items: center;
  6432. justify-content: flex-end;
  6433. ">
  6434. <!-- 请输入题目内容 -->
  6435. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  6436. 智能生成
  6437. </button>
  6438. <!-- 请输入题目内容 -->
  6439. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  6440. v-if="isPasteChoice">
  6441. 智能粘贴
  6442. </button>
  6443. </div>
  6444. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  6445. <div class="a_add_checkType">
  6446. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  6447. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  6448. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  6449. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  6450. </div>
  6451. <div class="a_add_head">
  6452. <div class="timuUpImg">
  6453. <div style="display: flex; align-items: center">
  6454. <span style="min-width: fit-content">{{
  6455. index1 + 1 + "、"
  6456. }}</span>
  6457. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  6458. placeholder="请输入题目">
  6459. </el-input> -->
  6460. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6461. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  6462. $forceUpdate();
  6463. }
  6464. "></textarea>
  6465. </div>
  6466. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  6467. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  6468. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  6469. </div>
  6470. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  6471. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6472. <input type="file" accept="image/*" style="display: none"
  6473. @change="beforeUploadTiMu($event, index1)" />
  6474. </div>
  6475. </div>
  6476. <div class="a_add_head_div">
  6477. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  6478. </el-button>
  6479. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  6480. </div>
  6481. </div>
  6482. <div class="timuImgBox" v-if="
  6483. testJson.testJson[index1].timuList &&
  6484. testJson.testJson[index1].timuList.length
  6485. ">
  6486. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  6487. @click.stop="previewImg(timg.src)">
  6488. <img :src="timg.src" alt="" />
  6489. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  6490. <img src="../../../assets/icon/delete.png" alt="" />
  6491. </div>
  6492. </div>
  6493. </div>
  6494. <div class="a_add_body">
  6495. <div class="a_add_input a_add_input_choice">
  6496. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  6497. @change="() => {
  6498. $forceUpdate();
  6499. }
  6500. ">
  6501. <div class="radioBox">
  6502. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  6503. .testItem" :key="checkIndex" :label="checkIndex">
  6504. <div style="margin-right: 10px">
  6505. 选项{{ checkIndex + 1 }}
  6506. </div>
  6507. <div style="margin-right: 10px; width: 300px" v-if="
  6508. testJson.testJson[index1].checkList[checkIndex] &&
  6509. testJson.testJson[index1].checkList[checkIndex]
  6510. .imgType &&
  6511. testJson.testJson[index1].checkList[checkIndex]
  6512. .imgType == 1
  6513. ">
  6514. <div class="inImg" @click.stop="
  6515. previewImg(
  6516. testJson.testJson[index1].checkList[checkIndex]
  6517. .src
  6518. )
  6519. ">
  6520. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  6521. .src
  6522. " lazy />
  6523. <!-- <img :src="
  6524. testJson.testJson[index1].checkList[checkIndex]
  6525. .src
  6526. " alt="" /> -->
  6527. </div>
  6528. </div>
  6529. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  6530. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6531. $forceUpdate();
  6532. }
  6533. "></textarea>
  6534. <div class="xzUpImg" @click.stop="addImg($event)">
  6535. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6536. <input type="file" accept="image/*" style="display: none"
  6537. @change="beforeUploadTi($event, index1, checkIndex)" />
  6538. </div>
  6539. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6540. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  6541. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  6542. </div>
  6543. <div class="a_add_body_div">
  6544. <el-button type="primary" size="small" @click.stop="
  6545. addTcheckList(testJson.testJson[index1], checkIndex)
  6546. ">添加</el-button>
  6547. <el-button type="primary" size="small" @click.stop="
  6548. deleteTcheckList(
  6549. testJson.testJson[index1],
  6550. checkIndex
  6551. )
  6552. " v-if="testJson.testJson[index1].testItem != 1">删除
  6553. </el-button>
  6554. </div>
  6555. </el-radio>
  6556. </div>
  6557. </el-radio-group>
  6558. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6559. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6560. $forceUpdate();
  6561. }
  6562. ">
  6563. <div class="radioBox">
  6564. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6565. .testItem" :key="checkIndex1" :label="checkIndex1">
  6566. <div style="margin-right: 10px">
  6567. 选项{{ checkIndex1 + 1 }}
  6568. </div>
  6569. <div style="margin-right: 10px; width: 300px" v-if="
  6570. testJson.testJson[index1].checkList[checkIndex1] &&
  6571. testJson.testJson[index1].checkList[checkIndex1]
  6572. .imgType &&
  6573. testJson.testJson[index1].checkList[checkIndex1]
  6574. .imgType == 1
  6575. ">
  6576. <div class="inImg" @click.stop="
  6577. previewImg(
  6578. testJson.testJson[index1].checkList[checkIndex1]
  6579. .src
  6580. )
  6581. ">
  6582. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6583. .src
  6584. " lazy />
  6585. <!-- <img :src="
  6586. testJson.testJson[index1].checkList[checkIndex1]
  6587. .src
  6588. " alt="" /> -->
  6589. </div>
  6590. </div>
  6591. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6592. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6593. $forceUpdate();
  6594. }
  6595. "></textarea>
  6596. <div class="xzUpImg" @click.stop="addImg($event)">
  6597. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6598. <input type="file" accept="image/*" style="display: none"
  6599. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6600. </div>
  6601. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6602. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6603. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6604. </div>
  6605. <div class="a_add_body_div">
  6606. <el-button type="primary" size="small" @click.stop="
  6607. addTcheckList(
  6608. testJson.testJson[index1],
  6609. checkIndex1
  6610. )
  6611. ">添加</el-button>
  6612. <el-button type="primary" size="small" @click.stop="
  6613. deleteTcheckList(
  6614. testJson.testJson[index1],
  6615. checkIndex1
  6616. )
  6617. " v-if="testJson.testJson[index1].testItem != 1">删除
  6618. </el-button>
  6619. </div>
  6620. </el-checkbox>
  6621. </div>
  6622. </el-checkbox-group>
  6623. </div>
  6624. <!-- <div class="a_add_body_div">
  6625. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6626. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6627. v-if="testJson.testJson[index1].testItem != 1">删除
  6628. </el-button>
  6629. </div> -->
  6630. </div>
  6631. </div>
  6632. </div>
  6633. </div>
  6634. <span slot="footer" class="dialog-footer">
  6635. <el-button @click="closePan(45)">取 消</el-button>
  6636. <el-button type="primary" @click="addTest">确 定</el-button>
  6637. </span>
  6638. </el-dialog>
  6639. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6640. :before-close="handleClose" class="dialog_diy addToolsDia">
  6641. <div class="toolChoose">
  6642. <div class="tools">
  6643. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6644. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6645. <div style="
  6646. display: flex;
  6647. flex-direction: row;
  6648. align-items: baseline;
  6649. flex-wrap: nowrap;
  6650. justify-content: flex-start;
  6651. position: relative;
  6652. ">
  6653. <div class="chooseWho">
  6654. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6655. 互动类
  6656. </div>
  6657. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6658. 思维类
  6659. </div>
  6660. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6661. 评价类
  6662. </div>
  6663. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6664. 其他
  6665. </div>
  6666. </div>
  6667. </div>
  6668. <div style="min-height: 163px">
  6669. <div class="toolSort" v-if="chapToolsType == 0">
  6670. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6671. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6672. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6673. <div style="margin: 5px 0">素材库</div>
  6674. </div>
  6675. <div class="noCTool">
  6676. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6677. </div>
  6678. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6679. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6680. </div>
  6681. <!-- <div class="check" @click="chapAddTools(8)">
  6682. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6683. <div class="checkDiv" v-else>
  6684. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6685. </div>
  6686. </div> -->
  6687. </div>
  6688. </div>
  6689. <div class="toolSort" v-if="chapToolsType == 1">
  6690. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6691. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6692. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6693. <div style="margin: 5px 0">思维网格</div>
  6694. </div>
  6695. <div class="noCTool">
  6696. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6697. </div>
  6698. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6699. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6700. </div>
  6701. <!-- <div class="check" @click="chapAddTools(7)">
  6702. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6703. <div class="checkDiv" v-else>
  6704. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6705. </div>
  6706. </div> -->
  6707. </div>
  6708. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6709. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6710. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6711. <div style="margin: 5px 0">电子白板</div>
  6712. </div>
  6713. <div class="noCTool">
  6714. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6715. </div>
  6716. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6717. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6718. </div>
  6719. <!-- <div class="check" @click="chapAddTools(1)">
  6720. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6721. <div class="checkDiv" v-else>
  6722. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6723. </div>
  6724. </div> -->
  6725. </div>
  6726. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6727. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6728. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6729. <div style="margin: 5px 0">便签</div>
  6730. </div>
  6731. <div class="noCTool">
  6732. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6733. </div>
  6734. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6735. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6736. </div>
  6737. <!-- <div class="check" @click="chapAddTools(2)">
  6738. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6739. <div class="checkDiv" v-else>
  6740. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6741. </div>
  6742. </div> -->
  6743. </div>
  6744. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6745. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6746. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6747. <div style="margin: 5px 0">协同文档</div>
  6748. </div>
  6749. <div class="noCTool">
  6750. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6751. </div>
  6752. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6753. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6754. </div>
  6755. <!-- <div class="check" @click="chapAddTools(6)">
  6756. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6757. <div class="checkDiv" v-else>
  6758. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6759. </div>
  6760. </div> -->
  6761. </div>
  6762. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6763. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6764. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6765. <div style="margin: 5px 0">思维导图</div>
  6766. </div>
  6767. <div class="noCTool">
  6768. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6769. </div>
  6770. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6771. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6772. </div>
  6773. <!-- <div class="check" @click="chapAddTools(3)">
  6774. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6775. <div class="checkDiv" v-else>
  6776. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6777. </div>
  6778. </div> -->
  6779. </div>
  6780. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6781. @click="chapAddTools(31)">
  6782. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6783. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6784. <div style="margin: 5px 0">数学画板</div>
  6785. </div>
  6786. <div class="noCTool">
  6787. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6788. </div>
  6789. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6790. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6791. </div>
  6792. <!-- <div class="check" @click="chapAddTools(31)">
  6793. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6794. <div class="checkDiv" v-else>
  6795. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6796. </div>
  6797. </div> -->
  6798. </div>
  6799. </div>
  6800. <div class="toolSort" v-if="chapToolsType == 2">
  6801. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6802. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6803. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6804. <div style="margin: 5px 0">量规评分</div>
  6805. </div>
  6806. <div class="noCTool">
  6807. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6808. </div>
  6809. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6810. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6811. </div>
  6812. <!-- <div class="check" @click="chapAddTools(5)">
  6813. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6814. <div class="checkDiv" v-else>
  6815. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6816. </div>
  6817. </div> -->
  6818. </div>
  6819. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6820. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6821. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6822. <div style="margin: 5px 0">问卷调查</div>
  6823. </div>
  6824. <div class="noCTool">
  6825. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6826. </div>
  6827. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6828. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6829. </div>
  6830. <!-- <div class="check" @click="chapAddTools(4)">
  6831. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6832. <div class="checkDiv" v-else>
  6833. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6834. </div>
  6835. </div> -->
  6836. </div>
  6837. </div>
  6838. </div>
  6839. <div>
  6840. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6841. v-model="itemTools.toolDetail" />
  6842. </div>
  6843. </div>
  6844. </div>
  6845. </div>
  6846. <span slot="footer" class="dialog-footer">
  6847. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6848. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6849. </span>
  6850. </el-dialog>
  6851. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6852. closePan(15);
  6853. }
  6854. " class="dialog_diy">
  6855. <div>
  6856. <div class="a_add_title" style="
  6857. display: flex;
  6858. flex-direction: column;
  6859. align-items: flex-start;
  6860. justify-content: center;
  6861. ">
  6862. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6863. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6864. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6865. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6866. </div>
  6867. </div>
  6868. <span slot="footer" class="dialog-footer">
  6869. <el-button @click="closePan(15)">取 消</el-button>
  6870. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6871. </span>
  6872. </el-dialog>
  6873. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6874. :before-close="handleClose" class="dialog_diy">
  6875. <div>
  6876. <div class="a_add_title" style="
  6877. display: flex;
  6878. flex-direction: column;
  6879. align-items: flex-start;
  6880. justify-content: center;
  6881. ">
  6882. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6883. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6884. </div>
  6885. </div>
  6886. <span slot="footer" class="dialog-footer">
  6887. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6888. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6889. </span>
  6890. </el-dialog>
  6891. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6892. :before-close="handleClose" class="dialog_diy">
  6893. <div>
  6894. <div class="fileCss" style="padding-top: 20px">
  6895. <div>
  6896. <button class="info_btn" @click="addImg($event)">
  6897. 选择本地文件
  6898. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6899. </button>
  6900. <div class="spanName">选择本地文件</div>
  6901. </div>
  6902. <!-- <div>
  6903. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6904. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6905. <img :src="cover[0].url" alt="" />
  6906. <div class="deletePic" @click="deleteSysPic">
  6907. <img src="../../../assets/icon/delete.png" alt="" />
  6908. </div>
  6909. </div>
  6910. <div class="spanName">选择系统文件</div>
  6911. </div> -->
  6912. <div>
  6913. <el-button @click="(searchImageValue = courseName), resetImage()"
  6914. v-if="isSysPic2 == false">选择网络文件</el-button>
  6915. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6916. <img :src="cover[0].url" alt="" />
  6917. <div class="deletePic" @click="deleteSysPic">
  6918. <img src="../../../assets/icon/delete.png" alt="" />
  6919. </div>
  6920. </div>
  6921. <div class="spanName">选择网络文件</div>
  6922. </div>
  6923. </div>
  6924. <!-- <div class="fileCss">
  6925. </div> -->
  6926. </div>
  6927. <span slot="footer" class="dialog-footer">
  6928. <el-button @click="choosePicVisible = false">取 消</el-button>
  6929. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6930. </span>
  6931. </el-dialog>
  6932. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6933. :before-close="handleClose" class="dialog_diy">
  6934. <div class="cru_selectBox" style="margin: 0">
  6935. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6936. 绘画
  6937. </div>
  6938. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6939. 科技
  6940. </div>
  6941. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6942. 人文
  6943. </div>
  6944. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6945. 艺术
  6946. </div>
  6947. </div>
  6948. <div class="sysPicBox">
  6949. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6950. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6951. </div>
  6952. </div>
  6953. </el-dialog>
  6954. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6955. :before-close="handleClose" class="dialog_diy">
  6956. <div>
  6957. <div class="people_top_right" style="display: flex; align-items: center">
  6958. <div style="position: relative; width: 100%">
  6959. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6960. @keyup.enter.native="resetImage()"></el-input>
  6961. <div class="search_img" @click="resetImage" style="right: 10px">
  6962. <img src="../../../assets/icon/search.png" alt />
  6963. </div>
  6964. </div>
  6965. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6966. </div>
  6967. <div class="sysPicBox" v-loading="imageloading">
  6968. <div class="picNone" v-if="!imageList.length">
  6969. 请输入关键词搜索图片
  6970. </div>
  6971. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6972. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6973. </div>
  6974. </div>
  6975. </div>
  6976. </el-dialog>
  6977. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6978. closePan(41);
  6979. }
  6980. " class="dialog_diy dialog_diy3 fullStyle">
  6981. <div v-if="selectJson" style="height: 100%">
  6982. <div class="select_box1" v-if="selectSteps == 1">
  6983. <div class="select_box1_img">
  6984. <div class="select_box1_title">
  6985. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6986. </div>
  6987. <div class="select_box1_add_img">
  6988. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6989. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6990. <img src="../../../assets/icon/addPoster.png" alt="" />
  6991. </div>
  6992. <div class="isSysPic" v-else>
  6993. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6994. <div class="deletePic" @click="deleteSelectPic">
  6995. <img src="../../../assets/icon/delete.png" alt="" />
  6996. </div>
  6997. </div>
  6998. </div>
  6999. </div>
  7000. <div class="select_box1_select">
  7001. <div class="select_box1_title">
  7002. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  7003. </div>
  7004. <div class="select_box1_select_box">
  7005. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  7006. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  7007. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  7008. <div class="select_box1_select_box_add">
  7009. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  7010. 添加</el-button>
  7011. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  7012. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  7013. </div>
  7014. </div>
  7015. </div>
  7016. </div>
  7017. <div v-if="selectSteps == 2" style="height: 100%">
  7018. <div class="select_box2">
  7019. <div class="select_box2_title">设置每道题目的正确选项</div>
  7020. <div class="select_box2_box">
  7021. <div class="select_box2_img">
  7022. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  7023. </div>
  7024. <div class="select_box2_answer">
  7025. <div class="select_answer_title">根据题目选择对应答案</div>
  7026. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  7027. <span>{{ checkIndex + 1 }}、</span>
  7028. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  7029. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  7030. </el-option>
  7031. </el-select>
  7032. </div>
  7033. </div>
  7034. </div>
  7035. </div>
  7036. </div>
  7037. </div>
  7038. <span slot="footer" class="dialog-footer">
  7039. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  7040. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  7041. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  7042. </span>
  7043. </el-dialog>
  7044. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  7045. :before-close="handleClose" class="dialog_diy">
  7046. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  7047. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  7048. <div class="pjCss" style="width: 100%">
  7049. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  7050. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  7051. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  7052. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  7053. <div class="remove" @click="deletRateList(eIndex)"></div>
  7054. <div style="width: 100%; display: flex">
  7055. <span style="min-width: 100px; text-align: right">评星等级:</span>
  7056. <el-rate v-model="eItem.score" disabled></el-rate>
  7057. </div>
  7058. <div class="elist_inptu_text" style="align-items: flex-start">
  7059. <span style="min-width: 100px; text-align: right">描述:</span>
  7060. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  7061. </div>
  7062. </div>
  7063. </div>
  7064. <div class="addToolFun" @click="addRateList()">
  7065. <div class="addToolImg">
  7066. <img src="../../../assets/icon/add.png" alt />
  7067. </div>
  7068. <div>添加</div>
  7069. </div>
  7070. </div>
  7071. </div>
  7072. <span slot="footer" class="dialog-footer">
  7073. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  7074. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  7075. </span>
  7076. </el-dialog>
  7077. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  7078. closePan(47);
  7079. }
  7080. " class="dialog_diy dialog_diy3 fullStyle">
  7081. <div style="height: 100%">
  7082. <div class="sentenBox" style="height: 100%">
  7083. <div class="addSen" @click="addSt">添加题目</div>
  7084. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  7085. <div class="sentenTopBox">
  7086. <div class="sentenTop" :index="stIndex + 1">
  7087. <div>题目设置</div>
  7088. <div>
  7089. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  7090. </div>
  7091. <div @click="addSen(stIndex)">添加</div>
  7092. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  7093. </div>
  7094. </div>
  7095. <div class="cardList">
  7096. <div v-if="st.addSentence.length > 0" class="cardBox">
  7097. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  7098. @click="setRightAnswer(s, stIndex, sIndex)">
  7099. <el-tooltip class="item" effect="light" :content="s" placement="top">
  7100. <div>{{ s }}</div>
  7101. </el-tooltip>
  7102. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  7103. <img src="../../../assets/icon/delete.png" alt="" />
  7104. </div>
  7105. </div>
  7106. </div>
  7107. <div class="card">
  7108. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  7109. </div>
  7110. </div>
  7111. <div class="rightCardBox">
  7112. <div>正确顺序</div>
  7113. <div class="rightCardList">
  7114. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  7115. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  7116. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  7117. <el-tooltip class="item" effect="light" :content="r" placement="top">
  7118. <div>{{ r }}</div>
  7119. </el-tooltip>
  7120. </div>
  7121. <div>{{ rIndex + 1 }}</div>
  7122. </div>
  7123. </div>
  7124. <div class="card" v-if="st.rightAnswer.length == 0">
  7125. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  7126. </div>
  7127. <div class="card" v-else>
  7128. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  7129. </div>
  7130. </div>
  7131. </div>
  7132. </div>
  7133. </div>
  7134. </div>
  7135. <span slot="footer" class="dialog-footer">
  7136. <el-button @click="closePan(47)">取 消</el-button>
  7137. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  7138. </span>
  7139. </el-dialog>
  7140. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  7141. :before-close="handleClose" class="dialog_diy">
  7142. <el-form>
  7143. <!-- <el-form-item label="文本标题">
  7144. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7145. </el-form-item> -->
  7146. <div>表格内容</div>
  7147. <Table v-model="tableJson.text" @change="change"></Table>
  7148. </el-form>
  7149. <span slot="footer" class="dialog-footer">
  7150. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  7151. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  7152. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  7153. </span>
  7154. </el-dialog>
  7155. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  7156. :before-close="handleClose" class="dialog_diy">
  7157. <el-form>
  7158. <!-- <el-form-item label="文本标题">
  7159. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7160. </el-form-item> -->
  7161. <div>文档内容</div>
  7162. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  7163. </el-form>
  7164. <span slot="footer" class="dialog-footer">
  7165. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  7166. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  7167. </span>
  7168. </el-dialog>
  7169. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  7170. :before-close="handleClose" class="dialog_diy">
  7171. <div style="
  7172. width: 100%;
  7173. display: flex;
  7174. flex-direction: row;
  7175. flex-wrap: nowrap;
  7176. align-items: center;
  7177. justify-content: center;
  7178. ">
  7179. <div>班级:</div>
  7180. <el-select multiple v-model="uploadJson" placeholder="请选择">
  7181. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  7182. </el-option>
  7183. </el-select>
  7184. </div>
  7185. <span slot="footer" class="dialog-footer">
  7186. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  7187. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  7188. </span>
  7189. </el-dialog>
  7190. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  7191. :before-close="handleClose" class="dialog_diy">
  7192. <div style="
  7193. width: 100%;
  7194. display: flex;
  7195. flex-direction: row;
  7196. flex-wrap: nowrap;
  7197. align-items: center;
  7198. justify-content: center;
  7199. ">
  7200. <div>随机码:</div>
  7201. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  7202. </div>
  7203. <span slot="footer" class="dialog-footer">
  7204. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  7205. <el-button type="primary" @click="addInvite">确定</el-button>
  7206. </span>
  7207. </el-dialog>
  7208. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  7209. :before-close="handleClose" class="dialog_diy">
  7210. <div>
  7211. <div style="margin-bottom: 20px; color: #999">
  7212. 提示:点击“+”或“-”修改倒计时时长。
  7213. </div>
  7214. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  7215. </div>
  7216. <span slot="footer" class="dialog-footer">
  7217. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  7218. <el-button type="primary" @click="addPreTime">确定</el-button>
  7219. </span>
  7220. </el-dialog>
  7221. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  7222. :before-close="handleClose" class="dialog_diy">
  7223. <div>
  7224. <div style="
  7225. width: 100%;
  7226. display: flex;
  7227. flex-direction: row;
  7228. flex-wrap: nowrap;
  7229. align-content: center;
  7230. align-items: center;
  7231. justify-content: space-between;
  7232. ">
  7233. <div style="
  7234. display: flex;
  7235. flex-flow: row nowrap;
  7236. align-items: flex-start;
  7237. width: 100%;
  7238. flex-direction: column;
  7239. flex-wrap: nowrap;
  7240. position: relative;
  7241. ">
  7242. <div class="e_box">
  7243. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  7244. <div class="e_card_picture">
  7245. <img src="../../../assets/e_picture.png" />
  7246. </div>
  7247. <div class="e_card_name">
  7248. <span>{{ item.title }}</span>
  7249. </div>
  7250. <div class="e_card_btn">
  7251. <span @click="checkEva(item.id, 2)">导入</span>
  7252. </div>
  7253. </div> -->
  7254. <!-- <div class="addEva" @click="openT">
  7255. <img src="../../../assets/icon/addEva.png" alt="" />
  7256. </div> -->
  7257. <div style="
  7258. display: flex;
  7259. justify-content: flex-end;
  7260. margin-bottom: 10px;
  7261. ">
  7262. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  7263. </div>
  7264. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  7265. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  7266. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  7267. </el-table-column>
  7268. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  7269. </el-table-column>
  7270. <el-table-column label="操作" width="250px">
  7271. <template slot-scope="scope">
  7272. <div class="btnBox">
  7273. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  7274. </div>
  7275. </template>
  7276. </el-table-column>
  7277. </el-table>
  7278. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  7279. 暂无数据
  7280. </div>
  7281. </div>
  7282. </div>
  7283. </div>
  7284. </div>
  7285. <span slot="footer" class="dialog-footer">
  7286. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  7287. </span>
  7288. </el-dialog>
  7289. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  7290. :before-close="handleClose" class="dialog_diy">
  7291. <div class="groupBox">
  7292. <div v-if="groupJson.group" class="groupContent">
  7293. <div class="groupTitle">请设置小组数量及名称</div>
  7294. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  7295. <span class="groupn">第{{ index + 1 }}组名称:</span>
  7296. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  7297. <div class="groupBtn">
  7298. <el-button type="primary" size="small" @click="addGroup(index)"
  7299. v-if="groupJson.group.length - 1 == index">
  7300. 添加</el-button>
  7301. <el-button type="primary" size="small" @click="deleteGroup(index)"
  7302. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  7303. </div>
  7304. </div>
  7305. </div>
  7306. <div class="groupContent">
  7307. <div class="groupTitle">请设置每组人数</div>
  7308. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  7309. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  7310. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  7311. @change="numberPan"></el-input>
  7312. </div>
  7313. </div>
  7314. <span slot="footer" class="dialog-footer">
  7315. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  7316. <el-button type="primary" @click="addGroupJson">确定</el-button>
  7317. </span>
  7318. </el-dialog>
  7319. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  7320. :before-close="handleClose" class="dialog_diy">
  7321. <div style="
  7322. width: 100%;
  7323. display: flex;
  7324. flex-direction: row;
  7325. flex-wrap: nowrap;
  7326. align-items: center;
  7327. justify-content: center;
  7328. ">
  7329. <div style="min-width: fit-content">文件名称:</div>
  7330. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  7331. </div>
  7332. <span slot="footer" class="dialog-footer">
  7333. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  7334. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  7335. </span>
  7336. </el-dialog>
  7337. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  7338. closePan(69);
  7339. }
  7340. " class="dialog_diy fullStyle fullStyle1">
  7341. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  7342. <span slot="footer" class="dialog-footer">
  7343. <el-button @click="englishDialogVisible = false">取 消</el-button>
  7344. <el-button type="primary" @click="addEnglish">确 定</el-button>
  7345. </span>
  7346. </el-dialog>
  7347. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  7348. :before-close="handleClose" class="dialog_diy">
  7349. <div class="template_box">
  7350. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  7351. :class="{ wordTeacherA: ctJson.id == aa.id }">
  7352. <div class="wordPic">
  7353. <img src="../../../assets/icon/new/course_template.png" alt />
  7354. </div>
  7355. <el-tooltip effect="dark" :content="aa.title" placement="top">
  7356. <div style="
  7357. margin-top: 10px;
  7358. line-height: 19px;
  7359. overflow: hidden;
  7360. text-overflow: ellipsis;
  7361. white-space: nowrap;
  7362. padding: 0 10px;
  7363. box-sizing: border-box;
  7364. width: 100%;
  7365. ">
  7366. {{ aa.title }}
  7367. </div>
  7368. </el-tooltip>
  7369. </div>
  7370. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  7371. :class="{ wordTeacherA: ctJson.id == 1 }">
  7372. <div class="wordPic">
  7373. <img src="../../../assets/icon/new/course_template.png" alt />
  7374. </div>
  7375. <div style="
  7376. margin-top: 10px;
  7377. line-height: 19px;
  7378. overflow: hidden;
  7379. text-overflow: ellipsis;
  7380. white-space: nowrap;
  7381. padding: 0 20px;
  7382. ">
  7383. 简易模板
  7384. </div>
  7385. </div>
  7386. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  7387. :class="{ wordTeacherA: ctJson.id == 2 }">
  7388. <div class="wordPic">
  7389. <img src="../../../assets/icon/new/course_template.png" alt />
  7390. </div>
  7391. <div style="
  7392. margin-top: 10px;
  7393. line-height: 19px;
  7394. overflow: hidden;
  7395. text-overflow: ellipsis;
  7396. white-space: nowrap;
  7397. padding: 0 20px;
  7398. ">
  7399. 智能粘贴模式
  7400. </div>
  7401. </div>
  7402. </div>
  7403. <span slot="footer" class="dialog-footer">
  7404. <el-button @click="templateDialog = false">取 消</el-button>
  7405. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  7406. </span>
  7407. </el-dialog>
  7408. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  7409. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  7410. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  7411. <div class="change_stageBox">
  7412. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  7413. <div class="nt_taskBox">
  7414. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  7415. <div class="nt_taskName">
  7416. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7417. <span>{{ t.dyName }}</span>
  7418. </el-tooltip>
  7419. </div>
  7420. </div>
  7421. <div class="moveBtn" v-if="unitJson3.length > 1">
  7422. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7423. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7424. </div>
  7425. </div>
  7426. </div>
  7427. <span slot="footer" class="dialog-footer">
  7428. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  7429. <el-button type="primary" @click="updateChange">确定</el-button>
  7430. </span>
  7431. </el-dialog>
  7432. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7433. :before-close="handleClose" class="dialog_diy">
  7434. <div class="addTypeChoose" style="justify-content: center">
  7435. <div style="min-width: 100px">模板名称:</div>
  7436. <el-input v-model="templateName" style="width: 200px"></el-input>
  7437. </div>
  7438. <div class="addTypeBox">
  7439. <div class="addTypeChoose">
  7440. <div style="min-width: 100px">选择一级分类:</div>
  7441. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  7442. style="width: 200px">
  7443. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7444. </el-option>
  7445. </el-select>
  7446. </div>
  7447. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7448. <div style="min-width: 100px">选择二级分类:</div>
  7449. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  7450. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7451. </el-option>
  7452. </el-select>
  7453. </div>
  7454. </div>
  7455. <span slot="footer" class="dialog-footer">
  7456. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  7457. <el-button @click="close()">关 闭</el-button>
  7458. </span>
  7459. </el-dialog>
  7460. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7461. </evaBox>
  7462. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7463. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7464. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3"
  7465. @aiConfirm="aiConfirm" :clickType="clickType">
  7466. </aiDialog>
  7467. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7468. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7469. <div class="pptBox" :class="{'ppClass': pptBoxDialog && panPptCount() > 0 && pptCount.length}">
  7470. <div class="box" v-show="pptBoxDialog">
  7471. <aiCreateDialog v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson" :key="index"
  7472. :languageSetting="languageSetting" :dialogVisibleAiCreate="dialogVisibleAiCreate2.includes(index)"
  7473. :courseName="courseName" @createAiPpt="createAiPpt" @closeAiPpt="closeAiPpt" :infoData="infoData"
  7474. :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="index"
  7475. :unitJson="unitJson" :ref="'ppt'+index"
  7476. v-show="dialogVisibleAiCreate2.includes(index) && pptCount.includes(index)"></aiCreateDialog>
  7477. </div>
  7478. <span v-show="panPptCount() > 0 && pptCount.length" class="r_pub_button_edit"
  7479. :style="{marginTop: panPptCount() > 0 ? '10px' : '0'}" style="justify-content: flex-start;"
  7480. @click="pptBoxDialog = !pptBoxDialog">{{ pptBoxDialog ? "收缩" : "展开" }}</span>
  7481. </div>
  7482. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName"
  7483. @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson">
  7484. </aiCreateVideoDialog>
  7485. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7486. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl"></wOffice>
  7487. </div>
  7488. </template>
  7489. <script>
  7490. import "../../../common/aws-sdk-2.235.1.min.js";
  7491. import { tools as toolsData } from "../../../common/tools.js";
  7492. // import "../../../common/aws-sdk-2.99.0.min.js";
  7493. import $ from "jquery";
  7494. import EditorBar from "../../../components/tools/wangEnduit";
  7495. import Table from "../../../components/tools/table";
  7496. import Mind from "../../tools/jsmind2";
  7497. import Time from "../../tools/time.vue";
  7498. import Sunburst from "../../tools/sunburst";
  7499. import SeeBoard from "../../tools/seeBoard";
  7500. import weilaiData from "../components/weilai.js";
  7501. import sourceDialog from "../teacherSource/dialog.vue";
  7502. import interVideo from "../interVideo/index.vue";
  7503. import englishRight from "../components/englishRight.vue";
  7504. import evaBox from "../evaBox/index.vue";
  7505. import EnglishVoice from "../EnglishVoice/index.vue";
  7506. import aiBox from './aiBox.vue'
  7507. import aiBoxRight from './aiBoxRight.vue'
  7508. import aiBoxCourseDetail from './aiBoxCourseDetail.vue'
  7509. import recordV from './record.vue'
  7510. import aiDialog from './aiDialog'
  7511. import aiTips from './aiTips.vue'
  7512. import tipsDialog from './tipsDialog.vue'
  7513. import { v4 as uuidv4 } from "uuid";
  7514. import MarkdownIt from "markdown-it";
  7515. import aiCreateDialog from './aiCreateDialog.vue'
  7516. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7517. import wpdf from "../test/file/wPdf2.vue";
  7518. import wOffice from "../test/file/wOffice.vue";
  7519. import htmlDocx from "html-docx-js/dist/html-docx";
  7520. import TurndownService from 'turndown';
  7521. import JSZip from "jszip";
  7522. import evaList from "./evaList.vue";
  7523. import MindTask from "./jsmind2";
  7524. import ConvertApi from 'convertapi-js'
  7525. let convertApi = ConvertApi.auth('secret_U1EO5rhgMCnoBnBT')
  7526. var OpenCC = require("opencc-js");
  7527. let converter = OpenCC.Converter({
  7528. from:'hk',
  7529. to:'cn'
  7530. })
  7531. let converter2 = OpenCC.Converter({
  7532. from:'cn',
  7533. to:'hk'
  7534. })
  7535. const getFile = (url) => {
  7536. return new Promise((resolve, reject) => {
  7537. var credentials = {
  7538. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7539. secretAccessKey: "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",
  7540. }; //秘钥形式的登录上传
  7541. window.AWS.config.update(credentials);
  7542. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7543. let url2 = url;
  7544. let _url2 = "";
  7545. if (
  7546. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  7547. ) {
  7548. _url2 = url2.split(
  7549. "https://view.officeapps.live.com/op/view.aspx?src="
  7550. )[1];
  7551. } else {
  7552. _url2 = url2;
  7553. }
  7554. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  7555. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  7556. var params = {
  7557. Bucket: "ccrb",
  7558. Key: name
  7559. };
  7560. s3.getObject(params, function (err, data) {
  7561. if (err) {
  7562. console.log(err, err.stack)
  7563. resolve({ data: 1 });
  7564. }else {
  7565. resolve({ data: data.Body });
  7566. console.log(data);
  7567. } // sxuccessful response
  7568. });
  7569. });
  7570. };
  7571. export default {
  7572. components: {
  7573. EditorBar,
  7574. Mind,
  7575. Time,
  7576. Sunburst,
  7577. SeeBoard,
  7578. Table,
  7579. sourceDialog,
  7580. interVideo,
  7581. englishRight,
  7582. evaBox,
  7583. EnglishVoice,
  7584. aiBox,
  7585. aiBoxRight,
  7586. aiBoxCourseDetail,
  7587. aiDialog,
  7588. aiTips,
  7589. tipsDialog,
  7590. aiCreateDialog,
  7591. aiCreateVideoDialog,
  7592. wpdf,
  7593. wOffice,
  7594. evaList,
  7595. MindTask,
  7596. recordV
  7597. },
  7598. data() {
  7599. return {
  7600. checkAll: false,
  7601. checkAll2: false,
  7602. chooseType: 1,
  7603. checkedCities: [],
  7604. isIndeterminate: true,
  7605. isIndeterminate2: true,
  7606. isSysPic: false,
  7607. isSysPic2: false,
  7608. steps: 1,
  7609. stepsNav: 1,
  7610. nbOrder: 0,
  7611. courseId: "",
  7612. chapToolsType: 0,
  7613. chapTools: [
  7614. {
  7615. tools: [],
  7616. toolDetail: "",
  7617. },
  7618. ],
  7619. line: "",
  7620. lineTitle: "",
  7621. sysPic: [],
  7622. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7623. sentenceList2: [],
  7624. isPushTitleList: [],
  7625. lineCount: 0,
  7626. lineType: 0,
  7627. chapCount: 0,
  7628. courseName: "",
  7629. isTeacherSee: false,
  7630. courseText: "",
  7631. textLoading: false,
  7632. ttextLoading: false,
  7633. courseText2: "",
  7634. preTime: 0,
  7635. formLabelWidth: "100px",
  7636. choosePicVisible: false,
  7637. sysPicVisible: false,
  7638. sysPicVisible2: false,
  7639. uploadLoading1: false,
  7640. noneBtnImg: false,
  7641. updateBoolean2: false,
  7642. unitIndex: 0,
  7643. taskCount: 0,
  7644. dialogVisible: false,
  7645. dialogVisible1: false,
  7646. dialogVisible2: false,
  7647. dialogVisible3: false,
  7648. dialogVisible4: false,
  7649. dialogVisible5: false,
  7650. dialogVisible6: false,
  7651. dialogVisible7: false,
  7652. dialogVisible8: false,
  7653. dialogVisible9: false,
  7654. dialogVisibleClass: false,
  7655. dialogVisibleMember: false,
  7656. dialogVisibleMp3: false,
  7657. dialogVisibleSelect: false,
  7658. dialogVisibleSentence: false,
  7659. dialogVisibleRate: false,
  7660. dialogVisibleChoice: false,
  7661. dialogVisiblemb: false,
  7662. dialogVisibleInvite: false,
  7663. dialogVisibleSource: false,
  7664. dialogVisibleVideo: false,
  7665. dialogVisibleStageChange: false,
  7666. dialogVisibleupdataVideoT: false,
  7667. englishDialogVisible: false,
  7668. templateDialog: false,
  7669. ctJson: {},
  7670. isClickColor: 1,
  7671. toolIndexType: "",
  7672. publicTool: 0,
  7673. searchPeople: "",
  7674. searchTN: "",
  7675. collid: '',
  7676. CollLoading: false,
  7677. userid: this.$route.query.userid,
  7678. oid: this.$route.query.oid,
  7679. org: this.$route.query.org,
  7680. role: this.$route.query.role,
  7681. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7682. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7683. dialogVisibleTable: false,
  7684. dialogVisibleWord: false,
  7685. tableJson: { text: "" },
  7686. wordJson: { text: "" },
  7687. dialogVisibleMoreUpload: false,
  7688. dialogVisiblePreTime: false,
  7689. uploadJson: [],
  7690. classJuri: [],
  7691. gradeList: [],
  7692. cover: [], //课程封面
  7693. myWord: [],
  7694. evaJuri: [],
  7695. evalua: "",
  7696. targetArray: [],
  7697. eTitle: "",
  7698. eJson: {},
  7699. fid: "", //一级
  7700. sid: "", //二级
  7701. tid: "", //二级
  7702. typeMode: 3,
  7703. eJSONNum: 0,
  7704. data: {
  7705. meta: {
  7706. name: "example",
  7707. author: "dd@163.com",
  7708. version: "0.2",
  7709. },
  7710. format: "node_array",
  7711. data: [{ id: "root", isroot: true, topic: "" }],
  7712. },
  7713. askJson: {
  7714. askCount: 1,
  7715. askTitle: "",
  7716. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7717. },
  7718. askJson2: {},
  7719. testJson: {},
  7720. testJson2: {},
  7721. selectJson: {},
  7722. selectJson2: {},
  7723. rateJson: [],
  7724. unitJson2: [],
  7725. unitJson3: [],
  7726. unitJson: [
  7727. {
  7728. dyName: "", //单元标题
  7729. chapterInfo: [
  7730. {
  7731. isread: false,
  7732. chapterid: this.guid(),
  7733. title: "",
  7734. courseName: "",
  7735. taskJson: [
  7736. {
  7737. task: "",
  7738. taskDetail: "",
  7739. chapterData: [],
  7740. toolText: "",
  7741. toolChoose: [
  7742. {
  7743. tool: [],
  7744. toolDetail: "",
  7745. toolType: 0,
  7746. askCount: 1,
  7747. askTitle: "",
  7748. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7749. },
  7750. ],
  7751. isShowTools: false,
  7752. askCount: 1,
  7753. isFold: 1,
  7754. askTitle: "",
  7755. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7756. checkJson: [{ checkCount: [], checkPerent: [] }],
  7757. homeworkList: [],
  7758. },
  7759. ],
  7760. itemCount: 1,
  7761. fileList1: [],
  7762. video: [],
  7763. testData: [],
  7764. pData: [],
  7765. templateArray: [],
  7766. },
  7767. ],
  7768. },
  7769. ],
  7770. templateArray: [],
  7771. studentJuri: [],
  7772. teacherJuri: [],
  7773. CollaborativeTeaList: [],
  7774. checkboxList: [],
  7775. checkboxList2: [],
  7776. checkboxList3: [],
  7777. classSearch: "",
  7778. gradeId: "",
  7779. number: "",
  7780. tTitle: "",
  7781. tdetail: "",
  7782. templateC: {},
  7783. AttText: {},
  7784. AttTextType: 0,
  7785. AttTextIndex: 0,
  7786. cTemplate: "",
  7787. CourseType: [],
  7788. CourseType1: [],
  7789. CourseType2: [],
  7790. CourseTypeJson: {},
  7791. CourseTypeJson1: {},
  7792. courseTypeId: [],
  7793. courseTypeId1: [],
  7794. courseTypeSon: [],
  7795. clearArray: [],
  7796. pTypeCheck: [],
  7797. pTypeCheckName: [],
  7798. loading: false,
  7799. toolType: 0,
  7800. inputShow: true,
  7801. inputShow2: true,
  7802. toolIndex: 0,
  7803. cidType: 0,
  7804. answerQ: "",
  7805. answerQ2: "",
  7806. grade: [],
  7807. grade2: [],
  7808. courseUserid: "",
  7809. timer: null,
  7810. timer2: null,
  7811. pasteTimer: null,
  7812. checkId: "",
  7813. isDelete: 1,
  7814. addindex: 0,
  7815. selectSteps: 1,
  7816. groupJson: {},
  7817. dialogVisibleGroup: false,
  7818. rightBoxHeight: 0,
  7819. ManAarray: [],
  7820. checkBoolean: false,
  7821. inviteCode: [],
  7822. inviteId: "",
  7823. icode: "",
  7824. easyArray: [2, 4],
  7825. sourceData: {},
  7826. updateSourcePan: false,
  7827. videoJson: {},
  7828. isBtnDisplay: false,
  7829. isStepDisplay: false,
  7830. isPasteStage: false,
  7831. isPasteTask: false,
  7832. isPasteChoice: false,
  7833. imageList: [],
  7834. imageloading: false,
  7835. imageloading2: false,
  7836. searchImageValue: "",
  7837. ppage: 1,
  7838. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7839. oldIndex: 0,
  7840. dragType: "",
  7841. oldUnitIndex: 0,
  7842. oldData: null,
  7843. newIndex: "",
  7844. englishList: {},
  7845. typeIndex: "",
  7846. courseState: 5,
  7847. taskJSONa: [
  7848. {
  7849. task: "",
  7850. taskDetail: "",
  7851. chapterData: [],
  7852. toolText: "",
  7853. toolChoose: [
  7854. {
  7855. tool: [],
  7856. toolDetail: "",
  7857. toolType: 0,
  7858. askCount: 1,
  7859. askTitle: "",
  7860. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7861. },
  7862. ],
  7863. isShowTools: false,
  7864. askCount: 1,
  7865. isFold: 1,
  7866. askTitle: "",
  7867. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7868. checkJson: [{ checkCount: [], checkPerent: [] }],
  7869. homeworkList: [],
  7870. },
  7871. ],
  7872. checkUnitIndex: 0,
  7873. isdrag: "",
  7874. evaIndex: "",
  7875. evatIndex: "",
  7876. evaBoxDialog: false,
  7877. EnglishVoiceDialog: false,
  7878. englishVoiceJson: {},
  7879. cetIndex: "",
  7880. cettIndex: "",
  7881. cetBoxDialog: false,
  7882. templateName: "",
  7883. setTypeJson: {
  7884. one: "",
  7885. two: "",
  7886. },
  7887. twoJson: [],
  7888. oneJson: [],
  7889. updateKey: 1,
  7890. isOutline: false,
  7891. isOutline2: false,
  7892. infoData: [],
  7893. infoproVisible: false,
  7894. infoisFinishSize: 0,
  7895. infoisAllSize: 0,
  7896. infoprogress: 0,
  7897. taskDetailLoading: [],
  7898. ttaskDetailLoading: [],
  7899. taskDetailLoading2: [],
  7900. ttaskDetailLoading2: [],
  7901. taskDetailLoading3: [],
  7902. ttaskDetailLoading3: [],
  7903. taskDetailLoading4: [],
  7904. taskDetailLoading5: [],
  7905. ttaskDetailLoading5: [],
  7906. dArray: [],
  7907. dialogVisibleAiD: false,
  7908. aitype: "",
  7909. aiJson: {
  7910. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7911. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7912. "aiTask": "请根据<教学任务教案>。",
  7913. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7914. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7915. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7916. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7917. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7918. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7919. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7920. },
  7921. aiText: "",
  7922. aiText2: "",
  7923. aiText3: "",
  7924. aiCallBack: "",
  7925. aiIndex: "",
  7926. clickType: 1,
  7927. promptShow: false,
  7928. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7929. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7930. dialogVisibleTips: false,
  7931. tipsJson: {},
  7932. cpote:{
  7933. cpote1: '',
  7934. cpote2: '',
  7935. cpote3: '',
  7936. cpote4: '',
  7937. },
  7938. cpoteLoading:{
  7939. cpote1: false,
  7940. cpote2: false,
  7941. cpote3: false,
  7942. cpote4: false,
  7943. },
  7944. cpotetLoading:{
  7945. cpote1: false,
  7946. cpote2: false,
  7947. cpote3: false,
  7948. cpote4: false,
  7949. },
  7950. cpoteType: 0,
  7951. dialogVisibleAiCreate: false,
  7952. dialogVisibleAiCreate2: [],
  7953. pptBoxDialog: true,
  7954. pptCount: [],
  7955. dialogVisibleAiCreateVideo: false,
  7956. teacherText: [],
  7957. isFileSearch: true,
  7958. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  7959. 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'],
  7960. courseJie:1,
  7961. courseTime:45,
  7962. allTextArray: [],
  7963. dialogVisiblePdf: false,
  7964. dialogVisibleOffice: false,
  7965. wurl: "",
  7966. choiceLoading: false,
  7967. teacherInfoData: [],
  7968. teacherinfoproVisible: false,
  7969. teacherinfoisFinishSize: 0,
  7970. teacherinfoisAllSize: 0,
  7971. teacherinfoprogress: 0,
  7972. teacherCourseText: "",
  7973. teacherTextLoading: false,
  7974. tteacherTextLoading: false,
  7975. targetCourseText: "",
  7976. targetTextLoading: false,
  7977. ttargetTextLoading: false,
  7978. cankaoInfoData: [],
  7979. fileSLoading: false,
  7980. infoData2: [],
  7981. isuseT: false,
  7982. mode: 1,
  7983. targetCourseText2: "",
  7984. targetTextLoading2: false,
  7985. ttargetTextLoading2: false,
  7986. courseTextBool: false,
  7987. teacherCourseTextB: true,
  7988. targetCourseTextB: true,
  7989. courseTextB: true,
  7990. targetCourseText2B: true,
  7991. // 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'],
  7992. yiKeTemplateArray:[],
  7993. taskLoading: [],
  7994. ruleLoading: [],
  7995. mubiaoInfoData: [],
  7996. mubiaoinfoproVisible: false,
  7997. mubiaoinfoisFinishSize: 0,
  7998. mubiaoinfoisAllSize: 0,
  7999. mubiaoinfoprogress: 0,
  8000. xuanzeInfoData: [],
  8001. xuanzeinfoproVisible: false,
  8002. xuanzeinfoisFinishSize: 0,
  8003. xuanzeinfoisAllSize: 0,
  8004. xuanzeinfoprogress: 0,
  8005. pingjiaInfoData: [],
  8006. pingjiainfoproVisible: [],
  8007. pingjiainfoisFinishSize: [],
  8008. pingjiainfoisAllSize: [],
  8009. pingjiainfoprogress: [],
  8010. taskGLoading: [],
  8011. ttaskGLoading: [],
  8012. isOutlineCancelToken: null,
  8013. isFileCancelToken: null,
  8014. isTargetCancelToken1: null,
  8015. isTargetCancelToken2: null,
  8016. isTextCancelToken: null,
  8017. isTeacherTextCancelToken: null,
  8018. isTeacherTaskCancelToken: null,
  8019. isOutlineTaskCancelToken: [],
  8020. isTeacherTaskCancelToken2: [],
  8021. isTeacherTaskCancelSource: [],
  8022. isTextCancelSource: null,
  8023. isOutlineTaskCancelSource: [],
  8024. isTeacherTextCancelSource: null,
  8025. isTargetCancelSource1: null,
  8026. isTargetCancelSource2: null,
  8027. fileidArray: [],
  8028. interPan: true,
  8029. interFlash: true,
  8030. agentid: "",
  8031. interSetting: false,
  8032. chatid: "",
  8033. languageSetting: 0, //0中文 1繁体 2英文
  8034. isQuote: {},
  8035. knowFileArray: [],
  8036. knowInfoData: [],
  8037. knowinfoproVisible: false,
  8038. knowinfoisFinishSize: 0,
  8039. knowinfoisAllSize: 0,
  8040. knowinfoprogress: 0,
  8041. knowFileids: [],
  8042. searchFileName: "",
  8043. knowInfoDataLoading: false,
  8044. isfindMatchingContents: null,
  8045. findMatchingContentsPage: 1,
  8046. findMatchingContentsFinish: false,
  8047. knowInfoData2: [],
  8048. knowinfoproVisible2: false,
  8049. knowinfoisFinishSize2: 0,
  8050. knowinfoisAllSize2: 0,
  8051. knowinfoprogress2: 0,
  8052. knowFileids2: [],
  8053. knowInfoData3: [],
  8054. knowFileids3: [],
  8055. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8056. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41],
  8057. taskAnLoading: [],
  8058. taskAnCancelToken: [],
  8059. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8060. taskCancelToken1: [],
  8061. isTaskCancelSource1: [],
  8062. taskCancelToken2: [],
  8063. isDisplay: false,
  8064. isDialog: 0,
  8065. recordVideoText: "",
  8066. recordAudioUrl: "",
  8067. r_agentid: "",
  8068. course_info: "",
  8069. stepShow: true,
  8070. anLoading: [],
  8071. appendixFile: [],
  8072. appendixPan: true,
  8073. appendixFiles: [],
  8074. appendixTypeCheck: 'all',
  8075. appendixTaskCheck: 'all',
  8076. appendixType: [
  8077. {
  8078. label: "教案",
  8079. value: 0,
  8080. },
  8081. {
  8082. label: "PPT",
  8083. value: 1,
  8084. },
  8085. {
  8086. label: "学历案",
  8087. value: 2,
  8088. },
  8089. {
  8090. label: "量规",
  8091. value: 3,
  8092. },
  8093. {
  8094. label: "聊天栏记录",
  8095. value: 4,
  8096. },
  8097. ],
  8098. appendixLoading: false,
  8099. interFindPan: true,
  8100. typeC1: [],
  8101. typeC2: [],
  8102. knowFileType1: "",
  8103. knowFileType2: "",
  8104. knowFileType: "",
  8105. knowFileTypeArray1: ['上册', '下册'],
  8106. knowFileTypeArray: ['作业', '教案', '其他'],
  8107. };
  8108. },
  8109. directives: {
  8110. autoHeight: {
  8111. update(el, binding) {
  8112. const { value } = binding;
  8113. if (value && typeof value === "number") {
  8114. el.style.height = `${value}px`;
  8115. } else {
  8116. el.style.height = "auto";
  8117. }
  8118. },
  8119. componentUpdated(el) {
  8120. el.style.height = `${el.scrollHeight + 25}px`;
  8121. },
  8122. },
  8123. },
  8124. computed: {
  8125. // rightBoxHeight: function () {
  8126. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  8127. // },
  8128. offsetLetfPx: function () {
  8129. //addnum可以直接在模板语法里面用,相当于data内的值
  8130. return (
  8131. $(".cru_select")[this.unitIndex] &&
  8132. $(".cru_select")[this.unitIndex].offsetLeft + 5
  8133. );
  8134. },
  8135. getMan2() {
  8136. return function (people) {
  8137. let _people = people;
  8138. let _people2 = "";
  8139. if (this.ManAarray.length) {
  8140. for (var i = 0; i < this.ManAarray.length; i++) {
  8141. if (this.ManAarray[i].userid == people) {
  8142. _people2 = this.ManAarray[i].name;
  8143. break;
  8144. }
  8145. }
  8146. }
  8147. if (people == this.courseUserid) {
  8148. return "";
  8149. }
  8150. return this.ManAarray.length ? _people2 : "";
  8151. };
  8152. },
  8153. getListMan2() {
  8154. return function (list) {
  8155. let _people2 = [];
  8156. if (this.ManAarray.length) {
  8157. for (var j = 0; j < list.length; j++) {
  8158. let people = list[j];
  8159. for (var i = 0; i < this.ManAarray.length; i++) {
  8160. if (
  8161. this.ManAarray[i].userid == people &&
  8162. people != this.courseUserid
  8163. ) {
  8164. _people2.push(this.ManAarray[i].name);
  8165. break;
  8166. }
  8167. }
  8168. }
  8169. }
  8170. return this.ManAarray.length ? _people2.join("、") : "";
  8171. };
  8172. },
  8173. isInvite() {
  8174. return function (cid) {
  8175. let array = [];
  8176. for (var i = 0; i < this.inviteCode.length; i++) {
  8177. array.push(this.inviteCode[i].cid);
  8178. }
  8179. return array.indexOf(cid) != -1;
  8180. };
  8181. },
  8182. getInviteCodeC() {
  8183. return function (cid) {
  8184. let array = [];
  8185. for (var i = 0; i < this.inviteCode.length; i++) {
  8186. array.push(this.inviteCode[i].cid);
  8187. }
  8188. return this.inviteCode[array.indexOf(cid)].ic;
  8189. };
  8190. },
  8191. getClassC() {
  8192. return function (c) {
  8193. let _c2 = "";
  8194. if (this.grade.length) {
  8195. for (var i = 0; i < this.grade.length; i++) {
  8196. if (this.grade[i].id == c) {
  8197. _c2 = this.grade[i].name;
  8198. break;
  8199. }
  8200. }
  8201. }
  8202. return this.grade.length ? _c2 : "";
  8203. };
  8204. },
  8205. getListClassC() {
  8206. return function (list) {
  8207. let _c2 = [];
  8208. if (this.grade.length) {
  8209. for (var j = 0; j < list.length; j++) {
  8210. let c = list[j];
  8211. for (var i = 0; i < this.grade.length; i++) {
  8212. if (this.grade[i].id == c) {
  8213. _c2.push(this.grade[i].name);
  8214. break;
  8215. }
  8216. }
  8217. }
  8218. }
  8219. return this.grade.length ? _c2.join("、") : "";
  8220. };
  8221. },
  8222. MarkdownT() {
  8223. return function (c) {
  8224. let md = new MarkdownIt();
  8225. return c
  8226. ? md.render(c) : "";
  8227. };
  8228. },
  8229. panOutline(){
  8230. return function () {
  8231. let count = 0;
  8232. for(var i = 0; i < this.unitJson.length; i++){
  8233. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8234. for(var j = 0; j < _task.length; j++){
  8235. if(_task[j].taskDetail2){
  8236. count++
  8237. }
  8238. }
  8239. }
  8240. return count;
  8241. };
  8242. },
  8243. panTeacher(){
  8244. return function () {
  8245. let count = 0;
  8246. for(var i = 0; i < this.unitJson.length; i++){
  8247. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8248. for(var j = 0; j < _task.length; j++){
  8249. if(_task[j].taskDetail3){
  8250. count++
  8251. }
  8252. }
  8253. }
  8254. return count;
  8255. };
  8256. },
  8257. panTask(){
  8258. return function () {
  8259. let count = 0;
  8260. for(var i = 0; i < this.unitJson.length; i++){
  8261. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8262. for(var j = 0; j < _task.length; j++){
  8263. if(_task[j].taskDetail){
  8264. count++
  8265. }
  8266. }
  8267. }
  8268. return count;
  8269. };
  8270. },
  8271. panElist(){
  8272. return function (array) {
  8273. let count = 0;
  8274. for(var i = 0; i < array.toolChoose.length; i++){
  8275. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  8276. count++
  8277. }
  8278. }
  8279. return count;
  8280. };
  8281. },
  8282. panTaskElist(){
  8283. return function () {
  8284. let count = 0;
  8285. for(var i = 0; i < this.unitJson.length; i++){
  8286. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8287. for(var j = 0; j < _task.length; j++){
  8288. if(_task[j].eList && _task[j].eList.length){
  8289. count++
  8290. }
  8291. }
  8292. }
  8293. return count;
  8294. };
  8295. },
  8296. panEvaCont(){
  8297. return function () {
  8298. let count = 0;
  8299. for(var i = 0; i < this.unitJson.length; i++){
  8300. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8301. for(var j = 0; j < _task.length; j++){
  8302. let tool = _task[j].toolChoose
  8303. for(var k = 0; k < tool.length; k++){
  8304. if(tool[k].eList && tool[k].eList.length){
  8305. count++
  8306. }
  8307. }
  8308. }
  8309. }
  8310. return count;
  8311. };
  8312. },
  8313. dataCheckPan(){
  8314. return function (fileid) {
  8315. for(let i = 0; i < this.infoData.length; i++){
  8316. if(this.infoData[i].fileid == fileid){
  8317. return true
  8318. }
  8319. }
  8320. return false;
  8321. };
  8322. },
  8323. interUrl: function () {
  8324. let agentid = this.aiJson.agentid
  8325. let sagentid = this.aiJson.sagentid
  8326. let url = ''
  8327. if(sagentid){
  8328. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${sagentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8329. }else{
  8330. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8331. }
  8332. return url;
  8333. },
  8334. panPptCount(){
  8335. return function () {
  8336. let ppts = 0
  8337. for(var i = 0; i < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; i++){
  8338. let ppt = this.$refs['ppt'+i]
  8339. if(ppt && ppt[0].tanDialog){
  8340. ppts++
  8341. }
  8342. }
  8343. if(!this.pptCount.length){
  8344. this.pptBoxDialog = false
  8345. }
  8346. return ppts;
  8347. };
  8348. },
  8349. panDanTool(){
  8350. return function (array) {
  8351. let count = 0;
  8352. for(var i = 0; i < array.toolChoose.length; i++){
  8353. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8354. count++
  8355. }
  8356. }
  8357. return count;
  8358. };
  8359. },
  8360. panTool(){
  8361. return function () {
  8362. let count = 0;
  8363. for(var j = 0; j < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; j++){
  8364. let array = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[j]
  8365. for(var i = 0; i < array.toolChoose.length; i++){
  8366. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8367. count++
  8368. }
  8369. }
  8370. }
  8371. return count;
  8372. };
  8373. },
  8374. allFile(){
  8375. return function (type) {
  8376. let file = [...this.knowInfoData, ...this.infoData, ...this.knowInfoData2, ...this.appendixFile];
  8377. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8378. let _task = this.unitJson[0].chapterInfo[0].taskJson[i];
  8379. for(var j = 0; j < _task.chapterData.length; j++){
  8380. if(_task.chapterData[j].type == 3){
  8381. file.push({..._task.chapterData[j], tool:j, task:i});
  8382. }
  8383. }
  8384. }
  8385. let uniqueUrls = new Set(file.map(item => item.url)); // 使用Set去重
  8386. let uniqueFile = Array.from(uniqueUrls).map(url => file.find(item => item.url === url)); // 根据url获取唯一文件
  8387. if(this.appendixTaskCheck != 'all' && type != '2'){
  8388. uniqueFile = uniqueFile.filter(file => file.task+1 == this.appendixTaskCheck || file.name.includes('任务'+this.appendixTaskCheck) || file.name.includes('任务'+this.numberToChinese(this.appendixTaskCheck)));
  8389. }
  8390. if(this.appendixTypeCheck != 'all' && type != '2'){
  8391. if(this.appendixTypeCheck == 0){
  8392. uniqueFile = uniqueFile.filter(file => file.name.includes('教案'));
  8393. }else if(this.appendixTypeCheck == 1){
  8394. uniqueFile = uniqueFile.filter(file => file.name.toUpperCase().includes('PPT') || file.name.toUpperCase().includes('PPTX'));
  8395. }else if(this.appendixTypeCheck == 2){
  8396. uniqueFile = uniqueFile.filter(file => file.name.includes('学历案'));
  8397. }else if(this.appendixTypeCheck == 3){
  8398. uniqueFile = uniqueFile.filter(file => file.name.includes('的评价'));
  8399. }else if(this.appendixTypeCheck == 4){
  8400. uniqueFile = uniqueFile.filter(file => file.task == 'dialog');
  8401. }
  8402. }
  8403. return uniqueFile;
  8404. };
  8405. },
  8406. panAppendixCheckAll(){
  8407. return function(){
  8408. let files = this.allFile();
  8409. let count = 0
  8410. for(var i = 0; i < files.length; i++){
  8411. if(this.appendixFiles.includes(files[i].url)){
  8412. count++
  8413. }
  8414. }
  8415. if (count == files.length) {
  8416. return true
  8417. }else {
  8418. false
  8419. }
  8420. }
  8421. },
  8422. getTypeC(){
  8423. return function(index){
  8424. let sub = []
  8425. let grade = []
  8426. if (this.courseTypeId.length) {
  8427. for (var i = 0; i < this.courseTypeId.length; i++) {
  8428. let _sid = this.courseTypeId[i]
  8429. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8430. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  8431. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  8432. }
  8433. }
  8434. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8435. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  8436. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  8437. }
  8438. }
  8439. }
  8440. }
  8441. if(index == 1){
  8442. return sub
  8443. }else if(index == 2){
  8444. return grade
  8445. }
  8446. }
  8447. },
  8448. getFileType(){
  8449. return function (name) {
  8450. let fileType = this.knowFileTypeArray;
  8451. for (let type of fileType) {
  8452. if (converter(name).includes(type)) {
  8453. return type; // 判断name中是否包含对应的文件类型
  8454. }
  8455. }
  8456. return '其他';
  8457. };
  8458. },
  8459. allknowInfoData3(){
  8460. return function () {
  8461. let knowInfoData = this.knowInfoData3;
  8462. if(this.knowFileType){
  8463. if(converter(this.knowFileType) == '其他'){
  8464. let fileType = this.knowFileTypeArray.filter(item => item != '其他');
  8465. knowInfoData = knowInfoData.filter(item => {
  8466. return !fileType.some(type => converter(item.name).includes(type));
  8467. });
  8468. }else{
  8469. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType))
  8470. }
  8471. }
  8472. if(this.knowFileType1){
  8473. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType1))
  8474. }
  8475. if(this.knowFileType2){
  8476. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(converter(`第${this.knowFileType2}单元`)) || converter(item.name).includes(converter(`第${this.numberToChinese(this.knowFileType2)}单元`)))
  8477. }
  8478. return knowInfoData;
  8479. };
  8480. },
  8481. panknowInfoData3CheckAll(){
  8482. return function(){
  8483. let files = this.allknowInfoData3();
  8484. let count = 0
  8485. for(var i = 0; i < files.length; i++){
  8486. if(this.knowFileids3.includes(files[i].url)){
  8487. count++
  8488. }
  8489. }
  8490. if (count == files.length) {
  8491. return true
  8492. }else {
  8493. false
  8494. }
  8495. }
  8496. },
  8497. },
  8498. watch: {
  8499. unitIndex(newValue, oldValue) {
  8500. // return;
  8501. if (this.isDelete == 2) {
  8502. this.isDelete = 1;
  8503. return;
  8504. }
  8505. if (this.cid != "") {
  8506. let _unitIndex = oldValue;
  8507. if (
  8508. JSON.stringify(this.unitJson2[_unitIndex]) ==
  8509. JSON.stringify(this.unitJson[_unitIndex])
  8510. ) {
  8511. this.$refs.rightboxR.scrollTop = 0;
  8512. return;
  8513. }
  8514. let cPan = 1;
  8515. for (
  8516. var j = 0;
  8517. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8518. j++
  8519. ) {
  8520. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8521. j
  8522. ].proVisible = false;
  8523. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8524. j
  8525. ].proVisible2 = false;
  8526. if (
  8527. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8528. .length > 1
  8529. ) {
  8530. for (
  8531. var z = 0;
  8532. z <
  8533. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8534. .length;
  8535. z++
  8536. ) {
  8537. if (
  8538. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  8539. .toolChoose[z].tool.length
  8540. ) {
  8541. this.$message.error("请把工具添加完整");
  8542. cPan = 2;
  8543. break;
  8544. }
  8545. }
  8546. }
  8547. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8548. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8549. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8550. (ele) => {
  8551. return ele.value != "" || ele.detail != "" || ele.target != "";
  8552. }
  8553. );
  8554. }
  8555. }
  8556. if (cPan == 2) {
  8557. this.unitIndex = oldValue;
  8558. return;
  8559. }
  8560. for (var i = 0; i < this.unitJson.length; i++) {
  8561. if (this.addindex != i) {
  8562. delete this.unitJson[i].isUpdate;
  8563. }
  8564. }
  8565. this.$refs.rightboxR.scrollTop = 0;
  8566. this.addindex = -1;
  8567. let params = [
  8568. {
  8569. cid: this.cid,
  8570. chapters: JSON.stringify(this.unitJson),
  8571. uid: this.userid,
  8572. unitIndex: _unitIndex,
  8573. },
  8574. ];
  8575. this.ajax
  8576. .post(this.$store.state.api + "updateWorkNew4", params)
  8577. .then((res) => {
  8578. // this.$message({
  8579. // message: "修改成功",
  8580. // type: "success",
  8581. // });
  8582. // this.courseId = this.cid;
  8583. this.addtips()
  8584. })
  8585. .catch((err) => {
  8586. this.$message.error("网络不佳");
  8587. console.error(err);
  8588. });
  8589. }
  8590. },
  8591. steps(newValue, old) {
  8592. if(newValue == 2){
  8593. this.steps = old
  8594. }
  8595. if (newValue == 4) {
  8596. let cPan = 1;
  8597. for (var i = 0; i < this.unitJson.length; i++) {
  8598. for (
  8599. var j = 0;
  8600. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8601. j++
  8602. ) {
  8603. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8604. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8605. if (
  8606. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8607. ) {
  8608. for (
  8609. var z = 0;
  8610. z <
  8611. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8612. z++
  8613. ) {
  8614. if (
  8615. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  8616. .tool.length
  8617. ) {
  8618. this.$message.error("请把工具添加完整");
  8619. cPan = 2;
  8620. break;
  8621. }
  8622. }
  8623. }
  8624. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8625. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8626. i
  8627. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8628. return ele.value != "" || ele.detail != "" || ele.target != "";
  8629. });
  8630. }
  8631. }
  8632. }
  8633. this.inputShow = true;
  8634. if (cPan == 2) {
  8635. this.steps = old;
  8636. return;
  8637. }
  8638. this.goTo(
  8639. "/course?userid=" +
  8640. this.userid +
  8641. "&oid=" +
  8642. this.oid +
  8643. "&org=" +
  8644. this.org +
  8645. "&role=" +
  8646. this.role
  8647. );
  8648. }
  8649. },
  8650. courseName(newVal, oldVal) {
  8651. this.setCourseInfo();
  8652. },
  8653. courseTypeId: {
  8654. immediate: true,
  8655. deep: true,
  8656. handler(newValue, oldValue) {
  8657. this.setCourseInfo();
  8658. }
  8659. },
  8660. knowFileids(newVal, oldVal) {
  8661. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8662. },
  8663. knowFileids2(newVal, oldVal) {
  8664. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8665. },
  8666. },
  8667. methods: {
  8668. tableRowClassName({ row, rowIndex }) {
  8669. if ((rowIndex + 1) % 2 === 0) {
  8670. return "even_row";
  8671. } else {
  8672. return "";
  8673. }
  8674. },
  8675. close() {
  8676. this.cetIndex = "";
  8677. this.cettIndex = "";
  8678. this.templateName = "";
  8679. this.cetBoxDialog = false;
  8680. },
  8681. openAI() {
  8682. top.postMessage({ tools: "64" }, "*");
  8683. },
  8684. setMan() {
  8685. // let teacherJuri = this.teacherJuri2;
  8686. this.ManAarray = [];
  8687. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  8688. if (_user.indexOf(this.userid) == -1) {
  8689. _user.push(this.userid);
  8690. }
  8691. if (_user.indexOf(this.courseUserid) == -1) {
  8692. _user.push(this.courseUserid);
  8693. }
  8694. let params = [{
  8695. uid: _user.join(","),
  8696. }];
  8697. this.ajax
  8698. .post(this.$store.state.api + "getAllUserByIdP", params)
  8699. .then((res) => {
  8700. let teacherJuri = res.data[0];
  8701. this.ManAarray = teacherJuri;
  8702. })
  8703. .catch((err) => {
  8704. console.error(err);
  8705. });
  8706. },
  8707. previewImg(url) {
  8708. this.$hevueImgPreview(url);
  8709. },
  8710. btnDisplay(bool) {
  8711. this.isBtnDisplay = bool;
  8712. },
  8713. stepDisplay(bool) {
  8714. this.isStepDisplay = bool;
  8715. },
  8716. scrollChange() {
  8717. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8718. },
  8719. addHw(e) {
  8720. var el = e.currentTarget;
  8721. el.getElementsByTagName("input")[0].click();
  8722. },
  8723. change(val) {
  8724. if (this.dialogVisible1) {
  8725. this.tdetail = val;
  8726. } else if (this.dialogVisible6) {
  8727. this.AttText.text = val;
  8728. } else if (this.dialogVisible2) {
  8729. this.cTemplate = val;
  8730. } else if (this.dialogVisibleTable) {
  8731. this.tableJson.text = val;
  8732. }
  8733. this.$forceUpdate();
  8734. console.log(val);
  8735. },
  8736. change2(val) {
  8737. console.log(val);
  8738. this.$forceUpdate();
  8739. },
  8740. handleClose(done) {
  8741. done();
  8742. },
  8743. closePan(tool) {
  8744. if (tool == 15) {
  8745. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8746. this.dialogVisible8 = false;
  8747. } else {
  8748. this.closeConfirm(tool);
  8749. }
  8750. } else if (tool == 4) {
  8751. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8752. this.dialogVisible5 = false;
  8753. } else {
  8754. this.closeConfirm(tool);
  8755. }
  8756. } else if (tool == 45) {
  8757. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8758. this.dialogVisibleChoice = false;
  8759. } else {
  8760. this.closeConfirm(tool);
  8761. }
  8762. } else if (tool == 41) {
  8763. if (
  8764. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8765. ) {
  8766. this.dialogVisibleSelect = false;
  8767. } else {
  8768. this.closeConfirm(tool);
  8769. }
  8770. } else if (tool == 47) {
  8771. if (
  8772. JSON.stringify(this.sentenceList) ==
  8773. JSON.stringify(this.sentenceList2)
  8774. ) {
  8775. this.dialogVisibleSentence = false;
  8776. } else {
  8777. this.closeConfirm(tool);
  8778. }
  8779. } else if (tool == 69) {
  8780. if (
  8781. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8782. ) {
  8783. this.englishDialogVisible = false;
  8784. } else {
  8785. this.closeConfirm(tool);
  8786. }
  8787. }
  8788. },
  8789. closeConfirm(tool) {
  8790. this.$confirm("是否保存已编辑内容?", "提示", {
  8791. confirmButtonText: "保存",
  8792. cancelButtonText: "不保存",
  8793. type: "warning",
  8794. })
  8795. .then(() => {
  8796. if (tool == 15) {
  8797. this.addAnswer();
  8798. } else if (tool == 4) {
  8799. this.addAsk();
  8800. } else if (tool == 45) {
  8801. this.addTest();
  8802. } else if (tool == 41) {
  8803. this.addSelectAnswer();
  8804. } else if (tool == 47) {
  8805. this.addSentenceTool();
  8806. } else if (tool == 69) {
  8807. this.addEnglish();
  8808. }
  8809. })
  8810. .catch(() => {
  8811. if (tool == 15) {
  8812. this.dialogVisible8 = false;
  8813. } else if (tool == 4) {
  8814. this.dialogVisible5 = false;
  8815. } else if (tool == 45) {
  8816. this.dialogVisibleChoice = false;
  8817. } else if (tool == 41) {
  8818. this.dialogVisibleSelect = false;
  8819. } else if (tool == 47) {
  8820. this.dialogVisibleSentence = false;
  8821. } else if (tool == 69) {
  8822. this.englishDialogVisible = false;
  8823. }
  8824. });
  8825. },
  8826. addEnglish(jsonType) {
  8827. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  8828. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  8829. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  8830. if (
  8831. this.englishList.engTitle == "" ||
  8832. this.englishList.englishText == ""
  8833. ) {
  8834. this.$message.error("请将内容填写完整!");
  8835. return;
  8836. }
  8837. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8838. this.taskCount
  8839. ].toolChoose[this.toolIndex].englishList = this.englishList;
  8840. this.englishList = {};
  8841. if (jsonType && jsonType == 1) {
  8842. this.englishDialogVisible = true;
  8843. } else {
  8844. this.englishDialogVisible = false;
  8845. }
  8846. if (
  8847. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  8848. .toolChoose[this.toolIndex].tool != 69
  8849. ) {
  8850. this.addTools(69, this.taskCount, this.toolIndex);
  8851. }
  8852. },
  8853. imgChange2(i, j) {
  8854. var _tmp = this.testJson.testJson[i].checkList[j];
  8855. this.noneBtnImg = _tmp.length >= 1;
  8856. },
  8857. imgChange3(i) {
  8858. var _tmp = this.testJson.testJson[i];
  8859. this.noneBtnImg = _tmp.length >= 1;
  8860. },
  8861. imgChange1(file, fileList, type, itemTaskIndex) {
  8862. if (type == 1) {
  8863. var _tmp = this.cover;
  8864. } else if (
  8865. type == 2 ||
  8866. type == 3 ||
  8867. type == 6 ||
  8868. type == 7 ||
  8869. type == 8
  8870. ) {
  8871. var _tmp =
  8872. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8873. .chapterData;
  8874. } else if (type == 4) {
  8875. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  8876. } else {
  8877. var _tmp =
  8878. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8879. .homeworkList;
  8880. }
  8881. this.noneBtnImg = _tmp.length >= 1;
  8882. },
  8883. goTo(path) {
  8884. this.$router.push(path);
  8885. },
  8886. guid() {
  8887. var _num,
  8888. i,
  8889. _guid = "";
  8890. for (i = 0; i < 32; i++) {
  8891. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  8892. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  8893. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  8894. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  8895. _guid += "-";
  8896. }
  8897. }
  8898. return _guid;
  8899. },
  8900. retrunCourse() {
  8901. if(this.istemplate == 1){
  8902. this.goTo(
  8903. "/course?userid=" +
  8904. this.userid +
  8905. "&oid=" +
  8906. this.oid +
  8907. "&org=" +
  8908. this.org +
  8909. "&role=" +
  8910. this.role
  8911. );
  8912. return
  8913. }
  8914. this.$confirm("是否保存已编辑内容?", "提示", {
  8915. confirmButtonText: "保存",
  8916. cancelButtonText: "不保存",
  8917. distinguishCancelAndClose: true,
  8918. type: "warning",
  8919. customClass: 'custom-confirm-box'
  8920. })
  8921. .then(() => {
  8922. if (this.taskLoading.length) {
  8923. let _pan = 1
  8924. for(var k = 0; k < this.taskLoading.length; k++){
  8925. if(this.taskLoading[k]){
  8926. this.$message({
  8927. message: `请等待任务${k+1}回答完毕后再保存`,
  8928. type: "warning"
  8929. });
  8930. _pan = 2
  8931. }
  8932. }
  8933. if(_pan == 2){
  8934. return
  8935. }
  8936. }
  8937. if(this.taskGLoading.length){
  8938. let _pan = 1
  8939. for(var k = 0; k < this.taskGLoading.length; k++){
  8940. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8941. this.$message({
  8942. message: `请等待任务${k+1}回答完毕后再保存`,
  8943. type: "warning"
  8944. });
  8945. _pan = 2
  8946. }
  8947. }
  8948. if(_pan == 2){
  8949. return
  8950. }
  8951. }
  8952. let pan2 = 1
  8953. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  8954. for(var index = 0; index < taskJson.length; index++){
  8955. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  8956. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  8957. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  8958. this.$message({
  8959. message: `请等待任务${index+1}回答完毕后再继续`,
  8960. type: "warning"
  8961. });
  8962. pan2 = 2
  8963. }
  8964. }
  8965. }
  8966. }
  8967. if(pan2 == 2){
  8968. return
  8969. }
  8970. if (this.cid == "" || this.cid == undefined) {
  8971. if (this.courseName == "") {
  8972. this.$message.error("请补充填写课程名称");
  8973. return;
  8974. } else {
  8975. this.addWork();
  8976. }
  8977. this.steps = 4;
  8978. } else {
  8979. if (this.courseName == "") {
  8980. this.$message.error("请补充填写课程名称");
  8981. return;
  8982. } else {
  8983. if (this.userid != this.courseUserid && this.role != "1") {
  8984. this.updateWork2();
  8985. } else {
  8986. this.updateWork();
  8987. }
  8988. this.steps = 4;
  8989. }
  8990. }
  8991. })
  8992. .catch((v) => {
  8993. console.log(v);
  8994. if (v == "cancel") {
  8995. this.goTo(
  8996. "/course?userid=" +
  8997. this.userid +
  8998. "&oid=" +
  8999. this.oid +
  9000. "&org=" +
  9001. this.org +
  9002. "&role=" +
  9003. this.role
  9004. );
  9005. }
  9006. });
  9007. setTimeout(() => {
  9008. this.setTipsIndex()
  9009. }, 500)
  9010. },
  9011. lastSteps() {
  9012. if (this.steps == 4) {
  9013. this.goTo(
  9014. "/course?userid=" +
  9015. this.userid +
  9016. "&oid=" +
  9017. this.oid +
  9018. "&org=" +
  9019. this.org +
  9020. "&role=" +
  9021. this.role
  9022. );
  9023. } else {
  9024. // if (this.cidType == 0) {
  9025. // this.steps--;
  9026. // if (this.steps == 1) {
  9027. // setTimeout(() => {
  9028. // this.checkEva(this.checkId);
  9029. // setTimeout(() => {
  9030. // this.checkEva(this.checkId);
  9031. // }, 100);
  9032. // }, 100);
  9033. // }
  9034. // } else {
  9035. if (this.steps == 3) {
  9036. this.steps = 1;
  9037. setTimeout(() => {
  9038. this.checkEva(this.checkId);
  9039. setTimeout(() => {
  9040. this.checkEva(this.checkId);
  9041. }, 100);
  9042. }, 100);
  9043. }
  9044. // }
  9045. }
  9046. },
  9047. navSteps(s) {
  9048. if (this.courseName == "") {
  9049. this.$message.error("请补充填写课程名称");
  9050. return;
  9051. }
  9052. if (this.cidType == 0) {
  9053. if (this.steps == 1) {
  9054. if (this.cid == "" || this.cid == undefined) {
  9055. this.addWork();
  9056. } else {
  9057. if (this.userid != this.courseUserid && this.role != "1") {
  9058. this.updateWork2();
  9059. } else {
  9060. this.updateWork();
  9061. }
  9062. }
  9063. }
  9064. if (s == 1) {
  9065. this.steps = 1;
  9066. setTimeout(() => {
  9067. this.checkEva(this.checkId);
  9068. setTimeout(() => {
  9069. this.checkEva(this.checkId);
  9070. }, 100);
  9071. }, 100);
  9072. }
  9073. if (s == 2) {
  9074. this.steps = 2;
  9075. }
  9076. if (s == 3) {
  9077. this.cTemplate = this.templateC.content;
  9078. this.dialogVisible2 = false;
  9079. this.steps = 3;
  9080. this.isClickColor = 1;
  9081. this.unitJson[
  9082. this.unitIndex
  9083. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9084. this.$forceUpdate();
  9085. setTimeout(() => {
  9086. this.checkEva(this.checkId);
  9087. setTimeout(() => {
  9088. this.checkEva(this.checkId);
  9089. }, 100);
  9090. }, 1000);
  9091. }
  9092. } else {
  9093. if (this.steps == 1) {
  9094. if (this.cid == "" || this.cid == undefined) {
  9095. this.addWork();
  9096. } else {
  9097. if (this.userid != this.courseUserid && this.role != "1") {
  9098. this.updateWork2();
  9099. } else {
  9100. this.updateWork();
  9101. }
  9102. }
  9103. }
  9104. if (s == 1) {
  9105. this.steps = 1;
  9106. setTimeout(() => {
  9107. this.checkEva(this.checkId);
  9108. setTimeout(() => {
  9109. this.checkEva(this.checkId);
  9110. }, 100);
  9111. }, 100);
  9112. }
  9113. if (s == 3) {
  9114. this.cTemplate = this.templateC.content;
  9115. this.dialogVisible2 = false;
  9116. this.steps = 3;
  9117. this.isClickColor = 1;
  9118. this.unitJson[
  9119. this.unitIndex
  9120. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9121. this.$forceUpdate();
  9122. setTimeout(() => {
  9123. this.checkEva(this.checkId);
  9124. setTimeout(() => {
  9125. this.checkEva(this.checkId);
  9126. }, 100);
  9127. }, 1000);
  9128. }
  9129. }
  9130. this.$refs.stepBox.scrollTop = 0;
  9131. },
  9132. setTipsIndex(){
  9133. // 使用 setTimeout 确保对话框已经渲染完成
  9134. this.$nextTick(() => {
  9135. const dialog = document.querySelector('.custom-confirm-box');
  9136. if (dialog) {
  9137. const parent = dialog.parentElement;
  9138. if (parent) {
  9139. parent.style.zIndex = 9999999;
  9140. const adjacentElement = parent.nextElementSibling;
  9141. if (adjacentElement) {
  9142. adjacentElement.style.zIndex = 9999998;
  9143. }
  9144. }
  9145. }
  9146. });
  9147. },
  9148. nextSteps(clickType, ttype) {
  9149. if(!this.time()){
  9150. return
  9151. }
  9152. // if (this.cidType == 1) {
  9153. if (this.steps == 1) {
  9154. if (this.courseName != "") {
  9155. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  9156. // this.$message({
  9157. // message: "请回答完毕后再次发送",
  9158. // type: "warning"
  9159. // });
  9160. if(this.ttaskDetailLoading.length){
  9161. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  9162. this.$message({
  9163. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9164. type: "warning"
  9165. });
  9166. }
  9167. if(this.cpotetLoading.cpote1){
  9168. this.$message({
  9169. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  9170. type: "warning"
  9171. });
  9172. }
  9173. if(this.cpotetLoading.cpote2){
  9174. this.$message({
  9175. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  9176. type: "warning"
  9177. });
  9178. }
  9179. if(this.cpotetLoading.cpote3){
  9180. this.$message({
  9181. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  9182. type: "warning"
  9183. });
  9184. }
  9185. if(this.cpotetLoading.cpote4){
  9186. this.$message({
  9187. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  9188. type: "warning"
  9189. });
  9190. }
  9191. return;
  9192. }
  9193. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  9194. if(!this.courseText && !this.teacherCourseText){
  9195. this.$message.error("请生成简要描述后再生成大纲");
  9196. return;
  9197. }
  9198. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  9199. this.openAiDialog(clickType, 'aiOutline2')
  9200. if(clickType == 1){
  9201. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9202. }else {
  9203. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9204. }
  9205. }else {
  9206. this.openAiDialog(clickType, 'aiOutline')
  9207. if(clickType == 1){
  9208. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9209. }else {
  9210. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9211. }
  9212. }
  9213. return;
  9214. }
  9215. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  9216. let _type = ''
  9217. if(this.cpoteType == 0){
  9218. _type = 'aiCpote1'
  9219. if(clickType == 1){
  9220. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  9221. }else {
  9222. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  9223. }
  9224. }else if(this.cpoteType == 1){
  9225. _type = 'aiCpote2'
  9226. if(clickType == 1){
  9227. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  9228. }else {
  9229. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  9230. }
  9231. }else if(this.cpoteType == 2){
  9232. _type = 'aiCpote3'
  9233. if(clickType == 1){
  9234. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  9235. }else {
  9236. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  9237. }
  9238. }else if(this.cpoteType == 3){
  9239. _type = 'aiCpote4'
  9240. if(clickType == 1){
  9241. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  9242. }else {
  9243. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  9244. }
  9245. }
  9246. this.cpoteType++
  9247. this.openAiDialog(clickType, _type)
  9248. return;
  9249. }
  9250. // if (!this.isOutline2) {
  9251. // this.openAiDialog(clickType, 'aiTeacher')
  9252. // return;
  9253. // }
  9254. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  9255. this.openAiDialog(clickType, 'aiTeacher3')
  9256. if(clickType == 1){
  9257. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9258. }else {
  9259. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9260. }
  9261. return;
  9262. }
  9263. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  9264. this.openAiDialog(clickType, 'aiTeacher2')
  9265. if(clickType == 1){
  9266. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9267. }else {
  9268. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9269. }
  9270. return;
  9271. }
  9272. let _pan2 = 1
  9273. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  9274. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  9275. _pan2 = 2
  9276. this.$message.error(`请完善任务${k+1}的课程大纲`)
  9277. break;
  9278. }
  9279. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  9280. _pan2 = 2
  9281. this.$message.error(`请完善任务${k+1}的课程教案`)
  9282. break;
  9283. }
  9284. }
  9285. if(_pan2 == 2){
  9286. return;
  9287. }
  9288. const functionA = () => {
  9289. setTimeout(() => {
  9290. this.loading = false
  9291. this.steps = 3;
  9292. }, 0)
  9293. this.isClickColor = 1;
  9294. this.unitJson[
  9295. this.unitIndex
  9296. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9297. this.$forceUpdate();
  9298. setTimeout(() => {
  9299. this.checkEva(this.checkId);
  9300. setTimeout(() => {
  9301. this.checkEva(this.checkId);
  9302. }, 100);
  9303. }, 1000);
  9304. if (this.cid == "" || this.cid == undefined) {
  9305. this.addWork();
  9306. } else {
  9307. if (this.userid != this.courseUserid && this.role != "1") {
  9308. this.updateWork2();
  9309. } else {
  9310. this.updateWork();
  9311. }
  9312. }
  9313. }
  9314. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  9315. if(this.ttaskDetailLoading5.length){
  9316. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  9317. // this.$message({
  9318. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9319. // type: "warning"
  9320. // });
  9321. this.$confirm("还有教案描述未生成完毕,是否直接下一步?", "提示", {
  9322. confirmButtonText: "确定",
  9323. cancelButtonText: "取消",
  9324. distinguishCancelAndClose: true,
  9325. type: "warning",
  9326. customClass: 'custom-confirm-box'
  9327. })
  9328. .then(() => {
  9329. if(this.isTeacherTaskCancelToken2){
  9330. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  9331. if(this.isTeacherTaskCancelToken2[i]){
  9332. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  9333. this.isTeacherTaskCancelToken2[i] = null;
  9334. }
  9335. }
  9336. }
  9337. this.taskDetailLoading5 = []
  9338. this.ttaskDetailLoading5 = []
  9339. if(this.isTeacherTaskCancelSource){
  9340. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  9341. if(this.isTeacherTaskCancelSource[i]){
  9342. this.isTeacherTaskCancelSource[i].close()
  9343. this.isTeacherTaskCancelSource[i] = null
  9344. }
  9345. }
  9346. }
  9347. if (this.cid) {
  9348. this.loading = true
  9349. functionA()
  9350. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9351. } else {
  9352. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9353. if(clickType == 1){
  9354. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  9355. }else {
  9356. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9357. }
  9358. }
  9359. }).catch((v) => {
  9360. console.log(v);
  9361. })
  9362. setTimeout(() => {
  9363. this.setTipsIndex()
  9364. }, 500)
  9365. }
  9366. return;
  9367. }
  9368. if (this.cid && this.panTask() > 0) {
  9369. this.loading = true
  9370. functionA()
  9371. } else {
  9372. // if(ttype == 2){
  9373. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9374. // }else {
  9375. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  9376. // }
  9377. }
  9378. } else {
  9379. this.$message.error("请补充填写课程名称");
  9380. return;
  9381. }
  9382. } else if (this.steps == 3) {
  9383. if (this.taskLoading.length) {
  9384. let _pan = 1
  9385. for(var k = 0; k < this.taskLoading.length; k++){
  9386. if(this.taskLoading[k]){
  9387. this.$message({
  9388. message: `请等待任务${k+1}回答完毕后再上传`,
  9389. type: "warning"
  9390. });
  9391. _pan = 2
  9392. }
  9393. }
  9394. if(_pan == 2){
  9395. return
  9396. }
  9397. }
  9398. if(this.taskGLoading.length){
  9399. let _pan = 1
  9400. for(var k = 0; k < this.taskGLoading.length; k++){
  9401. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9402. this.$message({
  9403. message: `请等待任务${k+1}回答完毕后再保存`,
  9404. type: "warning"
  9405. });
  9406. _pan = 2
  9407. }
  9408. }
  9409. if(_pan == 2){
  9410. return
  9411. }
  9412. }
  9413. let pan2 = 1
  9414. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9415. for(var index = 0; index < taskJson.length; index++){
  9416. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9417. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9418. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9419. this.$message({
  9420. message: `请等待任务${index+1}回答完毕后再继续`,
  9421. type: "warning"
  9422. });
  9423. pan2 = 2
  9424. }
  9425. }
  9426. }
  9427. }
  9428. if(pan2 == 2){
  9429. return
  9430. }
  9431. if (this.cid == "" || this.cid == undefined) {
  9432. if (this.courseName == "") {
  9433. this.$message.error("请补充填写课程名称");
  9434. return;
  9435. } else {
  9436. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9437. this.addWork();
  9438. this.steps++;
  9439. }
  9440. } else {
  9441. if (this.courseName == "") {
  9442. this.$message.error("请补充填写课程名称");
  9443. return;
  9444. } else {
  9445. if (this.userid != this.courseUserid && this.role != "1") {
  9446. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9447. this.updateWork2();
  9448. } else {
  9449. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9450. this.updateWork();
  9451. }
  9452. this.steps++;
  9453. }
  9454. }
  9455. }
  9456. // } else {
  9457. // if (this.steps == 1) {
  9458. // if (this.courseName != "") {
  9459. // if (this.cid == "" || this.cid == undefined) {
  9460. // this.addWork();
  9461. // } else {
  9462. // if (this.userid != this.courseUserid && this.role != "1") {
  9463. // // this.updateWork2();
  9464. // } else {
  9465. // this.updateWork();
  9466. // }
  9467. // }
  9468. // this.steps++;
  9469. // } else {
  9470. // this.$message.error("请补充填写课程名称");
  9471. // return;
  9472. // }
  9473. // } else if (this.steps == 2) {
  9474. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  9475. // this.cTemplate = this.templateC.content;
  9476. // }
  9477. // this.dialogVisible2 = false;
  9478. // this.steps++;
  9479. // setTimeout(() => {
  9480. // this.checkEva(this.checkId);
  9481. // setTimeout(() => {
  9482. // this.checkEva(this.checkId);
  9483. // }, 100);
  9484. // }, 1000);
  9485. // } else if (this.steps == 3) {
  9486. // if (this.cid == "" || this.cid == undefined) {
  9487. // if (this.courseName == "") {
  9488. // this.$message.error("请补充填写课程名称");
  9489. // return;
  9490. // } else {
  9491. // this.addWork();
  9492. // this.steps++;
  9493. // }
  9494. // } else {
  9495. // if (this.courseName == "") {
  9496. // this.$message.error("请补充填写课程名称");
  9497. // return;
  9498. // } else {
  9499. // if (this.userid != this.courseUserid && this.role != "1") {
  9500. // this.updateWork2();
  9501. // } else {
  9502. // this.updateWork();
  9503. // }
  9504. // this.steps++;
  9505. // }
  9506. // }
  9507. // }
  9508. // }
  9509. this.$refs.stepBox.scrollTop = 0;
  9510. },
  9511. unitSet(i) {
  9512. if (this.unitIndex == i) {
  9513. return;
  9514. }
  9515. this.unitIndex = i;
  9516. this.isClickColor = 1;
  9517. // this.$refs.rightboxR.scrollTop = 0;
  9518. this.$refs.unitBox.scrollTop = 0;
  9519. },
  9520. panUnitJson() {
  9521. let _unitIndex = this.unitIndex;
  9522. let cPan = 1;
  9523. for (
  9524. var j = 0;
  9525. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9526. j++
  9527. ) {
  9528. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9529. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9530. j
  9531. ].proVisible2 = false;
  9532. if (
  9533. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9534. .length > 1
  9535. ) {
  9536. for (
  9537. var z = 0;
  9538. z <
  9539. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9540. .length;
  9541. z++
  9542. ) {
  9543. if (
  9544. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9545. z
  9546. ].tool.length
  9547. ) {
  9548. this.$message.error("请把工具添加完整");
  9549. cPan = 2;
  9550. break;
  9551. }
  9552. }
  9553. }
  9554. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9555. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9556. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9557. (ele) => {
  9558. return ele.value != "" || ele.detail != "" || ele.target != "";
  9559. }
  9560. );
  9561. }
  9562. }
  9563. return cPan;
  9564. },
  9565. unitOpen(i) {
  9566. if (this.unitJson[i].toolOpen) {
  9567. this.unitJson[i].toolOpen = false;
  9568. } else {
  9569. this.unitJson[i].toolOpen = true;
  9570. }
  9571. this.updateWork();
  9572. this.$forceUpdate();
  9573. },
  9574. unitSet2(i) {
  9575. if (this.panUnitJson() == 2) {
  9576. return;
  9577. }
  9578. // if(this.unitJson[i].toolOpen){
  9579. // this.unitJson[i].toolOpen = false
  9580. // this.updateWork()
  9581. // this.$forceUpdate()
  9582. // return
  9583. // }else {
  9584. this.unitJson[i].toolOpen = true;
  9585. // }
  9586. this.$forceUpdate();
  9587. if (this.unitIndex == i) {
  9588. return;
  9589. }
  9590. this.unitIndex = i;
  9591. this.isClickColor = 1;
  9592. // this.$refs.rightboxR.scrollTop = 0;
  9593. this.$refs.unitBox.scrollTop = 0;
  9594. },
  9595. updateCourseState(i) {
  9596. let params = [
  9597. {
  9598. cid: this.cid,
  9599. state: i,
  9600. },
  9601. ];
  9602. this.ajax
  9603. .post(this.$store.state.api + "updateCourseMode", params)
  9604. .then((res) => {
  9605. this.courseState = i;
  9606. })
  9607. .catch((err) => {
  9608. this.$message.error("网络不佳");
  9609. console.error(err);
  9610. });
  9611. },
  9612. addtips(){
  9613. let params = [
  9614. {
  9615. cid: this.cid,
  9616. tips: JSON.stringify(this.aiJson),
  9617. tid: this.templateid
  9618. },
  9619. ];
  9620. this.ajax
  9621. .post(this.$store.state.api + "addTips", params)
  9622. .then((res) => {
  9623. })
  9624. .catch((err) => {
  9625. this.$message.error("网络不佳");
  9626. console.error(err);
  9627. });
  9628. },
  9629. openSaveTips(){
  9630. this.dialogVisibleTips = true
  9631. },
  9632. time() {
  9633. if (!this.now) {
  9634. this.now = new Date().getTime();
  9635. return true;
  9636. } else {
  9637. let time = new Date().getTime();
  9638. if (time - this.now > 1000) {
  9639. this.now = time;
  9640. return true;
  9641. } else {
  9642. return false;
  9643. }
  9644. }
  9645. },
  9646. deleteUnit(i) {
  9647. var _this = this;
  9648. if (i == 0 && _this.unitJson.length == 1) {
  9649. _this
  9650. .$confirm("确定切换成任务模式吗?", "提示", {
  9651. confirmButtonText: "确定",
  9652. cancelButtonText: "取消",
  9653. type: "warning",
  9654. })
  9655. .then(() => {
  9656. _this.unitJson[i].dyName = "";
  9657. // _this.updateCourseState(2);
  9658. })
  9659. .catch(() => {
  9660. return;
  9661. });
  9662. } else {
  9663. _this
  9664. .$confirm("确定删除此阶段吗?", "提示", {
  9665. confirmButtonText: "确定",
  9666. cancelButtonText: "取消",
  9667. type: "warning",
  9668. })
  9669. .then(() => {
  9670. _this.isDelete = 2;
  9671. // _this.unitIndex = _this.unitIndex - 1;
  9672. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  9673. // _this.$message.success("删除成功");
  9674. })
  9675. .catch(() => {
  9676. return;
  9677. });
  9678. }
  9679. },
  9680. deleteWork(chapid) {
  9681. let params = [
  9682. {
  9683. cid: this.cid,
  9684. chapters: JSON.stringify(this.unitJson),
  9685. uid: this.userid,
  9686. chapid: chapid,
  9687. },
  9688. ];
  9689. this.ajax
  9690. .post(this.$store.state.api + "deleteWork", params)
  9691. .then((res) => {
  9692. this.$message({
  9693. message: "删除成功",
  9694. type: "success",
  9695. });
  9696. let task = JSON.parse(
  9697. JSON.stringify(
  9698. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  9699. )
  9700. );
  9701. this.unitJson.splice(this.unitIndex, 1);
  9702. if (this.unitIndex == 0) {
  9703. this.unitIndex = 0;
  9704. } else {
  9705. this.unitIndex = this.unitIndex - 1;
  9706. }
  9707. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  9708. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  9709. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  9710. ...task,
  9711. ];
  9712. }
  9713. })
  9714. .catch((err) => {
  9715. this.$message.error("网络不佳");
  9716. console.error(err);
  9717. });
  9718. },
  9719. deleteTool(itemTaskIndex, i) {
  9720. var _this = this;
  9721. if (_this.time()) {
  9722. _this
  9723. .$confirm("确定删除此工具吗?", "提示", {
  9724. confirmButtonText: "确定",
  9725. cancelButtonText: "取消",
  9726. type: "warning",
  9727. })
  9728. .then(() => {
  9729. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9730. itemTaskIndex
  9731. ].toolChoose.splice(i, 1);
  9732. _this.$message.success("删除成功");
  9733. })
  9734. .catch(() => {
  9735. return;
  9736. });
  9737. }
  9738. },
  9739. deleteSentence(i) {
  9740. var _this = this;
  9741. _this
  9742. .$confirm("确定删除此题目吗?", "提示", {
  9743. confirmButtonText: "确定",
  9744. cancelButtonText: "取消",
  9745. type: "warning",
  9746. })
  9747. .then(() => {
  9748. _this.sentenceList.splice(i, 1);
  9749. _this.$message.success("删除成功");
  9750. })
  9751. .catch(() => {
  9752. return;
  9753. });
  9754. },
  9755. deleteS(s, i, j) {
  9756. this.sentenceList[i].addSentence.splice(j, 1);
  9757. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9758. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9759. this.sentenceList[i].rightAnswer.splice(a, 1);
  9760. }
  9761. },
  9762. openT() {
  9763. top.postMessage({ tools: "25" }, "*");
  9764. },
  9765. deleteTask(i) {
  9766. var _this = this;
  9767. if (_this.time()) {
  9768. _this
  9769. .$confirm(
  9770. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9771. 1 ==
  9772. i
  9773. ? "确定删除此任务吗?"
  9774. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  9775. "提示",
  9776. {
  9777. confirmButtonText: "确定",
  9778. cancelButtonText: "取消",
  9779. type: "warning",
  9780. }
  9781. )
  9782. .then(() => {
  9783. if (i == 0 && _this.courseState == 4) {
  9784. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9785. i + 1
  9786. ].chapterData = JSON.parse(
  9787. JSON.stringify(
  9788. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9789. .chapterData
  9790. )
  9791. );
  9792. }
  9793. _this.$forceUpdate();
  9794. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9795. i,
  9796. 1
  9797. );
  9798. _this.$message.success("删除成功");
  9799. })
  9800. .catch(() => {
  9801. return;
  9802. });
  9803. }
  9804. },
  9805. deleteTask2(i) {
  9806. var _this = this;
  9807. if (_this.time()) {
  9808. _this
  9809. .$confirm(
  9810. "确定删除此任务吗?",
  9811. "提示",
  9812. {
  9813. confirmButtonText: "确定",
  9814. cancelButtonText: "取消",
  9815. type: "warning",
  9816. }
  9817. )
  9818. .then(() => {
  9819. if (i == 0 && _this.courseState == 4) {
  9820. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9821. i + 1
  9822. ].chapterData = JSON.parse(
  9823. JSON.stringify(
  9824. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9825. .chapterData
  9826. )
  9827. );
  9828. }
  9829. _this.$forceUpdate();
  9830. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9831. i,
  9832. 1
  9833. );
  9834. _this.$message.success("删除成功");
  9835. })
  9836. .catch(() => {
  9837. return;
  9838. });
  9839. }
  9840. },
  9841. handlePictureCardPreview(file) {
  9842. this.dialogImageUrl = file.url;
  9843. },
  9844. clean(i, c) {
  9845. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  9846. },
  9847. handle_remove1(file, fileList, type) {
  9848. var _tmp = this.cover;
  9849. // for (var i = 0, len = _tmp.length; i < len; i++) {
  9850. // if (_tmp[i].uid == file.uid) {
  9851. // _tmp.splice(i, 1);
  9852. // break;
  9853. // }
  9854. // this.cover = _tmp;
  9855. // }
  9856. this.cover = [];
  9857. this.noneBtnImg = this.cover.length >= 1;
  9858. this.isSysPic = false;
  9859. this.isSysPic2 = false;
  9860. this.$forceUpdate();
  9861. },
  9862. addImg(e) {
  9863. var el = e.currentTarget;
  9864. el.getElementsByTagName("input")[0].click();
  9865. e.target.value = "";
  9866. },
  9867. addChaptersTools(i) {
  9868. this.chapTools = [
  9869. {
  9870. tools: [],
  9871. toolDetail: "",
  9872. },
  9873. ];
  9874. this.chapCount = i;
  9875. this.dialogVisible4 = true;
  9876. },
  9877. isNoFinsh() {
  9878. this.$message.warning("功能正在开发中");
  9879. },
  9880. addAttText(i) {
  9881. this.AttText = {
  9882. title: "",
  9883. text: "",
  9884. };
  9885. this.taskCount = i;
  9886. this.AttTextType = 0;
  9887. this.$forceUpdate();
  9888. this.dialogVisible6 = true;
  9889. setTimeout(() => {
  9890. this.$refs["fuInput"].focus();
  9891. }, 100);
  9892. },
  9893. openLine(i) {
  9894. this.line = "";
  9895. this.lineCount = i;
  9896. this.lineType = 0;
  9897. this.$forceUpdate();
  9898. this.dialogVisible7 = true;
  9899. },
  9900. pasteLine(i) {
  9901. navigator.clipboard
  9902. .readText()
  9903. .then((v) => {
  9904. console.log("获取剪贴板成功:", v);
  9905. const html = v;
  9906. const regex = /src="(.*?)"/g;
  9907. const match = regex.exec(html);
  9908. if (match && match[1]) {
  9909. console.log(match[1]);
  9910. this.$message.success("粘贴成功");
  9911. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9912. i
  9913. ].chapterData.unshift({
  9914. name: "链接",
  9915. title: "嵌入代码",
  9916. url: match[1],
  9917. type: 8,
  9918. });
  9919. } else {
  9920. // console.log("未找到包含 src 属性的 iframe");
  9921. this.$message.error(
  9922. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  9923. );
  9924. }
  9925. })
  9926. .catch((v) => {
  9927. console.log("获取剪贴板失败: ", v);
  9928. });
  9929. },
  9930. openSource(i) {
  9931. this.lineCount = i;
  9932. this.sourceData = {};
  9933. this.dialogVisibleSource = true;
  9934. this.updateSourcePan = false;
  9935. },
  9936. openAiCreate(i){
  9937. // this.lineCount = i;
  9938. // this.dialogVisibleAiCreate = true;
  9939. if(!this.pptCount.includes(i)){
  9940. this.pptCount.push(i)
  9941. this.dialogVisibleAiCreate2.push(i);
  9942. }else{
  9943. this.$refs['ppt'+i][0].tanDialog = false
  9944. this.$refs['ppt'+i][0].dialogVisibleAiCreate2 = true
  9945. }
  9946. this.pptBoxDialog = true
  9947. },
  9948. createAiPpt(json, i){
  9949. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9950. // this.dialogVisibleAiCreate = false;
  9951. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  9952. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  9953. },
  9954. closeAiPpt(i){
  9955. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  9956. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  9957. },
  9958. openAiCreateVideo(i){
  9959. this.lineCount = i;
  9960. this.dialogVisibleAiCreateVideo = true;
  9961. },
  9962. createAiVideo(json){
  9963. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9964. // this.dialogVisibleAiCreateVideo = false;
  9965. },
  9966. async createTeacherAn(index, type){
  9967. // this.lineCount = index;
  9968. let md = new MarkdownIt();
  9969. if(this.courseState == 4){
  9970. this.anLoading[0] = true
  9971. // if(index == 0 || index){
  9972. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9973. // let name = _task.task+'-教案'
  9974. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9975. // await this.generate(name, _html, 0)
  9976. // }else {
  9977. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9978. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9979. let name = `任务${i+1}`+_task.task+'-教案'
  9980. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9981. await this.generate(name, _html, 0)
  9982. }
  9983. // }
  9984. }else if(this.courseState == 5){
  9985. if(type != 2){
  9986. this.anLoading[index] = true
  9987. }
  9988. if(index == 0 || index){
  9989. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9990. let name = `任务${index+1}`+_task.task+'-教案'
  9991. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9992. await this.generate(name, _html, index,"", type)
  9993. }else {
  9994. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9995. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9996. let name = `任务${i+1}`+_task.task+'-教案'
  9997. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9998. await this.generate(name, _html, i)
  9999. }
  10000. }
  10001. }
  10002. },
  10003. async createTaskAn(index){
  10004. // this.lineCount = index;
  10005. if(this.taskAnLoading[index]){
  10006. // this.$message.error('请等待当前学历案生成完成')
  10007. this.cancelAjax('taskAn', index)
  10008. return
  10009. }
  10010. this.taskAnLoading[index] = true
  10011. this.$forceUpdate()
  10012. let _this = this
  10013. let md = new MarkdownIt();
  10014. let messages = ""
  10015. messages = `NOTICE
  10016. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  10017. Language: ${this.getLang()}
  10018. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  10019. ## 任务教案
  10020. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  10021. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  10022. let parm = {
  10023. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  10024. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  10025. session_name: uuidv4(),
  10026. userId: this.userid,
  10027. file_ids: [],
  10028. model: 'gpt-4o-2024-11-20',
  10029. temperature: this.mode == 3 ? 0.5 : 0.1,
  10030. }
  10031. this.ajax
  10032. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  10033. .then(async (response) => {
  10034. console.log(response);
  10035. let data = response.data.FunctionResponse
  10036. if (data.message) {
  10037. console.log(data.message);
  10038. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  10039. let name = _task.task+'-学历案'
  10040. let _html = md.render(data.message)
  10041. await _this.generate(name, _html, index, ()=>{
  10042. _this.taskAnLoading[index] = false
  10043. _this.taskAnCancelToken[index] = null
  10044. })
  10045. }else{
  10046. _this.taskAnLoading[index] = false
  10047. _this.taskAnCancelToken[index] = null
  10048. }
  10049. }).catch((error) => {
  10050. console.log(error);
  10051. _this.taskAnLoading[index] = false
  10052. _this.taskAnCancelToken[index] = null
  10053. });
  10054. },
  10055. async generate(a, html, index, callback, type) {
  10056. // <html lang="en">
  10057. // 将html文件中需要用到的数据挂载到store上
  10058. const content = `<!DOCTYPE html>
  10059. <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'>
  10060. <head>
  10061. <!--[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]-->
  10062. <meta charset="UTF-8">
  10063. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10064. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10065. <title>${a}</title>
  10066. <style>
  10067. table {
  10068. border-collapse: collapse; /* 折叠边框 */
  10069. width: 100%;
  10070. }
  10071. th, td {
  10072. border: 1px solid black; /* 线条样式 */
  10073. padding: 8px;
  10074. text-align: left;
  10075. }
  10076. </style>
  10077. </head>
  10078. <body>
  10079. ${html}
  10080. </body>
  10081. </html>`;
  10082. // debugger
  10083. const blob = htmlDocx.asBlob(content)
  10084. // debugger
  10085. let dname = a + ".docx";
  10086. // 创建文件流
  10087. // 创建bolb实例时,内容一定要放在[]中
  10088. // const blob = new Blob([content], {
  10089. // type: "text/plain;charset='utf-8'",
  10090. // });
  10091. // const file = new File([blob], dname, { type: 'application/msword' });
  10092. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10093. // let params = convertApi.createParams()
  10094. // params.add('file', file)
  10095. // try {
  10096. // let result = await convertApi.convert('docx', 'docx', params)
  10097. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10098. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10099. // });
  10100. // await this.beforeUploadHtml(file, index, callback)
  10101. // } catch (error) {
  10102. // console.log('=================','报错')
  10103. // await this.beforeUploadHtml(file, index, callback)
  10104. // return
  10105. // }
  10106. await this.beforeUploadHtml(file, index, callback, type)
  10107. },
  10108. async generateExport(a, html, index) {
  10109. // <html lang="en">
  10110. // 将html文件中需要用到的数据挂载到store上
  10111. const content = `<!DOCTYPE html>
  10112. <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'>
  10113. <head>
  10114. <!--[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]-->
  10115. <meta charset="UTF-8">
  10116. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10117. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10118. <title>${a}</title>
  10119. <style>
  10120. table {
  10121. border-collapse: collapse; /* 折叠边框 */
  10122. width: 100%;
  10123. }
  10124. th, td {
  10125. border: 1px solid black; /* 线条样式 */
  10126. padding: 8px;
  10127. text-align: left;
  10128. }
  10129. </style>
  10130. </head>
  10131. <body>
  10132. ${html}
  10133. </body>
  10134. </html>`;
  10135. // debugger
  10136. const blob = htmlDocx.asBlob(content)
  10137. // debugger
  10138. const dname = `${a}.docx`;
  10139. // 创建文件流
  10140. // const file = new File([blob], dname, { type: 'application/msword' });
  10141. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10142. // let params = convertApi.createParams()
  10143. // params.add('file', file)
  10144. // try {
  10145. // let result = await convertApi.convert('docx', 'docx', params)
  10146. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10147. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10148. // });
  10149. // // 执行下载
  10150. // saveAs(file, dname);
  10151. // } catch (error) {
  10152. // saveAs(file, dname);
  10153. // // this.$message.error('导出失败')
  10154. // }
  10155. saveAs(file, dname);
  10156. // return file
  10157. },
  10158. async generateExport2(a, html, index) {
  10159. return new Promise(async (resolve) => {
  10160. // <html lang="en">
  10161. // 将html文件中需要用到的数据挂载到store上
  10162. const content = `<!DOCTYPE html>
  10163. <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'>
  10164. <head>
  10165. <!--[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]-->
  10166. <meta charset="UTF-8">
  10167. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10168. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10169. <title>${a}</title>
  10170. <style>
  10171. table {
  10172. border-collapse: collapse; /* 折叠边框 */
  10173. width: 100%;
  10174. }
  10175. th, td {
  10176. border: 1px solid black; /* 线条样式 */
  10177. padding: 8px;
  10178. text-align: left;
  10179. }
  10180. </style>
  10181. </head>
  10182. <body>
  10183. ${html}
  10184. </body>
  10185. </html>`;
  10186. // debugger
  10187. const blob = htmlDocx.asBlob(content)
  10188. // debugger
  10189. const dname = `${a}`;
  10190. // 创建文件流
  10191. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10192. let params = convertApi.createParams()
  10193. params.add('file', file)
  10194. resolve(file); // 通过 Promise 返回 File 对象
  10195. // try {
  10196. // let result = await convertApi.convert('docx', 'docx', params)
  10197. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10198. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10199. // });
  10200. // resolve(file); // 通过 Promise 返回 File 对象
  10201. // } catch (error) {
  10202. // resolve(''); // 通过 Promise 返回 File 对象
  10203. // }
  10204. });
  10205. },
  10206. async addChatAppendixFile(name, html){
  10207. await this.generate(name, html, 0,"", 3)
  10208. },
  10209. beforeUploadHtml(event, index, callback, type) {
  10210. var file = event;
  10211. var credentials = {
  10212. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10213. secretAccessKey: "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",
  10214. }; //秘钥形式的登录上传
  10215. window.AWS.config.update(credentials);
  10216. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10217. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10218. var _this = this;
  10219. if (file) {
  10220. var params = {
  10221. Key:
  10222. file.name.split(".")[0] +
  10223. new Date().getTime() +
  10224. "." +
  10225. file.name.split(".")[file.name.split(".").length - 1],
  10226. ContentType: file.type,
  10227. Body: file,
  10228. "Access-Control-Allow-Credentials": "*",
  10229. ACL: "public-read",
  10230. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10231. var options = {
  10232. partSize: 2048 * 1024 * 1024,
  10233. queueSize: 2,
  10234. leavePartsOnError: true,
  10235. };
  10236. bucket
  10237. .upload(params, options)
  10238. .on("httpUploadProgress", function (evt) {
  10239. //这里可以写进度条
  10240. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10241. })
  10242. .send(function (err, data) {
  10243. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  10244. _this.anLoading[0] = false
  10245. }
  10246. if(_this.courseState == 5){
  10247. _this.anLoading[index] = false
  10248. }
  10249. callback ? callback() : ''
  10250. _this.$forceUpdate();
  10251. if (err) {
  10252. _this.$message.error("上传失败");
  10253. } else {
  10254. let _index = 0
  10255. // if(_this.lineCount == 0 || _this.lineCount){
  10256. // _index = _this.lineCount
  10257. // }else {
  10258. _index = index
  10259. // }
  10260. if(type != 2 && type != 3){
  10261. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  10262. name: file.name,
  10263. url: data.Location,
  10264. type: 3,
  10265. })
  10266. }else{
  10267. let fileName = file.name;
  10268. let baseName = fileName.split('.').slice(0, -1).join('.'); // 获取不带扩展名的文件名
  10269. let extension = fileName.split('.').pop(); // 获取文件扩展名
  10270. let count = 1;
  10271. // 检查文件名是否已存在
  10272. while (_this.appendixFile.some(item => item.name === fileName)) {
  10273. fileName = `${baseName} (${count}).${extension}`; // 修改文件名
  10274. count++;
  10275. }
  10276. if(type == 3){
  10277. _this.$message.success('保存到附件成功')
  10278. _this.appendixFile.unshift({
  10279. name: fileName,
  10280. url: data.Location,
  10281. type: 3,
  10282. task: 'dialog'
  10283. })
  10284. }else{
  10285. _this.appendixFile.unshift({
  10286. name: fileName,
  10287. url: data.Location,
  10288. type: 3,
  10289. })
  10290. }
  10291. }
  10292. console.log(data.Location);
  10293. }
  10294. });
  10295. }
  10296. },
  10297. async generate2(a, html, index, callback) {
  10298. // 将html文件中需要用到的数据挂载到store上
  10299. const content = `<!DOCTYPE html>
  10300. <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'>
  10301. <head>
  10302. <!--[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]-->
  10303. <meta charset="UTF-8">
  10304. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10305. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10306. <title>${a}</title>
  10307. <style>
  10308. table {
  10309. border-collapse: collapse; /* 折叠边框 */
  10310. width: 100%;
  10311. }
  10312. th, td {
  10313. border: 1px solid black; /* 线条样式 */
  10314. padding: 8px;
  10315. text-align: left;
  10316. }
  10317. </style>
  10318. </head>
  10319. <body>
  10320. ${html}
  10321. </body>
  10322. </html>`;
  10323. const blob = htmlDocx.asBlob(content)
  10324. // debugger
  10325. let dname = a + ".docx";
  10326. // 创建文件流
  10327. // 创建bolb实例时,内容一定要放在[]中
  10328. // const blob = new Blob([content], {
  10329. // type: "text/plain;charset='utf-8'",
  10330. // });
  10331. // const file = new File([blob], dname, { type: 'application/msword' });
  10332. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10333. // let params = convertApi.createParams()
  10334. // params.add('file', file)
  10335. // try {
  10336. // let result = await convertApi.convert('docx', 'docx', params)
  10337. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10338. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10339. // });
  10340. // await this.beforeUploadHtml2(file, index, callback)
  10341. // } catch (error) {
  10342. // await this.beforeUploadHtml2(file, index, callback)
  10343. // return;
  10344. // }
  10345. await this.beforeUploadHtml2(file, index, callback)
  10346. },
  10347. beforeUploadHtml2(event, index, callback) {
  10348. var file = event;
  10349. var credentials = {
  10350. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10351. secretAccessKey: "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",
  10352. }; //秘钥形式的登录上传
  10353. window.AWS.config.update(credentials);
  10354. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10355. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10356. var _this = this;
  10357. if (file) {
  10358. var params = {
  10359. Key:
  10360. file.name.split(".")[0] +
  10361. new Date().getTime() +
  10362. "." +
  10363. file.name.split(".")[file.name.split(".").length - 1],
  10364. ContentType: file.type,
  10365. Body: file,
  10366. "Access-Control-Allow-Credentials": "*",
  10367. ACL: "public-read",
  10368. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10369. var options = {
  10370. partSize: 2048 * 1024 * 1024,
  10371. queueSize: 2,
  10372. leavePartsOnError: true,
  10373. };
  10374. bucket
  10375. .upload(params, options)
  10376. .on("httpUploadProgress", function (evt) {
  10377. //这里可以写进度条
  10378. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10379. })
  10380. .send(async function (err, data) {
  10381. if(_this.courseState == 5){
  10382. _this.loading = false
  10383. }
  10384. if (err) {
  10385. callback ? callback() : ''
  10386. _this.$message.error("上传失败");
  10387. } else {
  10388. let fileid = await _this.createFileid(data.Location)
  10389. // _this.cankaoInfoData.push({
  10390. //                   name: file.name,
  10391. //                   url: data.Location,
  10392. //                   type: 3,
  10393. // fileid: fileid,
  10394. //   })
  10395. _this.infoData2.push({
  10396.                   name: file.name,
  10397.                   url: data.Location,
  10398.                   type: 3,
  10399. fileid: fileid == 1 ? '' : fileid,
  10400.   })
  10401. _this.infoData.push({
  10402. name: file.name,
  10403. url: data.Location,
  10404. type: 3,
  10405. fileid: fileid == 1 ? '' : fileid,
  10406. });
  10407. console.log(data.Location);
  10408. callback ? callback() : ''
  10409. }
  10410. });
  10411. }
  10412. },
  10413. addSource() {
  10414. if (!Object.keys(this.sourceData).length) {
  10415. this.$message.error("请选择要上传的资源");
  10416. return;
  10417. }
  10418. let keys = Object.keys(this.sourceData);
  10419. for (var i = 0; i < keys.length; i++) {
  10420. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10421. this.lineCount
  10422. ].chapterData.unshift({
  10423. name: "链接",
  10424. title: this.sourceData[keys[i]].name,
  10425. url: this.sourceData[keys[i]].url,
  10426. type: 14,
  10427. id: keys[i],
  10428. });
  10429. }
  10430. this.$forceUpdate();
  10431. this.dialogVisibleSource = false;
  10432. },
  10433. updateSource() {
  10434. if (!Object.keys(this.sourceData).length) {
  10435. this.$message.error("请选择要上传的资源");
  10436. return;
  10437. }
  10438. let keys = Object.keys(this.sourceData);
  10439. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10440. this.taskCount
  10441. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  10442. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10443. this.taskCount
  10444. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  10445. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10446. this.taskCount
  10447. ].chapterData[this.lineCount].id = keys[0];
  10448. this.updateSourcePan = false;
  10449. this.$forceUpdate();
  10450. this.dialogVisibleSource = false;
  10451. },
  10452. deleteM(i, j) {
  10453. this.testJson.testJson[i].timuList.splice(j, 1);
  10454. },
  10455. beforeUploadTiMu(event, i) {
  10456. const loading = this.openLoading();
  10457. var file = event.target.files[0];
  10458. var credentials = {
  10459. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10460. secretAccessKey: "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",
  10461. }; //秘钥形式的登录上传
  10462. window.AWS.config.update(credentials);
  10463. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10464. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10465. var _this = this;
  10466. if (file) {
  10467. var params = {
  10468. Key:
  10469. file.name.split(".")[0] +
  10470. new Date().getTime() +
  10471. "." +
  10472. file.name.split(".")[file.name.split(".").length - 1],
  10473. ContentType: file.type,
  10474. Body: file,
  10475. "Access-Control-Allow-Credentials": "*",
  10476. ACL: "public-read",
  10477. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10478. var options = {
  10479. partSize: 2048 * 1024 * 1024,
  10480. queueSize: 2,
  10481. leavePartsOnError: true,
  10482. };
  10483. bucket
  10484. .upload(params, options)
  10485. .on("httpUploadProgress", function (evt) {
  10486. //这里可以写进度条
  10487. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10488. })
  10489. .send(function (err, data) {
  10490. loading.close();
  10491. if (err) {
  10492. _this.$message.error("上传失败");
  10493. } else {
  10494. if (_this.testJson.testJson[i].timuList) {
  10495. _this.testJson.testJson[i].timuList.push({
  10496. src: data.Location,
  10497. });
  10498. } else {
  10499. _this.testJson.testJson[i].timuList = [];
  10500. _this.testJson.testJson[i].timuList.push({
  10501. src: data.Location,
  10502. });
  10503. }
  10504. _this.imgChange3(i);
  10505. _this.$forceUpdate();
  10506. }
  10507. });
  10508. }
  10509. },
  10510. beforeUploadTi(event, i, j) {
  10511. const loading = this.openLoading();
  10512. var file = event.target.files[0];
  10513. var credentials = {
  10514. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10515. secretAccessKey: "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",
  10516. }; //秘钥形式的登录上传
  10517. window.AWS.config.update(credentials);
  10518. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10519. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10520. var _this = this;
  10521. if (file) {
  10522. var params = {
  10523. Key:
  10524. file.name.split(".")[0] +
  10525. new Date().getTime() +
  10526. "." +
  10527. file.name.split(".")[file.name.split(".").length - 1],
  10528. ContentType: file.type,
  10529. Body: file,
  10530. "Access-Control-Allow-Credentials": "*",
  10531. ACL: "public-read",
  10532. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10533. var options = {
  10534. partSize: 2048 * 1024 * 1024,
  10535. queueSize: 2,
  10536. leavePartsOnError: true,
  10537. };
  10538. bucket
  10539. .upload(params, options)
  10540. .on("httpUploadProgress", function (evt) {
  10541. //这里可以写进度条
  10542. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10543. })
  10544. .send(function (err, data) {
  10545. loading.close();
  10546. if (err) {
  10547. _this.$message.error("上传失败");
  10548. } else {
  10549. _this.testJson.testJson[i].checkList[j] = {};
  10550. _this.testJson.testJson[i].checkList[j].src = data.Location;
  10551. _this.testJson.testJson[i].checkList[j].imgType = 1;
  10552. _this.imgChange2(i, j);
  10553. _this.$forceUpdate();
  10554. }
  10555. });
  10556. }
  10557. },
  10558. beforeUpload1(event, type) {
  10559. // const loading = this.openLoading();
  10560. var file = event.target.files[0];
  10561. var credentials = {
  10562. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10563. secretAccessKey: "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",
  10564. }; //秘钥形式的登录上传
  10565. window.AWS.config.update(credentials);
  10566. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10567. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10568. var _this = this;
  10569. if (file) {
  10570. var params = {
  10571. Key:
  10572. file.name.split(".")[0] +
  10573. new Date().getTime() +
  10574. "." +
  10575. file.name.split(".")[file.name.split(".").length - 1],
  10576. ContentType: file.type,
  10577. Body: file,
  10578. "Access-Control-Allow-Credentials": "*",
  10579. ACL: "public-read",
  10580. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10581. var options = {
  10582. partSize: 2048 * 1024 * 1024,
  10583. queueSize: 2,
  10584. leavePartsOnError: true,
  10585. };
  10586. bucket
  10587. .upload(params, options)
  10588. .on("httpUploadProgress", function (evt) {
  10589. //这里可以写进度条
  10590. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10591. })
  10592. .send(function (err, data) {
  10593. // loading.close();
  10594. if (err) {
  10595. // var a = _this.$refs.upload1.uploadFiles;
  10596. // a.splice(a.length - 1, a.length);
  10597. _this.$message.error("上传失败");
  10598. } else {
  10599. // _this.cover.push({
  10600. // name: file.name,
  10601. // url: data.Location,
  10602. // uid: file.uid,
  10603. // });
  10604. _this.cover = [
  10605. {
  10606. name: file.name,
  10607. url: data.Location,
  10608. uid: file.uid,
  10609. },
  10610. ];
  10611. _this.imgChange1(null, null, 1, null);
  10612. _this.choosePicVisible = false;
  10613. console.log(data.Location);
  10614. }
  10615. });
  10616. }
  10617. },
  10618. beforeUploadSelect(event, type) {
  10619. // const loading = this.openLoading();
  10620. var file = event.target.files[0];
  10621. var credentials = {
  10622. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10623. secretAccessKey: "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",
  10624. }; //秘钥形式的登录上传
  10625. window.AWS.config.update(credentials);
  10626. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10627. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10628. var _this = this;
  10629. if (file) {
  10630. var params = {
  10631. Key:
  10632. file.name.split(".")[0] +
  10633. new Date().getTime() +
  10634. "." +
  10635. file.name.split(".")[file.name.split(".").length - 1],
  10636. ContentType: file.type,
  10637. Body: file,
  10638. "Access-Control-Allow-Credentials": "*",
  10639. ACL: "public-read",
  10640. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10641. var options = {
  10642. partSize: 2048 * 1024 * 1024,
  10643. queueSize: 2,
  10644. leavePartsOnError: true,
  10645. };
  10646. bucket
  10647. .upload(params, options)
  10648. .on("httpUploadProgress", function (evt) {
  10649. //这里可以写进度条
  10650. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10651. })
  10652. .send(function (err, data) {
  10653. // loading.close();
  10654. if (err) {
  10655. _this.$message.error("上传失败");
  10656. } else {
  10657. _this.selectJson.url = data.Location;
  10658. console.log(data.Location);
  10659. }
  10660. });
  10661. }
  10662. },
  10663. chooseSysPic(p) {
  10664. this.cover = [];
  10665. setTimeout(() => {
  10666. this.cover[0] = {
  10667. name: "系统图片.png",
  10668. url: p,
  10669. };
  10670. this.imgChange1(null, null, 1, null);
  10671. this.$forceUpdate();
  10672. }, 0);
  10673. this.isSysPic = true;
  10674. this.isSysPic2 = false;
  10675. this.sysPicVisible = false;
  10676. this.$forceUpdate();
  10677. },
  10678. chooseSysPic2(p) {
  10679. this.cover = [];
  10680. setTimeout(() => {
  10681. this.cover[0] = {
  10682. name: "网络图片.png",
  10683. url: p,
  10684. };
  10685. this.imgChange1(null, null, 1, null);
  10686. this.$forceUpdate();
  10687. }, 0);
  10688. this.isSysPic2 = true;
  10689. this.isSysPic = false;
  10690. this.sysPicVisible2 = false;
  10691. this.$forceUpdate();
  10692. },
  10693. beforeUpload(data) {
  10694. this.$refs.upload1.uploadFiles;
  10695. this.uploadLoading1 = true;
  10696. var file = data.file;
  10697. var credentials = {
  10698. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10699. secretAccessKey: "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",
  10700. }; //秘钥形式的登录上传
  10701. window.AWS.config.update(credentials);
  10702. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10703. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10704. var _this = this;
  10705. if (file) {
  10706. var params = {
  10707. Key:
  10708. file.name.split(".")[0] +
  10709. new Date().getTime() +
  10710. "." +
  10711. file.name.split(".")[file.name.split(".").length - 1],
  10712. ContentType: file.type,
  10713. Body: file,
  10714. "Access-Control-Allow-Credentials": "*",
  10715. ACL: "public-read",
  10716. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10717. var options = {
  10718. partSize: 2048 * 1024 * 1024,
  10719. queueSize: 2,
  10720. leavePartsOnError: true,
  10721. };
  10722. bucket
  10723. .upload(params, options)
  10724. .on("httpUploadProgress", function (evt) {
  10725. //这里可以写进度条
  10726. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10727. })
  10728. .send(function (err, data) {
  10729. _this.uploadLoading1 = false;
  10730. if (err) {
  10731. // var a = _this.$refs.upload1.uploadFiles;
  10732. // a.splice(a.length - 1, a.length);
  10733. _this.$message.error("上传失败");
  10734. } else {
  10735. //上传成功处理
  10736. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  10737. name: file.name,
  10738. url: data.Location,
  10739. uid: file.uid,
  10740. });
  10741. _this.imgChange();
  10742. console.log(data.Location);
  10743. }
  10744. });
  10745. }
  10746. },
  10747. onExceed() {
  10748. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  10749. },
  10750. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  10751. let file = "";
  10752. let cfindex2 = 0;
  10753. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10754. // var file = event.target.files[0];
  10755. file = event.target.files[cfindex];
  10756. let fileName = file.name
  10757. let fileUid = file.uid
  10758. // const loading = this.openLoading();
  10759. // var file = event.target.files[0];
  10760. var credentials = {
  10761. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10762. secretAccessKey: "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",
  10763. }; //秘钥形式的登录上传
  10764. window.AWS.config.update(credentials);
  10765. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10766. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10767. var _this = this;
  10768. if (type == 3) {
  10769. var b = [
  10770. "DOC",
  10771. "DOCX",
  10772. "DOCM",
  10773. "DOTM",
  10774. "DOTX",
  10775. "PPTX",
  10776. "PPSX",
  10777. "PPT",
  10778. "PPS",
  10779. "PPTM",
  10780. "POTM",
  10781. "PPAM",
  10782. "POTX",
  10783. "PPSM",
  10784. ];
  10785. if (
  10786. b.indexOf(
  10787. file.name
  10788. .split(".")
  10789. [file.name.split(".").length - 1].toLocaleUpperCase()
  10790. ) != -1
  10791. ) {
  10792. if (file.size / 1024 / 1024 > 80) {
  10793. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10794. this.inputShow = true;
  10795. // var a = _this.$refs.upload1.uploadFiles;
  10796. // a.splice(a.length - 1, a.length);
  10797. // loading.close();
  10798. return;
  10799. }
  10800. } else if (
  10801. file.name
  10802. .split(".")
  10803. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10804. ) {
  10805. if (file.size / 1024 / 1024 > 80) {
  10806. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10807. this.inputShow = true;
  10808. // var a = _this.$refs.upload1.uploadFiles;
  10809. // a.splice(a.length - 1, a.length);
  10810. // loading.close();
  10811. return;
  10812. }
  10813. }
  10814. }
  10815. this.inputShow = false;
  10816. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10817. // itemTaskIndex
  10818. // ].progress = 0;
  10819. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10820. itemTaskIndex
  10821. ].proVisible = true;
  10822. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10823. itemTaskIndex
  10824. ].isFinishSize = 0;
  10825. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10826. itemTaskIndex
  10827. ].isAllSize = event.target.files.length;
  10828. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10829. // itemTaskIndex
  10830. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10831. _this.$forceUpdate();
  10832. if (file) {
  10833. var params = {
  10834. Key:
  10835. file.name.split(".")[0] +
  10836. new Date().getTime() +
  10837. "." +
  10838. file.name.split(".")[file.name.split(".").length - 1],
  10839. ContentType: file.type,
  10840. Body: file,
  10841. "Access-Control-Allow-Credentials": "*",
  10842. ACL: "public-read",
  10843. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10844. var options = {
  10845. partSize: 2048 * 1024 * 1024,
  10846. queueSize: 2,
  10847. leavePartsOnError: true,
  10848. };
  10849. bucket
  10850. .upload(params, options)
  10851. .on("httpUploadProgress", function (evt) {
  10852. //这里可以写进度条
  10853. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10854. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10855. // itemTaskIndex
  10856. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  10857. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10858. // itemTaskIndex
  10859. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10860. // _this.$forceUpdate();
  10861. })
  10862. .send(function (err, data) {
  10863. cfindex2++
  10864. // loading.close();
  10865. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10866. // itemTaskIndex
  10867. // ].progress = 100;
  10868. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10869. itemTaskIndex
  10870. ].isFinishSize = cfindex2
  10871. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10872. // itemTaskIndex
  10873. // ].isAllSize;
  10874. _this.$forceUpdate();
  10875. setTimeout(() => {
  10876. if (
  10877. cfindex2 == event.target.files.length ||
  10878. cfindex2 > event.target.files.length
  10879. ) {
  10880. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10881. itemTaskIndex
  10882. ].proVisible = false;
  10883. }
  10884. _this.$forceUpdate();
  10885. }, 1000);
  10886. _this.inputShow = true;
  10887. if (err) {
  10888. // var a = _this.$refs.upload1.uploadFiles;
  10889. // a.splice(a.length - 1, a.length);
  10890. _this.$message.error("上传失败");
  10891. } else {
  10892. if (type == 13) {
  10893. let _type = 2;
  10894. var imgA = [
  10895. "png",
  10896. "jpg",
  10897. "jpeg",
  10898. "bmp",
  10899. "gif",
  10900. "webp",
  10901. "psd",
  10902. "svg",
  10903. "tiff",
  10904. ];
  10905. var fileA = [
  10906. "PDF",
  10907. "DOC",
  10908. "DOCX",
  10909. "DOCM",
  10910. "DOTM",
  10911. "DOTX",
  10912. "PPTX",
  10913. "PPSX",
  10914. "PPT",
  10915. "PPS",
  10916. "PPTM",
  10917. "POTM",
  10918. "PPAM",
  10919. "POTX",
  10920. "PPSM",
  10921. "XLSX",
  10922. "XLS",
  10923. ];
  10924. var videoA = [
  10925. "AVI",
  10926. "NAVI",
  10927. "MPEG",
  10928. "ASF",
  10929. "MOV",
  10930. "WMV",
  10931. "3GP",
  10932. "RM",
  10933. "RMVB",
  10934. "FLV",
  10935. "F4V",
  10936. "H.264",
  10937. "H.265",
  10938. "REAL VIDEO",
  10939. "MKV",
  10940. "WebM",
  10941. "HDDVD",
  10942. "MP4",
  10943. "MPG",
  10944. "M4V",
  10945. "MGV",
  10946. "OGV",
  10947. "QTM",
  10948. "STR",
  10949. "AMC",
  10950. "DVX",
  10951. "EVO",
  10952. "DAT",
  10953. "OGG",
  10954. "OGM",
  10955. ];
  10956. if (
  10957. fileA.indexOf(
  10958. data.Location.split(".")[
  10959. data.Location.split(".").length - 1
  10960. ].toLocaleUpperCase()
  10961. ) != -1
  10962. ) {
  10963. _type = 3;
  10964. } else if (
  10965. videoA.indexOf(
  10966. data.Location.split(".")[
  10967. data.Location.split(".").length - 1
  10968. ].toLocaleUpperCase()
  10969. ) != -1
  10970. ) {
  10971. _type = 2;
  10972. } else if (
  10973. imgA.indexOf(
  10974. data.Location.split(".")[
  10975. data.Location.split(".").length - 1
  10976. ].toLocaleLowerCase()
  10977. ) != -1
  10978. ) {
  10979. _type = 13;
  10980. } else {
  10981. _type = 12;
  10982. }
  10983. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10984. itemTaskIndex
  10985. ].chapterData.unshift({
  10986. name: fileName,
  10987. url: data.Location,
  10988. uid: fileUid,
  10989. type: _type,
  10990. });
  10991. _this.imgChange1(null, null, _type, itemTaskIndex);
  10992. } else if (type == 2 || type == 3 || type == 12) {
  10993. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10994. itemTaskIndex
  10995. ].chapterData.unshift({
  10996. name: fileName,
  10997. url: data.Location,
  10998. uid: fileUid,
  10999. type: type,
  11000. });
  11001. _this.imgChange1(null, null, type, itemTaskIndex);
  11002. } else if (type == 4) {
  11003. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11004. itemTaskIndex
  11005. ].fileList1.push({
  11006. name: fileName,
  11007. url: data.Location,
  11008. uid: fileUid,
  11009. });
  11010. _this.imgChange1(null, null, type, itemTaskIndex);
  11011. } else if (type == 5) {
  11012. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11013. itemTaskIndex
  11014. ].homeworkList.push({
  11015. name: fileName,
  11016. url: data.Location,
  11017. uid: fileUid,
  11018. });
  11019. _this.imgChange1(null, null, type, itemTaskIndex);
  11020. }
  11021. console.log(data.Location);
  11022. }
  11023. });
  11024. }
  11025. }
  11026. },
  11027. async beforeUploadInfo2(event, type, tindex) {
  11028. // const loading = this.openLoading();
  11029. let file = "";
  11030. let cfindex2 = 0;
  11031. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  11032. // var file = event.target.files[0];
  11033. file = event.target.files[cfindex];
  11034. let fileName = file.name
  11035. let fileUid = file.uid
  11036. var credentials = {
  11037. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11038. secretAccessKey: "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",
  11039. }; //秘钥形式的登录上传
  11040. window.AWS.config.update(credentials);
  11041. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11042. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11043. var _this = this;
  11044. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  11045. if (
  11046. xianObj.indexOf(
  11047. file.name
  11048. .split(".")
  11049. [file.name.split(".").length - 1].toLocaleUpperCase()
  11050. ) == -1
  11051. ) {
  11052. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  11053. this.inputShow = true;
  11054. // var a = _this.$refs.upload1.uploadFiles;
  11055. // a.splice(a.length - 1, a.length);
  11056. // loading.close();
  11057. return;
  11058. }
  11059. // if (
  11060. // ['DOC'].indexOf(
  11061. // file.name
  11062. // .split(".")
  11063. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11064. // ) !== -1
  11065. // ) {
  11066. // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11067. // this.inputShow = true;
  11068. // return;
  11069. // }
  11070. if (type == 3) {
  11071. var b = [
  11072. "DOC",
  11073. "DOCX",
  11074. "DOCM",
  11075. "DOTM",
  11076. "DOTX",
  11077. "PPTX",
  11078. "PPSX",
  11079. "PPT",
  11080. "PPS",
  11081. "PPTM",
  11082. "POTM",
  11083. "PPAM",
  11084. "POTX",
  11085. "PPSM",
  11086. ];
  11087. if (
  11088. b.indexOf(
  11089. file.name
  11090. .split(".")
  11091. [file.name.split(".").length - 1].toLocaleUpperCase()
  11092. ) != -1
  11093. ) {
  11094. if (file.size / 1024 / 1024 > 80) {
  11095. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11096. this.inputShow = true;
  11097. // var a = _this.$refs.upload1.uploadFiles;
  11098. // a.splice(a.length - 1, a.length);
  11099. // loading.close();
  11100. return;
  11101. }
  11102. } else if (
  11103. file.name
  11104. .split(".")
  11105. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11106. ) {
  11107. if (file.size / 1024 / 1024 > 80) {
  11108. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11109. this.inputShow = true;
  11110. // var a = _this.$refs.upload1.uploadFiles;
  11111. // a.splice(a.length - 1, a.length);
  11112. // loading.close();
  11113. return;
  11114. }
  11115. }
  11116. }
  11117. this.inputShow = false;
  11118. if(type == 14){
  11119. // _this.teacherinfoprogress = 0;
  11120. _this.teacherinfoproVisible = true;
  11121. _this.teacherinfoisFinishSize = 0;
  11122. _this.teacherinfoisAllSize = event.target.files.length;
  11123. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  11124. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11125. }else if(type == 16){
  11126. _this.mubiaoinfoprogress = 0;
  11127. _this.mubiaoinfoproVisible = true;
  11128. _this.mubiaoinfoisFinishSize = 0;
  11129. _this.mubiaoinfoisAllSize = event.target.files.length;
  11130. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  11131. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11132. }else if(type == 17){
  11133. _this.xuanzeinfoprogress = 0;
  11134. _this.xuanzeinfoproVisible = true;
  11135. _this.xuanzeinfoisFinishSize = 0;
  11136. _this.xuanzeinfoisAllSize = event.target.files.length;
  11137. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11138. }else if(type == 18){
  11139. _this.pingjiainfoprogress[tindex] = 0;
  11140. _this.pingjiainfoproVisible[tindex] = true;
  11141. _this.pingjiainfoisFinishSize[tindex] = 0;
  11142. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  11143. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  11144. }else if(type == 19){
  11145. _this.knowinfoprogress = 0;
  11146. _this.knowinfoproVisible = true;
  11147. _this.knowinfoisFinishSize = 0;
  11148. _this.knowinfoisAllSize = event.target.files.length;
  11149. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11150. }else if(type == 20){
  11151. _this.knowinfoprogress2 = 0;
  11152. _this.knowinfoproVisible2 = true;
  11153. _this.knowinfoisFinishSize2 = 0;
  11154. _this.knowinfoisAllSize2 = event.target.files.length;
  11155. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11156. }else{
  11157. _this.infoprogress = 0;
  11158. _this.infoproVisible = true;
  11159. _this.infoisFinishSize = 0;
  11160. _this.infoisAllSize = event.target.files.length;
  11161. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11162. }
  11163. // if (
  11164. // ['DOC'].indexOf(
  11165. // file.name
  11166. // .split(".")
  11167. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11168. // ) !== -1
  11169. // ) {
  11170. // // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11171. // // this.inputShow = true;
  11172. // let params = convertApi.createParams()
  11173. // params.add('file', file)
  11174. // try {
  11175. // let result = await convertApi.convert('doc', 'docx', params);
  11176. // // Get result file URL
  11177. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  11178. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  11179. // });
  11180. // console.log(result)
  11181. // console.log(file)
  11182. // } catch (error) {
  11183. // cfindex2++;
  11184. // if(type == 14){
  11185. // _this.teacherinfoisFinishSize = cfindex2;
  11186. // }else if(type == 16){
  11187. // _this.mubiaoinfoisFinishSize = cfindex2;
  11188. // }else if(type == 17){
  11189. // _this.xuanzeinfoisFinishSize = cfindex2;
  11190. // }else if(type == 18){
  11191. // _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11192. // }else if(type == 19){
  11193. // _this.knowinfoisFinishSize = cfindex2;
  11194. // }else if(type == 20){
  11195. // _this.knowinfoisFinishSize2 = cfindex2;
  11196. // }else {
  11197. // _this.infoisFinishSize = cfindex2;
  11198. // }
  11199. // setTimeout(() => {
  11200. // if (
  11201. // cfindex2 == event.target.files.length ||
  11202. // cfindex2 > event.target.files.length
  11203. // ) {
  11204. // if(type == 14){
  11205. // _this.teacherinfoproVisible = false;
  11206. // }else if(type == 16){
  11207. // _this.mubiaoinfoproVisible = false;
  11208. // }else if(type == 17){
  11209. // _this.xuanzeinfoproVisible = false;
  11210. // }else if(type == 18){
  11211. // _this.pingjiainfoproVisible[tindex] = false;
  11212. // }else if(type == 19){
  11213. // _this.knowinfoproVisible = false;
  11214. // }else if(type == 20){
  11215. // _this.knowinfoproVisible2 = false;
  11216. // }else{
  11217. // _this.infoproVisible = false;
  11218. // }
  11219. // }
  11220. // _this.$forceUpdate();
  11221. // }, 1000);
  11222. // _this.inputShow = true;
  11223. // _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11224. // // 捕捉到这个convertApi.convert报错就不要往下走了
  11225. // return; // 直接返回,不继续执行后续代码
  11226. // }
  11227. // // return;
  11228. // }
  11229. _this.$forceUpdate();
  11230. if (file) {
  11231. var params = {
  11232. Key:
  11233. file.name.split(".")[0] +
  11234. new Date().getTime() +
  11235. "." +
  11236. file.name.split(".")[file.name.split(".").length - 1],
  11237. ContentType: file.type,
  11238. Body: file,
  11239. "Access-Control-Allow-Credentials": "*",
  11240. ACL: "public-read",
  11241. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11242. var options = {
  11243. partSize: 2048 * 1024 * 1024,
  11244. queueSize: 2,
  11245. leavePartsOnError: true,
  11246. };
  11247. bucket
  11248. .upload(params, options)
  11249. .on("httpUploadProgress", function (evt) {
  11250. //这里可以写进度条
  11251. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11252. // if(type == 14){
  11253. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11254. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11255. // }else if(type == 16){
  11256. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11257. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11258. // }else if(type == 17){
  11259. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11260. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11261. // }else if(type == 18){
  11262. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  11263. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  11264. // }else {
  11265. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  11266. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11267. // }
  11268. _this.$forceUpdate();
  11269. })
  11270. .send(async function (err, data) {
  11271. // loading.close();
  11272. // if(type == 14){
  11273. // _this.teacherinfoprogress = 100;
  11274. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  11275. // }else if(type == 16){
  11276. // _this.mubiaoinfoprogress = 100;
  11277. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  11278. // }else if(type == 17){
  11279. // _this.xuanzeinfoprogress = 100;
  11280. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  11281. // }else if(type == 18){
  11282. // _this.pingjiainfoprogress[tindex] = 100;
  11283. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  11284. // }else {
  11285. // _this.infoprogress = 100;
  11286. // _this.infoisFinishSize = _this.infoisAllSize;
  11287. // }
  11288. _this.$forceUpdate();
  11289. _this.inputShow = true;
  11290. if (err) {
  11291. cfindex2++;
  11292. if(type == 14){
  11293. _this.teacherinfoisFinishSize = cfindex2;
  11294. }else if(type == 16){
  11295. _this.mubiaoinfoisFinishSize = cfindex2;
  11296. }else if(type == 17){
  11297. _this.xuanzeinfoisFinishSize = cfindex2;
  11298. }else if(type == 18){
  11299. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11300. }else if(type == 19){
  11301. _this.knowinfoisFinishSize = cfindex2;
  11302. }else if(type == 20){
  11303. _this.knowinfoisFinishSize2 = cfindex2;
  11304. }else {
  11305. _this.infoisFinishSize = cfindex2;
  11306. }
  11307. setTimeout(() => {
  11308. if (
  11309. cfindex2 == event.target.files.length ||
  11310. cfindex2 > event.target.files.length
  11311. ) {
  11312. if(type == 14){
  11313. _this.teacherinfoproVisible = false;
  11314. }else if(type == 16){
  11315. _this.mubiaoinfoproVisible = false;
  11316. }else if(type == 17){
  11317. _this.xuanzeinfoproVisible = false;
  11318. }else if(type == 18){
  11319. _this.pingjiainfoproVisible[tindex] = false;
  11320. }else if(type == 19){
  11321. _this.knowinfoproVisible = false;
  11322. }else if(type == 20){
  11323. _this.knowinfoproVisible2 = false;
  11324. }else{
  11325. _this.infoproVisible = false;
  11326. }
  11327. }
  11328. _this.$forceUpdate();
  11329. }, 1000);
  11330. // var a = _this.$refs.upload1.uploadFiles;
  11331. // a.splice(a.length - 1, a.length);
  11332. _this.$message.error("上传失败");
  11333. } else {
  11334. let fileid = await _this.createFileid(data.Location)
  11335. if(fileid){
  11336. cfindex2++;
  11337. if(type == 14){
  11338. _this.teacherinfoisFinishSize = cfindex2;
  11339. }else if(type == 16){
  11340. _this.mubiaoinfoisFinishSize = cfindex2;
  11341. }else if(type == 17){
  11342. _this.xuanzeinfoisFinishSize = cfindex2;
  11343. }else if(type == 18){
  11344. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11345. }else if(type == 19){
  11346. _this.knowinfoisFinishSize = cfindex2;
  11347. }else if(type == 20){
  11348. _this.knowinfoisFinishSize2 = cfindex2;
  11349. }else {
  11350. _this.infoisFinishSize = cfindex2;
  11351. }
  11352. if (
  11353. cfindex2 == event.target.files.length ||
  11354. cfindex2 > event.target.files.length
  11355. ) {
  11356. if(type == 14){
  11357. _this.teacherinfoproVisible = false;
  11358. }else if(type == 16){
  11359. _this.mubiaoinfoproVisible = false;
  11360. }else if(type == 17){
  11361. _this.xuanzeinfoproVisible = false;
  11362. }else if(type == 18){
  11363. _this.pingjiainfoproVisible[tindex] = false;
  11364. }else if(type == 19){
  11365. _this.knowinfoproVisible = false;
  11366. }else if(type == 20){
  11367. _this.knowinfoproVisible2 = false;
  11368. }else{
  11369. _this.infoproVisible = false;
  11370. }
  11371. }
  11372. _this.$forceUpdate();
  11373. }
  11374. if(fileid == 1){
  11375. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  11376. return;
  11377. }
  11378. var imgA = [
  11379. "png",
  11380. "jpg",
  11381. "jpeg",
  11382. "bmp",
  11383. "gif",
  11384. "webp",
  11385. "psd",
  11386. "svg",
  11387. "tiff",
  11388. ];
  11389. var fileA = [
  11390. "PDF",
  11391. "DOC",
  11392. "DOCX",
  11393. "DOCM",
  11394. "DOTM",
  11395. "DOTX",
  11396. "PPTX",
  11397. "PPSX",
  11398. "PPT",
  11399. "PPS",
  11400. "PPTM",
  11401. "POTM",
  11402. "PPAM",
  11403. "POTX",
  11404. "PPSM",
  11405. "XLSX",
  11406. "XLS",
  11407. ];
  11408. var videoA = [
  11409. "AVI",
  11410. "NAVI",
  11411. "MPEG",
  11412. "ASF",
  11413. "MOV",
  11414. "WMV",
  11415. "3GP",
  11416. "RM",
  11417. "RMVB",
  11418. "FLV",
  11419. "F4V",
  11420. "H.264",
  11421. "H.265",
  11422. "REAL VIDEO",
  11423. "MKV",
  11424. "WebM",
  11425. "HDDVD",
  11426. "MP4",
  11427. "MPG",
  11428. "M4V",
  11429. "MGV",
  11430. "OGV",
  11431. "QTM",
  11432. "STR",
  11433. "AMC",
  11434. "DVX",
  11435. "EVO",
  11436. "DAT",
  11437. "OGG",
  11438. "OGM",
  11439. ];
  11440. let _type = 2;
  11441. if (
  11442. fileA.indexOf(
  11443. data.Location.split(".")[
  11444. data.Location.split(".").length - 1
  11445. ].toLocaleUpperCase()
  11446. ) != -1
  11447. ) {
  11448. _type = 3;
  11449. } else if (
  11450. videoA.indexOf(
  11451. data.Location.split(".")[
  11452. data.Location.split(".").length - 1
  11453. ].toLocaleUpperCase()
  11454. ) != -1
  11455. ) {
  11456. _type = 2;
  11457. } else if (
  11458. imgA.indexOf(
  11459. data.Location.split(".")[
  11460. data.Location.split(".").length - 1
  11461. ].toLocaleLowerCase()
  11462. ) != -1
  11463. ) {
  11464. _type = 13;
  11465. } else {
  11466. _type = 12;
  11467. }
  11468. if (type == 13) {
  11469. _this.infoData.push({
  11470. name: fileName,
  11471. url: data.Location,
  11472. uid: fileUid,
  11473. type: _type,
  11474. fileid: fileid == 1 ? '' : fileid,
  11475. });
  11476. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11477. name: fileName,
  11478. url: data.Location,
  11479. uid: fileUid,
  11480. type: _type,
  11481. fileid: fileid == 1 ? '' : fileid,
  11482. })
  11483. }else if (type == 14) {
  11484. _this.teacherInfoData.push({
  11485. name: fileName,
  11486. url: data.Location,
  11487. uid: fileUid,
  11488. type: _type,
  11489. fileid: fileid == 1 ? '' : fileid,
  11490. });
  11491. _this.infoData2.push({
  11492. name: fileName,
  11493. url: data.Location,
  11494. uid: fileUid,
  11495. type: _type,
  11496. fileid: fileid == 1 ? '' : fileid,
  11497. });
  11498. _this.infoData.push({
  11499. name: fileName,
  11500. url: data.Location,
  11501. uid: fileUid,
  11502. type: _type,
  11503. fileid: fileid == 1 ? '' : fileid,
  11504. });
  11505. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11506. name: fileName,
  11507. url: data.Location,
  11508. uid: fileUid,
  11509. type: _type,
  11510. fileid: fileid == 1 ? '' : fileid,
  11511. })
  11512. }else if (type == 15) {
  11513. _this.infoData2.push({
  11514. name: fileName,
  11515. url: data.Location,
  11516. uid: fileUid,
  11517. type: _type,
  11518. fileid: fileid == 1 ? '' : fileid,
  11519. });
  11520. _this.infoData.push({
  11521. name: fileName,
  11522. url: data.Location,
  11523. uid: fileUid,
  11524. type: _type,
  11525. fileid: fileid == 1 ? '' : fileid,
  11526. });
  11527. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11528. name: fileName,
  11529. url: data.Location,
  11530. uid: fileUid,
  11531. type: _type,
  11532. fileid: fileid == 1 ? '' : fileid,
  11533. })
  11534. }else if (type == 16) {
  11535. _this.mubiaoInfoData.push({
  11536. name: fileName,
  11537. url: data.Location,
  11538. uid: fileUid,
  11539. type: _type,
  11540. fileid: fileid == 1 ? '' : fileid,
  11541. });
  11542. }else if (type == 17) {
  11543. _this.xuanzeInfoData.push({
  11544. name: fileName,
  11545. url: data.Location,
  11546. uid: fileUid,
  11547. type: _type,
  11548. fileid: fileid == 1 ? '' : fileid,
  11549. });
  11550. }else if (type == 18) {
  11551. if(!_this.pingjiaInfoData[tindex]){
  11552. _this.pingjiaInfoData[tindex] = []
  11553. }
  11554. _this.pingjiaInfoData[tindex].push({
  11555. name: fileName,
  11556. url: data.Location,
  11557. uid: fileUid,
  11558. type: _type,
  11559. fileid: fileid == 1 ? '' : fileid,
  11560. });
  11561. }else if (type == 19) {
  11562. _this.knowInfoData.push({
  11563. name: fileName,
  11564. url: data.Location,
  11565. uid: fileUid,
  11566. type: _type,
  11567. fileid: fileid == 1 ? '' : fileid,
  11568. });
  11569. if(fileid != 1){
  11570. _this.knowFileids.push(fileid)
  11571. }
  11572. }else if (type == 20) {
  11573. _this.knowInfoData2.push({
  11574. name: fileName,
  11575. url: data.Location,
  11576. uid: fileUid,
  11577. type: _type,
  11578. fileid: fileid == 1 ? '' : fileid,
  11579. });
  11580. if(fileid != 1){
  11581. _this.knowFileids2.push(fileid)
  11582. }
  11583. }
  11584. console.log(data.Location);
  11585. console.log(fileName,'----------',fileid);
  11586. }
  11587. });
  11588. }
  11589. }
  11590. },
  11591. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  11592. // const loading = this.openLoading();
  11593. var file = event.target.files[0];
  11594. var credentials = {
  11595. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11596. secretAccessKey: "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",
  11597. }; //秘钥形式的登录上传
  11598. window.AWS.config.update(credentials);
  11599. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11600. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11601. var _this = this;
  11602. if (type == 3) {
  11603. var b = [
  11604. "DOC",
  11605. "DOCX",
  11606. "DOCM",
  11607. "DOTM",
  11608. "DOTX",
  11609. "PPTX",
  11610. "PPSX",
  11611. "PPT",
  11612. "PPS",
  11613. "PPTM",
  11614. "POTM",
  11615. "PPAM",
  11616. "POTX",
  11617. "PPSM",
  11618. ];
  11619. if (
  11620. b.indexOf(
  11621. file.name
  11622. .split(".")
  11623. [file.name.split(".").length - 1].toLocaleUpperCase()
  11624. ) != -1
  11625. ) {
  11626. if (file.size / 1024 / 1024 > 80) {
  11627. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11628. this.inputShow = true;
  11629. // var a = _this.$refs.upload1.uploadFiles;
  11630. // a.splice(a.length - 1, a.length);
  11631. // loading.close();
  11632. return;
  11633. }
  11634. } else if (
  11635. file.name
  11636. .split(".")
  11637. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11638. ) {
  11639. if (file.size / 1024 / 1024 > 80) {
  11640. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11641. this.inputShow = true;
  11642. // var a = _this.$refs.upload1.uploadFiles;
  11643. // a.splice(a.length - 1, a.length);
  11644. // loading.close();
  11645. return;
  11646. }
  11647. }
  11648. }
  11649. this.inputShow = false;
  11650. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11651. itemTaskIndex
  11652. ].progress = 0;
  11653. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11654. itemTaskIndex
  11655. ].proVisible = true;
  11656. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11657. itemTaskIndex
  11658. ].isFinishSize = 0;
  11659. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11660. itemTaskIndex
  11661. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11662. _this.$forceUpdate();
  11663. if (file) {
  11664. var params = {
  11665. Key:
  11666. file.name.split(".")[0] +
  11667. new Date().getTime() +
  11668. "." +
  11669. file.name.split(".")[file.name.split(".").length - 1],
  11670. ContentType: file.type,
  11671. Body: file,
  11672. "Access-Control-Allow-Credentials": "*",
  11673. ACL: "public-read",
  11674. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11675. var options = {
  11676. partSize: 2048 * 1024 * 1024,
  11677. queueSize: 2,
  11678. leavePartsOnError: true,
  11679. };
  11680. bucket
  11681. .upload(params, options)
  11682. .on("httpUploadProgress", function (evt) {
  11683. //这里可以写进度条
  11684. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11685. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11686. itemTaskIndex
  11687. ].progress = parseInt((evt.loaded / evt.total) * 100);
  11688. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11689. itemTaskIndex
  11690. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11691. _this.$forceUpdate();
  11692. })
  11693. .send(function (err, data) {
  11694. // loading.close();
  11695. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11696. itemTaskIndex
  11697. ].progress = 100;
  11698. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11699. itemTaskIndex
  11700. ].isFinishSize =
  11701. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11702. itemTaskIndex
  11703. ].isAllSize;
  11704. _this.$forceUpdate();
  11705. setTimeout(() => {
  11706. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11707. itemTaskIndex
  11708. ].proVisible = false;
  11709. _this.$forceUpdate();
  11710. }, 1000);
  11711. _this.inputShow = true;
  11712. if (err) {
  11713. // var a = _this.$refs.upload1.uploadFiles;
  11714. // a.splice(a.length - 1, a.length);
  11715. _this.$message.error("上传失败");
  11716. } else {
  11717. if (type == 2 || type == 3) {
  11718. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11719. itemTaskIndex
  11720. ].chapterData.unshift({
  11721. name: file.name,
  11722. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11723. // itemTaskIndex
  11724. // ].chapterData.length+1),
  11725. url: data.Location,
  11726. uid: file.uid,
  11727. type: type,
  11728. text: string,
  11729. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11730. // itemTaskIndex
  11731. // ].chapterData.length + 1),
  11732. });
  11733. _this.imgChange1(null, null, type, itemTaskIndex);
  11734. } else if (type == 4) {
  11735. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11736. itemTaskIndex
  11737. ].fileList1.push({
  11738. name: file.name,
  11739. url: data.Location,
  11740. uid: file.uid,
  11741. });
  11742. _this.imgChange1(null, null, type, itemTaskIndex);
  11743. } else if (type == 5) {
  11744. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11745. itemTaskIndex
  11746. ].homeworkList.push({
  11747. name: file.name,
  11748. url: data.Location,
  11749. uid: file.uid,
  11750. });
  11751. _this.imgChange1(null, null, type, itemTaskIndex);
  11752. }
  11753. console.log(data.Location);
  11754. }
  11755. });
  11756. }
  11757. },
  11758. addunit() {
  11759. this.unitJson.push({
  11760. dyName: "", //单元标题
  11761. isUpdate: 1,
  11762. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  11763. chapterInfo: [
  11764. {
  11765. isread: false,
  11766. chapterid: this.guid(),
  11767. title: "",
  11768. courseName: "",
  11769. taskJson: [
  11770. {
  11771. task: "",
  11772. taskDetail: "",
  11773. chapterData: [],
  11774. toolText: "",
  11775. toolChoose: [
  11776. {
  11777. tool: [],
  11778. toolDetail: "",
  11779. toolType: 0,
  11780. askCount: 1,
  11781. askTitle: "",
  11782. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11783. },
  11784. ],
  11785. isShowTools: false,
  11786. askCount: 1,
  11787. isFold: 1,
  11788. askTitle: "",
  11789. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11790. checkJson: [{ checkCount: [], checkPerent: [] }],
  11791. homeworkList: [],
  11792. },
  11793. ],
  11794. itemCount: 1,
  11795. fileList1: [],
  11796. video: [],
  11797. testData: [],
  11798. pData: [],
  11799. templateArray: [],
  11800. },
  11801. ],
  11802. });
  11803. this.addindex = this.unitJson.length - 1;
  11804. setTimeout(() => {
  11805. this.unitIndex = this.unitJson.length - 1;
  11806. setTimeout(() => {
  11807. console.log(this.$refs.dyInput);
  11808. this.$refs.dyInput[0].focus();
  11809. }, 100);
  11810. this.unitSet(this.unitIndex);
  11811. }, 0);
  11812. },
  11813. addToolFun(itemTaskIndex) {
  11814. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11815. itemTaskIndex
  11816. ].toolChoose.push({
  11817. tool: [],
  11818. toolDetail: "",
  11819. toolType: 0,
  11820. askCount: 1,
  11821. askTitle: "",
  11822. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11823. });
  11824. },
  11825. addTaskBorder() {
  11826. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  11827. task: "",
  11828. taskDetail: "",
  11829. chapterData: [],
  11830. toolText: "",
  11831. toolChoose: [
  11832. {
  11833. tool: [],
  11834. toolDetail: "",
  11835. toolType: 0,
  11836. askCount: 1,
  11837. askTitle: "",
  11838. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11839. },
  11840. ],
  11841. isShowTools: false,
  11842. askCount: 1,
  11843. isFold: 1, //任务收起状态
  11844. askTitle: "",
  11845. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11846. checkJson: [{ checkCount: [], checkPerent: [] }],
  11847. homeworkList: [],
  11848. });
  11849. setTimeout(() => {
  11850. this.checkEva(this.checkId);
  11851. setTimeout(() => {
  11852. this.checkEva(this.checkId);
  11853. }, 100);
  11854. }, 100);
  11855. },
  11856. addTaskBorder2(type, index) {
  11857. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  11858. this.$message({
  11859. message: "有大纲在生成请生成完之后才能使用此功能",
  11860. type: "warning"
  11861. });
  11862. return;
  11863. }
  11864. if(type == 1){
  11865. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  11866. task: "",
  11867. isTask2: true,
  11868. isTask3: true,
  11869. taskDetail: "",
  11870. chapterData: [],
  11871. toolText: "",
  11872. toolChoose: [
  11873. {
  11874. tool: [],
  11875. toolDetail: "",
  11876. toolType: 0,
  11877. askCount: 1,
  11878. askTitle: "",
  11879. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11880. },
  11881. ],
  11882. isShowTools: false,
  11883. askCount: 1,
  11884. isFold: 0, //任务收起状态
  11885. askTitle: "",
  11886. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11887. checkJson: [{ checkCount: [], checkPerent: [] }],
  11888. homeworkList: [],
  11889. })
  11890. }else if(type == 2){
  11891. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  11892. task: "",
  11893. isTask2: true,
  11894. isTask3: true,
  11895. taskDetail: "",
  11896. chapterData: [],
  11897. toolText: "",
  11898. toolChoose: [
  11899. {
  11900. tool: [],
  11901. toolDetail: "",
  11902. toolType: 0,
  11903. askCount: 1,
  11904. askTitle: "",
  11905. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11906. },
  11907. ],
  11908. isShowTools: false,
  11909. askCount: 1,
  11910. isFold: 0, //任务收起状态
  11911. askTitle: "",
  11912. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11913. checkJson: [{ checkCount: [], checkPerent: [] }],
  11914. homeworkList: [],
  11915. })
  11916. }
  11917. setTimeout(() => {
  11918. this.checkEva(this.checkId);
  11919. setTimeout(() => {
  11920. this.checkEva(this.checkId);
  11921. }, 100);
  11922. }, 100);
  11923. },
  11924. add(e, i) {
  11925. var el = e.currentTarget;
  11926. el.getElementsByTagName("input")[0].click();
  11927. },
  11928. fold(i, e) {
  11929. if (
  11930. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  11931. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  11932. ) {
  11933. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  11934. } else {
  11935. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  11936. }
  11937. },
  11938. fold2(i) {
  11939. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  11940. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11941. i
  11942. ].isFold2 = false;
  11943. } else {
  11944. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  11945. }
  11946. this.$forceUpdate();
  11947. },
  11948. foldEva(i) {
  11949. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  11950. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11951. i
  11952. ].isEvaFold = false;
  11953. } else {
  11954. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11955. i
  11956. ].isEvaFold = true;
  11957. setTimeout(() => {
  11958. this.checkEva(this.checkId);
  11959. setTimeout(() => {
  11960. this.checkEva(this.checkId);
  11961. }, 500);
  11962. }, 0);
  11963. }
  11964. this.$forceUpdate();
  11965. },
  11966. foldC(i) {
  11967. if (
  11968. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  11969. ) {
  11970. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11971. i
  11972. ].isFoldchapter = false;
  11973. } else {
  11974. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11975. i
  11976. ].isFoldchapter = true;
  11977. }
  11978. this.$forceUpdate();
  11979. },
  11980. fold3(i, ti) {
  11981. if (
  11982. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  11983. .isFold3
  11984. ) {
  11985. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  11986. ti
  11987. ].isFold3 = false;
  11988. } else {
  11989. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  11990. ti
  11991. ].isFold3 = true;
  11992. }
  11993. this.$forceUpdate();
  11994. },
  11995. deleteHomeworkBox(unitIndex, index, i) {
  11996. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  11997. this.taskCount
  11998. ].homeworkList.splice(i, 1);
  11999. },
  12000. getStudent() {
  12001. let params = {
  12002. oid: this.oid,
  12003. cu: "",
  12004. cn: this.searchPeople,
  12005. };
  12006. this.ajax
  12007. .get(this.$store.state.api + "selectStudentAdd", params)
  12008. .then((res) => {
  12009. this.studentJuri = res.data[0];
  12010. })
  12011. .catch((err) => {
  12012. this.isLoading = false;
  12013. console.error(err);
  12014. });
  12015. },
  12016. // 添加协同成员其他选项按钮
  12017. getTeacherCopy(){
  12018. this.CollLoading=true
  12019. this.collid = ''
  12020. this.collid = '1xpz'
  12021. let params = {
  12022. oid:
  12023. this.org && this.org != "undefined" && this.org != "null"
  12024. ? this.org
  12025. : this.oid,
  12026. cu: "",
  12027. cn: this.searchTN,
  12028. coll: ''
  12029. };
  12030. this.ajax
  12031. .get(
  12032. this.$store.state.api +
  12033. (this.org && this.org != "undefined" && this.org != "null"
  12034. ? "selectCollaborativeMembersOrg"
  12035. : "selectCollaborativeMembers"),
  12036. params
  12037. )
  12038. .then((res) => {
  12039. let teacherJuri = res.data[0];
  12040. this.CollaborativeTeaList = res.data[1];
  12041. for (var i = 0; i < teacherJuri.length; i++) {
  12042. if (teacherJuri[i].userid == this.userid) {
  12043. teacherJuri.splice(i, 1);
  12044. break;
  12045. }
  12046. }
  12047. this.teacherJuri = teacherJuri.filter((i,index)=>{
  12048. return (i.cclassid == '' || i.cclassid == null)
  12049. })
  12050. console.log(' this.teacherJuri', this.teacherJuri);
  12051. let _check = [];
  12052. let _check2 = [];
  12053. for (var i = 0; i < this.teacherJuri.length; i++) {
  12054. var gid = this.teacherJuri[i].userid;
  12055. _check.push(gid);
  12056. }
  12057. for (var i = 0; i < this.checkboxList3.length; i++) {
  12058. var _id = this.checkboxList3[i];
  12059. if (_check.indexOf(_id) !== -1) {
  12060. _check2.push(_id);
  12061. }
  12062. }
  12063. if (_check2.length==0 && _check.length==0) {
  12064. }else{
  12065. this.checkAll2 = _check2.length === _check.length;
  12066. }
  12067. this.CollLoading=false
  12068. })
  12069. .catch((err) => {
  12070. console.error(err);
  12071. this.CollLoading=false
  12072. });
  12073. },
  12074. getTeacher(val) {
  12075. this.CollLoading=true
  12076. this.collid = ''
  12077. this.collid = !val ? '' : val
  12078. let params = {
  12079. oid:
  12080. this.org && this.org != "undefined" && this.org != "null"
  12081. ? this.org
  12082. : this.oid,
  12083. cu: "",
  12084. cn: this.searchTN,
  12085. coll: this.collid
  12086. };
  12087. this.ajax
  12088. .get(
  12089. this.$store.state.api +
  12090. (this.org && this.org != "undefined" && this.org != "null"
  12091. ? "selectCollaborativeMembersOrg"
  12092. : "selectCollaborativeMembers"),
  12093. params
  12094. )
  12095. .then((res) => {
  12096. let teacherJuri = res.data[0];
  12097. this.CollaborativeTeaList = res.data[1];
  12098. for (var i = 0; i < teacherJuri.length; i++) {
  12099. if (teacherJuri[i].userid == this.userid) {
  12100. teacherJuri.splice(i, 1);
  12101. break;
  12102. }
  12103. }
  12104. this.teacherJuri = teacherJuri;
  12105. let _check = [];
  12106. let _check2 = [];
  12107. for (var i = 0; i < this.teacherJuri.length; i++) {
  12108. var gid = this.teacherJuri[i].userid;
  12109. _check.push(gid);
  12110. }
  12111. for (var i = 0; i < this.checkboxList3.length; i++) {
  12112. var _id = this.checkboxList3[i];
  12113. if (_check.indexOf(_id) !== -1) {
  12114. _check2.push(_id);
  12115. }
  12116. }
  12117. if (_check2.length==0 && _check.length==0) {
  12118. }else{
  12119. this.checkAll2 = _check2.length === _check.length;
  12120. }
  12121. this.CollLoading=false
  12122. })
  12123. .catch((err) => {
  12124. console.error(err);
  12125. this.CollLoading=false
  12126. });
  12127. },
  12128. searchStudent() {
  12129. this.getStudent();
  12130. },
  12131. selectGrage() {
  12132. let params = {
  12133. oid: this.oid,
  12134. };
  12135. this.ajax
  12136. .get(this.$store.state.api + "selectGrageBySchool", params)
  12137. .then((res) => {
  12138. this.gradeList = res.data[0];
  12139. })
  12140. .catch((err) => {
  12141. this.isLoading = false;
  12142. console.error(err);
  12143. });
  12144. },
  12145. //获取班级列表
  12146. getClass() {
  12147. let params = {
  12148. oid: this.oid,
  12149. gid: this.gradeId,
  12150. cn: this.classSearch,
  12151. };
  12152. this.ajax
  12153. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  12154. .then((res) => {
  12155. if (!this.grade.length) {
  12156. this.grade = res.data[0];
  12157. }
  12158. this.grade2 = res.data[0];
  12159. this.classJuri = res.data[0];
  12160. let _check = [];
  12161. let _check2 = [];
  12162. for (var i = 0; i < this.grade2.length; i++) {
  12163. var gid = this.grade2[i].id;
  12164. _check.push(gid);
  12165. }
  12166. for (var i = 0; i < this.checkboxList2.length; i++) {
  12167. var _id = this.checkboxList2[i];
  12168. if (_check.indexOf(_id) !== -1) {
  12169. _check2.push(_id);
  12170. }
  12171. }
  12172. this.checkAll = _check2.length === _check.length;
  12173. })
  12174. .catch((err) => {
  12175. this.isLoading = false;
  12176. console.error(err);
  12177. });
  12178. },
  12179. CourseType2Change(val) {
  12180. this.pTypeCheck = [];
  12181. for (var i = 0; i < this.CourseType2.length; i++) {
  12182. let typeA = this.CourseType2[i];
  12183. if (val.indexOf(typeA.name) != -1) {
  12184. this.pTypeCheck.push(...typeA.id);
  12185. }
  12186. }
  12187. },
  12188. arrayToArray(arrayo, arrayt) {
  12189. let array1 = arrayo;
  12190. let array2 = arrayt;
  12191. let commonElements = [];
  12192. for (let i = 0; i < array1.length; i++) {
  12193. for (let j = 0; j < array2.length; j++) {
  12194. if (array1[i] === array2[j]) {
  12195. commonElements.push(array1[i]);
  12196. }
  12197. }
  12198. }
  12199. return commonElements;
  12200. },
  12201. typeChange(){
  12202. let courseInfo = ``
  12203. let sub = []
  12204. let mclass = []
  12205. let theme = []
  12206. if (this.courseTypeId.length) {
  12207. for (var i = 0; i < this.courseTypeId.length; i++) {
  12208. let _sid = this.courseTypeId[i]
  12209. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12210. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  12211. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  12212. }
  12213. }
  12214. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12215. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  12216. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  12217. }
  12218. }
  12219. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12220. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  12221. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  12222. }
  12223. }
  12224. }
  12225. }
  12226. sub = JSON.parse(converter(JSON.stringify(sub)))
  12227. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  12228. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  12229. let _file = this.knowFileArray[fi]
  12230. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  12231. let fileS = _file.name ? converter(_file.name).split('/') : 1
  12232. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  12233. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  12234. let fileids = this.knowInfoData.map((item) => item.fileid)
  12235. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12236. this.knowInfoData.push({
  12237. name: _file.filename,
  12238. url: _file.url,
  12239. uid: '',
  12240. type: 3,
  12241. fileid: _file.fileid,
  12242. });
  12243. this.knowFileids.push(_file.fileid)
  12244. }
  12245. fileids = this.knowInfoData.map((item) => item.fileid)
  12246. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12247. this.knowInfoData.push({
  12248. name: _file.filename,
  12249. url: _file.url,
  12250. uid: '',
  12251. type: 3,
  12252. fileid: _file.fileid,
  12253. });
  12254. this.knowFileids.push(_file.fileid)
  12255. }
  12256. fileids = this.knowInfoData.map((item) => item.fileid)
  12257. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12258. this.knowInfoData.push({
  12259. name: _file.filename,
  12260. url: _file.url,
  12261. uid: '',
  12262. type: 3,
  12263. fileid: _file.fileid,
  12264. });
  12265. this.knowFileids.push(_file.fileid)
  12266. }
  12267. fileids = this.knowInfoData.map((item) => item.fileid)
  12268. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12269. this.knowInfoData.push({
  12270. name: _file.filename,
  12271. url: _file.url,
  12272. uid: '',
  12273. type: 3,
  12274. fileid: _file.fileid,
  12275. });
  12276. this.knowFileids.push(_file.fileid)
  12277. }
  12278. fileids = this.knowInfoData.map((item) => item.fileid)
  12279. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  12280. this.knowInfoData.push({
  12281. name: _file.filename,
  12282. url: _file.url,
  12283. uid: '',
  12284. type: 3,
  12285. fileid: _file.fileid,
  12286. });
  12287. this.knowFileids.push(_file.fileid)
  12288. }
  12289. }
  12290. if(mclass.length){
  12291. courseInfo += `年级:${mclass.join(',')} `
  12292. }
  12293. if(sub.length){
  12294. courseInfo += `学科:${sub.join(',')} `
  12295. }
  12296. if(theme.length){
  12297. courseInfo += `主题:${theme.join(',')} `
  12298. }
  12299. this.addCourseBehavior('courseBehavior', `点击选择分类-${courseInfo}`)
  12300. this.typeC1 = this.getTypeC(2)
  12301. this.typeC2 = this.getTypeC(1)
  12302. },
  12303. getChapterData(e, i, j, ic, type) {
  12304. e.stopPropagation();
  12305. this.updataC = true;
  12306. this.icc = ic;
  12307. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  12308. console.log("还不能下载图片喔");
  12309. }
  12310. },
  12311. deleteChapterData(e, i, j, ic, taskI) {
  12312. e.stopPropagation();
  12313. let _this = this;
  12314. _this
  12315. .$confirm("确定删除此项?", "提示", {
  12316. confirmButtonText: "确定",
  12317. cancelButtonText: "取消",
  12318. type: "warning",
  12319. })
  12320. .then(() => {
  12321. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  12322. ic,
  12323. 1
  12324. );
  12325. })
  12326. .catch(() => {
  12327. return;
  12328. });
  12329. },
  12330. checkInfoData(fileid, file){
  12331. let type = 1
  12332. let index = 0
  12333. for(let i = 0; i < this.infoData.length; i++){
  12334. if(this.infoData[i].fileid == fileid){
  12335. type = 2
  12336. index = i
  12337. }
  12338. }
  12339. if(type == 2){
  12340. this.infoData.splice(index, 1)
  12341. }else {
  12342. this.infoData.push({...file})
  12343. }
  12344. },
  12345. checkKnowInfoData(fileid){
  12346. if(this.knowFileids.indexOf(fileid) == -1){
  12347. this.knowFileids.push(fileid)
  12348. }else {
  12349. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  12350. }
  12351. },
  12352. checkKnowInfoData2(fileid){
  12353. if(!fileid){
  12354. return
  12355. }
  12356. if(this.knowFileids2.indexOf(fileid) == -1){
  12357. this.knowFileids2.push(fileid)
  12358. }else {
  12359. this.knowFileids2.splice(this.knowFileids2.indexOf(fileid), 1)
  12360. }
  12361. },
  12362. checkKnowInfoData3(fileid){
  12363. if(this.knowFileids3.indexOf(fileid) == -1){
  12364. this.knowFileids3.push(fileid)
  12365. }else {
  12366. this.knowFileids3.splice(this.knowFileids3.indexOf(fileid), 1)
  12367. }
  12368. },
  12369. checkAllKnowInfoData3(){
  12370. // let array = this.knowInfoData3;
  12371. // if(this.knowFileids3.length === array.length){
  12372. // this.knowFileids3 = []; // 取消全选
  12373. // } else {
  12374. // this.knowFileids3 = array.map(item => item.url); // 全选
  12375. // }
  12376. let files = this.allknowInfoData3();
  12377. let count = 0
  12378. for(var i = 0; i < files.length; i++){
  12379. if(this.knowFileids3.includes(files[i].url)){
  12380. count++
  12381. }
  12382. }
  12383. if (count == files.length) {
  12384. this.knowFileids3 = this.knowFileids3.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12385. } else {
  12386. this.knowFileids3 = [...new Set([...this.knowFileids3, ...files.map(file => file.url)])]; // 全选并添加新文件
  12387. }
  12388. },
  12389. checkAllKnowInfoData2(){
  12390. let array = this.knowInfoData2;
  12391. if(this.knowFileids2.length === array.length){
  12392. this.knowFileids2 = []; // 取消全选
  12393. } else {
  12394. this.knowFileids2 = array.map(item => item.fileid); // 全选
  12395. }
  12396. },
  12397. deleteCheckAllKnowInfoData2(){
  12398. let _this = this;
  12399. _this
  12400. .$confirm("确定删除所选文件么?", "提示", {
  12401. confirmButtonText: "确定",
  12402. cancelButtonText: "取消",
  12403. type: "warning",
  12404. })
  12405. .then(() => {
  12406. _this.knowInfoData2 = _this.knowInfoData2.filter(item => !_this.knowFileids2.includes(item.fileid))
  12407. _this.knowFileids2 = []
  12408. _this.$forceUpdate()
  12409. })
  12410. .catch(() => {
  12411. return;
  12412. });
  12413. },
  12414. checkAppendixFile(url){
  12415. if(this.appendixFiles.indexOf(url) == -1){
  12416. this.appendixFiles.push(url)
  12417. }else {
  12418. this.appendixFiles.splice(this.appendixFiles.indexOf(url), 1)
  12419. }
  12420. },
  12421. checkAllappendixFile(){
  12422. let files = this.allFile();
  12423. let count = 0
  12424. for(var i = 0; i < files.length; i++){
  12425. if(this.appendixFiles.includes(files[i].url)){
  12426. count++
  12427. }
  12428. }
  12429. if (count == files.length) {
  12430. this.appendixFiles = this.appendixFiles.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12431. if(this.appendixTypeCheck == 'all' && this.appendixTaskCheck == 'all'){
  12432. this.appendixFiles = []
  12433. }
  12434. } else {
  12435. this.appendixFiles = [...new Set([...this.appendixFiles, ...files.map(file => file.url)])]; // 全选并添加新文件
  12436. }
  12437. },
  12438. async exportAppendixFiles(){
  12439. let files = this.allFile(2);
  12440. let uploadFile = []
  12441. for(var i = 0; i < files.length; i++){
  12442. if(this.appendixFiles.includes(files[i].url)){
  12443. uploadFile.push(files[i])
  12444. }
  12445. }
  12446. if(!uploadFile.length){
  12447. this.$message.error('请先选需要下载的附件')
  12448. return
  12449. }
  12450. this.appendixLoading = true
  12451. const zip = new JSZip();
  12452. for(var j = 0; j < uploadFile.length; j++){
  12453. let fileZ = uploadFile[j]
  12454. let name = fileZ.name
  12455. let file = await getFile(fileZ.url)
  12456. const file_name = fileZ.name; // 获取文件名
  12457. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  12458. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  12459. // 判断是否有重复的文件名字
  12460. if (!zip.file(file_name)) {
  12461. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  12462. } else {
  12463. // 如果有重复的文件名,则在文件名后添加序号
  12464. let count = 1;
  12465. let newFileName = fileNameWithoutExt;
  12466. while (zip.file(`${newFileName}.${fileExt}`)) {
  12467. newFileName = `${fileNameWithoutExt}(${count})`;
  12468. count++;
  12469. }
  12470. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  12471. }
  12472. // zip.file(`${name}`, file.data, { binary: true })
  12473. }
  12474. zip.generateAsync({ type: "blob" }).then((content) => {
  12475. // 生成二进制流
  12476. saveAs(
  12477. content,
  12478. this.courseName + "-" + "附件.zip"
  12479. ); // 利用file-saver保存文件 自定义文件名
  12480. setTimeout(() => {
  12481. this.appendixLoading = false
  12482. }, 2000);
  12483. });
  12484. },
  12485. deleteInfoData(e, ic) {
  12486. e.stopPropagation();
  12487. let _this = this;
  12488. _this
  12489. .$confirm("确定删除此项?", "提示", {
  12490. confirmButtonText: "确定",
  12491. cancelButtonText: "取消",
  12492. type: "warning",
  12493. })
  12494. .then(() => {
  12495. _this.infoData.splice(
  12496. ic,
  12497. 1
  12498. );
  12499. })
  12500. .catch(() => {
  12501. return;
  12502. });
  12503. },
  12504. deleteInfoData2(e, ic) {
  12505. e.stopPropagation();
  12506. let _this = this;
  12507. _this
  12508. .$confirm("确定删除此项?", "提示", {
  12509. confirmButtonText: "确定",
  12510. cancelButtonText: "取消",
  12511. type: "warning",
  12512. })
  12513. .then(() => {
  12514. let fileid = _this.infoData2[ic].fileid;
  12515. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  12516. _this.infoData2.splice(
  12517. ic,
  12518. 1
  12519. );
  12520. })
  12521. .catch(() => {
  12522. return;
  12523. });
  12524. },
  12525. deleteKnowInfoData(e, ic) {
  12526. e.stopPropagation();
  12527. let _this = this;
  12528. _this
  12529. .$confirm("确定删除此项?", "提示", {
  12530. confirmButtonText: "确定",
  12531. cancelButtonText: "取消",
  12532. type: "warning",
  12533. })
  12534. .then(() => {
  12535. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12536. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  12537. }
  12538. _this.knowInfoData.splice(
  12539. ic,
  12540. 1
  12541. );
  12542. })
  12543. .catch(() => {
  12544. return;
  12545. });
  12546. },
  12547. deleteKnowInfoData2(e, ic) {
  12548. e.stopPropagation();
  12549. let _this = this;
  12550. _this
  12551. .$confirm("确定删除此项?", "提示", {
  12552. confirmButtonText: "确定",
  12553. cancelButtonText: "取消",
  12554. type: "warning",
  12555. })
  12556. .then(() => {
  12557. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12558. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  12559. }
  12560. _this.knowInfoData2.splice(
  12561. ic,
  12562. 1
  12563. );
  12564. })
  12565. .catch(() => {
  12566. return;
  12567. });
  12568. },
  12569. deletemubiaoInfoData(e, ic) {
  12570. e.stopPropagation();
  12571. let _this = this;
  12572. _this
  12573. .$confirm("确定删除此项?", "提示", {
  12574. confirmButtonText: "确定",
  12575. cancelButtonText: "取消",
  12576. type: "warning",
  12577. })
  12578. .then(() => {
  12579. _this.mubiaoInfoData.splice(
  12580. ic,
  12581. 1
  12582. );
  12583. })
  12584. .catch(() => {
  12585. return;
  12586. });
  12587. },
  12588. deletexuanzeInfoData(e, ic) {
  12589. e.stopPropagation();
  12590. let _this = this;
  12591. _this
  12592. .$confirm("确定删除此项?", "提示", {
  12593. confirmButtonText: "确定",
  12594. cancelButtonText: "取消",
  12595. type: "warning",
  12596. })
  12597. .then(() => {
  12598. _this.xuanzeInfoData.splice(
  12599. ic,
  12600. 1
  12601. );
  12602. })
  12603. .catch(() => {
  12604. return;
  12605. });
  12606. },
  12607. deletepingjiaInfoData(e, ic, tindex) {
  12608. e.stopPropagation();
  12609. let _this = this;
  12610. _this
  12611. .$confirm("确定删除此项?", "提示", {
  12612. confirmButtonText: "确定",
  12613. cancelButtonText: "取消",
  12614. type: "warning",
  12615. })
  12616. .then(() => {
  12617. _this.pingjiaInfoData[tindex].splice(
  12618. ic,
  12619. 1
  12620. );
  12621. })
  12622. .catch(() => {
  12623. return;
  12624. });
  12625. },
  12626. deleteCankaoInfoData(e, ic) {
  12627. e.stopPropagation();
  12628. let _this = this;
  12629. _this
  12630. .$confirm("确定删除此项?", "提示", {
  12631. confirmButtonText: "确定",
  12632. cancelButtonText: "取消",
  12633. type: "warning",
  12634. })
  12635. .then(() => {
  12636. _this.cankaoInfoData.splice(
  12637. ic,
  12638. 1
  12639. );
  12640. })
  12641. .catch(() => {
  12642. return;
  12643. });
  12644. },
  12645. deleteTeacherInfoData(e, ic) {
  12646. e.stopPropagation();
  12647. let _this = this;
  12648. _this
  12649. .$confirm("确定删除此项?", "提示", {
  12650. confirmButtonText: "确定",
  12651. cancelButtonText: "取消",
  12652. type: "warning",
  12653. })
  12654. .then(() => {
  12655. _this.teacherInfoData.splice(
  12656. ic,
  12657. 1
  12658. );
  12659. })
  12660. .catch(() => {
  12661. return;
  12662. });
  12663. },
  12664. updataVideoT(e, i, j, ic) {
  12665. // e.stopPropagation();
  12666. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  12667. // ic
  12668. // ].name = JSON.parse(JSON.stringify(e.target.value));
  12669. this.line =
  12670. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  12671. this.taskCount = j;
  12672. this.lineCount = ic;
  12673. this.dialogVisibleupdataVideoT = true;
  12674. this.$forceUpdate();
  12675. },
  12676. checkChpater(e, i, j, ic){
  12677. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  12678. if(type == 3){
  12679. var fileA = [
  12680. "DOC",
  12681. "DOCX",
  12682. "DOCM",
  12683. "DOTM",
  12684. "DOTX",
  12685. "PPTX",
  12686. "PPSX",
  12687. "PPT",
  12688. "PPS",
  12689. "PPTM",
  12690. "POTM",
  12691. "PPAM",
  12692. "POTX",
  12693. "PPSM",
  12694. "XLSX",
  12695. "XLS"
  12696. ];
  12697. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  12698. if (
  12699. fileA.indexOf(
  12700. url.split(".")[
  12701. url.split(".").length - 1
  12702. ].toLocaleUpperCase()
  12703. ) != -1
  12704. ) {
  12705. this.dialogVisibleOffice = true
  12706. this.wurl = url
  12707. } else if (
  12708. "pdf".indexOf(
  12709. url.split(".")[
  12710. url.split(".").length - 1
  12711. ].toLocaleLowerCase()
  12712. ) != -1
  12713. ) {
  12714. this.dialogVisiblePdf = true
  12715. this.wurl = url
  12716. }
  12717. }
  12718. },
  12719. checkChpater2(e, ic){
  12720. let type = this.infoData2[ic].type
  12721. if(type == 3){
  12722. var fileA = [
  12723. "DOC",
  12724. "DOCX",
  12725. "DOCM",
  12726. "DOTM",
  12727. "DOTX",
  12728. "PPTX",
  12729. "PPSX",
  12730. "PPT",
  12731. "PPS",
  12732. "PPTM",
  12733. "POTM",
  12734. "PPAM",
  12735. "POTX",
  12736. "PPSM",
  12737. "XLSX",
  12738. "XLS"
  12739. ];
  12740. let url = this.infoData2[ic].url
  12741. if (
  12742. fileA.indexOf(
  12743. url.split(".")[
  12744. url.split(".").length - 1
  12745. ].toLocaleUpperCase()
  12746. ) != -1
  12747. ) {
  12748. this.dialogVisibleOffice = true
  12749. this.wurl = url
  12750. } else if (
  12751. "pdf".indexOf(
  12752. url.split(".")[
  12753. url.split(".").length - 1
  12754. ].toLocaleLowerCase()
  12755. ) != -1
  12756. ) {
  12757. this.dialogVisiblePdf = true
  12758. this.wurl = url
  12759. }
  12760. }
  12761. },
  12762. checkChpater3(e, ic, item){
  12763. let type = item.type
  12764. if(type == 3){
  12765. var fileA = [
  12766. "DOC",
  12767. "DOCX",
  12768. "DOCM",
  12769. "DOTM",
  12770. "DOTX",
  12771. "PPTX",
  12772. "PPSX",
  12773. "PPT",
  12774. "PPS",
  12775. "PPTM",
  12776. "POTM",
  12777. "PPAM",
  12778. "POTX",
  12779. "PPSM",
  12780. "XLSX",
  12781. "XLS"
  12782. ];
  12783. let url = item.url
  12784. if (
  12785. fileA.indexOf(
  12786. url.split(".")[
  12787. url.split(".").length - 1
  12788. ].toLocaleUpperCase()
  12789. ) != -1
  12790. ) {
  12791. this.dialogVisibleOffice = true
  12792. this.wurl = url
  12793. } else if (
  12794. "pdf".indexOf(
  12795. url.split(".")[
  12796. url.split(".").length - 1
  12797. ].toLocaleLowerCase()
  12798. ) != -1
  12799. ) {
  12800. this.dialogVisiblePdf = true
  12801. this.wurl = url
  12802. }
  12803. }
  12804. },
  12805. updataVideoC() {
  12806. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12807. this.taskCount
  12808. ].chapterData[this.lineCount].name = JSON.parse(
  12809. JSON.stringify(this.line)
  12810. );
  12811. this.dialogVisibleupdataVideoT = false;
  12812. this.$forceUpdate();
  12813. },
  12814. upCd(e, i, j, taskCount, ic) {
  12815. e.stopPropagation();
  12816. if (ic == 0) {
  12817. return;
  12818. }
  12819. var a = JSON.parse(
  12820. JSON.stringify(
  12821. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  12822. ic - 1
  12823. ]
  12824. )
  12825. );
  12826. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  12827. JSON.parse(
  12828. JSON.stringify(
  12829. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  12830. )
  12831. );
  12832. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  12833. this.$forceUpdate();
  12834. },
  12835. downCd(e, i, j, taskCount, ic) {
  12836. e.stopPropagation();
  12837. if (
  12838. ic ==
  12839. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  12840. 1
  12841. ) {
  12842. return;
  12843. }
  12844. var a = JSON.parse(
  12845. JSON.stringify(
  12846. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  12847. ic + 1
  12848. ]
  12849. )
  12850. );
  12851. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  12852. JSON.parse(
  12853. JSON.stringify(
  12854. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  12855. )
  12856. );
  12857. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  12858. this.$forceUpdate();
  12859. },
  12860. async upTool(e, i, j, tooli) {
  12861. e.stopPropagation();
  12862. if (tooli == 0) {
  12863. return;
  12864. }
  12865. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  12866. let count2 = await this.getWorksCount(3, i, j, tooli);
  12867. if (count1 > 0 || count2 > 0) {
  12868. this.$confirm(
  12869. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  12870. "提示",
  12871. {
  12872. confirmButtonText: "确定",
  12873. cancelButtonText: "取消",
  12874. type: "warning",
  12875. }
  12876. )
  12877. .then(() => {
  12878. var a = JSON.parse(
  12879. JSON.stringify(
  12880. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  12881. tooli - 1
  12882. ]
  12883. )
  12884. );
  12885. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  12886. JSON.parse(
  12887. JSON.stringify(
  12888. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12889. )
  12890. );
  12891. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12892. this.$forceUpdate();
  12893. })
  12894. .catch(() => {
  12895. return;
  12896. });
  12897. } else {
  12898. var a = JSON.parse(
  12899. JSON.stringify(
  12900. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  12901. )
  12902. );
  12903. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  12904. JSON.parse(
  12905. JSON.stringify(
  12906. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12907. )
  12908. );
  12909. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12910. this.$forceUpdate();
  12911. }
  12912. },
  12913. async downTool(e, i, j, tooli) {
  12914. e.stopPropagation();
  12915. if (
  12916. tooli ==
  12917. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  12918. ) {
  12919. return;
  12920. }
  12921. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  12922. let count2 = await this.getWorksCount(3, i, j, tooli);
  12923. if (count1 > 0 || count2 > 0) {
  12924. this.$confirm(
  12925. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  12926. "提示",
  12927. {
  12928. confirmButtonText: "确定",
  12929. cancelButtonText: "取消",
  12930. type: "warning",
  12931. }
  12932. )
  12933. .then(() => {
  12934. var a = JSON.parse(
  12935. JSON.stringify(
  12936. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  12937. tooli + 1
  12938. ]
  12939. )
  12940. );
  12941. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  12942. JSON.parse(
  12943. JSON.stringify(
  12944. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12945. )
  12946. );
  12947. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12948. this.$forceUpdate();
  12949. })
  12950. .catch(() => {
  12951. return;
  12952. });
  12953. } else {
  12954. var a = JSON.parse(
  12955. JSON.stringify(
  12956. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  12957. )
  12958. );
  12959. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  12960. JSON.parse(
  12961. JSON.stringify(
  12962. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12963. )
  12964. );
  12965. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12966. this.$forceUpdate();
  12967. }
  12968. },
  12969. addWork(type) {
  12970. if(type == 2 && this.courseName == "") {
  12971. this.$message.error("请补充填写课程名称");
  12972. return;
  12973. }
  12974. let cPan = 1;
  12975. for (var i = 0; i < this.unitJson.length; i++) {
  12976. for (
  12977. var j = 0;
  12978. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  12979. j++
  12980. ) {
  12981. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  12982. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  12983. if (
  12984. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  12985. ) {
  12986. for (
  12987. var z = 0;
  12988. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  12989. z++
  12990. ) {
  12991. if (
  12992. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  12993. .length
  12994. ) {
  12995. this.$message.error("请把工具添加完整");
  12996. cPan = 2;
  12997. break;
  12998. }
  12999. }
  13000. }
  13001. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13002. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13003. i
  13004. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13005. return ele.value != "" || ele.detail != "" || ele.target != "";
  13006. });
  13007. }
  13008. }
  13009. }
  13010. this.inputShow = true;
  13011. if (cPan == 2) {
  13012. this.steps--;
  13013. return;
  13014. }
  13015. for (var i = 0; i < this.unitJson.length; i++) {
  13016. delete this.unitJson[i].isUpdate;
  13017. }
  13018. if(!this.targetCourseText2){
  13019. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13020. }
  13021. let params = [
  13022. {
  13023. uid: this.userid,
  13024. title: this.courseName,
  13025. brief: this.courseText,
  13026. cover:
  13027. this.cover.length > 0
  13028. ? JSON.stringify(this.cover)
  13029. : JSON.stringify([
  13030. {
  13031. name: "noBanner.jpg",
  13032. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  13033. uid: 1656409780264,
  13034. status: "success",
  13035. },
  13036. ]),
  13037. evaId: this.evalua,
  13038. astudent:
  13039. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13040. see: this.isTeacherSee == true ? 1 : 0,
  13041. chapters: JSON.stringify(this.unitJson),
  13042. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  13043. courseType: JSON.stringify(this.courseTypeId),
  13044. ateacher:
  13045. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13046. inviteCode: JSON.stringify(this.inviteCode),
  13047. refile: JSON.stringify(this.infoData),
  13048. reBrief: this.courseText2,
  13049. cpote: JSON.stringify(this.cpote),
  13050. setting: JSON.stringify({
  13051. courseJie: this.courseJie,
  13052. courseTime: this.courseTime,
  13053. teacherInfoData: this.teacherInfoData,
  13054. teacherCourseText: this.teacherCourseText,
  13055. targetCourseText: this.targetCourseText,
  13056. cankaoInfoData: this.cankaoInfoData,
  13057. mubiaoInfoData: this.mubiaoInfoData,
  13058. xuanzeInfoData: this.xuanzeInfoData,
  13059. pingjiaInfoData: this.pingjiaInfoData,
  13060. infoData2: this.infoData2,
  13061. isuseT: this.isuseT,
  13062. mode: this.mode,
  13063. targetCourseText2: this.targetCourseText2,
  13064. chatid: this.chatid,
  13065. languageSetting: this.languageSetting,
  13066. knowInfoData: this.knowInfoData,
  13067. knowFileids: this.knowFileids,
  13068. knowInfoData2: this.knowInfoData2,
  13069. knowFileids2: this.knowFileids2,
  13070. recordVideoText: this.recordVideoText,
  13071. recordAudioUrl: this.recordAudioUrl,
  13072. appendixFile: this.appendixFile,
  13073. }),
  13074. iresearch: this.isFileSearch ? 1 : 2,
  13075. },
  13076. ];
  13077. this.ajax
  13078. .post(this.$store.state.api + "addWorkNew2AI3", params)
  13079. .then((res) => {
  13080. console.log(this.steps);
  13081. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13082. this.$message({
  13083. message: "新增成功",
  13084. type: "success",
  13085. });
  13086. }
  13087. this.number = res.data.ordernumber;
  13088. this.courseId = res.data.courseId;
  13089. this.cid = res.data.courseId;
  13090. this.courseUserid = this.userid;
  13091. this.islogin = true;
  13092. // this.updateCourseState(4);
  13093. this.updateCourseState(5);
  13094. this.addtips()
  13095. if(type == 2){
  13096. this.retrunCourse()
  13097. }
  13098. if(type == 3){
  13099. this.steps = 4
  13100. }
  13101. })
  13102. .catch((err) => {
  13103. this.$message.error("网络不佳");
  13104. console.error(err);
  13105. });
  13106. },
  13107. goCourse() {
  13108. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  13109. },
  13110. updateWork2() {
  13111. let _unitIndex = this.unitIndex;
  13112. let cPan = 1;
  13113. for (
  13114. var j = 0;
  13115. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13116. j++
  13117. ) {
  13118. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13119. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13120. j
  13121. ].proVisible2 = false;
  13122. if (
  13123. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13124. .length > 1
  13125. ) {
  13126. for (
  13127. var z = 0;
  13128. z <
  13129. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13130. .length;
  13131. z++
  13132. ) {
  13133. if (
  13134. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13135. z
  13136. ].tool.length
  13137. ) {
  13138. this.$message.error("请把工具添加完整");
  13139. cPan = 2;
  13140. break;
  13141. }
  13142. }
  13143. }
  13144. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13145. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13146. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13147. (ele) => {
  13148. return ele.value != "" || ele.detail != "" || ele.target != "";
  13149. }
  13150. );
  13151. }
  13152. }
  13153. this.inputShow = true;
  13154. if (cPan == 2) {
  13155. this.steps--;
  13156. return;
  13157. }
  13158. let params = [
  13159. {
  13160. cid: this.cid,
  13161. chapters: JSON.stringify(this.unitJson),
  13162. uid: this.userid,
  13163. unitIndex: _unitIndex,
  13164. },
  13165. ];
  13166. this.ajax
  13167. .post(this.$store.state.api + "updateWorkNew4", params)
  13168. .then((res) => {
  13169. this.$message({
  13170. message: "修改成功",
  13171. type: "success",
  13172. });
  13173. this.courseId = this.cid;
  13174. this.addtips();
  13175. })
  13176. .catch((err) => {
  13177. this.$message.error("网络不佳");
  13178. console.error(err);
  13179. });
  13180. },
  13181. updateWork3(unitIndex) {
  13182. let _unitIndex = unitIndex;
  13183. let cPan = 1;
  13184. for (
  13185. var j = 0;
  13186. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13187. j++
  13188. ) {
  13189. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13190. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13191. j
  13192. ].proVisible2 = false;
  13193. if (
  13194. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13195. .length > 1
  13196. ) {
  13197. for (
  13198. var z = 0;
  13199. z <
  13200. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13201. .length;
  13202. z++
  13203. ) {
  13204. if (
  13205. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13206. z
  13207. ].tool.length
  13208. ) {
  13209. this.$message.error("请把工具添加完整");
  13210. cPan = 2;
  13211. break;
  13212. }
  13213. }
  13214. }
  13215. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13216. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13217. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13218. (ele) => {
  13219. return ele.value != "" || ele.detail != "" || ele.target != "";
  13220. }
  13221. );
  13222. }
  13223. }
  13224. this.inputShow = true;
  13225. if (cPan == 2) {
  13226. this.steps--;
  13227. return;
  13228. }
  13229. let params = [
  13230. {
  13231. cid: this.cid,
  13232. chapters: JSON.stringify(this.unitJson),
  13233. uid: this.userid,
  13234. unitIndex: _unitIndex,
  13235. },
  13236. ];
  13237. this.ajax
  13238. .post(this.$store.state.api + "updateWorkNew4", params)
  13239. .then((res) => {
  13240. // this.$message({
  13241. // message: "修改成功",
  13242. // type: "success",
  13243. // });
  13244. this.courseId = this.cid;
  13245. this.addtips()
  13246. })
  13247. .catch((err) => {
  13248. this.$message.error("网络不佳");
  13249. console.error(err);
  13250. });
  13251. },
  13252. updateWork() {
  13253. let cPan = 1;
  13254. for (var i = 0; i < this.unitJson.length; i++) {
  13255. for (
  13256. var j = 0;
  13257. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13258. j++
  13259. ) {
  13260. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13261. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13262. if (
  13263. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13264. ) {
  13265. for (
  13266. var z = 0;
  13267. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13268. z++
  13269. ) {
  13270. if (
  13271. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13272. .length
  13273. ) {
  13274. this.$message.error("请把工具添加完整");
  13275. cPan = 2;
  13276. break;
  13277. }
  13278. }
  13279. }
  13280. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13281. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13282. i
  13283. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13284. return ele.value != "" || ele.detail != "" || ele.target != "";
  13285. });
  13286. }
  13287. }
  13288. }
  13289. this.inputShow = true;
  13290. if (cPan == 2) {
  13291. this.steps--;
  13292. return;
  13293. }
  13294. for (var i = 0; i < this.unitJson.length; i++) {
  13295. delete this.unitJson[i].isUpdate;
  13296. }
  13297. if(!this.targetCourseText2){
  13298. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13299. }
  13300. let params = [
  13301. {
  13302. cid: this.cid,
  13303. title: this.courseName,
  13304. brief: this.courseText,
  13305. cover:
  13306. this.cover.length > 0
  13307. ? JSON.stringify(this.cover)
  13308. : JSON.stringify([
  13309. {
  13310. name: "noBanner.jpg",
  13311. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  13312. uid: 1656409780264,
  13313. status: "success",
  13314. },
  13315. ]),
  13316. evaId: this.evalua,
  13317. astudent:
  13318. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13319. see: this.isTeacherSee == true ? 1 : 0,
  13320. chapters: JSON.stringify(this.unitJson),
  13321. template: this.myWord != "undefined" ? this.myWord : [],
  13322. uid: this.userid,
  13323. courseType: JSON.stringify(this.courseTypeId),
  13324. ateacher:
  13325. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13326. inviteCode: JSON.stringify(this.inviteCode),
  13327. refile: JSON.stringify(this.infoData),
  13328. reBrief: this.courseText2,
  13329. cpote: JSON.stringify(this.cpote),
  13330. setting: JSON.stringify({
  13331. courseJie: this.courseJie,
  13332. courseTime: this.courseTime,
  13333. teacherInfoData: this.teacherInfoData,
  13334. teacherCourseText: this.teacherCourseText,
  13335. targetCourseText: this.targetCourseText,
  13336. cankaoInfoData: this.cankaoInfoData,
  13337. mubiaoInfoData: this.mubiaoInfoData,
  13338. xuanzeInfoData: this.xuanzeInfoData,
  13339. pingjiaInfoData: this.pingjiaInfoData,
  13340. infoData2: this.infoData2,
  13341. isuseT: this.isuseT,
  13342. mode: this.mode,
  13343. targetCourseText2: this.targetCourseText2,
  13344. chatid: this.chatid,
  13345. languageSetting: this.languageSetting,
  13346. knowInfoData: this.knowInfoData,
  13347. knowFileids: this.knowFileids,
  13348. knowInfoData2: this.knowInfoData2,
  13349. knowFileids2: this.knowFileids2,
  13350. recordVideoText: this.recordVideoText,
  13351. recordAudioUrl: this.recordAudioUrl,
  13352. appendixFile: this.appendixFile,
  13353. }),
  13354. iresearch: this.isFileSearch ? 1 : 2,
  13355. },
  13356. ];
  13357. this.ajax
  13358. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  13359. .then((res) => {
  13360. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13361. if (this.cidType == 1) {
  13362. this.$message({
  13363. message: "修改成功",
  13364. type: "success",
  13365. });
  13366. } else {
  13367. this.$message({
  13368. message: "新增成功",
  13369. type: "success",
  13370. });
  13371. }
  13372. }
  13373. this.number = this.nbOrder;
  13374. this.courseId = this.cid;
  13375. this.addtips()
  13376. })
  13377. .catch((err) => {
  13378. this.$message.error("网络不佳");
  13379. console.error(err);
  13380. });
  13381. },
  13382. insertWord() {
  13383. this.dialogVisible1 = true;
  13384. this.updateBoolean2 = false;
  13385. this.tTitle = "";
  13386. this.tdetail = "";
  13387. },
  13388. addWord() {
  13389. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  13390. name: this.tTitle,
  13391. content: this.tdetail,
  13392. uid: this.guid(),
  13393. });
  13394. this.dialogVisible1 = false;
  13395. },
  13396. upWord() { },
  13397. selectWord(uid, i, c) {
  13398. this.dialogVisible1 = true;
  13399. this.updateBoolean2 = true;
  13400. if (
  13401. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  13402. ) {
  13403. this.tTitle =
  13404. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  13405. this.tdetail =
  13406. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  13407. }
  13408. },
  13409. isAddPP() {
  13410. if (this.checkboxList.length > 0) {
  13411. this.$message({
  13412. message: "添加成功",
  13413. type: "success",
  13414. });
  13415. this.dialogVisible3 = false;
  13416. } else {
  13417. this.$message({
  13418. message: "请添加课程成员",
  13419. type: "error",
  13420. });
  13421. }
  13422. },
  13423. isAddClass() {
  13424. this.dialogVisibleClass = false;
  13425. },
  13426. isAddPPTeacher() {
  13427. this.dialogVisibleMember = false;
  13428. this.setMan();
  13429. },
  13430. getTipsTemplate(){
  13431. if(this.templateid){
  13432. let params = {
  13433. id: this.templateid
  13434. }
  13435. this.ajax
  13436. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13437. .then((res) => {
  13438. if(res.data[0].length){
  13439. this.tipsJson = res.data[0][0]
  13440. this.aiJson = JSON.parse(res.data[0][0].tips)
  13441. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13442. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13443. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13444. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13445. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13446. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13447. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13448. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13449. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13450. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13451. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13452. }
  13453. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13454. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13455. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13456. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  13457. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  13458. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  13459. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  13460. - 我们的课程主题可以如何与学生的实际生活联系起来?
  13461. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  13462. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  13463. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  13464. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  13465. - 学生个人最终要完成什么?学生小组最终要完成什么?
  13466. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  13467. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  13468. 问题:<议程和问题引导>中的问题
  13469. 讨论:<转文本内容>`
  13470. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下<讨论>,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  13471. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  13472. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  13473. // }
  13474. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  13475. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13476. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13477. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13478. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  13479. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13480. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  13481. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13482. // }
  13483. this.$forceUpdate();
  13484. this.isDialog = res.data[0][0].isDialog
  13485. }
  13486. })
  13487. .catch((err) => { });
  13488. }
  13489. },
  13490. getTipsTemplateIsDialog(){
  13491. if(this.templateid){
  13492. let params = {
  13493. id: this.templateid
  13494. }
  13495. this.ajax
  13496. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13497. .then((res) => {
  13498. if(res.data[0].length){
  13499. this.isDialog = res.data[0][0].isDialog
  13500. }
  13501. })
  13502. .catch((err) => { });
  13503. }
  13504. },
  13505. getTemplate() {
  13506. this.ajax
  13507. .get(this.$store.state.api + "getCourseTemplateT", "")
  13508. .then((res) => {
  13509. this.templateArray = res.data[0];
  13510. this.getTemplateOid();
  13511. this.$forceUpdate();
  13512. })
  13513. .catch((err) => { });
  13514. },
  13515. getTemplateOid() {
  13516. let params = {
  13517. oid: this.oid,
  13518. };
  13519. this.ajax
  13520. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13521. .then((res) => {
  13522. if (res.data[0].length) {
  13523. this.templateArray = [...res.data[0], ...this.templateArray];
  13524. }
  13525. this.getTemplateOrg();
  13526. this.$forceUpdate();
  13527. })
  13528. .catch((err) => { });
  13529. },
  13530. getTemplateOrg() {
  13531. let params = {
  13532. oid: this.org,
  13533. };
  13534. this.ajax
  13535. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13536. .then((res) => {
  13537. if (res.data[0].length) {
  13538. this.templateArray = [...res.data[0], ...this.templateArray];
  13539. }
  13540. this.$forceUpdate();
  13541. })
  13542. .catch((err) => { });
  13543. },
  13544. clearChoose() {
  13545. this.clearArray.splice(this.templateC.id, 1);
  13546. this.dialogVisible2 = false;
  13547. },
  13548. clearAttText() {
  13549. this.AttText = {
  13550. title: "",
  13551. text: "",
  13552. };
  13553. this.dialogVisible6 = false;
  13554. },
  13555. clearLine() {
  13556. this.line = "";
  13557. this.dialogVisible7 = false;
  13558. },
  13559. openTemplate() {
  13560. this.ctJson = {};
  13561. this.templateDialog = true;
  13562. },
  13563. checkctJson(json) {
  13564. if (this.ctJson.id == json.id) {
  13565. this.ctJson = {};
  13566. } else {
  13567. this.ctJson = json;
  13568. }
  13569. },
  13570. addTemplate(res) {
  13571. let _this = this;
  13572. let _res = [];
  13573. if (res.id == 1) {
  13574. _res = [
  13575. {
  13576. dyName: "", //单元标题
  13577. easy: 1,
  13578. chapterInfo: [
  13579. {
  13580. isread: false,
  13581. chapterid: this.guid(),
  13582. title: "",
  13583. courseName: "",
  13584. taskJson: [
  13585. {
  13586. task: "",
  13587. taskDetail: "",
  13588. chapterData: [],
  13589. toolText: "",
  13590. toolChoose: [
  13591. {
  13592. tool: [],
  13593. toolDetail: "",
  13594. toolType: 0,
  13595. askCount: 1,
  13596. askTitle: "",
  13597. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13598. },
  13599. ],
  13600. isShowTools: false,
  13601. askCount: 1,
  13602. isFold: 1,
  13603. askTitle: "",
  13604. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13605. checkJson: [{ checkCount: [], checkPerent: [] }],
  13606. homeworkList: [],
  13607. },
  13608. ],
  13609. itemCount: 1,
  13610. fileList1: [],
  13611. video: [],
  13612. testData: [],
  13613. pData: [],
  13614. templateArray: [],
  13615. },
  13616. ],
  13617. },
  13618. ];
  13619. this.updateCourseState(1);
  13620. } else if (res.id == 2) {
  13621. let stageData = [];
  13622. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13623. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13624. if (!iframe && !iframe2) {
  13625. this.$message.error("请使用AI共创生成");
  13626. return;
  13627. }
  13628. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13629. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13630. if (
  13631. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13632. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13633. ) {
  13634. this.$message.error("请使用AI共创生成");
  13635. return;
  13636. }
  13637. stageData = copyData
  13638. ? copyData.stageData
  13639. : copyData2
  13640. ? copyData2.stageData
  13641. : [""];
  13642. for (var i = 0; i < stageData.length; i++) {
  13643. _res.push({
  13644. dyName: stageData[i], //单元标题
  13645. chapterInfo: [
  13646. {
  13647. isread: false,
  13648. chapterid: this.guid(),
  13649. title: "",
  13650. courseName: "",
  13651. taskJson: [
  13652. {
  13653. task: "",
  13654. taskDetail: "",
  13655. chapterData: [],
  13656. toolText: "",
  13657. toolChoose: [
  13658. {
  13659. tool: [],
  13660. toolDetail: "",
  13661. toolType: 0,
  13662. askCount: 1,
  13663. askTitle: "",
  13664. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13665. },
  13666. ],
  13667. isShowTools: false,
  13668. askCount: 1,
  13669. isFold: 1,
  13670. askTitle: "",
  13671. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13672. checkJson: [{ checkCount: [], checkPerent: [] }],
  13673. homeworkList: [],
  13674. },
  13675. ],
  13676. itemCount: 1,
  13677. fileList1: [],
  13678. video: [],
  13679. testData: [],
  13680. pData: [],
  13681. templateArray: [],
  13682. },
  13683. ],
  13684. });
  13685. }
  13686. this.updateCourseState(1);
  13687. } else if (!Object.keys(res).length) {
  13688. this.$message.error("请选择模板");
  13689. retrun;
  13690. } else {
  13691. _res = JSON.parse(res.chapters);
  13692. this.updateCourseState(parseInt(res.state));
  13693. }
  13694. _this
  13695. .$confirm(
  13696. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13697. "提示",
  13698. {
  13699. confirmButtonText: "确定",
  13700. cancelButtonText: "取消",
  13701. type: "warning",
  13702. }
  13703. )
  13704. .then(() => {
  13705. _this.unitJson = _res;
  13706. _this.updateWork();
  13707. // _this.steps++;
  13708. _this.templateDialog = false;
  13709. setTimeout(() => {
  13710. this.checkEva(this.checkId);
  13711. setTimeout(() => {
  13712. this.checkEva(this.checkId);
  13713. }, 100);
  13714. }, 1000);
  13715. })
  13716. .catch(() => {
  13717. return;
  13718. });
  13719. },
  13720. checkTemplate(res) {
  13721. let _this = this;
  13722. _this
  13723. .$confirm(
  13724. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13725. "提示",
  13726. {
  13727. confirmButtonText: "确定",
  13728. cancelButtonText: "取消",
  13729. type: "warning",
  13730. }
  13731. )
  13732. .then(() => {
  13733. _this.unitJson = JSON.parse(res.chapters);
  13734. _this.steps++;
  13735. setTimeout(() => {
  13736. this.checkEva(this.checkId);
  13737. setTimeout(() => {
  13738. this.checkEva(this.checkId);
  13739. }, 100);
  13740. }, 1000);
  13741. })
  13742. .catch(() => {
  13743. return;
  13744. });
  13745. },
  13746. checkTemplate1(w) {
  13747. this.steps++;
  13748. },
  13749. checkTemplate2() {
  13750. let _this = this;
  13751. _this
  13752. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  13753. confirmButtonText: "确定",
  13754. cancelButtonText: "取消",
  13755. type: "warning",
  13756. })
  13757. .then(() => {
  13758. _this.unitIndex = 0;
  13759. _this.unitJson = [
  13760. {
  13761. dyName: "", //单元标题
  13762. chapterInfo: [
  13763. {
  13764. isread: false,
  13765. chapterid: this.guid(),
  13766. title: "",
  13767. courseName: "",
  13768. taskJson: [
  13769. {
  13770. task: "",
  13771. taskDetail: "",
  13772. chapterData: [],
  13773. toolText: "",
  13774. toolChoose: [
  13775. {
  13776. tool: [],
  13777. toolDetail: "",
  13778. toolType: 0,
  13779. askCount: 1,
  13780. askTitle: "",
  13781. askJson: [
  13782. { askstitle: "", askItem: 1, checkList: [] },
  13783. ],
  13784. },
  13785. ],
  13786. isShowTools: false,
  13787. askCount: 1,
  13788. isFold: 1,
  13789. askTitle: "",
  13790. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13791. checkJson: [{ checkCount: [], checkPerent: [] }],
  13792. homeworkList: [],
  13793. },
  13794. ],
  13795. itemCount: 1,
  13796. fileList1: [],
  13797. video: [],
  13798. testData: [],
  13799. pData: [],
  13800. templateArray: [],
  13801. },
  13802. ],
  13803. },
  13804. ];
  13805. this.steps++;
  13806. setTimeout(() => {
  13807. this.checkEva(this.checkId);
  13808. setTimeout(() => {
  13809. this.checkEva(this.checkId);
  13810. }, 100);
  13811. }, 1000);
  13812. this.updateWork();
  13813. })
  13814. .catch(() => {
  13815. return;
  13816. });
  13817. },
  13818. checkTemplate3() {
  13819. let _this = this;
  13820. _this
  13821. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  13822. confirmButtonText: "确定",
  13823. cancelButtonText: "取消",
  13824. type: "warning",
  13825. })
  13826. .then(() => {
  13827. _this.unitIndex = 0;
  13828. _this.unitJson = [
  13829. {
  13830. dyName: "", //单元标题
  13831. easy: 1,
  13832. chapterInfo: [
  13833. {
  13834. isread: false,
  13835. chapterid: this.guid(),
  13836. title: "",
  13837. courseName: "",
  13838. taskJson: [
  13839. {
  13840. task: "",
  13841. taskDetail: "",
  13842. chapterData: [],
  13843. toolText: "",
  13844. toolChoose: [
  13845. {
  13846. tool: [],
  13847. toolDetail: "",
  13848. toolType: 0,
  13849. askCount: 1,
  13850. askTitle: "",
  13851. askJson: [
  13852. { askstitle: "", askItem: 1, checkList: [] },
  13853. ],
  13854. },
  13855. ],
  13856. isShowTools: false,
  13857. askCount: 1,
  13858. isFold: 1,
  13859. askTitle: "",
  13860. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13861. checkJson: [{ checkCount: [], checkPerent: [] }],
  13862. homeworkList: [],
  13863. },
  13864. ],
  13865. itemCount: 1,
  13866. fileList1: [],
  13867. video: [],
  13868. testData: [],
  13869. pData: [],
  13870. templateArray: [],
  13871. },
  13872. ],
  13873. },
  13874. ];
  13875. // this.steps++;
  13876. this.updateWork();
  13877. })
  13878. .catch(() => {
  13879. return;
  13880. });
  13881. },
  13882. checkTemplate4() {
  13883. let _this = this;
  13884. _this
  13885. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  13886. confirmButtonText: "确定",
  13887. cancelButtonText: "取消",
  13888. type: "warning",
  13889. })
  13890. .then(() => {
  13891. _this.unitIndex = 0;
  13892. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  13893. this.steps++;
  13894. this.updateWork();
  13895. })
  13896. .catch(() => {
  13897. return;
  13898. });
  13899. },
  13900. wordNext() {
  13901. this.dialogVisible2 = false;
  13902. },
  13903. isAddOrUpdateAttText() {
  13904. if (this.AttTextType == 0) {
  13905. this.addAttTextMessage();
  13906. } else {
  13907. this.updateAttText();
  13908. }
  13909. },
  13910. isAddOrUpdateLine() {
  13911. if (!this.lineTitle) {
  13912. this.$message.error("请填写链接标题");
  13913. return;
  13914. }
  13915. if (this.lineType == 0) {
  13916. this.addLine();
  13917. } else {
  13918. this.updateLine();
  13919. }
  13920. },
  13921. addAttTextMessage() {
  13922. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13923. this.taskCount
  13924. ].chapterData.unshift({
  13925. name: this.AttText.title,
  13926. url: this.AttText.text,
  13927. type: 6,
  13928. });
  13929. this.imgChange1(null, null, 6, this.taskCount);
  13930. this.dialogVisible6 = false;
  13931. },
  13932. selectAttText(itemTaskIndex, i) {
  13933. this.AttText.title =
  13934. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13935. itemTaskIndex
  13936. ].chapterData[i].name;
  13937. this.AttText.text =
  13938. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13939. itemTaskIndex
  13940. ].chapterData[i].url;
  13941. this.taskCount = itemTaskIndex;
  13942. this.AttTextIndex = i;
  13943. this.AttTextType = 1;
  13944. this.dialogVisible6 = true;
  13945. },
  13946. updateAttText() {
  13947. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13948. this.taskCount
  13949. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  13950. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13951. this.taskCount
  13952. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  13953. this.dialogVisible6 = false;
  13954. },
  13955. addLine() {
  13956. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13957. this.lineCount
  13958. ].chapterData.unshift({
  13959. name: "链接",
  13960. title: this.lineTitle,
  13961. url: this.line,
  13962. type: 8,
  13963. });
  13964. this.imgChange1(null, null, 8, this.lineCount);
  13965. this.dialogVisible7 = false;
  13966. },
  13967. selectLine(itemTaskIndex, i) {
  13968. this.line =
  13969. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13970. itemTaskIndex
  13971. ].chapterData[i].url;
  13972. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13973. itemTaskIndex
  13974. ].chapterData[i].title
  13975. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13976. .chapterData[i].title
  13977. : "";
  13978. this.taskCount = itemTaskIndex;
  13979. this.lineCount = i;
  13980. this.lineType = 1;
  13981. this.dialogVisible7 = true;
  13982. },
  13983. openUpdateSource(itemTaskIndex, i) {
  13984. this.sourceData = {};
  13985. let source =
  13986. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13987. .chapterData[i];
  13988. this.sourceData[source.id] = {};
  13989. this.sourceData[source.id].name = source.title;
  13990. this.sourceData[source.id].url = source.url;
  13991. this.dialogVisibleSource = true;
  13992. this.updateSourcePan = true;
  13993. this.taskCount = itemTaskIndex;
  13994. this.lineCount = i;
  13995. },
  13996. updateLine() {
  13997. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13998. this.taskCount
  13999. ].chapterData[this.lineCount].url = this.line;
  14000. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14001. this.taskCount
  14002. ].chapterData[this.lineCount].title = this.lineTitle;
  14003. this.dialogVisible7 = false;
  14004. },
  14005. addPP() {
  14006. this.dialogVisible3 = true;
  14007. },
  14008. goTo(path) {
  14009. this.$router.push(path);
  14010. },
  14011. openTools(itemTaskIndex, i, toolIndex) {
  14012. this.toolIndex = toolIndex;
  14013. this.taskCount = itemTaskIndex;
  14014. if (i == 4) {
  14015. if (toolIndex == null) {
  14016. var a =
  14017. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14018. .chapterData;
  14019. for (var i = 0; i < a.length; i++) {
  14020. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  14021. this.askJson =
  14022. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14023. itemTaskIndex
  14024. ].chapterData[i].askJson;
  14025. }
  14026. }
  14027. } else {
  14028. this.askJson = JSON.parse(
  14029. JSON.stringify(
  14030. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14031. itemTaskIndex
  14032. ].toolChoose[toolIndex]
  14033. )
  14034. );
  14035. }
  14036. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  14037. this.dialogVisible5 = true;
  14038. } else if (i == 45) {
  14039. if (
  14040. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14041. .toolChoose[toolIndex].testJson
  14042. ) {
  14043. this.testJson = JSON.parse(
  14044. JSON.stringify(
  14045. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14046. itemTaskIndex
  14047. ].toolChoose[toolIndex].testJson
  14048. )
  14049. );
  14050. } else {
  14051. var testJson = {
  14052. testCount: 1,
  14053. testTitle: "",
  14054. testJson: [
  14055. {
  14056. teststitle: "",
  14057. testItem: 1,
  14058. checkList: [],
  14059. timuList: [],
  14060. answer: [],
  14061. type: "1",
  14062. },
  14063. ],
  14064. };
  14065. this.testJson = testJson;
  14066. }
  14067. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  14068. this.dialogVisibleChoice = true;
  14069. } else if (i == 47) {
  14070. if (
  14071. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14072. .toolChoose[toolIndex].sentenceList
  14073. ) {
  14074. this.sentenceList = JSON.parse(
  14075. JSON.stringify(
  14076. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14077. itemTaskIndex
  14078. ].toolChoose[toolIndex].sentenceList
  14079. )
  14080. );
  14081. } else {
  14082. var sentenceList = [
  14083. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14084. ];
  14085. this.sentenceList = sentenceList;
  14086. }
  14087. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  14088. this.dialogVisibleSentence = true;
  14089. } else if (i == 48) {
  14090. if (
  14091. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14092. .toolChoose[toolIndex].tableJson
  14093. ) {
  14094. this.tableJson = JSON.parse(
  14095. JSON.stringify(
  14096. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14097. itemTaskIndex
  14098. ].toolChoose[toolIndex].tableJson
  14099. )
  14100. );
  14101. } else {
  14102. var tableJson = { text: "" };
  14103. this.tableJson = tableJson;
  14104. }
  14105. this.dialogVisibleTable = true;
  14106. } else if (i == 52) {
  14107. if (
  14108. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14109. .toolChoose[toolIndex].wordJson
  14110. ) {
  14111. this.wordJson = JSON.parse(
  14112. JSON.stringify(
  14113. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14114. itemTaskIndex
  14115. ].toolChoose[toolIndex].wordJson
  14116. )
  14117. );
  14118. } else {
  14119. var wordJson = { text: "" };
  14120. this.wordJson = wordJson;
  14121. }
  14122. this.dialogVisibleWord = true;
  14123. // else if (i == 50) {
  14124. // if (
  14125. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14126. // .toolChoose[toolIndex].uploadJson
  14127. // ) {
  14128. // this.uploadJson = JSON.parse(
  14129. // JSON.stringify(
  14130. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14131. // itemTaskIndex
  14132. // ].toolChoose[toolIndex].uploadJson
  14133. // )
  14134. // );
  14135. // } else {
  14136. // var uploadJson = [];
  14137. // this.uploadJson = uploadJson;
  14138. // }
  14139. // this.dialogVisibleMoreUpload = true;
  14140. // }
  14141. } else if (i == 10) {
  14142. if (
  14143. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14144. .toolChoose[toolIndex].preTime
  14145. ) {
  14146. this.preTime = JSON.parse(
  14147. JSON.stringify(
  14148. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14149. itemTaskIndex
  14150. ].toolChoose[toolIndex].preTime
  14151. )
  14152. );
  14153. } else {
  14154. var preTime = 0;
  14155. this.preTime = preTime;
  14156. }
  14157. this.dialogVisiblePreTime = true;
  14158. } else if (i == 49) {
  14159. if (
  14160. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14161. .toolChoose[toolIndex].groupJson
  14162. ) {
  14163. this.groupJson = JSON.parse(
  14164. JSON.stringify(
  14165. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14166. itemTaskIndex
  14167. ].toolChoose[toolIndex].groupJson
  14168. )
  14169. );
  14170. } else {
  14171. var groupJson = {
  14172. group: [{ name: "第1组" }],
  14173. number: undefined,
  14174. islock: 1,
  14175. };
  14176. this.groupJson = groupJson;
  14177. }
  14178. this.dialogVisibleGroup = true;
  14179. } else if (i == 62) {
  14180. if (
  14181. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14182. .toolChoose[toolIndex].videoJson
  14183. ) {
  14184. this.videoJson = JSON.parse(
  14185. JSON.stringify(
  14186. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14187. itemTaskIndex
  14188. ].toolChoose[toolIndex].videoJson
  14189. )
  14190. );
  14191. } else {
  14192. var videoJson = {
  14193. video: "",
  14194. setting: [],
  14195. };
  14196. this.videoJson = videoJson;
  14197. }
  14198. this.dialogVisibleVideo = true;
  14199. } else if (i == 15) {
  14200. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14201. itemTaskIndex
  14202. ].toolChoose[toolIndex].answerQ
  14203. ? JSON.parse(
  14204. JSON.stringify(
  14205. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14206. itemTaskIndex
  14207. ].toolChoose[toolIndex].answerQ
  14208. )
  14209. )
  14210. : "";
  14211. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  14212. this.dialogVisible8 = true;
  14213. } else if (i == 40) {
  14214. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14215. itemTaskIndex
  14216. ].toolChoose[toolIndex].rateJson
  14217. ? JSON.parse(
  14218. JSON.stringify(
  14219. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14220. itemTaskIndex
  14221. ].toolChoose[toolIndex].rateJson
  14222. )
  14223. )
  14224. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  14225. this.selectSteps = 1;
  14226. this.dialogVisibleRate = true;
  14227. } else if (i == 42) {
  14228. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14229. itemTaskIndex
  14230. ].toolChoose[toolIndex].answerQ
  14231. ? JSON.parse(
  14232. JSON.stringify(
  14233. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14234. itemTaskIndex
  14235. ].toolChoose[toolIndex].answerQ
  14236. )
  14237. )
  14238. : "";
  14239. this.dialogVisibleMp3 = true;
  14240. } else if (i == 41) {
  14241. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14242. itemTaskIndex
  14243. ].toolChoose[toolIndex].selectJson
  14244. ? JSON.parse(
  14245. JSON.stringify(
  14246. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14247. itemTaskIndex
  14248. ].toolChoose[toolIndex].selectJson
  14249. )
  14250. )
  14251. : { url: "", select: [], answer: [] };
  14252. this.selectSteps = 1;
  14253. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  14254. this.dialogVisibleSelect = true;
  14255. } else if (i == 3) {
  14256. top.postMessage(
  14257. {
  14258. tools: "3y",
  14259. cid: this.cid,
  14260. stage: this.unitIndex,
  14261. task: itemTaskIndex,
  14262. tool: toolIndex,
  14263. },
  14264. "*"
  14265. );
  14266. } else if (i == 1) {
  14267. top.postMessage(
  14268. {
  14269. tools: "1y",
  14270. cid: this.cid,
  14271. stage: this.unitIndex,
  14272. task: itemTaskIndex,
  14273. tool: toolIndex,
  14274. },
  14275. "*"
  14276. );
  14277. } else if (i == 57) {
  14278. top.postMessage(
  14279. {
  14280. tools: "57y",
  14281. cid: this.cid,
  14282. stage: this.unitIndex,
  14283. task: itemTaskIndex,
  14284. tool: toolIndex,
  14285. },
  14286. "*"
  14287. );
  14288. } else if (i == 69) {
  14289. this.englishList = {};
  14290. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  14291. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  14292. ? JSON.parse(
  14293. JSON.stringify(
  14294. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14295. itemTaskIndex
  14296. ].toolChoose[toolIndex].englishList
  14297. )
  14298. )
  14299. : {};
  14300. this.$forceUpdate();
  14301. this.englishDialogVisible = true;
  14302. } else if (i == 70) {
  14303. this.englishVoiceJson = {};
  14304. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  14305. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  14306. ? JSON.parse(
  14307. JSON.stringify(
  14308. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14309. itemTaskIndex
  14310. ].toolChoose[toolIndex].englishVoiceJson
  14311. )
  14312. )
  14313. : {
  14314. title: '',
  14315. detail: '',
  14316. array: []
  14317. };
  14318. // {
  14319. // time: "",
  14320. // class: "",
  14321. // difficulty: 0,
  14322. // topic: "",
  14323. // isShow: false,
  14324. // eva: 0,
  14325. // aiEva: {
  14326. // isAiEva: false,
  14327. // aiEvaChoose: [],
  14328. // },
  14329. // allfType: [],
  14330. // englishJson: {},
  14331. // };
  14332. this.$forceUpdate();
  14333. this.EnglishVoiceDialog = true;
  14334. }
  14335. },
  14336. setEnglishVoiceJson(val) {
  14337. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14338. this.taskCount
  14339. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  14340. JSON.stringify(val)
  14341. );
  14342. this.$forceUpdate();
  14343. if (
  14344. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14345. .toolChoose[this.toolIndex].tool != 70
  14346. ) {
  14347. this.addTools(70, this.taskCount, this.toolIndex);
  14348. }
  14349. },
  14350. chapAddTools(i) {
  14351. if (this.chapTools[0].tools.length == 0) {
  14352. this.chapTools[0].tools.push(i);
  14353. } else {
  14354. if (this.chapTools[0].tools.indexOf(i) != -1) {
  14355. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  14356. } else {
  14357. this.chapTools[0].tools.push(i);
  14358. }
  14359. }
  14360. this.$forceUpdate();
  14361. },
  14362. addChaptersDataTools() {
  14363. if (this.chapTools[0].tools.indexOf(4) != -1) {
  14364. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14365. this.chapCount
  14366. ].chapterData.unshift({
  14367. name: this.chapTools[0].toolDetail,
  14368. url: this.chapTools[0].tools,
  14369. type: 7,
  14370. askJson: this.askJson,
  14371. });
  14372. } else {
  14373. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14374. this.chapCount
  14375. ].chapterData.unshift({
  14376. name: this.chapTools[0].toolDetail,
  14377. url: this.chapTools[0].tools,
  14378. type: 7,
  14379. });
  14380. }
  14381. this.imgChange1(null, null, 7, this.chapCount);
  14382. this.dialogVisible4 = false;
  14383. },
  14384. addTools(i, itemTaskIndex, toolIndex) {
  14385. // if (
  14386. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14387. // .toolChoose[toolIndex].tool.length == 0
  14388. // ) {
  14389. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14390. // itemTaskIndex
  14391. // ].toolChoose[toolIndex].tool.push(i);
  14392. // } else {
  14393. // if (
  14394. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14395. // itemTaskIndex
  14396. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14397. // ) {
  14398. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14399. // itemTaskIndex
  14400. // ].toolChoose[toolIndex].tool.splice(
  14401. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14402. // itemTaskIndex
  14403. // ].toolChoose[toolIndex].tool.indexOf(i),
  14404. // 1
  14405. // );
  14406. // } else {
  14407. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14408. // itemTaskIndex
  14409. // ].toolChoose[toolIndex].tool.push(i);
  14410. // }
  14411. // console.log(
  14412. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14413. // .toolChoose[toolIndex].tool
  14414. // );
  14415. // }
  14416. if (i == 4) {
  14417. if (
  14418. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14419. .toolChoose[toolIndex].askJson.askTitle == "" ||
  14420. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14421. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  14422. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14423. .toolChoose[toolIndex].askJson[0].checkList < 2
  14424. ) {
  14425. this.openTools(itemTaskIndex, 4, toolIndex);
  14426. // this.$message({
  14427. // message: "请填写完整问卷内容",
  14428. // type: "error",
  14429. // });
  14430. return;
  14431. }
  14432. }
  14433. if (i == 45) {
  14434. if (
  14435. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14436. .toolChoose[toolIndex].testJson ||
  14437. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14438. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  14439. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14440. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  14441. ) {
  14442. this.openTools(itemTaskIndex, 45, toolIndex);
  14443. // this.$message({
  14444. // message: "请填写完整问卷内容",
  14445. // type: "error",
  14446. // });
  14447. return;
  14448. }
  14449. }
  14450. if (i == 47) {
  14451. if (
  14452. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14453. .toolChoose[toolIndex].sentenceList ||
  14454. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14455. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  14456. ) {
  14457. this.openTools(itemTaskIndex, 47, toolIndex);
  14458. return;
  14459. }
  14460. }
  14461. if (i == 69) {
  14462. if (
  14463. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14464. .toolChoose[toolIndex].englishList
  14465. ) {
  14466. this.openTools(itemTaskIndex, 69, toolIndex);
  14467. return;
  14468. }
  14469. }
  14470. if (i == 70) {
  14471. if (
  14472. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14473. .toolChoose[toolIndex].englishVoiceJson
  14474. ) {
  14475. this.openTools(itemTaskIndex, 70, toolIndex);
  14476. return;
  14477. }
  14478. }
  14479. // if (i == 48) {
  14480. // if (
  14481. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14482. // .toolChoose[toolIndex].tableJson
  14483. // ) {
  14484. // this.openTools(itemTaskIndex, 48, toolIndex);
  14485. // return;
  14486. // }
  14487. // }
  14488. // if (i == 50) {
  14489. // if (
  14490. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14491. // .toolChoose[toolIndex].uploadJson
  14492. // ) {
  14493. // this.openTools(itemTaskIndex, 50, toolIndex);
  14494. // return;
  14495. // }
  14496. // }
  14497. if (i == 49) {
  14498. if (
  14499. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14500. .toolChoose[toolIndex].groupJson
  14501. ) {
  14502. this.openTools(itemTaskIndex, 49, toolIndex);
  14503. return;
  14504. }
  14505. }
  14506. if (i == 62) {
  14507. if (
  14508. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14509. .toolChoose[toolIndex].videoJson
  14510. ) {
  14511. this.openTools(itemTaskIndex, 62, toolIndex);
  14512. return;
  14513. }
  14514. }
  14515. if (i == 15) {
  14516. if (
  14517. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14518. .toolChoose[toolIndex].answerQ ||
  14519. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14520. .toolChoose[toolIndex].answerQ == ""
  14521. ) {
  14522. this.openTools(itemTaskIndex, 15, toolIndex);
  14523. // this.$message({
  14524. // message: "请填写问答内容",
  14525. // type: "error",
  14526. // });
  14527. return;
  14528. }
  14529. }
  14530. if (i == 40) {
  14531. if (
  14532. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14533. .toolChoose[toolIndex].rateJson ||
  14534. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14535. .toolChoose[toolIndex].rateJson.length
  14536. ) {
  14537. this.openTools(itemTaskIndex, 40, toolIndex);
  14538. return;
  14539. }
  14540. }
  14541. if (i == 41) {
  14542. if (
  14543. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14544. .toolChoose[toolIndex].selectJson ||
  14545. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14546. .toolChoose[toolIndex].selectJson.url == "" ||
  14547. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14548. .toolChoose[toolIndex].selectJson.select.length ||
  14549. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14550. .toolChoose[toolIndex].selectJson.answer.length
  14551. ) {
  14552. this.openTools(itemTaskIndex, 41, toolIndex);
  14553. return;
  14554. }
  14555. }
  14556. if (i == 42) {
  14557. if (
  14558. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14559. .toolChoose[toolIndex].answerQ ||
  14560. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14561. .toolChoose[toolIndex].answerQ == ""
  14562. ) {
  14563. this.openTools(itemTaskIndex, 42, toolIndex);
  14564. return;
  14565. }
  14566. }
  14567. if (
  14568. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14569. .toolChoose[toolIndex].tool.length > 0
  14570. ) {
  14571. if (
  14572. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14573. itemTaskIndex
  14574. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14575. ) {
  14576. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14577. itemTaskIndex
  14578. ].toolChoose[toolIndex].tool.splice(
  14579. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14580. itemTaskIndex
  14581. ].toolChoose[toolIndex].tool.indexOf(i),
  14582. 1
  14583. );
  14584. } else {
  14585. // this.$message({
  14586. // message: "每个工具只能添加一个",
  14587. // type: "error",
  14588. // });
  14589. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14590. itemTaskIndex
  14591. ].toolChoose[toolIndex].tool = [];
  14592. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14593. itemTaskIndex
  14594. ].toolChoose[toolIndex].tool.push(i);
  14595. }
  14596. } else {
  14597. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14598. itemTaskIndex
  14599. ].toolChoose[toolIndex].tool.push(i);
  14600. }
  14601. this.$forceUpdate();
  14602. },
  14603. addAskList(index) {
  14604. this.askJson.askJson.splice(index + 1, 0, {
  14605. askstitle: "",
  14606. askItem: 1,
  14607. checkList: [],
  14608. });
  14609. this.askJson.askCount++;
  14610. },
  14611. addTestList(index) {
  14612. this.testJson.testJson.splice(index + 1, 0, {
  14613. teststitle: "",
  14614. testItem: 1,
  14615. checkList: [],
  14616. timuList: [],
  14617. answer: [],
  14618. type: "1",
  14619. });
  14620. this.testJson.testCount++;
  14621. },
  14622. deleteAskList(index) {
  14623. if (
  14624. !this.askJson.askJson[index].askstitle &&
  14625. this.askJson.askJson[index].askItem == 1 &&
  14626. !this.askJson.askJson[index].checkList[0]
  14627. ) {
  14628. this.askJson.askJson.splice(index, 1);
  14629. this.askJson.askCount--;
  14630. } else {
  14631. let _this = this;
  14632. _this
  14633. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14634. confirmButtonText: "确定",
  14635. cancelButtonText: "取消",
  14636. type: "warning",
  14637. })
  14638. .then(() => {
  14639. _this.askJson.askJson.splice(index, 1);
  14640. _this.askJson.askCount--;
  14641. })
  14642. .catch(() => {
  14643. return;
  14644. });
  14645. }
  14646. },
  14647. deleteTestList(index) {
  14648. if (
  14649. !this.testJson.testJson[index].teststitle &&
  14650. this.testJson.testJson[index].testItem == 1 &&
  14651. !this.testJson.testJson[index].checkList[0]
  14652. ) {
  14653. this.testJson.testJson.splice(index, 1);
  14654. this.testJson.testCount--;
  14655. } else {
  14656. let _this = this;
  14657. _this
  14658. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14659. confirmButtonText: "确定",
  14660. cancelButtonText: "取消",
  14661. type: "warning",
  14662. })
  14663. .then(() => {
  14664. _this.testJson.testJson.splice(index, 1);
  14665. _this.testJson.testCount--;
  14666. })
  14667. .catch(() => {
  14668. return;
  14669. });
  14670. }
  14671. },
  14672. askMove(type, index) {
  14673. if (type == 1) {
  14674. if (index > 0) {
  14675. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  14676. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14677. this.askJson.askJson[index - 1] = b;
  14678. this.askJson.askJson[index] = a;
  14679. }
  14680. } else {
  14681. if (index < this.askJson.askJson.length - 1) {
  14682. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  14683. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14684. this.askJson.askJson[index + 1] = b;
  14685. this.askJson.askJson[index] = a;
  14686. }
  14687. }
  14688. this.$forceUpdate();
  14689. },
  14690. checkMove(type, index, checkIndex) {
  14691. if (type == 1) {
  14692. if (checkIndex > 0) {
  14693. let a = JSON.parse(
  14694. JSON.stringify(
  14695. this.askJson.askJson[index].checkList[checkIndex - 1]
  14696. )
  14697. );
  14698. let b = JSON.parse(
  14699. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14700. );
  14701. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  14702. this.askJson.askJson[index].checkList[checkIndex] = a;
  14703. }
  14704. } else {
  14705. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  14706. let a = JSON.parse(
  14707. JSON.stringify(
  14708. this.askJson.askJson[index].checkList[checkIndex + 1]
  14709. )
  14710. );
  14711. let b = JSON.parse(
  14712. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14713. );
  14714. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  14715. this.askJson.askJson[index].checkList[checkIndex] = a;
  14716. }
  14717. }
  14718. this.$forceUpdate();
  14719. },
  14720. testMove(type, index) {
  14721. if (type == 1) {
  14722. if (index > 0) {
  14723. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  14724. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14725. this.testJson.testJson[index - 1] = b;
  14726. this.testJson.testJson[index] = a;
  14727. }
  14728. } else {
  14729. if (index < this.testJson.testJson.length - 1) {
  14730. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  14731. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14732. this.testJson.testJson[index + 1] = b;
  14733. this.testJson.testJson[index] = a;
  14734. }
  14735. }
  14736. this.$forceUpdate();
  14737. },
  14738. tcheckMove(type, index, checkIndex) {
  14739. if (type == 1) {
  14740. if (checkIndex > 0) {
  14741. let a = JSON.parse(
  14742. JSON.stringify(
  14743. this.testJson.testJson[index].checkList[checkIndex - 1]
  14744. )
  14745. );
  14746. let b = JSON.parse(
  14747. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14748. );
  14749. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  14750. this.testJson.testJson[index].checkList[checkIndex] = a;
  14751. }
  14752. } else {
  14753. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  14754. let a = JSON.parse(
  14755. JSON.stringify(
  14756. this.testJson.testJson[index].checkList[checkIndex + 1]
  14757. )
  14758. );
  14759. let b = JSON.parse(
  14760. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14761. );
  14762. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  14763. this.testJson.testJson[index].checkList[checkIndex] = a;
  14764. }
  14765. }
  14766. this.$forceUpdate();
  14767. },
  14768. addcheckList(json, index) {
  14769. // json.checkList.length++;
  14770. json.checkList.splice(index + 1, 0, "");
  14771. json.askItem++;
  14772. this.$forceUpdate();
  14773. },
  14774. deletecheckList(json, index) {
  14775. // json.checkList.length--;
  14776. json.checkList.splice(index, 1);
  14777. json.askItem--;
  14778. this.$forceUpdate();
  14779. },
  14780. addTcheckList(json, index) {
  14781. // json.checkList.length++;
  14782. json.checkList.splice(index + 1, 0, "");
  14783. json.testItem++;
  14784. this.$forceUpdate();
  14785. },
  14786. deleteTcheckList(json, index) {
  14787. // json.checkList.length--;
  14788. json.checkList.splice(index, 1);
  14789. json.testItem--;
  14790. this.$forceUpdate();
  14791. },
  14792. checkTestType(type, json) {
  14793. json.type = type;
  14794. setTimeout(() => {
  14795. json.answer = [];
  14796. }, 100);
  14797. },
  14798. checkAskType(type, json) {
  14799. json.type = type;
  14800. // json.checkList = [];
  14801. this.$forceUpdate();
  14802. },
  14803. addSelectList(json) {
  14804. json.select.push("");
  14805. json.answer.push("");
  14806. },
  14807. deleteSelectList(json) {
  14808. // json.select.length--;
  14809. // json.answer.length--;
  14810. json.select.splice(json.select.length - 1, 1);
  14811. json.answer.splice(json.answer.length - 1, 1);
  14812. },
  14813. addAsk() {
  14814. if (this.askJson.askTitle === "") {
  14815. this.$message.error("标题不能为空!");
  14816. return;
  14817. }
  14818. var aj = this.askJson.askJson;
  14819. var b = 1;
  14820. for (var i = 0; i < aj.length; i++) {
  14821. if (aj[i].askstitle === "") {
  14822. var a = 1;
  14823. for (let index = 0; index < aj[i].askItem; index++) {
  14824. const element = aj[i].checkList[index]
  14825. ? aj[i].checkList[index]
  14826. : "";
  14827. if (element != "") {
  14828. b++;
  14829. this.$message.error(`请将题目${i + 1}填写完整。`);
  14830. return;
  14831. } else {
  14832. a++;
  14833. }
  14834. }
  14835. if (b == 1) {
  14836. this.$message.error("至少填写一个问题");
  14837. return;
  14838. }
  14839. } else if (aj[i].askstitle != "") {
  14840. for (let index = 0; index < aj[i].askItem; index++) {
  14841. const element = aj[i].checkList[index]
  14842. ? aj[i].checkList[index]
  14843. : "";
  14844. var index = 0;
  14845. for (var z = 0; z < aj[i].checkList.length; z++) {
  14846. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  14847. if (checkC != "") {
  14848. index++;
  14849. } else {
  14850. this.$message.error(`题目${i + 1}选项不能为空!`);
  14851. return;
  14852. }
  14853. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  14854. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  14855. if (checkC == checkC2) {
  14856. this.$message.error(
  14857. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  14858. );
  14859. return;
  14860. }
  14861. }
  14862. }
  14863. b++;
  14864. if (index < 2) {
  14865. this.$message.error("每道题目至少需要设置2个选项。");
  14866. return;
  14867. }
  14868. }
  14869. }
  14870. }
  14871. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  14872. var elc = el.checkList.filter((element) => {
  14873. return element != "";
  14874. });
  14875. return el.askstitle != "" && elc.length != 0;
  14876. });
  14877. if (!this.dialogVisible4) {
  14878. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14879. this.taskCount
  14880. ].toolChoose[this.toolIndex] = this.askJson;
  14881. }
  14882. this.dialogVisible5 = false;
  14883. if (
  14884. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14885. .toolChoose[this.toolIndex].tool != 4
  14886. ) {
  14887. this.addTools(4, this.taskCount, this.toolIndex);
  14888. }
  14889. },
  14890. addTest() {
  14891. // if (this.testJson.testTitle === "") {
  14892. // this.$message.error("标题不能为空!");
  14893. // return;
  14894. // }
  14895. var aj = this.testJson.testJson;
  14896. var b = 1;
  14897. for (var i = 0; i < aj.length; i++) {
  14898. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  14899. var a = 1;
  14900. for (let index = 0; index < aj[i].testItem; index++) {
  14901. const element = aj[i].checkList[index]
  14902. ? aj[i].checkList[index]
  14903. : "";
  14904. if (element != "") {
  14905. b++;
  14906. this.$message.error(`请将题目${i + 1}填写完整。`);
  14907. return;
  14908. } else {
  14909. a++;
  14910. }
  14911. }
  14912. if (b == 1) {
  14913. this.$message.error("至少填写一个问题");
  14914. return;
  14915. }
  14916. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  14917. for (let index = 0; index < aj[i].testItem; index++) {
  14918. const element = aj[i].checkList[index]
  14919. ? aj[i].checkList[index]
  14920. : "";
  14921. var index = 0;
  14922. for (var z = 0; z < aj[i].checkList.length; z++) {
  14923. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  14924. if (checkC != "") {
  14925. index++;
  14926. } else {
  14927. this.$message.error(`题目${i + 1}选项不能为空!`);
  14928. return;
  14929. }
  14930. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  14931. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  14932. if (checkC == checkC2) {
  14933. this.$message.error(
  14934. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  14935. );
  14936. return;
  14937. }
  14938. }
  14939. }
  14940. b++;
  14941. if (index < 2) {
  14942. this.$message.error("每道题目至少需要设置2个选项。");
  14943. return;
  14944. }
  14945. if (
  14946. (aj[i].type == "2" && !aj[i].answer.length) ||
  14947. (aj[i].type == "1" &&
  14948. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  14949. (aj[i].answer !== 0 && !aj[i].answer)))
  14950. ) {
  14951. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  14952. return;
  14953. }
  14954. }
  14955. }
  14956. }
  14957. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  14958. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  14959. var elc = el.checkList.filter((element) => {
  14960. return element != "";
  14961. });
  14962. return (
  14963. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  14964. );
  14965. });
  14966. isTestJson.testCount = isTestJson.testJson.length;
  14967. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14968. this.taskCount
  14969. ].toolChoose[this.toolIndex].testJson = isTestJson;
  14970. this.dialogVisibleChoice = false;
  14971. if (
  14972. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14973. .toolChoose[this.toolIndex].tool != 45
  14974. ) {
  14975. this.addTools(45, this.taskCount, this.toolIndex);
  14976. }
  14977. },
  14978. addVideoJson(videoJson) {
  14979. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14980. this.taskCount
  14981. ].toolChoose[this.toolIndex].videoJson = videoJson;
  14982. this.dialogVisibleVideo = false;
  14983. if (
  14984. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14985. .toolChoose[this.toolIndex].tool != 62
  14986. ) {
  14987. this.addTools(62, this.taskCount, this.toolIndex);
  14988. }
  14989. },
  14990. //自动获取剪贴板
  14991. pasteOption() {
  14992. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14993. if (!iframe) {
  14994. this.$message.error("请使用AI共创生成题目");
  14995. return;
  14996. }
  14997. let copyData = iframe.contentWindow.copyData;
  14998. if (!copyData || !copyData.selectData.length) {
  14999. this.$message.error("请使用AI共创生成题目");
  15000. return;
  15001. }
  15002. let selectData = copyData.selectData;
  15003. for (var i = 0; i < selectData.length; i++) {
  15004. let answer = 0;
  15005. switch (selectData[i].answer[0]) {
  15006. case "A":
  15007. answer = 0;
  15008. break;
  15009. case "B":
  15010. answer = 1;
  15011. break;
  15012. case "C":
  15013. answer = 2;
  15014. break;
  15015. case "D":
  15016. answer = 3;
  15017. break;
  15018. case "E":
  15019. answer = 4;
  15020. break;
  15021. default:
  15022. break;
  15023. }
  15024. this.testJson.testJson.push({
  15025. teststitle: selectData[i].subject,
  15026. testItem: selectData[i].options.length,
  15027. checkList: selectData[i].options,
  15028. timuList: [],
  15029. answer: answer,
  15030. type: "1",
  15031. });
  15032. this.testJson.testCount++;
  15033. }
  15034. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15035. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15036. var elc = el.checkList.filter((element) => {
  15037. return element != "";
  15038. });
  15039. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  15040. });
  15041. isTestJson.testCount = isTestJson.testJson.length;
  15042. if (!isTestJson.testCount) {
  15043. return;
  15044. }
  15045. this.testJson = isTestJson;
  15046. this.$forceUpdate();
  15047. },
  15048. pasteTask(taskJson) {
  15049. let stageTasksData = [];
  15050. if (taskJson) {
  15051. stageTasksData = taskJson;
  15052. } else {
  15053. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15054. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15055. if (!iframe && !iframe2) {
  15056. this.$message.error("请使用AI共创生成");
  15057. return;
  15058. }
  15059. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15060. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15061. if (
  15062. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  15063. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  15064. ) {
  15065. this.$message.error("请使用AI共创生成");
  15066. return;
  15067. }
  15068. stageTasksData = copyData
  15069. ? copyData.tasksData
  15070. : copyData2
  15071. ? copyData2.tasksData
  15072. : [{ taskName: "", taskDecs: "" }];
  15073. }
  15074. let taskA = [];
  15075. let tasks = stageTasksData;
  15076. for (var j = 0; j < tasks.length; j++) {
  15077. taskA.push({
  15078. task: tasks[j].taskName,
  15079. taskDetail: tasks[j].taskDecs,
  15080. chapterData: [],
  15081. toolText: "",
  15082. toolChoose: [
  15083. {
  15084. tool: [],
  15085. toolDetail: "",
  15086. toolType: 0,
  15087. askCount: 1,
  15088. askTitle: "",
  15089. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15090. },
  15091. ],
  15092. isShowTools: false,
  15093. askCount: 1,
  15094. isFold: 1,
  15095. askTitle: "",
  15096. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15097. checkJson: [{ checkCount: [], checkPerent: [] }],
  15098. homeworkList: [],
  15099. });
  15100. }
  15101. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  15102. this.$forceUpdate();
  15103. },
  15104. pasteStage(stageJson) {
  15105. let stageData = [];
  15106. if (stageJson) {
  15107. stageData = stageJson;
  15108. } else {
  15109. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15110. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15111. if (!iframe && !iframe2) {
  15112. this.$message.error("请使用AI共创生成");
  15113. return;
  15114. }
  15115. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15116. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15117. if (
  15118. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  15119. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  15120. ) {
  15121. this.$message.error("请使用AI共创生成");
  15122. return;
  15123. }
  15124. stageData = copyData
  15125. ? copyData.stageData
  15126. : copyData2
  15127. ? copyData2.stageData
  15128. : [""];
  15129. }
  15130. let stage = [];
  15131. for (var i = 0; i < stageData.length; i++) {
  15132. stage.push({
  15133. dyName: stageData[i], //单元标题
  15134. chapterInfo: [
  15135. {
  15136. isread: false,
  15137. chapterid: this.guid(),
  15138. title: "",
  15139. courseName: "",
  15140. taskJson: [
  15141. {
  15142. task: "",
  15143. taskDetail: "",
  15144. chapterData: [],
  15145. toolText: "",
  15146. toolChoose: [
  15147. {
  15148. tool: [],
  15149. toolDetail: "",
  15150. toolType: 0,
  15151. askCount: 1,
  15152. askTitle: "",
  15153. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15154. },
  15155. ],
  15156. isShowTools: false,
  15157. askCount: 1,
  15158. isFold: 1,
  15159. askTitle: "",
  15160. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15161. checkJson: [{ checkCount: [], checkPerent: [] }],
  15162. homeworkList: [],
  15163. },
  15164. ],
  15165. itemCount: 1,
  15166. fileList1: [],
  15167. video: [],
  15168. testData: [],
  15169. pData: [],
  15170. templateArray: [],
  15171. },
  15172. ],
  15173. });
  15174. }
  15175. let _this = this;
  15176. if (stageJson) {
  15177. if (!_this.cid) {
  15178. _this.unitJson = stage;
  15179. } else {
  15180. _this.unitIndex = 0;
  15181. _this.unitJson = stage;
  15182. _this.updateWork();
  15183. }
  15184. } else {
  15185. _this
  15186. .$confirm(
  15187. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  15188. "提示",
  15189. {
  15190. confirmButtonText: "确定",
  15191. cancelButtonText: "取消",
  15192. type: "warning",
  15193. }
  15194. )
  15195. .then(() => {
  15196. _this.unitIndex = 0;
  15197. _this.unitJson = stage;
  15198. // _this.steps++;
  15199. _this.updateWork();
  15200. })
  15201. .catch(() => {
  15202. return;
  15203. });
  15204. }
  15205. },
  15206. openStageBox() {
  15207. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  15208. this.dialogVisibleStageChange = true;
  15209. },
  15210. updateChange() {
  15211. this.$confirm(
  15212. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  15213. "提示",
  15214. {
  15215. confirmButtonText: "确定",
  15216. cancelButtonText: "取消",
  15217. type: "warning",
  15218. }
  15219. )
  15220. .then(() => {
  15221. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  15222. this.updateWork();
  15223. this.dialogVisibleStageChange = false;
  15224. })
  15225. .catch(() => {
  15226. return;
  15227. });
  15228. },
  15229. addAnswer() {
  15230. if (this.answerQ == "") {
  15231. this.$message.error("请输入您想要问的问题");
  15232. return;
  15233. }
  15234. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15235. this.taskCount
  15236. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15237. this.dialogVisible8 = false;
  15238. if (
  15239. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15240. .toolChoose[this.toolIndex].tool != 15
  15241. ) {
  15242. this.addTools(15, this.taskCount, this.toolIndex);
  15243. }
  15244. },
  15245. addMp3Answer() {
  15246. if (this.answerQ == "") {
  15247. this.$message.error("请输入您想要回答的问题");
  15248. return;
  15249. }
  15250. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15251. this.taskCount
  15252. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15253. this.dialogVisibleMp3 = false;
  15254. },
  15255. addRateAnswer() {
  15256. var a = 1;
  15257. for (var i = 0; i < this.rateJson.length; i++) {
  15258. if (this.rateJson[i].value == "") {
  15259. a = 2;
  15260. break;
  15261. }
  15262. }
  15263. if (a == 2) {
  15264. this.$message.error("请把评价信息填写完整");
  15265. return;
  15266. }
  15267. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15268. this.taskCount
  15269. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  15270. this.dialogVisibleRate = false;
  15271. if (
  15272. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15273. .toolChoose[this.toolIndex].tool != 40
  15274. ) {
  15275. this.addTools(40, this.taskCount, this.toolIndex);
  15276. }
  15277. },
  15278. addSelectAnswer() {
  15279. if (this.selectJson.url == "") {
  15280. this.$message.error("请上传题目");
  15281. return;
  15282. }
  15283. if (!this.selectJson.select.length) {
  15284. this.$message.error("请添加选项");
  15285. return;
  15286. }
  15287. if (!this.selectJson.answer.length) {
  15288. this.$message.error("请设置答案");
  15289. return;
  15290. }
  15291. var a = 1;
  15292. for (var i = 0; i < this.selectJson.answer.length; i++) {
  15293. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  15294. a = 2;
  15295. }
  15296. }
  15297. if (a == 2) {
  15298. this.$message.error("请设置答案");
  15299. return;
  15300. }
  15301. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15302. this.taskCount
  15303. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  15304. this.dialogVisibleSelect = false;
  15305. if (
  15306. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15307. .toolChoose[this.toolIndex].tool != 41
  15308. ) {
  15309. this.addTools(41, this.taskCount, this.toolIndex);
  15310. }
  15311. },
  15312. nextSelectSteps() {
  15313. if (this.selectJson.url == "") {
  15314. this.$message.error("请上传题目");
  15315. return;
  15316. }
  15317. if (!this.selectJson.select.length) {
  15318. this.$message.error("请添加选项");
  15319. return;
  15320. } else {
  15321. for (var z = 0; z < this.selectJson.select.length; z++) {
  15322. let checkC = this.selectJson.select[z];
  15323. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  15324. let checkC2 = this.selectJson.select[z2];
  15325. if (checkC == checkC2) {
  15326. this.$message.error(
  15327. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  15328. );
  15329. return;
  15330. }
  15331. }
  15332. }
  15333. }
  15334. var a = 1;
  15335. for (var i = 0; i < this.selectJson.select.length; i++) {
  15336. if (!this.selectJson.select[i]) {
  15337. a = 2;
  15338. }
  15339. }
  15340. if (a == 2) {
  15341. this.$message.error("添加的选项不能为空");
  15342. return;
  15343. }
  15344. this.selectSteps++;
  15345. },
  15346. selectCourseDetail() {
  15347. if (this.cid == "" || this.cid == undefined) {
  15348. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  15349. this.isTeacherSee = true;
  15350. }
  15351. console.log("这是新增课程");
  15352. this.selectAllType();
  15353. this.chatid = uuidv4();
  15354. // this.courseTextB = false
  15355. } else {
  15356. this.isOutline = true
  15357. this.isOutline2 = true
  15358. this.cpoteType = 4
  15359. this.cidType = 1;
  15360. let params = {
  15361. cid: this.cid,
  15362. };
  15363. this.ajax
  15364. .get(this.$store.state.api + "select_course_detail", params)
  15365. .then((res) => {
  15366. this.unitJson = JSON.parse(res.data[0][0].chapters);
  15367. this.courseState = res.data[0][0].state;
  15368. for (var j = 0; j < this.unitJson.length; j++) {
  15369. for (
  15370. var k = 0;
  15371. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  15372. k++
  15373. ) {
  15374. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  15375. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15376. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15377. : [];
  15378. let _chapterData = [];
  15379. for (
  15380. var c = 0;
  15381. c <
  15382. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  15383. .length;
  15384. c++
  15385. ) {
  15386. if (
  15387. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15388. ) {
  15389. _chapterData.push(
  15390. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15391. );
  15392. }
  15393. }
  15394. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  15395. _chapterData;
  15396. }
  15397. }
  15398. this.$forceUpdate();
  15399. this.courseName = res.data[0][0].title;
  15400. this.searchFileName = JSON.parse(JSON.stringify(this.courseName))
  15401. this.courseText = res.data[0][0].brief;
  15402. this.courseText2 = res.data[0][0].reBrief;
  15403. this.evalua = res.data[0][0].evaId;
  15404. this.cover = JSON.parse(res.data[0][0].cover);
  15405. this.noneBtnImg = this.cover.length >= 1;
  15406. if (res.data[0][0].refile) {
  15407. this.infoData = JSON.parse(res.data[0][0].refile)
  15408. }
  15409. // this.checkboxList =
  15410. // res.data[0][0].course_student.length > 0
  15411. // ? JSON.parse(res.data[0][0].course_student)
  15412. // : [];
  15413. this.checkboxList2 = res.data[0][0].juri
  15414. ? res.data[0][0].juri.split(",")
  15415. : [];
  15416. this.inviteCode = [];
  15417. for (var i = 0; i < res.data[2].length; i++) {
  15418. this.inviteCode.push({
  15419. cid: res.data[2][i].classid,
  15420. ic: res.data[2][i].code,
  15421. });
  15422. }
  15423. this.checkboxList3 = res.data[0][0].course_teacher
  15424. ? res.data[0][0].course_teacher.split(",")
  15425. : [];
  15426. // this.isTeacherSee =
  15427. // res.data[0][0].is_teacher_look == 0 ? true : false;
  15428. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15429. this.myWord = res.data[0][0].template;
  15430. this.templateC.id = "123";
  15431. this.courseUserid = res.data[0][0].userid;
  15432. // if(this.courseUserid == this.userid){
  15433. // this.InviteChange(this.checkboxList2)
  15434. // }
  15435. this.nbOrder = res.data[0][0].ordernumber;
  15436. this.courseTypeId = [];
  15437. for (var i = 0; i < res.data[1].length; i++) {
  15438. this.courseTypeId.push(res.data[1][i].typeid);
  15439. }
  15440. console.log(this.courseTypeId);
  15441. // if (this.timer) clearInterval(this.timer);
  15442. if (this.timer) clearTimeout(this.timer);
  15443. this.timer = null;
  15444. // this.timer = setInterval(() => {
  15445. if(res.data[3].length){
  15446. try {
  15447. this.aiJson = JSON.parse(res.data[3][0].tips);
  15448. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15449. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15450. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15451. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15452. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15453. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15454. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15455. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15456. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15457. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15458. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15459. }
  15460. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15461. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15462. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15463. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15464. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15465. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15466. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15467. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15468. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15469. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15470. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15471. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15472. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15473. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15474. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15475. 讨论:<转文本内容>`
  15476. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15477. this.templateid = res.data[3][0].template;
  15478. this.getTipsTemplateIsDialog()
  15479. }catch(error){
  15480. console.error(error)
  15481. }
  15482. }
  15483. if(res.data[0][0].cpote){
  15484. try {
  15485. this.cpote = JSON.parse(res.data[0][0].cpote);
  15486. }catch(error){
  15487. console.error(error)
  15488. }
  15489. }
  15490. if(res.data[0][0].setting){
  15491. try {
  15492. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15493. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15494. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  15495. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15496. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15497. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15498. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15499. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15500. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15501. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  15502. 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;
  15503. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15504. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15505. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15506. 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;
  15507. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15508. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15509. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15510. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15511. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15512. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15513. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15514. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15515. this.courseTextBool = true
  15516. }
  15517. // if(!this.teacherCourseText && !this.targetCourseText2){
  15518. // this.isuseT = 1
  15519. // }
  15520. }catch(error){
  15521. console.error(error)
  15522. }
  15523. }
  15524. if(this.courseText){
  15525. this.courseTextB = false
  15526. }
  15527. if(this.teacherCourseText){
  15528. this.teacherCourseTextB = false
  15529. }
  15530. if(this.targetCourseText){
  15531. this.targetCourseTextB = false
  15532. }
  15533. if(this.targetCourseText2){
  15534. this.targetCourseText2B = false
  15535. }
  15536. this.isFileSearch = res.data[0][0].iresearch == 1
  15537. // this.seleteCourseUpdate();
  15538. this.setMan();
  15539. this.selectAllType();
  15540. this.unitJson[
  15541. this.unitIndex
  15542. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15543. // }, 5000);
  15544. this.$forceUpdate();
  15545. setTimeout(() => {
  15546. this.checkEva(this.evalua);
  15547. setTimeout(() => {
  15548. this.checkEva(this.evalua);
  15549. }, 100);
  15550. }, 100);
  15551. })
  15552. .catch((err) => {
  15553. console.error(err);
  15554. });
  15555. }
  15556. if(this.aiId){
  15557. let params = {
  15558. cid: this.aiId,
  15559. };
  15560. this.ajax
  15561. .get(this.$store.state.api + "select_course_detail", params)
  15562. .then((res) => {
  15563. let _unitJson = JSON.parse(res.data[0][0].chapters);
  15564. let fileInfo = []
  15565. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  15566. for(var i = 0; i < _unitJson.length; i++){
  15567. let tasks = _unitJson[i].chapterInfo[0].taskJson
  15568. for(var j = 0; j < tasks.length; j++){
  15569. let _infoData = tasks[j].chapterData.filter(el => {
  15570. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  15571. })
  15572. if(_infoData.length){
  15573. fileInfo = [...fileInfo, ..._infoData]
  15574. }
  15575. }
  15576. }
  15577. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  15578. this.$forceUpdate();
  15579. this.courseName = res.data[0][0].title;
  15580. this.courseText = res.data[0][0].brief;
  15581. this.courseText2 = res.data[0][0].reBrief;
  15582. this.cover = JSON.parse(res.data[0][0].cover);
  15583. this.noneBtnImg = this.cover.length >= 1;
  15584. this.checkboxList2 = res.data[0][0].juri
  15585. ? res.data[0][0].juri.split(",")
  15586. : [];
  15587. this.inviteCode = [];
  15588. for (var i = 0; i < res.data[2].length; i++) {
  15589. this.inviteCode.push({
  15590. cid: res.data[2][i].classid,
  15591. ic: res.data[2][i].code,
  15592. });
  15593. }
  15594. this.checkboxList3 = res.data[0][0].course_teacher
  15595. ? res.data[0][0].course_teacher.split(",")
  15596. : [];
  15597. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15598. this.myWord = res.data[0][0].template;
  15599. this.templateC.id = "123";
  15600. this.courseTypeId = [];
  15601. for (var i = 0; i < res.data[1].length; i++) {
  15602. this.courseTypeId.push(res.data[1][i].typeid);
  15603. }
  15604. console.log(this.courseTypeId);
  15605. if(res.data[3].length){
  15606. try {
  15607. this.aiJson = JSON.parse(res.data[3][0].tips);
  15608. this.templateid = res.data[3][0].template;
  15609. this.getTipsTemplateIsDialog()
  15610. }catch(error){
  15611. console.error(error)
  15612. }
  15613. }
  15614. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15615. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15616. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15617. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15618. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15619. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15620. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15621. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15622. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15623. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15624. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15625. }
  15626. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15627. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15628. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15629. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15630. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15631. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15632. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15633. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15634. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15635. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15636. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15637. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15638. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15639. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15640. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15641. 讨论:<转文本内容>`
  15642. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15643. if(res.data[0][0].cpote){
  15644. try {
  15645. this.cpote = JSON.parse(res.data[0][0].cpote);
  15646. }catch(error){
  15647. console.error(error)
  15648. }
  15649. }
  15650. if(res.data[0][0].setting){
  15651. try {
  15652. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15653. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15654. 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];
  15655. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15656. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15657. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15658. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15659. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15660. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15661. 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];
  15662. 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;
  15663. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15664. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15665. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15666. 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;
  15667. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15668. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15669. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15670. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15671. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15672. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15673. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15674. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15675. this.courseTextBool = true
  15676. }
  15677. // if(!this.teacherCourseText && !this.targetCourseText2){
  15678. // this.isuseT = 1
  15679. // }
  15680. }catch(error){
  15681. console.error(error)
  15682. }
  15683. }
  15684. if(this.teacherInfoData.length){
  15685. this.isuseT = true
  15686. }
  15687. if(this.courseText){
  15688. this.courseTextB = false
  15689. }
  15690. if(this.teacherCourseText){
  15691. this.teacherCourseTextB = false
  15692. }
  15693. if(this.targetCourseText){
  15694. this.targetCourseTextB = false
  15695. }
  15696. if(this.targetCourseText2){
  15697. this.targetCourseText2B = false
  15698. }
  15699. this.setMan();
  15700. this.unitJson[
  15701. this.unitIndex
  15702. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15703. this.$forceUpdate();
  15704. setTimeout(() => {
  15705. this.checkEva(this.evalua);
  15706. setTimeout(() => {
  15707. this.checkEva(this.evalua);
  15708. }, 100);
  15709. }, 100);
  15710. })
  15711. .catch((err) => {
  15712. console.error(err);
  15713. });
  15714. }
  15715. // if(this.cidType != 1 && this.templateid == ''){
  15716. // this.promptShow = true
  15717. // }
  15718. },
  15719. seleteCourseUpdate() {
  15720. let params = {
  15721. cid: this.cid,
  15722. };
  15723. this.ajax
  15724. .get(this.$store.state.api + "select_course_detail", params)
  15725. .then((res) => {
  15726. // console.log(this.unitJson);
  15727. let unitJson = JSON.parse(res.data[0][0].chapters);
  15728. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  15729. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  15730. let _unitJson = [];
  15731. let _chapAarry = [];
  15732. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  15733. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  15734. let index = 1;
  15735. let chapindex;
  15736. if (_unitJson2.length > unitJson.length) {
  15737. for (let c = 0; c < _unitJson2.length; c++) {
  15738. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  15739. }
  15740. for (let j = 0; j < unitJson.length; j++) {
  15741. let count = 0;
  15742. for (let k = 0; k < _unitJson2.length; k++) {
  15743. if (
  15744. unitJson[j].chapterInfo[0].chapterid ==
  15745. _unitJson2[k].chapterInfo[0].chapterid
  15746. ) {
  15747. count++;
  15748. _chapAarry.splice(
  15749. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15750. 1
  15751. );
  15752. _unitJson.push(unitJson[j]);
  15753. break;
  15754. }
  15755. }
  15756. // if(count === 0){
  15757. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  15758. // }
  15759. }
  15760. for (let k = 0; k < _unitJson2.length; k++) {
  15761. if (_unitJson2[k].isUpdate == 1) {
  15762. _chapAarry.splice(
  15763. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15764. 1
  15765. );
  15766. _unitJson.push(_unitJson2[k]);
  15767. }
  15768. }
  15769. console.log(_chapAarry);
  15770. for (let d = 0; d < _unitJson2.length; d++) {
  15771. if (
  15772. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  15773. ) {
  15774. if (_unitIndex == d) {
  15775. index = 2;
  15776. }
  15777. chapindex = d;
  15778. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  15779. }
  15780. }
  15781. } else {
  15782. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  15783. }
  15784. for (let i = 0; i < unitJson.length; i++) {
  15785. if (
  15786. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  15787. _unitJson[i].chapterInfo[0].chapterid !=
  15788. unitJson[i].chapterInfo[0].chapterid
  15789. ) {
  15790. if (i == _unitJson.length - 1) {
  15791. // this.unitIndex++
  15792. _unitIndex2++;
  15793. }
  15794. _unitJson.splice(i, 0, unitJson[i]);
  15795. } else if (i > _unitJson.length - 1) {
  15796. _unitJson.push(unitJson[i]);
  15797. } else if (
  15798. _unitJson[i].chapterInfo[0].chapterid ==
  15799. unitJson[i].chapterInfo[0].chapterid
  15800. ) {
  15801. _unitJson[i] = unitJson[i];
  15802. }
  15803. // if (i == _unitIndex) {
  15804. // continue;
  15805. // } else
  15806. }
  15807. if (_chapAarry.length && index != 2) {
  15808. if (chapindex < _unitIndex) {
  15809. this.isDelete = 2;
  15810. // this.unitIndex--;
  15811. _unitIndex2--;
  15812. } else if (
  15813. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  15814. _unitJson[_unitIndex].chapterInfo[0].chapterid
  15815. ) {
  15816. this.isDelete = 2;
  15817. for (let n = 0; n < _unitJson.length; n++) {
  15818. if (
  15819. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  15820. _unitJson[n].chapterInfo[0].chapterid
  15821. ) {
  15822. // this.unitIndex = n;
  15823. _unitIndex2 = n;
  15824. _unitJson[n] = _unitJson2[_unitIndex];
  15825. break;
  15826. }
  15827. }
  15828. }
  15829. } else if (index != 2) {
  15830. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  15831. _unitJson2[_unitIndex];
  15832. for (
  15833. var ci = 0;
  15834. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  15835. ci++
  15836. ) {
  15837. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  15838. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  15839. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15840. .toolChoose
  15841. : [];
  15842. let _chapterData = [];
  15843. for (
  15844. var c = 0;
  15845. c <
  15846. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  15847. .length;
  15848. c++
  15849. ) {
  15850. if (
  15851. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15852. .chapterData[c]
  15853. ) {
  15854. _chapterData.push(
  15855. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15856. .chapterData[c]
  15857. );
  15858. }
  15859. }
  15860. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  15861. _chapterData;
  15862. }
  15863. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  15864. }
  15865. if (index == 1) {
  15866. this.unitJson = _unitJson;
  15867. this.$forceUpdate();
  15868. setTimeout(() => {
  15869. if (this.unitIndex != _unitIndex2) {
  15870. this.isDelete = 2;
  15871. this.unitIndex = _unitIndex2;
  15872. }
  15873. }, 0);
  15874. this.timer = setTimeout(() => {
  15875. this.seleteCourseUpdate();
  15876. }, 1000);
  15877. } else if (index == 2) {
  15878. let _this = this;
  15879. _this
  15880. .$confirm(
  15881. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  15882. "提示",
  15883. {
  15884. confirmButtonText: "需要",
  15885. cancelButtonText: "取消",
  15886. type: "warning",
  15887. }
  15888. )
  15889. .then(() => {
  15890. if (_this.time()) {
  15891. _this.restoreWork(
  15892. _chapAarry[0],
  15893. _unitJson,
  15894. chapindex,
  15895. _unitJson2,
  15896. _unitIndex2
  15897. );
  15898. }
  15899. })
  15900. .catch(() => {
  15901. _this.unitJson = _unitJson;
  15902. _this.$forceUpdate();
  15903. setTimeout(() => {
  15904. if (this.unitIndex != _unitIndex2) {
  15905. this.isDelete = 2;
  15906. this.unitIndex = _unitIndex2;
  15907. }
  15908. }, 0);
  15909. _this.timer = setTimeout(() => {
  15910. _this.seleteCourseUpdate();
  15911. }, 1000);
  15912. });
  15913. }
  15914. // 在复制操作之前记录滚动位置
  15915. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  15916. // 执行复制操作
  15917. // 复制操作完成后恢复滚动位置
  15918. this.$nextTick(() => {
  15919. if (this.$refs.scrollContainer) {
  15920. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  15921. }
  15922. });
  15923. })
  15924. .catch((err) => {
  15925. console.error(err);
  15926. });
  15927. },
  15928. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  15929. let params = [
  15930. {
  15931. cid: this.cid,
  15932. chapters: JSON.stringify(this.unitJson),
  15933. uid: this.userid,
  15934. chapid: chapid,
  15935. },
  15936. ];
  15937. this.ajax
  15938. .post(this.$store.state.api + "restoreWork", params)
  15939. .then((res) => {
  15940. this.$message({
  15941. message: "恢复成功",
  15942. type: "success",
  15943. });
  15944. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  15945. this.unitJson = unitJson;
  15946. this.$forceUpdate();
  15947. setTimeout(() => {
  15948. if (this.unitIndex != unitIndex2) {
  15949. this.isDelete = 2;
  15950. this.unitIndex = unitIndex2;
  15951. }
  15952. }, 0);
  15953. this.timer = setTimeout(() => {
  15954. this.seleteCourseUpdate();
  15955. }, 1000);
  15956. })
  15957. .catch((err) => {
  15958. this.$message.error("网络不佳");
  15959. console.error(err);
  15960. });
  15961. },
  15962. getTypeName() {
  15963. console.log(this.courseTypeId);
  15964. this.$forceUpdate();
  15965. },
  15966. selectAllType() {
  15967. let params = {
  15968. org: this.org && this.org != "" ? this.org : "",
  15969. oid: this.oid && this.oid != "" ? this.oid : "",
  15970. stand: "cn"
  15971. };
  15972. this.ajax
  15973. .get(this.$store.state.api + "selectAllTypeStand", params)
  15974. .then((res) => {
  15975. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  15976. res.data[0] = [...res.data[0], ...res.data[4]];
  15977. }
  15978. this.CourseType = res.data;
  15979. this.CourseType2 = [
  15980. { name: "智见课程", id: [] },
  15981. { name: "智行课程", id: [] },
  15982. { name: "智创课程", id: [] },
  15983. ];
  15984. for (var cti = 0; cti < res.data[0].length; cti++) {
  15985. if (
  15986. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  15987. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  15988. ) {
  15989. this.CourseType2[0].id.push(res.data[0][cti].id);
  15990. } else if (
  15991. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  15992. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  15993. ) {
  15994. this.CourseType2[1].id.push(res.data[0][cti].id);
  15995. } else if (
  15996. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  15997. ) {
  15998. this.CourseType2[2].id.push(res.data[0][cti].id);
  15999. }
  16000. if (
  16001. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16002. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  16003. ) {
  16004. res.data[0][cti].name = "年级";
  16005. } else if (
  16006. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  16007. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16008. ) {
  16009. res.data[0][cti].name = "学科";
  16010. } else if (
  16011. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16012. ) {
  16013. res.data[0][cti].name = "主题";
  16014. }
  16015. }
  16016. let _courseTypeId = [];
  16017. for (var i = 0; i < res.data[0].length; i++) {
  16018. if (!this.cid) {
  16019. this.courseTypeId[res.data[0][i].id] = [];
  16020. }
  16021. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  16022. // }
  16023. this.CourseTypeJson[res.data[0][i].id] = [];
  16024. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16025. if (res.data[0][i].name == "栏目") {
  16026. this.CourseType[0][i].name = "主题";
  16027. }
  16028. }
  16029. if (res.data[2].length == 0 && res.data[3].length == 0) {
  16030. for (var j = 0; j < res.data[1].length; j++) {
  16031. if (
  16032. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  16033. _courseTypeId.indexOf(res.data[1][j].id) == -1
  16034. ) {
  16035. _courseTypeId.push(res.data[1][j].id);
  16036. }
  16037. if (res.data[0][i].id == res.data[1][j].pid) {
  16038. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16039. }
  16040. }
  16041. } else {
  16042. if (res.data[2].length > 0) {
  16043. for (var j = 0; j < res.data[2].length; j++) {
  16044. if (
  16045. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  16046. _courseTypeId.indexOf(res.data[2][j].id) == -1
  16047. ) {
  16048. _courseTypeId.push(res.data[2][j].id);
  16049. }
  16050. if (res.data[0][i].id == res.data[2][j].pid) {
  16051. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16052. }
  16053. }
  16054. }
  16055. if (res.data[3].length > 0) {
  16056. for (var j = 0; j < res.data[3].length; j++) {
  16057. if (
  16058. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  16059. _courseTypeId.indexOf(res.data[3][j].id) == -1
  16060. ) {
  16061. _courseTypeId.push(res.data[3][j].id);
  16062. }
  16063. if (res.data[0][i].id == res.data[3][j].pid) {
  16064. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16065. }
  16066. }
  16067. }
  16068. }
  16069. }
  16070. this.courseTypeId = _courseTypeId;
  16071. this.typeC1 = this.getTypeC(2)
  16072. this.typeC2 = this.getTypeC(1)
  16073. })
  16074. .catch((err) => {
  16075. console.error(err);
  16076. });
  16077. },
  16078. selectType() {
  16079. this.ajax
  16080. .get(this.$store.state.api + "selectType")
  16081. .then((res) => {
  16082. this.CourseType = res.data;
  16083. for (var i = 0; i < res.data[0].length; i++) {
  16084. if (!this.cid) {
  16085. this.courseTypeId[res.data[0][i].id] = "";
  16086. }
  16087. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16088. if (res.data[0][i].name == "栏目") {
  16089. this.CourseType[0][i].name = "主题";
  16090. }
  16091. }
  16092. for (var j = 0; j < res.data[1].length; j++) {
  16093. if (res.data[0][i].id == res.data[1][j].pid) {
  16094. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16095. this.CourseTypeJson[res.data[0][i].id] = [];
  16096. }
  16097. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16098. }
  16099. }
  16100. }
  16101. this.selectTypeByOid();
  16102. this.selectTypeByOrg();
  16103. })
  16104. .catch((err) => {
  16105. console.error(err);
  16106. });
  16107. },
  16108. selectTypeByOid() {
  16109. let params = {
  16110. oid: this.oid,
  16111. };
  16112. this.ajax
  16113. .get(this.$store.state.api + "selectTypeByOid", params)
  16114. .then((res) => {
  16115. for (var i = 0; i < res.data[0].length; i++) {
  16116. for (var j = 0; j < res.data[1].length; j++) {
  16117. if (res.data[0][i].id == res.data[1][j].pid) {
  16118. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16119. this.CourseTypeJson[res.data[0][i].id] = [];
  16120. }
  16121. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16122. }
  16123. }
  16124. }
  16125. })
  16126. .catch((err) => {
  16127. console.error(err);
  16128. });
  16129. },
  16130. selectTypeByOrg() {
  16131. let params = {
  16132. oid: this.org,
  16133. };
  16134. this.ajax
  16135. .get(this.$store.state.api + "selectTypeByOrg", params)
  16136. .then((res) => {
  16137. for (var i = 0; i < res.data[0].length; i++) {
  16138. for (var j = 0; j < res.data[1].length; j++) {
  16139. if (res.data[0][i].id == res.data[1][j].pid) {
  16140. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16141. this.CourseTypeJson[res.data[0][i].id] = [];
  16142. }
  16143. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16144. }
  16145. }
  16146. }
  16147. this.$forceUpdate();
  16148. })
  16149. .catch((err) => {
  16150. console.error(err);
  16151. });
  16152. },
  16153. OtherMb(type, task) {
  16154. if (task === 0 || task) {
  16155. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16156. task
  16157. ].isEvaFold = true;
  16158. }
  16159. this.typeMode = type;
  16160. setTimeout(() => {
  16161. this.checkEva(this.checkId);
  16162. setTimeout(() => {
  16163. this.checkEva(this.checkId);
  16164. }, 100);
  16165. }, 100);
  16166. },
  16167. openMember() {
  16168. this.searchTN = "";
  16169. this.getTeacher();
  16170. this.dialogVisibleMember = true;
  16171. },
  16172. checkEva(id, type) {
  16173. this.dialogVisiblemb = false;
  16174. this.selectEva();
  16175. if (this.evalua != id && type == 2) {
  16176. this.$message.success("导入成功");
  16177. setTimeout(() => {
  16178. this.checkEva(id);
  16179. }, 100);
  16180. }
  16181. this.evalua = id;
  16182. this.checkId = id;
  16183. if (this.evalua != "") {
  16184. for (var i = 0; i < this.evaJuri.length; i++) {
  16185. if (this.evalua == this.evaJuri[i].id) {
  16186. this.eTitle = this.evaJuri[i].title;
  16187. this.eJson = JSON.parse(this.evaJuri[i].content);
  16188. }
  16189. }
  16190. this.data.data = [];
  16191. this.$forceUpdate();
  16192. setTimeout(() => {
  16193. this.setMindData();
  16194. }, 1000);
  16195. }
  16196. },
  16197. deleteEva() {
  16198. let _this = this;
  16199. if (_this.evalua == "") {
  16200. this.$message.warning("内容已经清空了,请勿重复清空");
  16201. return;
  16202. }
  16203. _this
  16204. .$confirm("确定删除此目标吗?", "提示", {
  16205. confirmButtonText: "确定",
  16206. cancelButtonText: "取消",
  16207. type: "warning",
  16208. })
  16209. .then(() => {
  16210. _this.evalua = "";
  16211. _this.checkId = "";
  16212. _this.eTitle = "";
  16213. let _unitJson = _this.unitJson;
  16214. for (var i = 0; i < _unitJson.length; i++) {
  16215. let _task = _unitJson[i].chapterInfo[0].taskJson;
  16216. for (var j = 0; j < _task.length; j++) {
  16217. let _eList = _task[j].eList;
  16218. for (var k = 0; k < _eList.length; k++) {
  16219. delete _eList[k].target;
  16220. }
  16221. }
  16222. }
  16223. _this.$forceUpdate();
  16224. if (_this.cid) {
  16225. _this.updateWork();
  16226. }
  16227. })
  16228. .catch(() => {
  16229. return;
  16230. });
  16231. },
  16232. selectEva() {
  16233. let params = {
  16234. oid: this.oid,
  16235. };
  16236. this.ajax
  16237. .get(this.$store.state.api + "selectAllEvaluation", params)
  16238. .then((res) => {
  16239. this.evaJuri = res.data[0];
  16240. // 在复制操作之前记录滚动位置
  16241. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16242. // 执行复制操作
  16243. // 复制操作完成后恢复滚动位置
  16244. this.$nextTick(() => {
  16245. if (this.$refs.scrollContainer) {
  16246. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16247. }
  16248. });
  16249. })
  16250. .catch((err) => {
  16251. console.error(err);
  16252. });
  16253. },
  16254. setMindData() {
  16255. let targetArray = [];
  16256. this.data.data = [];
  16257. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  16258. let _eJson = Object.keys(this.eJson);
  16259. let _e = this.eJson;
  16260. for (let i = 0; i < _eJson.length; i++) {
  16261. let element = _e[_eJson[i]];
  16262. this.data.data.push({
  16263. id: element.id,
  16264. parentid: "root",
  16265. topic: element.name,
  16266. });
  16267. // targetArray.push({
  16268. // id: element.id,
  16269. // parentid: "root",
  16270. // name: element.name,
  16271. // });
  16272. targetArray.push({
  16273. value: element.name,
  16274. label: element.name,
  16275. children: [],
  16276. });
  16277. let _eJsonc = Object.keys(element.child);
  16278. let _e2 = element.child;
  16279. for (let j = 0; j < _eJsonc.length; j++) {
  16280. let _ec = _e2[_eJsonc[j]];
  16281. this.data.data.push({
  16282. id: _ec.id,
  16283. parentid: element.id,
  16284. topic: _ec.name,
  16285. });
  16286. // targetArray.push({
  16287. // id: _ec.id,
  16288. // parentid: element.id,
  16289. // name: _ec.name,
  16290. // });
  16291. targetArray[i].children.push({
  16292. value: _ec.name,
  16293. label: _ec.name,
  16294. children: [],
  16295. });
  16296. let _eJsonz = Object.keys(_ec.child);
  16297. let _e3 = _ec.child;
  16298. for (let z = 0; z < _eJsonz.length; z++) {
  16299. let _ez = _e3[_eJsonz[z]];
  16300. this.data.data.push({
  16301. id: _ez.id,
  16302. parentid: _ec.id,
  16303. topic: _ez.name,
  16304. });
  16305. // targetArray.push({
  16306. // id: _ez.id,
  16307. // parentid: _ec.id,
  16308. // name: _ez.name,
  16309. // });
  16310. targetArray[i].children[j].children.push({
  16311. value: _ez.name,
  16312. label: _ez.name,
  16313. });
  16314. }
  16315. }
  16316. }
  16317. this.targetArray = targetArray;
  16318. this.$forceUpdate();
  16319. },
  16320. /*添加评价 */
  16321. addEList(index, tIndex) {
  16322. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  16323. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  16324. value: "",
  16325. detail: "",
  16326. score: 5,
  16327. isai: "1",
  16328. })
  16329. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  16330. { value: "", detail: "", score: 5,isai: "1", },
  16331. ]);
  16332. this.$forceUpdate();
  16333. },
  16334. openEList(index, tIndex) {
  16335. this.evaIndex = index;
  16336. this.evatIndex = tIndex;
  16337. this.evaBoxDialog = true;
  16338. },
  16339. addCET(index, tIndex) {
  16340. this.cetIndex = index;
  16341. this.cettIndex = tIndex;
  16342. this.selectAllType1();
  16343. },
  16344. addCETemplate() {
  16345. var array =
  16346. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  16347. .eList;
  16348. let params = [
  16349. {
  16350. uid: this.userid,
  16351. n: this.templateName,
  16352. json: JSON.stringify(array),
  16353. t: 1,
  16354. oid: this.oid,
  16355. },
  16356. ];
  16357. this.ajax
  16358. .post(this.$store.state.api + "addCETShare", params)
  16359. .then((res) => {
  16360. this.addTypeByCET(res.data[0][0].id);
  16361. })
  16362. .catch((err) => {
  16363. this.$message.error("网络不佳");
  16364. console.error(err);
  16365. });
  16366. },
  16367. addTypeByCET(id) {
  16368. if (this.setTypeJson.two == "") {
  16369. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  16370. return;
  16371. }
  16372. let params = {
  16373. cid: id,
  16374. };
  16375. this.ajax
  16376. .get(this.$store.state.api + "deleteCETLabel", params)
  16377. .then((res) => {
  16378. for (var i = 0; i < 2; i++) {
  16379. let tid = "";
  16380. if (i == 0) {
  16381. tid = this.setTypeJson.one;
  16382. } else {
  16383. tid = this.setTypeJson.two;
  16384. }
  16385. let params = [
  16386. {
  16387. cid: id,
  16388. tid: tid,
  16389. uid: this.userid,
  16390. },
  16391. ];
  16392. this.ajax
  16393. .post(this.$store.state.api + "addCETLabel", params)
  16394. .then((res) => {
  16395. this.$message({
  16396. message: "添加成功",
  16397. type: "success",
  16398. });
  16399. this.close();
  16400. })
  16401. .catch((err) => {
  16402. this.$message.error("网络不佳");
  16403. console.error(err);
  16404. });
  16405. }
  16406. })
  16407. .catch((err) => {
  16408. this.$message.error("网络不佳");
  16409. console.error(err);
  16410. });
  16411. },
  16412. updateEvaJson(array) {
  16413. array = array.filter((item) => {
  16414. item.isai = "1"
  16415. return item;
  16416. });
  16417. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  16418. this.evatIndex
  16419. ].eList = array;
  16420. },
  16421. forceUpdate() {
  16422. this.$forceUpdate();
  16423. },
  16424. forceUpdate2() {
  16425. setTimeout(() => {
  16426. this.courseText += "*0*%*";
  16427. setTimeout(() => {
  16428. this.courseText = this.courseText.replaceAll("*0*%*", "");
  16429. }, 0);
  16430. }, 100);
  16431. this.$forceUpdate();
  16432. },
  16433. deletEList(index, tIndex, eIndex) {
  16434. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  16435. eIndex,
  16436. 1
  16437. );
  16438. this.$forceUpdate();
  16439. },
  16440. getChoosePic(t) {
  16441. this.chooseType = t;
  16442. this.getAllBanner();
  16443. },
  16444. getAllBanner() {
  16445. this.sysPicVisible = true;
  16446. let params = {
  16447. t: this.chooseType,
  16448. };
  16449. this.ajax
  16450. .get(this.$store.state.api + "selectAllBanner", params)
  16451. .then((res) => {
  16452. this.sysPic = res.data[0];
  16453. })
  16454. .catch((err) => {
  16455. console.error(err);
  16456. });
  16457. },
  16458. // getClass() {
  16459. // let params = {
  16460. // oid: this.oid,
  16461. // };
  16462. // this.ajax
  16463. // .get(this.$store.state.api + "selectClassBySchool", params)
  16464. // .then((res) => {
  16465. // this.classJuri = res.data[0];
  16466. // })
  16467. // .catch((err) => {
  16468. // console.error(err);
  16469. // });
  16470. // },
  16471. deleteSysPic() {
  16472. this.cover = [];
  16473. this.isSysPic = false;
  16474. this.isSysPic2 = false;
  16475. },
  16476. deleteSelectPic() {
  16477. this.selectJson.url = "";
  16478. },
  16479. setEListStar() {
  16480. this.$forceUpdate();
  16481. },
  16482. deletRateList(i) {
  16483. this.rateJson.splice(i, 1);
  16484. },
  16485. addRateList() {
  16486. this.rateJson.push({ detail: "", score: 5, value: "" });
  16487. },
  16488. addSt() {
  16489. this.sentenceList.push({
  16490. sentenceTitle: "",
  16491. addSentence: [],
  16492. rightAnswer: [],
  16493. });
  16494. },
  16495. addSen(i) {
  16496. if (!this.sentenceList[i].sentenceTitle) {
  16497. this.$message.error("请填写卡片内容!");
  16498. return;
  16499. }
  16500. if (this.sentenceList[i].sentenceTitle.length > 10) {
  16501. this.$message.error("卡片内容字数不能超过10位");
  16502. return;
  16503. }
  16504. if (
  16505. this.sentenceList[i].addSentence.indexOf(
  16506. this.sentenceList[i].sentenceTitle
  16507. ) !== -1
  16508. ) {
  16509. this.$message.error("不能添加重复的卡片内容!");
  16510. return;
  16511. }
  16512. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  16513. // this.isPushTitleList.push(this.sentenceTitle);
  16514. this.sentenceList[i].sentenceTitle = "";
  16515. },
  16516. setRightAnswer(s, i, j) {
  16517. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  16518. this.sentenceList[i].rightAnswer.push(s);
  16519. }
  16520. },
  16521. returnCard(r, i, j) {
  16522. this.sentenceList[i].rightAnswer.splice(j, 1);
  16523. },
  16524. addSentenceTool() {
  16525. for (var i = 0; i < this.sentenceList.length; i++) {
  16526. if (this.sentenceList[i].rightAnswer.length == 0) {
  16527. this.$message.error(`请将题目${i + 1}设置完整。`);
  16528. return;
  16529. }
  16530. if (
  16531. this.sentenceList[i].addSentence.length !=
  16532. this.sentenceList[i].rightAnswer.length
  16533. ) {
  16534. this.$message.error(`请将题目${i + 1}设置完整。`);
  16535. return;
  16536. }
  16537. }
  16538. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16539. this.taskCount
  16540. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  16541. this.sentenceList = [
  16542. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  16543. ];
  16544. this.dialogVisibleSentence = false;
  16545. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16546. // itemTaskIndex
  16547. // ].toolChoose[toolIndex].tool = [];
  16548. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16549. // itemTaskIndex
  16550. // ].toolChoose[toolIndex].tool.push(i);
  16551. if (
  16552. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16553. .toolChoose[this.toolIndex].tool != 47
  16554. ) {
  16555. this.addTools(47, this.taskCount, this.toolIndex);
  16556. }
  16557. },
  16558. addTableJson() {
  16559. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  16560. // this.$message.error("请将信息填写完整!");
  16561. // return;
  16562. // }
  16563. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16564. this.taskCount
  16565. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  16566. // this.tableJson = [{ text: "" }];
  16567. // this.dialogVisibleTable = false;
  16568. this.$message.success("上传成功");
  16569. if (
  16570. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16571. .toolChoose[this.toolIndex].tool != 48
  16572. ) {
  16573. this.addTools(48, this.taskCount, this.toolIndex);
  16574. }
  16575. },
  16576. addWordJson() {
  16577. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16578. this.taskCount
  16579. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  16580. // this.wordJson = [{ text: "" }];
  16581. // this.dialogVisibleWord = false;
  16582. this.$message.success("上传成功");
  16583. if (
  16584. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16585. .toolChoose[this.toolIndex].tool != 52
  16586. ) {
  16587. this.addTools(52, this.taskCount, this.toolIndex);
  16588. }
  16589. },
  16590. addMoreUpload() {
  16591. if (this.uploadJson.length == 0) {
  16592. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16593. this.taskCount
  16594. ].toolChoose[this.toolIndex].uploadJson = [];
  16595. } else {
  16596. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16597. this.taskCount
  16598. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  16599. }
  16600. this.uploadJson = [];
  16601. this.dialogVisibleMoreUpload = false;
  16602. if (
  16603. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16604. .toolChoose[this.toolIndex].tool != 50
  16605. ) {
  16606. this.addTools(50, this.taskCount, this.toolIndex);
  16607. }
  16608. },
  16609. addPreTime() {
  16610. if (this.preTime == 0) {
  16611. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16612. this.taskCount
  16613. ].toolChoose[this.toolIndex].preTime = 0;
  16614. } else {
  16615. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16616. this.taskCount
  16617. ].toolChoose[this.toolIndex].preTime = this.preTime;
  16618. }
  16619. this.preTime = 0;
  16620. this.dialogVisiblePreTime = false;
  16621. if (
  16622. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16623. .toolChoose[this.toolIndex].tool != 10
  16624. ) {
  16625. this.addTools(10, this.taskCount, this.toolIndex);
  16626. }
  16627. },
  16628. goToTask(i) {
  16629. this.toolIndexType = "";
  16630. if (this.isClickColor == i + 1) {
  16631. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16632. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16633. // } else {
  16634. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16635. i
  16636. ].toolOpen = true;
  16637. // }
  16638. this.$forceUpdate();
  16639. return;
  16640. }
  16641. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16642. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16643. // } else {
  16644. document.querySelectorAll(".basic_box")[0].scrollTop =
  16645. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16646. this.isClickColor = i + 1;
  16647. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16648. // }
  16649. this.$forceUpdate();
  16650. },
  16651. taskScroll(){
  16652. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  16653. const sections = document.querySelectorAll('.taskBorder');
  16654. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  16655. sections.forEach((section, index) => {
  16656. const offsetTop = section.offsetTop;
  16657. const offsetHeight = section.offsetHeight;
  16658. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  16659. this.isClickColor = index +1;
  16660. }
  16661. });
  16662. },
  16663. taskOpen(i, stageIndex) {
  16664. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16665. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  16666. } else {
  16667. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16668. }
  16669. this.updateWork3(stageIndex);
  16670. this.$forceUpdate();
  16671. },
  16672. goToTask2(i, stage) {
  16673. this.toolIndexType = "";
  16674. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  16675. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16676. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16677. // } else {
  16678. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16679. i
  16680. ].toolOpen = true;
  16681. // }
  16682. this.$forceUpdate();
  16683. return;
  16684. }
  16685. if (this.unitIndex != stage) {
  16686. if (this.panUnitJson() == 2) {
  16687. return;
  16688. }
  16689. this.unitSet(stage);
  16690. }
  16691. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16692. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16693. // } else {
  16694. document.querySelectorAll(".basic_box")[0].scrollTop =
  16695. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16696. this.isClickColor = i + 1;
  16697. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16698. // }
  16699. this.$forceUpdate();
  16700. },
  16701. taskMove(type, index) {
  16702. this.$confirm(
  16703. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  16704. "提示",
  16705. {
  16706. confirmButtonText: "确定",
  16707. cancelButtonText: "取消",
  16708. type: "warning",
  16709. }
  16710. )
  16711. .then(() => {
  16712. if (type == 1) {
  16713. if (index > 0) {
  16714. let a = JSON.parse(
  16715. JSON.stringify(
  16716. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16717. index - 1
  16718. ]
  16719. )
  16720. );
  16721. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  16722. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16723. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16724. }
  16725. } else {
  16726. if (
  16727. index <
  16728. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  16729. ) {
  16730. let a = JSON.parse(
  16731. JSON.stringify(
  16732. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16733. index + 1
  16734. ]
  16735. )
  16736. );
  16737. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  16738. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16739. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16740. }
  16741. }
  16742. this.$forceUpdate();
  16743. })
  16744. .catch(() => {
  16745. return;
  16746. });
  16747. },
  16748. stageMove(type, index) {
  16749. if (type == 1) {
  16750. if (index > 0) {
  16751. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  16752. let acid = JSON.parse(
  16753. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  16754. );
  16755. let bcid = JSON.parse(
  16756. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  16757. );
  16758. this.unitJson3[index - 1] = this.unitJson3[index];
  16759. this.unitJson3[index] = a;
  16760. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  16761. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  16762. }
  16763. } else {
  16764. if (index < this.unitJson3.length - 1) {
  16765. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  16766. let acid = JSON.parse(
  16767. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  16768. );
  16769. let bcid = JSON.parse(
  16770. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  16771. );
  16772. this.unitJson3[index + 1] = this.unitJson3[index];
  16773. this.unitJson3[index] = a;
  16774. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  16775. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  16776. }
  16777. }
  16778. this.$forceUpdate();
  16779. },
  16780. addGroup(i) {
  16781. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  16782. this.groupJson.group.push({
  16783. name: "第" + (this.groupJson.group.length + 1) + "组",
  16784. });
  16785. },
  16786. deleteGroup(i) {
  16787. this.groupJson.group.splice(i, 1);
  16788. },
  16789. numberPan() {
  16790. if (
  16791. /[^\d]/.test(this.groupJson.number) ||
  16792. this.groupJson.number < 2 ||
  16793. this.groupJson.number > 10
  16794. ) {
  16795. this.$message.error("请输入2-10的数字");
  16796. this.groupJson.number = "";
  16797. }
  16798. },
  16799. numberPanJie() {
  16800. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  16801. this.$message.error('请输入大于1的数字')
  16802. this.courseJie = 1
  16803. }
  16804. },
  16805. numberPanTime() {
  16806. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  16807. this.$message.error('请输入大于1的数字')
  16808. this.courseTime = 1
  16809. }
  16810. },
  16811. addGroupJson() {
  16812. for (var i = 0; i < this.groupJson.group.length; i++) {
  16813. if (!this.groupJson.group[i].name) {
  16814. this.$message.error("请将信息填写完整!");
  16815. return;
  16816. }
  16817. }
  16818. if (!this.groupJson.number) {
  16819. this.$message.error("请将信息填写完整!");
  16820. return;
  16821. }
  16822. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16823. this.taskCount
  16824. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  16825. JSON.stringify(this.groupJson)
  16826. );
  16827. this.dialogVisibleGroup = false;
  16828. this.groupJson = {};
  16829. if (
  16830. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16831. .toolChoose[this.toolIndex].tool != 49
  16832. ) {
  16833. this.addTools(49, this.taskCount, this.toolIndex);
  16834. }
  16835. },
  16836. updateTime(preTime) {
  16837. this.preTime = preTime;
  16838. },
  16839. InviteChange(val) {
  16840. console.log(val);
  16841. let _check = [];
  16842. let _check2 = [];
  16843. for (var i = 0; i < this.grade2.length; i++) {
  16844. var gid = this.grade2[i].id;
  16845. _check.push(gid);
  16846. }
  16847. for (var i = 0; i < this.checkboxList2.length; i++) {
  16848. var _id = this.checkboxList2[i];
  16849. if (_check.indexOf(_id) !== -1) {
  16850. _check2.push(_id);
  16851. }
  16852. }
  16853. this.checkAll = _check2.length === _check.length;
  16854. return;
  16855. let array = JSON.parse(JSON.stringify(val));
  16856. this.inviteCode = this.inviteCode.filter((el) => {
  16857. if (val.indexOf(el.cid) != -1) {
  16858. array.splice(array.indexOf(el.cid), 1);
  16859. return el;
  16860. }
  16861. });
  16862. for (var i = 0; i < array.length; i++) {
  16863. this.getInviteCode(array[i]);
  16864. }
  16865. },
  16866. InviteChange2(val) {
  16867. console.log(val);
  16868. let _check = [];
  16869. let _check2 = [];
  16870. for (var i = 0; i < this.teacherJuri.length; i++) {
  16871. var gid = this.teacherJuri[i].userid;
  16872. _check.push(gid);
  16873. }
  16874. for (var i = 0; i < this.checkboxList3.length; i++) {
  16875. var _id = this.checkboxList3[i];
  16876. if (_check.indexOf(_id) !== -1) {
  16877. _check2.push(_id);
  16878. }
  16879. }
  16880. this.checkAll2 = _check2.length === _check.length;
  16881. this.setMan();
  16882. return;
  16883. let array = JSON.parse(JSON.stringify(val));
  16884. this.inviteCode = this.inviteCode.filter((el) => {
  16885. if (val.indexOf(el.cid) != -1) {
  16886. array.splice(array.indexOf(el.cid), 1);
  16887. return el;
  16888. }
  16889. });
  16890. for (var i = 0; i < array.length; i++) {
  16891. this.getInviteCode(array[i]);
  16892. }
  16893. },
  16894. handleCheckAllChange(val) {
  16895. if (val) {
  16896. for (var i = 0; i < this.grade2.length; i++) {
  16897. var gid = this.grade2[i].id;
  16898. if (this.checkboxList2.indexOf(gid) === -1) {
  16899. this.checkboxList2.push(gid);
  16900. }
  16901. }
  16902. } else {
  16903. let _check = [];
  16904. let _check2 = [];
  16905. for (var i = 0; i < this.grade2.length; i++) {
  16906. var gid = this.grade2[i].id;
  16907. _check.push(gid);
  16908. }
  16909. for (var i = 0; i < this.checkboxList2.length; i++) {
  16910. var _id = this.checkboxList2[i];
  16911. if (_check.indexOf(_id) === -1) {
  16912. _check2.push(_id);
  16913. }
  16914. }
  16915. this.checkboxList2 = _check2;
  16916. }
  16917. this.isIndeterminate = false;
  16918. },
  16919. handleCheckAllChange2(val) {
  16920. if (val) {
  16921. for (var i = 0; i < this.teacherJuri.length; i++) {
  16922. var gid = this.teacherJuri[i].userid;
  16923. if (this.checkboxList3.indexOf(gid) === -1) {
  16924. this.checkboxList3.push(gid);
  16925. }
  16926. }
  16927. } else {
  16928. let _check = [];
  16929. let _check2 = [];
  16930. for (var i = 0; i < this.teacherJuri.length; i++) {
  16931. var gid = this.teacherJuri[i].userid;
  16932. _check.push(gid);
  16933. }
  16934. for (var i = 0; i < this.checkboxList3.length; i++) {
  16935. var _id = this.checkboxList3[i];
  16936. if (_check.indexOf(_id) === -1) {
  16937. _check2.push(_id);
  16938. }
  16939. }
  16940. this.checkboxList3 = _check2;
  16941. }
  16942. this.isIndeterminate2 = false;
  16943. },
  16944. async getInviteCode(cid) {
  16945. let code = this.randomNumber();
  16946. let params = {
  16947. code: code,
  16948. oid: this.oid,
  16949. };
  16950. let type = 1;
  16951. for (var i = 0; i < this.inviteCode.length; i++) {
  16952. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  16953. type = 2;
  16954. }
  16955. }
  16956. if (type == 2) {
  16957. this.getInviteCode(cid);
  16958. return;
  16959. }
  16960. const res = await this.ajax.get(
  16961. this.$store.state.api + "selectInviteCode2",
  16962. params
  16963. );
  16964. if (
  16965. res.data.length &&
  16966. res.data[0].length &&
  16967. res.data[0][0].courseId != this.cid
  16968. ) {
  16969. this.getInviteCode(cid);
  16970. return;
  16971. }
  16972. let array = [];
  16973. for (var i = 0; i < this.inviteCode.length; i++) {
  16974. array.push(this.inviteCode[i].cid);
  16975. }
  16976. if (array.indexOf(cid) != -1) {
  16977. this.inviteCode[array.indexOf(cid)].ic = code;
  16978. } else {
  16979. this.inviteCode.push({ cid: cid, ic: code });
  16980. }
  16981. },
  16982. OpenInviteD(cid) {
  16983. let array = [];
  16984. this.icode = "";
  16985. for (var i = 0; i < this.inviteCode.length; i++) {
  16986. array.push(this.inviteCode[i].cid);
  16987. }
  16988. if (array.indexOf(cid) != -1) {
  16989. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  16990. }
  16991. this.inviteId = cid;
  16992. this.dialogVisibleInvite = true;
  16993. },
  16994. addInvite() {
  16995. let reg = /^[A-Za-z0-9]{4,}$/;
  16996. if (!reg.test(this.icode)) {
  16997. this.$message.error("请输入至少四位数字或英文组合的随机码");
  16998. return;
  16999. }
  17000. let type = 1;
  17001. for (var i = 0; i < this.inviteCode.length; i++) {
  17002. if (
  17003. this.inviteCode[i].cid != this.inviteId &&
  17004. this.icode == this.inviteCode[i].ic
  17005. ) {
  17006. type = 2;
  17007. }
  17008. }
  17009. if (type == 2) {
  17010. this.$message.error("已有此随机码,不能重复");
  17011. return;
  17012. }
  17013. let params = {
  17014. code: this.icode,
  17015. oid: this.oid,
  17016. };
  17017. this.ajax
  17018. .get(this.$store.state.api + "selectInviteCode", params)
  17019. .then((res) => {
  17020. if (
  17021. res.data.length &&
  17022. res.data[0].length &&
  17023. res.data[0][0].courseId != this.cid
  17024. ) {
  17025. this.$message.error("已有此随机码,不能重复");
  17026. return;
  17027. }
  17028. let array = [];
  17029. for (var i = 0; i < this.inviteCode.length; i++) {
  17030. array.push(this.inviteCode[i].cid);
  17031. }
  17032. if (array.indexOf(this.inviteId) != -1) {
  17033. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  17034. } else {
  17035. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  17036. }
  17037. this.icode = "";
  17038. this.dialogVisibleInvite = false;
  17039. })
  17040. .catch((err) => {
  17041. console.error(err);
  17042. });
  17043. },
  17044. randomNumber() {
  17045. // 随机生成两位数
  17046. // let num = Math.floor(Math.random() * 900) + 100;
  17047. // 生成 0 到 99 之间的随机整数
  17048. const randomNumber = Math.floor(Math.random() * 100);
  17049. // 如果随机数小于 10,补上前导零
  17050. const num =
  17051. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  17052. // 随机生成两个大写字母
  17053. let letters = "";
  17054. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  17055. for (let i = 0; i < 3; i++) {
  17056. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  17057. }
  17058. // 随机生成两位数字和字母的组合
  17059. let mix = "";
  17060. let chars =
  17061. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  17062. for (let i = 0; i < 3; i++) {
  17063. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  17064. mix += char;
  17065. }
  17066. // 随机选择一种类型
  17067. let type = Math.floor(Math.random() * 3);
  17068. return num;
  17069. // 根据类型输出结果
  17070. switch (type) {
  17071. case 0:
  17072. console.log(num); // 输出两位数
  17073. return num;
  17074. case 1:
  17075. console.log(letters); // 输出两个大写字母
  17076. return letters;
  17077. case 2:
  17078. console.log(mix); // 输出两位数字和字母的组合
  17079. return mix;
  17080. }
  17081. },
  17082. getPaste() {
  17083. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  17084. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  17085. if (!iframe && !iframe2) {
  17086. return;
  17087. }
  17088. let copyData = iframe ? iframe.contentWindow.copyData : false;
  17089. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  17090. if (copyData && copyData.stageData && copyData.stageData.length) {
  17091. this.isPasteStage = true;
  17092. }
  17093. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  17094. this.isPasteStage = true;
  17095. }
  17096. if (copyData && copyData.selectData.length) {
  17097. this.isPasteChoice = true;
  17098. }
  17099. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  17100. this.isPasteTask = true;
  17101. }
  17102. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  17103. this.isPasteTask = true;
  17104. }
  17105. },
  17106. getPaste2() {
  17107. let iframe = document.querySelectorAll(".interIframe")[0];
  17108. const turndownService = new TurndownService();
  17109. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  17110. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  17111. if(confirm_next_step){
  17112. this.courseText += turndownService.turndown(confirm_next_step)
  17113. iframe.contentWindow.confirm_next_step = ''
  17114. }
  17115. if(work_area_text && work_area_text.aiContent){
  17116. this.courseText += turndownService.turndown(work_area_text.aiContent)
  17117. iframe.contentWindow.work_area_text = ''
  17118. }
  17119. },
  17120. textAreaChange(type, index){
  17121. if(type == 'courseText'){
  17122. this.addCourseBehavior('courseBehavior', `手动修改课程概况信息-${this.courseText}`)
  17123. }
  17124. if(type == 'targetCourseText2'){
  17125. this.addCourseBehavior('courseBehavior', `手动修改课程目标信息-${this.targetCourseText2}`)
  17126. }
  17127. if(type == 'taskDetail2'){
  17128. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程大纲信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2}`)
  17129. }
  17130. if(type == 'taskDetail3'){
  17131. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程教案信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3}`)
  17132. }
  17133. },
  17134. setCourseInfo(type){
  17135. let courseInfo = ''
  17136. let sub = []
  17137. let mclass = []
  17138. if (this.courseTypeId.length) {
  17139. for (var i = 0; i < this.courseTypeId.length; i++) {
  17140. let _sid = this.courseTypeId[i]
  17141. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17142. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17143. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17144. }
  17145. }
  17146. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17147. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17148. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17149. }
  17150. }
  17151. }
  17152. }
  17153. if(this.courseName){
  17154. courseInfo = `课程名称:${this.courseName} `
  17155. }
  17156. if(mclass.length){
  17157. courseInfo += `年级:${mclass.join(',')} `
  17158. }
  17159. if(sub.length){
  17160. courseInfo += `学科:${sub.join(',')} `
  17161. }
  17162. console.log(courseInfo)
  17163. window.course_info = courseInfo
  17164. this.course_info = courseInfo
  17165. window.course_lang = this.languageSetting
  17166. },
  17167. saveCourse(){
  17168. if (this.cid == "" || this.cid == undefined) {
  17169. this.addWork();
  17170. } else {
  17171. if (this.userid != this.courseUserid && this.role != "1") {
  17172. this.updateWork2();
  17173. } else {
  17174. this.updateWork();
  17175. }
  17176. }
  17177. },
  17178. setCover($event, attempts = 0) {
  17179. var _this = this;
  17180. this.addCourseBehavior('courseBehavior', `修改课程名称-${this.courseName}`)
  17181. _this.searchFileName = JSON.parse(JSON.stringify(_this.courseName))
  17182. if (_this.cover.length || attempts >= 3) {
  17183. return;
  17184. }
  17185. _this.findMatchingContents()
  17186. _this.imageloading2 = true;
  17187. _this.ajax
  17188. .post("https://gpt.cocorobo.cn/search_image", {
  17189. page: _this.ppage,
  17190. pagesize: 9,
  17191. query: _this.courseName,
  17192. })
  17193. .then(function (response) {
  17194. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  17195. if(data){
  17196. _this.cover = [];
  17197. setTimeout(() => {
  17198. _this.cover[0] = {
  17199. name: "网络图片.png",
  17200. url: data[0].thumbnail,
  17201. };
  17202. _this.imgChange1(null, null, 1, null);
  17203. _this.$forceUpdate();
  17204. _this.saveCourse()
  17205. }, 0);
  17206. _this.imageloading2 = false;
  17207. }else {
  17208. _this.imageloading2 = false;
  17209. _this.setCover($event, attempts + 1);
  17210. }
  17211. })
  17212. .catch(function (error) {
  17213. _this.imageloading2 = false;
  17214. _this.setCover($event, attempts + 1);
  17215. console.log(error);
  17216. });
  17217. },
  17218. searchImage() {
  17219. var _this = this;
  17220. _this.imageList = [];
  17221. if (!_this.searchImageValue) {
  17222. _this.sysPicVisible2 = true;
  17223. return;
  17224. }
  17225. _this.imageloading = true;
  17226. _this.ajax
  17227. .post("https://gpt.cocorobo.cn/search_image", {
  17228. page: _this.ppage,
  17229. pagesize: 9,
  17230. query: _this.searchImageValue,
  17231. })
  17232. .then(function (response) {
  17233. // console.log(response.data.data);
  17234. var data = response.data.FunctionResponse.result;
  17235. for (var i = 0; i < data.length; i++) {
  17236. _this.imageList.push({ url: data[i].thumbnail });
  17237. }
  17238. _this.imageloading = false;
  17239. })
  17240. .catch(function (error) {
  17241. console.log(error);
  17242. });
  17243. _this.sysPicVisible2 = true;
  17244. },
  17245. changePicture() {
  17246. this.ppage++;
  17247. this.searchImage();
  17248. },
  17249. resetImage() {
  17250. this.ppage = 1;
  17251. this.searchImage();
  17252. },
  17253. jumpGj(i, j) {
  17254. if (i + 1 != this.isClickColor) {
  17255. this.isClickColor = i + 1;
  17256. }
  17257. var a = document.scrollingElement;
  17258. this.toolIndexType = `gj${i}${j}`;
  17259. let target = document.querySelector(`#gj${i}${j}`);
  17260. if (target) {
  17261. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17262. setTimeout(() => {
  17263. target.scrollIntoView(true);
  17264. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17265. j
  17266. ].isFold3 = false;
  17267. setTimeout(() => {
  17268. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17269. }, 0);
  17270. }, 0);
  17271. }
  17272. },
  17273. jumpGj2(i, j, k) {
  17274. if (this.unitIndex != k) {
  17275. if (this.panUnitJson() == 2) {
  17276. return;
  17277. }
  17278. this.unitSet(k);
  17279. }
  17280. setTimeout(() => {
  17281. if (i + 1 != this.isClickColor) {
  17282. this.isClickColor = i + 1;
  17283. }
  17284. var a = document.scrollingElement;
  17285. this.toolIndexType = `gj${i}${j}${k}`;
  17286. let target = document.querySelector(`#gj${i}${j}`);
  17287. if (target) {
  17288. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17289. setTimeout(() => {
  17290. target.scrollIntoView(true);
  17291. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17292. j
  17293. ].isFold3 = false;
  17294. setTimeout(() => {
  17295. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17296. }, 0);
  17297. }, 0);
  17298. }
  17299. }, 0);
  17300. },
  17301. dragStart(val, i, j) {
  17302. console.log(this.taskCount);
  17303. this.dragType = "drag";
  17304. this.taskCount = j;
  17305. this.oldIndex = i;
  17306. this.oldData = val;
  17307. },
  17308. dragOver(i, j) {
  17309. this.typeIndex = "chapter-" + j + "-" + i;
  17310. this.newIndex = i;
  17311. },
  17312. dragEnd() {
  17313. if (this.dragType != "drag") {
  17314. this.typeIndex = "";
  17315. this.newIndex = "";
  17316. this.dragType = "";
  17317. this.isdrag = "";
  17318. return;
  17319. }
  17320. console.log(this.taskCount);
  17321. let newItems = [
  17322. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17323. .chapterData,
  17324. ];
  17325. // 删除老的节点
  17326. newItems.splice(this.oldIndex, 1);
  17327. // 在列表中目标位置增加新的节点
  17328. newItems.splice(this.newIndex, 0, this.oldData);
  17329. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17330. this.taskCount
  17331. ].chapterData = [...newItems];
  17332. this.typeIndex = "";
  17333. this.newIndex = "";
  17334. this.dragType = "";
  17335. this.isdrag = "";
  17336. this.$forceUpdate();
  17337. },
  17338. dragTaskStart(val, i, j) {
  17339. this.dragType = "task";
  17340. this.oldIndex = i;
  17341. this.oldData = val;
  17342. this.oldUnitIndex = j;
  17343. },
  17344. dragTaskOver(i, j) {
  17345. this.typeIndex = "task-" + i;
  17346. this.newIndex = i;
  17347. this.checkUnitIndex = j;
  17348. },
  17349. async dragTaskEnd() {
  17350. if (this.dragType != "task") {
  17351. this.newIndex = "";
  17352. this.dragType = "";
  17353. this.typeIndex = "";
  17354. this.checkUnitIndex = "";
  17355. this.isdrag = "";
  17356. return;
  17357. }
  17358. if (
  17359. this.newIndex == this.oldIndex &&
  17360. this.oldUnitIndex == this.checkUnitIndex
  17361. ) {
  17362. this.newIndex = "";
  17363. this.dragType = "";
  17364. this.typeIndex = "";
  17365. this.checkUnitIndex = "";
  17366. this.isdrag = "";
  17367. return;
  17368. }
  17369. let count1 = await this.getWorksCount(
  17370. 2,
  17371. this.checkUnitIndex,
  17372. this.newIndex,
  17373. 0
  17374. );
  17375. let count2 = await this.getWorksCount(
  17376. 2,
  17377. this.oldUnitIndex,
  17378. this.oldIndex,
  17379. 0
  17380. );
  17381. if (count1 > 0 || count2 > 0) {
  17382. this.$confirm(
  17383. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  17384. "提示",
  17385. {
  17386. confirmButtonText: "确定",
  17387. cancelButtonText: "取消",
  17388. type: "warning",
  17389. }
  17390. )
  17391. .then(() => {
  17392. if (this.oldUnitIndex != this.checkUnitIndex) {
  17393. let newItems = [
  17394. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17395. ];
  17396. // 删除老的节点
  17397. newItems.splice(this.oldIndex, 1);
  17398. // 在列表中目标位置增加新的节点
  17399. let newItems2 = [
  17400. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17401. ];
  17402. newItems2.splice(this.newIndex, 0, this.oldData);
  17403. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17404. ...newItems,
  17405. ];
  17406. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17407. ...newItems2,
  17408. ];
  17409. } else {
  17410. let newItems = [
  17411. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17412. ];
  17413. let chapterData = []
  17414. if (this.oldIndex == 0) {
  17415. chapterData = newItems[this.oldIndex].chapterData
  17416. newItems[this.oldIndex].chapterData = []
  17417. } else if (this.newIndex == 0) {
  17418. chapterData = newItems[this.newIndex].chapterData
  17419. newItems[this.oldIndex].chapterData = []
  17420. }
  17421. // 删除老的节点
  17422. newItems.splice(this.oldIndex, 1);
  17423. // 在列表中目标位置增加新的节点
  17424. newItems.splice(this.newIndex, 0, this.oldData);
  17425. if (this.oldIndex == 0 || this.newIndex == 0) {
  17426. newItems[0].chapterData = chapterData
  17427. }
  17428. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17429. ...newItems,
  17430. ];
  17431. }
  17432. this.typeIndex = "";
  17433. this.newIndex = "";
  17434. this.dragType = "";
  17435. this.checkUnitIndex = "";
  17436. this.isdrag = "";
  17437. this.updateWork();
  17438. this.$forceUpdate();
  17439. })
  17440. .catch(() => {
  17441. this.newIndex = "";
  17442. this.dragType = "";
  17443. this.typeIndex = "";
  17444. this.checkUnitIndex = "";
  17445. this.isdrag = "";
  17446. return;
  17447. });
  17448. } else {
  17449. if (this.oldUnitIndex != this.checkUnitIndex) {
  17450. let newItems = [
  17451. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17452. ];
  17453. // 删除老的节点
  17454. newItems.splice(this.oldIndex, 1);
  17455. // 在列表中目标位置增加新的节点
  17456. let newItems2 = [
  17457. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17458. ];
  17459. newItems2.splice(this.newIndex, 0, this.oldData);
  17460. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17461. ...newItems,
  17462. ];
  17463. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17464. ...newItems2,
  17465. ];
  17466. } else {
  17467. let newItems = [
  17468. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17469. ];
  17470. let chapterData = []
  17471. if (this.oldIndex == 0) {
  17472. chapterData = newItems[this.oldIndex].chapterData
  17473. newItems[this.oldIndex].chapterData = []
  17474. } else if (this.newIndex == 0) {
  17475. chapterData = newItems[this.newIndex].chapterData
  17476. newItems[this.oldIndex].chapterData = []
  17477. }
  17478. // 删除老的节点
  17479. newItems.splice(this.oldIndex, 1);
  17480. // 在列表中目标位置增加新的节点
  17481. newItems.splice(this.newIndex, 0, this.oldData);
  17482. if (this.oldIndex == 0 || this.newIndex == 0) {
  17483. newItems[0].chapterData = chapterData
  17484. }
  17485. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17486. ...newItems,
  17487. ];
  17488. }
  17489. this.typeIndex = "";
  17490. this.newIndex = "";
  17491. this.dragType = "";
  17492. this.checkUnitIndex = "";
  17493. this.isdrag = "";
  17494. this.updateWork();
  17495. this.$forceUpdate();
  17496. }
  17497. },
  17498. dragUnitStart(val, i) {
  17499. this.dragType = "Unit";
  17500. this.oldIndex = i;
  17501. this.oldData = val;
  17502. },
  17503. dragUnitOver(i) {
  17504. this.typeIndex = "Unit-" + i;
  17505. this.newIndex = i;
  17506. console.log(i, this.unitJson[i].toolOpen);
  17507. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  17508. this.unitJson[i].toolOpen = true;
  17509. this.updateWork();
  17510. this.$forceUpdate();
  17511. }
  17512. },
  17513. async dragUnitEnd() {
  17514. if (this.dragType != "Unit") {
  17515. this.newIndex = "";
  17516. this.dragType = "";
  17517. this.typeIndex = "";
  17518. this.isdrag = "";
  17519. return;
  17520. }
  17521. if (this.newIndex == this.oldIndex) {
  17522. this.newIndex = "";
  17523. this.dragType = "";
  17524. this.typeIndex = "";
  17525. this.isdrag = "";
  17526. return;
  17527. }
  17528. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  17529. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  17530. console.log(count1, count2);
  17531. if (count1 > 0 || count2 > 0) {
  17532. this.$confirm(
  17533. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  17534. "提示",
  17535. {
  17536. confirmButtonText: "确定",
  17537. cancelButtonText: "取消",
  17538. type: "warning",
  17539. }
  17540. )
  17541. .then(() => {
  17542. let newItems = [...this.unitJson];
  17543. // 删除老的节点
  17544. newItems.splice(this.oldIndex, 1);
  17545. // 在列表中目标位置增加新的节点
  17546. newItems.splice(this.newIndex, 0, this.oldData);
  17547. this.unitJson = [...newItems];
  17548. this.typeIndex = "";
  17549. this.newIndex = "";
  17550. this.dragType = "";
  17551. this.isdrag = "";
  17552. this.updateWork();
  17553. this.$forceUpdate();
  17554. })
  17555. .catch(() => {
  17556. this.newIndex = "";
  17557. this.dragType = "";
  17558. this.typeIndex = "";
  17559. this.isdrag = "";
  17560. return;
  17561. });
  17562. } else {
  17563. let newItems = [...this.unitJson];
  17564. // 删除老的节点
  17565. newItems.splice(this.oldIndex, 1);
  17566. // 在列表中目标位置增加新的节点
  17567. newItems.splice(this.newIndex, 0, this.oldData);
  17568. this.unitJson = [...newItems];
  17569. this.typeIndex = "";
  17570. this.newIndex = "";
  17571. this.dragType = "";
  17572. this.isdrag = "";
  17573. this.updateWork();
  17574. this.$forceUpdate();
  17575. }
  17576. },
  17577. getWorksCount(type, stage, task, tool) {
  17578. return new Promise((resolve, reject) => {
  17579. let params = [
  17580. {
  17581. cid: this.cid,
  17582. stage: stage,
  17583. task: task,
  17584. tool: tool,
  17585. type: type,
  17586. },
  17587. ];
  17588. this.ajax
  17589. .post(this.$store.state.api + "getCourseWorkCount", params)
  17590. .then((res) => {
  17591. let count = res.data[0][0].count;
  17592. resolve(count);
  17593. })
  17594. .catch((err) => {
  17595. resolve(0);
  17596. this.$message.error("网络不佳");
  17597. console.error(err);
  17598. });
  17599. });
  17600. },
  17601. getTwoType(id) {
  17602. this.twoJson = [];
  17603. var array = this.CourseTypeJson1[
  17604. "3f8eed32-aba9-11ee-b534-005056b86db5"
  17605. ].filter((e) => {
  17606. return e.ppid == id;
  17607. });
  17608. this.twoJson = array;
  17609. this.$forceUpdate();
  17610. },
  17611. ctype() {
  17612. this.oneJson =
  17613. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  17614. },
  17615. selectAllType1() {
  17616. this.CourseType1 = [];
  17617. this.CourseTypeJson1 = {};
  17618. this.courseTypeId1 = {};
  17619. this.$forceUpdate();
  17620. let params = {
  17621. org: this.org && this.org != "" ? this.org : "",
  17622. oid: this.oid && this.oid != "" ? this.oid : "",
  17623. };
  17624. this.ajax
  17625. .get(this.$store.state.api + "selectAllEvaType", params)
  17626. .then((res) => {
  17627. this.CourseType1 = res.data;
  17628. for (var i = 0; i < res.data[0].length; i++) {
  17629. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  17630. res.data[0][i].name = "一级分类";
  17631. } else if (
  17632. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  17633. ) {
  17634. res.data[0][i].name = "二级分类";
  17635. }
  17636. if (!this.cid) {
  17637. this.courseTypeId1[res.data[0][i].id] = [];
  17638. }
  17639. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  17640. this.CourseTypeJson1[res.data[0][i].id] = [];
  17641. }
  17642. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  17643. for (var j = 0; j < res.data[1].length; j++) {
  17644. if (res.data[0][i].id == res.data[1][j].pid) {
  17645. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  17646. }
  17647. }
  17648. // } else {
  17649. if (res.data[2].length > 0) {
  17650. for (var j = 0; j < res.data[2].length; j++) {
  17651. if (res.data[0][i].id == res.data[2][j].pid) {
  17652. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  17653. }
  17654. }
  17655. }
  17656. if (res.data[3].length > 0) {
  17657. for (var j = 0; j < res.data[3].length; j++) {
  17658. if (res.data[0][i].id == res.data[3][j].pid) {
  17659. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  17660. }
  17661. }
  17662. }
  17663. // }
  17664. }
  17665. this.ctype();
  17666. this.cetBoxDialog = true;
  17667. })
  17668. .catch((err) => {
  17669. console.error(err);
  17670. });
  17671. },
  17672. allEvaCan() {
  17673. if (this.taskLoading.length) {
  17674. let _pan = 1
  17675. for (var k = 0; k < this.taskLoading.length; k++) {
  17676. if (this.taskLoading[k]) {
  17677. this.$message({
  17678. message: `请等待任务${k + 1}回答完毕后再继续`,
  17679. type: "warning"
  17680. });
  17681. _pan = 2
  17682. }
  17683. }
  17684. if (_pan == 2) {
  17685. return
  17686. }
  17687. }
  17688. if (this.taskGLoading.length) {
  17689. let _pan = 1
  17690. for (var k = 0; k < this.taskGLoading.length; k++) {
  17691. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  17692. this.$message({
  17693. message: `请等待任务${k + 1}回答完毕后再继续`,
  17694. type: "warning"
  17695. });
  17696. _pan = 2
  17697. }
  17698. }
  17699. if (_pan == 2) {
  17700. return
  17701. }
  17702. }
  17703. this.$confirm("是否一键生成所有工具的评价设置?会占用您一些时间。", "提示", {
  17704. confirmButtonText: "确定",
  17705. cancelButtonText: "取消",
  17706. type: "warning",
  17707. customClass: 'custom-confirm-box'
  17708. })
  17709. .then(() => {
  17710. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17711. for (var index = 0; index < taskJson.length; index++) {
  17712. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  17713. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  17714. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  17715. }
  17716. }
  17717. }
  17718. })
  17719. .catch(() => {
  17720. });
  17721. setTimeout(() => {
  17722. this.setTipsIndex()
  17723. }, 500)
  17724. },
  17725. setAiJson(pan,string,string2,string3){
  17726. if(pan == 'aiTeacher2'){
  17727. this.aiJson['teacherDetail2'] = string
  17728. }else if(pan == 'aiRateRuleA'){
  17729. this.aiJson['aiRateRule'] = string
  17730. }else if(pan == 'aiOutline2'){
  17731. this.aiJson['aiOutlineTask'] = string
  17732. this.aiJson['aiOutlineDetail'] = string2
  17733. }else if(pan == 'aiTeacher3'){
  17734. this.aiJson['aiCpoteTask'] = string
  17735. this.aiJson['teacherDetail2'] = string2
  17736. }else if(pan == 'aiTask2'){
  17737. this.aiJson['aiTask'] = string
  17738. }else if(pan == 'aiTask3'){
  17739. this.aiJson['aiTaskG1'] = string
  17740. this.aiJson['aiTaskG2'] = string2
  17741. this.aiJson['aiTaskG3'] = string3
  17742. }else if(pan == 'aiteacherTextDetail'){
  17743. this.aiJson['aiAbstract'] = string
  17744. }else if(pan == 'aitargetTextDetail'){
  17745. this.aiJson['aiTarget'] = string
  17746. }else if(pan == 'aitargetTextDetail2'){
  17747. this.aiJson['aiTarget2'] = string
  17748. }else if(pan == 'aitargetTextDetail3'){
  17749. this.aiJson['aiTargetGet'] = string
  17750. this.aiJson['aiTarget2'] = string2
  17751. }else {
  17752. this.aiJson[pan] = string
  17753. }
  17754. this.aiText2 = ''
  17755. this.aiText3 = ''
  17756. this.$forceUpdate();
  17757. },
  17758. editTask3(index){
  17759. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  17760. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  17761. }else {
  17762. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  17763. }
  17764. setTimeout(() => {
  17765. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  17766. setTimeout(() => {
  17767. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  17768. }, 0);
  17769. }, 100);
  17770. this.$forceUpdate();
  17771. },
  17772. editTask2(index){
  17773. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  17774. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  17775. }else {
  17776. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  17777. }
  17778. setTimeout(() => {
  17779. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  17780. setTimeout(() => {
  17781. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  17782. }, 0);
  17783. }, 100);
  17784. this.$forceUpdate();
  17785. },
  17786. openRule(i, k){
  17787. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  17788. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  17789. }else {
  17790. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  17791. }
  17792. setTimeout(() => {
  17793. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  17794. setTimeout(() => {
  17795. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  17796. }, 0);
  17797. }, 200);
  17798. this.$forceUpdate();
  17799. },
  17800. editCpote(index){
  17801. if(this.cpote[index]){
  17802. this.cpote[index] = false
  17803. }else {
  17804. this.cpote[index] = true
  17805. }
  17806. setTimeout(() => {
  17807. this.cpote[index.replace('s','')] += "*0*%*";
  17808. setTimeout(() => {
  17809. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  17810. }, 0);
  17811. }, 100);
  17812. this.$forceUpdate();
  17813. },
  17814. clickGenTT(){
  17815. if(!this.teacherInfoData.length){
  17816. this.$message.error("请上传教案");
  17817. return;
  17818. }
  17819. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  17820. this.openAiDialog(2, 'aiteacherTextDetail',1)
  17821. setTimeout(() => {
  17822. this.openAiDialog(2, 'aitargetTextDetail',1)
  17823. }, 500);
  17824. },
  17825. async getUserName() {
  17826. let params = { uid: this.userid };
  17827. try {
  17828. let res = await this.ajax.get(
  17829. this.$store.state.api + "getUser",
  17830. params
  17831. );
  17832. return res.data[0][0].name;
  17833. } catch (err) {
  17834. console.error(err);
  17835. }
  17836. },
  17837. getCGN(type){
  17838. let sub = [] //学科
  17839. let mclass = [] //年纪
  17840. let theme = []
  17841. if (this.courseTypeId.length) {
  17842. for (var i = 0; i < this.courseTypeId.length; i++) {
  17843. let _sid = this.courseTypeId[i]
  17844. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17845. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17846. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17847. }
  17848. }
  17849. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17850. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17851. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17852. }
  17853. }
  17854. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17855. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  17856. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  17857. }
  17858. }
  17859. }
  17860. if(type == 1){
  17861. return sub.join(",")
  17862. }else if(type == 2){
  17863. return mclass.join(",")
  17864. }else if(type == 3){
  17865. return theme.join(",")
  17866. }
  17867. }
  17868. },
  17869. async exportTeachPlan(){
  17870. this.loading = true
  17871. const zip = new JSZip();
  17872. let md = new MarkdownIt();
  17873. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  17874. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17875. let String = ''
  17876. String += `<h1 style="text-align: center;">${this.courseName}</h1>`
  17877. String += `<h2>课程基本信息</h2>`
  17878. String += `<div><strong>设计者:</strong><span>${await this.getUserName()}</span></div>`
  17879. String += `<div><strong>年级:</strong><span></span>${this.getCGN(2)}</div>`
  17880. String += `<div><strong>主题:</strong><span></span>${this.getCGN(3)}</div>`
  17881. String += `<div><strong>学科:</strong><span></span>${this.getCGN(1)}</div>`
  17882. if(courseText){
  17883. String += `<h2>课程概况</h2>`
  17884. String += md.render(courseText)
  17885. }
  17886. if(target){
  17887. String += `<h2>课程目标</h2>`
  17888. String += md.render(target)
  17889. }
  17890. String += `<h2>课程教案</h2>`
  17891. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17892. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  17893. // let name = _task.task+'-教案'
  17894. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  17895. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  17896. await this.generate(name, _html, i)
  17897. }
  17898. String += `<h3>任务${i+1}</h3>`
  17899. String += `<h4>${_task.task}</h4>`
  17900. String += _html
  17901. // let file = await this.generateExport(name, _html, i)
  17902. // zip.file(`${name}.docx`, file, { binary: true })
  17903. }
  17904. await this.generateExport(this.courseName, String, i)
  17905. setTimeout(() => {
  17906. this.loading = false
  17907. }, 2000);
  17908. // zip.generateAsync({ type: "blob" }).then((content) => {
  17909. // // 生成二进制流
  17910. // saveAs(
  17911. // content,
  17912. // this.courseName + "-" + "教案.zip"
  17913. // ); // 利用file-saver保存文件 自定义文件名
  17914. // setTimeout(() => {
  17915. // this.loading = false
  17916. // // if(!this.cid){
  17917. // // this.addWork(3)
  17918. // // }else{
  17919. // // this.updateWork();
  17920. // // this.steps = 4;
  17921. // // }
  17922. // }, 2000);
  17923. // });
  17924. },
  17925. async exportTaskEA(){
  17926. this.loading = true
  17927. const zip = new JSZip();
  17928. let md = new MarkdownIt();
  17929. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17930. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  17931. for(var j = 0; j < _task.chapterData.length; j++){
  17932. if(_task.chapterData[j].type == 3 && _task.chapterData[j].name.includes('学历案')){
  17933. let file = await getFile(_task.chapterData[j].url)
  17934. if (file.data != 1) {
  17935. // 下载文件, 并存成ArrayBuffer对象
  17936. const file_name = _task.chapterData[j].name; // 获取文件名
  17937. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  17938. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  17939. // 判断是否有重复的文件名字
  17940. if (!zip.file(file_name)) {
  17941. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  17942. } else {
  17943. // 如果有重复的文件名,则在文件名后添加序号
  17944. let count = 1;
  17945. let newFileName = fileNameWithoutExt;
  17946. while (zip.file(`${newFileName}.${fileExt}`)) {
  17947. newFileName = `${fileNameWithoutExt}(${count})`;
  17948. count++;
  17949. }
  17950. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  17951. }
  17952. }
  17953. }
  17954. }
  17955. for(var j = 0; j < _task.toolChoose.length; j++){
  17956. let tool = _task.toolChoose[j]
  17957. if(tool.eList && tool.eList.length){
  17958. let tableContent = '| 素养 | 评价标准 | 评价细则 |\n| --- | --- | --- |\n';
  17959. tool.eList.forEach(item => {
  17960. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  17961. });
  17962. let html = md.render(tableContent);
  17963. let name = `任务${i+1}工具${j+1}的评价.docx`
  17964. let file = await this.generateExport2(name, html, i)
  17965. zip.file(`${name}`, file, { binary: true })
  17966. }
  17967. }
  17968. // let file = await this.generateExport(name, _html, i)
  17969. // zip.file(`${name}.docx`, file, { binary: true })
  17970. }
  17971. zip.generateAsync({ type: "blob" }).then((content) => {
  17972. // 生成二进制流
  17973. saveAs(
  17974. content,
  17975. this.courseName + "-" + "评价和学历案.zip"
  17976. ); // 利用file-saver保存文件 自定义文件名
  17977. setTimeout(() => {
  17978. this.loading = false
  17979. }, 2000);
  17980. });
  17981. },
  17982. async downloadFile(item){
  17983. let data = await getFile(item.url)
  17984. let file = new File([data.data], item.name);
  17985. saveAs(file, item.name);
  17986. },
  17987. async addAppendixEva(i, j){
  17988. let md = new MarkdownIt();
  17989. let tool = this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose[j]
  17990. if(tool.eList && tool.eList.length){
  17991. let tableContent = '| 素养 | 评价标准 | 评价细则 |\n| --- | --- | --- |\n';
  17992. tool.eList.forEach(item => {
  17993. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  17994. });
  17995. let html = md.render(tableContent);
  17996. let name = `任务${i+1}工具${j+1}的评价.docx`
  17997. let file = await this.generateExport2(name, html, i)
  17998. this.beforeUploadHtml(file, 0, "", 2)
  17999. }
  18000. },
  18001. clickGenTT2(){
  18002. if (this.courseName == "") {
  18003. this.$message.error("请补充填写课程名称");
  18004. return;
  18005. }
  18006. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  18007. let functionA = ''
  18008. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18009. // setTimeout(() => {
  18010. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18011. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18012. // }, 500);
  18013. functionA = ()=>{
  18014. this.openAiDialog(2, 'aitargetTextDetail3',1)
  18015. }
  18016. }
  18017. this.openAiDialog(2, 'aiDetail',1, functionA)
  18018. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18019. // setTimeout(() => {
  18020. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18021. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18022. // }, 500);
  18023. }
  18024. this.courseTextBool = true
  18025. },
  18026. changeIsuseT(){
  18027. if(this.isuseT == 1){
  18028. this.courseTextB = false
  18029. }else if(this.isuseT == 2){
  18030. navigator.mediaDevices.getUserMedia({ audio: true })
  18031. .then(stream => {
  18032. console.log('获取录音权限成功');
  18033. })
  18034. .catch(err => {
  18035. this.$message.error('获取录音权限失败')
  18036. console.error('获取录音权限失败:', err);
  18037. });
  18038. }else{
  18039. if(this.courseText){
  18040. this.courseTextB = false
  18041. }else{
  18042. this.courseTextB = true
  18043. }
  18044. }
  18045. this.interSetting = false
  18046. this.interPan = true
  18047. },
  18048. changeLang(){
  18049. window.course_lang = this.languageSetting
  18050. },
  18051. openInterPanSetting(){
  18052. this.interSetting = !this.interSetting
  18053. if(this.interSetting){
  18054. if(this.istemplate == 1){
  18055. this.agentid = this.aiJson.agentid
  18056. }else {
  18057. this.agentid = this.aiJson.sagentid
  18058. }
  18059. }else {
  18060. this.agentid = ''
  18061. }
  18062. },
  18063. openInterPanSetting2(){
  18064. this.interSetting = !this.interSetting
  18065. if(this.interSetting){
  18066. this.r_agentid = this.aiJson.recordAgentid
  18067. }else {
  18068. this.r_agentid = ''
  18069. }
  18070. },
  18071. setAgentid(){
  18072. if(!this.agentid.trim()){
  18073. this.$message.error('请输入工作流链接')
  18074. return;
  18075. }
  18076. if(this.istemplate == 1){
  18077. this.aiJson.agentid = this.agentid.trim()
  18078. }else {
  18079. this.aiJson.sagentid = this.agentid.trim()
  18080. }
  18081. this.interFlash = false
  18082. setTimeout(() => {
  18083. this.interFlash = true
  18084. }, 100);
  18085. this.interSetting = false
  18086. },
  18087. setAgentid2(){
  18088. if(!this.r_agentid.trim()){
  18089. this.$message.error('请输入工作流链接')
  18090. return;
  18091. }
  18092. this.aiJson.recordAgentid = this.r_agentid.trim()
  18093. this.interSetting = false
  18094. },
  18095. rebuildAgentid(){
  18096. this.aiJson.sagentid = ''
  18097. this.interFlash = false
  18098. setTimeout(() => {
  18099. this.interFlash = true
  18100. }, 100);
  18101. this.interSetting = false
  18102. },
  18103. cancelInterSetting(){
  18104. this.agentid = ''
  18105. this.interSetting = false
  18106. },
  18107. cancelInterSetting2(){
  18108. this.r_agentid = ''
  18109. this.interSetting = false
  18110. },
  18111. openAiDialog2(clickType, type, callback, index, tindex){
  18112. if (this.taskLoading.length) {
  18113. let _pan = 1
  18114. for(var k = 0; k < this.taskLoading.length; k++){
  18115. if(this.taskLoading[k]){
  18116. this.$message({
  18117. message: `请等待任务${k+1}回答完毕后再继续`,
  18118. type: "warning"
  18119. });
  18120. _pan = 2
  18121. }
  18122. }
  18123. if(_pan == 2){
  18124. return
  18125. }
  18126. }
  18127. if(this.taskGLoading.length){
  18128. let _pan = 1
  18129. for(var k = 0; k < this.taskGLoading.length; k++){
  18130. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  18131. this.$message({
  18132. message: `请等待任务${k+1}回答完毕后再继续`,
  18133. type: "warning"
  18134. });
  18135. _pan = 2
  18136. }
  18137. }
  18138. if(_pan == 2){
  18139. return
  18140. }
  18141. }
  18142. let pan2 = 1
  18143. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18144. for(var _index = 0; _index < taskJson.length; _index++){
  18145. for (var j = 0; j < taskJson[_index].toolChoose.length; j++) {
  18146. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[_index].toolChoose[j].tool[0]) != -1){
  18147. if(this.$refs['evalist'+_index+j] && this.$refs['evalist'+_index+j][0].loading){
  18148. this.$message({
  18149. message: `请等待任务${_index+1}回答完毕后再继续`,
  18150. type: "warning"
  18151. });
  18152. pan2 = 2
  18153. }
  18154. }
  18155. }
  18156. }
  18157. if(pan2 == 2){
  18158. return
  18159. }
  18160. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  18161. confirmButtonText: "确定",
  18162. cancelButtonText: "取消",
  18163. type: "warning",
  18164. customClass: 'custom-confirm-box'
  18165. })
  18166. .then(() => {
  18167. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  18168. // this.openAiDialog(clickType, 'aiTeacher')
  18169. // }else {
  18170. this.openAiDialog(clickType, type, callback, index, tindex)
  18171. // }
  18172. })
  18173. .catch(() => {
  18174. });
  18175. setTimeout(() => {
  18176. this.setTipsIndex()
  18177. }, 500)
  18178. },
  18179. async openAiDialog(clickType, type, callback, index, tindex) {
  18180. let fileid = this.isFileSearch ? [...this.fileIds] : []
  18181. fileid = [...fileid]
  18182. if (this.infoData.length) {
  18183. for (var i = 0; i < this.infoData.length; i++) {
  18184. if(this.infoData[i].fileid){
  18185. fileid.push(this.infoData[i].fileid)
  18186. }else {
  18187. let _fileid = await this.createFileid(this.infoData[i].url)
  18188. if(_fileid){
  18189. this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18190. this.$forceUpdate();
  18191. if(_fileid != 1){
  18192. fileid.push(_fileid)
  18193. }
  18194. }
  18195. }
  18196. }
  18197. }
  18198. fileid = [...fileid, ...this.knowFileids, ...this.knowFileids2]
  18199. if(fileid.length > 30){
  18200. this.$message.error('目前检索文件不能超过30个噢,请减少一些')
  18201. return;
  18202. }
  18203. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  18204. this.$message.error("您没有权限修改/查看提示词");
  18205. return;
  18206. }
  18207. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  18208. this.$message.error("请上传教案");
  18209. return;
  18210. }
  18211. if (this.courseName == "") {
  18212. this.$message.error("请补充填写课程名称");
  18213. return;
  18214. }
  18215. this.aiText2 = ''
  18216. this.clickType = clickType
  18217. let sub = []
  18218. if (this.courseTypeId.length) {
  18219. for (var i = 0; i < this.courseTypeId.length; i++) {
  18220. let _sid = this.courseTypeId[i]
  18221. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18222. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18223. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18224. }
  18225. }
  18226. }
  18227. }
  18228. let mclass = []
  18229. if (this.courseTypeId.length) {
  18230. for (var i = 0; i < this.courseTypeId.length; i++) {
  18231. let _sid = this.courseTypeId[i]
  18232. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18233. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18234. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18235. }
  18236. }
  18237. }
  18238. }
  18239. if (type == "aiDetail") {
  18240. if (this.ttextLoading) {
  18241. this.$message({
  18242. message: "请回答完毕后再次发送",
  18243. type: "warning"
  18244. });
  18245. return;
  18246. }
  18247. this.aitype = "aiDetail"
  18248. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  18249. this.aiText = this.aiJson.aiDetail
  18250. this.aiCallBack = [callback, index]
  18251. } else if (type == "aiOutline") {
  18252. this.aitype = "aiOutline"
  18253. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18254. this.aiText = this.aiJson.aiOutline
  18255. } else if (type == "aiOutline2") {
  18256. this.aitype = "aiOutline2"
  18257. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18258. this.aiText = this.aiJson.aiOutlineTask
  18259. this.aiText2 = this.aiJson.aiOutlineDetail
  18260. } else if (type == "aiOutlineDetail2") {
  18261. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  18262. this.$message({
  18263. message: "请回答完毕后再次发送",
  18264. type: "warning"
  18265. });
  18266. return;
  18267. }
  18268. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  18269. this.$message.error('请输入任务名称')
  18270. return;
  18271. }
  18272. this.aitype = type
  18273. this.aiCallBack = callback
  18274. this.aiText = this.aiJson.aiOutlineDetail2
  18275. } else if (type == "aiTask") {
  18276. this.aitype = "aiTask"
  18277. var _text = ""
  18278. for (var i = 0; i < this.teacherText.length; i++) {
  18279. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  18280. }
  18281. // this.aiText = `请根据${_text}。`
  18282. this.aiText = this.aiJson.aiTask
  18283. this.aiCallBack = callback
  18284. } else if (type == "aiTask2") {
  18285. if (this.taskLoading[callback]) {
  18286. this.$message({
  18287. message: "请回答完毕后再次发送",
  18288. type: "warning"
  18289. });
  18290. return;
  18291. }
  18292. this.aitype = "aiTask2"
  18293. this.aiText = this.aiJson.aiTask
  18294. this.aiCallBack = [callback, index]
  18295. } else if (type == "aiTask3") {
  18296. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  18297. this.$message({
  18298. message: "请回答完毕后再次发送",
  18299. type: "warning"
  18300. });
  18301. return;
  18302. }
  18303. this.aitype = type
  18304. this.aiText = this.aiJson.aiTaskG1
  18305. this.aiText2 = this.aiJson.aiTaskG2
  18306. this.aiText3 = this.aiJson.aiTaskG3
  18307. this.aiCallBack = [callback, index]
  18308. } else if (type == "aiTaskG3") {
  18309. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][2])) {
  18310. this.$message({
  18311. message: "请回答完毕后再次发送",
  18312. type: "warning"
  18313. });
  18314. return;
  18315. }
  18316. this.aitype = type
  18317. this.aiText = this.aiJson.aiTaskG3
  18318. this.aiCallBack = callback
  18319. } else if (type == "aiTaskG2") {
  18320. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][1])) {
  18321. this.$message({
  18322. message: "请回答完毕后再次发送",
  18323. type: "warning"
  18324. });
  18325. return;
  18326. }
  18327. if(callback != 'all' && !this.unitJson[0].chapterInfo[0].taskJson[callback].taskDetail3){
  18328. this.$message({
  18329. message: `请先生成任务${callback}的教案在执行此操作`,
  18330. type: "warning"
  18331. });
  18332. return;
  18333. }
  18334. this.aitype = type
  18335. this.aiText = this.aiJson.aiTaskG2
  18336. this.aiCallBack = callback
  18337. } else if (type == "aiDetail1") {
  18338. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  18339. this.$message({
  18340. message: "请回答完毕后再次发送",
  18341. type: "warning"
  18342. });
  18343. return;
  18344. }
  18345. this.aitype = "aiDetail1"
  18346. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  18347. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  18348. this.aiText = this.aiJson.aiDetail1
  18349. this.aiCallBack = callback
  18350. this.aiIndex = index
  18351. } else if (type == "aiDetail2") {
  18352. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  18353. this.$message({
  18354. message: "请回答完毕后再次发送",
  18355. type: "warning"
  18356. });
  18357. return;
  18358. }
  18359. this.aitype = "aiDetail2"
  18360. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  18361. this.aiText = this.aiJson.aiDetail2
  18362. this.aiCallBack = callback
  18363. this.aiIndex = index
  18364. } else if (type == "aiDetail3") {
  18365. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  18366. this.$message({
  18367. message: "请回答完毕后再次发送",
  18368. type: "warning"
  18369. });
  18370. return;
  18371. }
  18372. this.aitype = "aiDetail3"
  18373. this.aiText = this.aiJson.aiDetail3
  18374. this.aiIndex = index + '-' + tindex
  18375. } else if (type == "aiDetail4") {
  18376. var _text = ""
  18377. if(callback && callback.length){
  18378. for (var i = 0; i < callback.length; i++) {
  18379. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  18380. }
  18381. }
  18382. this.aitype = "aiDetail4"
  18383. this.aiText = this.aiJson.aiDetail4
  18384. this.aiIndex = index
  18385. } else if (type == "aiTeacher") {
  18386. this.aitype = "aiTeacher"
  18387. var _text = ""
  18388. for (var i = 0; i < this.dArray.length; i++) {
  18389. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  18390. }
  18391. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18392. this.aiText = this.aiJson.aiTeacher
  18393. this.aiCallBack = callback
  18394. } else if (type == "aiTeacher2") {
  18395. if(this.ttaskDetailLoading5.length){
  18396. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  18397. this.$message({
  18398. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  18399. type: "warning"
  18400. });
  18401. return
  18402. }
  18403. this.aitype = "aiTeacher2"
  18404. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18405. } else if (type == "aiTeacher3") {
  18406. this.aitype = type
  18407. this.aiText = this.aiJson.aiCpoteTask
  18408. this.aiText2 = this.aiJson.teacherDetail2
  18409. } else if (type == "teacherDetail") {
  18410. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18411. this.$message({
  18412. message: "请回答完毕后再次发送",
  18413. type: "warning"
  18414. });
  18415. return;
  18416. }
  18417. this.aitype = "teacherDetail"
  18418. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18419. this.aiText = this.aiJson.teacherDetail
  18420. this.aiCallBack = callback
  18421. this.aiIndex = index
  18422. } else if (type == "teacherDetail2") {
  18423. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  18424. this.$message.error('请输入任务名称')
  18425. return;
  18426. }
  18427. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18428. // this.$message({
  18429. // message: "请回答完毕后再次发送",
  18430. // type: "warning"
  18431. // });
  18432. // return;
  18433. this.$confirm("还未生成完毕,是否直接重新生成?", "提示", {
  18434. confirmButtonText: "确定重新生成",
  18435. cancelButtonText: "取消",
  18436. distinguishCancelAndClose: true,
  18437. type: "warning",
  18438. customClass: 'custom-confirm-box'
  18439. })
  18440. .then(() => {
  18441. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  18442. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  18443. this.isTeacherTaskCancelToken2[index] = null;
  18444. }
  18445. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18446. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18447. if(this.isTeacherTaskCancelSource[index]){
  18448. this.isTeacherTaskCancelSource[index].close()
  18449. this.isTeacherTaskCancelSource[index] = null
  18450. }
  18451. this.aitype = "teacherDetail2"
  18452. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18453. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18454. this.aiCallBack = callback
  18455. this.aiIndex = index
  18456. this.dialogVisibleAiD = true
  18457. }).catch((v) => {
  18458. console.log(v);
  18459. })
  18460. setTimeout(() => {
  18461. this.setTipsIndex()
  18462. }, 500)
  18463. return;
  18464. }else {
  18465. this.aitype = "teacherDetail2"
  18466. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18467. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18468. this.aiCallBack = callback
  18469. this.aiIndex = index
  18470. this.dialogVisibleAiD = true
  18471. }
  18472. } else if (type == "aiCpote1") {
  18473. if (this.cpotetLoading.cpote1) {
  18474. this.$message({
  18475. message: "请回答完毕后再次发送",
  18476. type: "warning"
  18477. });
  18478. return;
  18479. }
  18480. this.aitype = "aiCpote1"
  18481. this.aiText = this.aiJson.cpote1
  18482. this.aiCallBack = callback
  18483. } else if (type == "aiCpote2") {
  18484. if (this.cpotetLoading.cpote2) {
  18485. this.$message({
  18486. message: "请回答完毕后再次发送",
  18487. type: "warning"
  18488. });
  18489. return;
  18490. }
  18491. this.aitype = "aiCpote2"
  18492. this.aiText = this.aiJson.cpote2
  18493. this.aiCallBack = callback
  18494. } else if (type == "aiCpote3") {
  18495. if (this.cpotetLoading.cpote3) {
  18496. this.$message({
  18497. message: "请回答完毕后再次发送",
  18498. type: "warning"
  18499. });
  18500. return;
  18501. }
  18502. this.aitype = "aiCpote3"
  18503. this.aiText = this.aiJson.cpote3
  18504. this.aiCallBack = callback
  18505. } else if (type == "aiCpote4") {
  18506. if (this.cpotetLoading.cpote4) {
  18507. this.$message({
  18508. message: "请回答完毕后再次发送",
  18509. type: "warning"
  18510. });
  18511. return;
  18512. }
  18513. this.aitype = "aiCpote4"
  18514. this.aiText = this.aiJson.cpote4
  18515. this.aiCallBack = callback
  18516. } else if (type == 'aiteacherTextDetail'){
  18517. if (this.tteacherTextLoading) {
  18518. this.$message({
  18519. message: "请回答完毕后再次发送",
  18520. type: "warning"
  18521. });
  18522. return;
  18523. }
  18524. this.aitype = type
  18525. this.aiText = this.aiJson.aiAbstract
  18526. this.aiCallBack = callback
  18527. } else if (type == 'aitargetTextDetail'){
  18528. if (this.ttargetTextLoading) {
  18529. this.$message({
  18530. message: "请回答完毕后再次发送",
  18531. type: "warning"
  18532. });
  18533. return;
  18534. }
  18535. this.aitype = type
  18536. this.aiText = this.aiJson.aiTarget
  18537. this.aiCallBack = callback
  18538. } else if (type == 'aitargetTextDetail2'){
  18539. if (this.ttargetTextLoading2) {
  18540. this.$message({
  18541. message: "请回答完毕后再次发送",
  18542. type: "warning"
  18543. });
  18544. return;
  18545. }
  18546. this.aitype = type
  18547. this.aiText = this.aiJson.aiTarget2
  18548. this.aiCallBack = callback
  18549. } else if (type == 'aitargetTextDetail3'){
  18550. if (this.ttargetTextLoading2) {
  18551. this.$message({
  18552. message: "请回答完毕后再次发送",
  18553. type: "warning"
  18554. });
  18555. return;
  18556. }
  18557. if(!this.courseText){
  18558. this.$message.error("请生成简要描述后再生成目标");
  18559. return;
  18560. }
  18561. this.$nextTick(() => {
  18562. const targetDiv = this.$refs.aitargetTextDetail3;
  18563. if (targetDiv) {
  18564. targetDiv.scrollIntoView();
  18565. }
  18566. });
  18567. this.aitype = type
  18568. this.aiText = this.aiJson.aiTargetGet
  18569. this.aiText2 = this.aiJson.aiTarget2
  18570. this.aiCallBack= callback
  18571. } else if (type == 'aiSearchFile'){
  18572. if(this.fileSLoading) {
  18573. this.$message({
  18574. message: "请回答完毕后再次发送",
  18575. type: "warning"
  18576. });
  18577. return;
  18578. }
  18579. this.aitype = type
  18580. this.aiText = this.aiJson.aiSearchFile
  18581. } else if (type == 'aiSearchFile2'){
  18582. if(this.fileSLoading) {
  18583. this.$message({
  18584. message: "请回答完毕后再次发送",
  18585. type: "warning"
  18586. });
  18587. return;
  18588. }
  18589. this.aitype = type
  18590. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  18591. #输出样例
  18592. <学科1>:关键词
  18593. - 匹配到的内容1
  18594. - 匹配到的内容2
  18595. - 匹配到的内容3
  18596. - 匹配到的内容4
  18597. - 匹配到的内容5
  18598. <学科2>:关键词
  18599. - 匹配到的内容1
  18600. - 匹配到的内容2
  18601. - 匹配到的内容3
  18602. - 匹配到的内容4
  18603. - 匹配到的内容5
  18604. ...
  18605. <学科n>:关键词
  18606. - 匹配到的内容1
  18607. - 匹配到的内容2
  18608. - 匹配到的内容3
  18609. - 匹配到的内容4
  18610. - 匹配到的内容5
  18611. `
  18612. } else if (type == 'aiRateRule'){
  18613. this.aitype = type
  18614. this.aiText = this.aiJson.aiRateRule
  18615. this.aiCallBack = [callback, index]
  18616. } else if (type == 'aiRateRuleA'){
  18617. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  18618. confirmButtonText: "生成所有",
  18619. cancelButtonText: "仅生成该任务",
  18620. distinguishCancelAndClose: true,
  18621. type: "warning",
  18622. })
  18623. .then(() => {
  18624. this.aitype = type
  18625. this.aiText = this.aiJson.aiRateRule
  18626. this.aiCallBack = [1,callback]
  18627. this.dialogVisibleAiD = true
  18628. }).catch((v) => {
  18629. console.log(v);
  18630. if (v == "cancel") {
  18631. this.aitype = type
  18632. this.aiText = this.aiJson.aiRateRule
  18633. this.aiCallBack = [2,callback]
  18634. this.dialogVisibleAiD = true
  18635. }
  18636. })
  18637. }
  18638. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  18639. this.dialogVisibleAiD = true
  18640. }
  18641. },
  18642. async aiConfirm(msg,msg2,msg3) {
  18643. let sub = []
  18644. if (this.courseTypeId.length) {
  18645. for (var i = 0; i < this.courseTypeId.length; i++) {
  18646. let _sid = this.courseTypeId[i]
  18647. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18648. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18649. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18650. }
  18651. }
  18652. }
  18653. }
  18654. let mclass = []
  18655. if (this.courseTypeId.length) {
  18656. for (var i = 0; i < this.courseTypeId.length; i++) {
  18657. let _sid = this.courseTypeId[i]
  18658. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18659. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18660. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18661. }
  18662. }
  18663. }
  18664. }
  18665. let url = []
  18666. if (this.infoData.length) {
  18667. for (var i = 0; i < this.infoData.length; i++) {
  18668. url.push(this.infoData[i].url)
  18669. }
  18670. }
  18671. if (this.aitype == "aiDetail") {
  18672. this.detailYou(msg)
  18673. } else if (this.aitype == "aiOutline") {
  18674. this.loading = true
  18675. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18676. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  18677. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  18678. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18679. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18680. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18681. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18682. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18683. if(this.languageSetting == 2){
  18684. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18685. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18686. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18687. }
  18688. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18689. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18690. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18691. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18692. let message = `NOTICE
  18693. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18694. Output: Provide your output in json format.
  18695. Language: ${this.getLang()}
  18696. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18697. Instruction: Based on the context, follow "Format example", write content.
  18698. # Context
  18699. ## 要求
  18700. ${msg} 以及##参考资料
  18701. ## 参考资料
  18702. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18703. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18704. detail至少输出300tokens,markdown格式输出。
  18705. detail包含子教学目标、过程性成果、子评价标准
  18706. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18707. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18708. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  18709. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  18710. # Format example`
  18711. message = message.replaceAll('\n', ' ')
  18712. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  18713. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  18714. // detail输出不要输出成json,文本或者markdown都可以
  18715. this.aiGet2(message, () => {
  18716. this.loading = false
  18717. this.isOutline = true
  18718. })
  18719. } else if (this.aitype == "aiOutline2") {
  18720. this.loading = true
  18721. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18722. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18723. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18724. let message = `NOTICE
  18725. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18726. Language: ${this.getLang()}
  18727. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18728. Instruction: Based on the context, follow "Format example", write content.
  18729. # Context
  18730. ## 要求
  18731. ${msg} 以及##参考资料
  18732. ## 参考资料
  18733. 课程名字:${this.courseName}
  18734. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  18735. ${sub.length ? '学科:' + sub.join(",") : ''}
  18736. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18737. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18738. # Format example
  18739. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  18740. this.aiGetTask2(message, () => {
  18741. this.loading = false
  18742. this.isOutline = true
  18743. })
  18744. } else if (this.aitype == "aiOutlineDetail2") {
  18745. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  18746. } else if (this.aitype == "aiTask") {
  18747. var _text = ""
  18748. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18749. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18750. }
  18751. let message = `NOTICE
  18752. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18753. Language: ${this.getLang()}
  18754. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18755. Instruction: Based on the context, follow "Format example", write content.
  18756. # Context
  18757. ## 要求
  18758. ${msg} 为**每个教学任务分别输出**以下内容。
  18759.  
  18760. ${(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','') : ''}
  18761. ## 参考资料
  18762. 教学任务教案:${_text}
  18763. ## 格式要求
  18764. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  18765. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18766. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  18767. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18768. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18769. 出现选择题和问答题的概率提高
  18770. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  18771.  
  18772. # Format example
  18773. [{"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":"工具描述"}]}]`
  18774. this.loading = true
  18775. this.aiGet3(message, this.aiCallBack)
  18776. } else if (this.aitype == "aiTask2") {
  18777. if(this.aiCallBack[0] == 'all'){
  18778. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18779. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18780. let message = `NOTICE
  18781. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18782. Language: ${this.getLang()}
  18783. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18784. Instruction: Based on the context, follow "Format example", write content.
  18785. # Context
  18786. ## 要求
  18787. ${msg} 为教学任务分别输出以下内容。
  18788.  
  18789. ${(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','') : ''}
  18790. ## 参考资料
  18791. 教学任务教案:${_text}
  18792. ## 格式要求
  18793. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18794. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  18795. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18796. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18797. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  18798.  
  18799. # Format example
  18800. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18801. this.taskLoading[_task] = true
  18802. this.aiGet32(message, _task)
  18803. }
  18804. }else{
  18805. 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`
  18806. let message = `NOTICE
  18807. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18808. Language: ${this.getLang()}
  18809. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18810. Instruction: Based on the context, follow "Format example", write content.
  18811. # Context
  18812. ## 要求
  18813. ${msg} 为教学任务分别输出以下内容。
  18814.  
  18815. ${(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','') : ''}
  18816. ## 参考资料
  18817. 教学任务教案:${_text}
  18818. ## 格式要求
  18819. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18820. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  18821. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18822. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18823. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  18824.  
  18825. # Format example
  18826. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18827. this.taskLoading[this.aiCallBack[0]] = true
  18828. this.aiGet32(message, this.aiCallBack[0])
  18829. }
  18830. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  18831. } else if (this.aitype == "aiTask3") {
  18832. if(this.aiCallBack[0] == 'all'){
  18833. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18834. if(!this.taskGLoading[_task]){
  18835. this.taskGLoading[_task] = []
  18836. this.ttaskGLoading[_task] = []
  18837. }
  18838. this.taskGLoading[_task][0] = true
  18839. this.ttaskGLoading[_task][0] = true
  18840. // this.taskGLoading[_task][1] = true
  18841. // this.taskGLoading[_task][2] = true
  18842. // this.aiGetG323(message3, _task)
  18843. }
  18844. let ij = 0;
  18845. let _this = this
  18846. function processNext() {
  18847. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18848. if(!_this.taskGLoading[ij][0]){
  18849. ij++;
  18850. processNext();
  18851. return;
  18852. }
  18853. let message1 = `NOTICE
  18854. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18855. Language: ${_this.getLang()}
  18856. # Context
  18857. ## 要求
  18858. ${msg}
  18859.  
  18860. ## 参考资料
  18861. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18862. # 输出格式与要求
  18863. 任务描述(告诉学生他们需要做什么):
  18864. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  18865. # 范例
  18866. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  18867. _this.aiGetG321L(message1, ij, (callback2) => {
  18868. // _this.aiGetG322(message2, ij, callback2);
  18869. callback2 ? callback2() : ''
  18870. }, () => {
  18871. // 回调函数,当前任务完成后执行
  18872. ij++;
  18873. processNext(); // 处理下一个任务
  18874. });
  18875. }
  18876. }
  18877. processNext(); // 启动处理
  18878. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  18879. }else{
  18880. let message1 = `NOTICE
  18881. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18882. Language: ${this.getLang()}
  18883. # Context
  18884. ## 要求
  18885. ${msg}
  18886.  
  18887. ## 参考资料
  18888. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18889. # 输出格式与要求
  18890. 任务描述(告诉学生他们需要做什么):
  18891. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  18892. # 范例
  18893. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  18894. if(!this.taskGLoading[this.aiCallBack[0]]){
  18895. this.taskGLoading[this.aiCallBack[0]] = []
  18896. this.ttaskGLoading[this.aiCallBack[0]] = []
  18897. }
  18898. this.taskGLoading[this.aiCallBack[0]][0] = true
  18899. this.ttaskGLoading[this.aiCallBack[0]][0] = true
  18900. // this.taskGLoading[this.aiCallBack[0]][1] = true
  18901. // this.taskGLoading[this.aiCallBack[0]][2] = true
  18902. this.aiGetG321L(message1, this.aiCallBack[0], () => {
  18903. // this.aiGetG322(message2, this.aiCallBack[0])
  18904. // this.aiCallBack[0] ? this.aiCallBack[0]() : ''
  18905. })
  18906. // this.aiGetG323(message3, this.aiCallBack[0])
  18907. }
  18908. } else if (this.aitype == "aiTaskG3") {
  18909. let message3 = `NOTICE
  18910. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18911. Language: ${this.getLang()}
  18912. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18913. Instruction: Based on the context, follow "Format example", write content.
  18914. # Context
  18915. ## 要求
  18916. ${msg3}
  18917.  
  18918. ## 参考资料
  18919. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18920. # 输出格式与要求
  18921. 核心素养:从教案中提取
  18922. 目标:从教案中提取
  18923. 评价标准:从教案中提取评价标准
  18924. # Format example
  18925. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  18926. if(!this.taskGLoading[this.aiCallBack]){
  18927. this.taskGLoading[this.aiCallBack] = []
  18928. }
  18929. this.taskGLoading[this.aiCallBack][2] = true
  18930. this.aiGetG323(message3, this.aiCallBack)
  18931. } else if (this.aitype == "aiTaskG2") {
  18932. if(this.aiCallBack == 'all'){
  18933. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18934. if(!this.taskGLoading[_task]){
  18935. this.taskGLoading[_task] = []
  18936. }
  18937. this.taskGLoading[_task][1] = true
  18938. }
  18939. let ij = 0;
  18940. let _this = this
  18941. function processNext() {
  18942. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18943. if(!_this.taskGLoading[ij][1] || !_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3){
  18944. _this.taskGLoading[ij][1] = false
  18945. ij++;
  18946. processNext();
  18947. return;
  18948. }
  18949. let message2 = `NOTICE
  18950. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18951. Language: ${_this.getLang()}
  18952. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18953. Instruction: Based on the context, follow "Format example", write content.
  18954. # Context
  18955. ## 要求
  18956. ${msg2}
  18957.  
  18958. ## 参考资料
  18959. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18960. # 输出格式与要求
  18961. 互动工具列表
  18962. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  18963. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  18964. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  18965. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  18966. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  18967. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  18968. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  18969. # Format example
  18970. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18971. _this.aiGetG322(message2, ij, () => {
  18972. // 回调函数,当前任务完成后执行
  18973. ij++;
  18974. processNext(); // 处理下一个任务
  18975. });
  18976. }
  18977. }
  18978. processNext(); // 启动处理
  18979. }else{
  18980. let message2 = `NOTICE
  18981. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18982. Language: ${this.getLang()}
  18983. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18984. Instruction: Based on the context, follow "Format example", write content.
  18985. # Context
  18986. ## 要求
  18987. ${msg2}
  18988.  
  18989. ## 参考资料
  18990. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18991. # 输出格式与要求
  18992. 互动工具列表
  18993. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  18994. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  18995. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  18996. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  18997. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  18998. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  18999. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19000. # Format example
  19001. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19002. if(!this.taskGLoading[this.aiCallBack]){
  19003. this.taskGLoading[this.aiCallBack] = []
  19004. }
  19005. // this.taskGLoading[this.aiCallBack[0]][0] = true
  19006. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19007. this.taskGLoading[this.aiCallBack][1] = true
  19008. this.aiGetG322(message2, this.aiCallBack)
  19009. }
  19010. } else if (this.aitype == "aiDetail1") {
  19011. this.aiDetail(msg, this.aiIndex)
  19012. } else if (this.aitype == "aiDetail2") {
  19013. this.aiDetail2(msg, this.aiIndex)
  19014. } else if (this.aitype == "aiDetail3") {
  19015. let _index = this.aiIndex.split('-')
  19016. this.aiDetail3(msg, _index[0], _index[1])
  19017. } else if (this.aitype == "aiDetail4") {
  19018. this.aiDetail4(msg, this.aiIndex)
  19019. } else if (this.aitype == "teacherDetail") {
  19020. this.aiDetail5(msg, this.aiIndex)
  19021. } else if (this.aitype == "teacherDetail2") {
  19022. this.aiDetail52(msg, this.aiIndex)
  19023. } else if (this.aitype == "aiCpote1") {
  19024. this.aiCpote(msg, this.aiCallBack)
  19025. } else if (this.aitype == "aiCpote2") {
  19026. this.aiCpote(msg, this.aiCallBack)
  19027. } else if (this.aitype == "aiCpote3") {
  19028. this.aiCpote(msg, this.aiCallBack)
  19029. } else if (this.aitype == "aiCpote4") {
  19030. this.aiCpote(msg, this.aiCallBack)
  19031. } else if (this.aitype == "aiTeacher") {
  19032. this.loading = true
  19033. var _text = ""
  19034. for (var i = 0; i < this.dArray.length; i++) {
  19035. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  19036. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  19037. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19038. let message = ` NOTICE
  19039. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19040. Language: ${this.getLang()}
  19041. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19042. Instruction: Based on the context, follow "Format example", write content.
  19043. # Context
  19044. ## 要求
  19045. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  19046. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  19047. ${(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','') : ''}
  19048. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19049. ## Format example
  19050. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  19051. this.aiGet4(message, () => {
  19052. this.loading = false
  19053. this.isOutline2 = true
  19054. })
  19055. } else if (this.aitype == "aiTeacher2"){
  19056. this.isOutline2 = true
  19057. let _this = this
  19058. setTimeout(()=>{
  19059. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19060. const _tindex = 'task-' + i;
  19061. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19062. _this.taskDetailLoading5.push(_tindex)
  19063. }
  19064. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  19065. _this.ttaskDetailLoading5.push(_tindex)
  19066. }
  19067. // this.aiDetail52(msg, i)
  19068. }
  19069. let ij = 0;
  19070. function processNext() {
  19071. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19072. const _tindex = 'task-' + ij;
  19073. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19074. ij++;
  19075. processNext();
  19076. return;
  19077. }
  19078. // 处理当前任务
  19079. _this.aiDetail52(msg, ij, function () {
  19080. // 回调函数,当前任务完成后执行
  19081. ij++;
  19082. processNext(); // 处理下一个任务
  19083. });
  19084. }
  19085. }
  19086. processNext(); // 启动处理
  19087. }, 0)
  19088. } else if (this.aitype == "aiTeacher3"){
  19089. this.loading = true
  19090. let message = `NOTICE
  19091. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19092. Language: ${this.getLang()}
  19093. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19094. Instruction: Based on the context, follow "Format example", write content.
  19095. # Context
  19096. ## 要求
  19097. ${msg} 以及##参考资料
  19098. ## 参考资料
  19099. 任务簇:${this.cpote.cpote4}
  19100. # Format example
  19101. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  19102. this.aiGetTask3(message, () => {
  19103. this.loading = false
  19104. this.isOutline2 = true
  19105. })
  19106. } else if (this.aitype == "aiteacherTextDetail") {
  19107. this.aiteacherTextDetail(msg)
  19108. } else if (this.aitype == "aitargetTextDetail") {
  19109. this.aitargetTextDetail(msg)
  19110. } else if (this.aitype == "aitargetTextDetail2") {
  19111. this.aitargetTextDetail2(msg)
  19112. } else if (this.aitype == "aitargetTextDetail3") {
  19113. this.aitargetTextDetail3(msg)
  19114. } else if (this.aitype == 'aiSearchFile'){
  19115. let messages = `NOTICE
  19116. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19117. Language: ${this.getLang()}
  19118. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19119. Instruction: Based on the context, follow "Format example", write content.
  19120. ## 参考资料
  19121. 关键词:${this.courseName}
  19122. # Context
  19123. ## 要求
  19124. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  19125. # Format example
  19126. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  19127. this.fileSLoading = true
  19128. this.aiSearchFile(messages,()=>{
  19129. this.fileSLoading = false
  19130. })
  19131. } else if (this.aitype == 'aiSearchFile2'){
  19132. let messages = `${msg}
  19133. 课程名字:${this.courseName}
  19134. ${sub.length ? '学科:' + sub.join(",") : ''}
  19135. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  19136. this.fileSLoading = true
  19137. this.aiSearchFile2(messages,()=>{
  19138. this.fileSLoading = false
  19139. })
  19140. } else if (this.aitype == 'aiRateRule'){
  19141. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  19142. } else if (this.aitype == 'aiRateRuleA'){
  19143. if(this.aiCallBack[0] == 1){
  19144. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19145. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  19146. for(var k = 0; k < task.eList.length; k++){
  19147. if(!task.eList[k].rule){
  19148. this.againEva(msg, i, k)
  19149. }
  19150. }
  19151. }
  19152. }else if(this.aiCallBack[0] == 2){
  19153. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  19154. for(var k = 0; k < task.eList.length; k++){
  19155. if(!task.eList[k].rule){
  19156. this.againEva(msg, this.aiCallBack[1], k)
  19157. }
  19158. }
  19159. }
  19160. }
  19161. this.setAiJson(this.aitype, msg, msg2, msg3)
  19162. },
  19163. getLang(){
  19164. let lang = ''
  19165. if(this.languageSetting == 0){
  19166. lang = 'Chinese.'
  19167. }else if(this.languageSetting == 1){
  19168. lang = 'Traditional Chinese.'
  19169. }else if(this.languageSetting == 2){
  19170. lang = 'English.'
  19171. }
  19172. return lang
  19173. },
  19174. detailYou(message) {
  19175. this.textLoading = true
  19176. this.ttextLoading = true
  19177. let sub = []
  19178. if (this.courseTypeId.length) {
  19179. for (var i = 0; i < this.courseTypeId.length; i++) {
  19180. let _sid = this.courseTypeId[i]
  19181. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19182. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19183. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19184. }
  19185. }
  19186. }
  19187. }
  19188. let mclass = []
  19189. if (this.courseTypeId.length) {
  19190. for (var i = 0; i < this.courseTypeId.length; i++) {
  19191. let _sid = this.courseTypeId[i]
  19192. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19193. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19194. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19195. }
  19196. }
  19197. }
  19198. }
  19199. let url = []
  19200. if (this.infoData.length) {
  19201. for (var i = 0; i < this.infoData.length; i++) {
  19202. url.push(this.infoData[i].url)
  19203. }
  19204. }
  19205. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  19206. // --------
  19207. // ## 补充参考资料
  19208. // 补充资料:${url.join(",")}
  19209. // 补充描述:${this.courseText2} ##补充参考资料和
  19210. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19211. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19212. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19213. let msg = `NOTICE
  19214. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  19215. Language: ${this.getLang()}
  19216. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19217. Instruction: Based on the context, follow "Format example", write content.
  19218. #Context
  19219. ## 参考资料
  19220. 课程名字:${this.courseName}
  19221. ${sub.length ? '学科:' + sub.join(",") : ''}
  19222. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19223. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  19224. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  19225. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  19226. ## 要求
  19227. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  19228. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4' && this.templateid != '9dd4bb76-1e48-11ef-bee5-005056b86db5') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  19229. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19230. this.aiGet(msg)
  19231. },
  19232. setUnitJson() {
  19233. 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 }] }
  19234. this.$forceUpdate()
  19235. },
  19236. async aiGet(messages) {
  19237. let _this = this
  19238. let fileid = []
  19239. if(!this.yiKeTemplateArray.includes(this.templateid)){
  19240. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  19241. if(_this.cankaoInfoData[i].fileid){
  19242. fileid.push(_this.cankaoInfoData[i].fileid)
  19243. }else {
  19244. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  19245. if(_fileid){
  19246. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19247. _this.$forceUpdate();
  19248. if(_fileid != 1){
  19249. fileid.push(_fileid)
  19250. }
  19251. }
  19252. }
  19253. }
  19254. if(this.mode == 1){
  19255. for (var i = 0; i < _this.infoData.length; i++) {
  19256. if(_this.infoData[i].fileid){
  19257. fileid.push(_this.infoData[i].fileid)
  19258. }else {
  19259. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19260. if(_fileid){
  19261. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19262. _this.$forceUpdate();
  19263. if(_fileid != 1){
  19264. fileid.push(_fileid)
  19265. }
  19266. }
  19267. }
  19268. }
  19269. }
  19270. } else {
  19271. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19272. fileid = [...fileid]
  19273. if (_this.infoData.length) {
  19274. for (var i = 0; i < _this.infoData.length; i++) {
  19275. if(_this.infoData[i].fileid){
  19276. fileid.push(_this.infoData[i].fileid)
  19277. }else {
  19278. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19279. if(_fileid){
  19280. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19281. _this.$forceUpdate();
  19282. if(_fileid != 1){
  19283. fileid.push(_fileid)
  19284. }
  19285. }
  19286. }
  19287. }
  19288. }
  19289. }
  19290. _this.isTextCancelToken = _this.ajax.setCancelSource();
  19291. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19292. let _uuid = uuidv4();
  19293. // let params = JSON.stringify({
  19294. // // "model": "Chat",
  19295. // model: 'gpt-3.5-turbo',
  19296. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19297. // max_tokens: 4096,
  19298. // top_p: 1,
  19299. // frequency_penalty: 0,
  19300. // presence_penalty: 0,
  19301. // messages: [{
  19302. // content: messages,
  19303. // role: 'user'
  19304. // }],
  19305. // uid: _uuid,
  19306. // mind_map_question: "",
  19307. // })
  19308. let params = {
  19309. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19310. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19311. session_name: _uuid,
  19312. userId: _this.userid,
  19313. uid: _uuid,
  19314. file_ids: fileid.length ? [...fileid] : '',
  19315. model: 'gpt-4o-2024-11-20',
  19316. temperature: this.mode == 3 ? 0.5 : 0.1,
  19317. }
  19318. // let params = JSON.stringify({
  19319. // message: {
  19320. // anthropic_version: "bedrock-2023-05-31",
  19321. // max_tokens: 4096,
  19322. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19323. // top_p: 1,
  19324. // messages: [{
  19325. // "role": "user",
  19326. // "content": messages
  19327. // }] ,
  19328. // },
  19329. // uid: _uuid,
  19330. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19331. // });
  19332. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19333. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  19334. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19335. console.log(response);
  19336. // let data = response.data.FunctionResponse
  19337. // if (data.choices && data.choices.length && data.choices[0].message) {
  19338. // _this.courseText = data.choices[0].message.content
  19339. // }
  19340. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19341. } else {
  19342. _this.$message.warning(response.data.FunctionResponse.result);
  19343. }
  19344. _this.isTextCancelToken = null
  19345. }).catch(function (error) {
  19346. _this.textLoading = false
  19347. _this.ttextLoading = false
  19348. _this.isTextCancelToken = null
  19349. if(error && error.message != 'Request canceled by the user.'){
  19350. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19351. }
  19352. console.log(error);
  19353. });
  19354. await _this.aiGetgetAiContent(_uuid)
  19355. },
  19356. aiGetgetAiContent(_uid) {
  19357. try {
  19358. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19359. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19360. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19361. } catch(error){
  19362. console.log('EventSource error:', error);
  19363. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19364. this.textLoading = false
  19365. this.ttextLoading = false
  19366. this.isTextCancelToken = null
  19367. return;
  19368. }
  19369. let _allText = "";
  19370. let _mdText = "";
  19371. let _iindex = 0
  19372. this.isTextCancelSource.onmessage = _e => {
  19373. let _eData = JSON.parse(_e.data).content;
  19374. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19375. //对话已经完成
  19376. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19377. this.isTextCancelSource.close();
  19378. this.isTextCancelSource = null;
  19379. this.courseText = _mdText;
  19380. this.textLoading = false
  19381. this.ttextLoading = false
  19382. this.courseTextB = false
  19383. this.isTextCancelToken = null
  19384. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19385. this.saveCourse()
  19386. return;
  19387. } else {
  19388. _iindex++
  19389. //对话还在继续
  19390. let _text = "";
  19391. _text = _eData.replaceAll("'", "");
  19392. if (_allText == "") {
  19393. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19394. } else {
  19395. _allText += _text;
  19396. }
  19397. _mdText = _allText + "_";
  19398. _mdText = _mdText.replace(/\\n/g, "\n");
  19399. _mdText = _mdText.replace(/\\/g, "");
  19400. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19401. //转化返回的回复流数据
  19402. if(_iindex == 10){
  19403. this.courseText = _mdText;
  19404. _iindex = 0
  19405. }
  19406. this.textLoading = false
  19407. // 处理流数据
  19408. }
  19409. // this.$forceUpdate();
  19410. };
  19411. let _this = this
  19412. this.isTextCancelSource.onerror = function(event) {
  19413. // 处理错误,可以尝试重新连接
  19414. console.log('EventSource error:', event);
  19415. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19416. _this.textLoading = false
  19417. _this.ttextLoading = false
  19418. _this.isTextCancelToken = null
  19419. _this.isTextCancelSource.close();
  19420. _this.isTextCancelSource = null;
  19421. };
  19422. },
  19423. numberToChinese(number) {
  19424. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  19425. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  19426. let result = '';
  19427. let num = parseInt(number, 10);
  19428. let i = 0;
  19429. while (num > 0) {
  19430. result = chineseNum[num % 10] + chineseUnit[i] + result;
  19431. num = Math.floor(num / 10);
  19432. i++;
  19433. }
  19434. // 去除连续的零,保留一个零
  19435. result = result.replace(/零+/g, '零');
  19436. return result;
  19437. },
  19438. async aiGet2(messages, callback) {
  19439. let _this = this
  19440. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19441. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19442. if (_this.infoData.length) {
  19443. for (var i = 0; i < _this.infoData.length; i++) {
  19444. if(_this.infoData[i].fileid){
  19445. fileid.push(_this.infoData[i].fileid)
  19446. }else {
  19447. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19448. if(_fileid){
  19449. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19450. _this.$forceUpdate();
  19451. if(_fileid != 1){
  19452. fileid.push(_fileid)
  19453. }
  19454. }
  19455. }
  19456. }
  19457. }
  19458. console.log('fileid=========',fileid)
  19459. // let params = JSON.stringify({
  19460. // // "model": "Chat",
  19461. // model: 'gpt-3.5-turbo',
  19462. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19463. // max_tokens: 4096,
  19464. // top_p: 1,
  19465. // frequency_penalty: 0,
  19466. // presence_penalty: 0,
  19467. // messages: [{
  19468. // content: messages,
  19469. // role: 'user'
  19470. // }],
  19471. // stream: false,
  19472. // uid: this.userid,
  19473. // mind_map_question: "",
  19474. // })
  19475. // // let params = JSON.stringify({
  19476. // // message: {
  19477. // // anthropic_version: "bedrock-2023-05-31",
  19478. // // max_tokens: 4096,
  19479. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19480. // // top_p: 1,
  19481. // // messages: [{
  19482. // // content: messages,
  19483. // // role: 'user'
  19484. // // }], //
  19485. // // },
  19486. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19487. // // });
  19488. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19489. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19490. // console.log(response);
  19491. // let data = response.data.FunctionResponse
  19492. // if (data.choices && data.choices.length && data.choices[0].message) {
  19493. // console.log(data.choices[0].message.content);
  19494. // let dArray = JSON.parse(data.choices[0].message.content)
  19495. // _this.dArray = dArray
  19496. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19497. // for (var i = 0; i < dArray.length; i++) {
  19498. // let _task = dArray[i]
  19499. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19500. // task: _task.task,
  19501. // taskDetail: "",
  19502. // taskDetail2: _task.detail,
  19503. // taskDetail3: "",
  19504. // chapterData: [],
  19505. // toolText: "",
  19506. // toolChoose: [
  19507. // {
  19508. // tool: [],
  19509. // toolDetail: "",
  19510. // toolType: 0,
  19511. // askCount: 1,
  19512. // askTitle: "",
  19513. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19514. // },
  19515. // ],
  19516. // isShowTools: false,
  19517. // askCount: 1,
  19518. // isFold: 0,
  19519. // askTitle: "",
  19520. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19521. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19522. // homeworkList: [],
  19523. // })
  19524. // }
  19525. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19526. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19527. // _this.$forceUpdate();
  19528. // }
  19529. // // if (data.result) {
  19530. // // console.log(data.result);
  19531. // // let dArray = JSON.parse(data.result)
  19532. // // _this.dArray = dArray
  19533. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19534. // // for (var i = 0; i < dArray.length; i++) {
  19535. // // let _task = dArray[i]
  19536. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19537. // // task: _task.task,
  19538. // // taskDetail: "",
  19539. // // taskDetail2: _task.detail,
  19540. // // taskDetail3: "",
  19541. // // chapterData: [],
  19542. // // toolText: "",
  19543. // // toolChoose: [
  19544. // // {
  19545. // // tool: [],
  19546. // // toolDetail: "",
  19547. // // toolType: 0,
  19548. // // askCount: 1,
  19549. // // askTitle: "",
  19550. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19551. // // },
  19552. // // ],
  19553. // // isShowTools: false,
  19554. // // askCount: 1,
  19555. // // isFold: 1,
  19556. // // askTitle: "",
  19557. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19558. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19559. // // homeworkList: [],
  19560. // // })
  19561. // // }
  19562. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19563. // // _this.$forceUpdate();
  19564. // // }
  19565. // callback ? callback() : ''
  19566. // }).catch(function (error) {
  19567. // _this.loading = false
  19568. // console.log(error);
  19569. // });
  19570. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19571. let parm = {
  19572. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  19573. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  19574. session_name: uuidv4(),
  19575. userId: this.userid,
  19576. file_ids: fileid.length ? [...fileid] : '',
  19577. model: 'gpt-4o-2024-11-20',
  19578. temperature: this.mode == 3 ? 0.5 : 0.1,
  19579. }
  19580. this.ajax
  19581. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19582. .then((response) => {
  19583. console.log(response);
  19584. let data = response.data.FunctionResponse
  19585. if (data.message) {
  19586. console.log(data.message);
  19587. let dArray = {}
  19588. try {
  19589. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19590. } catch (error) {
  19591. console.log("error_________________" + error);
  19592. try {
  19593. let regex = new RegExp(/```json([\s\S]*?)```/);
  19594. let match = data.message.match(regex);
  19595. dArray = JSON.parse(match[1]);
  19596. // var message = data.message;
  19597. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19598. // var jsonEnd = message.indexOf("```", jsonStart);
  19599. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19600. // dArray = JSON.parse(jsonString);
  19601. } catch (error) {
  19602. try {
  19603. let regex = new RegExp(/```json([\s\S]*?)```/);
  19604. let match = data.message.match(regex);
  19605. // eval("var aaa = " + match[0])
  19606. if(match && match[1]){
  19607. dArray = JSON.parse(match[1].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19608. }else {
  19609. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19610. }
  19611. } catch (error) {
  19612. _this.$message.error('返回json格式不正确')
  19613. // +data.message
  19614. // _this.aiGet2(messages, callback);
  19615. _this.loading = false
  19616. _this.isOutlineCancelToken = null
  19617. console.log("error_________________" + error);
  19618. return;
  19619. }
  19620. console.log("error_________________" + error);
  19621. }
  19622. }
  19623. _this.dArray = dArray
  19624. console.log(dArray)
  19625. if(_this.panOutline() > 0){
  19626. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19627. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19628. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19629. }
  19630. for (var i = 0; i < dArray.length; i++) {
  19631. let _task = dArray[i]
  19632. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19633. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  19634. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  19635. }else {
  19636. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19637. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19638. taskDetail: "",
  19639. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19640. taskDetail3: "",
  19641. chapterData: [],
  19642. toolText: "",
  19643. toolChoose: [
  19644. {
  19645. tool: [],
  19646. toolDetail: "",
  19647. toolType: 0,
  19648. askCount: 1,
  19649. askTitle: "",
  19650. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19651. },
  19652. ],
  19653. isShowTools: false,
  19654. askCount: 1,
  19655. isFold: 0,
  19656. askTitle: "",
  19657. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19658. checkJson: [{ checkCount: [], checkPerent: [] }],
  19659. homeworkList: [],
  19660. })
  19661. }
  19662. }
  19663. }else {
  19664. _this.unitJson[0].chapterInfo[0].taskJson = []
  19665. for (var i = 0; i < dArray.length; i++) {
  19666. let _task = dArray[i]
  19667. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19668. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19669. taskDetail: "",
  19670. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19671. taskDetail3: "",
  19672. chapterData: [],
  19673. toolText: "",
  19674. toolChoose: [
  19675. {
  19676. tool: [],
  19677. toolDetail: "",
  19678. toolType: 0,
  19679. askCount: 1,
  19680. askTitle: "",
  19681. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19682. },
  19683. ],
  19684. isShowTools: false,
  19685. askCount: 1,
  19686. isFold: 0,
  19687. askTitle: "",
  19688. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19689. checkJson: [{ checkCount: [], checkPerent: [] }],
  19690. homeworkList: [],
  19691. })
  19692. }
  19693. }
  19694. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19695. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19696. _this.$forceUpdate();
  19697. _this.saveCourse()
  19698. }
  19699. callback ? callback() : ''
  19700. _this.isOutlineCancelToken = null
  19701. })
  19702. .catch((error) => {
  19703. _this.loading = false
  19704. _this.isOutlineCancelToken = null
  19705. console.log(error);
  19706. });
  19707. },
  19708. cancelAjax(type, index){
  19709. if (this.isOutlineCancelToken && type == 'outline') {
  19710. this.$message.success("已经成功停止生成课程大纲")
  19711. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  19712. this.isOutlineCancelToken = null;
  19713. this.loading = false
  19714. }
  19715. if (this.isFileCancelToken && type == 'file') {
  19716. this.$message.success("已经成功停止智能生成检索资料")
  19717. this.isFileCancelToken.cancel('Request canceled by the user.');
  19718. this.isFileCancelToken = null;
  19719. this.fileSLoading = false
  19720. }
  19721. if(this.isTextCancelToken && type == 'text'){
  19722. this.$message.success("已经成功停止AI优化")
  19723. this.isTextCancelToken.cancel('Request canceled by the user.');
  19724. this.isTextCancelToken = null;
  19725. this.textLoading = false
  19726. this.ttextLoading = true
  19727. if(this.isTextCancelSource){
  19728. this.isTextCancelSource.close()
  19729. this.isTextCancelSource = null
  19730. }
  19731. }
  19732. if(this.isTargetCancelToken2 && type == 'target2'){
  19733. this.$message.success("已经成功停止生成目标")
  19734. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  19735. this.isTargetCancelToken2 = null;
  19736. this.targetTextLoading2 = false
  19737. this.ttargetTextLoading2 = false
  19738. if(this.isTargetCancelSource2){
  19739. this.isTargetCancelSource2.close()
  19740. this.isTargetCancelSource2 = null
  19741. }
  19742. this.$nextTick(() => {
  19743. const targetDiv = this.$refs.aitargetTextDetail3;
  19744. if (targetDiv) {
  19745. targetDiv.scrollIntoView();
  19746. }
  19747. });
  19748. }
  19749. if(this.isTargetCancelToken1 && type == 'target1'){
  19750. this.$message.success("已经成功停止生成目标")
  19751. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  19752. this.isTargetCancelToken1 = null;
  19753. this.targetTextLoading = false
  19754. this.ttargetTextLoading = false
  19755. if(this.isTargetCancelSource1){
  19756. this.isTargetCancelSource1.close()
  19757. this.isTargetCancelSource1 = null
  19758. }
  19759. }
  19760. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  19761. this.$message.success("已经成功停止提取摘要")
  19762. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  19763. this.isTeacherTextCancelToken = null;
  19764. this.teacherTextLoading = false
  19765. this.tteacherTextLoading = false
  19766. if(this.isTeacherTextCancelSource){
  19767. this.isTeacherTextCancelSource.close()
  19768. this.isTeacherTextCancelSource = null
  19769. }
  19770. }
  19771. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  19772. this.$message.success("已经成功停止生成教案")
  19773. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  19774. this.isTeacherTaskCancelToken = null;
  19775. this.loading = false
  19776. }
  19777. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  19778. this.$message.success("已经成功停止生成大纲")
  19779. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  19780. this.isOutlineTaskCancelToken[index] = null;
  19781. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  19782. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  19783. if(this.isOutlineTaskCancelSource[index]){
  19784. this.isOutlineTaskCancelSource[index].close()
  19785. this.isOutlineTaskCancelSource[index] = null
  19786. }
  19787. }
  19788. if(type == 'teacherDetail2'){
  19789. this.$message.success("已经成功停止生成教案")
  19790. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  19791. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  19792. this.isTeacherTaskCancelToken2[index] = null;
  19793. }
  19794. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  19795. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  19796. }
  19797. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  19798. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  19799. }
  19800. if(this.isTeacherTaskCancelSource[index]){
  19801. this.isTeacherTaskCancelSource[index].close()
  19802. this.isTeacherTaskCancelSource[index] = null
  19803. }
  19804. }
  19805. if(type == 'aiTaskGL1'){
  19806. this.$message.success("已经成功停止生成任务概述")
  19807. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  19808. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  19809. this.taskCancelToken1[index] = null;
  19810. }
  19811. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  19812. this.taskGLoading[index][0] = false
  19813. }
  19814. if(this.isTaskCancelSource1[index]){
  19815. this.isTaskCancelSource1[index].close()
  19816. this.isTaskCancelSource1[index] = null
  19817. }
  19818. setTimeout(() => {
  19819. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  19820. this.cancelAjax('aiTaskGL2', index)
  19821. }
  19822. }, 1000)
  19823. this.$forceUpdate()
  19824. }
  19825. if(type == 'aiTaskGL2'){
  19826. this.$message.success("已经成功停止生成任务工具")
  19827. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  19828. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  19829. this.taskCancelToken2[index] = null;
  19830. }
  19831. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  19832. this.taskGLoading[index][1] = false
  19833. }
  19834. this.$forceUpdate()
  19835. }
  19836. if(type == 'taskAn'){
  19837. this.$message.success("已经成功停止生成任务概述")
  19838. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  19839. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  19840. this.taskAnCancelToken[index] = null;
  19841. }
  19842. if(this.taskAnLoading[index]){
  19843. this.taskAnLoading[index] = false
  19844. }
  19845. this.$forceUpdate()
  19846. }
  19847. if(type == 'findMatchingContents'){
  19848. this.$message.success("已经成功停止检索资料")
  19849. if(this.isfindMatchingContents){
  19850. this.isfindMatchingContents.cancel('Request canceled by the user.');
  19851. this.isfindMatchingContents = null;
  19852. }
  19853. if(this.knowInfoDataLoading){
  19854. this.knowInfoDataLoading = false
  19855. }
  19856. if(this.findMatchingContentsPage > 1){
  19857. this.findMatchingContentsPage --
  19858. }
  19859. this.$forceUpdate()
  19860. }
  19861. },
  19862. async aiGetTask2(messages, callback) {
  19863. let _this = this
  19864. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19865. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19866. if (_this.infoData.length) {
  19867. for (var i = 0; i < _this.infoData.length; i++) {
  19868. if(_this.infoData[i].fileid){
  19869. fileid.push(_this.infoData[i].fileid)
  19870. }else {
  19871. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19872. if(_fileid){
  19873. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19874. _this.$forceUpdate();
  19875. if(_fileid != 1){
  19876. fileid.push(_fileid)
  19877. }
  19878. }
  19879. }
  19880. }
  19881. }
  19882. console.log('fileid=========',fileid)
  19883. // let params = JSON.stringify({
  19884. // // "model": "Chat",
  19885. // model: 'gpt-3.5-turbo',
  19886. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19887. // max_tokens: 4096,
  19888. // top_p: 1,
  19889. // frequency_penalty: 0,
  19890. // presence_penalty: 0,
  19891. // messages: [{
  19892. // content: messages,
  19893. // role: 'user'
  19894. // }],
  19895. // stream: false,
  19896. // uid: this.userid,
  19897. // mind_map_question: "",
  19898. // })
  19899. // // let params = JSON.stringify({
  19900. // // message: {
  19901. // // anthropic_version: "bedrock-2023-05-31",
  19902. // // max_tokens: 4096,
  19903. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19904. // // top_p: 1,
  19905. // // messages: [{
  19906. // // content: messages,
  19907. // // role: 'user'
  19908. // // }], //
  19909. // // },
  19910. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19911. // // });
  19912. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19913. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19914. // console.log(response);
  19915. // let data = response.data.FunctionResponse
  19916. // if (data.choices && data.choices.length && data.choices[0].message) {
  19917. // console.log(data.choices[0].message.content);
  19918. // let dArray = JSON.parse(data.choices[0].message.content)
  19919. // _this.dArray = dArray
  19920. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19921. // for (var i = 0; i < dArray.length; i++) {
  19922. // let _task = dArray[i]
  19923. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19924. // task: _task.task,
  19925. // taskDetail: "",
  19926. // taskDetail2: _task.detail,
  19927. // taskDetail3: "",
  19928. // chapterData: [],
  19929. // toolText: "",
  19930. // toolChoose: [
  19931. // {
  19932. // tool: [],
  19933. // toolDetail: "",
  19934. // toolType: 0,
  19935. // askCount: 1,
  19936. // askTitle: "",
  19937. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19938. // },
  19939. // ],
  19940. // isShowTools: false,
  19941. // askCount: 1,
  19942. // isFold: 0,
  19943. // askTitle: "",
  19944. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19945. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19946. // homeworkList: [],
  19947. // })
  19948. // }
  19949. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19950. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19951. // _this.$forceUpdate();
  19952. // }
  19953. // // if (data.result) {
  19954. // // console.log(data.result);
  19955. // // let dArray = JSON.parse(data.result)
  19956. // // _this.dArray = dArray
  19957. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19958. // // for (var i = 0; i < dArray.length; i++) {
  19959. // // let _task = dArray[i]
  19960. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19961. // // task: _task.task,
  19962. // // taskDetail: "",
  19963. // // taskDetail2: _task.detail,
  19964. // // taskDetail3: "",
  19965. // // chapterData: [],
  19966. // // toolText: "",
  19967. // // toolChoose: [
  19968. // // {
  19969. // // tool: [],
  19970. // // toolDetail: "",
  19971. // // toolType: 0,
  19972. // // askCount: 1,
  19973. // // askTitle: "",
  19974. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19975. // // },
  19976. // // ],
  19977. // // isShowTools: false,
  19978. // // askCount: 1,
  19979. // // isFold: 1,
  19980. // // askTitle: "",
  19981. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19982. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19983. // // homeworkList: [],
  19984. // // })
  19985. // // }
  19986. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19987. // // _this.$forceUpdate();
  19988. // // }
  19989. // callback ? callback() : ''
  19990. // }).catch(function (error) {
  19991. // _this.loading = false
  19992. // console.log(error);
  19993. // });
  19994. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19995. let parm = {
  19996. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19997. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19998. session_name: uuidv4(),
  19999. userId: this.userid,
  20000. file_ids: fileid.length ? [...fileid] : '',
  20001. model: 'gpt-4o-2024-11-20',
  20002. temperature: this.mode == 3 ? 0.5 : 0.1,
  20003. }
  20004. this.ajax
  20005. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  20006. .then((response) => {
  20007. console.log(response);
  20008. let data = response.data.FunctionResponse
  20009. if (data.message) {
  20010. console.log(data.message);
  20011. let dArray = {}
  20012. try {
  20013. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20014. } catch (error) {
  20015. console.log("error_________________" + error);
  20016. try {
  20017. let regex = new RegExp(/```json([\s\S]*?)```/);
  20018. let match = data.message.match(regex);
  20019. dArray = JSON.parse(match[1]);
  20020. // var message = data.message;
  20021. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20022. // var jsonEnd = message.indexOf("```", jsonStart);
  20023. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20024. // dArray = JSON.parse(jsonString);
  20025. } catch (error) {
  20026. try {
  20027. let regex = new RegExp(/```json([\s\S]*?)```/);
  20028. let match = data.message.match(regex);
  20029. // eval("var aaa = " + match[0])
  20030. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20031. } catch (error) {
  20032. console.log("error_________________" + error);
  20033. }
  20034. console.log("error_________________" + error);
  20035. }
  20036. }
  20037. _this.dArray = dArray
  20038. if(_this.panOutline() > 0){
  20039. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20040. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20041. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  20042. }
  20043. for (var i = 0; i < dArray.length; i++) {
  20044. let _task = dArray[i]
  20045. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20046. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  20047. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20048. }else {
  20049. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20050. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20051. taskDetail: "",
  20052. taskDetail2: "",
  20053. taskDetail3: "",
  20054. chapterData: [],
  20055. toolText: "",
  20056. toolChoose: [
  20057. {
  20058. tool: [],
  20059. toolDetail: "",
  20060. toolType: 0,
  20061. askCount: 1,
  20062. askTitle: "",
  20063. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20064. },
  20065. ],
  20066. isShowTools: false,
  20067. askCount: 1,
  20068. isFold: 0,
  20069. askTitle: "",
  20070. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20071. checkJson: [{ checkCount: [], checkPerent: [] }],
  20072. homeworkList: [],
  20073. })
  20074. }
  20075. }
  20076. }else {
  20077. _this.unitJson[0].chapterInfo[0].taskJson = []
  20078. for (var i = 0; i < dArray.length; i++) {
  20079. let _task = dArray[i]
  20080. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20081. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20082. taskDetail: "",
  20083. taskDetail2: "",
  20084. taskDetail3: "",
  20085. chapterData: [],
  20086. toolText: "",
  20087. toolChoose: [
  20088. {
  20089. tool: [],
  20090. toolDetail: "",
  20091. toolType: 0,
  20092. askCount: 1,
  20093. askTitle: "",
  20094. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20095. },
  20096. ],
  20097. isShowTools: false,
  20098. askCount: 1,
  20099. isFold: 0,
  20100. askTitle: "",
  20101. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20102. checkJson: [{ checkCount: [], checkPerent: [] }],
  20103. homeworkList: [],
  20104. })
  20105. }
  20106. }
  20107. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20108. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20109. _this.$forceUpdate();
  20110. _this.saveCourse()
  20111. setTimeout(()=>{
  20112. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20113. this.aiOutlineDetail('', i)
  20114. }
  20115. }, 0)
  20116. }
  20117. callback ? callback() : ''
  20118. _this.isOutlineCancelToken = null
  20119. })
  20120. .catch((error) => {
  20121. _this.loading = false
  20122. _this.isOutlineCancelToken = null
  20123. console.log(error);
  20124. });
  20125. },
  20126. async aiGetTask3(messages, callback) {
  20127. let _this = this
  20128. // let params = JSON.stringify({
  20129. // // "model": "Chat",
  20130. // model: 'gpt-3.5-turbo',
  20131. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20132. // max_tokens: 4096,
  20133. // top_p: 1,
  20134. // frequency_penalty: 0,
  20135. // presence_penalty: 0,
  20136. // messages: [{
  20137. // content: messages,
  20138. // role: 'user'
  20139. // }],
  20140. // stream: false,
  20141. // uid: this.userid,
  20142. // mind_map_question: "",
  20143. // })
  20144. // // let params = JSON.stringify({
  20145. // // message: {
  20146. // // anthropic_version: "bedrock-2023-05-31",
  20147. // // max_tokens: 4096,
  20148. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20149. // // top_p: 1,
  20150. // // messages: [{
  20151. // // content: messages,
  20152. // // role: 'user'
  20153. // // }], //
  20154. // // },
  20155. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20156. // // });
  20157. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20158. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20159. // console.log(response);
  20160. // let data = response.data.FunctionResponse
  20161. // if (data.choices && data.choices.length && data.choices[0].message) {
  20162. // console.log(data.choices[0].message.content);
  20163. // let dArray = JSON.parse(data.choices[0].message.content)
  20164. // _this.dArray = dArray
  20165. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20166. // for (var i = 0; i < dArray.length; i++) {
  20167. // let _task = dArray[i]
  20168. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20169. // task: _task.task,
  20170. // taskDetail: "",
  20171. // taskDetail2: _task.detail,
  20172. // taskDetail3: "",
  20173. // chapterData: [],
  20174. // toolText: "",
  20175. // toolChoose: [
  20176. // {
  20177. // tool: [],
  20178. // toolDetail: "",
  20179. // toolType: 0,
  20180. // askCount: 1,
  20181. // askTitle: "",
  20182. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20183. // },
  20184. // ],
  20185. // isShowTools: false,
  20186. // askCount: 1,
  20187. // isFold: 0,
  20188. // askTitle: "",
  20189. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20190. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20191. // homeworkList: [],
  20192. // })
  20193. // }
  20194. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20195. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20196. // _this.$forceUpdate();
  20197. // }
  20198. // // if (data.result) {
  20199. // // console.log(data.result);
  20200. // // let dArray = JSON.parse(data.result)
  20201. // // _this.dArray = dArray
  20202. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20203. // // for (var i = 0; i < dArray.length; i++) {
  20204. // // let _task = dArray[i]
  20205. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20206. // // task: _task.task,
  20207. // // taskDetail: "",
  20208. // // taskDetail2: _task.detail,
  20209. // // taskDetail3: "",
  20210. // // chapterData: [],
  20211. // // toolText: "",
  20212. // // toolChoose: [
  20213. // // {
  20214. // // tool: [],
  20215. // // toolDetail: "",
  20216. // // toolType: 0,
  20217. // // askCount: 1,
  20218. // // askTitle: "",
  20219. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20220. // // },
  20221. // // ],
  20222. // // isShowTools: false,
  20223. // // askCount: 1,
  20224. // // isFold: 1,
  20225. // // askTitle: "",
  20226. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20227. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20228. // // homeworkList: [],
  20229. // // })
  20230. // // }
  20231. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20232. // // _this.$forceUpdate();
  20233. // // }
  20234. // callback ? callback() : ''
  20235. // }).catch(function (error) {
  20236. // _this.loading = false
  20237. // console.log(error);
  20238. // });
  20239. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  20240. let parm = {
  20241. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20242. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20243. session_name: uuidv4(),
  20244. userId: this.userid,
  20245. file_ids: '',
  20246. model: 'gpt-4o-2024-11-20',
  20247. temperature: this.mode == 3 ? 0.5 : 0.1,
  20248. }
  20249. this.ajax
  20250. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  20251. .then((response) => {
  20252. console.log(response);
  20253. let data = response.data.FunctionResponse
  20254. if (data.message) {
  20255. console.log(data.message);
  20256. let dArray = {}
  20257. try {
  20258. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20259. } catch (error) {
  20260. console.log("error_________________" + error);
  20261. try {
  20262. let regex = new RegExp(/```json([\s\S]*?)```/);
  20263. let match = data.message.match(regex);
  20264. dArray = JSON.parse(match[1]);
  20265. // var message = data.message;
  20266. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20267. // var jsonEnd = message.indexOf("```", jsonStart);
  20268. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20269. // dArray = JSON.parse(jsonString);
  20270. } catch (error) {
  20271. try {
  20272. let regex = new RegExp(/```json([\s\S]*?)```/);
  20273. let match = data.message.match(regex);
  20274. // eval("var aaa = " + match[0])
  20275. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20276. } catch (error) {
  20277. console.log("error_________________" + error);
  20278. }
  20279. console.log("error_________________" + error);
  20280. }
  20281. }
  20282. _this.dArray = dArray
  20283. if(_this.panOutline() > 0){
  20284. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20285. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20286. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  20287. }
  20288. for (var i = 0; i < dArray.length; i++) {
  20289. let _task = dArray[i]
  20290. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20291. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  20292. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20293. }else {
  20294. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20295. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20296. taskDetail: "",
  20297. taskDetail2: "",
  20298. taskDetail3: "",
  20299. chapterData: [],
  20300. toolText: "",
  20301. toolChoose: [
  20302. {
  20303. tool: [],
  20304. toolDetail: "",
  20305. toolType: 0,
  20306. askCount: 1,
  20307. askTitle: "",
  20308. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20309. },
  20310. ],
  20311. isShowTools: false,
  20312. askCount: 1,
  20313. isFold: 0,
  20314. askTitle: "",
  20315. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20316. checkJson: [{ checkCount: [], checkPerent: [] }],
  20317. homeworkList: [],
  20318. })
  20319. }
  20320. }
  20321. }else {
  20322. _this.unitJson[0].chapterInfo[0].taskJson = []
  20323. for (var i = 0; i < dArray.length; i++) {
  20324. let _task = dArray[i]
  20325. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20326. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20327. taskDetail: "",
  20328. taskDetail2: "",
  20329. taskDetail3: "",
  20330. chapterData: [],
  20331. toolText: "",
  20332. toolChoose: [
  20333. {
  20334. tool: [],
  20335. toolDetail: "",
  20336. toolType: 0,
  20337. askCount: 1,
  20338. askTitle: "",
  20339. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20340. },
  20341. ],
  20342. isShowTools: false,
  20343. askCount: 1,
  20344. isFold: 0,
  20345. askTitle: "",
  20346. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20347. checkJson: [{ checkCount: [], checkPerent: [] }],
  20348. homeworkList: [],
  20349. })
  20350. }
  20351. }
  20352. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20353. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20354. _this.$forceUpdate();
  20355. _this.saveCourse()
  20356. // setTimeout(()=>{
  20357. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20358. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  20359. // }
  20360. // }, 0)
  20361. setTimeout(()=>{
  20362. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20363. const _tindex = 'task-' + i;
  20364. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20365. _this.taskDetailLoading5.push(_tindex)
  20366. }
  20367. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  20368. _this.ttaskDetailLoading5.push(_tindex)
  20369. }
  20370. }
  20371. let ij = 0;
  20372. function processNext() {
  20373. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  20374. const _tindex = 'task-' + ij;
  20375. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20376. ij++;
  20377. processNext();
  20378. return;
  20379. }
  20380. // 处理当前任务
  20381. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  20382. // 回调函数,当前任务完成后执行
  20383. ij++;
  20384. processNext(); // 处理下一个任务
  20385. });
  20386. }
  20387. }
  20388. processNext(); // 启动处理
  20389. }, 0)
  20390. }
  20391. callback ? callback() : ''
  20392. _this.isTeacherTaskCancelToken = null
  20393. })
  20394. .catch((error) => {
  20395. _this.loading = false
  20396. _this.isTeacherTaskCancelToken = null
  20397. console.log(error);
  20398. });
  20399. },
  20400. async aiGet3(messages, callback) {
  20401. let _this = this
  20402. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20403. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20404. if (_this.infoData.length) {
  20405. for (var i = 0; i < _this.infoData.length; i++) {
  20406. if(_this.infoData[i].fileid){
  20407. fileid.push(_this.infoData[i].fileid)
  20408. }else {
  20409. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20410. if(_fileid){
  20411. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20412. _this.$forceUpdate();
  20413. if(_fileid != 1){
  20414. fileid.push(_fileid)
  20415. }
  20416. }
  20417. }
  20418. }
  20419. }
  20420. // let params = JSON.stringify({
  20421. // // "model": "Chat",
  20422. // model: 'gpt-3.5-turbo',
  20423. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20424. // max_tokens: 4096,
  20425. // top_p: 1,
  20426. // frequency_penalty: 0,
  20427. // presence_penalty: 0,
  20428. // messages: [{
  20429. // content: messages,
  20430. // role: 'user'
  20431. // }],
  20432. // stream: false,
  20433. // uid: this.userid,
  20434. // mind_map_question: "",
  20435. // })
  20436. // // let params = JSON.stringify({
  20437. // // message: {
  20438. // // anthropic_version: "bedrock-2023-05-31",
  20439. // // max_tokens: 4096,
  20440. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20441. // // top_p: 1,
  20442. // // messages: [{
  20443. // // content: messages,
  20444. // // role: 'user'
  20445. // // }], //
  20446. // // },
  20447. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20448. // // });
  20449. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20450. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20451. // console.log(response);
  20452. // let data = response.data.FunctionResponse
  20453. // if (data.choices && data.choices.length && data.choices[0].message) {
  20454. // console.log(data.choices[0].message.content);
  20455. // let tArray = JSON.parse(data.choices[0].message.content)
  20456. // // _this.unitJson[0].chapterInfo[0].task = []
  20457. // let toolsJson = {
  20458. // "电子白板": { tool: 1, type: 1 },
  20459. // "文档": { tool: 52, type: 1 },
  20460. // "思维导图": { tool: 3, type: 1 },
  20461. // "表格": { tool: 48, type: 1 },
  20462. // "作业提交": { tool: 16, type: 2 }
  20463. // }
  20464. // for (var i = 0; i < tArray.length; i++) {
  20465. // let _task = tArray[i]
  20466. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20467. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20468. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20469. // if (_task.toolChoose.length) {
  20470. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20471. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20472. // {
  20473. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20474. // toolDetail: _task.toolChoose[j].detail,
  20475. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20476. // askCount: 1,
  20477. // askTitle: "",
  20478. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20479. // },
  20480. // )
  20481. // }
  20482. // } else {
  20483. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20484. // {
  20485. // tool: [],
  20486. // toolDetail: "",
  20487. // toolType: 0,
  20488. // askCount: 1,
  20489. // askTitle: "",
  20490. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20491. // },
  20492. // )
  20493. // }
  20494. // }
  20495. // // if (_this.infoData.length) {
  20496. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20497. // // }
  20498. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20499. // _this.$forceUpdate();
  20500. // }
  20501. // // if (data.result) {
  20502. // // console.log(data.result);
  20503. // // let tArray = JSON.parse(data.result)
  20504. // // // _this.unitJson[0].chapterInfo[0].task = []
  20505. // // let toolsJson = {
  20506. // // "电子白板": { tool: 1, type: 1 },
  20507. // // "文档": { tool: 52, type: 1 },
  20508. // // "思维导图": { tool: 3, type: 1 },
  20509. // // "表格": { tool: 48, type: 1 },
  20510. // // "作业提交": { tool: 16, type: 2 }
  20511. // // }
  20512. // // for (var i = 0; i < tArray.length; i++) {
  20513. // // let _task = tArray[i]
  20514. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20515. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20516. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20517. // // if (_task.toolChoose.length) {
  20518. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20519. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20520. // // {
  20521. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20522. // // toolDetail: _task.toolChoose[j].detail,
  20523. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20524. // // askCount: 1,
  20525. // // askTitle: "",
  20526. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20527. // // },
  20528. // // )
  20529. // // }
  20530. // // } else {
  20531. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20532. // // {
  20533. // // tool: [],
  20534. // // toolDetail: "",
  20535. // // toolType: 0,
  20536. // // askCount: 1,
  20537. // // askTitle: "",
  20538. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20539. // // },
  20540. // // )
  20541. // // }
  20542. // // }
  20543. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20544. // // _this.$forceUpdate();
  20545. // // }
  20546. // callback ? callback() : ''
  20547. // }).catch(function (error) {
  20548. // _this.loading = false
  20549. // console.log(error);
  20550. // });
  20551. let parm = {
  20552. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20553. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20554. session_name: uuidv4(),
  20555. userId: this.userid,
  20556. file_ids: fileid.length ? [...fileid] : '',
  20557. model: 'gpt-4o-2024-11-20',
  20558. temperature: this.mode == 3 ? 0.5 : 0.1,
  20559. }
  20560. this.ajax
  20561. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20562. .then(async (response) => {
  20563. console.log(response);
  20564. let data = response.data.FunctionResponse
  20565. if (data.message) {
  20566. console.log(data.message);
  20567. let tArray = {}
  20568. try {
  20569. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20570. } catch (error) {
  20571. console.log("error_________________" + error);
  20572. try {
  20573. let regex = new RegExp(/```json([\s\S]*?)```/);
  20574. let match = data.message.match(regex);
  20575. tArray = JSON.parse(match[1]);
  20576. // var message = data.message;
  20577. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20578. // var jsonEnd = message.indexOf("```", jsonStart);
  20579. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20580. // tArray = JSON.parse(jsonString);
  20581. } catch (error) {
  20582. try {
  20583. let regex = new RegExp(/```json([\s\S]*?)```/);
  20584. let match = data.message.match(regex);
  20585. // eval("var aaa = " + match[0])
  20586. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20587. } catch (error) {
  20588. console.log("error_________________" + error);
  20589. }
  20590. console.log("error_________________" + error);
  20591. }
  20592. }
  20593. let toolsJson = {
  20594. "电子白板": { tool: 1, type: 1 },
  20595. "文档": { tool: 52, type: 1 },
  20596. "思维导图": { tool: 3, type: 1 },
  20597. "表格": { tool: 48, type: 1 },
  20598. "作业提交": { tool: 16, type: 2 },
  20599. "问答": { tool: 15, type: 2 },
  20600. "选择题": { tool: 45, type: 2 },
  20601. }
  20602. // answerQ:"sssssssssssssss"
  20603. for (var i = 0; i < tArray.length; i++) {
  20604. let _task = tArray[i]
  20605. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20606. _task.elist = _task.elist.filter(el=>{
  20607. el.isai = "1"
  20608. return el
  20609. })
  20610. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20611. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20612. if (_task.toolChoose.length) {
  20613. for (var j = 0; j < _task.toolChoose.length; j++) {
  20614. let _json = {
  20615. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  20616. toolDetail: _task.toolChoose[j].detail,
  20617. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20618. askCount: 1,
  20619. askTitle: "",
  20620. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20621. }
  20622. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  20623. let answerQ = await _this.aiCreateQuestion(15, i)
  20624. _json.answerQ = answerQ.answerQ
  20625. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  20626. let testJson = await _this.aiCreateQuestion(45, i)
  20627. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20628. }
  20629. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  20630. }
  20631. } else {
  20632. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20633. {
  20634. tool: [],
  20635. toolDetail: "",
  20636. toolType: 0,
  20637. askCount: 1,
  20638. askTitle: "",
  20639. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20640. },
  20641. )
  20642. }
  20643. }
  20644. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20645. _this.$forceUpdate();
  20646. _this.createTeacherAn();
  20647. }
  20648. callback ? callback() : ''
  20649. })
  20650. .catch((error) => {
  20651. _this.loading = false
  20652. console.log(error);
  20653. });
  20654. },
  20655. async aiGet32(messages, index) {
  20656. let _this = this
  20657. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20658. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20659. if (_this.infoData.length) {
  20660. for (var i = 0; i < _this.infoData.length; i++) {
  20661. if(_this.infoData[i].fileid){
  20662. fileid.push(_this.infoData[i].fileid)
  20663. }else {
  20664. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20665. if(_fileid){
  20666. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20667. _this.$forceUpdate();
  20668. if(_fileid != 1){
  20669. fileid.push(_fileid)
  20670. }
  20671. }
  20672. }
  20673. }
  20674. }
  20675. // let params = JSON.stringify({
  20676. // // "model": "Chat",
  20677. // model: 'gpt-3.5-turbo',
  20678. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20679. // max_tokens: 4096,
  20680. // top_p: 1,
  20681. // frequency_penalty: 0,
  20682. // presence_penalty: 0,
  20683. // messages: [{
  20684. // content: messages,
  20685. // role: 'user'
  20686. // }],
  20687. // stream: false,
  20688. // uid: this.userid,
  20689. // mind_map_question: "",
  20690. // })
  20691. // // let params = JSON.stringify({
  20692. // // message: {
  20693. // // anthropic_version: "bedrock-2023-05-31",
  20694. // // max_tokens: 4096,
  20695. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20696. // // top_p: 1,
  20697. // // messages: [{
  20698. // // content: messages,
  20699. // // role: 'user'
  20700. // // }], //
  20701. // // },
  20702. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20703. // // });
  20704. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20705. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20706. // console.log(response);
  20707. // let data = response.data.FunctionResponse
  20708. // if (data.choices && data.choices.length && data.choices[0].message) {
  20709. // console.log(data.choices[0].message.content);
  20710. // let tArray = JSON.parse(data.choices[0].message.content)
  20711. // // _this.unitJson[0].chapterInfo[0].task = []
  20712. // let toolsJson = {
  20713. // "电子白板": { tool: 1, type: 1 },
  20714. // "文档": { tool: 52, type: 1 },
  20715. // "思维导图": { tool: 3, type: 1 },
  20716. // "表格": { tool: 48, type: 1 },
  20717. // "作业提交": { tool: 16, type: 2 }
  20718. // }
  20719. // for (var i = 0; i < tArray.length; i++) {
  20720. // let _task = tArray[i]
  20721. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20722. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20723. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20724. // if (_task.toolChoose.length) {
  20725. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20726. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20727. // {
  20728. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20729. // toolDetail: _task.toolChoose[j].detail,
  20730. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20731. // askCount: 1,
  20732. // askTitle: "",
  20733. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20734. // },
  20735. // )
  20736. // }
  20737. // } else {
  20738. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20739. // {
  20740. // tool: [],
  20741. // toolDetail: "",
  20742. // toolType: 0,
  20743. // askCount: 1,
  20744. // askTitle: "",
  20745. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20746. // },
  20747. // )
  20748. // }
  20749. // }
  20750. // // if (_this.infoData.length) {
  20751. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20752. // // }
  20753. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20754. // _this.$forceUpdate();
  20755. // }
  20756. // // if (data.result) {
  20757. // // console.log(data.result);
  20758. // // let tArray = JSON.parse(data.result)
  20759. // // // _this.unitJson[0].chapterInfo[0].task = []
  20760. // // let toolsJson = {
  20761. // // "电子白板": { tool: 1, type: 1 },
  20762. // // "文档": { tool: 52, type: 1 },
  20763. // // "思维导图": { tool: 3, type: 1 },
  20764. // // "表格": { tool: 48, type: 1 },
  20765. // // "作业提交": { tool: 16, type: 2 }
  20766. // // }
  20767. // // for (var i = 0; i < tArray.length; i++) {
  20768. // // let _task = tArray[i]
  20769. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20770. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20771. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20772. // // if (_task.toolChoose.length) {
  20773. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20774. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20775. // // {
  20776. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20777. // // toolDetail: _task.toolChoose[j].detail,
  20778. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20779. // // askCount: 1,
  20780. // // askTitle: "",
  20781. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20782. // // },
  20783. // // )
  20784. // // }
  20785. // // } else {
  20786. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20787. // // {
  20788. // // tool: [],
  20789. // // toolDetail: "",
  20790. // // toolType: 0,
  20791. // // askCount: 1,
  20792. // // askTitle: "",
  20793. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20794. // // },
  20795. // // )
  20796. // // }
  20797. // // }
  20798. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20799. // // _this.$forceUpdate();
  20800. // // }
  20801. // callback ? callback() : ''
  20802. // }).catch(function (error) {
  20803. // _this.loading = false
  20804. // console.log(error);
  20805. // });
  20806. let parm = {
  20807. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20808. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20809. session_name: uuidv4(),
  20810. userId: this.userid,
  20811. file_ids: fileid.length ? [...fileid] : '',
  20812. model: 'gpt-4o-2024-11-20',
  20813. temperature: this.mode == 3 ? 0.5 : 0.1,
  20814. }
  20815. this.ajax
  20816. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20817. .then(async (response) => {
  20818. console.log(response);
  20819. let data = response.data.FunctionResponse
  20820. if (data.message) {
  20821. console.log(data.message);
  20822. let tArray = {}
  20823. try {
  20824. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20825. } catch (error) {
  20826. console.log("error_________________" + error);
  20827. try {
  20828. let regex = new RegExp(/```json([\s\S]*?)```/);
  20829. let match = data.message.match(regex);
  20830. tArray = JSON.parse(match[1]);
  20831. // var message = data.message;
  20832. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20833. // var jsonEnd = message.indexOf("```", jsonStart);
  20834. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20835. // tArray = JSON.parse(jsonString);
  20836. } catch (error) {
  20837. try {
  20838. let regex = new RegExp(/```json([\s\S]*?)```/);
  20839. let match = data.message.match(regex);
  20840. // eval("var aaa = " + match[0])
  20841. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20842. } catch (error) {
  20843. console.log("error_________________" + error);
  20844. }
  20845. console.log("error_________________" + error);
  20846. }
  20847. }
  20848. let toolsJson = {
  20849. "电子白板": { tool: 1, type: 1 },
  20850. "文档": { tool: 52, type: 1 },
  20851. "思维导图": { tool: 3, type: 1 },
  20852. "表格": { tool: 48, type: 1 },
  20853. "作业提交": { tool: 16, type: 2 },
  20854. "问答": { tool: 15, type: 2 },
  20855. "选择题": { tool: 45, type: 2 },
  20856. }
  20857. // answerQ:"sssssssssssssss"
  20858. // for (var i = 0; i < tArray.length; i++) {
  20859. let _task = tArray
  20860. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  20861. _task.elist = _task.elist.filter(el=>{
  20862. el.isai = 1
  20863. return el
  20864. })
  20865. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  20866. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  20867. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  20868. console.log("error_________________JSON不对重新生成");
  20869. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20870. _this.aiGet32(messages, index)
  20871. return;
  20872. }
  20873. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  20874. if (_task.toolChoose && _task.toolChoose.length) {
  20875. for (var j = 0; j < _task.toolChoose.length; j++) {
  20876. let _json = {
  20877. tool: [],
  20878. toolDetail: _task.toolChoose[j].detail,
  20879. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20880. askCount: 1,
  20881. askTitle: "",
  20882. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20883. }
  20884. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  20885. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  20886. let answerQ = await _this.aiCreateQuestion(15, index)
  20887. // _json.answerQ = answerQ.answerQ
  20888. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  20889. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  20890. let testJson = await _this.aiCreateQuestion(45, index)
  20891. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20892. _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}
  20893. }
  20894. _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]
  20895. _this.$forceUpdate();
  20896. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  20897. }
  20898. } else {
  20899. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  20900. {
  20901. tool: [],
  20902. toolDetail: "",
  20903. toolType: 0,
  20904. askCount: 1,
  20905. askTitle: "",
  20906. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20907. },
  20908. )
  20909. }
  20910. // }
  20911. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20912. _this.$forceUpdate();
  20913. _this.createTeacherAn(index);
  20914. }
  20915. // callback ? callback() : ''
  20916. _this.taskLoading[index] = false
  20917. })
  20918. .catch((error) => {
  20919. // _this.loading = false
  20920. _this.taskLoading[index] = false
  20921. console.log(error);
  20922. });
  20923. },
  20924. async aiGetG321(messages, index, callback, callback2) {
  20925. let _this = this
  20926. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20927. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20928. if (_this.infoData.length) {
  20929. for (var i = 0; i < _this.infoData.length; i++) {
  20930. if(_this.infoData[i].fileid){
  20931. fileid.push(_this.infoData[i].fileid)
  20932. }else {
  20933. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20934. if(_fileid){
  20935. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20936. _this.$forceUpdate();
  20937. if(_fileid != 1){
  20938. fileid.push(_fileid)
  20939. }
  20940. }
  20941. }
  20942. }
  20943. }
  20944. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  20945. let parm = {
  20946. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20947. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20948. session_name: uuidv4(),
  20949. userId: this.userid,
  20950. file_ids: fileid.length ? [...fileid] : '',
  20951. model: 'gpt-4o-2024-11-20',
  20952. temperature: this.mode == 3 ? 0.5 : 0.1,
  20953. }
  20954. this.ajax
  20955. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  20956. .then(async (response) => {
  20957. console.log(response);
  20958. let data = response.data.FunctionResponse
  20959. if (data.message) {
  20960. let tArray = {}
  20961. try {
  20962. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20963. } catch (error) {
  20964. console.log("error_________________" + error);
  20965. try {
  20966. let regex = new RegExp(/```json([\s\S]*?)```/);
  20967. let match = data.message.match(regex);
  20968. tArray = JSON.parse(match[1]);
  20969. } catch (error) {
  20970. try {
  20971. let regex = new RegExp(/```json([\s\S]*?)```/);
  20972. let match = data.message.match(regex);
  20973. // eval("var aaa = " + match[0])
  20974. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20975. } catch (error) {
  20976. console.log("error_________________" + error);
  20977. }
  20978. console.log("error_________________" + error);
  20979. }
  20980. }
  20981. console.log(data.message);
  20982. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  20983. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  20984. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20985. _this.$forceUpdate();
  20986. _this.createTeacherAn(index);
  20987. }
  20988. callback ? callback(callback2) : ''
  20989. _this.taskGLoading[index][0] = false
  20990. _this.taskCancelToken1[index] = null
  20991. _this.$forceUpdate();
  20992. })
  20993. .catch((error) => {
  20994. // _this.loading = false
  20995. callback ? callback(callback2) : ''
  20996. _this.taskGLoading[index][0] = false
  20997. _this.taskCancelToken1[index] = null
  20998. _this.$forceUpdate();
  20999. console.log(error);
  21000. });
  21001. },
  21002. async aiGetG321L(messages, index, callback, callback2) {
  21003. let _this = this
  21004. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21005. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21006. if (_this.infoData.length) {
  21007. for (var i = 0; i < _this.infoData.length; i++) {
  21008. if(_this.infoData[i].fileid){
  21009. fileid.push(_this.infoData[i].fileid)
  21010. }else {
  21011. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21012. if(_fileid){
  21013. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21014. _this.$forceUpdate();
  21015. if(_fileid != 1){
  21016. fileid.push(_fileid)
  21017. }
  21018. }
  21019. }
  21020. }
  21021. }
  21022. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21023. let _uuid = uuidv4();
  21024. let parm = {
  21025. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21026. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21027. session_name: uuidv4(),
  21028. userId: this.userid,
  21029. file_ids: fileid.length ? [...fileid] : '',
  21030. uid: _uuid,
  21031. // model: 'gpt-4o-2024-11-20',
  21032. model: 'gpt-4o-mini',
  21033. temperature: this.mode == 3 ? 0.5 : 0.1,
  21034. }
  21035. this.ajax
  21036. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", parm, _this.taskCancelToken1[index])
  21037. .then(async (response) => {
  21038. console.log(response);
  21039. // }
  21040. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21041. } else {
  21042. _this.$message.warning(response.data.FunctionResponse.result);
  21043. callback ? callback(callback2) : ''
  21044. _this.taskGLoading[index][0] = false
  21045. _this.ttaskGLoading[index][0] = false
  21046. _this.taskCancelToken1[index] = null
  21047. }
  21048. _this.taskCancelToken1[index] = null
  21049. _this.$forceUpdate();
  21050. })
  21051. .catch((error) => {
  21052. // _this.loading = false
  21053. callback ? callback(callback2) : ''
  21054. _this.taskGLoading[index][0] = false
  21055. _this.ttaskGLoading[index][0] = false
  21056. _this.taskCancelToken1[index] = null
  21057. _this.$forceUpdate();
  21058. console.log(error);
  21059. });
  21060. await _this.aiGetG321LgetAiContent(_uuid, index, callback, callback2)
  21061. },
  21062. aiGetG321LgetAiContent(_uid, index, callback, callback2) {
  21063. try {
  21064. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21065. this.isTaskCancelSource1[index] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21066. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21067. } catch(error){
  21068. console.log('EventSource error:', error);
  21069. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21070. callback ? callback(callback2) : ''
  21071. this.taskGLoading[index][0] = false
  21072. this.ttaskGLoading[index][0] = false
  21073. this.taskCancelToken1[index][0] = null
  21074. return;
  21075. }
  21076. let _allText = "";
  21077. let _mdText = "";
  21078. let _iindex = 0
  21079. this.isTaskCancelSource1[index].onmessage = _e => {
  21080. let _eData = JSON.parse(_e.data).content;
  21081. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21082. //对话已经完成
  21083. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21084. callback ? callback(callback2) : ''
  21085. this.isTaskCancelSource1[index].close();
  21086. this.isTaskCancelSource1[index] = null;
  21087. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21088. this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21089. this.createTeacherAn(index);
  21090. this.taskGLoading[index][0] = false
  21091. this.ttaskGLoading[index][0] = false
  21092. this.taskCancelToken1[index][0] = null
  21093. return;
  21094. } else {
  21095. _iindex++
  21096. //对话还在继续
  21097. let _text = "";
  21098. _text = _eData.replaceAll("'", "");
  21099. if (_allText == "") {
  21100. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21101. } else {
  21102. _allText += _text;
  21103. }
  21104. _mdText = _allText + "_";
  21105. _mdText = _mdText.replace(/\\n/g, "\n");
  21106. _mdText = _mdText.replace(/\\/g, "");
  21107. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21108. //转化返回的回复流数据.
  21109. if(_iindex == 10){
  21110. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21111. _iindex = 0
  21112. }
  21113. this.taskGLoading[index][0] = false
  21114. // 处理流数据
  21115. }
  21116. // this.$forceUpdate();
  21117. };
  21118. let _this = this
  21119. this.isTaskCancelSource1[index].onerror = function(event) {
  21120. // 处理错误,可以尝试重新连接
  21121. console.log('EventSource error:', event);
  21122. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21123. callback ? callback(callback2) : ''
  21124. _this.taskGLoading[index][0] = false
  21125. _this.ttaskGLoading[index][0] = false
  21126. _this.isTaskCancelSource1[index].close();
  21127. _this.isTaskCancelSource1[index] = null;
  21128. _this.taskCancelToken1[index][0] = null
  21129. };
  21130. },
  21131. async aiGetG322(messages, index, callback) {
  21132. let _this = this
  21133. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21134. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21135. if (_this.infoData.length) {
  21136. for (var i = 0; i < _this.infoData.length; i++) {
  21137. if(_this.infoData[i].fileid){
  21138. fileid.push(_this.infoData[i].fileid)
  21139. }else {
  21140. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21141. if(_fileid){
  21142. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21143. _this.$forceUpdate();
  21144. if(_fileid != 1){
  21145. fileid.push(_fileid)
  21146. }
  21147. }
  21148. }
  21149. }
  21150. }
  21151. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  21152. let parm = {
  21153. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21154. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21155. session_name: uuidv4(),
  21156. userId: this.userid,
  21157. file_ids: fileid.length ? [...fileid] : '',
  21158. model: 'gpt-4o-2024-11-20',
  21159. temperature: this.mode == 3 ? 0.5 : 0.1,
  21160. }
  21161. this.ajax
  21162. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  21163. .then(async (response) => {
  21164. console.log(response);
  21165. let data = response.data.FunctionResponse
  21166. if (data.message) {
  21167. console.log(data.message);
  21168. let tArray = {}
  21169. try {
  21170. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21171. } catch (error) {
  21172. console.log("error_________________" + error);
  21173. try {
  21174. let regex = new RegExp(/```json([\s\S]*?)```/);
  21175. let match = data.message.match(regex);
  21176. tArray = JSON.parse(match[1]);
  21177. } catch (error) {
  21178. try {
  21179. let regex = new RegExp(/```json([\s\S]*?)```/);
  21180. let match = data.message.match(regex);
  21181. // eval("var aaa = " + match[0])
  21182. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21183. } catch (error) {
  21184. console.log("error_________________" + error);
  21185. }
  21186. console.log("error_________________" + error);
  21187. }
  21188. }
  21189. let toolsJson = {
  21190. "电子白板": { tool: 1, type: 1 },
  21191. "文档": { tool: 52, type: 1 },
  21192. "思维导图": { tool: 3, type: 1 },
  21193. "表格": { tool: 48, type: 1 },
  21194. "作业提交": { tool: 16, type: 2 },
  21195. "问答": { tool: 15, type: 2 },
  21196. "选择题": { tool: 45, type: 2 },
  21197. }
  21198. if(_this.languageSetting == 1){
  21199. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  21200. }else if(_this.languageSetting == 2){
  21201. toolsJson = {
  21202. "Mind Map Tool": { tool: 1, type: 1 },
  21203. "Document tool": { tool: 52, type: 1 },
  21204. "Diagram Tool": { tool: 3, type: 1 },
  21205. "Spreadsheet tool": { tool: 48, type: 1 },
  21206. "作业提交": { tool: 16, type: 2 },
  21207. "Q&A Tool": { tool: 15, type: 2 },
  21208. "Choice tool": { tool: 45, type: 2 },
  21209. }
  21210. }
  21211. let _task = tArray
  21212. if(!_task.toolChoose){
  21213. console.log("error_________________JSON不对重新生成");
  21214. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21215. _this.aiGetG322(messages, index)
  21216. return;
  21217. }
  21218. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21219. if (_task.toolChoose && _task.toolChoose.length) {
  21220. for (var j = 0; j < _task.toolChoose.length; j++) {
  21221. let _json = {
  21222. tool: [],
  21223. toolDetail: _task.toolChoose[j].detail,
  21224. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21225. askCount: 1,
  21226. askTitle: "",
  21227. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21228. }
  21229. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21230. if(converter(_task.toolChoose[j].tool) == converter('问答') || _task.toolChoose[j].tool == 'Q&A Tool'){
  21231. let answerQ = await _this.aiCreateQuestion(15, index)
  21232. // _json.answerQ = answerQ.answerQ
  21233. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21234. }else if(converter(_task.toolChoose[j].tool) == converter('选择题') || _task.toolChoose[j].tool == 'Choice tool'){
  21235. let testJson = await _this.aiCreateQuestion(45, index)
  21236. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21237. _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}
  21238. }
  21239. _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]
  21240. _this.$forceUpdate();
  21241. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21242. }
  21243. } else {
  21244. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21245. {
  21246. tool: [],
  21247. toolDetail: "",
  21248. toolType: 0,
  21249. askCount: 1,
  21250. askTitle: "",
  21251. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21252. },
  21253. )
  21254. }
  21255. //
  21256. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21257. _this.$forceUpdate();
  21258. // _this.$nextTick(()=>{
  21259. // setTimeout(() => {
  21260. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21261. // if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  21262. // _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  21263. // }
  21264. // }
  21265. // }, 2000);
  21266. // })
  21267. }
  21268. callback ? callback() : ''
  21269. _this.taskGLoading[index][1] = false
  21270. _this.taskCancelToken2[index] = null
  21271. _this.$forceUpdate();
  21272. })
  21273. .catch((error) => {
  21274. // _this.loading = false
  21275. callback ? callback() : ''
  21276. _this.taskGLoading[index][1] = false
  21277. _this.taskCancelToken2[index] = null
  21278. _this.$forceUpdate();
  21279. console.log(error);
  21280. });
  21281. },
  21282. async aiGetG323(messages, index) {
  21283. let _this = this
  21284. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21285. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21286. if (_this.infoData.length) {
  21287. for (var i = 0; i < _this.infoData.length; i++) {
  21288. if(_this.infoData[i].fileid){
  21289. fileid.push(_this.infoData[i].fileid)
  21290. }else {
  21291. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21292. if(_fileid){
  21293. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21294. _this.$forceUpdate();
  21295. if(_fileid != 1){
  21296. fileid.push(_fileid)
  21297. }
  21298. }
  21299. }
  21300. }
  21301. }
  21302. let parm = {
  21303. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21304. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21305. session_name: uuidv4(),
  21306. userId: this.userid,
  21307. file_ids: fileid.length ? [...fileid] : '',
  21308. model: 'gpt-4o-2024-11-20',
  21309. temperature: this.mode == 3 ? 0.5 : 0.1,
  21310. }
  21311. this.ajax
  21312. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21313. .then(async (response) => {
  21314. console.log(response);
  21315. let data = response.data.FunctionResponse
  21316. if (data.message) {
  21317. console.log(data.message);
  21318. let tArray = {}
  21319. try {
  21320. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21321. } catch (error) {
  21322. console.log("error_________________" + error);
  21323. try {
  21324. let regex = new RegExp(/```json([\s\S]*?)```/);
  21325. let match = data.message.match(regex);
  21326. tArray = JSON.parse(match[1]);
  21327. } catch (error) {
  21328. try {
  21329. let regex = new RegExp(/```json([\s\S]*?)```/);
  21330. let match = data.message.match(regex);
  21331. // eval("var aaa = " + match[0])
  21332. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21333. } catch (error) {
  21334. console.log("error_________________" + error);
  21335. }
  21336. console.log("error_________________" + error);
  21337. }
  21338. }
  21339. let _task = tArray
  21340. if(!_task.elist){
  21341. console.log("error_________________JSON不对重新生成");
  21342. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21343. _this.aiGetG322(messages, index)
  21344. return;
  21345. }
  21346. _task.elist = _task.elist.filter(el=>{
  21347. el.isai = "1"
  21348. return el
  21349. })
  21350. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21351. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21352. _this.$forceUpdate();
  21353. }
  21354. // callback ? callback() : ''
  21355. _this.taskGLoading[index][2] = false
  21356. })
  21357. .catch((error) => {
  21358. // _this.loading = false
  21359. _this.taskGLoading[index][2] = false
  21360. console.log(error);
  21361. });
  21362. },
  21363. async aiCreateQuestion(type, task) {
  21364. let _this = this
  21365. return new Promise((resolve, reject) => {
  21366. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21367. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21368. if (_this.infoData.length) {
  21369. for (var i = 0; i < _this.infoData.length; i++) {
  21370. if(_this.infoData[i].fileid){
  21371. fileid.push(_this.infoData[i].fileid)
  21372. }
  21373. }
  21374. }
  21375. let sub = []
  21376. let mclass = []
  21377. if (this.courseTypeId.length) {
  21378. for (var i = 0; i < this.courseTypeId.length; i++) {
  21379. let _sid = this.courseTypeId[i]
  21380. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21381. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21382. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21383. }
  21384. }
  21385. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21386. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21387. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21388. }
  21389. }
  21390. }
  21391. }
  21392. let messages = ""
  21393. if(type == 15){
  21394. messages = `NOTICE
  21395. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21396. Language: ${this.getLang()}
  21397. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21398. Instruction: Based on the context, follow "Format example", write content.
  21399. # Context
  21400. ## 任务
  21401. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21402. ## 限制
  21403. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21404. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21405. ## 课程简介
  21406. 课程名字:${_this.courseName}
  21407. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21408. ${sub.length ? '学科:' + sub.join(",") : ''}
  21409. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21410. ## 教案
  21411. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21412. # Format example
  21413. {"answerQ":"问题"}
  21414. `
  21415. }else if(type == 45){
  21416. messages = `NOTICE
  21417. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21418. Language: ${this.getLang()}
  21419. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21420. Instruction: Based on the context, follow "Format example", write content.
  21421. # Context
  21422. ## 任务
  21423. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21424. ## 限制
  21425. - 生成题目禁止重复。
  21426. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21427. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21428. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21429. ## 课程简介
  21430. 课程名字:${_this.courseName}
  21431. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21432. ${sub.length ? '学科:' + sub.join(",") : ''}
  21433. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21434. ## 教案
  21435. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21436. # Format example
  21437. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21438. `
  21439. }
  21440. let parm = {
  21441. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21442. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21443. session_name: uuidv4(),
  21444. userId: this.userid,
  21445. file_ids: fileid.length ? [...fileid] : '',
  21446. model: 'gpt-4o-2024-11-20',
  21447. temperature: this.mode == 3 ? 0.5 : 0.1,
  21448. }
  21449. this.ajax
  21450. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21451. .then((response) => {
  21452. console.log(response);
  21453. let data = response.data.FunctionResponse
  21454. if (data.message) {
  21455. console.log(data.message);
  21456. try {
  21457. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21458. let tArray = {}
  21459. try {
  21460. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21461. } catch (error) {
  21462. console.log("error_________________" + error);
  21463. try {
  21464. let regex = new RegExp(/```json([\s\S]*?)```/);
  21465. let match = data.message.match(regex);
  21466. tArray = JSON.parse(match[1]);
  21467. // var message = data.message;
  21468. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21469. // var jsonEnd = message.indexOf("```", jsonStart);
  21470. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21471. // tArray = JSON.parse(jsonString);
  21472. } catch (error) {
  21473. try {
  21474. let regex = new RegExp(/```json([\s\S]*?)```/);
  21475. let match = data.message.match(regex);
  21476. // eval("var aaa = " + match[0])
  21477. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21478. } catch (error) {
  21479. try {
  21480. let regex = new RegExp(/```json([\s\S]*?)```/);
  21481. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21482. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21483. // eval("var aaa = " + match[0])
  21484. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21485. } catch (error) {
  21486. console.log("error_________________" + error);
  21487. }
  21488. console.log("error_________________" + error);
  21489. }
  21490. console.log("error_________________" + error);
  21491. }
  21492. }
  21493. resolve(tArray)
  21494. } catch (error) {
  21495. if(type == 15){
  21496. resolve({answerQ: "题目"})
  21497. }else if(type == 45){
  21498. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21499. }
  21500. }
  21501. }else if(type == 15){
  21502. resolve({answerQ: "题目"})
  21503. }else if(type == 45){
  21504. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21505. }
  21506. })
  21507. .catch((error) => {
  21508. if(type == 15){
  21509. resolve({answerQ: "题目"})
  21510. }else if(type == 45){
  21511. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21512. }
  21513. console.log(error);
  21514. });
  21515. });
  21516. },
  21517. async aiChoice(type){
  21518. if(type == 45){
  21519. this.choiceLoading = true
  21520. }
  21521. let _this = this
  21522. let fileid = []
  21523. if (_this.xuanzeInfoData.length) {
  21524. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  21525. if(_this.xuanzeInfoData[i].fileid){
  21526. fileid.push(_this.xuanzeInfoData[i].fileid)
  21527. }
  21528. }
  21529. }else{
  21530. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21531. if (_this.infoData.length) {
  21532. for (var i = 0; i < _this.infoData.length; i++) {
  21533. if(_this.infoData[i].fileid){
  21534. fileid.push(_this.infoData[i].fileid)
  21535. }
  21536. }
  21537. }
  21538. }
  21539. let sub = []
  21540. let mclass = []
  21541. if (this.courseTypeId.length) {
  21542. for (var i = 0; i < this.courseTypeId.length; i++) {
  21543. let _sid = this.courseTypeId[i]
  21544. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21545. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21546. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21547. }
  21548. }
  21549. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21550. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21551. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21552. }
  21553. }
  21554. }
  21555. }
  21556. let messages = ""
  21557. if(type == 15){
  21558. messages = `NOTICE
  21559. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21560. Language: ${this.getLang()}
  21561. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21562. Instruction: Based on the context, follow "Format example", write content.
  21563. # Context
  21564. ## 任务
  21565. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21566. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21567. ## 限制
  21568. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21569. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21570. ## 课程简介
  21571. 课程名字:${_this.courseName}
  21572. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21573. ${sub.length ? '学科:' + sub.join(",") : ''}
  21574. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21575. ## 教案
  21576. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21577. # Format example
  21578. {"answerQ":"问题"}
  21579. `
  21580. }else if(type == 45){
  21581. messages = `NOTICE
  21582. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21583. Language: ${this.getLang()}
  21584. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21585. Instruction: Based on the context, follow "Format example", write content.
  21586. # Context
  21587. ## 任务
  21588. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21589. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21590. ## 限制
  21591. - 生成题目禁止重复。
  21592. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21593. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21594. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21595. ## 课程简介
  21596. 课程名字:${_this.courseName}
  21597. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21598. ${sub.length ? '学科:' + sub.join(",") : ''}
  21599. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21600. ## 教案
  21601. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21602. # Format example
  21603. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21604. `
  21605. }
  21606. let parm = {
  21607. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21608. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21609. session_name: uuidv4(),
  21610. userId: this.userid,
  21611. file_ids: fileid.length ? [...fileid] : '',
  21612. model: 'gpt-4o-2024-11-20',
  21613. temperature: this.mode == 3 ? 0.5 : 0.1,
  21614. }
  21615. this.ajax
  21616. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21617. .then((response) => {
  21618. console.log(response);
  21619. let data = response.data.FunctionResponse
  21620. if (data.message) {
  21621. console.log(data.message);
  21622. try {
  21623. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21624. let tArray = {}
  21625. try {
  21626. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21627. } catch (error) {
  21628. console.log("error_________________" + error);
  21629. try {
  21630. let regex = new RegExp(/```json([\s\S]*?)```/);
  21631. let match = data.message.match(regex);
  21632. tArray = JSON.parse(match[1]);
  21633. // var message = data.message;
  21634. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21635. // var jsonEnd = message.indexOf("```", jsonStart);
  21636. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21637. // tArray = JSON.parse(jsonString);
  21638. } catch (error) {
  21639. try {
  21640. let regex = new RegExp(/```json([\s\S]*?)```/);
  21641. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21642. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21643. // eval("var aaa = " + match[0])
  21644. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21645. } catch (error) {
  21646. console.log("error_________________" + error);
  21647. }
  21648. console.log("error_________________" + error);
  21649. }
  21650. }
  21651. if(type == 45){
  21652. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  21653. }
  21654. } catch (error) {
  21655. if(type == 15){
  21656. {answerQ: "题目"}
  21657. }else if(type == 45){
  21658. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21659. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21660. }
  21661. _this.choiceLoading = false
  21662. }
  21663. }else if(type == 15){
  21664. {answerQ: "题目"}
  21665. }else if(type == 45){
  21666. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21667. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21668. }
  21669. _this.choiceLoading = false
  21670. }).catch((error) => {
  21671. if(type == 15){
  21672. {answerQ: "题目"}
  21673. }else if(type == 45){
  21674. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21675. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21676. }
  21677. console.log(error);
  21678. _this.choiceLoading = false
  21679. });
  21680. },
  21681. async aiGet4(messages, callback, clickType) {
  21682. let _this = this
  21683. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21684. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21685. if (_this.infoData.length) {
  21686. for (var i = 0; i < _this.infoData.length; i++) {
  21687. if(_this.infoData[i].fileid){
  21688. fileid.push(_this.infoData[i].fileid)
  21689. }else {
  21690. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21691. if(_fileid){
  21692. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21693. _this.$forceUpdate();
  21694. if(_fileid != 1){
  21695. fileid.push(_fileid)
  21696. }
  21697. }
  21698. }
  21699. }
  21700. }
  21701. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  21702. if(_this.cankaoInfoData[i].fileid){
  21703. fileid.push(_this.cankaoInfoData[i].fileid)
  21704. }else {
  21705. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  21706. if(_fileid){
  21707. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21708. _this.$forceUpdate();
  21709. if(_fileid != 1){
  21710. fileid.push(_fileid)
  21711. }
  21712. }
  21713. }
  21714. }
  21715. // let params = JSON.stringify({
  21716. // // "model": "Chat",
  21717. // model: 'gpt-3.5-turbo',
  21718. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21719. // max_tokens: 4096,
  21720. // top_p: 1,
  21721. // frequency_penalty: 0,
  21722. // presence_penalty: 0,
  21723. // messages: [{
  21724. // content: messages,
  21725. // role: 'user'
  21726. // }],
  21727. // stream: false,
  21728. // uid: this.userid,
  21729. // mind_map_question: "",
  21730. // })
  21731. // // let params = JSON.stringify({
  21732. // // message: {
  21733. // // anthropic_version: "bedrock-2023-05-31",
  21734. // // max_tokens: 4096,
  21735. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  21736. // // top_p: 1,
  21737. // // messages: [{
  21738. // // content: messages,
  21739. // // role: 'user'
  21740. // // }], //
  21741. // // },
  21742. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21743. // // });
  21744. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21745. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21746. // console.log(response);
  21747. // let data = response.data.FunctionResponse
  21748. // if (data.choices && data.choices.length && data.choices[0].message) {
  21749. // console.log(data.choices[0].message.content);
  21750. // let dArray = JSON.parse(data.choices[0].message.content)
  21751. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  21752. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  21753. // _this.unitJson[0].chapterInfo[0].taskJson = []
  21754. // for (var i = 0; i < dArray.length; i++) {
  21755. // let _task = dArray[i]
  21756. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  21757. // task: _task.task,
  21758. // taskDetail: "",
  21759. // taskDetail2: "",
  21760. // taskDetail3: _task.detail,
  21761. // chapterData: [],
  21762. // toolText: "",
  21763. // toolChoose: [
  21764. // {
  21765. // tool: [],
  21766. // toolDetail: "",
  21767. // toolType: 0,
  21768. // askCount: 1,
  21769. // askTitle: "",
  21770. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21771. // },
  21772. // ],
  21773. // isShowTools: false,
  21774. // askCount: 1,
  21775. // isFold: 0,
  21776. // askTitle: "",
  21777. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21778. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21779. // homeworkList: [],
  21780. // })
  21781. // }
  21782. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  21783. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21784. // _this.$forceUpdate();
  21785. // } else {
  21786. // for (var i = 0; i < dArray.length; i++) {
  21787. // let _task = dArray[i]
  21788. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  21789. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21790. // }else {
  21791. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  21792. // task: _task.task,
  21793. // taskDetail: "",
  21794. // taskDetail2: "",
  21795. // taskDetail3: _task.detail,
  21796. // chapterData: [],
  21797. // toolText: "",
  21798. // toolChoose: [
  21799. // {
  21800. // tool: [],
  21801. // toolDetail: "",
  21802. // toolType: 0,
  21803. // askCount: 1,
  21804. // askTitle: "",
  21805. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21806. // },
  21807. // ],
  21808. // isShowTools: false,
  21809. // askCount: 1,
  21810. // isFold: 0,
  21811. // askTitle: "",
  21812. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21813. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21814. // homeworkList: [],
  21815. // }
  21816. // }
  21817. // }
  21818. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21819. // _this.$forceUpdate();
  21820. // }
  21821. // }
  21822. // // if (data.result) {
  21823. // // console.log(data.result);
  21824. // // let dArray = JSON.parse(data.result)
  21825. // // _this.teacherText = JSON.parse(data.result)
  21826. // // for (var i = 0; i < dArray.length; i++) {
  21827. // // let _task = dArray[i]
  21828. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21829. // // }
  21830. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21831. // // _this.$forceUpdate();
  21832. // // }
  21833. // callback ? callback() : ''
  21834. // _this.loading = false
  21835. // }).catch(function (error) {
  21836. // _this.loading = false
  21837. // console.log(error);
  21838. // });
  21839. let parm = {
  21840. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21841. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21842. session_name: uuidv4(),
  21843. userId: this.userid,
  21844. file_ids: fileid.length ? [...fileid] : '',
  21845. model: 'gpt-4o-2024-11-20',
  21846. temperature: this.mode == 3 ? 0.5 : 0.1,
  21847. }
  21848. this.ajax
  21849. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21850. .then((response) => {
  21851. console.log(response);
  21852. let data = response.data.FunctionResponse
  21853. if (data.message) {
  21854. console.log(data.message);
  21855. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21856. let dArray = []
  21857. try {
  21858. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21859. } catch (error) {
  21860. console.log("error_________________" + error);
  21861. try {
  21862. let regex = new RegExp(/```json([\s\S]*?)```/);
  21863. let match = data.message.match(regex);
  21864. dArray = JSON.parse(match[1]);
  21865. // var message = data.message;
  21866. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21867. // var jsonEnd = message.indexOf("```", jsonStart);
  21868. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21869. // dArray = JSON.parse(jsonString);
  21870. } catch (error) {
  21871. _this.aiGet4(messages, callback)
  21872. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21873. console.log("error_________________" + error);
  21874. return;
  21875. console.log("error_________________" + error);
  21876. _this.loading = false
  21877. }
  21878. }
  21879. try {
  21880. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  21881. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  21882. if(_this.panTeacher() > 0){
  21883. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  21884. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  21885. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  21886. }
  21887. for (var i = 0; i < dArray.length; i++) {
  21888. let _task = dArray[i]
  21889. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  21890. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  21891. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21892. }else {
  21893. _this.unitJson[0].chapterInfo[0].taskJson.push({
  21894. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  21895. taskDetail: "",
  21896. taskDetail2: "",
  21897. taskDetail3: _task.detail,
  21898. chapterData: [],
  21899. toolText: "",
  21900. toolChoose: [
  21901. {
  21902. tool: [],
  21903. toolDetail: "",
  21904. toolType: 0,
  21905. askCount: 1,
  21906. askTitle: "",
  21907. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21908. },
  21909. ],
  21910. isShowTools: false,
  21911. askCount: 1,
  21912. isFold: 0,
  21913. askTitle: "",
  21914. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21915. checkJson: [{ checkCount: [], checkPerent: [] }],
  21916. homeworkList: [],
  21917. })
  21918. }
  21919. }
  21920. }else {
  21921. _this.unitJson[0].chapterInfo[0].taskJson = []
  21922. for (var i = 0; i < dArray.length; i++) {
  21923. let _task = dArray[i]
  21924. _this.unitJson[0].chapterInfo[0].taskJson.push({
  21925. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  21926. taskDetail: "",
  21927. taskDetail2: "",
  21928. taskDetail3: _task.detail,
  21929. chapterData: [],
  21930. toolText: "",
  21931. toolChoose: [
  21932. {
  21933. tool: [],
  21934. toolDetail: "",
  21935. toolType: 0,
  21936. askCount: 1,
  21937. askTitle: "",
  21938. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21939. },
  21940. ],
  21941. isShowTools: false,
  21942. askCount: 1,
  21943. isFold: 0,
  21944. askTitle: "",
  21945. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21946. checkJson: [{ checkCount: [], checkPerent: [] }],
  21947. homeworkList: [],
  21948. })
  21949. }
  21950. }
  21951. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  21952. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21953. _this.$forceUpdate();
  21954. } else {
  21955. for (var i = 0; i < dArray.length; i++) {
  21956. let _task = dArray[i]
  21957. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  21958. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21959. }else {
  21960. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  21961. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  21962. taskDetail: "",
  21963. taskDetail2: "",
  21964. taskDetail3: _task.detail,
  21965. chapterData: [],
  21966. toolText: "",
  21967. toolChoose: [
  21968. {
  21969. tool: [],
  21970. toolDetail: "",
  21971. toolType: 0,
  21972. askCount: 1,
  21973. askTitle: "",
  21974. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21975. },
  21976. ],
  21977. isShowTools: false,
  21978. askCount: 1,
  21979. isFold: 0,
  21980. askTitle: "",
  21981. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21982. checkJson: [{ checkCount: [], checkPerent: [] }],
  21983. homeworkList: [],
  21984. }
  21985. }
  21986. }
  21987. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21988. _this.$forceUpdate();
  21989. }
  21990. } catch (error) {
  21991. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21992. _this.aiGet4(messages, callback)
  21993. console.log("error_________________" + error);
  21994. return;
  21995. // _this.loading = false
  21996. }
  21997. }
  21998. callback ? callback() : ''
  21999. })
  22000. .catch((error) => {
  22001. _this.loading = false
  22002. console.log(error);
  22003. });
  22004. },
  22005. async aiDetail(msg, index) {
  22006. let _this = this
  22007. const _tindex = 'task-' + index
  22008. const _tindex2 = index
  22009. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22010. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22011. if (_this.infoData.length) {
  22012. for (var i = 0; i < _this.infoData.length; i++) {
  22013. if(_this.infoData[i].fileid){
  22014. fileid.push(_this.infoData[i].fileid)
  22015. }else {
  22016. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22017. if(_fileid){
  22018. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22019. _this.$forceUpdate();
  22020. if(_fileid != 1){
  22021. fileid.push(_fileid)
  22022. }
  22023. }
  22024. }
  22025. }
  22026. }
  22027. let url = []
  22028. if (this.infoData.length) {
  22029. for (var i = 0; i < this.infoData.length; i++) {
  22030. url.push(this.infoData[i].url)
  22031. }
  22032. }
  22033. let messages = `NOTICE
  22034. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22035. Language: ${this.getLang()}
  22036. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22037. Instruction: Based on the context, follow "Format example", write content.
  22038. #Context
  22039. ## 要求
  22040. ${msg}
  22041. ## 参考信息
  22042. 任务名称:${_this.aiCallBack.task}
  22043. ## 优化内容
  22044. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  22045. // -------- #补充参考资料和
  22046. // ## 补充参考资料
  22047. // - 补充资料:${url.join(",")}
  22048. // - 补充描述:${_this.courseText2}
  22049. _this.taskDetailLoading.push(_tindex)
  22050. _this.ttaskDetailLoading.push(_tindex)
  22051. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22052. let _uuid = uuidv4();
  22053. // let params = JSON.stringify({
  22054. // // "model": "Chat",
  22055. // model: 'gpt-3.5-turbo',
  22056. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22057. // max_tokens: 4096,
  22058. // top_p: 1,
  22059. // frequency_penalty: 0,
  22060. // presence_penalty: 0,
  22061. // messages: [{
  22062. // content: messages,
  22063. // role: 'user'
  22064. // }],
  22065. // uid: _uuid,
  22066. // mind_map_question: "",
  22067. // })
  22068. let params = {
  22069. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22070. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  22071. session_name: _uuid,
  22072. userId: _this.userid,
  22073. uid: _uuid,
  22074. file_ids: fileid.length ? [...fileid] : '',
  22075. model: 'gpt-4o-2024-11-20',
  22076. temperature: this.mode == 3 ? 0.5 : 0.1,
  22077. }
  22078. // let params = JSON.stringify({
  22079. // message: {
  22080. // anthropic_version: "bedrock-2023-05-31",
  22081. // max_tokens: 4096,
  22082. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22083. // top_p: 1,
  22084. // messages: [{
  22085. // "role": "user",
  22086. // "content": messages
  22087. // }] ,
  22088. // },
  22089. // uid: _uuid,
  22090. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22091. // });
  22092. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22093. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22094. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22095. console.log(response);
  22096. // let data = response.data.FunctionResponse
  22097. // if (data.choices && data.choices.length && data.choices[0].message) {
  22098. // console.log(data.choices[0].message.content);
  22099. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22100. // _this.$forceUpdate()
  22101. // }
  22102. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22103. } else {
  22104. _this.$message.warning(response.data.FunctionResponse.result);
  22105. }
  22106. _this.isOutlineTaskCancelToken[index] = null
  22107. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22108. }).catch(function (error) {
  22109. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22110. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22111. _this.isOutlineTaskCancelToken[index] = null
  22112. if(error && error.message != 'Request canceled by the user.'){
  22113. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22114. }
  22115. console.log(error);
  22116. });
  22117. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  22118. },
  22119. aiDetailgetAiContent(_uid, loading, _tindex2) {
  22120. try {
  22121. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22122. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22123. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22124. } catch(error){
  22125. console.log('EventSource error:', error);
  22126. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22127. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22128. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22129. this.isOutlineTaskCancelToken[_tindex2] = null
  22130. return;
  22131. }
  22132. let _allText = "";
  22133. let _mdText = "";
  22134. let _iindex = 0
  22135. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22136. let _eData = JSON.parse(_e.data).content;
  22137. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22138. //对话已经完成
  22139. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22140. this.isOutlineTaskCancelSource[_tindex2].close();
  22141. this.isOutlineTaskCancelSource[_tindex2] = null;
  22142. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22143. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22144. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22145. this.isOutlineTaskCancelToken[_tindex2] = null
  22146. return;
  22147. } else {
  22148. _iindex++
  22149. //对话还在继续
  22150. let _text = "";
  22151. _text = _eData.replaceAll("'", "");
  22152. if (_allText == "") {
  22153. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22154. } else {
  22155. _allText += _text;
  22156. }
  22157. _mdText = _allText + "_";
  22158. _mdText = _mdText.replace(/\\n/g, "\n");
  22159. _mdText = _mdText.replace(/\\/g, "");
  22160. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22161. //转化返回的回复流数据.
  22162. if(_iindex == 10){
  22163. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22164. _iindex = 0
  22165. }
  22166. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22167. // 处理流数据
  22168. }
  22169. // this.$forceUpdate();
  22170. };
  22171. let _this = this
  22172. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22173. // 处理错误,可以尝试重新连接
  22174. console.log('EventSource error:', event);
  22175. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22176. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22177. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22178. _this.isOutlineTaskCancelToken[_tindex2] = null
  22179. _this.isOutlineTaskCancelSource[_tindex2].close();
  22180. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22181. };
  22182. },
  22183. async aiOutlineDetail(msg, index) {
  22184. let _this = this
  22185. const _tindex = 'task-' + index
  22186. const _tindex2 = index
  22187. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22188. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22189. if (_this.infoData.length) {
  22190. for (var i = 0; i < _this.infoData.length; i++) {
  22191. if(_this.infoData[i].fileid){
  22192. fileid.push(_this.infoData[i].fileid)
  22193. }else {
  22194. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22195. if(_fileid){
  22196. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22197. _this.$forceUpdate();
  22198. if(_fileid != 1){
  22199. fileid.push(_fileid)
  22200. }
  22201. }
  22202. }
  22203. }
  22204. }
  22205. let url = []
  22206. if (this.infoData.length) {
  22207. for (var i = 0; i < this.infoData.length; i++) {
  22208. url.push(this.infoData[i].url)
  22209. }
  22210. }
  22211. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22212. let messages = `NOTICE
  22213. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22214. Language: ${this.getLang()}
  22215. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22216. Instruction: Based on the context, follow "Format example", write content.
  22217. #Context
  22218. ## 要求
  22219. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  22220. ## 参考信息
  22221. 课程名字:${_this.courseName}
  22222. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22223. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22224. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22225. # Format example
  22226. 子任务名称:名称应该总结了该任务是在做什么,
  22227. 子任务设计:任务设计。
  22228. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  22229. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  22230. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  22231. `
  22232. // 教学目标:教学目标。
  22233. // 任务设计:任务设计。
  22234. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22235. // -------- #补充参考资料和
  22236. // ## 补充参考资料
  22237. // - 补充资料:${url.join(",")}
  22238. // - 补充描述:${_this.courseText2}
  22239. _this.taskDetailLoading.push(_tindex)
  22240. _this.ttaskDetailLoading.push(_tindex)
  22241. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22242. let _uuid = uuidv4();
  22243. // let params = JSON.stringify({
  22244. // // "model": "Chat",
  22245. // model: 'gpt-3.5-turbo',
  22246. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22247. // max_tokens: 4096,
  22248. // top_p: 1,
  22249. // frequency_penalty: 0,
  22250. // presence_penalty: 0,
  22251. // messages: [{
  22252. // content: messages,
  22253. // role: 'user'
  22254. // }],
  22255. // uid: _uuid,
  22256. // mind_map_question: "",
  22257. // })
  22258. let params = {
  22259. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22260. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22261. session_name: _uuid,
  22262. userId: _this.userid,
  22263. uid: _uuid,
  22264. file_ids: fileid.length ? [...fileid] : '',
  22265. model: 'gpt-4o-2024-11-20',
  22266. temperature: this.mode == 3 ? 0.5 : 0.1,
  22267. }
  22268. // let params = JSON.stringify({
  22269. // message: {
  22270. // anthropic_version: "bedrock-2023-05-31",
  22271. // max_tokens: 4096,
  22272. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22273. // top_p: 1,
  22274. // messages: [{
  22275. // "role": "user",
  22276. // "content": messages
  22277. // }] ,
  22278. // },
  22279. // uid: _uuid,
  22280. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22281. // });
  22282. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22283. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22284. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22285. console.log(response);
  22286. // let data = response.data.FunctionResponse
  22287. // if (data.choices && data.choices.length && data.choices[0].message) {
  22288. // console.log(data.choices[0].message.content);
  22289. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22290. // _this.$forceUpdate()
  22291. // }
  22292. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22293. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22294. } else {
  22295. _this.$message.warning(response.data.FunctionResponse.result);
  22296. }
  22297. _this.isOutlineTaskCancelToken[index] = null
  22298. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22299. }).catch(function (error) {
  22300. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22301. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22302. _this.isOutlineTaskCancelToken[index] = null
  22303. if(error && error.message != 'Request canceled by the user.'){
  22304. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22305. }
  22306. console.log(error);
  22307. });
  22308. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22309. },
  22310. async aiOutlineDetail2(msg, index) {
  22311. let _this = this
  22312. const _tindex = 'task-' + index
  22313. const _tindex2 = index
  22314. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22315. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22316. if (_this.infoData.length) {
  22317. for (var i = 0; i < _this.infoData.length; i++) {
  22318. if(_this.infoData[i].fileid){
  22319. fileid.push(_this.infoData[i].fileid)
  22320. }else {
  22321. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22322. if(_fileid){
  22323. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22324. _this.$forceUpdate();
  22325. if(_fileid != 1){
  22326. fileid.push(_fileid)
  22327. }
  22328. }
  22329. }
  22330. }
  22331. }
  22332. let url = []
  22333. if (this.infoData.length) {
  22334. for (var i = 0; i < this.infoData.length; i++) {
  22335. url.push(this.infoData[i].url)
  22336. }
  22337. }
  22338. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22339. let taskArray = []
  22340. let taskArrayD = []
  22341. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  22342. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  22343. if(k != index){
  22344. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  22345. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  22346. }
  22347. }
  22348. let messages = `NOTICE
  22349. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22350. Language: ${this.getLang()}
  22351. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22352. Instruction: Based on the context, follow "Format example", write content.
  22353. #Context
  22354. ## 要求
  22355. ${msg}
  22356. ## 参考信息
  22357. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22358. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22359. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22360. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  22361. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  22362. # Format example
  22363. **子任务标题**:环节+子任务名称
  22364. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  22365. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  22366. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  22367. `
  22368. // 教学目标:教学目标。
  22369. // 任务设计:任务设计。
  22370. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22371. // -------- #补充参考资料和
  22372. // ## 补充参考资料
  22373. // - 补充资料:${url.join(",")}
  22374. // - 补充描述:${_this.courseText2}
  22375. _this.taskDetailLoading.push(_tindex)
  22376. _this.ttaskDetailLoading.push(_tindex)
  22377. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22378. let _uuid = uuidv4();
  22379. // let params = JSON.stringify({
  22380. // // "model": "Chat",
  22381. // model: 'gpt-3.5-turbo',
  22382. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22383. // max_tokens: 4096,
  22384. // top_p: 1,
  22385. // frequency_penalty: 0,
  22386. // presence_penalty: 0,
  22387. // messages: [{
  22388. // content: messages,
  22389. // role: 'user'
  22390. // }],
  22391. // uid: _uuid,
  22392. // mind_map_question: "",
  22393. // })
  22394. let params = {
  22395. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22396. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  22397. session_name: _uuid,
  22398. userId: _this.userid,
  22399. uid: _uuid,
  22400. file_ids: fileid.length ? [...fileid] : '',
  22401. model: 'gpt-4o-2024-11-20',
  22402. temperature: this.mode == 3 ? 0.5 : 0.1,
  22403. }
  22404. // let params = JSON.stringify({
  22405. // message: {
  22406. // anthropic_version: "bedrock-2023-05-31",
  22407. // max_tokens: 4096,
  22408. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22409. // top_p: 1,
  22410. // messages: [{
  22411. // "role": "user",
  22412. // "content": messages
  22413. // }] ,
  22414. // },
  22415. // uid: _uuid,
  22416. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22417. // });
  22418. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22419. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22420. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22421. console.log(response);
  22422. // let data = response.data.FunctionResponse
  22423. // if (data.choices && data.choices.length && data.choices[0].message) {
  22424. // console.log(data.choices[0].message.content);
  22425. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22426. // _this.$forceUpdate()
  22427. // }
  22428. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22429. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22430. } else {
  22431. _this.$message.warning(response.data.FunctionResponse.result);
  22432. }
  22433. _this.isOutlineTaskCancelToken[index] = null
  22434. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22435. }).catch(function (error) {
  22436. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22437. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22438. _this.isOutlineTaskCancelToken[index] = null
  22439. if(error && error.message != 'Request canceled by the user.'){
  22440. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22441. }
  22442. console.log(error);
  22443. });
  22444. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22445. },
  22446. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  22447. try {
  22448. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22449. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22450. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22451. } catch(error) {
  22452. console.log('EventSource error:', error);
  22453. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22454. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22455. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22456. this.isOutlineTaskCancelToken[_tindex2] = null
  22457. return;
  22458. }
  22459. let _allText = "";
  22460. let _mdText = "";
  22461. let _iindex = 0
  22462. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22463. let _eData = JSON.parse(_e.data).content;
  22464. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22465. //对话已经完成
  22466. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22467. this.isOutlineTaskCancelSource[_tindex2].close();
  22468. this.isOutlineTaskCancelSource[_tindex2] = null;
  22469. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22470. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  22471. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  22472. }
  22473. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22474. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22475. this.isOutlineTaskCancelToken[_tindex2] = null
  22476. return;
  22477. } else {
  22478. _iindex++
  22479. //对话还在继续
  22480. let _text = "";
  22481. _text = _eData.replaceAll("'", "");
  22482. if (_allText == "") {
  22483. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22484. } else {
  22485. _allText += _text;
  22486. }
  22487. _mdText = _allText + "_";
  22488. _mdText = _mdText.replace(/\\n/g, "\n");
  22489. _mdText = _mdText.replace(/\\/g, "");
  22490. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22491. //转化返回的回复流数据.
  22492. if(_iindex == 10){
  22493. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22494. _iindex = 0
  22495. }
  22496. if(this.taskDetailLoading.indexOf(loading) !== -1){
  22497. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22498. }
  22499. // 处理流数据
  22500. }
  22501. // this.$forceUpdate();
  22502. };
  22503. let _this = this
  22504. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22505. // 处理错误,可以尝试重新连接
  22506. console.log('EventSource error:', event);
  22507. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22508. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22509. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22510. _this.isOutlineTaskCancelToken[_tindex2] = null
  22511. _this.isOutlineTaskCancelSource[_tindex2].close();
  22512. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22513. };
  22514. },
  22515. async aiDetail2(msg, index) {
  22516. let _this = this
  22517. const _tindex = 'task-' + index
  22518. const _tindex2 = index
  22519. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22520. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22521. if (_this.infoData.length) {
  22522. for (var i = 0; i < _this.infoData.length; i++) {
  22523. if(_this.infoData[i].fileid){
  22524. fileid.push(_this.infoData[i].fileid)
  22525. }else {
  22526. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22527. if(_fileid){
  22528. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22529. _this.$forceUpdate();
  22530. if(_fileid != 1){
  22531. fileid.push(_fileid)
  22532. }
  22533. }
  22534. }
  22535. }
  22536. }
  22537. let messages = `NOTICE
  22538. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22539. Language: ${this.getLang()}
  22540. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22541. Instruction: Based on the context, follow "Format example", write content.
  22542. #Context
  22543. ## 要求
  22544. ${msg}
  22545. ## 参考资料
  22546. 任务名字: ${_this.aiCallBack.task}
  22547. ## 优化信息
  22548. ${_this.aiCallBack.taskDetail}
  22549. # Format example
  22550. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  22551. _this.taskDetailLoading2.push(_tindex)
  22552. _this.ttaskDetailLoading2.push(_tindex)
  22553. let _uuid = uuidv4();
  22554. // let params = JSON.stringify({
  22555. // // "model": "Chat",
  22556. // model: 'gpt-3.5-turbo',
  22557. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22558. // max_tokens: 4096,
  22559. // top_p: 1,
  22560. // frequency_penalty: 0,
  22561. // presence_penalty: 0,
  22562. // messages: [{
  22563. // content: messages,
  22564. // role: 'user'
  22565. // }],
  22566. // uid: _uuid,
  22567. // mind_map_question: "",
  22568. // })
  22569. let params = {
  22570. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22571. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  22572. session_name: _uuid,
  22573. userId: _this.userid,
  22574. uid: _uuid,
  22575. file_ids: fileid.length ? [...fileid] : '',
  22576. model: 'gpt-4o-2024-11-20',
  22577. temperature: this.mode == 3 ? 0.5 : 0.1,
  22578. }
  22579. // let params = JSON.stringify({
  22580. // message: {
  22581. // anthropic_version: "bedrock-2023-05-31",
  22582. // max_tokens: 4096,
  22583. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22584. // top_p: 1,
  22585. // messages: [{
  22586. // "role": "user",
  22587. // "content": messages
  22588. // }] ,
  22589. // },
  22590. // uid: _uuid,
  22591. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22592. // });
  22593. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22594. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22595. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22596. console.log(response);
  22597. // let data = response.data.FunctionResponse
  22598. // if (data.choices && data.choices.length && data.choices[0].message) {
  22599. // console.log(data.choices[0].message.content);
  22600. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22601. // _this.$forceUpdate()
  22602. // }
  22603. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22604. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22605. } else {
  22606. _this.$message.warning(response.data.FunctionResponse.result);
  22607. }
  22608. }).catch(function (error) {
  22609. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  22610. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  22611. if(error && error.message != 'Request canceled by the user.'){
  22612. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22613. }
  22614. console.log(error);
  22615. });
  22616. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  22617. },
  22618. aiDetail2getAiContent(_uid, loading, _tindex2) {
  22619. let _source;
  22620. try {
  22621. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22622. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22623. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22624. } catch(error) {
  22625. console.log('EventSource error:', error);
  22626. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22627. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22628. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22629. return;
  22630. }
  22631. let _allText = "";
  22632. let _mdText = "";
  22633. let _iindex = 0
  22634. _source.onmessage = _e => {
  22635. let _eData = JSON.parse(_e.data).content;
  22636. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22637. //对话已经完成
  22638. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22639. _source.close();
  22640. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22641. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22642. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22643. return;
  22644. } else {
  22645. _iindex++
  22646. //对话还在继续
  22647. let _text = "";
  22648. _text = _eData.replaceAll("'", "");
  22649. if (_allText == "") {
  22650. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22651. } else {
  22652. _allText += _text;
  22653. }
  22654. _mdText = _allText + "_";
  22655. _mdText = _mdText.replace(/\\n/g, "\n");
  22656. _mdText = _mdText.replace(/\\/g, "");
  22657. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22658. //转化返回的回复流数据
  22659. if(_iindex == 10){
  22660. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22661. _iindex = 0
  22662. }
  22663. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22664. // 处理流数据
  22665. }
  22666. // this.$forceUpdate();
  22667. };
  22668. let _this = this
  22669. _source.onerror = function(event) {
  22670. // 处理错误,可以尝试重新连接
  22671. console.log('EventSource error:', event);
  22672. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22673. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  22674. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  22675. _source.close();
  22676. };
  22677. },
  22678. async aiDetail3(msg, index, tindex) {
  22679. let _this = this
  22680. const _tindex = 'task-' + index + tindex
  22681. const _tindex2 = index
  22682. const _tindex3 = tindex
  22683. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22684. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22685. if (_this.infoData.length) {
  22686. for (var i = 0; i < _this.infoData.length; i++) {
  22687. if(_this.infoData[i].fileid){
  22688. fileid.push(_this.infoData[i].fileid)
  22689. }else {
  22690. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22691. if(_fileid){
  22692. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22693. _this.$forceUpdate();
  22694. if(_fileid != 1){
  22695. fileid.push(_fileid)
  22696. }
  22697. }
  22698. }
  22699. }
  22700. }
  22701. // **重点考虑该任务及工具名和工具内容的情况下*
  22702. let messages = `NOTICE
  22703. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22704. Language: ${this.getLang()}
  22705. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22706. Instruction: Based on the context, follow "Format example", write content.
  22707. #Context
  22708. ## 参考内容
  22709. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22710. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22711. 工具名称:${_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 : '无'}
  22712. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  22713. ## 要求
  22714. ${msg} 输出格式和内容要求参考#格式与要求
  22715. # Format example
  22716. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  22717. _this.taskDetailLoading3.push(_tindex)
  22718. _this.ttaskDetailLoading3.push(_tindex)
  22719. let _uuid = uuidv4();
  22720. // let params = JSON.stringify({
  22721. // // "model": "Chat",
  22722. // model: 'gpt-3.5-turbo',
  22723. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22724. // max_tokens: 4096,
  22725. // top_p: 1,
  22726. // frequency_penalty: 0,
  22727. // presence_penalty: 0,
  22728. // messages: [{
  22729. // content: messages,
  22730. // role: 'user'
  22731. // }],
  22732. // uid: _uuid,
  22733. // mind_map_question: "",
  22734. // })
  22735. let params = {
  22736. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22737. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22738. session_name: _uuid,
  22739. userId: _this.userid,
  22740. uid: _uuid,
  22741. file_ids: fileid.length ? [...fileid] : '',
  22742. model: 'gpt-4o-2024-11-20',
  22743. temperature: this.mode == 3 ? 0.5 : 0.1,
  22744. }
  22745. // let params = JSON.stringify({
  22746. // message: {
  22747. // anthropic_version: "bedrock-2023-05-31",
  22748. // max_tokens: 4096,
  22749. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22750. // top_p: 1,
  22751. // messages: [{
  22752. // "role": "user",
  22753. // "content": messages
  22754. // }] ,
  22755. // },
  22756. // uid: _uuid,
  22757. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22758. // });
  22759. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22760. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22761. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22762. console.log(response);
  22763. let data = response.data.FunctionResponse
  22764. // if (data.choices && data.choices.length && data.choices[0].message) {
  22765. // console.log(data.choices[0].message.content);
  22766. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  22767. // _this.$forceUpdate()
  22768. // }
  22769. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  22770. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22771. } else {
  22772. _this.$message.warning(response.data.FunctionResponse.result);
  22773. }
  22774. }).catch(function (error) {
  22775. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  22776. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  22777. if(error && error.message != 'Request canceled by the user.'){
  22778. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22779. }
  22780. console.log(error);
  22781. });
  22782. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  22783. },
  22784. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  22785. let _source;
  22786. try {
  22787. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22788. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22789. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22790. } catch(error) {
  22791. console.log('EventSource error:', event);
  22792. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22793. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22794. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  22795. return;
  22796. }
  22797. let _allText = "";
  22798. let _mdText = "";
  22799. let _iindex = 0
  22800. _source.onmessage = _e => {
  22801. let _eData = JSON.parse(_e.data).content;
  22802. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22803. //对话已经完成
  22804. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22805. _source.close();
  22806. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  22807. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22808. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  22809. return;
  22810. } else {
  22811. _iindex++
  22812. //对话还在继续
  22813. let _text = "";
  22814. _text = _eData.replaceAll("'", "");
  22815. if (_allText == "") {
  22816. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22817. } else {
  22818. _allText += _text;
  22819. }
  22820. _mdText = _allText + "_";
  22821. _mdText = _mdText.replace(/\\n/g, "\n");
  22822. _mdText = _mdText.replace(/\\/g, "");
  22823. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22824. //转化返回的回复流数据
  22825. if(_iindex == 10){
  22826. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  22827. _iindex = 0
  22828. }
  22829. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22830. // 处理流数据
  22831. }
  22832. // this.$forceUpdate();
  22833. };
  22834. let _this = this
  22835. _source.onerror = function(event) {
  22836. // 处理错误,可以尝试重新连接
  22837. console.log('EventSource error:', event);
  22838. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22839. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  22840. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  22841. _source.close();
  22842. };
  22843. },
  22844. async aiDetail4(msg, index) {
  22845. if (!msg.length) {
  22846. this.$message.error("请添加评价后才能优化")
  22847. return
  22848. }
  22849. let _this = this
  22850. const _tindex = 'task-' + index
  22851. const _tindex2 = index
  22852. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22853. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22854. if (_this.infoData.length) {
  22855. for (var i = 0; i < _this.infoData.length; i++) {
  22856. if(_this.infoData[i].fileid){
  22857. fileid.push(_this.infoData[i].fileid)
  22858. }else {
  22859. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22860. if(_fileid){
  22861. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22862. _this.$forceUpdate();
  22863. if(_fileid != 1){
  22864. fileid.push(_fileid)
  22865. }
  22866. }
  22867. }
  22868. }
  22869. }
  22870. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  22871. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  22872. if(_this.pingjiaInfoData[index][i].fileid){
  22873. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  22874. }
  22875. }
  22876. }
  22877. var _text = ""
  22878. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  22879. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  22880. // _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 : ''} `
  22881. _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 : ''} `
  22882. }
  22883. }
  22884. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  22885. // **重点考虑该任务详情**
  22886. // let messages = `
  22887. // Language: ${this.getLang()}
  22888. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  22889. // #Context
  22890. // ## 参考内容
  22891. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22892. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22893. // 评价设计:${_text}
  22894. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  22895. // ## 要求
  22896. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  22897. // # 格式与要求
  22898. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  22899. // # Format example
  22900. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  22901. let messages = `
  22902. Language: ${this.getLang()}
  22903. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  22904. #Context
  22905. ## 参考内容
  22906. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22907. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22908. ${_text ? '评价设计:'+_text : ''}
  22909. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  22910. ## 要求
  22911. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  22912. # 格式与要求
  22913. 核心素养:从教案中提取
  22914. 目标:从教案中提取
  22915. 评价标准:从教案中提取评价标准
  22916. # Format example
  22917. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  22918. _this.taskDetailLoading4.push(_tindex)
  22919. // let params = JSON.stringify({
  22920. // // "model": "Chat",
  22921. // model: 'gpt-3.5-turbo',
  22922. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22923. // max_tokens: 4096,
  22924. // top_p: 1,
  22925. // frequency_penalty: 0,
  22926. // presence_penalty: 0,
  22927. // messages: [{
  22928. // content: messages,
  22929. // role: 'user'
  22930. // }],
  22931. // stream: false,
  22932. // uid: this.userid,
  22933. // mind_map_question: "",
  22934. // })
  22935. let params = {
  22936. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22937. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22938. session_name: uuidv4(),
  22939. userId: _this.userid,
  22940. file_ids: fileid.length ? [...fileid] : '',
  22941. model: 'gpt-4o-2024-11-20',
  22942. temperature: this.mode == 3 ? 0.5 : 0.1,
  22943. }
  22944. // let params = JSON.stringify({
  22945. // message: {
  22946. // anthropic_version: "bedrock-2023-05-31",
  22947. // max_tokens: 4096,
  22948. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22949. // top_p: 1,
  22950. // messages: [{
  22951. // content: messages,
  22952. // role: 'user'
  22953. // }], //
  22954. // },
  22955. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22956. // });
  22957. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22958. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  22959. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  22960. console.log(response);
  22961. let data = response.data.FunctionResponse
  22962. // if (data.choices && data.choices.length && data.choices[0].message) {
  22963. // console.log(data.choices[0].message.content);
  22964. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  22965. // _this.$forceUpdate()
  22966. // }
  22967. if (data.message) {
  22968. console.log(data.message);
  22969. try {
  22970. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  22971. } catch (e) {
  22972. console.log("error_________________" + e);
  22973. // _this.$message.error(data.message)
  22974. try {
  22975. let regex = new RegExp(/```json([\s\S]*?)```/);
  22976. let match = data.message.match(regex);
  22977. let elist = JSON.parse(match[1])
  22978. elist = elist.filter(el=>{
  22979. el.isai = 1
  22980. return el
  22981. })
  22982. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  22983. // var message = data.message;
  22984. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  22985. // var jsonEnd = message.indexOf("```", jsonStart);
  22986. // if (jsonStart !== -1 && jsonEnd !== -1) {
  22987. // var jsonString = message
  22988. // .substring(jsonStart, jsonEnd)
  22989. // .trim();
  22990. // var _data2 = JSON.parse(jsonString);
  22991. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  22992. // }
  22993. } catch (error) {
  22994. }
  22995. }
  22996. _this.$forceUpdate()
  22997. }
  22998. // if (data.result) {
  22999. // console.log(data.result);
  23000. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  23001. // _this.$forceUpdate()
  23002. // }
  23003. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23004. }).catch(function (error) {
  23005. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23006. if(error && error.message != 'Request canceled by the user.'){
  23007. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23008. }
  23009. console.log(error);
  23010. });
  23011. },
  23012. async aiDetail5(msg, index) {
  23013. let _this = this
  23014. const _tindex = 'task-' + index
  23015. const _tindex2 = index
  23016. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23017. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23018. if (_this.infoData.length) {
  23019. for (var i = 0; i < _this.infoData.length; i++) {
  23020. if(_this.infoData[i].fileid){
  23021. fileid.push(_this.infoData[i].fileid)
  23022. }else {
  23023. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23024. if(_fileid){
  23025. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23026. _this.$forceUpdate();
  23027. if(_fileid != 1){
  23028. fileid.push(_fileid)
  23029. }
  23030. }
  23031. }
  23032. }
  23033. }
  23034. let url = []
  23035. if (this.infoData.length) {
  23036. for (var i = 0; i < this.infoData.length; i++) {
  23037. url.push(this.infoData[i].url)
  23038. }
  23039. }
  23040. var _text = ""
  23041. var _text2 = ""
  23042. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  23043. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23044. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23045. }
  23046. let messages = `
  23047. Language: ${this.getLang()}
  23048. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23049. --------
  23050. ## 要求
  23051. ${msg}
  23052. -------
  23053. ## 本教案描述
  23054. ${_this.aiCallBack}
  23055. -------
  23056. ## 课程大纲
  23057. ${_text}
  23058. -------
  23059. ## 其他教学任务教案
  23060. ${_text2}`
  23061. // ## 补充参考资料
  23062. // - 补充资料:${url.join(",")}
  23063. // - 补充描述:${this.courseText2}
  23064. _this.taskDetailLoading5.push(_tindex)
  23065. _this.ttaskDetailLoading5.push(_tindex)
  23066. let _uuid = uuidv4();
  23067. // let params = JSON.stringify({
  23068. // // "model": "Chat",
  23069. // model: 'gpt-3.5-turbo',
  23070. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23071. // max_tokens: 4096,
  23072. // top_p: 1,
  23073. // frequency_penalty: 0,
  23074. // presence_penalty: 0,
  23075. // messages: [{
  23076. // content: messages,
  23077. // role: 'user'
  23078. // }],
  23079. // uid: _uuid,
  23080. // mind_map_question: "",
  23081. // })
  23082. let params = {
  23083. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23084. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23085. session_name: _uuid,
  23086. userId: _this.userid,
  23087. uid: _uuid,
  23088. file_ids: fileid.length ? [...fileid] : '',
  23089. model: 'gpt-4o-2024-11-20',
  23090. temperature: this.mode == 3 ? 0.5 : 0.1,
  23091. }
  23092. // let params = JSON.stringify({
  23093. // message: {
  23094. // anthropic_version: "bedrock-2023-05-31",
  23095. // max_tokens: 4096,
  23096. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23097. // top_p: 1,
  23098. // messages: [{
  23099. // "role": "user",
  23100. // "content": messages
  23101. // }] ,
  23102. // },
  23103. // uid: _uuid,
  23104. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23105. // });
  23106. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23107. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23108. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23109. console.log(response);
  23110. // let data = response.data.FunctionResponse
  23111. // if (data.choices && data.choices.length && data.choices[0].message) {
  23112. // console.log(data.choices[0].message.content);
  23113. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23114. // _this.$forceUpdate()
  23115. // }
  23116. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23117. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23118. } else {
  23119. _this.$message.warning(response.data.FunctionResponse.result);
  23120. }
  23121. }).catch(function (error) {
  23122. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23123. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23124. }
  23125. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23126. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23127. }
  23128. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23129. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23130. if(error && error.message != 'Request canceled by the user.'){
  23131. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23132. }
  23133. console.log(error);
  23134. });
  23135. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  23136. },
  23137. aiDetail5getAiContent(_uid, loading, _tindex2) {
  23138. let _source;
  23139. try {
  23140. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23141. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23142. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23143. } catch(error){
  23144. console.log('EventSource error:', error);
  23145. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23146. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23147. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23148. }
  23149. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23150. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23151. }
  23152. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23153. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23154. return;
  23155. }
  23156. let _allText = "";
  23157. let _mdText = "";
  23158. let _iindex = 0
  23159. _source.onmessage = _e => {
  23160. let _eData = JSON.parse(_e.data).content;
  23161. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23162. //对话已经完成
  23163. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23164. _source.close();
  23165. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23166. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23167. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23168. }
  23169. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23170. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23171. }
  23172. return;
  23173. } else {
  23174. _iindex++
  23175. //对话还在继续
  23176. let _text = "";
  23177. _text = _eData.replaceAll("'", "");
  23178. if (_allText == "") {
  23179. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23180. } else {
  23181. _allText += _text;
  23182. }
  23183. _mdText = _allText + "_";
  23184. _mdText = _mdText.replace(/\\n/g, "\n");
  23185. _mdText = _mdText.replace(/\\/g, "");
  23186. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23187. //转化返回的回复流数据
  23188. if(_iindex == 10){
  23189. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23190. _iindex = 0
  23191. }
  23192. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23193. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23194. }
  23195. // 处理流数据
  23196. }
  23197. // this.$forceUpdate();
  23198. };
  23199. let _this = this
  23200. _source.onerror = function(event) {
  23201. // 处理错误,可以尝试重新连接
  23202. console.log('EventSource error:', event);
  23203. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23204. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23205. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23206. }
  23207. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23208. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23209. }
  23210. _source.close();
  23211. };
  23212. },
  23213. async aiDetail52(msg, index, callback) {
  23214. let _this = this
  23215. const _tindex = 'task-' + index
  23216. const _tindex2 = index
  23217. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23218. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23219. if (_this.infoData.length) {
  23220. for (var i = 0; i < _this.infoData.length; i++) {
  23221. if(_this.infoData[i].fileid){
  23222. fileid.push(_this.infoData[i].fileid)
  23223. }else {
  23224. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23225. if(_fileid){
  23226. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23227. _this.$forceUpdate();
  23228. if(_fileid != 1){
  23229. fileid.push(_fileid)
  23230. }
  23231. }
  23232. }
  23233. }
  23234. }
  23235. let url = []
  23236. if (this.infoData.length) {
  23237. for (var i = 0; i < this.infoData.length; i++) {
  23238. url.push(this.infoData[i].url)
  23239. }
  23240. }
  23241. let taskN = []
  23242. let taskD = []
  23243. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  23244. if(_tindex2 != ti){
  23245. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  23246. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  23247. }
  23248. }
  23249. let messages = `NOTICE
  23250. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23251. Language: ${this.getLang()}
  23252. ATTENTION: follow "Language"
  23253. #Context
  23254. ## 要求
  23255. ${msg}
  23256. ## 补充描述
  23257. 课程简要描述:${_this.courseText}
  23258. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23259. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  23260. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  23261. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23262. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  23263. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23264. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23265. `
  23266. // ## 补充参考资料
  23267. // - 补充资料:${url.join(",")}
  23268. // - 补充描述:${this.courseText2}
  23269. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  23270. _this.taskDetailLoading5.push(_tindex)
  23271. }
  23272. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  23273. _this.ttaskDetailLoading5.push(_tindex)
  23274. }
  23275. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  23276. let _uuid = uuidv4();
  23277. // let params = JSON.stringify({
  23278. // // "model": "Chat",
  23279. // model: 'gpt-3.5-turbo',
  23280. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23281. // max_tokens: 4096,
  23282. // top_p: 1,
  23283. // frequency_penalty: 0,
  23284. // presence_penalty: 0,
  23285. // messages: [{
  23286. // content: messages,
  23287. // role: 'user'
  23288. // }],
  23289. // uid: _uuid,
  23290. // mind_map_question: "",
  23291. // })
  23292. let params = {
  23293. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23294. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23295. session_name: _uuid,
  23296. userId: _this.userid,
  23297. uid: _uuid,
  23298. file_ids: fileid.length ? [...fileid] : '',
  23299. model: 'gpt-4o-2024-11-20',
  23300. temperature: this.mode == 3 ? 0.5 : 0.1,
  23301. }
  23302. // let params = JSON.stringify({
  23303. // message: {
  23304. // anthropic_version: "bedrock-2023-05-31",
  23305. // max_tokens: 4096,
  23306. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23307. // top_p: 1,
  23308. // messages: [{
  23309. // "role": "user",
  23310. // "content": messages
  23311. // }] ,
  23312. // },
  23313. // uid: _uuid,
  23314. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23315. // });
  23316. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23317. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  23318. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23319. console.log(response);
  23320. // let data = response.data.FunctionResponse
  23321. // if (data.choices && data.choices.length && data.choices[0].message) {
  23322. // console.log(data.choices[0].message.content);
  23323. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23324. // _this.$forceUpdate()
  23325. // }
  23326. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23327. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23328. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  23329. } else {
  23330. _this.$message.warning(response.data.FunctionResponse.result);
  23331. }
  23332. _this.isTeacherTaskCancelToken2[index] = null
  23333. }).catch(function (error) {
  23334. if(error && error.message != 'Request canceled by the user.'){
  23335. _this.isTeacherTaskCancelToken2[index] = null
  23336. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23337. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23338. }
  23339. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23340. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23341. }
  23342. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23343. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23344. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23345. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23346. confirmButtonText: "确定",
  23347. cancelButtonText: "取消",
  23348. distinguishCancelAndClose: true,
  23349. type: "warning",
  23350. customClass: 'custom-confirm-box'
  23351. })
  23352. .then(() => {
  23353. _this.aiDetail52(msg, index, callback)
  23354. }).catch((v) => {
  23355. console.log(v);
  23356. callback ? callback() : ''
  23357. })
  23358. setTimeout(() => {
  23359. _this.setTipsIndex()
  23360. }, 500)
  23361. }
  23362. console.log(error);
  23363. });
  23364. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  23365. },
  23366. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  23367. try {
  23368. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23369. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23370. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23371. } catch(error) {
  23372. console.log('EventSource error:', error);
  23373. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23374. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23375. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23376. }
  23377. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23378. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23379. }
  23380. this.isTeacherTaskCancelToken2[_tindex2] = null
  23381. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23382. confirmButtonText: "确定",
  23383. cancelButtonText: "取消",
  23384. distinguishCancelAndClose: true,
  23385. type: "warning",
  23386. customClass: 'custom-confirm-box'
  23387. })
  23388. .then(() => {
  23389. _this.aiDetail52(msg, _tindex2, callback)
  23390. }).catch((v) => {
  23391. console.log(v);
  23392. callback ? callback() : ''
  23393. })
  23394. setTimeout(() => {
  23395. _this.setTipsIndex()
  23396. }, 500)
  23397. return;
  23398. }
  23399. let _allText = "";
  23400. let _mdText = "";
  23401. this.allTextArray[_tindex2] = ""
  23402. let _iindex = 0
  23403. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  23404. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  23405. let _eData = JSON.parse(_e.data).content;
  23406. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23407. //对话已经完成
  23408. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23409. this.isTeacherTaskCancelSource[_tindex2].close();
  23410. this.isTeacherTaskCancelSource[_tindex2] = null;
  23411. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23412. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23413. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23414. }
  23415. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23416. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23417. }
  23418. this.isTeacherTaskCancelToken2[_tindex2] = null
  23419. callback ? callback() : ''
  23420. // this.createTeacherAn(_tindex2, 2);
  23421. this.saveCourse()
  23422. return;
  23423. } else {
  23424. _iindex++
  23425. //对话还在继续
  23426. let _text = "";
  23427. _text = _eData.replaceAll("'", "");
  23428. if (_allText == "") {
  23429. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23430. } else {
  23431. _allText += _text;
  23432. }
  23433. _mdText = _allText + "_";
  23434. _mdText = _mdText.replace(/\\n/g, "\n");
  23435. _mdText = _mdText.replace(/\\/g, "");
  23436. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23437. //转化返回的回复流数据
  23438. if(_iindex == 10){
  23439. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23440. _iindex = 0
  23441. }
  23442. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23443. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23444. }
  23445. // 处理流数据
  23446. }
  23447. };
  23448. let _this = this
  23449. _this.isTeacherTaskCancelSource.onerror = function(event) {
  23450. // 处理错误,可以尝试重新连接
  23451. console.log('EventSource error:', event);
  23452. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23453. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23454. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23455. }
  23456. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23457. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23458. }
  23459. _this.isTeacherTaskCancelSource[_tindex2].close();
  23460. _this.isTeacherTaskCancelSource[_tindex2] = null;
  23461. _this.isTeacherTaskCancelToken2[_tindex2] = null
  23462. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23463. confirmButtonText: "确定",
  23464. cancelButtonText: "取消",
  23465. distinguishCancelAndClose: true,
  23466. type: "warning",
  23467. customClass: 'custom-confirm-box'
  23468. })
  23469. .then(() => {
  23470. _this.aiDetail52(msg, _tindex2, callback)
  23471. }).catch((v) => {
  23472. console.log(v);
  23473. callback ? callback() : ''
  23474. })
  23475. setTimeout(() => {
  23476. _this.setTipsIndex()
  23477. }, 500)
  23478. };
  23479. },
  23480. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  23481. let _mdText = "";
  23482. let _eData = JSON.parse(_e.data).content;
  23483. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23484. //对话已经完成
  23485. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23486. _source.close();
  23487. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23488. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23489. return;
  23490. } else {
  23491. //对话还在继续
  23492. let _text = "";
  23493. _text = _eData.replaceAll("'", "");
  23494. if (this.allTextArray[_tindex2] == "") {
  23495. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23496. } else {
  23497. this.allTextArray[_tindex2] += _text;
  23498. }
  23499. _mdText = this.allTextArray[_tindex2] + "_";
  23500. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  23501. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  23502. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  23503. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  23504. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23505. // 处理流数据
  23506. }
  23507. },
  23508. async aiCpote(msg, callback) {
  23509. let _this = this
  23510. let _index = _this.aitype.replace("aiC","c")
  23511. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23512. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23513. if (_this.infoData.length) {
  23514. for (var i = 0; i < _this.infoData.length; i++) {
  23515. if(_this.infoData[i].fileid){
  23516. fileid.push(_this.infoData[i].fileid)
  23517. }else {
  23518. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23519. if(_fileid){
  23520. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23521. _this.$forceUpdate();
  23522. if(_fileid != 1){
  23523. fileid.push(_fileid)
  23524. }
  23525. }
  23526. }
  23527. }
  23528. }
  23529. let sub = []
  23530. if (this.courseTypeId.length) {
  23531. for (var i = 0; i < this.courseTypeId.length; i++) {
  23532. let _sid = this.courseTypeId[i]
  23533. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23534. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23535. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23536. }
  23537. }
  23538. }
  23539. }
  23540. let mclass = []
  23541. if (this.courseTypeId.length) {
  23542. for (var i = 0; i < this.courseTypeId.length; i++) {
  23543. let _sid = this.courseTypeId[i]
  23544. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23545. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23546. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23547. }
  23548. }
  23549. }
  23550. }
  23551. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  23552. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  23553. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  23554. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  23555. let messages = `NOTICE
  23556. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23557. Language: ${this.getLang()}
  23558. ATTENTION: follow "Language"
  23559. ${msg}
  23560. ## 课程简介
  23561. 课程名字:${this.courseName}
  23562. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23563. ${sub.length ? '学科:' + sub.join(",") : ''}
  23564. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23565. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23566. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  23567. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  23568. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  23569. _this.cpoteLoading[_index] = true
  23570. _this.cpotetLoading[_index] = true
  23571. let _uuid = uuidv4();
  23572. // let params = JSON.stringify({
  23573. // // "model": "Chat",
  23574. // model: 'gpt-3.5-turbo',
  23575. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23576. // max_tokens: 4096,
  23577. // top_p: 1,
  23578. // frequency_penalty: 0,
  23579. // presence_penalty: 0,
  23580. // messages: [{
  23581. // content: messages,
  23582. // role: 'user'
  23583. // }],
  23584. // uid: _uuid,
  23585. // mind_map_question: "",
  23586. // })
  23587. let params = {
  23588. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23589. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23590. session_name: _uuid,
  23591. userId: _this.userid,
  23592. uid: _uuid,
  23593. file_ids: fileid.length ? [...fileid] : '',
  23594. model: 'gpt-4o-2024-11-20',
  23595. temperature: this.mode == 3 ? 0.5 : 0.1,
  23596. }
  23597. // let params = JSON.stringify({
  23598. // message: {
  23599. // anthropic_version: "bedrock-2023-05-31",
  23600. // max_tokens: 4096,
  23601. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23602. // top_p: 1,
  23603. // messages: [{
  23604. // "role": "user",
  23605. // "content": messages
  23606. // }] ,
  23607. // },
  23608. // uid: _uuid,
  23609. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23610. // });
  23611. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23612. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23613. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23614. console.log(response);
  23615. // let data = response.data.FunctionResponse
  23616. // if (data.choices && data.choices.length && data.choices[0].message) {
  23617. // console.log(data.choices[0].message.content);
  23618. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23619. // _this.$forceUpdate()
  23620. // }
  23621. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23622. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23623. } else {
  23624. _this.$message.warning(response.data.FunctionResponse.result);
  23625. }
  23626. }).catch(function (error) {
  23627. _this.cpoteLoading[_index] = false
  23628. _this.cpotetLoading[_index] = false
  23629. callback ? callback() : ''
  23630. if(error && error.message != 'Request canceled by the user.'){
  23631. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23632. }
  23633. console.log(error);
  23634. });
  23635. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  23636. },
  23637. aiCpotegetAiContent(_uid, loading, callback) {
  23638. let _source;
  23639. try {
  23640. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23641. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23642. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23643. } catch(error){
  23644. console.log('EventSource error:', error);
  23645. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23646. this.cpoteLoading[loading] = false
  23647. this.cpotetLoading[loading] = false
  23648. return;
  23649. }
  23650. let _allText = "";
  23651. let _mdText = "";
  23652. let _iindex = 0
  23653. _source.onmessage = _e => {
  23654. let _eData = JSON.parse(_e.data).content;
  23655. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23656. //对话已经完成
  23657. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23658. _source.close();
  23659. this.cpote[loading] = _mdText;
  23660. this.cpoteLoading[loading] = false
  23661. this.cpotetLoading[loading] = false
  23662. callback ? callback() : ''
  23663. this.saveCourse()
  23664. return;
  23665. } else {
  23666. _iindex++
  23667. //对话还在继续
  23668. let _text = "";
  23669. _text = _eData.replaceAll("'", "");
  23670. if (_allText == "") {
  23671. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23672. } else {
  23673. _allText += _text;
  23674. }
  23675. _mdText = _allText + "_";
  23676. _mdText = _mdText.replace(/\\n/g, "\n");
  23677. _mdText = _mdText.replace(/\\/g, "");
  23678. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23679. //转化返回的回复流数据
  23680. if(_iindex == 10){
  23681. this.cpote[loading] = _mdText;
  23682. _iindex = 0
  23683. }
  23684. this.cpoteLoading[loading] = false
  23685. // 处理流数据
  23686. }
  23687. // this.$forceUpdate();
  23688. };
  23689. let _this = this
  23690. _source.onerror = function(event) {
  23691. // 处理错误,可以尝试重新连接
  23692. console.log('EventSource error:', event);
  23693. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23694. _this.cpoteLoading[loading] = false
  23695. _this.cpotetLoading[loading] = false
  23696. _source.close();
  23697. };
  23698. },
  23699. async aiteacherTextDetail(msg) {
  23700. let _this = this
  23701. let fileid = []
  23702. if (_this.teacherInfoData.length) {
  23703. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  23704. if(_this.teacherInfoData[i].fileid){
  23705. fileid.push(_this.teacherInfoData[i].fileid)
  23706. }else {
  23707. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  23708. if(_fileid){
  23709. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23710. _this.$forceUpdate();
  23711. if(_fileid != 1){
  23712. fileid.push(_fileid)
  23713. }
  23714. }
  23715. }
  23716. }
  23717. }
  23718. _this.teacherTextLoading = true
  23719. _this.tteacherTextLoading = true
  23720. let sub = []
  23721. if (_this.courseTypeId.length) {
  23722. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23723. let _sid = _this.courseTypeId[i]
  23724. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23725. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23726. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23727. }
  23728. }
  23729. }
  23730. }
  23731. let mclass = []
  23732. if (_this.courseTypeId.length) {
  23733. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23734. let _sid = _this.courseTypeId[i]
  23735. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23736. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23737. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23738. }
  23739. }
  23740. }
  23741. }
  23742. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  23743. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  23744. let messages = `NOTICE
  23745. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23746. Language: ${this.getLang()}
  23747. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23748. Instruction: Based on the context, follow "Format example", write content.
  23749. #Context
  23750. ## 参考资料
  23751. 课程名字:${this.courseName}
  23752. ${sub.length ? '学科:' + sub.join(",") : ''}
  23753. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23754. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  23755. ## 要求
  23756. ${msg}
  23757. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23758. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  23759. let _uuid = uuidv4();
  23760. // let params = JSON.stringify({
  23761. // // "model": "Chat",
  23762. // model: 'gpt-3.5-turbo',
  23763. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23764. // max_tokens: 4096,
  23765. // top_p: 1,
  23766. // frequency_penalty: 0,
  23767. // presence_penalty: 0,
  23768. // messages: [{
  23769. // content: messages,
  23770. // role: 'user'
  23771. // }],
  23772. // uid: _uuid,
  23773. // mind_map_question: "",
  23774. // })
  23775. let params = {
  23776. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23777. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23778. session_name: _uuid,
  23779. userId: _this.userid,
  23780. uid: _uuid,
  23781. file_ids: fileid.length ? [...fileid] : '',
  23782. model: 'gpt-4o-2024-11-20',
  23783. temperature: this.mode == 3 ? 0.5 : 0.1,
  23784. }
  23785. // let params = JSON.stringify({
  23786. // message: {
  23787. // anthropic_version: "bedrock-2023-05-31",
  23788. // max_tokens: 4096,
  23789. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23790. // top_p: 1,
  23791. // messages: [{
  23792. // "role": "user",
  23793. // "content": messages
  23794. // }] ,
  23795. // },
  23796. // uid: _uuid,
  23797. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23798. // });
  23799. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23800. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  23801. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23802. console.log(response);
  23803. // let data = response.data.FunctionResponse
  23804. // if (data.choices && data.choices.length && data.choices[0].message) {
  23805. // _this.courseText = data.choices[0].message.content
  23806. // }
  23807. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23808. } else {
  23809. _this.$message.warning(response.data.FunctionResponse.result);
  23810. }
  23811. _this.isTeacherTextCancelToken = null
  23812. }).catch(function (error) {
  23813. _this.teacherTextLoading = false
  23814. _this.tteacherTextLoading = false
  23815. _this.isTeacherTextCancelToken = null
  23816. if(error && error.message != 'Request canceled by the user.'){
  23817. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23818. }
  23819. console.log(error);
  23820. });
  23821. await _this.aiteacherTextDetailgetAiContent(_uuid)
  23822. },
  23823. aiteacherTextDetailgetAiContent(_uid) {
  23824. try {
  23825. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23826. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23827. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23828. } catch(error) {
  23829. console.log('EventSource error:', event);
  23830. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23831. this.teacherTextLoading = false
  23832. this.tteacherTextLoading = false
  23833. this.isTeacherTextCancelToken = null
  23834. return;
  23835. }
  23836. let _allText = "";
  23837. let _mdText = "";
  23838. let _iindex = 0
  23839. this.isTeacherTextCancelSource.onmessage = _e => {
  23840. let _eData = JSON.parse(_e.data).content;
  23841. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23842. //对话已经完成
  23843. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23844. this.isTeacherTextCancelSource.close();
  23845. this.isTeacherTextCancelSource = null;
  23846. this.teacherCourseText = _mdText;
  23847. this.teacherTextLoading = false
  23848. this.tteacherTextLoading = false
  23849. this.teacherCourseTextB = false
  23850. this.isTeacherTextCancelToken = null
  23851. return;
  23852. } else {
  23853. _iindex++
  23854. //对话还在继续
  23855. let _text = "";
  23856. _text = _eData.replaceAll("'", "");
  23857. if (_allText == "") {
  23858. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23859. } else {
  23860. _allText += _text;
  23861. }
  23862. _mdText = _allText + "_";
  23863. _mdText = _mdText.replace(/\\n/g, "\n");
  23864. _mdText = _mdText.replace(/\\/g, "");
  23865. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23866. //转化返回的回复流数据
  23867. if(_iindex == 10){
  23868. this.teacherCourseText = _mdText;
  23869. _iindex = 0
  23870. }
  23871. if(this.teacherTextLoading){
  23872. this.teacherTextLoading = false
  23873. }
  23874. // 处理流数据
  23875. }
  23876. // this.$forceUpdate();
  23877. };
  23878. let _this = this
  23879. this.isTeacherTextCancelSource.onerror = function(event) {
  23880. // 处理错误,可以尝试重新连接
  23881. console.log('EventSource error:', event);
  23882. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23883. _this.teacherTextLoading = false
  23884. _this.tteacherTextLoading = false
  23885. _this.isTeacherTextCancelToken = null
  23886. _this.isTeacherTextCancelSource.close();
  23887. _this.isTeacherTextCancelSource = null;
  23888. };
  23889. },
  23890. async aitargetTextDetail(msg) {
  23891. let _this = this
  23892. let fileid = []
  23893. if (_this.teacherInfoData.length) {
  23894. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  23895. if(_this.teacherInfoData[i].fileid){
  23896. fileid.push(_this.teacherInfoData[i].fileid)
  23897. }else {
  23898. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  23899. if(_fileid){
  23900. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23901. _this.$forceUpdate();
  23902. if(_fileid != 1){
  23903. fileid.push(_fileid)
  23904. }
  23905. }
  23906. }
  23907. }
  23908. }
  23909. _this.targetTextLoading = true
  23910. _this.ttargetTextLoading = true
  23911. let sub = []
  23912. if (_this.courseTypeId.length) {
  23913. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23914. let _sid = _this.courseTypeId[i]
  23915. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23916. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23917. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23918. }
  23919. }
  23920. }
  23921. }
  23922. let mclass = []
  23923. if (_this.courseTypeId.length) {
  23924. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23925. let _sid = _this.courseTypeId[i]
  23926. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23927. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23928. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23929. }
  23930. }
  23931. }
  23932. }
  23933. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  23934. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  23935. let messages = `NOTICE
  23936. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23937. Language: ${this.getLang()}
  23938. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23939. Instruction: Based on the context, follow "Format example", write content.
  23940. #Context
  23941. ## 参考资料
  23942. 课程名字:${this.courseName}
  23943. ${sub.length ? '学科:' + sub.join(",") : ''}
  23944. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23945. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  23946. ## 要求
  23947. ${msg}
  23948. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23949. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  23950. let _uuid = uuidv4();
  23951. // let params = JSON.stringify({
  23952. // // "model": "Chat",
  23953. // model: 'gpt-3.5-turbo',
  23954. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23955. // max_tokens: 4096,
  23956. // top_p: 1,
  23957. // frequency_penalty: 0,
  23958. // presence_penalty: 0,
  23959. // messages: [{
  23960. // content: messages,
  23961. // role: 'user'
  23962. // }],
  23963. // uid: _uuid,
  23964. // mind_map_question: "",
  23965. // })
  23966. let params = {
  23967. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23968. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23969. session_name: _uuid,
  23970. userId: _this.userid,
  23971. uid: _uuid,
  23972. file_ids: fileid.length ? [...fileid] : '',
  23973. model: 'gpt-4o-2024-11-20',
  23974. temperature: this.mode == 3 ? 0.5 : 0.1,
  23975. }
  23976. // let params = JSON.stringify({
  23977. // message: {
  23978. // anthropic_version: "bedrock-2023-05-31",
  23979. // max_tokens: 4096,
  23980. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23981. // top_p: 1,
  23982. // messages: [{
  23983. // "role": "user",
  23984. // "content": messages
  23985. // }] ,
  23986. // },
  23987. // uid: _uuid,
  23988. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23989. // });
  23990. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23991. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  23992. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23993. console.log(response);
  23994. // let data = response.data.FunctionResponse
  23995. // if (data.choices && data.choices.length && data.choices[0].message) {
  23996. // _this.courseText = data.choices[0].message.content
  23997. // }
  23998. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23999. } else {
  24000. _this.$message.warning(response.data.FunctionResponse.result);
  24001. }
  24002. _this.isTargetCancelToken1 = null
  24003. }).catch(function (error) {
  24004. _this.targetTextLoading = false
  24005. _this.ttargetTextLoading = false
  24006. _this.isTargetCancelToken1 = null
  24007. if(error && error.message != 'Request canceled by the user.'){
  24008. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24009. }
  24010. console.log(error);
  24011. });
  24012. await _this.aitargetTextDetailgetAiContent(_uuid)
  24013. },
  24014. aitargetTextDetailgetAiContent(_uid) {
  24015. try {
  24016. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24017. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24018. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24019. } catch (error) {
  24020. console.log('EventSource error:', error);
  24021. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24022. this.targetTextLoading = false
  24023. this.ttargetTextLoading = false
  24024. this.isTargetCancelToken1 = null
  24025. return;
  24026. }
  24027. let _allText = "";
  24028. let _mdText = "";
  24029. let _iindex = 0
  24030. this.isTargetCancelSource1.onmessage = _e => {
  24031. let _eData = JSON.parse(_e.data).content;
  24032. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24033. //对话已经完成
  24034. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24035. this.isTargetCancelSource1.close();
  24036. this.isTargetCancelSource1 = null;
  24037. this.targetCourseText = _mdText;
  24038. this.targetTextLoading = false
  24039. this.ttargetTextLoading = false
  24040. this.targetCourseTextB = false
  24041. this.isTargetCancelToken1 = null
  24042. return;
  24043. } else {
  24044. _iindex++
  24045. //对话还在继续
  24046. let _text = "";
  24047. _text = _eData.replaceAll("'", "");
  24048. if (_allText == "") {
  24049. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24050. } else {
  24051. _allText += _text;
  24052. }
  24053. _mdText = _allText + "_";
  24054. _mdText = _mdText.replace(/\\n/g, "\n");
  24055. _mdText = _mdText.replace(/\\/g, "");
  24056. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24057. //转化返回的回复流数据
  24058. if(_iindex == 10){
  24059. this.targetCourseText = _mdText;
  24060. _iindex = 0
  24061. }
  24062. if(this.targetTextLoading){
  24063. this.targetTextLoading = false
  24064. }
  24065. // 处理流数据
  24066. }
  24067. // this.$forceUpdate();
  24068. };
  24069. let _this = this
  24070. this.isTargetCancelSource1.onerror = function(event) {
  24071. // 处理错误,可以尝试重新连接
  24072. console.log('EventSource error:', event);
  24073. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24074. _this.targetTextLoading = false
  24075. _this.ttargetTextLoading = false
  24076. _this.isTargetCancelToken1 = null
  24077. _this.isTargetCancelSource1.close();
  24078. _this.isTargetCancelSource1 = null;
  24079. };
  24080. },
  24081. async aitargetTextDetail2(msg) {
  24082. let _this = this
  24083. let fileid = []
  24084. if(_this.mubiaoInfoData.length){
  24085. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24086. if(_this.mubiaoInfoData[i].fileid){
  24087. fileid.push(_this.mubiaoInfoData[i].fileid)
  24088. }else {
  24089. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24090. if(_fileid){
  24091. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24092. _this.$forceUpdate();
  24093. if(_fileid != 1){
  24094. fileid.push(_fileid)
  24095. }
  24096. }
  24097. }
  24098. }
  24099. }
  24100. _this.targetTextLoading2 = true
  24101. _this.ttargetTextLoading2 = true
  24102. let sub = []
  24103. if (_this.courseTypeId.length) {
  24104. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24105. let _sid = _this.courseTypeId[i]
  24106. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24107. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24108. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24109. }
  24110. }
  24111. }
  24112. }
  24113. let mclass = []
  24114. if (_this.courseTypeId.length) {
  24115. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24116. let _sid = _this.courseTypeId[i]
  24117. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24118. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24119. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24120. }
  24121. }
  24122. }
  24123. }
  24124. if(sub.length){
  24125. let _fileid = _this.importFileid(sub)
  24126. fileid = [...fileid, ..._fileid]
  24127. }
  24128. let messages = `NOTICE
  24129. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24130. Language: ${this.getLang()}
  24131. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24132. Instruction: Based on the context, follow "Format example", write content.
  24133. #Context
  24134. ## 参考资料
  24135. 课程标题:${this.courseName}
  24136. ${sub.length ? '学科:' + sub.join(",") : ''}
  24137. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24138. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24139. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24140. ## 要求
  24141. ${msg}
  24142. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24143. let _uuid = uuidv4();
  24144. // let params = JSON.stringify({
  24145. // // "model": "Chat",
  24146. // model: 'gpt-3.5-turbo',
  24147. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24148. // max_tokens: 4096,
  24149. // top_p: 1,
  24150. // frequency_penalty: 0,
  24151. // presence_penalty: 0,
  24152. // messages: [{
  24153. // content: messages,
  24154. // role: 'user'
  24155. // }],
  24156. // uid: _uuid,
  24157. // mind_map_question: "",
  24158. // })
  24159. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24160. let params = {
  24161. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24162. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24163. session_name: _uuid,
  24164. userId: _this.userid,
  24165. uid: _uuid,
  24166. file_ids: fileid.length ? [...fileid] : '',
  24167. model: 'gpt-4o-2024-11-20',
  24168. temperature: this.mode == 3 ? 0.5 : 0.1,
  24169. }
  24170. // let params = JSON.stringify({
  24171. // message: {
  24172. // anthropic_version: "bedrock-2023-05-31",
  24173. // max_tokens: 4096,
  24174. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24175. // top_p: 1,
  24176. // messages: [{
  24177. // "role": "user",
  24178. // "content": messages
  24179. // }] ,
  24180. // },
  24181. // uid: _uuid,
  24182. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24183. // });
  24184. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24185. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24186. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24187. console.log(response);
  24188. // let data = response.data.FunctionResponse
  24189. // if (data.choices && data.choices.length && data.choices[0].message) {
  24190. // _this.courseText = data.choices[0].message.content
  24191. // }
  24192. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24193. } else {
  24194. _this.$message.warning(response.data.FunctionResponse.result);
  24195. }
  24196. _this.isTargetCancelToken2 = null
  24197. }).catch(function (error) {
  24198. _this.targetTextLoading2 = false
  24199. _this.ttargetTextLoading2 = false
  24200. _this.isTargetCancelToken2 = null
  24201. if(error && error.message != 'Request canceled by the user.'){
  24202. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24203. }
  24204. console.log(error);
  24205. });
  24206. await _this.aitargetTextDetail2getAiContent(_uuid)
  24207. },
  24208. importFileid(sub){
  24209. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  24210. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  24211. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  24212. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  24213. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  24214. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  24215. let _sub = converter(sub.join(","))
  24216. let fileid = []
  24217. for(var i = 0; i < this.fileidArray.length; i++){
  24218. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  24219. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  24220. fileid.push(this.fileidArray[i].fileid)
  24221. }
  24222. }
  24223. }
  24224. return fileid
  24225. },
  24226. selectFileid(){
  24227. let params = {
  24228. oid: this.oid,
  24229. };
  24230. this.ajax
  24231. .get(this.$store.state.api + "selectFileid", params)
  24232. .then((res) => {
  24233. this.fileidArray = res.data[0]
  24234. if(res.data[1].length){
  24235. this.fileidArray = res.data[1]
  24236. }
  24237. if(res.data[2].length){
  24238. this.fileidArray = res.data[2]
  24239. }
  24240. })
  24241. .catch((err) => {
  24242. console.error(err);
  24243. });
  24244. },
  24245. selectAiFileid(){
  24246. let params = {
  24247. oid: this.oid,
  24248. };
  24249. this.ajax
  24250. .get(this.$store.state.api + "selectAiFileid", params)
  24251. .then((res) => {
  24252. let fileIds = []
  24253. for(var i = 0; i < res.data[0].length; i++){
  24254. fileIds.push(res.data[0][i].fileid)
  24255. }
  24256. this.fileIds = fileIds
  24257. if(res.data[1].length){
  24258. fileIds = []
  24259. for(var i = 0; i < res.data[1].length; i++){
  24260. fileIds.push(res.data[0][i].fileid)
  24261. }
  24262. this.fileIds = fileIds
  24263. }
  24264. if(res.data[2].length){
  24265. fileIds = []
  24266. for(var i = 0; i < res.data[2].length; i++){
  24267. fileIds.push(res.data[0][i].fileid)
  24268. }
  24269. this.fileIds = fileIds
  24270. }
  24271. })
  24272. .catch((err) => {
  24273. console.error(err);
  24274. });
  24275. },
  24276. selectKnowFileid(){
  24277. let params = {
  24278. oid: this.oid,
  24279. sta: 'cn'
  24280. };
  24281. this.ajax
  24282. .get(this.$store.state.api + "selectKnowFileid", params)
  24283. .then((res) => {
  24284. this.knowFileArray = res.data[0]
  24285. if(res.data[1].length){
  24286. this.knowFileArray = res.data[1]
  24287. }
  24288. if(res.data[2].length){
  24289. this.knowFileArray = res.data[2]
  24290. }
  24291. })
  24292. .catch((err) => {
  24293. console.error(err);
  24294. });
  24295. },
  24296. async aitargetTextDetail22(msg,msg2) {
  24297. let _this = this
  24298. let fileid = []
  24299. _this.targetTextLoading2 = true
  24300. _this.ttargetTextLoading2 = true
  24301. let sub = []
  24302. if (_this.courseTypeId.length) {
  24303. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24304. let _sid = _this.courseTypeId[i]
  24305. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24306. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24307. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24308. }
  24309. }
  24310. }
  24311. }
  24312. let mclass = []
  24313. if (_this.courseTypeId.length) {
  24314. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24315. let _sid = _this.courseTypeId[i]
  24316. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24317. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24318. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24319. }
  24320. }
  24321. }
  24322. }
  24323. if(!msg2 && sub.length){
  24324. // let _fileid = _this.importFileid(sub)
  24325. // fileid = [...fileid, ..._fileid]
  24326. }
  24327. let messages = `NOTICE
  24328. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24329. Language: ${this.getLang()}
  24330. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24331. Instruction: Based on the context, follow "Format example", write content.
  24332. #Context
  24333. ## 参考资料
  24334. 课程标题:${this.courseName}
  24335. ${sub.length ? '学科:' + sub.join(",") : ''}
  24336. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24337. 课程目标:${msg2}
  24338. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24339. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24340. ## 要求
  24341. ${msg}
  24342. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24343. let _uuid = uuidv4();
  24344. // let params = JSON.stringify({
  24345. // // "model": "Chat",
  24346. // model: 'gpt-3.5-turbo',
  24347. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24348. // max_tokens: 4096,
  24349. // top_p: 1,
  24350. // frequency_penalty: 0,
  24351. // presence_penalty: 0,
  24352. // messages: [{
  24353. // content: messages,
  24354. // role: 'user'
  24355. // }],
  24356. // uid: _uuid,
  24357. // mind_map_question: "",
  24358. // })
  24359. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24360. let params = {
  24361. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  24362. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24363. session_name: _uuid,
  24364. userId: _this.userid,
  24365. uid: _uuid,
  24366. file_ids: fileid.length ? [...fileid] : '',
  24367. model: 'gpt-4o-2024-11-20',
  24368. temperature: this.mode == 3 ? 0.5 : 0.1,
  24369. }
  24370. // let params = JSON.stringify({
  24371. // message: {
  24372. // anthropic_version: "bedrock-2023-05-31",
  24373. // max_tokens: 4096,
  24374. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24375. // top_p: 1,
  24376. // messages: [{
  24377. // "role": "user",
  24378. // "content": messages
  24379. // }] ,
  24380. // },
  24381. // uid: _uuid,
  24382. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24383. // });
  24384. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24385. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24386. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24387. console.log(response);
  24388. // let data = response.data.FunctionResponse
  24389. // if (data.choices && data.choices.length && data.choices[0].message) {
  24390. // _this.courseText = data.choices[0].message.content
  24391. // }
  24392. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24393. } else {
  24394. _this.$message.warning(response.data.FunctionResponse.result);
  24395. }
  24396. _this.isTargetCancelToken2 = null
  24397. }).catch(function (error) {
  24398. _this.targetTextLoading2 = false
  24399. _this.ttargetTextLoading2 = false
  24400. _this.isTargetCancelToken2 = null
  24401. if(error && error.message != 'Request canceled by the user.'){
  24402. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24403. }
  24404. console.log(error);
  24405. });
  24406. await _this.aitargetTextDetail2getAiContent(_uuid)
  24407. },
  24408. aitargetTextDetail2getAiContent(_uid) {
  24409. try {
  24410. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24411. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24412. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24413. } catch(error) {
  24414. console.log('EventSource error:', error);
  24415. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24416. this.targetTextLoading2 = false
  24417. this.ttargetTextLoading2 = false
  24418. this.isTargetCancelToken2 = null
  24419. return;
  24420. }
  24421. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  24422. let _allText = "";
  24423. let _mdText = "";
  24424. let _iindex = 0
  24425. this.isTargetCancelSource2.onmessage = _e => {
  24426. let _eData = JSON.parse(_e.data).content;
  24427. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24428. //对话已经完成
  24429. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24430. this.isTargetCancelSource2.close();
  24431. this.isTargetCancelSource2 = null;
  24432. this.targetCourseText2 = text1+' \n '+_mdText;
  24433. this.targetTextLoading2 = false
  24434. this.ttargetTextLoading2 = false
  24435. this.targetCourseText2B = false
  24436. this.isTargetCancelToken2 = null
  24437. this.saveCourse()
  24438. return;
  24439. } else {
  24440. _iindex++
  24441. //对话还在继续
  24442. let _text = "";
  24443. _text = _eData.replaceAll("'", "");
  24444. if (_allText == "") {
  24445. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24446. } else {
  24447. _allText += _text;
  24448. }
  24449. _mdText = _allText + "_";
  24450. _mdText = _mdText.replace(/\\n/g, "\n");
  24451. _mdText = _mdText.replace(/\\/g, "");
  24452. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24453. //转化返回的回复流数据
  24454. if(_iindex == 10){
  24455. this.targetCourseText2 = text1+' \n '+_mdText;
  24456. _iindex = 0
  24457. }
  24458. if(this.targetTextLoading2){
  24459. this.targetTextLoading2 = false
  24460. }
  24461. // 处理流数据
  24462. }
  24463. // this.$forceUpdate();
  24464. };
  24465. let _this = this
  24466. this.isTargetCancelSource2.onerror = function(event) {
  24467. // 处理错误,可以尝试重新连接
  24468. console.log('EventSource error:', event);
  24469. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24470. _this.targetTextLoading2 = false
  24471. _this.ttargetTextLoading2 = false
  24472. _this.isTargetCancelToken2 = null
  24473. _this.isTargetCancelSource2.close();
  24474. _this.isTargetCancelSource2 = null;
  24475. };
  24476. },
  24477. async aitargetTextDetail3(msg) {
  24478. let _this = this
  24479. let fileid = []
  24480. if(_this.mubiaoInfoData.length){
  24481. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24482. if(_this.mubiaoInfoData[i].fileid){
  24483. fileid.push(_this.mubiaoInfoData[i].fileid)
  24484. }else {
  24485. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24486. if(_fileid){
  24487. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24488. _this.$forceUpdate();
  24489. if(_fileid != 1){
  24490. fileid.push(_fileid)
  24491. }
  24492. }
  24493. }
  24494. }
  24495. }
  24496. _this.targetTextLoading2 = true
  24497. _this.ttargetTextLoading2 = true
  24498. let sub = []
  24499. if (_this.courseTypeId.length) {
  24500. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24501. let _sid = _this.courseTypeId[i]
  24502. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24503. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24504. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24505. }
  24506. }
  24507. }
  24508. }
  24509. let mclass = []
  24510. if (_this.courseTypeId.length) {
  24511. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24512. let _sid = _this.courseTypeId[i]
  24513. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24514. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24515. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24516. }
  24517. }
  24518. }
  24519. }
  24520. // if(sub.length){
  24521. // let _fileid = _this.importFileid(sub)
  24522. // fileid = [...fileid, ..._fileid]
  24523. // }
  24524. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24525. if (_this.infoData.length) {
  24526. for (var i = 0; i < _this.infoData.length; i++) {
  24527. if(_this.infoData[i].fileid){
  24528. fileid.push(_this.infoData[i].fileid)
  24529. }else {
  24530. let _fileid = await _this.createFileid(_this.infoData[i].url)
  24531. if(_fileid){
  24532. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  24533. _this.$forceUpdate();
  24534. if(_fileid != 1){
  24535. fileid.push(_fileid)
  24536. }
  24537. }
  24538. }
  24539. }
  24540. }
  24541. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24542. let messages = `Language: ${this.getLang()}
  24543. ${msg}
  24544. ## 课程信息
  24545. 课程名字:${this.courseName}
  24546. 课程概况:${this.courseText}
  24547. ${sub.length ? '学科:' + sub.join(",") : ''}
  24548. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  24549. let _uuid = uuidv4();
  24550. // let params = JSON.stringify({
  24551. // // "model": "Chat",
  24552. // model: 'gpt-3.5-turbo',
  24553. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24554. // max_tokens: 4096,
  24555. // top_p: 1,
  24556. // frequency_penalty: 0,
  24557. // presence_penalty: 0,
  24558. // messages: [{
  24559. // content: messages,
  24560. // role: 'user'
  24561. // }],
  24562. // uid: _uuid,
  24563. // mind_map_question: "",
  24564. // })
  24565. let params = {
  24566. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24567. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24568. session_name: _uuid,
  24569. userId: _this.userid,
  24570. uid: _uuid,
  24571. file_ids: fileid.length ? [...fileid] : '',
  24572. model: 'gpt-4o-2024-11-20',
  24573. temperature: this.mode == 3 ? 0.5 : 0.1,
  24574. }
  24575. // let params = JSON.stringify({
  24576. // message: {
  24577. // anthropic_version: "bedrock-2023-05-31",
  24578. // max_tokens: 4096,
  24579. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24580. // top_p: 1,
  24581. // messages: [{
  24582. // "role": "user",
  24583. // "content": messages
  24584. // }] ,
  24585. // },
  24586. // uid: _uuid,
  24587. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24588. // });
  24589. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24590. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  24591. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24592. console.log(response);
  24593. // let data = response.data.FunctionResponse
  24594. // if (data.choices && data.choices.length && data.choices[0].message) {
  24595. // _this.courseText = data.choices[0].message.content
  24596. // }
  24597. console.log(response);
  24598. let data = response.data.FunctionResponse
  24599. // if (data.choices && data.choices.length && data.choices[0].message) {
  24600. // console.log(data.choices[0].message.content);
  24601. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  24602. // _this.$forceUpdate()
  24603. // }
  24604. if (data.message) {
  24605. console.log('返回回来的目标:',data.message);
  24606. _this.targetCourseText2 = data.message
  24607. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  24608. }
  24609. _this.isTargetCancelToken2 = null
  24610. }).catch(function (error) {
  24611. _this.targetTextLoading2 = false
  24612. _this.ttargetTextLoading2 = false
  24613. _this.isTargetCancelToken2 = null
  24614. if(error && error.message != 'Request canceled by the user.'){
  24615. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24616. }
  24617. console.log(error);
  24618. });
  24619. },
  24620. againEva(msg, i, k) {
  24621. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  24622. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  24623. return;
  24624. }
  24625. if (this.ruleLoading[i]) {
  24626. this.ruleLoading[i][k] = true
  24627. } else {
  24628. this.ruleLoading[i] = []
  24629. this.ruleLoading[i][k] = true
  24630. }
  24631. let message = `NOTICE
  24632. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  24633. Language: ${this.getLang()}
  24634. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24635. Instruction: Based on the context, follow "Format example", write content.
  24636. #Context
  24637. ##要求
  24638. ${msg}
  24639. ##制定标准资料
  24640. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  24641. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  24642. # Format example
  24643. ==
  24644. 0 星,作业内容与作业要求无关;
  24645. 1 星,没有识别问题和需求;
  24646. 2 星,问题或需求没有被清晰理解或准确识别;
  24647. 3 星,问题或需求的一部分被识别;
  24648. 4 星,问题或需求的大部分被识别;
  24649. 5 星,问题或需求都被识别。
  24650. ==
  24651. `
  24652. // let params = {
  24653. // // "model": "Chat",
  24654. // model: 'gpt-4o-2024-11-20',
  24655. // // model: "gpt-4o",
  24656. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24657. // max_tokens: 4096,
  24658. // top_p: 1,
  24659. // frequency_penalty: 0,
  24660. // presence_penalty: 0,
  24661. // messages: [
  24662. // {
  24663. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  24664. // role: "user"
  24665. // }
  24666. // ],
  24667. // stream: false,
  24668. // uid: this.userid,
  24669. // mind_map_question: ""
  24670. // };
  24671. // this.ajax
  24672. // .post("https://gpt4.cocorobo.cn/chat", params)
  24673. // .then(response => {
  24674. // let data = response.data.FunctionResponse;
  24675. // console.log("data", data);
  24676. // if (data.choices && data.choices.length && data.choices[0].message) {
  24677. // let content = data.choices[0].message.content;
  24678. // var regex = new RegExp('==([^=]+)==');
  24679. // let match = content.match(regex);
  24680. // if (match) {
  24681. // content = match[1].trim().replaceAll(' ', '');
  24682. // // 获取匹配到的内容并去除两端空格
  24683. // console.log('contentInsideDoubleEquals', content);
  24684. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24685. // console.log("未有星级。");
  24686. // this.againEva(msg, i, k)
  24687. // return
  24688. // }
  24689. // //  return
  24690. // } else {
  24691. // console.log("未找到匹配的内容。");
  24692. // this.againEva(msg, i, k)
  24693. // return
  24694. // }
  24695. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  24696. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24697. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24698. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  24699. // this.$forceUpdate();
  24700. // this.ruleLoading[i][k] = false
  24701. // }else{
  24702. // this.ruleLoading[i][k] = false
  24703. // }
  24704. // })
  24705. // .catch(error => {
  24706. // console.log(error);
  24707. // this.ruleLoading[i][k] = false
  24708. // });
  24709. let parm = {
  24710. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24711. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  24712. session_name: uuidv4(),
  24713. userId: this.userid,
  24714. file_ids: [],
  24715. model: 'gpt-4o-2024-11-20',
  24716. temperature: this.mode == 3 ? 0.5 : 0.1,
  24717. }
  24718. this.ajax
  24719. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  24720. .then(async (response) => {
  24721. console.log(response);
  24722. let data = response.data.FunctionResponse
  24723. if (data.message) {
  24724. console.log(data.message);
  24725. let content = data.message;
  24726. var regex = new RegExp('==([^=]+)==');
  24727. let match = content.match(regex);
  24728. if (match) {
  24729. content = match[1].trim().replaceAll(' ', '');
  24730. // 获取匹配到的内容并去除两端空格
  24731. console.log('contentInsideDoubleEquals', content);
  24732. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24733. console.log("未有星级。");
  24734. this.againEva(msg, i, k)
  24735. return
  24736. }
  24737. //  return
  24738. } else {
  24739. console.log("未找到匹配的内容。");
  24740. this.againEva(msg, i, k)
  24741. return
  24742. }
  24743. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  24744. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24745. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24746. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  24747. this.$forceUpdate();
  24748. this.ruleLoading[i][k] = false
  24749. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  24750. }else {
  24751. this.ruleLoading[i][k] = false
  24752. }
  24753. })
  24754. .catch((error) => {
  24755. this.ruleLoading[i][k] = false
  24756. console.log(error);
  24757. });
  24758. },
  24759. async aiSearchFile(messages, callback) {
  24760. let _this = this
  24761. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  24762. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24763. console.log('fileid=========',fileid)
  24764. // let params = JSON.stringify({
  24765. // // "model": "Chat",
  24766. // model: 'gpt-3.5-turbo',
  24767. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24768. // max_tokens: 4096,
  24769. // top_p: 1,
  24770. // frequency_penalty: 0,
  24771. // presence_penalty: 0,
  24772. // messages: [{
  24773. // content: messages,
  24774. // role: 'user'
  24775. // }],
  24776. // stream: false,
  24777. // uid: this.userid,
  24778. // mind_map_question: "",
  24779. // })
  24780. // // let params = JSON.stringify({
  24781. // // message: {
  24782. // // anthropic_version: "bedrock-2023-05-31",
  24783. // // max_tokens: 4096,
  24784. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  24785. // // top_p: 1,
  24786. // // messages: [{
  24787. // // content: messages,
  24788. // // role: 'user'
  24789. // // }], //
  24790. // // },
  24791. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24792. // // });
  24793. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24794. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  24795. // console.log(response);
  24796. // let data = response.data.FunctionResponse
  24797. // if (data.choices && data.choices.length && data.choices[0].message) {
  24798. // console.log(data.choices[0].message.content);
  24799. // let dArray = JSON.parse(data.choices[0].message.content)
  24800. // _this.dArray = dArray
  24801. // _this.unitJson[0].chapterInfo[0].taskJson = []
  24802. // for (var i = 0; i < dArray.length; i++) {
  24803. // let _task = dArray[i]
  24804. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  24805. // task: _task.task,
  24806. // taskDetail: "",
  24807. // taskDetail2: _task.detail,
  24808. // taskDetail3: "",
  24809. // chapterData: [],
  24810. // toolText: "",
  24811. // toolChoose: [
  24812. // {
  24813. // tool: [],
  24814. // toolDetail: "",
  24815. // toolType: 0,
  24816. // askCount: 1,
  24817. // askTitle: "",
  24818. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24819. // },
  24820. // ],
  24821. // isShowTools: false,
  24822. // askCount: 1,
  24823. // isFold: 0,
  24824. // askTitle: "",
  24825. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24826. // checkJson: [{ checkCount: [], checkPerent: [] }],
  24827. // homeworkList: [],
  24828. // })
  24829. // }
  24830. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  24831. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  24832. // _this.$forceUpdate();
  24833. // }
  24834. // // if (data.result) {
  24835. // // console.log(data.result);
  24836. // // let dArray = JSON.parse(data.result)
  24837. // // _this.dArray = dArray
  24838. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  24839. // // for (var i = 0; i < dArray.length; i++) {
  24840. // // let _task = dArray[i]
  24841. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  24842. // // task: _task.task,
  24843. // // taskDetail: "",
  24844. // // taskDetail2: _task.detail,
  24845. // // taskDetail3: "",
  24846. // // chapterData: [],
  24847. // // toolText: "",
  24848. // // toolChoose: [
  24849. // // {
  24850. // // tool: [],
  24851. // // toolDetail: "",
  24852. // // toolType: 0,
  24853. // // askCount: 1,
  24854. // // askTitle: "",
  24855. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24856. // // },
  24857. // // ],
  24858. // // isShowTools: false,
  24859. // // askCount: 1,
  24860. // // isFold: 1,
  24861. // // askTitle: "",
  24862. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24863. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  24864. // // homeworkList: [],
  24865. // // })
  24866. // // }
  24867. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  24868. // // _this.$forceUpdate();
  24869. // // }
  24870. // callback ? callback() : ''
  24871. // }).catch(function (error) {
  24872. // _this.loading = false
  24873. // console.log(error);
  24874. // });
  24875. this.isFileCancelToken = this.ajax.setCancelSource();
  24876. let parm = {
  24877. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  24878. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24879. session_name: uuidv4(),
  24880. userId: this.userid,
  24881. file_ids: fileid.length ? [...fileid] : '',
  24882. model: 'gpt-4o-2024-11-20',
  24883. temperature: this.mode == 3 ? 0.5 : 0.1,
  24884. }
  24885. this.ajax
  24886. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  24887. .then((response) => {
  24888. console.log(response);
  24889. let data = response.data.FunctionResponse
  24890. if (data.message) {
  24891. console.log(data.message);
  24892. let dArray = []
  24893. try {
  24894. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  24895. let regex3 = new RegExp('(?<!")content(?!")','g')
  24896. //
  24897. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  24898. } catch (error) {
  24899. // callback ? callback() : ''
  24900. console.log("error_________________" + error);
  24901. try {
  24902. let regex = new RegExp(/```json([\s\S]*?)```/);
  24903. let match = data.message.match(regex);
  24904. dArray = JSON.parse(match[1]);
  24905. } catch (error) {
  24906. // callback ? callback() : ''
  24907. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  24908. console.log("error_________________" + error);
  24909. _this.isFileCancelToken = null;
  24910. _this.aiSearchFile(messages, callback)
  24911. return
  24912. }
  24913. }
  24914. for(let i = 0; i < dArray.length; i++){
  24915. let content = dArray[i].content
  24916. let name = '参考资料'+(i+1)
  24917. let md = new MarkdownIt();
  24918. let _html = content ? md.render(content) : ''
  24919. setTimeout(()=>{
  24920. if(i == (dArray.length - 1)){
  24921. _this.generate2(name, _html, i, callback)
  24922. }else {
  24923. _this.generate2(name, _html, i)
  24924. }
  24925. }, 500 * i)
  24926. }
  24927. _this.isFileCancelToken = null
  24928. _this.$forceUpdate();
  24929. }
  24930. })
  24931. .catch((error) => {
  24932. callback ? callback() : ''
  24933. _this.isFileCancelToken = null
  24934. console.log(error);
  24935. });
  24936. },
  24937. async aiSearchFile2(messages, callback) {
  24938. let _this = this
  24939. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  24940. console.log('fileid=========',fileid)
  24941. this.isFileCancelToken = this.ajax.setCancelSource();
  24942. let parm = {
  24943. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24944. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24945. session_name: uuidv4(),
  24946. userId: this.userid,
  24947. file_ids: fileid.length ? [...fileid] : '',
  24948. model: 'gpt-4o-2024-11-20',
  24949. temperature: this.mode == 3 ? 0.5 : 0.1,
  24950. }
  24951. this.ajax
  24952. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  24953. .then((response) => {
  24954. console.log(response);
  24955. let data = response.data.FunctionResponse
  24956. if (data.message) {
  24957. console.log(data.message);
  24958. let content = data.message
  24959. let name = '参考资料'
  24960. let md = new MarkdownIt();
  24961. let _html = content ? md.render(content) : ''
  24962. _this.generate2(name, _html, 0, callback)
  24963. _this.isFileCancelToken = null
  24964. _this.$forceUpdate();
  24965. }
  24966. })
  24967. .catch((error) => {
  24968. callback ? callback() : ''
  24969. _this.isFileCancelToken = null
  24970. console.log(error);
  24971. });
  24972. },
  24973. createFileid(url) {
  24974. let _this = this
  24975. return new Promise((resolve, reject) => {
  24976. try {
  24977. _this.ajax
  24978. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  24979. url: url,
  24980. })
  24981. .then((res) => {
  24982. let _data = res.data.FunctionResponse;
  24983. if (_data.result && _data.result.id) {
  24984. resolve(_data.result.id)
  24985. }else {
  24986. resolve(1)
  24987. }
  24988. }).catch(function (error) {
  24989. resolve(1)
  24990. });
  24991. }catch (e){
  24992. resolve(1)
  24993. }
  24994. });
  24995. },
  24996. handleSwitchChange(string){
  24997. // let area = ''
  24998. // let text = ''
  24999. // if(string == 'aiteacherTextDetail'){
  25000. // area = '已有教案摘要'
  25001. // text = this.teacherCourseText
  25002. // }else if(string == 'aitargetTextDetail'){
  25003. // area = '课程目标'
  25004. // text = this.targetCourseText
  25005. // }else if(string == 'aiDetail'){
  25006. // area = '课程简要描述'
  25007. // text = this.courseText
  25008. // }else if(string == 'aitargetTextDetail2'){
  25009. // area = '课程目标'
  25010. // text = this.targetCourseText2
  25011. // }else if(string.indexOf('aiDetail1') != -1){
  25012. // let index = parseInt(string.split('aiDetail1-')[1])
  25013. // area = `任务${index+1}课程大纲`
  25014. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  25015. // }else if(string == 'aiCpote1'){
  25016. // area = '概念群'
  25017. // text = this.cpote.cpote1
  25018. // }else if(string == 'aiCpote2'){
  25019. // area = '问题链'
  25020. // text = this.cpote.cpote2
  25021. // }else if(string == 'aiCpote3'){
  25022. // area = '目标层'
  25023. // text = this.cpote.cpote3
  25024. // }else if(string == 'aiCpote4'){
  25025. // area = '任务簇'
  25026. // text = this.cpote.cpote4
  25027. // }else if(string.indexOf('teacherDetail2') != -1){
  25028. // let index = parseInt(string.split('teacherDetail2-')[1])
  25029. // area = `任务${index+1}教案`
  25030. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  25031. // }else if(string.indexOf('aiDetail2') != -1){
  25032. // let index = parseInt(string.split('aiDetail2-')[1])
  25033. // area = `任务${index+1}任务描述`
  25034. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  25035. // }else if(string.indexOf('aiDetail3') != -1){
  25036. // let index = parseInt(string.split('-')[1])
  25037. // let index2 = parseInt(string.split('-')[2])
  25038. // area = `任务${index+1}工具${index2+1}的工具描述`
  25039. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  25040. // }
  25041. // if(this.isQuote[string] && text){
  25042. // this.quoteArray.push({
  25043. // string,
  25044. // area,
  25045. // value: text
  25046. // })
  25047. // }
  25048. console.log(this.isQuote)
  25049. },
  25050. setIsQuote(string){
  25051. this.isQuote[string] = false
  25052. },
  25053. setEvaList(task, tool, elist){
  25054. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  25055. this.$forceUpdate()
  25056. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  25057. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  25058. }
  25059. },
  25060. closeRight(){
  25061. this.isDisplay = !this.isDisplay;
  25062. },
  25063. addCourseBehavior(type, _html) { // 保存行为操作
  25064. let params = [{
  25065. uid: this.userid,
  25066. courseId: '',
  25067. type: type,
  25068. content: _html,
  25069. }];
  25070. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  25071. if (res.data == 1) {
  25072. console.log('保存操作成功');
  25073. } else {
  25074. console.log('保存操作失败');
  25075. }
  25076. }).catch(e => {
  25077. console.log('保存操作失败');
  25078. console.log(e);
  25079. });
  25080. },
  25081. async useUrl(){
  25082. if(!this.knowFileids3.length){
  25083. this.$message.error('请选择要使用的检索资料')
  25084. return
  25085. }
  25086. let array = []
  25087. for(var i = 0; i < this.knowFileids3.length; i++){
  25088. let item = this.knowFileids3[i]
  25089. for(var j = 0; j < this.knowInfoData3.length; j++){
  25090. if(item == this.knowInfoData3[j].url){
  25091. let isExist = this.knowInfoData2.some(item => item.name === this.knowInfoData3[j].name);
  25092. if (!isExist) {
  25093. this.knowInfoData2.push(this.knowInfoData3[j]);
  25094. }
  25095. }
  25096. }
  25097. }
  25098. this.$nextTick(() => {
  25099. this.$refs.rightKnow.scrollTop = this.$refs.rightKnow.scrollHeight;
  25100. });
  25101. this.knowFileids3 = []
  25102. for (let i = 0; i < this.knowInfoData2.length; i++) {
  25103. if (!this.knowInfoData2[i].fileid) {
  25104. let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25105. this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25106. console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25107. if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25108. this.knowFileids2.push(fileid)
  25109. }
  25110. }
  25111. }
  25112. },
  25113. panFind(event) {
  25114. // if(!this.findMatchingContentsFinish){
  25115. // const { scrollTop, clientHeight, scrollHeight } = event.target;
  25116. // // 判断是否触底
  25117. // if (scrollTop + clientHeight >= scrollHeight - 5 && !this.knowInfoDataLoading) {
  25118. // this.findMatchingContentsPage++
  25119. // this.findMatchingContents(); // 调用下拉刷新方法
  25120. // }
  25121. // }
  25122. if(!this.findMatchingContentsFinish){
  25123. this.findMatchingContentsPage++
  25124. this.findMatchingContents(); // 调用下拉刷新方法
  25125. }else{
  25126. this.$message.error('已获取全部数据')
  25127. }
  25128. },
  25129. startFindMatchingContents(){
  25130. if(!this.searchFileName){
  25131. this.$message.error('请输入检索关键词')
  25132. return
  25133. }
  25134. if(this.knowInfoDataLoading){
  25135. this.$message.error('检索中请稍后')
  25136. return
  25137. }
  25138. if(this.isfindMatchingContents && this.findMatchingContentsPage < 10){
  25139. this.isfindMatchingContents.cancel('Request canceled by the user.');
  25140. this.isfindMatchingContents = null;
  25141. }else if(this.isfindMatchingContents){
  25142. this.$message.error('检索中请稍后')
  25143. return
  25144. }
  25145. this.findMatchingContentsFinish = false
  25146. this.findMatchingContentsPage = 1
  25147. this.knowInfoData3 = []
  25148. this.knowFileType1 = ''
  25149. this.knowFileType2 = ''
  25150. this.knowFileType = ''
  25151. this.findMatchingContents(); // 调用下拉刷新方法
  25152. },
  25153. findMatchingContents(){
  25154. if(!this.searchFileName){
  25155. this.$message.error('请输入检索关键词')
  25156. return
  25157. }
  25158. if(this.isfindMatchingContents){
  25159. this.$message.error('检索中请稍后')
  25160. return
  25161. }
  25162. let sub = []
  25163. let grade = []
  25164. if (this.courseTypeId.length) {
  25165. for (var i = 0; i < this.courseTypeId.length; i++) {
  25166. let _sid = this.courseTypeId[i]
  25167. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25168. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  25169. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  25170. }
  25171. }
  25172. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25173. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  25174. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  25175. }
  25176. }
  25177. }
  25178. }
  25179. if(this.findMatchingContentsPage < 2){
  25180. this.knowInfoDataLoading = true
  25181. }
  25182. let params = {
  25183. type: this.typeC2.join(","),
  25184. string: this.searchFileName,
  25185. grade: this.typeC1.join(","),
  25186. page: this.findMatchingContentsPage
  25187. };
  25188. let md = new MarkdownIt();
  25189. this.isfindMatchingContents = this.ajax.setCancelSource()
  25190. this.ajax.get(this.$store.state.api + 'findMatchingContentsPage2', params, this.isfindMatchingContents).then(async res => {
  25191. console.log(res)
  25192. this.isfindMatchingContents = null
  25193. this.knowInfoDataLoading = false
  25194. if(res.data.length){
  25195. let files = []
  25196. // let knowFile = JSON.parse(JSON.stringify(this.knowFileids2))
  25197. for (var i = 0; i < res.data.length; i++) {
  25198. // files.push(await this.generateExport2(el.title, md.render(el.content)));
  25199. let el = res.data[i];
  25200. let url = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn' + el.file_url;
  25201. let extension = url.split('.').pop().toLowerCase();
  25202. let _type = 2; // 默认类型为2
  25203. // 定义文件类型数组
  25204. let imgA = ["png", "jpg", "jpeg", "bmp", "gif", "webp", "psd", "svg", "tiff"];
  25205. let fileA = ["PDF", "DOC", "DOCX", "DOCM", "DOTM", "DOTX", "PPTX", "PPSX", "PPT", "PPS", "PPTM", "POTM", "PPAM", "POTX", "PPSM", "XLSX", "XLS"];
  25206. let videoA = ["AVI", "NAVI", "MPEG", "ASF", "MOV", "WMV", "3GP", "RM", "RMVB", "FLV", "F4V", "H.264", "H.265", "REAL VIDEO", "MKV", "WebM", "HDDVD", "MP4", "MPG", "M4V", "MGV", "OGV", "QTM", "STR", "AMC", "DVX", "EVO", "DAT", "OGG", "OGM"];
  25207. // 根据文件扩展名判断文件类型
  25208. if (fileA.includes(extension.toUpperCase())) {
  25209. _type = 3;
  25210. } else if (videoA.includes(extension.toUpperCase())) {
  25211. _type = 2;
  25212. } else if (imgA.includes(extension)) {
  25213. _type = 13;
  25214. } else {
  25215. _type = 12;
  25216. }
  25217. let isExist = this.knowInfoData3.some(item => item.name === el.title);
  25218. if (!isExist) {
  25219. // let fileid = await this.createFileid(url)
  25220. this.knowInfoData3.push({
  25221. name: el.title,
  25222. url: url,
  25223. uid: '',
  25224. type: _type,
  25225. fileid: '',
  25226. // fileid == 1 ? '' : fileid
  25227. });
  25228. // if(fileid != 1){
  25229. // this.knowFileids2.push(fileid)
  25230. // }
  25231. }
  25232. }
  25233. // for (let i = 0; i < this.knowInfoData3.length; i++) {
  25234. // if (!this.knowInfoData2[i].fileid) {
  25235. // let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25236. // this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25237. // console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25238. // if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25239. // this.knowFileids2.push(fileid)
  25240. // }
  25241. // }
  25242. // }
  25243. // let data = {
  25244. // target:{
  25245. // files: files
  25246. // }
  25247. // }
  25248. // console.log(data)
  25249. // this.beforeUploadInfo2(data, 20)
  25250. if(this.findMatchingContentsPage < 10){
  25251. this.panFind()
  25252. }
  25253. }else{
  25254. if(this.findMatchingContentsPage == 1){
  25255. this.$message.error('未检索出内容')
  25256. }else {
  25257. this.findMatchingContentsFinish = true
  25258. }
  25259. }
  25260. }).catch(e => {
  25261. console.log('查询失败');
  25262. this.isfindMatchingContents = null
  25263. this.knowInfoDataLoading = false
  25264. console.log(e);
  25265. });
  25266. }
  25267. },
  25268. beforeDestroy() {
  25269. // clearTimeout(this.timer);
  25270. // this.timer = null;
  25271. // clearInterval(this.timer2);
  25272. // this.timer2 = null;
  25273. clearInterval(this.pasteTimer);
  25274. this.pasteTimer = null;
  25275. },
  25276. beforeRouteLeave(to, from, next) {
  25277. // clearTimeout(this.timer);
  25278. // this.timer = null;
  25279. // clearInterval(this.timer2);
  25280. // this.timer2 = null;
  25281. clearInterval(this.pasteTimer);
  25282. this.pasteTimer = null;
  25283. next();
  25284. },
  25285. mounted(){
  25286. let _this = this
  25287. // 监听浏览器后退或者刷新等离开页面的操作
  25288. window.onbeforeunload = function(event) {
  25289. // 检查是否有未保存的更改
  25290. const message = "你有未保存的更改,确定要离开吗?";
  25291. // 现代浏览器通常会显示一个默认的提示信息,不能完全自定义提示内容
  25292. event.returnValue = message; // 兼容大部分浏览器
  25293. console.log(message)
  25294. return message; // 兼容部分浏览器
  25295. };
  25296. const resizable = this.$el.querySelector('.resizable');
  25297. const resizer = this.$el.querySelector('.resizer');
  25298. const maxWidth = document.body.offsetWidth / 2;
  25299. const maxWidth2 = window.innerWidth / 2;
  25300. let startX, startWidth;
  25301. const mouseMoveHandler = (e) => {
  25302. e.preventDefault(); // 添加此行以防止选中其他文本
  25303. const dx = startX - e.clientX;
  25304. const newWidth = startWidth + dx;
  25305. if (newWidth >= 350 && newWidth <= maxWidth) {
  25306. resizable.style.minWidth = `${newWidth}px`;
  25307. }
  25308. };
  25309. const mouseUpHandler = () => {
  25310. document.removeEventListener('mousemove', mouseMoveHandler);
  25311. document.removeEventListener('mouseup', mouseUpHandler);
  25312. document.body.style.cursor = 'default';
  25313. };
  25314. const mouseDownHandler = (e) => {
  25315. e.preventDefault(); // 添加此行以防止选中其他文本
  25316. startX = e.clientX;
  25317. startWidth = resizable.getBoundingClientRect().width;
  25318. document.addEventListener('mousemove', mouseMoveHandler);
  25319. document.addEventListener('mouseup', mouseUpHandler);
  25320. document.body.style.cursor = 'ew-resize';
  25321. };
  25322. resizer.addEventListener('mousedown', mouseDownHandler);
  25323. const touchMoveHandler = (e) => {
  25324. e.preventDefault(); // 添加此行以防止选中其他文本
  25325. const dx = startX - e.touches[0].clientX;
  25326. const newWidth = startWidth + dx;
  25327. if (newWidth >= 350 && newWidth <= maxWidth2) {
  25328. resizable.style.minWidth = `${newWidth}px`;
  25329. }
  25330. };
  25331. const touchEndHandler = () => {
  25332. document.removeEventListener('touchmove', touchMoveHandler);
  25333. document.removeEventListener('touchend', touchEndHandler);
  25334. document.body.style.cursor = 'default';
  25335. };
  25336. const touchStartHandler = (e) => {
  25337. e.preventDefault(); // 添加此行以防止选中其他文本
  25338. startX = e.touches[0].clientX;
  25339. startWidth = resizable.getBoundingClientRect().width;
  25340. document.addEventListener('touchmove', touchMoveHandler);
  25341. document.addEventListener('touchend', touchEndHandler);
  25342. document.body.style.cursor = 'ew-resize';
  25343. };
  25344. resizer.addEventListener('touchstart', touchStartHandler);
  25345. },
  25346. created() {
  25347. this.selectFileid();
  25348. // this.selectAiFileid();
  25349. this.selectKnowFileid();
  25350. this.getStudent();
  25351. this.getTeacher();
  25352. this.getClass();
  25353. this.selectGrage();
  25354. this.getTemplate();
  25355. this.getTipsTemplate();
  25356. // this.selectType();
  25357. this.selectEva();
  25358. if(this.istemplate == 1){
  25359. this.isOutline = true
  25360. this.isOutline2 = true
  25361. this.courseTextBool = true
  25362. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  25363. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  25364. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25365. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  25366. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  25367. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25368. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  25369. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  25370. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  25371. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  25372. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  25373. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  25374. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  25375. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  25376. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  25377. - 我们的课程主题可以如何与学生的实际生活联系起来?
  25378. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  25379. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  25380. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  25381. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  25382. - 学生个人最终要完成什么?学生小组最终要完成什么?
  25383. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  25384. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  25385. 讨论:<转文本内容>`
  25386. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  25387. }
  25388. this.loading = false;
  25389. // this.timer2 = setInterval(() => {
  25390. // this.selectEva();
  25391. // }, 5000);
  25392. // this.pasteTimer = setInterval(() => {
  25393. // this.getPaste();
  25394. // }, 1000);
  25395. this.pasteTimer = setInterval(() => {
  25396. this.getPaste2();
  25397. }, 500);
  25398. setTimeout(() => {
  25399. // this.selectAllType();
  25400. this.selectCourseDetail();
  25401. }, 500);
  25402. let _this = this;
  25403. window.pasteStage = function (json) {
  25404. _this.pasteStage(json);
  25405. };
  25406. window.pasteTask = function (json) {
  25407. _this.pasteTask(json);
  25408. };
  25409. },
  25410. };
  25411. </script>
  25412. <style scoped>
  25413. @media screen and (max-width: 1280px) {
  25414. .mbCss {
  25415. flex-direction: column !important;
  25416. }
  25417. .pjCss {
  25418. width: 100% !important;
  25419. }
  25420. .evaCss {
  25421. width: 100% !important;
  25422. margin-top: 10px;
  25423. }
  25424. }
  25425. .el-table>>>.even_row {
  25426. background-color: #f1f1f1 !important;
  25427. }
  25428. .dialog_diy>>>.el-dialog__header {
  25429. background: #3c3c3c !important;
  25430. padding: 15px 20px;
  25431. }
  25432. .dialog_diy>>>.el-dialog__title {
  25433. color: #fff;
  25434. }
  25435. .dialog_diy>>>.el-dialog__headerbtn {
  25436. top: 19px;
  25437. }
  25438. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  25439. color: #fff;
  25440. }
  25441. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  25442. color: #fff;
  25443. }
  25444. .dialog_diy>>>.el-dialog__body,
  25445. .dialog_diy>>>.el-dialog__footer {
  25446. background: #fafafa;
  25447. }
  25448. .dialog_diy3>>>.el-dialog__body,
  25449. .dialog_diy3>>>.el-dialog__footer {
  25450. background: #eee !important;
  25451. }
  25452. .dialog_diy3>>>.el-dialog__body {
  25453. padding: 20px 20px;
  25454. }
  25455. .dialog_diyStage>>>.el-dialog__body {
  25456. padding: 10px;
  25457. }
  25458. .source_diy>>>.el-dialog {
  25459. height: 100% !important;
  25460. margin: 0 auto !important;
  25461. }
  25462. .source_diy>>>.el-dialog__body {
  25463. height: calc(100% - 185px);
  25464. overflow: auto;
  25465. background: #e6eaf0;
  25466. }
  25467. .source_diy>>>.el-dialog__footer {
  25468. background: #e6eaf0 !important;
  25469. }
  25470. .left {
  25471. border-right: 1px solid rgb(60, 94, 143);
  25472. display: flex;
  25473. flex-direction: column;
  25474. align-items: center;
  25475. min-height: 600px;
  25476. width: 385px;
  25477. height: 80%;
  25478. }
  25479. .tips {
  25480. color: rgb(128, 128, 128);
  25481. font-size: 12px;
  25482. width: 270px;
  25483. margin: 40px;
  25484. }
  25485. .pb_content {
  25486. height: 100% !important;
  25487. /* margin: 0 20px 0 20px; */
  25488. }
  25489. .pb_content_body {
  25490. width: 100% !important;
  25491. height: 100%;
  25492. display: flex;
  25493. }
  25494. .info_solid {
  25495. width: 270px;
  25496. height: 30px;
  25497. border-left: 1px solid #bdbdbd;
  25498. margin: 10px 0px 10px 30px;
  25499. }
  25500. .info_steps {
  25501. width: 270px;
  25502. font-size: 0.875rem;
  25503. display: flex;
  25504. align-items: center;
  25505. }
  25506. .info_steps span:nth-child(1) {
  25507. width: 30px;
  25508. height: 30px;
  25509. background: rgba(0, 0, 0, 0.38);
  25510. display: block;
  25511. color: #fff;
  25512. border-radius: 40px;
  25513. text-align: center;
  25514. line-height: 30px;
  25515. }
  25516. .steps_active {
  25517. background: #3d67bc !important;
  25518. }
  25519. .info_steps span:nth-child(2) {
  25520. margin-left: 5px;
  25521. }
  25522. .right {
  25523. height: 100%;
  25524. width: 100%;
  25525. display: flex;
  25526. overflow: hidden;
  25527. flex-direction: column;
  25528. }
  25529. .leftBar{
  25530. width: 290px;
  25531. height: calc(100% - 50px);
  25532. overflow: auto;
  25533. border-radius: 5px;
  25534. margin: 25px auto;
  25535. box-sizing: border-box;
  25536. margin-right: 10px;
  25537. }
  25538. .leftBar2{
  25539. width: 400px;
  25540. min-width: 400px;
  25541. height: calc(100% - 50px);
  25542. overflow: auto;
  25543. border-radius: 5px;
  25544. margin: 25px auto;
  25545. box-sizing: border-box;
  25546. margin-right: 10px;
  25547. background: #fff;
  25548. padding: 5px;
  25549. border-radius: 5px;
  25550. }
  25551. .basic_box {
  25552. margin: 0 auto;
  25553. position: relative;
  25554. padding: 0 20px 0 20px;
  25555. }
  25556. .basic_box_success {
  25557. width: 100%;
  25558. min-height: 455px;
  25559. padding: 50px 0;
  25560. position: relative;
  25561. text-align: center;
  25562. border-bottom: 1px solid #bfbfbf;
  25563. box-sizing: border-box;
  25564. display: flex;
  25565. align-items: center;
  25566. flex-direction: column;
  25567. justify-content: center;
  25568. }
  25569. .info_title {
  25570. font-size: 1.5em;
  25571. margin-right: 25px;
  25572. /* margin: 20px 30px 20px 30px; */
  25573. }
  25574. .bInfo_title {
  25575. text-align: left;
  25576. margin: 10px 0;
  25577. }
  25578. .small_title {
  25579. font-size: 14px;
  25580. line-height: 40px;
  25581. }
  25582. .chapter_beizhu {
  25583. font-size: 12px;
  25584. font-weight: bold;
  25585. float: right;
  25586. color: rgb(128, 128, 128);
  25587. margin-top: 5px;
  25588. }
  25589. .chapter_uploadBox1 {
  25590. text-align: left;
  25591. background-color: rgb(242, 242, 242);
  25592. width: 100%;
  25593. height: 67px;
  25594. padding: 0px 15px;
  25595. border-radius: 8px;
  25596. overflow: hidden;
  25597. font-size: 16px;
  25598. box-sizing: border-box;
  25599. position: relative;
  25600. }
  25601. .chapter_add {
  25602. width: 100%;
  25603. height: 32px;
  25604. margin-top: 15px;
  25605. cursor: pointer;
  25606. }
  25607. .chapter_add_l {
  25608. margin-left: 5px;
  25609. width: 30px;
  25610. height: 30px;
  25611. float: left;
  25612. border: 1px solid #aaa;
  25613. color: #aaa;
  25614. border-radius: 50%;
  25615. font-size: 25px;
  25616. text-align: center;
  25617. }
  25618. .chapter_add_r {
  25619. font-size: 18px;
  25620. height: 40px;
  25621. line-height: 30px;
  25622. text-indent: 10px;
  25623. color: #aaa;
  25624. }
  25625. .chapter_add_r span {
  25626. font-size: 12px;
  25627. color: rgb(204, 204, 204);
  25628. }
  25629. .chapter_add_input {
  25630. display: none;
  25631. }
  25632. .line {
  25633. width: 85%;
  25634. margin: 0 auto;
  25635. border-top: 1px solid #e5e5e5;
  25636. margin-top: 20px;
  25637. }
  25638. .info_btnBox {
  25639. width: calc(100%);
  25640. display: flex;
  25641. justify-content: center;
  25642. height: 80px;
  25643. align-items: center;
  25644. background: #fff;
  25645. margin: 0 auto;
  25646. border-top: 2px solid rgb(228, 232, 237);
  25647. box-sizing: border-box;
  25648. }
  25649. .info_btnBox2 {
  25650. width: calc(100%);
  25651. display: flex;
  25652. justify-content: center;
  25653. height: 20px;
  25654. align-items: center;
  25655. background: #fff;
  25656. margin: 0 auto;
  25657. border-top: 2px solid rgb(228, 232, 237);
  25658. box-sizing: border-box;
  25659. overflow: hidden;
  25660. cursor: pointer;
  25661. }
  25662. .info_btnBox3 {
  25663. width: calc(100%);
  25664. display: flex;
  25665. justify-content: flex-end;
  25666. padding: 0 20px;
  25667. height: 60px;
  25668. align-items: center;
  25669. background: unset;
  25670. margin: 0 auto;
  25671. /* border-top: 1px solid rgb(228, 232, 237); */
  25672. box-sizing: border-box;
  25673. overflow: hidden;
  25674. cursor: pointer;
  25675. background: #fff;
  25676. border-radius: 10px;
  25677. }
  25678. .info_btn+.info_btn {
  25679. margin-left: 15px;
  25680. }
  25681. .info_btn,
  25682. .teacherWord {
  25683. color: #fff;
  25684. background-color: #0f7eff;
  25685. padding: 8px 24px;
  25686. font-size: 0.9375rem;
  25687. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  25688. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  25689. min-width: 64px;
  25690. font-weight: 500;
  25691. border-radius: 4px;
  25692. box-sizing: border-box;
  25693. border: none;
  25694. cursor: pointer;
  25695. }
  25696. .teacherWord {
  25697. width: 105px !important;
  25698. text-align: center !important;
  25699. line-height: 36px !important;
  25700. padding: 0 !important;
  25701. font-size: 14px !important;
  25702. margin: 10px 0 !important;
  25703. }
  25704. .template_box {
  25705. display: flex;
  25706. flex-wrap: wrap;
  25707. }
  25708. .wordTeacher {
  25709. display: flex;
  25710. flex-direction: column;
  25711. width: 100px;
  25712. height: 100px;
  25713. text-align: center;
  25714. font-size: 13px;
  25715. margin: 0 20px 20px 0;
  25716. background: #f0f4fa;
  25717. position: relative;
  25718. border-radius: 5px;
  25719. align-items: center;
  25720. justify-content: center;
  25721. border: 1px solid #cad1dc;
  25722. color: #0e1e33;
  25723. /* padding: 25px 0px; */
  25724. cursor: pointer;
  25725. }
  25726. .wordTeacher::after {
  25727. content: "";
  25728. display: block;
  25729. position: absolute;
  25730. width: 15px;
  25731. height: 15px;
  25732. right: 10px;
  25733. top: 10px;
  25734. background-image: url(../../../assets/icon/new/choose_a.png);
  25735. background-size: 100% 100%;
  25736. }
  25737. .wordTeacherA::after {
  25738. background-image: url(../../../assets/icon/new/choose_b.png);
  25739. }
  25740. .wordTeacher:nth-child(5n) {
  25741. margin-right: 0px;
  25742. }
  25743. .wordPic {
  25744. margin: 0 auto;
  25745. width: 30px;
  25746. height: 30px;
  25747. cursor: pointer;
  25748. }
  25749. .deleteWord {
  25750. width: 22px;
  25751. height: 22px;
  25752. position: absolute;
  25753. right: 5px;
  25754. top: -15px;
  25755. cursor: pointer;
  25756. display: none;
  25757. z-index: 999;
  25758. }
  25759. .wordPic>img,
  25760. .deleteWord>img,
  25761. .addToolImg>img {
  25762. width: 100%;
  25763. height: 100%;
  25764. }
  25765. .info_btn:hover {
  25766. background-color: #4f7cd5 !important;
  25767. }
  25768. .cru_selectBox {
  25769. display: flex;
  25770. margin: 15px 0;
  25771. flex-wrap: nowrap;
  25772. white-space: nowrap;
  25773. overflow: auto;
  25774. position: relative;
  25775. height: 40px;
  25776. max-width: calc(100% - 175px);
  25777. }
  25778. .cru_selectBox::-webkit-scrollbar {
  25779. /*滚动条整体样式*/
  25780. width: 6px;
  25781. /*高宽分别对应横竖滚动条的尺寸*/
  25782. height: 6px;
  25783. }
  25784. /*定义滚动条轨道 内阴影+圆角*/
  25785. .cru_selectBox::-webkit-scrollbar-track {
  25786. border-radius: 10px;
  25787. background-color: #eee;
  25788. }
  25789. /*定义滑块 内阴影+圆角*/
  25790. .cru_selectBox::-webkit-scrollbar-thumb {
  25791. border-radius: 10px;
  25792. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  25793. background-color: rgba(0, 0, 0, 0.1);
  25794. }
  25795. .cru_line {
  25796. position: absolute;
  25797. bottom: 0px;
  25798. transition: all 0.5s;
  25799. left: 0px;
  25800. width: 50px;
  25801. height: 4px;
  25802. left: 10px;
  25803. border-radius: 2px;
  25804. background: #3681fc;
  25805. }
  25806. .cru_select {
  25807. font-size: 18px;
  25808. margin-right: 20px;
  25809. margin-left: 5px;
  25810. cursor: pointer;
  25811. color: #0e1e33;
  25812. }
  25813. .cru_select:hover {
  25814. color: #3681fc !important;
  25815. }
  25816. .cru_selected {
  25817. color: #3681fc !important;
  25818. font-weight: bold;
  25819. }
  25820. .chapter_box {
  25821. margin-top: 10px;
  25822. width: 100%;
  25823. padding: 10px 20px;
  25824. background: #fff;
  25825. border-radius: 8px;
  25826. box-sizing: border-box;
  25827. }
  25828. .chapter_contentbox {
  25829. display: flex;
  25830. align-items: center;
  25831. /* margin-top: 15px; */
  25832. }
  25833. .chapter_contentbox .cc_title {
  25834. margin: 0px;
  25835. color: black;
  25836. display: block;
  25837. white-space: nowrap;
  25838. overflow: hidden;
  25839. text-overflow: ellipsis;
  25840. margin-right: 20px;
  25841. font-size: 18px;
  25842. height: 20px;
  25843. line-height: 22px;
  25844. min-width: fit-content;
  25845. display: flex;
  25846. }
  25847. .chapter_contentbox .cc_title::before {
  25848. content: "";
  25849. height: 100%;
  25850. width: 3px;
  25851. background: #3681fc;
  25852. border-radius: 3px;
  25853. opacity: 1;
  25854. display: block;
  25855. margin-right: 10px;
  25856. }
  25857. .chapter_contentbox .cc_input {
  25858. width: 100%;
  25859. display: flex;
  25860. }
  25861. .show_taskD {
  25862. min-width: fit-content;
  25863. margin-left: 10px;
  25864. display: flex;
  25865. align-items: center;
  25866. font-size: 14px;
  25867. cursor: pointer;
  25868. color: #717c8d;
  25869. }
  25870. .show_taskD>img {
  25871. width: 15px;
  25872. margin-right: 5px;
  25873. transition: 0.2s all;
  25874. transform: rotate(-90deg);
  25875. }
  25876. .show_taskD.show>img {
  25877. transform: rotate(0deg);
  25878. }
  25879. .show_toolD {
  25880. min-width: fit-content;
  25881. margin-left: 10px;
  25882. display: flex;
  25883. align-items: center;
  25884. font-size: 14px;
  25885. cursor: pointer;
  25886. color: #717c8d;
  25887. /* position: absolute;
  25888. right: 45px;
  25889. top: 5px; */
  25890. }
  25891. .show_toolD>img {
  25892. width: 15px;
  25893. margin-right: 5px;
  25894. transition: 0.2s all;
  25895. transform: rotate(-90deg);
  25896. }
  25897. .show_toolD.show>img {
  25898. transform: rotate(0deg);
  25899. }
  25900. .remove {
  25901. background-image: url("../../../assets/icon/new/delete_u.png");
  25902. cursor: pointer;
  25903. opacity: 0.5;
  25904. width: 30px;
  25905. min-width: 30px;
  25906. height: 30px;
  25907. background-size: 100% 100%;
  25908. background-repeat: no-repeat;
  25909. margin-left: 10px;
  25910. }
  25911. .remove1 {
  25912. background-image: url("../../../assets/remove1.png");
  25913. background-repeat: no-repeat;
  25914. background-position: 5px 10px;
  25915. width: 40px;
  25916. height: 50px;
  25917. cursor: pointer;
  25918. margin-left: 10px;
  25919. }
  25920. .binfo_input {
  25921. width: 100%;
  25922. margin: 0;
  25923. padding: 12px 14px;
  25924. display: block;
  25925. min-width: 0;
  25926. outline: none;
  25927. box-sizing: border-box;
  25928. background: none;
  25929. border: none;
  25930. border-radius: 4px;
  25931. background: #fff;
  25932. font-size: 16px;
  25933. resize: none;
  25934. font-family: "Microsoft YaHei";
  25935. min-height: 48px;
  25936. /* border: 1px solid #3682fc00; */
  25937. border: 1.5px solid #cad1dc;
  25938. }
  25939. .binfo_textarea {
  25940. border: 1.5px solid #cad1dc;
  25941. font-size: 16px;
  25942. resize: none;
  25943. /* background: #f6f6f6; */
  25944. font-family: "Microsoft YaHei";
  25945. }
  25946. .binfo_input:focus-visible {
  25947. border: 1.5px solid #3681fc !important;
  25948. }
  25949. .time {
  25950. display: flex;
  25951. margin: 35px 0 80px 0;
  25952. }
  25953. .chapter_btnbox {
  25954. width: 160px;
  25955. border-radius: 5px;
  25956. border: 2px dashed gray;
  25957. display: flex;
  25958. padding: 8px 50px;
  25959. align-items: center;
  25960. justify-content: center;
  25961. margin: 30px auto 0;
  25962. cursor: pointer;
  25963. }
  25964. .icon_add {
  25965. position: relative;
  25966. width: 24px;
  25967. padding-top: 20px;
  25968. border-radius: 100%;
  25969. border-width: 2px;
  25970. border-style: solid;
  25971. border-color: gray;
  25972. }
  25973. .icon_add i:nth-child(1) {
  25974. position: absolute;
  25975. left: 50%;
  25976. top: 50%;
  25977. height: 60%;
  25978. transform: translate(-50%, -50%);
  25979. border-width: 1px;
  25980. border-style: solid;
  25981. border-color: inherit;
  25982. }
  25983. .icon_add i:nth-child(2) {
  25984. position: absolute;
  25985. top: 50%;
  25986. left: 50%;
  25987. width: 60%;
  25988. transform: translate(-50%, -50%);
  25989. border-width: 1px;
  25990. border-style: solid;
  25991. border-color: inherit;
  25992. }
  25993. .chapter_btn_w {
  25994. font-size: 0.9375rem;
  25995. font-weight: bold;
  25996. color: gray;
  25997. margin-left: 20px;
  25998. }
  25999. .disUoloadSty>>>.el-icon-plus {
  26000. display: none !important;
  26001. /* 上传按钮隐藏 */
  26002. }
  26003. .imgLeft {
  26004. margin: 15px 0;
  26005. }
  26006. .add_info_box {
  26007. margin: 0 0 0 auto;
  26008. display: flex;
  26009. flex-wrap: wrap;
  26010. }
  26011. .add_info_box button {
  26012. margin: 0 5px 10px 0;
  26013. }
  26014. .add_info_box2 {
  26015. display: flex;
  26016. align-items: center;
  26017. flex-wrap: wrap;
  26018. }
  26019. .add_info_box2::after {
  26020. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  26021. color: red;
  26022. font-size: 14px;
  26023. margin-bottom: 10px;
  26024. }
  26025. .add_chapters_box {
  26026. text-align: left;
  26027. background-color: #fff;
  26028. width: 100%;
  26029. border-radius: 4px;
  26030. font-size: 16px;
  26031. box-sizing: border-box;
  26032. position: relative;
  26033. padding: 0 15px;
  26034. height: auto;
  26035. overflow-y: auto;
  26036. overflow-x: hidden;
  26037. border: 1px solid #cad1dc;
  26038. }
  26039. .add_chapters_box.add_c_none {
  26040. display: flex;
  26041. justify-content: center;
  26042. align-items: center;
  26043. padding: 15px;
  26044. }
  26045. .add_c_none>img {
  26046. width: 25px;
  26047. }
  26048. .add_chapters_box.add_c_none>span {
  26049. font-size: 14px;
  26050. font-weight: 400;
  26051. margin: 0 0 5px 5px;
  26052. }
  26053. .homework_box {
  26054. display: flex;
  26055. align-items: flex-start;
  26056. flex-wrap: wrap;
  26057. margin: 15px 0 0 0;
  26058. flex-direction: column;
  26059. align-content: flex-start;
  26060. }
  26061. .course_homework {
  26062. display: flex;
  26063. justify-content: center;
  26064. flex-direction: row;
  26065. align-items: center;
  26066. margin: 0 10px 0 0;
  26067. }
  26068. .course_homework>>>.el-input__inner {
  26069. width: 140px;
  26070. margin-left: 15px;
  26071. }
  26072. .chapter_upload_move {
  26073. position: relative;
  26074. background-color: #fff;
  26075. position: absolute;
  26076. width: 100%;
  26077. top: 0px;
  26078. left: 0px;
  26079. border: 1px solid #eee;
  26080. border-radius: 5px;
  26081. transition: width 2s;
  26082. -moz-transition: width 2s;
  26083. -webkit-transition: width 2s;
  26084. -o-transition: width 2s;
  26085. }
  26086. .chapter_upload_l_i {
  26087. background-image: url("../../../assets/icon.png");
  26088. background-position: 3px -165px;
  26089. width: 30px;
  26090. height: 30px;
  26091. margin: 10px auto 0 auto;
  26092. }
  26093. .course_input_box {
  26094. display: flex;
  26095. margin-right: 20px;
  26096. min-width: 400px;
  26097. width: calc(100% - 350px);
  26098. align-items: center;
  26099. position: relative;
  26100. margin-bottom: 15px;
  26101. }
  26102. .course_input_box2 {
  26103. display: flex;
  26104. width: 100%;
  26105. align-items: center;
  26106. position: relative;
  26107. flex-wrap: wrap;
  26108. }
  26109. .course_input_box>.binfo_input {
  26110. width: calc(100%);
  26111. margin: 0;
  26112. border: 1.5px solid rgb(202, 209, 220);
  26113. border-radius: 5px;
  26114. font-weight: 600;
  26115. padding: 12px 14px 12px 71px;
  26116. }
  26117. .bb_courseIcon {
  26118. width: 57px;
  26119. height: 45px;
  26120. background: #f0f4fa;
  26121. border-radius: 5px 0px 0px 5px;
  26122. display: flex;
  26123. align-items: center;
  26124. justify-content: center;
  26125. border-right: 1.5px solid rgb(202, 209, 220);
  26126. box-sizing: border-box;
  26127. position: absolute;
  26128. left: 1.5px;
  26129. }
  26130. .bb_courseIcon>img {
  26131. width: 25px;
  26132. height: auto;
  26133. }
  26134. .big_box {
  26135. /* margin-top: 20px; */
  26136. display: flex;
  26137. justify-content: space-between;
  26138. /* border-bottom: 1px solid #E0E2ED; */
  26139. }
  26140. .left_first {
  26141. display: flex;
  26142. flex-direction: column;
  26143. flex-wrap: nowrap;
  26144. width: calc(100% - 310px);
  26145. padding: 20px;
  26146. box-sizing: border-box;
  26147. background: #fff;
  26148. border-radius: 5px;
  26149. }
  26150. .right_first {
  26151. width: 300px;
  26152. display: flex;
  26153. align-items: center;
  26154. justify-content: center;
  26155. /* border-left: 1px solid #E0E2ED; */
  26156. box-sizing: border-box;
  26157. padding: 20px;
  26158. flex-direction: column;
  26159. background: #fff;
  26160. border-radius: 5px;
  26161. }
  26162. .ai_box {
  26163. width: 204px;
  26164. display: flex;
  26165. justify-content: flex-end;
  26166. margin-bottom: 15px;
  26167. }
  26168. .ai_content {
  26169. display: flex;
  26170. align-items: center;
  26171. font-size: 14px;
  26172. padding: 7px 20px;
  26173. box-sizing: border-box;
  26174. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  26175. border-radius: 12px;
  26176. font-weight: 700;
  26177. cursor: pointer;
  26178. }
  26179. .ai_content>img {
  26180. width: 40px;
  26181. margin-right: 5px;
  26182. }
  26183. .c_info_title {
  26184. padding: 15px 0 15px 0;
  26185. font-size: 16px;
  26186. font-weight: bold;
  26187. margin: 0 0 0 20px;
  26188. box-sizing: border-box;
  26189. display: flex;
  26190. align-items: center;
  26191. line-height: 20px;
  26192. }
  26193. .c_info_title::before {
  26194. content: "";
  26195. display: block;
  26196. width: 3px;
  26197. height: 20px;
  26198. background: #0061ff;
  26199. border-radius: 3px;
  26200. margin: 0 5px 0 0;
  26201. }
  26202. .right_title {
  26203. height: 30px;
  26204. padding: 15px 0 15px 20px;
  26205. border-bottom: 1px solid #f2f2f2;
  26206. font-size: 1.5em;
  26207. font-weight: bold;
  26208. color: #0f7eff;
  26209. margin: 0 auto;
  26210. }
  26211. .people {
  26212. border: 1px solid rgb(229 229 229);
  26213. /* height: 495px; */
  26214. height: 350px;
  26215. border-radius: 5px;
  26216. width: 100%;
  26217. overflow: auto;
  26218. }
  26219. .people_top {
  26220. display: flex;
  26221. width: 100%;
  26222. /* justify-content: space-between; */
  26223. /* align-items: center; */
  26224. flex-direction: column;
  26225. padding: 10px 10px 0;
  26226. box-sizing: border-box;
  26227. }
  26228. .people_nav,
  26229. .people_top_right {
  26230. /* padding: 20px 0 0 20px; */
  26231. }
  26232. .people_top_right {
  26233. height: 40px;
  26234. margin-bottom: 10px;
  26235. }
  26236. .people_search {
  26237. display: flex;
  26238. position: relative;
  26239. }
  26240. .people_search>>>.el-input__inner {
  26241. /* height: 25px; */
  26242. width: 100%;
  26243. }
  26244. .search_img {
  26245. width: 20px;
  26246. height: 20px;
  26247. position: absolute;
  26248. right: 10px;
  26249. top: 50%;
  26250. transform: translateY(-50%);
  26251. }
  26252. .search_img>img {
  26253. width: 100%;
  26254. height: 100%;
  26255. }
  26256. .people_name {
  26257. display: flex;
  26258. justify-content: flex-start;
  26259. padding: 20px 10px;
  26260. flex-direction: column;
  26261. flex-wrap: wrap;
  26262. }
  26263. .p_box {
  26264. position: relative;
  26265. }
  26266. .people_name>>>.el-checkbox {
  26267. width: 100%;
  26268. display: flex;
  26269. align-items: center;
  26270. margin-bottom: 10px;
  26271. }
  26272. .people_name>>>.el-checkbox__label {
  26273. text-overflow: ellipsis;
  26274. overflow: hidden;
  26275. width: calc(100%);
  26276. }
  26277. .people_name2>>>.el-checkbox__label {
  26278. width: calc(100% - 130px);
  26279. }
  26280. .inviteCode {
  26281. position: absolute;
  26282. right: 30px;
  26283. color: #237ade;
  26284. top: 0;
  26285. cursor: pointer;
  26286. font-size: 13px;
  26287. }
  26288. .noneInvite {
  26289. color: #a8a8a8;
  26290. }
  26291. .inviteImg {
  26292. position: absolute;
  26293. right: 5px;
  26294. top: 0;
  26295. width: 20px;
  26296. }
  26297. .right_img {
  26298. width: 150px;
  26299. height: 150px;
  26300. margin: 0 auto;
  26301. }
  26302. .right_img>img {
  26303. width: 100%;
  26304. height: 100%;
  26305. }
  26306. .number {
  26307. margin-top: 20px;
  26308. color: #4aa6ff;
  26309. text-decoration: underline;
  26310. }
  26311. .success_button {
  26312. display: flex;
  26313. text-align: center;
  26314. margin: 5% 0 auto;
  26315. flex-direction: row;
  26316. justify-content: center;
  26317. }
  26318. .look_course {
  26319. margin-right: 40px;
  26320. background: #3d67bc;
  26321. width: 200px;
  26322. height: 35px;
  26323. line-height: 35px;
  26324. color: #fff;
  26325. text-align: center;
  26326. font-size: 14px;
  26327. border-radius: 5px;
  26328. cursor: pointer;
  26329. }
  26330. .attend_others {
  26331. width: 250px;
  26332. background: #4fb13c;
  26333. height: 35px;
  26334. line-height: 35px;
  26335. color: #fff;
  26336. text-align: center;
  26337. font-size: 14px;
  26338. border-radius: 5px;
  26339. cursor: pointer;
  26340. }
  26341. .dialog_diy2>>>.el-dialog__body {
  26342. text-align: center;
  26343. }
  26344. .write_togother {
  26345. position: absolute;
  26346. right: 45px;
  26347. display: flex;
  26348. top: 5%;
  26349. }
  26350. .write_people {
  26351. font-size: 14px;
  26352. line-height: 50px;
  26353. padding-right: 10px;
  26354. }
  26355. .end_write {
  26356. background: #3d67bc;
  26357. color: #fff;
  26358. width: 100px;
  26359. height: 35px;
  26360. line-height: 35px;
  26361. text-align: center;
  26362. font-size: 14px;
  26363. border-radius: 5px;
  26364. cursor: pointer;
  26365. }
  26366. .chapter_upload+.chapter_upload {
  26367. /* margin-top: 15px; */
  26368. border-top: 1px solid #e7ebf1;
  26369. }
  26370. .chapter_upload {
  26371. height: 45px;
  26372. position: relative;
  26373. display: flex;
  26374. align-items: center;
  26375. width: 100%;
  26376. min-height: 45px;
  26377. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  26378. /* border-radius: 4px; */
  26379. /* overflow: hidden; */
  26380. box-sizing: border-box;
  26381. }
  26382. .chapter_upload_drag {
  26383. position: absolute;
  26384. cursor: pointer;
  26385. width: 16px;
  26386. height: 16px;
  26387. left: -9px;
  26388. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  26389. background-size: 100% 100%;
  26390. z-index: 10;
  26391. display: none;
  26392. }
  26393. .isNavStage>.chapter_upload_drag {
  26394. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  26395. }
  26396. .chapter_upload_t {
  26397. background-color: #fff;
  26398. position: absolute;
  26399. height: 100%;
  26400. top: 0px;
  26401. left: 0px;
  26402. box-sizing: border-box;
  26403. }
  26404. .chapter_upload_o {
  26405. width: 100%;
  26406. height: 100%;
  26407. position: relative;
  26408. z-index: 1;
  26409. }
  26410. .chapter_upload_ic {
  26411. margin: 0 15px 0px auto;
  26412. display: flex;
  26413. align-items: center;
  26414. }
  26415. .chapter_upload_type{
  26416. width: 80px;
  26417. min-width: 80px;
  26418. text-align: center;
  26419. font-size: 14px;
  26420. }
  26421. .chapter_upload_box_file{
  26422. height: calc(100% - 45px);
  26423. overflow: auto;
  26424. border-top: 1px solid #e7ebf1;
  26425. box-sizing: border-box;
  26426. }
  26427. .chapter_upload_ic_l {
  26428. width: 50px;
  26429. height: 50px;
  26430. float: left;
  26431. }
  26432. .chapter_upload_ic_l div {
  26433. width: 30px;
  26434. height: 35px;
  26435. background: url("../../../assets/icon/icon.png");
  26436. }
  26437. .chapter_upload_ic_edit {
  26438. height: 100%;
  26439. display: flex;
  26440. align-items: center;
  26441. cursor: pointer;
  26442. margin: 0 10px 0 0;
  26443. }
  26444. .chapter_upload_ic_edit div {
  26445. width: 18px;
  26446. height: 18px;
  26447. background-image: url("../../../assets/icon/new/edit_u.png");
  26448. background-size: 100% 100%;
  26449. }
  26450. .chapter_upload_ic_download {
  26451. height: 100%;
  26452. display: flex;
  26453. align-items: center;
  26454. cursor: pointer;
  26455. margin: 0;
  26456. }
  26457. .chapter_upload_ic_download div {
  26458. width: 18px;
  26459. height: 18px;
  26460. background-image: url("../../../assets/icon/course/download.svg");
  26461. background-size: 100% 100%;
  26462. }
  26463. .chapter_upload_ic_check {
  26464. height: 100%;
  26465. display: flex;
  26466. align-items: center;
  26467. cursor: pointer;
  26468. margin: 0 10px 0 0;
  26469. }
  26470. .chapter_upload_ic_check div {
  26471. width: 18px;
  26472. height: 18px;
  26473. background-image: url("../../../assets/icon/course/lookeye.svg");
  26474. background-size: 100% 100%;
  26475. }
  26476. .chapter_upload_ic_r {
  26477. height: 100%;
  26478. display: flex;
  26479. align-items: center;
  26480. cursor: pointer;
  26481. }
  26482. .chapter_upload_ic_r div {
  26483. width: 18px;
  26484. height: 18px;
  26485. background-image: url("../../../assets/icon/new/delete_u.png");
  26486. background-size: 100% 100%;
  26487. }
  26488. .chapter_upload_n {
  26489. display: flex;
  26490. text-indent: 10px;
  26491. text-decoration: none;
  26492. text-overflow: ellipsis;
  26493. white-space: nowrap;
  26494. overflow: hidden;
  26495. width: 55%;
  26496. margin-left: 10px;
  26497. cursor: pointer;
  26498. margin-top: 2px;
  26499. align-items: center;
  26500. }
  26501. .chapter_upload_n > .chapter_upload_box{
  26502. border: none;
  26503. outline: none;
  26504. max-width: 100%;
  26505. z-index: 99;
  26506. font-size: 14px;
  26507. white-space: nowrap;
  26508. overflow: hidden;
  26509. text-overflow: ellipsis;
  26510. color: #757575;
  26511. }
  26512. .chapter_upload_l_i2,
  26513. .chapter_upload_l_i3,
  26514. .chapter_upload_l_i8,
  26515. .chapter_upload_l_i6,
  26516. .chapter_upload_l_i12,
  26517. .chapter_upload_l_i14,
  26518. .chapter_upload_l_i13 {
  26519. width: 15px;
  26520. height: 15px;
  26521. background-size: 100% 100%;
  26522. }
  26523. .chapter_upload_l_i2 {
  26524. background-image: url("../../../assets/icon/new/u_word.png");
  26525. }
  26526. .chapter_upload_l_i3 {
  26527. background-image: url("../../../assets/icon/new/u_video.png");
  26528. }
  26529. .chapter_upload_l_i8 {
  26530. background-image: url("../../../assets/icon/new/u_url.png");
  26531. }
  26532. .chapter_upload_l_i14 {
  26533. background-image: url("../../../assets/icon/new/u_source.png");
  26534. }
  26535. .chapter_upload_l_i6 {
  26536. background-image: url("../../../assets/icon/new/u_picture.png");
  26537. }
  26538. .chapter_upload_l_i12 {
  26539. background-image: url("../../../assets/icon/new/u_word.png");
  26540. }
  26541. .chapter_upload_l_i13 {
  26542. background-image: url("../../../assets/icon/new/u_img.png");
  26543. }
  26544. .chapter_upload_noSee {
  26545. background-image: url("../../../assets/icon/new/u_noUpload.png");
  26546. width: 18px;
  26547. height: 18px;
  26548. background-size: 100% 100%;
  26549. display: block;
  26550. margin-right: 10px;
  26551. }
  26552. .chapter_upload_ud {
  26553. display: flex;
  26554. flex-direction: row;
  26555. justify-content: center;
  26556. margin: 0 10px 0 0;
  26557. }
  26558. .chapter_upload_ud>.chapter_upload_up {
  26559. margin-bottom: 0;
  26560. margin-right: 10px;
  26561. }
  26562. .chapter_upload_down,
  26563. .chapter_upload_up {
  26564. width: 20px;
  26565. height: 20px;
  26566. background: #e4eaf2;
  26567. cursor: pointer;
  26568. margin: 0 auto;
  26569. border-radius: 5px;
  26570. display: flex;
  26571. justify-content: center;
  26572. align-items: center;
  26573. }
  26574. .chapter_upload_up::after,
  26575. .chapter_upload_down::after {
  26576. content: "";
  26577. background-image: url("../../../assets/icon/new/downBtn.png");
  26578. width: 13px;
  26579. height: 13px;
  26580. background-size: 100% 100%;
  26581. display: block;
  26582. }
  26583. .chapter_upload_up::after {
  26584. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  26585. }
  26586. .chapter_upload_up {
  26587. margin-bottom: 5px;
  26588. }
  26589. .chapter_upload_ud2 {
  26590. display: flex;
  26591. flex-direction: row;
  26592. justify-content: center;
  26593. margin: 0 10px 0 0;
  26594. }
  26595. .chapter_upload_ud2>.chapter_upload_up2 {
  26596. margin-bottom: 0;
  26597. margin-right: 10px;
  26598. }
  26599. .chapter_upload_down2,
  26600. .chapter_upload_up2 {
  26601. cursor: pointer;
  26602. margin: 0 auto;
  26603. border-radius: 5px;
  26604. display: flex;
  26605. justify-content: center;
  26606. align-items: center;
  26607. color: #717c8d;
  26608. font-size: 14px;
  26609. }
  26610. .chapter_upload_up2 {
  26611. margin-right: 10px;
  26612. }
  26613. .chapter_upload_up2::before,
  26614. .chapter_upload_down2::before {
  26615. content: "";
  26616. background-image: url("../../../assets/icon/new/c_down.png");
  26617. width: 14px;
  26618. height: 14px;
  26619. background-size: 100% 100%;
  26620. display: block;
  26621. margin-right: 5px;
  26622. }
  26623. .chapter_upload_up2::before {
  26624. background-image: url("../../../assets/icon/new/c_up.png") !important;
  26625. }
  26626. .addWordStyle {
  26627. display: flex;
  26628. flex-direction: row;
  26629. justify-content: flex-start;
  26630. overflow-x: auto;
  26631. white-space: nowrap;
  26632. flex-wrap: wrap;
  26633. }
  26634. /* table 样式 */
  26635. .cont>>>table {
  26636. border-top: 1px solid #ccc;
  26637. border-left: 1px solid #ccc;
  26638. }
  26639. .cont>>>table td,
  26640. .cont>>>table th {
  26641. border-bottom: 1px solid #ccc;
  26642. border-right: 1px solid #ccc;
  26643. /* padding: 20px 5px; */
  26644. padding: 5px 10px;
  26645. max-width: 0px;
  26646. height: 30px;
  26647. vertical-align: baseline;
  26648. }
  26649. .cont>>>table th {
  26650. border-bottom: 2px solid #ccc;
  26651. text-align: center;
  26652. }
  26653. /* blockquote 样式 */
  26654. .cont>>>blockquote {
  26655. display: block;
  26656. border-left: 8px solid #d0e5f2;
  26657. padding: 5px 10px;
  26658. margin: 10px 0;
  26659. line-height: 1.4;
  26660. font-size: 100%;
  26661. background-color: #f1f1f1;
  26662. }
  26663. /* code 样式 */
  26664. .cont>>>code {
  26665. display: inline-block;
  26666. /* *display: inline; */
  26667. zoom: 1;
  26668. background-color: #f1f1f1;
  26669. border-radius: 3px;
  26670. padding: 3px 5px;
  26671. margin: 0 3px;
  26672. }
  26673. .cont>>>pre code {
  26674. display: block;
  26675. }
  26676. /* ul ol 样式 */
  26677. .cont>>>ul,
  26678. ol {
  26679. margin: 10px 0 10px 20px;
  26680. }
  26681. .wordbox {
  26682. display: flex;
  26683. flex-wrap: wrap;
  26684. cursor: pointer;
  26685. width: 100%;
  26686. }
  26687. .checkword {
  26688. width: 22px;
  26689. height: 22px;
  26690. margin: 10px auto 0;
  26691. cursor: pointer;
  26692. }
  26693. .checkword img {
  26694. width: 100%;
  26695. }
  26696. .stepBg {
  26697. display: flex;
  26698. justify-content: space-between;
  26699. align-items: center;
  26700. background: #fff;
  26701. width: calc(100%);
  26702. margin: 0 auto;
  26703. }
  26704. .stepBorder {
  26705. height: 3px !important;
  26706. background: #cad1dc;
  26707. width: 100px !important;
  26708. margin: 0 15px !important;
  26709. position: relative;
  26710. }
  26711. .border-active {
  26712. background: #3681fc !important;
  26713. }
  26714. .border-active::before,
  26715. .border-active::after {
  26716. border-color: #3681fc !important;
  26717. }
  26718. .stepBorder::before,
  26719. .stepBorder::after {
  26720. content: "";
  26721. width: 9px;
  26722. height: 9px;
  26723. background: #ffffff;
  26724. opacity: 1;
  26725. border: 2px solid #acb4bf;
  26726. display: block;
  26727. box-sizing: border-box;
  26728. border-radius: 50%;
  26729. position: absolute;
  26730. top: 50%;
  26731. transform: translateY(-50%);
  26732. }
  26733. .stepBorder::after {
  26734. right: -9px;
  26735. }
  26736. .stepTop {
  26737. width: 100%;
  26738. /* border-radius: 10px; */
  26739. display: flex;
  26740. justify-content: center;
  26741. align-items: center;
  26742. flex-wrap: nowrap;
  26743. background: #fff;
  26744. /* top: 18%; */
  26745. height: 80px;
  26746. border-bottom: 2px solid rgb(228, 232, 237);
  26747. box-sizing: border-box;
  26748. }
  26749. .stepTop2 {
  26750. width: 100%;
  26751. /* border-radius: 10px; */
  26752. display: flex;
  26753. justify-content: center;
  26754. align-items: center;
  26755. flex-wrap: nowrap;
  26756. background: #fff;
  26757. /* top: 18%; */
  26758. height: 20px;
  26759. border-bottom: 2px solid rgb(228, 232, 237);
  26760. box-sizing: border-box;
  26761. overflow: hidden;
  26762. cursor: pointer;
  26763. }
  26764. .stepTop>div img {
  26765. width: 100%;
  26766. }
  26767. .stepTop>div {
  26768. height: 50px;
  26769. width: 180px;
  26770. cursor: pointer;
  26771. margin: 10px 0;
  26772. border-radius: 10px;
  26773. }
  26774. .first,
  26775. .second,
  26776. .third,
  26777. .four {
  26778. background: #3681fc;
  26779. height: 90px;
  26780. color: #fff;
  26781. display: flex;
  26782. flex-direction: row;
  26783. align-items: center;
  26784. justify-content: center;
  26785. }
  26786. .first>div:nth-child(1),
  26787. .second>div:nth-child(1),
  26788. .third>div:nth-child(1),
  26789. .four>div:nth-child(1) {
  26790. margin: 5px 10px 0 0;
  26791. width: 2rem;
  26792. }
  26793. .firstNo,
  26794. .secondNo,
  26795. .thirdNo,
  26796. .fourNo {
  26797. background: #e7e7e7;
  26798. color: #adadad;
  26799. display: flex;
  26800. flex-direction: row;
  26801. align-items: center;
  26802. justify-content: center;
  26803. }
  26804. .firstNo>div:nth-child(1),
  26805. .secondNo>div:nth-child(1),
  26806. .thirdNo>div:nth-child(1),
  26807. .fourNo>div:nth-child(1) {
  26808. margin: 5px 10px 0 0;
  26809. width: 2rem;
  26810. }
  26811. .uploadWidth>>>.el-upload {
  26812. width: 60px;
  26813. height: 60px;
  26814. position: relative;
  26815. }
  26816. .addPeople {
  26817. background: #fa6060;
  26818. width: 150px;
  26819. height: 40px;
  26820. color: #fff;
  26821. border-radius: 5px;
  26822. text-align: center;
  26823. line-height: 40px;
  26824. font-size: 14px;
  26825. cursor: pointer;
  26826. }
  26827. .kcImg {
  26828. width: 60px;
  26829. margin-left: 10px;
  26830. }
  26831. .zyImg {
  26832. width: 55px;
  26833. margin: 0 10px;
  26834. }
  26835. .deleteZy {
  26836. width: 20px;
  26837. position: absolute;
  26838. top: 5px;
  26839. right: 5px;
  26840. cursor: pointer;
  26841. }
  26842. .kcImg>img,
  26843. .zyImg>img,
  26844. .deleteZy>img {
  26845. width: 100%;
  26846. height: 100%;
  26847. }
  26848. .zyBox {
  26849. display: flex;
  26850. flex-direction: row;
  26851. align-items: center;
  26852. background: #67d37d;
  26853. color: #fff;
  26854. width: 210px;
  26855. margin: 20px 20px 0 0;
  26856. border-radius: 10px;
  26857. height: 70px;
  26858. position: relative;
  26859. }
  26860. .upCss {
  26861. display: flex;
  26862. flex-direction: row;
  26863. justify-content: flex-start;
  26864. }
  26865. .upCss>>>.el-icon-plus {
  26866. position: none !important;
  26867. width: 200px;
  26868. height: 100px;
  26869. display: flex;
  26870. flex-wrap: nowrap;
  26871. flex-direction: column;
  26872. align-items: center;
  26873. justify-content: center;
  26874. border: 1px dashed #ccc;
  26875. min-width: 78px;
  26876. min-height: 100px;
  26877. z-index: 999;
  26878. }
  26879. .upCss>>>.el-upload-list__item-name {
  26880. width: 100px;
  26881. white-space: nowrap;
  26882. overflow: hidden;
  26883. text-overflow: ellipsis;
  26884. }
  26885. .upCss>>>.el-upload-list__item .el-icon-close {
  26886. font-size: 20px;
  26887. z-index: 9999;
  26888. }
  26889. .addStageImg {
  26890. min-width: 20px;
  26891. min-height: 20px;
  26892. width: 20px;
  26893. height: 20px;
  26894. cursor: pointer;
  26895. }
  26896. .addHW {
  26897. width: 28px;
  26898. height: 28px;
  26899. cursor: pointer;
  26900. }
  26901. .addStageImg>img,
  26902. .addHW>img {
  26903. width: 100%;
  26904. height: 100%;
  26905. }
  26906. .addNewPP>>>.el-dialog__body {
  26907. padding: 5px 20px;
  26908. }
  26909. .addNewPP>>>.el-dialog {
  26910. margin-top: 5vh !important;
  26911. }
  26912. .addNewPP2>>>.el-dialog__body {
  26913. padding: 5px 0;
  26914. }
  26915. .addNewPP2>>>.el-dialog {
  26916. margin-top: 5vh !important;
  26917. }
  26918. .isHeight {
  26919. height: 680px;
  26920. }
  26921. .toolChoose {
  26922. display: flex;
  26923. /* width: 100%; */
  26924. flex-direction: row;
  26925. flex-wrap: wrap;
  26926. }
  26927. .tool,
  26928. .isToolChoose {
  26929. display: flex;
  26930. flex-direction: column;
  26931. flex-wrap: nowrap;
  26932. width: fit-content;
  26933. margin: 10px 0 10px 0;
  26934. align-items: center;
  26935. border: 2px solid #dbdbdb00;
  26936. padding: 10px 20px;
  26937. border-radius: 5px;
  26938. cursor: pointer;
  26939. /* box-shadow: 0 0 2px 0px #dedede; */
  26940. position: relative;
  26941. box-sizing: border-box;
  26942. }
  26943. .tool:hover {
  26944. border: 2px solid #a5c7ff;
  26945. }
  26946. .tool:hover>.noCTool {
  26947. display: block;
  26948. opacity: 0.5;
  26949. }
  26950. .isToolChoose {
  26951. border: 2px solid #438aff !important;
  26952. box-shadow: 0 0 2px 0px #438aff;
  26953. opacity: 1 !important;
  26954. }
  26955. .isCTool,
  26956. .noCTool {
  26957. width: 30px;
  26958. height: 30px;
  26959. position: absolute;
  26960. top: -4px;
  26961. right: -4px;
  26962. }
  26963. .noCTool {
  26964. display: none;
  26965. }
  26966. .isCTool>img,
  26967. .noCTool>img {
  26968. width: 100%;
  26969. height: 100%;
  26970. }
  26971. .tool+.tool {
  26972. margin-right: 10px;
  26973. }
  26974. .whiteBIcon {
  26975. width: 60px;
  26976. cursor: pointer;
  26977. display: flex;
  26978. flex-direction: column;
  26979. flex-wrap: nowrap;
  26980. align-items: center;
  26981. font-size: 14px;
  26982. }
  26983. .whiteBIcon>img,
  26984. .toolIcon>img,
  26985. .arrow>img {
  26986. width: 100%;
  26987. height: 100%;
  26988. }
  26989. .check img {
  26990. width: 20px;
  26991. height: 20px;
  26992. }
  26993. .whiteBIcon>img {
  26994. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  26995. border-radius: 15px;
  26996. }
  26997. .whiteBIcon>div:nth-child(2) {
  26998. height: 20px;
  26999. line-height: 20px;
  27000. text-align: center;
  27001. }
  27002. .check {
  27003. /* width: 20px;
  27004. height: 20px; */
  27005. cursor: pointer;
  27006. margin: 10px 0 0;
  27007. }
  27008. .checkDiv {
  27009. display: flex;
  27010. align-items: center;
  27011. }
  27012. .checkDiv span {
  27013. margin-left: 5px;
  27014. color: #858585;
  27015. }
  27016. .customWidth>>>.el-dialog {
  27017. min-width: 600px !important;
  27018. }
  27019. .CollaborativeCss {
  27020. width: 100%;
  27021. display: flex;
  27022. justify-content: center;
  27023. align-items: center;
  27024. box-sizing: border-box;
  27025. padding: 10px 0;
  27026. cursor: pointer;
  27027. }
  27028. .CollaborativeCss >>> .el-tooltip {
  27029. overflow: hidden;
  27030. white-space: nowrap;
  27031. text-overflow: ellipsis;
  27032. }
  27033. .CollaborativeCss2 {
  27034. background: #e0eafb;
  27035. color: #3681fc;
  27036. font-weight: 700;
  27037. border-radius: 5px;
  27038. }
  27039. .a_addBox {
  27040. margin: 10px 0;
  27041. background: #fff;
  27042. padding: 15px;
  27043. /* max-height: 600px; */
  27044. overflow: auto;
  27045. }
  27046. .a_add_box {
  27047. border-bottom: 2px solid #eee;
  27048. padding-bottom: 25px;
  27049. }
  27050. .a_add_head {
  27051. display: flex;
  27052. align-items: center;
  27053. justify-content: space-between;
  27054. margin: 10px 0 0 0;
  27055. font-size: 18px;
  27056. }
  27057. .a_add_checkType {
  27058. margin-top: 10px;
  27059. display: flex;
  27060. font-size: 14px;
  27061. align-items: center;
  27062. }
  27063. .a_add_checkType span {
  27064. box-sizing: border-box;
  27065. padding: 0 0 5px 0;
  27066. cursor: pointer;
  27067. }
  27068. .a_add_checkType span+span {
  27069. margin-left: 10px;
  27070. }
  27071. .a_add_checkType .active {
  27072. border-bottom: 2px solid #409eff;
  27073. color: #409eff;
  27074. }
  27075. .a_add_head .a_add_head_input {
  27076. /* width: 540px; */
  27077. width: 100%;
  27078. }
  27079. .a_add_head .a_add_head_div {
  27080. display: flex;
  27081. align-items: center;
  27082. justify-content: space-between;
  27083. }
  27084. .a_add_body {
  27085. display: flex;
  27086. /* align-items: center; */
  27087. align-items: flex-end;
  27088. }
  27089. .a_add_input {
  27090. display: flex;
  27091. align-items: center;
  27092. flex-wrap: wrap;
  27093. }
  27094. .a_add_input_choice {
  27095. flex-direction: column;
  27096. margin-right: 10px;
  27097. }
  27098. .a_add_input_choice>>>.el-radio {
  27099. display: flex;
  27100. align-items: center;
  27101. flex-direction: row-reverse;
  27102. margin: 30px 0 0 0;
  27103. position: relative;
  27104. }
  27105. .a_add_input_choice>>>.el-checkbox {
  27106. display: flex;
  27107. align-items: center;
  27108. flex-direction: row-reverse;
  27109. margin: 30px 0 0 0;
  27110. position: relative;
  27111. }
  27112. .width100 {
  27113. width: 100%;
  27114. }
  27115. .a_add_input .a_add_persent {
  27116. width: 100%;
  27117. }
  27118. .a_add_persent_div {
  27119. width: 100%;
  27120. display: flex;
  27121. align-items: center;
  27122. }
  27123. .a_add_persent_div span {
  27124. margin: 5px 0;
  27125. }
  27126. .a_add_persent_div span:nth-child(1) {
  27127. width: 30%;
  27128. }
  27129. .a_add_persent_div span:nth-child(2) {
  27130. width: 7%;
  27131. }
  27132. .a_add_persent_div span:nth-child(3) {
  27133. width: 40%;
  27134. }
  27135. .a_add_body_div {
  27136. display: flex;
  27137. align-items: center;
  27138. justify-content: center;
  27139. /* flex-direction: column; */
  27140. position: absolute;
  27141. right: -20px;
  27142. transform: translateX(100%);
  27143. }
  27144. .a_add_body_div>>>.el-button--primary {
  27145. background: #466b99;
  27146. border: none;
  27147. }
  27148. .all_choose {
  27149. display: flex;
  27150. flex-direction: row;
  27151. align-items: flex-start;
  27152. width: 100%;
  27153. }
  27154. .all_choose+.all_choose {
  27155. /* margin-top: 10px */
  27156. }
  27157. .all_choose>span {
  27158. min-width: fit-content;
  27159. display: block;
  27160. white-space: nowrap;
  27161. overflow: hidden;
  27162. text-overflow: ellipsis;
  27163. margin-right: 20px;
  27164. font-weight: bold;
  27165. font-size: 14px;
  27166. }
  27167. .all_choose>>>.el-checkbox-group {
  27168. display: flex;
  27169. flex-direction: row;
  27170. width: 100%;
  27171. flex-wrap: wrap;
  27172. align-content: center;
  27173. justify-content: flex-start;
  27174. align-items: center;
  27175. margin-top: 3px;
  27176. }
  27177. .all_choose>.el-checkbox-group>>>.el-checkbox {
  27178. margin-bottom: 10px;
  27179. display: flex;
  27180. flex-direction: row;
  27181. align-items: center;
  27182. margin-right: 10px;
  27183. }
  27184. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  27185. min-width: 80px;
  27186. overflow: hidden;
  27187. width: 80px;
  27188. text-overflow: ellipsis;
  27189. white-space: nowrap;
  27190. }
  27191. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  27192. width: auto;
  27193. }
  27194. .choose>div:nth-child(3)>span {
  27195. /* letter-spacing: 0 !important; */
  27196. }
  27197. .choose {
  27198. display: flex;
  27199. flex-direction: column;
  27200. flex-wrap: nowrap;
  27201. height: 100%;
  27202. justify-content: space-evenly;
  27203. align-items: flex-start;
  27204. }
  27205. .both {
  27206. display: flex;
  27207. flex-direction: row;
  27208. flex-wrap: wrap;
  27209. width: 100%;
  27210. align-items: center;
  27211. justify-content: flex-start;
  27212. margin: 0 0 15px;
  27213. }
  27214. .notice>>>.el-dialog {
  27215. width: 500px !important;
  27216. text-align: center;
  27217. }
  27218. .notice>>>.el-button {
  27219. margin-top: 20px;
  27220. }
  27221. .whiteBg {
  27222. /* background: #fff; */
  27223. border-radius: 10px;
  27224. }
  27225. .wb_j_box {
  27226. display: flex;
  27227. width: 100%;
  27228. padding: 0 20px 0;
  27229. box-sizing: border-box;
  27230. }
  27231. .wb_j_box_content {
  27232. width: calc(100% - 55% - 100px);
  27233. display: flex;
  27234. align-items: center;
  27235. }
  27236. .wb_j_box_p_box {
  27237. max-width: calc(100% - 200px);
  27238. word-break: break-all;
  27239. overflow: hidden;
  27240. margin: 0 0 0 10px;
  27241. font-size: 14px;
  27242. color: #6e6e6e;
  27243. z-index: 999;
  27244. }
  27245. .chooseWho {
  27246. display: flex;
  27247. width: 410px;
  27248. flex-direction: row;
  27249. flex-wrap: nowrap;
  27250. justify-content: space-between;
  27251. padding-bottom: 10px;
  27252. }
  27253. .chooseWho>div {
  27254. cursor: pointer;
  27255. padding-bottom: 10px;
  27256. font-weight: bold;
  27257. }
  27258. .isChooseActive {
  27259. color: #3e88f4;
  27260. border-bottom: 2px solid #2f80f3;
  27261. }
  27262. .toolSort {
  27263. display: flex;
  27264. flex-direction: row;
  27265. flex-wrap: wrap;
  27266. justify-content: flex-start;
  27267. align-items: flex-start;
  27268. }
  27269. .toolSort>div {
  27270. margin-right: 10px;
  27271. }
  27272. .tools {
  27273. width: 100%;
  27274. display: flex;
  27275. flex-direction: column;
  27276. flex-wrap: nowrap;
  27277. align-items: flex-start;
  27278. }
  27279. .leftTools,
  27280. .rightTools {
  27281. width: 50%;
  27282. }
  27283. .leftTools+.leftTools {
  27284. border-top: 1px solid #dbdbdb;
  27285. padding-top: 30px;
  27286. }
  27287. .rightTools {
  27288. display: flex;
  27289. flex-direction: row;
  27290. flex-wrap: nowrap;
  27291. justify-content: space-around;
  27292. }
  27293. .firstToolList {
  27294. display: flex;
  27295. flex-direction: column;
  27296. flex-wrap: nowrap;
  27297. align-items: center;
  27298. }
  27299. .iconList {
  27300. display: flex;
  27301. flex-direction: row;
  27302. flex-wrap: wrap;
  27303. justify-content: flex-start;
  27304. align-items: center;
  27305. margin: 20px 0 5px 0;
  27306. width: 240px;
  27307. min-width: 240px;
  27308. }
  27309. .iconTool {
  27310. display: flex;
  27311. flex-direction: column;
  27312. flex-wrap: nowrap;
  27313. align-items: center;
  27314. justify-content: flex-start;
  27315. margin: 15px 10px;
  27316. }
  27317. .toolIcon {
  27318. width: 50px;
  27319. }
  27320. .taskBorder {
  27321. /* border: 1px solid #CAD1DC; */
  27322. border-radius: 10px;
  27323. margin-top: 10px;
  27324. min-height: 670px;
  27325. position: relative;
  27326. background: #fff;
  27327. padding: 20px;
  27328. overflow: hidden;
  27329. box-sizing: border-box;
  27330. }
  27331. .smallTaskBorder {
  27332. height: 405px;
  27333. min-height: 405px !important;
  27334. overflow: hidden;
  27335. }
  27336. /* .taskBorder>div {
  27337. padding: 30px 30px 10px;
  27338. } */
  27339. .addTaskBorder {
  27340. /* border: 2px solid #5E9AFC; */
  27341. border-radius: 8px;
  27342. margin-top: 10px;
  27343. cursor: pointer;
  27344. /* height: 50px;
  27345. line-height: 50px; */
  27346. background: #fff;
  27347. padding: 15px 0;
  27348. display: flex;
  27349. align-items: center;
  27350. justify-content: center;
  27351. }
  27352. /* .addTaskBorder>div {
  27353. margin: 0 auto;
  27354. display: flex;
  27355. align-items: center;
  27356. justify-content: center;
  27357. }
  27358. .addTaskBorder>div>img {
  27359. width: 20px;
  27360. }
  27361. .addTaskBorder>div>span {
  27362. font-size: 16px;
  27363. margin-left: 10px;
  27364. color: #5E9AFC;
  27365. } */
  27366. .funBlock {
  27367. display: flex;
  27368. padding: 15px 0;
  27369. flex-direction: row;
  27370. justify-content: center;
  27371. align-items: center;
  27372. position: absolute;
  27373. right: 0;
  27374. bottom: 0;
  27375. background: #fff;
  27376. width: 100%;
  27377. height: 60px;
  27378. z-index: 9;
  27379. }
  27380. .fold {
  27381. display: flex;
  27382. margin: 0 20px;
  27383. flex-direction: row;
  27384. align-items: center;
  27385. cursor: pointer;
  27386. color: #2b7bff;
  27387. }
  27388. .arrow {
  27389. margin-right: 8px;
  27390. width: 16px;
  27391. height: 16px;
  27392. min-width: 16px;
  27393. min-height: 16px;
  27394. background-size: 100% 100%;
  27395. display: block;
  27396. background-image: url(../../../assets/icon/new/u_up.png);
  27397. /* border-left: 7px solid transparent;
  27398. border-bottom: 7px solid #717C8D;
  27399. border-top: 0px solid transparent;
  27400. border-right: 7px solid transparent; */
  27401. /* box-sizing: border-box; */
  27402. transition: all 0.3s;
  27403. }
  27404. .arrowZ {
  27405. transform: rotate(180deg);
  27406. }
  27407. .addToolFun {
  27408. display: flex;
  27409. width: 150px;
  27410. flex-direction: row;
  27411. align-items: center;
  27412. justify-content: center;
  27413. border: 2px dashed #cad1dc;
  27414. border-radius: 5px;
  27415. height: 50px;
  27416. margin: 35px auto 0;
  27417. cursor: pointer;
  27418. }
  27419. .addToolFun2 {
  27420. display: flex;
  27421. width: 150px;
  27422. border: 2px dashed #cad1dc;
  27423. flex-direction: row;
  27424. align-items: center;
  27425. justify-content: center;
  27426. border-radius: 5px;
  27427. height: 50px;
  27428. margin: 0 auto 0;
  27429. cursor: pointer;
  27430. }
  27431. .addToolFun2>div,
  27432. .addToolFun>div {
  27433. display: flex;
  27434. line-height: 50px;
  27435. }
  27436. .addToolImg {
  27437. width: 20px;
  27438. height: 20px;
  27439. margin-right: 10px;
  27440. }
  27441. .addToolsDia>>>.el-dialog__body {
  27442. padding: 20px;
  27443. }
  27444. .addToolsDia>>>.el-dialog__body>.toolChoose {
  27445. padding: 0;
  27446. }
  27447. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  27448. padding: 0;
  27449. border-bottom: none;
  27450. margin-bottom: 0;
  27451. }
  27452. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  27453. width: 100%;
  27454. }
  27455. .lineCss>>>.el-form-item__label {
  27456. width: auto !important;
  27457. }
  27458. .lineCss>>>.el-form-item__content {
  27459. margin-left: 50px !important;
  27460. }
  27461. .newSteps {
  27462. display: flex;
  27463. width: 100% !important;
  27464. /* height: 80px; */
  27465. cursor: pointer;
  27466. margin: 10px 0;
  27467. border-radius: 10px;
  27468. flex-direction: row;
  27469. align-content: center;
  27470. justify-content: center;
  27471. align-items: center;
  27472. margin: 0 !important;
  27473. }
  27474. /* 评价样式 */
  27475. .elist_css {
  27476. padding-bottom: 75px !important;
  27477. }
  27478. .elist_title {
  27479. margin-bottom: 10px;
  27480. }
  27481. .elist_input {
  27482. width: 100%;
  27483. }
  27484. .elist_input_box {
  27485. display: flex;
  27486. align-items: center;
  27487. flex-wrap: wrap;
  27488. }
  27489. .elist_input_box+.elist_input_box {
  27490. margin-top: 30px;
  27491. }
  27492. .elist_input .elist_input_box input {
  27493. font: inherit;
  27494. color: currentColor;
  27495. width: 100%;
  27496. /* max-width: calc(100% - 385px); */
  27497. max-width: calc(100% - 150px);
  27498. padding: 8px 14px;
  27499. display: block;
  27500. min-width: 0;
  27501. outline: none;
  27502. border: 1px solid rgba(0, 0, 0, 0.23);
  27503. border-radius: 4px;
  27504. box-sizing: border-box;
  27505. background: #fff;
  27506. margin: 0 20px 0 0;
  27507. }
  27508. .elist_input .elist_input_box span {
  27509. height: 36px;
  27510. line-height: 36px;
  27511. color: rgb(82, 82, 82);
  27512. min-width: 80px;
  27513. }
  27514. .elist_input .elist_input_box .remove {
  27515. height: 20px;
  27516. width: 20px;
  27517. min-height: 20px;
  27518. min-width: 20px;
  27519. background-size: 100% 100%;
  27520. background-position: unset;
  27521. margin-left: 5px;
  27522. }
  27523. .elist_input_box>>>.el-rate {
  27524. display: flex;
  27525. height: 36px;
  27526. align-items: center;
  27527. }
  27528. .elist_input_box .elist_inptu_text {
  27529. width: 100%;
  27530. display: flex;
  27531. align-items: center;
  27532. margin-top: 10px;
  27533. }
  27534. .elist_input_box .elist_inptu_text input {
  27535. /* width: 500px; */
  27536. width: 100%;
  27537. max-width: unset;
  27538. }
  27539. .elist_input_box>>>.el-rate__icon {
  27540. font-size: 24px;
  27541. }
  27542. .elist_btn {
  27543. margin-top: 10px;
  27544. }
  27545. .lineTitle {
  27546. /* margin-top: 15px; */
  27547. width: 110px;
  27548. font-size: 16px;
  27549. display: flex;
  27550. align-items: center;
  27551. line-height: 20px;
  27552. }
  27553. .lineTitle::before {
  27554. content: "";
  27555. display: block;
  27556. width: 3px;
  27557. height: 20px;
  27558. background: #0061ff;
  27559. border-radius: 3px;
  27560. margin: 0 5px 0 0;
  27561. }
  27562. .clineTitle::before {
  27563. content: "";
  27564. display: block;
  27565. min-width: 10px;
  27566. width: 10px;
  27567. height: 10px;
  27568. background: #0061ff;
  27569. border-radius: 50%;
  27570. margin: 0 5px 0 0;
  27571. }
  27572. .courseTop {
  27573. display: flex;
  27574. flex-direction: row;
  27575. justify-content: space-between;
  27576. align-items: center;
  27577. width: calc(100%);
  27578. margin: 0 auto;
  27579. padding: 10px 20px;
  27580. box-sizing: border-box;
  27581. position: absolute;
  27582. top: 0;
  27583. }
  27584. .stepsNav {
  27585. display: flex;
  27586. flex-direction: row;
  27587. justify-content: flex-start;
  27588. align-items: center;
  27589. }
  27590. .stepsWord {
  27591. font-size: 18px;
  27592. color: #fff;
  27593. font-weight: bold;
  27594. margin-left: auto;
  27595. background: rgb(15, 126, 255);
  27596. border-radius: 5px;
  27597. padding: 3px 25px;
  27598. box-sizing: border-box;
  27599. }
  27600. .stepBox {
  27601. width: calc(100% - 40px);
  27602. height: calc(100%);
  27603. overflow: hidden;
  27604. border-radius: 5px;
  27605. margin: 0 auto;
  27606. }
  27607. .rightBox {
  27608. width: calc(100%);
  27609. background: #f0f2f5;
  27610. /* border-radius: 10px; */
  27611. overflow: auto;
  27612. height: calc(100% - 150px);
  27613. margin: 0 auto;
  27614. position: relative;
  27615. box-sizing: border-box;
  27616. }
  27617. .e_add_top {
  27618. display: flex;
  27619. justify-content: space-between;
  27620. background: #fff;
  27621. position: absolute;
  27622. right: 20px;
  27623. height: 50px;
  27624. align-items: center;
  27625. }
  27626. .e_add_title2 {
  27627. display: flex;
  27628. align-items: center;
  27629. }
  27630. .e_add_title2 span {
  27631. width: 40px;
  27632. }
  27633. .e_add_title {
  27634. display: flex;
  27635. align-items: center;
  27636. color: #b8b8b8;
  27637. font-size: 18px;
  27638. position: relative;
  27639. height: 40px;
  27640. }
  27641. .e_add_title span {
  27642. margin-right: 10px;
  27643. }
  27644. .e_add_title .el_input {
  27645. width: 300px;
  27646. }
  27647. .e_add_title>>>.el-input__inner {
  27648. width: 400px;
  27649. }
  27650. .e_add_btn {}
  27651. .e_add_content {
  27652. display: flex;
  27653. width: 100%;
  27654. }
  27655. .e_add_list {
  27656. background: #fff;
  27657. height: 500px;
  27658. width: 210px;
  27659. position: relative;
  27660. margin: 15px 5px 0 0;
  27661. flex-shrink: 0;
  27662. display: flex;
  27663. flex-direction: column;
  27664. }
  27665. .e_add_list_title {
  27666. font-size: 20px;
  27667. width: 100%;
  27668. box-sizing: border-box;
  27669. padding: 15px 40px;
  27670. text-align: center;
  27671. border-bottom: 1px solid #eaeaea;
  27672. position: relative;
  27673. display: flex;
  27674. align-items: center;
  27675. justify-content: center;
  27676. height: 57px;
  27677. background: #f6f6f6;
  27678. }
  27679. .e_add_list_title span {
  27680. overflow: hidden;
  27681. white-space: nowrap;
  27682. text-overflow: ellipsis;
  27683. }
  27684. .e_add_list_title img {
  27685. position: absolute;
  27686. right: 15px;
  27687. width: 25px;
  27688. cursor: pointer;
  27689. top: 50%;
  27690. transform: translateY(-50%);
  27691. }
  27692. .e_add_list_body {
  27693. height: calc(100% - 187px);
  27694. overflow: auto;
  27695. }
  27696. .e_add_list_child {
  27697. width: 100%;
  27698. display: flex;
  27699. align-items: center;
  27700. justify-content: center;
  27701. position: relative;
  27702. box-sizing: border-box;
  27703. padding: 15px 40px;
  27704. text-align: center;
  27705. }
  27706. .e_add_list_child span {
  27707. overflow: hidden;
  27708. white-space: nowrap;
  27709. text-overflow: ellipsis;
  27710. cursor: pointer;
  27711. }
  27712. .e_add_list_child img {
  27713. position: absolute;
  27714. right: 10px;
  27715. width: 21px;
  27716. cursor: pointer;
  27717. top: 50%;
  27718. transform: translateY(-50%);
  27719. }
  27720. .e_add_list_child+.e_add_list_child {
  27721. border-top: 1px solid #eaeaea;
  27722. }
  27723. .e_add_list_child .active {
  27724. color: #409eff;
  27725. }
  27726. .e_add_list_btn {
  27727. position: absolute;
  27728. bottom: 0;
  27729. height: 50px;
  27730. background: rgb(120, 120, 254);
  27731. width: 100%;
  27732. color: #fff;
  27733. font-size: 16px;
  27734. text-align: center;
  27735. line-height: 50px;
  27736. cursor: pointer;
  27737. }
  27738. .e_add_list_detail {
  27739. position: absolute;
  27740. bottom: 0;
  27741. height: 130px;
  27742. background: rgb(120, 120, 254);
  27743. width: 100%;
  27744. color: #fff;
  27745. font-size: 16px;
  27746. display: flex;
  27747. align-items: center;
  27748. justify-content: center;
  27749. }
  27750. .e_add_list_detail textarea {
  27751. height: 90%;
  27752. width: 95%;
  27753. border: none;
  27754. resize: none;
  27755. outline: none;
  27756. padding: 5px;
  27757. box-sizing: border-box;
  27758. }
  27759. .e_add_list_pbox {
  27760. width: 100%;
  27761. }
  27762. .e_add_list_pbox_title {
  27763. height: 50px;
  27764. background: #fff;
  27765. display: flex;
  27766. align-items: center;
  27767. width: 100%;
  27768. box-sizing: border-box;
  27769. padding: 0 20px;
  27770. flex-direction: row;
  27771. flex-wrap: wrap;
  27772. }
  27773. .type_title {
  27774. font-size: 18px;
  27775. font-weight: 700;
  27776. }
  27777. .type_content {
  27778. font-size: 16px;
  27779. margin-left: 30px;
  27780. }
  27781. .type_content span+span {
  27782. margin-left: 20px;
  27783. }
  27784. .type_content span {
  27785. cursor: pointer;
  27786. padding-bottom: 5px;
  27787. box-sizing: border-box;
  27788. }
  27789. .type_content .active {
  27790. color: #409eff;
  27791. border-bottom: 2px solid #409eff;
  27792. }
  27793. .e_add_list_pbox_content {
  27794. height: calc(100% - 50px);
  27795. display: flex;
  27796. align-items: center;
  27797. width: 100%;
  27798. background: #fff;
  27799. }
  27800. .mbCss {
  27801. width: 100%;
  27802. display: flex;
  27803. flex-direction: row;
  27804. flex-wrap: nowrap;
  27805. align-content: center;
  27806. align-items: flex-start;
  27807. justify-content: flex-start;
  27808. }
  27809. .pjCss {
  27810. /* width: 42%; */
  27811. width: calc(100% - 55%);
  27812. display: flex;
  27813. flex-direction: column;
  27814. flex-wrap: nowrap;
  27815. align-items: flex-start;
  27816. }
  27817. .e_box {
  27818. /* display: flex; */
  27819. flex-wrap: wrap;
  27820. max-height: 500px;
  27821. align-items: flex-start;
  27822. overflow: auto;
  27823. width: 100%;
  27824. }
  27825. .e_card {
  27826. border: 1px solid #ccc;
  27827. background: #fff;
  27828. margin-right: 20px;
  27829. width: 270px;
  27830. display: flex;
  27831. flex-direction: column;
  27832. align-items: center;
  27833. border-radius: 5px;
  27834. margin-top: 10px;
  27835. text-align: center;
  27836. }
  27837. .e_card_picture {
  27838. margin: 10px 0;
  27839. }
  27840. .e_card_picture>img {
  27841. width: 50px;
  27842. }
  27843. .e_card_name {
  27844. width: 100%;
  27845. padding: 0 10px;
  27846. box-sizing: border-box;
  27847. margin-bottom: 10px;
  27848. overflow: hidden;
  27849. text-overflow: ellipsis;
  27850. white-space: nowrap;
  27851. }
  27852. .e_card_time {
  27853. width: 100%;
  27854. padding: 0 10px;
  27855. box-sizing: border-box;
  27856. font-size: 15px;
  27857. color: #c3c3c3;
  27858. margin-bottom: 10px;
  27859. }
  27860. .e_card_btn {
  27861. height: 40px;
  27862. display: flex;
  27863. align-items: center;
  27864. width: 100%;
  27865. background: rgb(244, 244, 244);
  27866. }
  27867. .e_card_btn:hover {
  27868. background: rgb(221 221 221);
  27869. }
  27870. .e_card_btn span {
  27871. flex: 1 1 auto;
  27872. text-align: center;
  27873. cursor: pointer;
  27874. }
  27875. .addEva {
  27876. border: 1px solid #ccc;
  27877. background: #fff;
  27878. margin-right: 20px;
  27879. width: 270px;
  27880. height: 149px;
  27881. display: flex;
  27882. flex-direction: column;
  27883. align-items: center;
  27884. border-radius: 5px;
  27885. margin-top: 10px;
  27886. text-align: center;
  27887. cursor: pointer;
  27888. justify-content: center;
  27889. }
  27890. .addEva>img {
  27891. width: 50px;
  27892. object-fit: cover;
  27893. }
  27894. .uploadFm {
  27895. border: 1px dashed #ccc;
  27896. width: 100%;
  27897. height: 140px;
  27898. position: relative;
  27899. cursor: pointer;
  27900. display: flex;
  27901. flex-direction: column;
  27902. justify-content: center;
  27903. align-items: center;
  27904. font-size: 14px;
  27905. color: #6e6e6e;
  27906. position: relative;
  27907. }
  27908. .cover_p {
  27909. width: 100% !important;
  27910. height: 100%;
  27911. object-fit: cover;
  27912. }
  27913. .uploadFm2:hover .cover_mask {
  27914. display: flex !important;
  27915. }
  27916. .cover_mask {
  27917. display: none;
  27918. width: 100%;
  27919. height: 100%;
  27920. position: absolute;
  27921. background: #00000054;
  27922. align-items: center;
  27923. justify-content: center;
  27924. flex-direction: column;
  27925. }
  27926. .cover_mask>img {
  27927. width: 30px;
  27928. }
  27929. .cover_mask>span {
  27930. color: #fff;
  27931. font-size: 12px;
  27932. }
  27933. .uploadFm>img {
  27934. width: 50px;
  27935. }
  27936. .fileCss {
  27937. width: 100%;
  27938. display: flex;
  27939. flex-direction: row;
  27940. flex-wrap: nowrap;
  27941. justify-content: space-around;
  27942. align-items: center;
  27943. padding-top: 15px;
  27944. }
  27945. .fileCss>div {
  27946. display: flex;
  27947. flex-direction: column;
  27948. align-items: center;
  27949. }
  27950. .fileCss .spanName {
  27951. margin-top: 10px;
  27952. }
  27953. .sysPicBox {
  27954. display: flex;
  27955. flex-direction: row;
  27956. flex-wrap: wrap;
  27957. align-content: flex-start;
  27958. height: 435px;
  27959. overflow: auto;
  27960. position: relative;
  27961. }
  27962. .picNone {
  27963. position: absolute;
  27964. left: 50%;
  27965. top: 45%;
  27966. transform: translate(-50%, -50%);
  27967. width: fit-content;
  27968. color: #9c9c9c;
  27969. }
  27970. .sysPic {
  27971. width: 200px;
  27972. height: 115px;
  27973. margin: 0 20px 20px 0;
  27974. cursor: pointer;
  27975. }
  27976. .sysPic>img,
  27977. .isSysPic>img,
  27978. .deletePic>img {
  27979. width: 100%;
  27980. height: 100%;
  27981. object-fit: cover;
  27982. }
  27983. .isSysPic {
  27984. width: 200px;
  27985. height: 115px;
  27986. position: relative;
  27987. }
  27988. .deletePic {
  27989. width: 20px;
  27990. height: 20px;
  27991. position: absolute;
  27992. top: 0;
  27993. right: 0;
  27994. cursor: pointer;
  27995. }
  27996. .select_box1 {
  27997. height: 100%;
  27998. }
  27999. .select_box1_img {
  28000. background: #fff;
  28001. border-radius: 5px;
  28002. padding: 15px;
  28003. box-sizing: border-box;
  28004. margin-bottom: 20px;
  28005. }
  28006. .select_box1_title {
  28007. padding: 0 0 15px 0;
  28008. border-bottom: 1px solid #eee;
  28009. margin-bottom: 15px;
  28010. }
  28011. .select_box1_title span:nth-child(1) {
  28012. font-size: 16px;
  28013. margin-right: 20px;
  28014. color: #000;
  28015. }
  28016. .select_box1_title span:nth-child(2) {
  28017. font-size: 14px;
  28018. color: rgb(112, 112, 112);
  28019. }
  28020. .select_box1_add_img {}
  28021. .select_box1_select {
  28022. background: #fff;
  28023. border-radius: 5px;
  28024. padding: 15px;
  28025. box-sizing: border-box;
  28026. height: calc(100% - 200px);
  28027. overflow: auto;
  28028. }
  28029. .select_box2 {
  28030. height: 100%;
  28031. }
  28032. .select_box2_title {
  28033. background: #fff;
  28034. border-radius: 5px;
  28035. padding: 5px 10px;
  28036. box-sizing: border-box;
  28037. margin-bottom: 10px;
  28038. }
  28039. .select_box2_box {
  28040. display: flex;
  28041. height: calc(100% - 30px);
  28042. }
  28043. .select_box2_img {
  28044. width: calc(100% - 310px);
  28045. height: 100%;
  28046. overflow: auto;
  28047. background: #fff;
  28048. border-radius: 5px;
  28049. }
  28050. .select_box2_img img {
  28051. width: 100%;
  28052. }
  28053. .select_box2_answer {
  28054. background: #fff;
  28055. margin-left: 10px;
  28056. border-radius: 5px;
  28057. width: 300px;
  28058. overflow: auto;
  28059. height: 100%;
  28060. display: flex;
  28061. flex-direction: column;
  28062. align-items: center;
  28063. padding-top: 10px;
  28064. box-sizing: border-box;
  28065. }
  28066. .select_box2_answer_box {
  28067. margin: 0 0 10px 0;
  28068. width: 85%;
  28069. }
  28070. .rate_textarea {
  28071. font: inherit;
  28072. color: currentColor;
  28073. width: 100%;
  28074. padding: 8px 14px;
  28075. display: block;
  28076. min-width: 0;
  28077. outline: none;
  28078. border: 1px solid rgba(0, 0, 0, 0.23);
  28079. border-radius: 4px;
  28080. box-sizing: border-box;
  28081. background: #fff;
  28082. margin: 0 20px 0 0;
  28083. resize: none;
  28084. }
  28085. .select_answer_title {
  28086. text-align: left;
  28087. width: 85%;
  28088. margin-bottom: 10px;
  28089. font-size: 18px;
  28090. color: #8e8e8e;
  28091. }
  28092. .mask {
  28093. background-color: rgb(0 0 0 / 30%);
  28094. /* position: fixed; */
  28095. position: absolute;
  28096. top: 0;
  28097. left: 0;
  28098. width: 100%;
  28099. height: 100%;
  28100. z-index: 90;
  28101. display: flex;
  28102. align-items: center;
  28103. justify-content: center;
  28104. }
  28105. .progressBox {
  28106. width: 300px;
  28107. height: 150px;
  28108. background: #fff;
  28109. border-radius: 10px;
  28110. box-shadow: 0 0 6px 1px #bfbfbf;
  28111. display: flex;
  28112. align-items: center;
  28113. justify-content: center;
  28114. flex-direction: column;
  28115. position: relative;
  28116. color: #6c6c6c;
  28117. }
  28118. .progressBox>>>.el-progress-bar__outer {
  28119. background-color: #d1dfff !important;
  28120. }
  28121. .progressBox .lbox {
  28122. height: 50px;
  28123. font-size: 19px;
  28124. display: flex;
  28125. align-items: center;
  28126. color: #747474;
  28127. }
  28128. .progressBox .lbox img {
  28129. width: 40px;
  28130. margin-right: 20px;
  28131. }
  28132. .closeCss {
  28133. position: absolute;
  28134. top: 8px;
  28135. right: 8px;
  28136. cursor: pointer;
  28137. width: 20px;
  28138. height: 20px;
  28139. }
  28140. .closeCss>img {
  28141. width: 100%;
  28142. height: 100%;
  28143. }
  28144. .updateTips::before {
  28145. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  28146. font-size: 14px;
  28147. margin-left: 20px;
  28148. font-weight: 400;
  28149. color: #ff3a3a;
  28150. margin-bottom: 10px;
  28151. display: block;
  28152. }
  28153. .updateMask {
  28154. width: 100%;
  28155. z-index: 3;
  28156. top: 0;
  28157. position: absolute;
  28158. /* background-color: rgba(0,0,0,.3); */
  28159. }
  28160. .t_j_box {
  28161. display: flex;
  28162. }
  28163. .t_j_box span:nth-child(1) {
  28164. width: 15%;
  28165. overflow: hidden;
  28166. margin-right: 10px;
  28167. text-overflow: ellipsis;
  28168. white-space: nowrap;
  28169. }
  28170. .t_j_box span:nth-child(2) {
  28171. width: 30%;
  28172. overflow: hidden;
  28173. text-overflow: ellipsis;
  28174. margin-right: 10px;
  28175. }
  28176. .t_j_box span:nth-child(3) {
  28177. max-width: calc(55% - 20px);
  28178. overflow: hidden;
  28179. text-overflow: ellipsis;
  28180. }
  28181. .sentenBox {
  28182. background: #fff;
  28183. height: 600px;
  28184. overflow: auto;
  28185. background-image: url("../../../assets/icon/conSentences/csBg.png");
  28186. background-position: 102%;
  28187. background-repeat: no-repeat;
  28188. background-size: 60%;
  28189. }
  28190. .sentenBox>.sentenContent {
  28191. padding-bottom: 10px;
  28192. width: 97%;
  28193. margin: 0 auto;
  28194. }
  28195. .sentenBox>.sentenContent+.sentenContent {
  28196. border-top: 1px solid #cbcbcb;
  28197. }
  28198. .addSen {
  28199. background: #409efe;
  28200. width: 90px;
  28201. color: #fff;
  28202. height: 35px;
  28203. text-align: center;
  28204. line-height: 35px;
  28205. border-radius: 5px;
  28206. float: right;
  28207. margin: 10px 20px 0 0;
  28208. cursor: pointer;
  28209. }
  28210. .sentenTop {
  28211. display: flex;
  28212. flex-direction: row;
  28213. flex-wrap: nowrap;
  28214. align-items: center;
  28215. }
  28216. .sentenTop::before {
  28217. content: attr(index);
  28218. background: #3681fc;
  28219. border-radius: 50%;
  28220. color: #fff;
  28221. width: 25px;
  28222. height: 25px;
  28223. min-width: 25px;
  28224. min-height: 25px;
  28225. text-align: center;
  28226. line-height: 25px;
  28227. margin-right: 5px;
  28228. }
  28229. .sentenTop>div:nth-child(2) {
  28230. width: 300px;
  28231. margin: 0 15px;
  28232. }
  28233. .sentenTop>div:nth-child(3) {
  28234. background: #409efe;
  28235. color: #fff;
  28236. width: 65px;
  28237. height: 35px;
  28238. text-align: center;
  28239. line-height: 35px;
  28240. border-radius: 5px;
  28241. cursor: pointer;
  28242. }
  28243. .cardList {
  28244. padding: 30px 0 20px 0;
  28245. display: flex;
  28246. flex-direction: row;
  28247. flex-wrap: wrap;
  28248. align-items: center;
  28249. box-sizing: border-box;
  28250. border-bottom: 1px solid #f4f4f4;
  28251. width: 98%;
  28252. margin: 0 auto;
  28253. }
  28254. .rightCardList {
  28255. display: flex;
  28256. flex-wrap: wrap;
  28257. }
  28258. .cardBox {
  28259. display: flex;
  28260. flex-direction: row;
  28261. flex-wrap: wrap;
  28262. align-items: center;
  28263. align-content: center;
  28264. }
  28265. .isCard,
  28266. .isCard1 {
  28267. width: auto;
  28268. padding: 0 20px;
  28269. height: 65px;
  28270. text-align: center;
  28271. line-height: 65px;
  28272. font-size: 14px;
  28273. cursor: pointer;
  28274. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  28275. background-size: 100% 100%;
  28276. position: relative;
  28277. z-index: 99;
  28278. }
  28279. .isCard1 {
  28280. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  28281. }
  28282. .isCard:hover .deleteWord {
  28283. display: block;
  28284. }
  28285. .isCard>div:nth-child(1),
  28286. .isCard1>div:nth-child(1) {
  28287. white-space: nowrap;
  28288. overflow: hidden;
  28289. text-overflow: ellipsis;
  28290. width: 100%;
  28291. margin: 0 auto;
  28292. }
  28293. .card {
  28294. width: 140px;
  28295. height: 65px;
  28296. }
  28297. .card>img {
  28298. width: 100%;
  28299. height: 100%;
  28300. }
  28301. .rightCardBox {
  28302. width: 98%;
  28303. margin: 10px auto 0;
  28304. }
  28305. .rightCardBox>div:nth-child(1) {
  28306. margin-bottom: 10px;
  28307. }
  28308. .cardCss {
  28309. display: flex;
  28310. flex-direction: column;
  28311. flex-wrap: nowrap;
  28312. align-items: center;
  28313. border-bottom: 3px solid #b4c3d3;
  28314. padding: 0 0 5px 0;
  28315. /* margin-right: 10px; */
  28316. }
  28317. .cardCss>div:nth-child(2) {
  28318. background: #5b7b9d;
  28319. color: #fff;
  28320. width: 20px;
  28321. height: 20px;
  28322. border-radius: 50%;
  28323. text-align: center;
  28324. line-height: 20px;
  28325. }
  28326. .sentenTopBox {
  28327. display: flex;
  28328. flex-direction: row;
  28329. flex-wrap: nowrap;
  28330. align-items: center;
  28331. justify-content: space-between;
  28332. padding: 55px 0 0 20px;
  28333. box-sizing: border-box;
  28334. width: 85%;
  28335. }
  28336. .rb_c_ai_box,
  28337. .stepsBottom {
  28338. width: 100%;
  28339. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  28340. /* background: #f7f7f7; */
  28341. border-radius: 10px;
  28342. overflow: hidden;
  28343. /* height: 100%; */
  28344. height: calc(100% - 55px);
  28345. }
  28346. .navTop {
  28347. background: #53749b;
  28348. color: #fff;
  28349. height: 40px;
  28350. line-height: 40px;
  28351. padding-left: 15px;
  28352. font-size: 18px;
  28353. }
  28354. .navBottom {
  28355. /* background: #6b91b7; */
  28356. height: 100%;
  28357. overflow: auto;
  28358. padding: 10px 0;
  28359. }
  28360. .navStage {
  28361. display: flex;
  28362. flex-direction: row;
  28363. flex-wrap: nowrap;
  28364. align-items: center;
  28365. padding: 10px 10px 10px 0;
  28366. cursor: pointer;
  28367. background: #ffffff;
  28368. width: 95%;
  28369. margin: 5px auto 5px;
  28370. box-sizing: border-box;
  28371. border-radius: 5px;
  28372. flex-wrap: wrap;
  28373. position: relative;
  28374. }
  28375. .navStage:hover>.chapter_upload_drag {
  28376. display: block;
  28377. }
  28378. .navTask:hover>.chapter_upload_drag {
  28379. display: block;
  28380. }
  28381. .chapter_upload:hover>.chapter_upload_drag {
  28382. display: block;
  28383. }
  28384. .navStage::before {
  28385. content: "";
  28386. display: block;
  28387. width: 16px;
  28388. height: 16px;
  28389. background-image: url(../../../assets/icon/new/icon_stage.png);
  28390. background-size: 100%;
  28391. margin-left: 25px;
  28392. }
  28393. .navStage .chapter_unit_open {
  28394. content: "";
  28395. display: block;
  28396. width: 16px;
  28397. height: 16px;
  28398. background-image: url(../../../assets/icon/new/down.png);
  28399. transform: rotate(-90deg);
  28400. background-size: 100%;
  28401. margin-left: 10px;
  28402. transition: all 0.5s;
  28403. }
  28404. .isNavStageOpen .chapter_unit_open {
  28405. transform: rotate(0deg);
  28406. }
  28407. .isNavStage {
  28408. background: #0061ff;
  28409. }
  28410. .isNavStage::before {
  28411. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  28412. }
  28413. .isNavStage .chapter_unit_open {
  28414. background-image: url(../../../assets/icon/new/downC.png);
  28415. }
  28416. .isNavStage .nt_taskName {
  28417. font-weight: bold !important;
  28418. color: #ffffff !important;
  28419. }
  28420. .isNavStage .nt_taskTitle {
  28421. font-weight: bold !important;
  28422. color: #fff !important;
  28423. }
  28424. .navStage .nt_taskBox {
  28425. width: calc(100% - 68px);
  28426. padding: 0 0 0 5px;
  28427. box-sizing: border-box;
  28428. box-sizing: border-box;
  28429. display: flex;
  28430. flex-direction: row;
  28431. flex-wrap: nowrap;
  28432. align-items: baseline;
  28433. }
  28434. .navStage .nt_taskTitle {
  28435. color: #060e17;
  28436. line-height: 25px;
  28437. font-size: 16px;
  28438. }
  28439. .navStage .nt_taskName {
  28440. max-width: calc(100% - 82px);
  28441. white-space: nowrap;
  28442. overflow: hidden;
  28443. text-overflow: ellipsis;
  28444. font-size: 16px;
  28445. color: #060e17;
  28446. }
  28447. .navTask {
  28448. display: flex;
  28449. flex-direction: row;
  28450. flex-wrap: nowrap;
  28451. align-items: center;
  28452. padding: 10px 10px 10px 0;
  28453. cursor: pointer;
  28454. background: #ffffff;
  28455. width: 95%;
  28456. margin: 5px auto 5px;
  28457. box-sizing: border-box;
  28458. border-radius: 5px;
  28459. flex-wrap: wrap;
  28460. position: relative;
  28461. }
  28462. .navTask .chapter_upload_open {
  28463. content: "";
  28464. display: block;
  28465. width: 16px;
  28466. height: 16px;
  28467. background-image: url(../../../assets/icon/new/icon_arrow.png);
  28468. background-size: 100%;
  28469. margin-left: 23px;
  28470. }
  28471. .noImage .chapter_upload_open {
  28472. display: none;
  28473. background-image: unset !important;
  28474. }
  28475. .isNavOpen .chapter_upload_open {
  28476. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  28477. transform: rotate(90deg);
  28478. }
  28479. .isNavTask .chapter_upload_open {
  28480. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  28481. transform: rotate(-90deg);
  28482. }
  28483. .isNavTask.isNavOpen .chapter_upload_open {
  28484. transform: rotate(0deg);
  28485. }
  28486. .dragOverTop {
  28487. border-top: 2px solid #0061ff !important;
  28488. border-radius: 0 !important;
  28489. margin-top: 10px;
  28490. }
  28491. .dragOverBottom {
  28492. border-bottom: 2px solid #0061ff !important;
  28493. border-radius: 0 !important;
  28494. margin-top: 10px;
  28495. }
  28496. .dragOverTop2 {
  28497. border-top: 2px solid #0061ff !important;
  28498. border-radius: 0 !important;
  28499. }
  28500. .dragOverBottom2 {
  28501. border-bottom: 2px solid #0061ff !important;
  28502. border-radius: 0 !important;
  28503. }
  28504. .isNavTask {
  28505. /* background: #3681FC; */
  28506. background: #eef3fb;
  28507. }
  28508. .isNavTask>.chapter_upload_drag {
  28509. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  28510. }
  28511. .isNavTask .nt_taskName {
  28512. /* color: #fff !important; */
  28513. font-weight: bold !important;
  28514. color: #0061ff !important;
  28515. }
  28516. .isNavTask .nt_taskTitle {
  28517. /* color: #AECCFE !important; */
  28518. font-weight: bold !important;
  28519. color: #0061ff !important;
  28520. }
  28521. .navTask .nt_taskBox {
  28522. width: calc(100% - 40px);
  28523. padding: 0 0 0 5px;
  28524. box-sizing: border-box;
  28525. box-sizing: border-box;
  28526. display: flex;
  28527. flex-direction: row;
  28528. flex-wrap: nowrap;
  28529. align-items: baseline;
  28530. }
  28531. .navTask .nt_taskTitle {
  28532. /* color: #717C8D; */
  28533. color: #060e17;
  28534. line-height: 25px;
  28535. font-size: 16px;
  28536. /* min-width: 66px; */
  28537. }
  28538. .navTask .nt_taskName {
  28539. /* color: #fff; */
  28540. /* max-width: 130px; */
  28541. /* width: 100%; */
  28542. max-width: calc(100% - 66px);
  28543. font-size: 16px;
  28544. color: #060e17;
  28545. /* color: #0E1E33; */
  28546. }
  28547. .navTask .nt_taskName span {
  28548. width: 100%;
  28549. white-space: nowrap;
  28550. overflow: hidden;
  28551. text-overflow: ellipsis;
  28552. display: block;
  28553. }
  28554. .gjBox {
  28555. width: calc(100% - 25px);
  28556. padding: 0 0 0 0;
  28557. box-sizing: border-box;
  28558. border-left: 1px solid #cad1dc;
  28559. margin-left: 25px;
  28560. }
  28561. .gjBox>div {
  28562. display: flex;
  28563. align-items: center;
  28564. }
  28565. .gjBox>div::before {
  28566. content: "";
  28567. height: 1px;
  28568. width: 10px;
  28569. background: #cad1dc;
  28570. display: block;
  28571. margin-right: 5px;
  28572. }
  28573. .gjCss {
  28574. display: flex;
  28575. flex-direction: row;
  28576. flex-wrap: nowrap;
  28577. align-items: center;
  28578. padding: 15px 0;
  28579. box-sizing: border-box;
  28580. font-size: 14px;
  28581. cursor: pointer;
  28582. }
  28583. .isGjCss {
  28584. color: #0061ff;
  28585. }
  28586. .groupBox {}
  28587. .groupContent+.groupContent {
  28588. margin-top: 30px;
  28589. }
  28590. .groupTitle {
  28591. font-size: 24px;
  28592. color: rgb(80, 80, 80);
  28593. margin-bottom: 20px;
  28594. }
  28595. .groupName {
  28596. display: flex;
  28597. align-items: center;
  28598. }
  28599. .groupn {
  28600. font-size: 15px;
  28601. margin-right: 10px;
  28602. }
  28603. .groupName+.groupName {
  28604. margin-top: 15px;
  28605. }
  28606. .groupBtn {
  28607. margin-left: 10px;
  28608. }
  28609. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  28610. text-align: left;
  28611. }
  28612. .radioBox>div {
  28613. margin: 10px 0 0 10px;
  28614. }
  28615. .radioBox>>>.el-radio__input,
  28616. .radioBox>>>.el-checkbox__inner {
  28617. margin-left: 10px;
  28618. }
  28619. .radioBox>>>.el-radio__label,
  28620. .radioBox>>>.el-checkbox__label {
  28621. display: flex;
  28622. align-items: center;
  28623. }
  28624. .inImg {
  28625. width: 50px;
  28626. }
  28627. .inImg>img {
  28628. width: 100%;
  28629. height: 100%;
  28630. object-fit: cover;
  28631. }
  28632. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  28633. height: auto;
  28634. padding: 10px;
  28635. margin: 0;
  28636. }
  28637. .upCss>>>.el-upload-list {
  28638. width: 100%;
  28639. }
  28640. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  28641. width: 100%;
  28642. height: 120px;
  28643. object-fit: contain;
  28644. background: unset;
  28645. margin-left: 0;
  28646. }
  28647. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  28648. display: none;
  28649. }
  28650. .tcMember+.tcMember::before {
  28651. content: "、";
  28652. }
  28653. .xzUpImg {
  28654. width: 25px;
  28655. height: 25px;
  28656. min-width: 25px;
  28657. min-height: 25px;
  28658. cursor: pointer;
  28659. margin: 0 10px;
  28660. }
  28661. .xzUpImg>img {
  28662. width: 100%;
  28663. height: 100%;
  28664. }
  28665. .closeCss {
  28666. position: absolute;
  28667. top: 8px;
  28668. right: 8px;
  28669. cursor: pointer;
  28670. width: 20px;
  28671. height: 20px;
  28672. }
  28673. .closeCss>img {
  28674. width: 100%;
  28675. height: 100%;
  28676. }
  28677. .moveBtn {
  28678. display: flex;
  28679. flex-direction: row;
  28680. flex-wrap: nowrap;
  28681. align-items: center;
  28682. width: 55px;
  28683. }
  28684. .timuUpImg {
  28685. display: flex;
  28686. flex-direction: row;
  28687. align-items: center;
  28688. width: 100%;
  28689. margin-right: 10px;
  28690. }
  28691. .timuUpImg>div:nth-child(1) {
  28692. margin-right: 10px;
  28693. display: flex;
  28694. align-items: center;
  28695. width: 100%;
  28696. }
  28697. .timuImgBox {
  28698. margin: 10px 0;
  28699. display: flex;
  28700. flex-direction: column;
  28701. flex-wrap: wrap;
  28702. align-items: flex-start;
  28703. }
  28704. .timuImg {
  28705. width: 100px;
  28706. margin: 5px 0;
  28707. cursor: pointer;
  28708. position: relative;
  28709. }
  28710. .timuImg:hover .deleteWord {
  28711. display: block;
  28712. }
  28713. .deleteWord {
  28714. width: 25px;
  28715. height: 25px;
  28716. position: absolute;
  28717. right: -5px;
  28718. top: -5px;
  28719. cursor: pointer;
  28720. display: none;
  28721. }
  28722. .timuImg>img,
  28723. .deleteWord>img {
  28724. width: 100%;
  28725. height: 100%;
  28726. object-fit: cover;
  28727. }
  28728. .e_add_delete {
  28729. cursor: pointer;
  28730. margin-left: 10px;
  28731. }
  28732. .pType_box {
  28733. margin: 15px 0;
  28734. align-items: flex-end;
  28735. }
  28736. .noneBox {
  28737. height: 200px;
  28738. width: 100%;
  28739. display: flex;
  28740. align-items: center;
  28741. justify-content: center;
  28742. flex-direction: column;
  28743. /* margin-top: 150px; */
  28744. }
  28745. .noneBox>img {
  28746. width: 95px;
  28747. }
  28748. .noneBox>span {
  28749. margin-top: 10px;
  28750. color: #717c8d;
  28751. }
  28752. .rb_c_box {
  28753. width: 100%;
  28754. height: 100%;
  28755. display: flex;
  28756. /* padding: 20px; */
  28757. box-sizing: border-box;
  28758. justify-content: space-between;
  28759. }
  28760. .rb_c_box_left {
  28761. height: 100%;
  28762. background: #fff;
  28763. width: 270px;
  28764. min-width: 270px;
  28765. border-radius: 8px;
  28766. margin-right: 10px;
  28767. }
  28768. .rb_c_box_right {
  28769. height: 100%;
  28770. width: calc(100%);
  28771. overflow: hidden;
  28772. }
  28773. .rb_c_box_btn {
  28774. display: flex;
  28775. justify-content: flex-start;
  28776. height: 50px;
  28777. align-items: center;
  28778. background: #fff;
  28779. padding: 0 20px;
  28780. border-radius: 10px 10px 0px 0px;
  28781. border-bottom: 1px solid #cad1dc;
  28782. }
  28783. .rb_c_box_btn > .title{
  28784. font-size: 24px;
  28785. font-weight: bold;
  28786. display: flex;
  28787. align-items: center;
  28788. }
  28789. .rb_c_box_btn > .title:before{
  28790. content: '';
  28791. background-image: url(../../../assets/icon/course/courseName.png);
  28792. width: 24px;
  28793. height: 24px;
  28794. background-size: 100% 100%;
  28795. margin-right: 10px;
  28796. }
  28797. .rb_c_box_right>.basic_box {
  28798. /* background: #fff; */
  28799. border-radius: 0;
  28800. height: calc(100% - 50px);
  28801. overflow: auto;
  28802. padding: 0;
  28803. }
  28804. .textarea_css {
  28805. display: block;
  28806. resize: none;
  28807. padding: 10px 15px;
  28808. line-height: 1.5;
  28809. box-sizing: border-box;
  28810. width: 100%;
  28811. font-size: 14px;
  28812. color: #606266;
  28813. background-color: #fff;
  28814. background-image: none;
  28815. border: 1px solid #dcdfe6;
  28816. border-radius: 4px;
  28817. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  28818. outline: none;
  28819. overflow: hidden;
  28820. height: 46px;
  28821. font-family: "Microsoft YaHei";
  28822. }
  28823. .textarea_css::-webkit-input-placeholder {
  28824. color: #c0c4cc;
  28825. }
  28826. .textarea_css:focus {
  28827. border-color: #409eff;
  28828. outline: 0;
  28829. }
  28830. .addEditor>>>.text {
  28831. height: auto;
  28832. min-height: 100px;
  28833. }
  28834. .addEditor>>>.w-e-text-container {
  28835. min-height: 100px;
  28836. }
  28837. .moveBtn2 {
  28838. flex-direction: column;
  28839. width: fit-content;
  28840. margin: 0 10px 0 10px;
  28841. }
  28842. .moveBtn2 .chapter_upload_down,
  28843. .moveBtn2 .chapter_upload_up {
  28844. width: 16px;
  28845. height: 16px;
  28846. }
  28847. .moveBtn2 .chapter_upload_up::after,
  28848. .moveBtn2 .chapter_upload_down::after {
  28849. width: 10px;
  28850. height: 10px;
  28851. }
  28852. .fullStyle>>>.el-dialog__body {
  28853. height: calc(100% - 125px) !important;
  28854. box-sizing: border-box;
  28855. }
  28856. .fullStyle1>>>.el-dialog__body {
  28857. height: auto !important;
  28858. }
  28859. .fullStyle>>>.el-dialog {
  28860. width: 100% !important;
  28861. max-width: 100% !important;
  28862. height: 100% !important;
  28863. margin: 0 !important;
  28864. }
  28865. .fullStyle {
  28866. width: 100% !important;
  28867. max-width: 100% !important;
  28868. height: 100% !important;
  28869. margin: 0 auto !important;
  28870. }
  28871. .wb_j_box_btn {
  28872. width: calc(100% - 30px);
  28873. display: flex;
  28874. height: 40px;
  28875. border: 1.5px solid #cad1dc;
  28876. border-radius: 4px;
  28877. box-sizing: border-box;
  28878. align-items: center;
  28879. font-size: 14px;
  28880. cursor: pointer;
  28881. overflow: hidden;
  28882. }
  28883. .wb_j_box_btn:hover {
  28884. border: 1.5px solid #0061ff;
  28885. }
  28886. .wb_j_box_title {
  28887. background: #f0f4fa;
  28888. height: 100%;
  28889. line-height: 40px;
  28890. width: 90px;
  28891. text-align: center;
  28892. color: #060e17;
  28893. border-right: 1.5px solid #cad1dc;
  28894. box-sizing: border-box;
  28895. }
  28896. .wb_j_box_btn_c {
  28897. width: calc(100% - 90px);
  28898. padding: 0 35px 0 10px;
  28899. box-sizing: border-box;
  28900. position: relative;
  28901. }
  28902. .wb_j_box_span {
  28903. width: 100%;
  28904. overflow: hidden;
  28905. white-space: nowrap;
  28906. text-overflow: ellipsis;
  28907. word-wrap: break-word;
  28908. color: #717c8d;
  28909. }
  28910. .wb_j_box_arrow {
  28911. content: "";
  28912. width: 14px;
  28913. height: 14px;
  28914. background: url(../../../assets/icon/new/u_arrow.png);
  28915. background-size: 100% 100%;
  28916. position: absolute;
  28917. right: 12px;
  28918. top: 50%;
  28919. transform: translateY(-50%);
  28920. }
  28921. .check_classBox {
  28922. height: 400px;
  28923. display: flex;
  28924. border-top: 1.5px solid #e7ebf1;
  28925. border-bottom: 1.5px solid #e7ebf1;
  28926. }
  28927. .check_class_right {
  28928. width: 130px;
  28929. border-right: 1px solid #e7ebf1;
  28930. display: flex;
  28931. align-items: center;
  28932. flex-direction: column;
  28933. height: 100%;
  28934. overflow: auto;
  28935. padding: 15px 0;
  28936. box-sizing: border-box;
  28937. }
  28938. .check_class {
  28939. width: 85%;
  28940. border-radius: 5px;
  28941. height: 30px;
  28942. min-height: 30px;
  28943. line-height: 30px;
  28944. text-align: center;
  28945. padding: 0 10px;
  28946. box-sizing: border-box;
  28947. cursor: pointer;
  28948. white-space: nowrap;
  28949. overflow: hidden;
  28950. text-overflow: ellipsis;
  28951. }
  28952. .check_class.activeX {
  28953. background: #e0eafb;
  28954. color: #3681fc;
  28955. font-weight: 700;
  28956. }
  28957. .check_class+.check_class {
  28958. margin-top: 15px;
  28959. }
  28960. .check_class_left {
  28961. background: #fafafa;
  28962. width: calc(100% - 130px);
  28963. padding: 15px;
  28964. box-sizing: border-box;
  28965. }
  28966. .check_class_all_box {
  28967. display: flex;
  28968. margin-bottom: 10px;
  28969. }
  28970. .all_check {
  28971. display: flex;
  28972. align-items: center;
  28973. padding: 2px 0 0;
  28974. margin-left: 10px;
  28975. }
  28976. .all_check>>>.el-checkbox__label {
  28977. line-height: 18px;
  28978. }
  28979. .check_class_left_title {
  28980. font-size: 16px;
  28981. font-weight: 700;
  28982. }
  28983. .check_class_item {
  28984. display: flex;
  28985. flex-wrap: wrap;
  28986. height: calc(100% - 45px);
  28987. overflow: auto;
  28988. justify-content: flex-start;
  28989. align-items: flex-start;
  28990. align-content: flex-start;
  28991. }
  28992. .class_item:first-child {
  28993. /* margin: 0 15px 15px 67px; */
  28994. }
  28995. .class_item {
  28996. margin: 0 15px 15px 0;
  28997. }
  28998. .class_item:hover>>>.el-checkbox__label {
  28999. color: #409eff;
  29000. }
  29001. .class_item>>>.el-checkbox__label {
  29002. color: #0e1e33;
  29003. }
  29004. .class_item:hover>>>.el-checkbox__inner {
  29005. border-color: #409eff;
  29006. }
  29007. .class_item>>>.el-checkbox,
  29008. .class_item>>>.el-checkbox__input {
  29009. display: flex;
  29010. align-items: center;
  29011. }
  29012. .taskTitle {
  29013. font-size: 20px;
  29014. font-weight: bold;
  29015. margin-bottom: 35px;
  29016. }
  29017. .taskTitle:after {
  29018. content: "";
  29019. width: 100%;
  29020. display: block;
  29021. height: 1px;
  29022. background: #cad1dc;
  29023. position: absolute;
  29024. left: 0;
  29025. margin: 15px 0 0;
  29026. }
  29027. .eva_btn_box {
  29028. margin: 20px 0px 0 0;
  29029. display: flex;
  29030. flex-direction: row;
  29031. flex-wrap: nowrap;
  29032. align-items: center;
  29033. justify-content: space-between;
  29034. width: 100%;
  29035. }
  29036. .eva_btn_left_box {
  29037. display: flex;
  29038. flex-direction: row;
  29039. flex-wrap: nowrap;
  29040. align-items: center;
  29041. }
  29042. .addTypeChoose {
  29043. display: flex;
  29044. flex-direction: row;
  29045. flex-wrap: nowrap;
  29046. align-items: center;
  29047. margin: 15px 0;
  29048. }
  29049. .addTypeBox {
  29050. display: flex;
  29051. flex-direction: column;
  29052. flex-wrap: nowrap;
  29053. align-items: center;
  29054. }
  29055. .addTypeChoose {
  29056. display: flex;
  29057. flex-direction: row;
  29058. flex-wrap: nowrap;
  29059. align-items: center;
  29060. margin: 15px 0;
  29061. }
  29062. .buchong_box {
  29063. background: #E0EAFB66;
  29064. width: calc(100% - 20px);
  29065. min-height: 50px;
  29066. display: flex;
  29067. align-items: center;
  29068. justify-content: center;
  29069. margin: 0 auto;
  29070. }
  29071. .outline {
  29072. width: calc(100% - 40px);
  29073. margin: 0 auto;
  29074. }
  29075. .task_outline {
  29076. width: calc(100% - 40px);
  29077. margin: 0 auto;
  29078. }
  29079. .outline_box+.outline_box {
  29080. margin: 30px 0 0px;
  29081. }
  29082. .outline_task {
  29083. display: flex;
  29084. align-items: center;
  29085. margin-bottom: 10px;
  29086. }
  29087. .outline_btn{
  29088. display: flex;
  29089. align-items: center;
  29090. min-width: fit-content;
  29091. margin-left: 10px;
  29092. }
  29093. .outline_task .title {
  29094. font-size: 18px;
  29095. font-weight: bold;
  29096. min-width: 80px;
  29097. }
  29098. .op_task_box,
  29099. .op_tool_box,
  29100. .outline_detail {
  29101. position: relative;
  29102. }
  29103. .op_task_box:hover .op_box,
  29104. .op_tool_box:hover .op_box,
  29105. .outline_detail:hover .op_box {
  29106. display: flex
  29107. }
  29108. .op_box {
  29109. position: absolute;
  29110. bottom: 10px;
  29111. display: none;
  29112. align-items: center;
  29113. justify-content: space-between;
  29114. width: calc(100% - 20px);
  29115. left: 50%;
  29116. transform: translateX(-50%);
  29117. }
  29118. .op_box .op_remark {
  29119. color: #8E8E8E;
  29120. font-size: 14px;
  29121. }
  29122. .op_box_right{
  29123. display: flex;
  29124. }
  29125. .op_box_isquote{
  29126. display: flex;
  29127. }
  29128. .op_box_isquote *{
  29129. display: none;
  29130. }
  29131. .op_box_isquote .op_box_right,
  29132. .op_box_isquote .custom-switch{
  29133. display: flex;
  29134. margin-left: auto;
  29135. }
  29136. .op_task_box:hover .op_box_isquote *{
  29137. display: flex;
  29138. }
  29139. .op_task_box:hover .op_box_isquote .op_box_right,
  29140. .op_task_box:hover .op_box_isquote .custom-switch{
  29141. display: flex;
  29142. margin-left: unset;
  29143. }
  29144. .rb_c_nav {
  29145. width: calc(100% - 20px);
  29146. margin: 15px auto 0;
  29147. font-size: 18px;
  29148. display: flex;
  29149. align-items: center;
  29150. }
  29151. .rb_c_nav span {
  29152. cursor: pointer;
  29153. }
  29154. .rb_c_nav span+span {
  29155. margin-left: 10px;
  29156. }
  29157. .rb_c_nav span.active {
  29158. color: #0061FF
  29159. }
  29160. .text_panel>>>.text {
  29161. height: 400px;
  29162. }
  29163. .markBox{
  29164. padding: 20px 14px;
  29165. line-height: 29px;
  29166. font-size: 16px;
  29167. background: #f4f4f4;
  29168. border-radius: 5px;
  29169. word-break: break-word;
  29170. }
  29171. .info_box_t {
  29172. display: flex;
  29173. align-items: center;
  29174. flex-wrap: wrap;
  29175. }
  29176. .info_box_t + .info_box_t {
  29177. margin-top: 10px;
  29178. }
  29179. .info_box_t_box {
  29180. display: flex;
  29181. align-items: center;
  29182. flex-wrap: wrap;
  29183. margin-bottom: 5px;
  29184. }
  29185. .info_box_t_box + .info_box_t_box{
  29186. margin-left: 10px;
  29187. }
  29188. .info_box_t_box > span{
  29189. width: fit-content;
  29190. font-weight: bold;
  29191. font-size: 14px;
  29192. }
  29193. .info_box_t_box > input{
  29194. width: 150px !important;
  29195. margin: 0 5px 0 0;
  29196. }
  29197. .info_radio >>> .el-radio, .el-radio__input{
  29198. line-height: 18px;
  29199. height: 18px;
  29200. }
  29201. .mode_box{
  29202. display: flex;
  29203. align-items: center;
  29204. }
  29205. .mode_box > span{
  29206. padding: 0px 5px;
  29207. cursor: pointer;
  29208. }
  29209. .mode_box > span.active{
  29210. color: #409eff;
  29211. }
  29212. .chapter_upload_check {
  29213. width: 15px;
  29214. height: 15px;
  29215. min-width: 15px;
  29216. min-height: 15px;
  29217. cursor: pointer;
  29218. background-image: url('../../../assets/icon/check.png');
  29219. background-size: 100% 100%;
  29220. }
  29221. .chapter_upload_check.checked{
  29222. background-image: url('../../../assets/icon/checked.png');
  29223. }
  29224. .ruleBtn {
  29225. width: fit-content;
  29226. height: 36px;
  29227. line-height: 36px;
  29228. cursor: pointer;
  29229. color: #0061FF;
  29230. }
  29231. .stopBtn{
  29232. z-index: 999999;
  29233. position: absolute;
  29234. left: 50%;
  29235. top: calc(50% + 70px);
  29236. transform: translateX(-50%);
  29237. }
  29238. .rateSwitch >>> .el-switch__label.is-active {
  29239. color: #0061FF;
  29240. }
  29241. .rateSwitch >>> .el-switch__label--right{
  29242. display: flex;
  29243. align-items: center;
  29244. }
  29245. .rateSwitch >>> .el-switch__label--right::before{
  29246. content: "";
  29247. width: 14px;
  29248. height: 14px;
  29249. min-width: 14px;
  29250. min-height: 14px;
  29251. background-size: 100% 100%;
  29252. display: block;
  29253. margin-right: 7px;
  29254. background-image: url(../../../assets/icon/new/u_op2.png);
  29255. }
  29256. .rateSwitch >>> .el-switch__label--right.is-active::before{
  29257. background-image: url(../../../assets/icon/new/u_op.png);
  29258. }
  29259. .inter_box{
  29260. min-width: calc(50%);
  29261. min-height: 500px;
  29262. margin-right: 10px;
  29263. border: 1px solid #c7c7c7;
  29264. border-radius: 0px 5px 5px 5px;
  29265. overflow: hidden;
  29266. position: relative;
  29267. box-sizing: border-box;
  29268. }
  29269. .inter_box::before{
  29270. content:'对话区';
  29271. position: absolute;
  29272. left: 0;
  29273. top: 0;
  29274. display: block;
  29275. padding: 8px 10px;
  29276. background: #e0eafb;
  29277. color: #98a0ac;
  29278. font-size: 14px;
  29279. border-radius: 0 15px 15px 0;
  29280. }
  29281. .inter_voiceBox,
  29282. .inter_Detailbox{
  29283. border: 1px solid #c7c7c7;
  29284. border-radius: 0px 5px 5px 5px;
  29285. overflow: hidden;
  29286. position: relative;
  29287. box-sizing: border-box;
  29288. }
  29289. .inter_Detailbox::before{
  29290. content:'编辑区';
  29291. position: absolute;
  29292. left: 0;
  29293. top: 0;
  29294. display: block;
  29295. padding: 8px 10px;
  29296. background: #e0eafb;
  29297. color: #98a0ac;
  29298. font-size: 14px;
  29299. border-radius: 0 15px 15px 0;
  29300. }
  29301. .inter_voiceBox::before{
  29302. content:'录音区';
  29303. position: absolute;
  29304. left: 0;
  29305. top: 0;
  29306. display: block;
  29307. padding: 8px 10px;
  29308. background: #e0eafb;
  29309. color: #98a0ac;
  29310. font-size: 14px;
  29311. border-radius: 0 15px 15px 0;
  29312. z-index: 999;
  29313. }
  29314. .inter_box > iframe{
  29315. width: 100%;
  29316. height: 100%;
  29317. border: none;
  29318. }
  29319. .inter_setting{
  29320. display: block;
  29321. background-image: url(../../../assets/icon/course/setting.svg);
  29322. background-size: 100% 100%;
  29323. width: 20px;
  29324. height: 20px;
  29325. cursor: pointer;
  29326. margin-left: 10px;
  29327. }
  29328. .inter_setting_panel{
  29329. position: absolute;
  29330. left: 110px;
  29331. top: 30px;
  29332. background: #fff;
  29333. border-radius: 5px;
  29334. box-shadow: 0px 0px 2px 1px #00000017;
  29335. padding: 10px;
  29336. z-index: 999;
  29337. }
  29338. .panel_title{
  29339. text-align: center;
  29340. font-size: 18px;
  29341. margin-bottom: 10px;
  29342. }
  29343. .panel_tips{
  29344. font-weight: 500;
  29345. font-size: 14px;
  29346. text-align: center;
  29347. margin-bottom: 10px;
  29348. color: #6d6d6d;
  29349. }
  29350. .panel_input{
  29351. margin-bottom: 10px;
  29352. }
  29353. .panel_button{
  29354. display: flex;
  29355. justify-content: space-between;
  29356. }
  29357. .panel_input_record {
  29358. margin-top: 10px;
  29359. }
  29360. .panel_input_record > span{
  29361. margin-bottom: 5px;
  29362. display: block;
  29363. }
  29364. .custom-switch >>> .el-switch__label.is-active {
  29365. color: #0061FF;
  29366. }
  29367. .close_btn{
  29368. position: absolute;
  29369. top: 40px;
  29370. right: 10px;
  29371. box-shadow: 0 0 4px 2px #00000033;
  29372. border-radius: 70px 0 0 70px;
  29373. display: flex;
  29374. align-items: center;
  29375. padding-left: 5px;
  29376. padding: 10px 7px 10px 12px;
  29377. background: #fff;
  29378. cursor: pointer;
  29379. }
  29380. .close_btn > img {
  29381. width: 15px;
  29382. transition: 0.3s;
  29383. transform: rotate(0deg);
  29384. }
  29385. .close_btn_voice > img{
  29386. transform: rotate(180deg);
  29387. }
  29388. .resizable {
  29389. position: relative;
  29390. min-width: 350px; /* 最小宽度 */
  29391. max-width: 50%; /* 最大宽度 */
  29392. }
  29393. .resizer {
  29394. width: 12.8px;
  29395. height: 28.8px;
  29396. /* background: #ccc; */
  29397. position: absolute;
  29398. top: 50%;
  29399. left: 0;
  29400. cursor: ew-resize;
  29401. transform: translateY(-50%);
  29402. /* border-radius: 43px; */
  29403. background-image: url(../../../assets/icon/course/course_slide.png);
  29404. background-size: 100% 100%;
  29405. }
  29406. .pptBox{
  29407. position: fixed;
  29408. bottom: 10px;
  29409. left: 20px;
  29410. padding: 10px;
  29411. }
  29412. .pptBox > .box > div + div{
  29413. margin-top: 10px;
  29414. }
  29415. .ppClass{
  29416. background: #fff;
  29417. border-radius: 5px;
  29418. box-shadow: 0 0 6px 3px #00000030;
  29419. overflow: hidden;
  29420. }
  29421. .file-loading-class >>> .el-loading-spinner{
  29422. margin-top: -10px;
  29423. }
  29424. .file-loading-class >>> .el-loading-spinner .circular{
  29425. height: 20px;
  29426. width: 20px;
  29427. }
  29428. .button-toggle {
  29429. color: #007bff; /* 文本颜色 */
  29430. cursor: pointer; /* 鼠标悬停时显示手型 */
  29431. transition: color 0.2s; /* 文字颜色过渡效果 */
  29432. font-size: 14px;
  29433. }
  29434. .button-toggle:hover {
  29435. color: #0056b3; /* 悬停时的文字颜色 */
  29436. }
  29437. .button-toggle:focus {
  29438. outline: none; /* 去掉聚焦时的边框 */
  29439. }
  29440. .right_icon{
  29441. width: 12px;
  29442. height: 12px;
  29443. margin-left: 5px;
  29444. }
  29445. .buttonBoxB{
  29446. position: relative;
  29447. margin: 0 0 0 10px;
  29448. }
  29449. .buttonBoxB::after{
  29450. content: '';
  29451. display: block;
  29452. background-image: url(../../../assets/icon/course/downArrow.svg);
  29453. background-size: 100% 100%;
  29454. width: 15px;
  29455. height: 15px;
  29456. cursor: pointer;
  29457. margin-left: 5px;
  29458. }
  29459. .buttonBoxB:hover .buttonBox{
  29460. display: block;
  29461. }
  29462. .buttonBox {
  29463. position: absolute;
  29464. bottom: -0;
  29465. left: 0;
  29466. transform: translateY(100%);
  29467. background: #fff;
  29468. border-radius: 5px;
  29469. box-shadow: 0 0 3px 1px #e3e3e3;
  29470. width: 155px;
  29471. display: none;
  29472. z-index: 99999;
  29473. }
  29474. .buttonBox>div {
  29475. height: 40px;
  29476. line-height: 40px;
  29477. width: 100%;
  29478. text-align: center;
  29479. color: #000;
  29480. box-sizing: border-box;
  29481. }
  29482. .buttonBox>div+div {
  29483. border-top: 1px solid #e0e0e0;
  29484. }
  29485. .buttonBox>div:hover {
  29486. background: #f6f8ff;
  29487. }
  29488. .appendix_info_title {
  29489. padding: 15px 0 15px 0;
  29490. font-size: 20px;
  29491. font-weight: bold;
  29492. margin: 0 0 0 20px;
  29493. box-sizing: border-box;
  29494. display: flex;
  29495. align-items: center;
  29496. line-height: 20px;
  29497. }
  29498. .appendix_file_box{
  29499. width: 100%
  29500. }
  29501. .appendix_check_box{}
  29502. .appendix_check_box > div + div{
  29503. margin-top: 10px;
  29504. }
  29505. .appendix_check_task{
  29506. display: flex;
  29507. align-items: center;
  29508. }
  29509. .appendix_check_type{
  29510. display: flex;
  29511. align-items: center;
  29512. }
  29513. .appendix_check_task > span,
  29514. .appendix_check_type > span{
  29515. width: 100px;
  29516. }
  29517. .appendix_check_task > .checkButton,
  29518. .appendix_check_type > .checkButton{
  29519. border: 1px solid #1684fc;
  29520. color: #1684fc;
  29521. padding: 5px 10px;
  29522. border-radius: 5px;
  29523. margin-right: 10px;
  29524. cursor: pointer;
  29525. }
  29526. .appendix_check_task > .checkButton.checked,
  29527. .appendix_check_type > .checkButton.checked{
  29528. background: #1684fc;
  29529. color: #fff;
  29530. }
  29531. .appendix_check_all_box{
  29532. display: flex;
  29533. align-items: center;
  29534. margin-bottom: 5px;
  29535. }
  29536. .appendix_check_all{
  29537. display: flex;
  29538. align-items: center;
  29539. cursor: pointer;
  29540. }
  29541. .appendix_check_all_text{
  29542. margin-left: 5px;
  29543. }
  29544. .know_serach_box{
  29545. margin-bottom: 20px;
  29546. display: flex;
  29547. align-items: center;
  29548. }
  29549. .know_serach_box > span{
  29550. min-width: 100px;
  29551. }
  29552. .know_serach_box > .c_pub_button_add{
  29553. min-width: fit-content;
  29554. }
  29555. .add_chapters_check_box{
  29556. display: flex;
  29557. align-items: center;
  29558. height: 50px;
  29559. }
  29560. .add_chapters_check{
  29561. display: flex;
  29562. align-items: center;
  29563. cursor: pointer;
  29564. }
  29565. </style>