addCourse.vue 1.2 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467
  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" :style="{width: !gotype ? '100%' :'100px'}">
  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" v-if="oid != '91796dfb-8791-11ef-9b30-005056b86db5'">
  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" v-if="checkboxList3.length">
  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 || item1.type == 16" 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 getKnowType()" :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. {{ item1.file_type }}
  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. {{ item1.file_type ? item1.file_type : '无'}}
  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 || item1.type == 16" 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. v-if="item1.type == 15"
  3447. class="chapter_upload_l_i15"
  3448. style="margin-left: 1px"
  3449. ></div>
  3450. <div
  3451. v-if="item1.type == 17"
  3452. class="chapter_upload_l_i8"
  3453. style="margin-left: 1px"
  3454. ></div>
  3455. </div>
  3456. <div class="chapter_upload_n">
  3457. <input
  3458. readonly="true"
  3459. v-if="
  3460. item1.type == 16
  3461. "
  3462. :placeholder="item1.name"
  3463. @click="
  3464. openCodeEditor(1,item1, unitIndex,itemTaskIndex, index1)
  3465. "
  3466. style="
  3467. border: none;
  3468. outline: none;
  3469. width: 80%;
  3470. minwidth: 215px;
  3471. z-index: 99;
  3472. font-size: 14px;
  3473. white-space: nowrap;
  3474. overflow: hidden;
  3475. text-overflow: ellipsis;
  3476. "
  3477. />
  3478. <input readonly="true" v-if="
  3479. item1.type == 2 ||
  3480. item1.type == 3 ||
  3481. item1.type == 12 ||
  3482. item1.type == 13 ||
  3483. item1.type == 7
  3484. " :placeholder="item1.name" @click="
  3485. updataVideoT(
  3486. $event,
  3487. unitIndex,
  3488. itemTaskIndex,
  3489. index1
  3490. )
  3491. " style="
  3492. border: none;
  3493. outline: none;
  3494. width: 80%;
  3495. minwidth: 215px;
  3496. z-index: 99;
  3497. font-size: 14px;
  3498. white-space: nowrap;
  3499. overflow: hidden;
  3500. text-overflow: ellipsis;
  3501. " />
  3502. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3503. border: none;
  3504. outline: none;
  3505. width: 80%;
  3506. white-space: nowrap;
  3507. overflow: hidden;
  3508. text-overflow: ellipsis;
  3509. " readonly="true" @click="
  3510. selectAttText(itemTaskIndex, index1)
  3511. " />
  3512. <input :placeholder="
  3513. item1.title ? item1.title : '链接'
  3514. " v-if="item1.type == 8" style="
  3515. border: none;
  3516. outline: none;
  3517. width: 80%;
  3518. white-space: nowrap;
  3519. overflow: hidden;
  3520. text-overflow: ellipsis;
  3521. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3522. <input
  3523. :placeholder="
  3524. item1.title ? item1.title : '代码上传'
  3525. "
  3526. v-if="item1.type == 17"
  3527. style="
  3528. border: none;
  3529. outline: none;
  3530. width: 80%;
  3531. white-space: nowrap;
  3532. overflow: hidden;
  3533. text-overflow: ellipsis;
  3534. "
  3535. readonly="true"
  3536. @click="changeHTmlPage(itemTaskIndex, index1)"
  3537. />
  3538. <input :placeholder="
  3539. item1.title ? item1.title : '链接'
  3540. " v-if="item1.type == 14" style="
  3541. border: none;
  3542. outline: none;
  3543. width: 80%;
  3544. white-space: nowrap;
  3545. overflow: hidden;
  3546. text-overflow: ellipsis;
  3547. " readonly="true" @click="
  3548. openUpdateSource(itemTaskIndex, index1)
  3549. " />
  3550. <input
  3551. :placeholder="
  3552. item1.title ? item1.title : 'Ai应用'
  3553. "
  3554. v-if="item1.type == 15"
  3555. style="
  3556. border: none;
  3557. outline: none;
  3558. width: 80%;
  3559. white-space: nowrap;
  3560. overflow: hidden;
  3561. text-overflow: ellipsis;
  3562. "
  3563. readonly="true"
  3564. @click="selectLine(0, index1)"
  3565. />
  3566. </div>
  3567. <div class="chapter_upload_ic">
  3568. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3569. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3570. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  3571. ">
  3572. <div></div>
  3573. </div>
  3574. <div class="chapter_upload_ud" style="z-index: 99">
  3575. <div class="chapter_upload_up" @click="
  3576. upCd(
  3577. $event,
  3578. unitIndex,
  3579. index,
  3580. itemTaskIndex,
  3581. index1
  3582. )
  3583. "></div>
  3584. <div class="chapter_upload_down" @click="
  3585. downCd(
  3586. $event,
  3587. unitIndex,
  3588. index,
  3589. itemTaskIndex,
  3590. index1
  3591. )
  3592. "></div>
  3593. </div>
  3594. <div class="chapter_upload_ic_edit" v-if="
  3595. item1.type == 2 ||
  3596. item1.type == 3 ||
  3597. item1.type == 12 ||
  3598. item1.type == 13 ||
  3599. item1.type == 7
  3600. " @click.stop="
  3601. updataVideoT(
  3602. $event,
  3603. unitIndex,
  3604. itemTaskIndex,
  3605. index1
  3606. )
  3607. ">
  3608. <div></div>
  3609. </div>
  3610. <div
  3611. class="chapter_upload_ic_edit"
  3612. v-if="
  3613. item1.type == 16
  3614. "
  3615. @click.stop="
  3616. openCodeEditor(1,item1, unitIndex,itemTaskIndex, index1)
  3617. "
  3618. >
  3619. <div></div>
  3620. </div>
  3621. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3622. selectAttText(itemTaskIndex, index1)
  3623. ">
  3624. <div></div>
  3625. </div>
  3626. <div class="chapter_upload_ic_edit" v-if="item1.type == 8 || item1.type==15"
  3627. @click="selectLine(itemTaskIndex, index1)">
  3628. <div></div>
  3629. </div>
  3630. <div
  3631. class="chapter_upload_ic_edit"
  3632. v-if="item1.type == 17"
  3633. @click="changeHTmlPage(itemTaskIndex, index1)"
  3634. >
  3635. <div></div>
  3636. </div>
  3637. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3638. openUpdateSource(itemTaskIndex, index1)
  3639. ">
  3640. <div></div>
  3641. </div>
  3642. <div class="chapter_upload_ic_r" @click.stop="
  3643. deleteChapterData(
  3644. $event,
  3645. unitIndex,
  3646. index,
  3647. index1,
  3648. itemTaskIndex
  3649. )
  3650. ">
  3651. <div></div>
  3652. </div>
  3653. </div>
  3654. </div>
  3655. </div>
  3656. </div>
  3657. </div>
  3658. <!-- v-if="!itemTask.isFoldchapter" -->
  3659. <div class="add_info_box" style="margin: 10px 0 0">
  3660. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3661. 文件
  3662. <input type="file" accept="*" style="display: none" multiple="multiple" v-if="inputShow"
  3663. @change="
  3664. beforeUpload2(
  3665. $event,
  3666. unitIndex,
  3667. 13,
  3668. itemTaskIndex
  3669. )
  3670. " />
  3671. </button>
  3672. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(itemTaskIndex)">
  3673. 图文
  3674. </button>
  3675. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(itemTaskIndex)">
  3676. 链接
  3677. </button>
  3678. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(itemTaskIndex)">
  3679. 代码
  3680. </button>
  3681. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(itemTaskIndex)">
  3682. 资源
  3683. </button>
  3684. <button class="c_pub_button_add pub_btn_add_img"
  3685. @click="openAiCreate(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成PPT按钮`)">
  3686. AI生成PPT
  3687. </button>
  3688. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3689. AI生成教案
  3690. </button> -->
  3691. <button class="c_pub_button_add pub_btn_add_img"
  3692. @click="createTaskAn(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成学历案按钮`)">
  3693. {{ taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex] == true ? '停止生成学历案' :
  3694. 'AI生成学历案'}}
  3695. </button>
  3696. <button class="c_pub_button_add pub_btn_add_img"
  3697. @click="openAiCreateVideo(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-智能检索视频按钮`)">
  3698. 智能检索视频
  3699. </button>
  3700. <button
  3701. class="c_pub_button_add pub_btn_add_img"
  3702. @click="openAddApp(itemTaskIndex)"
  3703. >
  3704. 智能应用
  3705. </button>
  3706. <button
  3707. class="c_pub_button_add pub_btn_add_img"
  3708. @click="openCodeEditor(0,'',unitIndex,itemTaskIndex ,'')"
  3709. >
  3710. 代码编辑器
  3711. </button>
  3712. <button
  3713. class="c_pub_button_add pub_btn_add_img"
  3714. @click="uploadZIPFile(itemTaskIndex)"
  3715. >
  3716. 代码上传
  3717. </button>
  3718. </div>
  3719. <div v-if="
  3720. unitJson[unitIndex].chapterInfo[0].taskJson[
  3721. itemTaskIndex
  3722. ].proVisible
  3723. " class="mask">
  3724. <div class="progressBox">
  3725. <!-- <div id="closePro" class="closeCss">
  3726. <img src="../../../../assets/icon/close.png" alt />
  3727. </div> -->
  3728. <div class="lbox">
  3729. <img src="../../../assets/loading.gif" />上传中,请稍后
  3730. </div>
  3731. <div style="margin-bottom: 10px">
  3732. <span>{{
  3733. unitJson[unitIndex].chapterInfo[0].taskJson[
  3734. itemTaskIndex
  3735. ].isFinishSize
  3736. }}</span>
  3737. /
  3738. <span>{{
  3739. unitJson[unitIndex].chapterInfo[0].taskJson[
  3740. itemTaskIndex
  3741. ].isAllSize
  3742. }}</span>
  3743. </div>
  3744. <!-- <el-progress
  3745. :text-inside="true"
  3746. :stroke-width="20"
  3747. :percentage="
  3748. unitJson[unitIndex].chapterInfo[0].taskJson[
  3749. itemTaskIndex
  3750. ].progress
  3751. ? unitJson[unitIndex].chapterInfo[0]
  3752. .taskJson[itemTaskIndex].progress
  3753. : 0
  3754. "
  3755. style="width: 80%"
  3756. ></el-progress> -->
  3757. </div>
  3758. </div>
  3759. </div>
  3760. <div v-if="
  3761. unitJson[unitIndex].easy == 1 ||
  3762. (unitJson[unitIndex].easy == 5 &&
  3763. itemTask.taskType == 2)
  3764. ">
  3765. <div>
  3766. <div class="add_chapters_box add_c_none" v-if="
  3767. itemTask.chapterData &&
  3768. itemTask.chapterData.length == 0
  3769. ">
  3770. <img src="../../../assets/icon/new/c_none.png" alt />
  3771. </div>
  3772. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3773. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3774. dragOver(index1, itemTaskIndex)
  3775. " @dragend="dragEnd()" :draggable="isdrag ==
  3776. 'chapter-' + itemTaskIndex + '-' + index1
  3777. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3778. :key="item1.id" @click="
  3779. getChapterData(
  3780. $event,
  3781. unitIndex,
  3782. index,
  3783. index1,
  3784. item1.type
  3785. )
  3786. " :class="{
  3787. dragOverTop2:
  3788. newIndex === index1 &&
  3789. typeIndex ==
  3790. 'chapter-' +
  3791. itemTaskIndex +
  3792. '-' +
  3793. index1 &&
  3794. oldIndex > index1,
  3795. dragOverBottom2:
  3796. newIndex === index1 &&
  3797. typeIndex ==
  3798. 'chapter-' +
  3799. itemTaskIndex +
  3800. '-' +
  3801. index1 &&
  3802. oldIndex < index1,
  3803. }">
  3804. <div @mousedown="
  3805. isdrag =
  3806. 'chapter-' + itemTaskIndex + '-' + index1
  3807. " @mouseup="isdrag = ''" @touchstart="
  3808. isdrag =
  3809. 'chapter-' + itemTaskIndex + '-' + index1
  3810. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3811. <div class="chapter_upload_t" style="width: 100%"></div>
  3812. <div class="chapter_upload_o" style="
  3813. position: relative;
  3814. display: flex;
  3815. align-items: center;
  3816. ">
  3817. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3818. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3819. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3820. </div>
  3821. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3822. </div>
  3823. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3824. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3825. </div>
  3826. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3827. </div>
  3828. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3829. </div>
  3830. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3831. </div>
  3832. <div
  3833. v-if="item1.type == 15"
  3834. class="chapter_upload_l_i15"
  3835. style="margin-left: 1px"
  3836. ></div>
  3837. <div
  3838. v-if="item1.type == 17"
  3839. class="chapter_upload_l_i8"
  3840. style="margin-left: 1px"
  3841. ></div>
  3842. </div>
  3843. <div class="chapter_upload_n">
  3844. <span style="
  3845. font-size: 14px;
  3846. color: rgb(109, 109, 109);
  3847. height: 14px;
  3848. line-height: 14px;
  3849. " v-if="
  3850. item1.type == 2 ||
  3851. item1.type == 3 ||
  3852. item1.type == 7
  3853. ">{{ item1.text }}-</span>
  3854. <input readonly="true" v-if="
  3855. item1.type == 2 ||
  3856. item1.type == 3 ||
  3857. item1.type == 7
  3858. " :placeholder="item1.name" @click="
  3859. updataVideoT(
  3860. $event,
  3861. unitIndex,
  3862. itemTaskIndex,
  3863. index1
  3864. )
  3865. " style="
  3866. border: none;
  3867. outline: none;
  3868. width: 80%;
  3869. minwidth: 215px;
  3870. z-index: 99;
  3871. font-size: 14px;
  3872. white-space: nowrap;
  3873. overflow: hidden;
  3874. text-overflow: ellipsis;
  3875. " />
  3876. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3877. border: none;
  3878. outline: none;
  3879. width: 80%;
  3880. white-space: nowrap;
  3881. overflow: hidden;
  3882. text-overflow: ellipsis;
  3883. " readonly="true" @click="
  3884. selectAttText(itemTaskIndex, index1)
  3885. " />
  3886. <input :placeholder="item1.title ? item1.title : '链接'
  3887. " v-if="item1.type == 8 || item1.type == 14" style="
  3888. border: none;
  3889. outline: none;
  3890. width: 80%;
  3891. white-space: nowrap;
  3892. overflow: hidden;
  3893. text-overflow: ellipsis;
  3894. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3895. <input
  3896. :placeholder="
  3897. item1.title ? item1.title : '代码上传'
  3898. "
  3899. v-if="item1.type == 17"
  3900. style="
  3901. border: none;
  3902. outline: none;
  3903. width: 80%;
  3904. white-space: nowrap;
  3905. overflow: hidden;
  3906. text-overflow: ellipsis;
  3907. "
  3908. readonly="true"
  3909. @click="changeHTmlPage(itemTaskIndex, index1)"
  3910. />
  3911. <input
  3912. :placeholder="
  3913. item1.title ? item1.title : 'Ai应用'
  3914. "
  3915. v-if="item1.type == 15"
  3916. style="
  3917. border: none;
  3918. outline: none;
  3919. width: 80%;
  3920. white-space: nowrap;
  3921. overflow: hidden;
  3922. text-overflow: ellipsis;
  3923. "
  3924. readonly="true"
  3925. @click="selectLine(0, index1)"
  3926. />
  3927. </div>
  3928. <div class="chapter_upload_ic">
  3929. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3930. <div class="chapter_upload_ud" style="z-index: 99">
  3931. <div class="chapter_upload_up" @click="
  3932. upCd(
  3933. $event,
  3934. unitIndex,
  3935. index,
  3936. itemTaskIndex,
  3937. index1
  3938. )
  3939. "></div>
  3940. <div class="chapter_upload_down" @click="
  3941. downCd(
  3942. $event,
  3943. unitIndex,
  3944. index,
  3945. itemTaskIndex,
  3946. index1
  3947. )
  3948. "></div>
  3949. </div>
  3950. <div class="chapter_upload_ic_edit" v-if="
  3951. item1.type == 2 ||
  3952. item1.type == 3 ||
  3953. item1.type == 12 ||
  3954. item1.type == 13 ||
  3955. item1.type == 7
  3956. " @click.stop="
  3957. updataVideoT(
  3958. $event,
  3959. unitIndex,
  3960. itemTaskIndex,
  3961. index1
  3962. )
  3963. ">
  3964. <div></div>
  3965. </div>
  3966. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3967. selectAttText(itemTaskIndex, index1)
  3968. ">
  3969. <div></div>
  3970. </div>
  3971. <div class="chapter_upload_ic_edit" v-if="item1.type == 8 || item1.type == 15"
  3972. @click="selectLine(itemTaskIndex, index1)">
  3973. <div></div>
  3974. </div>
  3975. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3976. openUpdateSource(itemTaskIndex, index1)
  3977. ">
  3978. <div></div>
  3979. </div>
  3980. <div class="chapter_upload_ic_r" @click.stop="
  3981. deleteChapterData(
  3982. $event,
  3983. unitIndex,
  3984. index,
  3985. index1,
  3986. itemTaskIndex
  3987. )
  3988. ">
  3989. <div></div>
  3990. </div>
  3991. </div>
  3992. </div>
  3993. </div>
  3994. </div>
  3995. </div>
  3996. <div class="add_info_box" style="margin: 10px 0 0">
  3997. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3998. <span style="color: red">*</span>
  3999. 教学设计
  4000. <input type="file"
  4001. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  4002. style="display: none" v-if="inputShow" @change="
  4003. beforeUpload3(
  4004. $event,
  4005. unitIndex,
  4006. 3,
  4007. itemTaskIndex,
  4008. '教学设计'
  4009. )
  4010. " />
  4011. </button>
  4012. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  4013. <span style="color: red">*</span>
  4014. 教学课件
  4015. <input type="file"
  4016. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  4017. style="display: none" v-if="inputShow" @change="
  4018. beforeUpload3(
  4019. $event,
  4020. unitIndex,
  4021. 3,
  4022. itemTaskIndex,
  4023. '教学课件'
  4024. )
  4025. " />
  4026. </button>
  4027. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  4028. 教学视频
  4029. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  4030. style="display: none" v-if="inputShow" @change="
  4031. beforeUpload3(
  4032. $event,
  4033. unitIndex,
  4034. 2,
  4035. itemTaskIndex,
  4036. '教学视频'
  4037. )
  4038. " />
  4039. </button>
  4040. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  4041. 教学音频
  4042. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  4043. beforeUpload3(
  4044. $event,
  4045. unitIndex,
  4046. 2,
  4047. itemTaskIndex,
  4048. '教学音频'
  4049. )
  4050. " />
  4051. </button>
  4052. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  4053. 学习单
  4054. <input type="file"
  4055. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  4056. style="display: none" v-if="inputShow" @change="
  4057. beforeUpload3(
  4058. $event,
  4059. unitIndex,
  4060. 3,
  4061. itemTaskIndex,
  4062. '学习单'
  4063. )
  4064. " />
  4065. </button>
  4066. </div>
  4067. <div v-if="
  4068. unitJson[unitIndex].chapterInfo[0].taskJson[
  4069. itemTaskIndex
  4070. ].proVisible
  4071. " class="mask">
  4072. <div class="progressBox">
  4073. <!-- <div id="closePro" class="closeCss">
  4074. <img src="../../../../assets/icon/close.png" alt />
  4075. </div> -->
  4076. <div class="lbox">
  4077. <img src="../../../assets/loading.gif" />上传中,请稍后
  4078. </div>
  4079. <div style="margin-bottom: 10px">
  4080. <span>{{
  4081. unitJson[unitIndex].chapterInfo[0].taskJson[
  4082. itemTaskIndex
  4083. ].isFinishSize
  4084. }}M</span>
  4085. /
  4086. <span>{{
  4087. unitJson[unitIndex].chapterInfo[0].taskJson[
  4088. itemTaskIndex
  4089. ].isAllSize
  4090. }}M</span>
  4091. </div>
  4092. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  4093. itemTaskIndex
  4094. ].progress
  4095. ? unitJson[unitIndex].chapterInfo[0]
  4096. .taskJson[itemTaskIndex].progress
  4097. : 0
  4098. " style="width: 80%"></el-progress>
  4099. </div>
  4100. </div>
  4101. </div>
  4102. </div>
  4103. <!-- padding: 20px; -->
  4104. <div style="
  4105. background: #fff;
  4106. border-radius: 5px;
  4107. margin-top: 15px;
  4108. " :style="{paddingBottom: panTaskElist() == 0?'75px':''}">
  4109. <div v-if="
  4110. unitJson[unitIndex].easy == 6 ||
  4111. !unitJson[unitIndex].easy
  4112. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]"
  4113. element-loading-text="小可正在努力生成中,请稍等...">
  4114. <div class="c_pub_button_confirm stopBtn"
  4115. v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]"
  4116. @click="cancelAjax('aiTaskGL2', itemTaskIndex)">停止</div>
  4117. <div style="width: 100%">
  4118. <div style="
  4119. display: flex;
  4120. flex-direction: row;
  4121. align-items: center;
  4122. margin: 5px 0 20px;
  4123. width: 100%
  4124. ">
  4125. <div class="lineTitle clineTitle" style="width: 100%">
  4126. <span>练习内容</span>
  4127. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4128. <div class="r_pub_button_op" style="margin-left:auto;"
  4129. @contextmenu.prevent="openAiDialog(1, 'aiTaskG2', itemTaskIndex)"
  4130. @click="openAiDialog(2, 'aiTaskG2', itemTaskIndex)">{{ panDanTool(itemTask) > 0 ?
  4131. '重新生成工具' : '生成工具' }}</div>
  4132. </el-tooltip>
  4133. <div class="r_pub_button_op" style="margin-left:10px;" @click="allEvaCan2(itemTaskIndex)" v-if="panDanTool(itemTask) > 0">{{ panDanToolEva(itemTask) > 0 ?
  4134. '重新生成工具评价' : '生成工具评价' }}</div>
  4135. </div>
  4136. <!-- <div class="line" style="width: 90%"></div> -->
  4137. </div>
  4138. </div>
  4139. <div class="tools">
  4140. <div class="leftTools" style="width: 100%" v-for="(
  4141. itemTool, toolIndex
  4142. ) in itemTask.toolChoose" :key="toolIndex">
  4143. <div style="
  4144. display: flex;
  4145. flex-direction: row;
  4146. align-items: baseline;
  4147. flex-wrap: nowrap;
  4148. justify-content: flex-start;
  4149. position: relative;
  4150. ">
  4151. <div style="margin-right: 20px; font-weight: bold"
  4152. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4153. 工具 {{ toolIndex + 1 }} :
  4154. </div>
  4155. <div class="chooseWho">
  4156. <div :class="itemTool.toolType == 0
  4157. ? 'isChooseActive'
  4158. : ''
  4159. " @click="
  4160. (itemTool.toolType = 0),
  4161. (itemTool.isFold3 = false),
  4162. $forceUpdate()
  4163. ">
  4164. 互动类
  4165. </div>
  4166. <div :class="itemTool.toolType == 1
  4167. ? 'isChooseActive'
  4168. : ''
  4169. " @click="
  4170. (itemTool.toolType = 1),
  4171. (itemTool.isFold3 = false),
  4172. $forceUpdate()
  4173. ">
  4174. 思维类
  4175. </div>
  4176. <div :class="itemTool.toolType == 6
  4177. ? 'isChooseActive'
  4178. : ''
  4179. " @click="
  4180. (itemTool.toolType = 6),
  4181. (itemTool.isFold3 = false),
  4182. $forceUpdate()
  4183. ">
  4184. 协作类
  4185. </div>
  4186. <div :class="itemTool.toolType == 2
  4187. ? 'isChooseActive'
  4188. : ''
  4189. " @click="
  4190. (itemTool.toolType = 2),
  4191. (itemTool.isFold3 = false),
  4192. $forceUpdate()
  4193. ">
  4194. 测评类
  4195. </div>
  4196. <div :class="itemTool.toolType == 7
  4197. ? 'isChooseActive'
  4198. : ''
  4199. " @click="
  4200. (itemTool.toolType = 7),
  4201. (itemTool.isFold3 = false),
  4202. $forceUpdate()
  4203. ">
  4204. 评价类
  4205. </div>
  4206. <div :class="itemTool.toolType == 3
  4207. ? 'isChooseActive'
  4208. : ''
  4209. " @click="
  4210. (itemTool.toolType = 3),
  4211. (itemTool.isFold3 = false),
  4212. $forceUpdate()
  4213. ">
  4214. 编程类
  4215. </div>
  4216. <div :class="itemTool.toolType == 5
  4217. ? 'isChooseActive'
  4218. : ''
  4219. " @click="
  4220. (itemTool.toolType = 5),
  4221. (itemTool.isFold3 = false),
  4222. $forceUpdate()
  4223. ">
  4224. 学科类
  4225. </div>
  4226. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  4227. " @click="(itemTool.toolType = 4), $forceUpdate()">
  4228. 其他
  4229. </div> -->
  4230. </div>
  4231. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  4232. margin:
  4233. itemTask.toolChoose.length > 1
  4234. ? '0px 35px 0px auto'
  4235. : '0 0 0 auto',
  4236. }" v-if="itemTask.toolChoose.length > 1">
  4237. <div class="chapter_upload_up2" @click.stop="
  4238. upTool(
  4239. $event,
  4240. unitIndex,
  4241. itemTaskIndex,
  4242. toolIndex
  4243. )
  4244. ">
  4245. 上移
  4246. </div>
  4247. <div class="chapter_upload_down2" @click.stop="
  4248. downTool(
  4249. $event,
  4250. unitIndex,
  4251. itemTaskIndex,
  4252. toolIndex
  4253. )
  4254. ">
  4255. 下移
  4256. </div>
  4257. </div>
  4258. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  4259. @click="fold3(itemTaskIndex, toolIndex)"
  4260. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4261. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  4262. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  4263. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4264. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  4265. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4266. v-if="itemTask.toolChoose.length > 1" style="
  4267. position: absolute;
  4268. right: 0;
  4269. top: -5px;
  4270. "></div>
  4271. </div>
  4272. <!-- v-show="!itemTool.isFold3" -->
  4273. <div style="min-height: 163px">
  4274. <div class="toolSort" v-if="itemTool.toolType == 0">
  4275. <!-- <div class="tool">
  4276. <div
  4277. class="whiteBIcon"
  4278. @click="addTools(8, itemTaskIndex, toolIndex)"
  4279. >
  4280. <img src="../../../assets/icon/secondToolList/library.png" alt />
  4281. <div style="margin: 5px 0">素材库</div>
  4282. </div>
  4283. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  4284. <img
  4285. src="../../../assets/icon/checkNo.png"
  4286. alt
  4287. v-if="itemTool.tool.indexOf(8) == -1"
  4288. />
  4289. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  4290. alt /><span>已选择</span></div>
  4291. </div>
  4292. </div>-->
  4293. <!-- <div class="tool">
  4294. <div
  4295. class="whiteBIcon"
  4296. @click="addTools(17, itemTaskIndex, toolIndex)"
  4297. >
  4298. <img
  4299. src="../../../assets/icon/secondToolList/library.png"
  4300. alt
  4301. />
  4302. <div style="margin: 5px 0">学习资料</div>
  4303. </div>
  4304. <div
  4305. class="check"
  4306. @click="addTools(17, itemTaskIndex, toolIndex)"
  4307. >
  4308. <img
  4309. src="../../../assets/icon/checkNo.png"
  4310. alt
  4311. v-if="itemTool.tool.indexOf(17) == -1"
  4312. />
  4313. <img
  4314. src="../../../assets/icon/checkedIs.png"
  4315. alt
  4316. v-else
  4317. />
  4318. </div>10
  4319. </div> -->
  4320. <div class="tool" :class="{
  4321. isToolChoose:
  4322. itemTool.tool.indexOf(10) != -1,
  4323. }" @click="
  4324. addTools(10, itemTaskIndex, toolIndex)
  4325. ">
  4326. <div class="whiteBIcon" @click.stop="
  4327. openTools(itemTaskIndex, 10, toolIndex)
  4328. ">
  4329. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  4330. <div style="margin: 5px 0">倒计时</div>
  4331. </div>
  4332. <div class="noCTool">
  4333. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4334. </div>
  4335. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  4336. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4337. </div>
  4338. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  4339. <img src="../../../assets/icon/checkNo.png" alt
  4340. v-if="itemTool.tool.indexOf(10) == -1" />
  4341. <div class="checkDiv" v-else>
  4342. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4343. </div>
  4344. </div> -->
  4345. </div>
  4346. <div class="tool" :class="{
  4347. isToolChoose:
  4348. itemTool.tool.indexOf(65) != -1,
  4349. }" @click="
  4350. addTools(65, itemTaskIndex, toolIndex)
  4351. ">
  4352. <div class="whiteBIcon" @click.stop="
  4353. addTools(65, itemTaskIndex, toolIndex)
  4354. ">
  4355. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  4356. <div style="margin: 5px 0">挑人</div>
  4357. </div>
  4358. <div class="noCTool">
  4359. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4360. </div>
  4361. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  4362. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4363. </div>
  4364. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  4365. <img src="../../../assets/icon/checkNo.png" alt
  4366. v-if="itemTool.tool.indexOf(65) == -1" />
  4367. <div class="checkDiv" v-else>
  4368. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4369. </div>
  4370. </div> -->
  4371. </div>
  4372. <!-- <div class="tool">
  4373. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  4374. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4375. <div style="margin: 5px 0">学生分组</div>
  4376. </div>
  4377. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4378. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  4379. <div class="checkDiv" v-else>
  4380. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4381. </div>
  4382. </div>
  4383. </div> -->
  4384. <!-- <div class="tool">
  4385. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  4386. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  4387. <div style="margin: 5px 0">交互视频</div>
  4388. </div>
  4389. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  4390. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  4391. <div class="checkDiv" v-else>
  4392. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4393. </div>
  4394. </div>
  4395. </div> -->
  4396. <div class="tool" :class="{
  4397. isToolChoose:
  4398. itemTool.tool.indexOf(72) != -1,
  4399. }" @click="
  4400. addTools(72, itemTaskIndex, toolIndex)
  4401. ">
  4402. <div class="whiteBIcon" @click.stop="
  4403. openTools(itemTaskIndex, 72, toolIndex)
  4404. ">
  4405. <img
  4406. style="object-fit: cover;height: 60px;"
  4407. :src="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson ?
  4408. unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.json.icon :
  4409. require('../../../assets/icon/firstToolList/appStore.png')"
  4410. alt />
  4411. <div style="margin: 5px 0" >
  4412. <div
  4413. v-if="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson"
  4414. >
  4415. <el-tooltip class="item" effect="dark"
  4416. :content="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.name"
  4417. placement="top">
  4418. <div class="Ovh">
  4419. {{unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.name}}
  4420. </div>
  4421. </el-tooltip>
  4422. </div>
  4423. <span v-else>
  4424. 应用中心
  4425. </span>
  4426. </div>
  4427. </div>
  4428. <div class="noCTool">
  4429. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4430. </div>
  4431. <div class="isCTool" v-if="itemTool.tool.indexOf(72) != -1">
  4432. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4433. </div>
  4434. </div>
  4435. </div>
  4436. <div class="toolSort" v-if="itemTool.toolType == 1">
  4437. <div class="tool" :class="{
  4438. isToolChoose:
  4439. itemTool.tool.indexOf(7) != -1,
  4440. }" @click="
  4441. addTools(7, itemTaskIndex, toolIndex)
  4442. ">
  4443. <div class="whiteBIcon" @click.stop="
  4444. addTools(7, itemTaskIndex, toolIndex)
  4445. ">
  4446. <img src="../../../assets/icon/secondToolList/mindNetwork.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(7) != -1">
  4453. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4454. </div>
  4455. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  4456. <img src="../../../assets/icon/checkNo.png" alt
  4457. v-if="itemTool.tool.indexOf(7) == -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 class="tool" :class="{
  4464. isToolChoose:
  4465. itemTool.tool.indexOf(1) != -1,
  4466. }" @click="
  4467. addTools(1, itemTaskIndex, toolIndex)
  4468. ">
  4469. <div class="whiteBIcon" @click.stop="
  4470. openTools(itemTaskIndex, 1, toolIndex)
  4471. ">
  4472. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4473. <div style="margin: 5px 0">电子白板</div>
  4474. </div>
  4475. <div class="noCTool">
  4476. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4477. </div>
  4478. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  4479. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4480. </div>
  4481. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  4482. <img src="../../../assets/icon/checkNo.png" alt
  4483. v-if="itemTool.tool.indexOf(1) == -1" />
  4484. <div class="checkDiv" v-else>
  4485. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4486. </div>
  4487. </div> -->
  4488. </div>
  4489. <!-- <div class="tool">
  4490. <div
  4491. class="whiteBIcon"
  4492. @click="addTools(2, itemTaskIndex, toolIndex)"
  4493. >
  4494. <img
  4495. src="../../../assets/icon/secondToolList/note.png"
  4496. alt
  4497. />
  4498. <div style="margin: 5px 0">便签</div>
  4499. </div>
  4500. <div
  4501. class="check"
  4502. @click="addTools(2, itemTaskIndex, toolIndex)"
  4503. >
  4504. <img
  4505. src="../../../assets/icon/checkNo.png"
  4506. alt
  4507. v-if="itemTool.tool.indexOf(2) == -1"
  4508. />
  4509. <div class="checkDiv" v-else>
  4510. <img
  4511. src="../../../assets/icon/checkedIs.png"
  4512. alt
  4513. /><span>已选择</span>
  4514. </div>
  4515. </div>
  4516. </div> -->
  4517. <!-- <div class="tool">
  4518. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  4519. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4520. <div style="margin: 5px 0">协同文档</div>
  4521. </div>
  4522. <div
  4523. class="check"
  4524. @click="addTools(6, itemTaskIndex, toolIndex)"
  4525. >
  4526. <img
  4527. src="../../../assets/icon/checkNo.png"
  4528. alt
  4529. v-if="itemTool.tool.indexOf(6) == -1"
  4530. />
  4531. <div class="checkDiv" v-else>
  4532. <img
  4533. src="../../../assets/icon/checkedIs.png"
  4534. alt
  4535. /><span>已选择</span>
  4536. </div>
  4537. </div>
  4538. </div> -->
  4539. <div class="tool" :class="{
  4540. isToolChoose:
  4541. itemTool.tool.indexOf(52) != -1,
  4542. }" @click="
  4543. addTools(52, itemTaskIndex, toolIndex)
  4544. ">
  4545. <div class="whiteBIcon" @click.stop="
  4546. openTools(itemTaskIndex, 52, toolIndex)
  4547. ">
  4548. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4549. <div style="margin: 5px 0">文档</div>
  4550. </div>
  4551. <div class="noCTool">
  4552. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4553. </div>
  4554. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  4555. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4556. </div>
  4557. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  4558. <img src="../../../assets/icon/checkNo.png" alt
  4559. v-if="itemTool.tool.indexOf(52) == -1" />
  4560. <div class="checkDiv" v-else>
  4561. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4562. </div>
  4563. </div> -->
  4564. </div>
  4565. <div class="tool" :class="{
  4566. isToolChoose:
  4567. itemTool.tool.indexOf(3) != -1,
  4568. }" @click="
  4569. addTools(3, itemTaskIndex, toolIndex)
  4570. ">
  4571. <div class="whiteBIcon" @click.stop="
  4572. openTools(itemTaskIndex, 3, toolIndex)
  4573. ">
  4574. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4575. <div style="margin: 5px 0">思维导图</div>
  4576. </div>
  4577. <div class="noCTool">
  4578. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4579. </div>
  4580. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  4581. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4582. </div>
  4583. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  4584. <img src="../../../assets/icon/checkNo.png" alt
  4585. v-if="itemTool.tool.indexOf(3) == -1" />
  4586. <div class="checkDiv" v-else>
  4587. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4588. </div>
  4589. </div> -->
  4590. </div>
  4591. <div class="tool" :class="{
  4592. isToolChoose:
  4593. itemTool.tool.indexOf(48) != -1,
  4594. }" @click="
  4595. addTools(48, itemTaskIndex, toolIndex)
  4596. ">
  4597. <div class="whiteBIcon" @click.stop="
  4598. openTools(itemTaskIndex, 48, toolIndex)
  4599. ">
  4600. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4601. <div style="margin: 5px 0">表格</div>
  4602. </div>
  4603. <div class="noCTool">
  4604. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4605. </div>
  4606. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  4607. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4608. </div>
  4609. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  4610. <img src="../../../assets/icon/checkNo.png" alt
  4611. v-if="itemTool.tool.indexOf(48) == -1" />
  4612. <div class="checkDiv" v-else>
  4613. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4614. </div>
  4615. </div> -->
  4616. </div>
  4617. </div>
  4618. <div class="toolSort" v-if="itemTool.toolType == 6">
  4619. <div class="tool" :class="{
  4620. isToolChoose:
  4621. itemTool.tool.indexOf(49) != -1,
  4622. }" @click="
  4623. addTools(49, itemTaskIndex, toolIndex)
  4624. ">
  4625. <div class="whiteBIcon" @click.stop="
  4626. openTools(itemTaskIndex, 49, toolIndex)
  4627. ">
  4628. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4629. <div style="margin: 5px 0">学生分组</div>
  4630. </div>
  4631. <div class="noCTool">
  4632. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4633. </div>
  4634. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  4635. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4636. </div>
  4637. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4638. <img src="../../../assets/icon/checkNo.png" alt
  4639. v-if="itemTool.tool.indexOf(49) == -1" />
  4640. <div class="checkDiv" v-else>
  4641. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4642. </div>
  4643. </div> -->
  4644. </div>
  4645. </div>
  4646. <div class="toolSort" v-if="itemTool.toolType == 2">
  4647. <!-- <div class="tool">
  4648. <div
  4649. class="whiteBIcon"
  4650. @click="addTools(5, itemTaskIndex, toolIndex)"
  4651. >
  4652. <img
  4653. src="../../../assets/icon/thirdToolList/score.png"
  4654. alt
  4655. />
  4656. <div style="margin: 5px 0">量规评分</div>
  4657. </div>
  4658. <div
  4659. class="check"
  4660. @click="addTools(5, itemTaskIndex, toolIndex)"
  4661. >
  4662. <img
  4663. src="../../../assets/icon/checkNo.png"
  4664. alt
  4665. v-if="itemTool.tool.indexOf(5) == -1"
  4666. />
  4667. <img
  4668. src="../../../assets/icon/checkedIs.png"
  4669. alt
  4670. v-else
  4671. />
  4672. </div>
  4673. </div>-->
  4674. <div class="tool" :class="{
  4675. isToolChoose:
  4676. itemTool.tool.indexOf(4) != -1,
  4677. }" @click="
  4678. addTools(4, itemTaskIndex, toolIndex)
  4679. ">
  4680. <div class="whiteBIcon" @click.stop="
  4681. openTools(itemTaskIndex, 4, toolIndex)
  4682. ">
  4683. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4684. <div style="margin: 5px 0">问卷调查</div>
  4685. </div>
  4686. <div class="noCTool">
  4687. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4688. </div>
  4689. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4690. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4691. </div>
  4692. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4693. <img src="../../../assets/icon/checkNo.png" alt
  4694. v-if="itemTool.tool.indexOf(4) == -1" />
  4695. <div class="checkDiv" v-else>
  4696. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4697. </div>
  4698. </div> -->
  4699. </div>
  4700. <div class="tool" :class="{
  4701. isToolChoose:
  4702. itemTool.tool.indexOf(45) != -1,
  4703. }" @click="
  4704. addTools(45, itemTaskIndex, toolIndex)
  4705. ">
  4706. <div class="whiteBIcon" @click="
  4707. openTools(itemTaskIndex, 45, toolIndex)
  4708. ">
  4709. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4710. <div style="margin: 5px 0">选择题</div>
  4711. </div>
  4712. <div class="noCTool">
  4713. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4714. </div>
  4715. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4716. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4717. </div>
  4718. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4719. <img src="../../../assets/icon/checkNo.png" alt
  4720. v-if="itemTool.tool.indexOf(45) == -1" />
  4721. <div class="checkDiv" v-else>
  4722. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4723. </div>
  4724. </div> -->
  4725. </div>
  4726. <div class="tool" :class="{
  4727. isToolChoose:
  4728. itemTool.tool.indexOf(15) != -1,
  4729. }" @click="
  4730. addTools(15, itemTaskIndex, toolIndex)
  4731. ">
  4732. <div class="whiteBIcon" @click.stop="
  4733. openTools(itemTaskIndex, 15, toolIndex)
  4734. ">
  4735. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4736. <div style="margin: 5px 0">问答</div>
  4737. </div>
  4738. <div class="noCTool">
  4739. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4740. </div>
  4741. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4742. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4743. </div>
  4744. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4745. <img src="../../../assets/icon/checkNo.png" alt
  4746. v-if="itemTool.tool.indexOf(15) == -1" />
  4747. <div class="checkDiv" v-else>
  4748. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4749. </div>
  4750. </div> -->
  4751. </div>
  4752. <div class="tool" :class="{
  4753. isToolChoose:
  4754. itemTool.tool.indexOf(16) != -1,
  4755. }" @click="
  4756. addTools(16, itemTaskIndex, toolIndex)
  4757. ">
  4758. <div class="whiteBIcon" @click.stop="
  4759. addTools(16, itemTaskIndex, toolIndex)
  4760. ">
  4761. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4762. <div style="margin: 5px 0">作业提交</div>
  4763. </div>
  4764. <div class="noCTool">
  4765. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4766. </div>
  4767. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4768. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4769. </div>
  4770. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4771. <img src="../../../assets/icon/checkNo.png" alt
  4772. v-if="itemTool.tool.indexOf(16) == -1" />
  4773. <div class="checkDiv" v-else>
  4774. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4775. </div>
  4776. </div> -->
  4777. </div>
  4778. <div class="tool" :class="{
  4779. isToolChoose:
  4780. itemTool.tool.indexOf(50) != -1,
  4781. }" @click="
  4782. addTools(50, itemTaskIndex, toolIndex)
  4783. ">
  4784. <div class="whiteBIcon" @click.stop="
  4785. addTools(50, itemTaskIndex, toolIndex)
  4786. ">
  4787. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4788. <div style="margin: 5px 0">批量上传</div>
  4789. </div>
  4790. <div class="noCTool">
  4791. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4792. </div>
  4793. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4794. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4795. </div>
  4796. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4797. <img src="../../../assets/icon/checkNo.png" alt
  4798. v-if="itemTool.tool.indexOf(50) == -1" />
  4799. <div class="checkDiv" v-else>
  4800. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4801. </div>
  4802. </div> -->
  4803. </div>
  4804. <!-- <div class="tool">
  4805. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4806. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4807. <div style="margin: 5px 0">个人评价</div>
  4808. </div>
  4809. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4810. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4811. <div class="checkDiv" v-else>
  4812. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4813. </div>
  4814. </div>
  4815. </div> -->
  4816. <div class="tool" :class="{
  4817. isToolChoose:
  4818. itemTool.tool.indexOf(41) != -1,
  4819. }" @click="
  4820. addTools(41, itemTaskIndex, toolIndex)
  4821. ">
  4822. <div class="whiteBIcon" @click.stop="
  4823. openTools(itemTaskIndex, 41, toolIndex)
  4824. ">
  4825. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4826. <div style="margin: 5px 0">选择匹配</div>
  4827. </div>
  4828. <div class="noCTool">
  4829. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4830. </div>
  4831. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4832. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4833. </div>
  4834. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4835. <img src="../../../assets/icon/checkNo.png" alt
  4836. v-if="itemTool.tool.indexOf(41) == -1" />
  4837. <div class="checkDiv" v-else>
  4838. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4839. </div>
  4840. </div> -->
  4841. </div>
  4842. <div class="tool" :class="{
  4843. isToolChoose:
  4844. itemTool.tool.indexOf(47) != -1,
  4845. }" @click="
  4846. addTools(47, itemTaskIndex, toolIndex)
  4847. ">
  4848. <div class="whiteBIcon" @click.stop="
  4849. openTools(itemTaskIndex, 47, toolIndex)
  4850. ">
  4851. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4852. <div style="margin: 5px 0">排序</div>
  4853. </div>
  4854. <div class="noCTool">
  4855. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4856. </div>
  4857. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4858. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4859. </div>
  4860. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4861. <img src="../../../assets/icon/checkNo.png" alt
  4862. v-if="itemTool.tool.indexOf(47) == -1" />
  4863. <div class="checkDiv" v-else>
  4864. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4865. </div>
  4866. </div> -->
  4867. </div>
  4868. <!-- <div class="tool">
  4869. <div
  4870. class="whiteBIcon"
  4871. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4872. >
  4873. <img
  4874. src="../../../assets/icon/thirdToolList/mp3.png"
  4875. alt
  4876. />
  4877. <div style="margin: 5px 0">上传音频</div>
  4878. </div>
  4879. <div
  4880. class="check"
  4881. @click="addTools(42, itemTaskIndex, toolIndex)"
  4882. >
  4883. <img
  4884. src="../../../assets/icon/checkNo.png"
  4885. alt
  4886. v-if="itemTool.tool.indexOf(42) == -1"
  4887. />
  4888. <img
  4889. src="../../../assets/icon/checkedIs.png"
  4890. alt
  4891. v-else
  4892. />
  4893. </div>
  4894. </div> -->
  4895. </div>
  4896. <div class="toolSort" v-if="itemTool.toolType == 3">
  4897. <div class="tool" :class="{
  4898. isToolChoose:
  4899. itemTool.tool.indexOf(18) != -1,
  4900. }" @click="
  4901. addTools(18, itemTaskIndex, toolIndex)
  4902. ">
  4903. <div class="whiteBIcon" @click.stop="
  4904. addTools(18, itemTaskIndex, toolIndex)
  4905. ">
  4906. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4907. <div style="margin: 5px 0">训练平台</div>
  4908. </div>
  4909. <div class="noCTool">
  4910. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4911. </div>
  4912. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4913. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4914. </div>
  4915. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4916. <img src="../../../assets/icon/checkNo.png" alt
  4917. v-if="itemTool.tool.indexOf(18) == -1" />
  4918. <div class="checkDiv" v-else>
  4919. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4920. </div>
  4921. </div> -->
  4922. </div>
  4923. <div class="tool" :class="{
  4924. isToolChoose:
  4925. itemTool.tool.indexOf(21) != -1,
  4926. }" @click="
  4927. addTools(21, itemTaskIndex, toolIndex)
  4928. ">
  4929. <div class="whiteBIcon" @click.stop="
  4930. addTools(21, itemTaskIndex, toolIndex)
  4931. ">
  4932. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4933. <div style="margin: 5px 0">
  4934. AIoT Blockly
  4935. </div>
  4936. </div>
  4937. <div class="noCTool">
  4938. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4939. </div>
  4940. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4941. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4942. </div>
  4943. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4944. <img src="../../../assets/icon/checkNo.png" alt
  4945. v-if="itemTool.tool.indexOf(21) == -1" />
  4946. <div class="checkDiv" v-else>
  4947. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4948. </div>
  4949. </div> -->
  4950. </div>
  4951. <!-- <div class="tool">
  4952. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4953. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4954. <div style="margin: 5px 0">AI体验</div>
  4955. </div>
  4956. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4957. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4958. <div class="checkDiv" v-else>
  4959. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4960. </div>
  4961. </div>
  4962. </div> -->
  4963. <div class="tool" :class="{
  4964. isToolChoose:
  4965. itemTool.tool.indexOf(23) != -1,
  4966. }" @click="
  4967. addTools(23, itemTaskIndex, toolIndex)
  4968. ">
  4969. <div class="whiteBIcon" @click.stop="
  4970. addTools(23, itemTaskIndex, toolIndex)
  4971. ">
  4972. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4973. <div style="margin: 5px 0">AI Python</div>
  4974. </div>
  4975. <div class="noCTool">
  4976. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4977. </div>
  4978. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4979. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4980. </div>
  4981. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4982. <img src="../../../assets/icon/checkNo.png" alt
  4983. v-if="itemTool.tool.indexOf(23) == -1" />
  4984. <div class="checkDiv" v-else>
  4985. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4986. </div>
  4987. </div> -->
  4988. </div>
  4989. <div class="tool" :class="{
  4990. isToolChoose:
  4991. itemTool.tool.indexOf(24) != -1,
  4992. }" @click="
  4993. addTools(24, itemTaskIndex, toolIndex)
  4994. ">
  4995. <div class="whiteBIcon" @click.stop="
  4996. addTools(24, itemTaskIndex, toolIndex)
  4997. ">
  4998. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4999. <div style="margin: 5px 0">
  5000. AI Blockly
  5001. </div>
  5002. </div>
  5003. <div class="noCTool">
  5004. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5005. </div>
  5006. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  5007. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5008. </div>
  5009. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  5010. <img src="../../../assets/icon/checkNo.png" alt
  5011. v-if="itemTool.tool.indexOf(24) == -1" />
  5012. <div class="checkDiv" v-else>
  5013. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5014. </div>
  5015. </div> -->
  5016. </div>
  5017. <div class="tool" :class="{
  5018. isToolChoose:
  5019. itemTool.tool.indexOf(32) != -1,
  5020. }" @click="
  5021. addTools(32, itemTaskIndex, toolIndex)
  5022. ">
  5023. <div class="whiteBIcon" @click.stop="
  5024. addTools(32, itemTaskIndex, toolIndex)
  5025. ">
  5026. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  5027. <div style="margin: 5px 0">源码编辑</div>
  5028. </div>
  5029. <div class="noCTool">
  5030. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5031. </div>
  5032. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  5033. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5034. </div>
  5035. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  5036. <img src="../../../assets/icon/checkNo.png" alt
  5037. v-if="itemTool.tool.indexOf(32) == -1" />
  5038. <div class="checkDiv" v-else>
  5039. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5040. </div>
  5041. </div> -->
  5042. </div>
  5043. <div class="tool" :class="{
  5044. isToolChoose:
  5045. itemTool.tool.indexOf(57) != -1,
  5046. }" @click="
  5047. addTools(57, itemTaskIndex, toolIndex)
  5048. ">
  5049. <div class="whiteBIcon" @click.stop="
  5050. openTools(itemTaskIndex, 57, toolIndex)
  5051. ">
  5052. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  5053. <div style="margin: 5px 0">CocoPi</div>
  5054. </div>
  5055. <div class="noCTool">
  5056. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5057. </div>
  5058. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  5059. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5060. </div>
  5061. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  5062. <img src="../../../assets/icon/checkNo.png" alt
  5063. v-if="itemTool.tool.indexOf(57) == -1" />
  5064. <div class="checkDiv" v-else>
  5065. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5066. </div>
  5067. </div> -->
  5068. </div>
  5069. <div class="tool" :class="{
  5070. isToolChoose:
  5071. itemTool.tool.indexOf(63) != -1,
  5072. }" @click="
  5073. addTools(63, itemTaskIndex, toolIndex)
  5074. ">
  5075. <div class="whiteBIcon" @click.stop="
  5076. addTools(63, itemTaskIndex, toolIndex)
  5077. ">
  5078. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  5079. <div style="margin: 5px 0">海龟编程</div>
  5080. </div>
  5081. <div class="noCTool">
  5082. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5083. </div>
  5084. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  5085. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5086. </div>
  5087. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  5088. <img src="../../../assets/icon/checkNo.png" alt
  5089. v-if="itemTool.tool.indexOf(63) == -1" />
  5090. <div class="checkDiv" v-else>
  5091. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5092. </div>
  5093. </div> -->
  5094. </div>
  5095. <!-- <div class="tool" :class="{
  5096. isToolChoose:
  5097. itemTool.tool.indexOf(71) != -1,
  5098. }" @click="
  5099. addTools(71, itemTaskIndex, toolIndex)
  5100. ">
  5101. <div class="whiteBIcon" @click.stop="
  5102. addTools(71, itemTaskIndex, toolIndex)
  5103. ">
  5104. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  5105. <div style="margin: 5px 0">AI智能体</div>
  5106. </div>
  5107. <div class="noCTool">
  5108. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5109. </div>
  5110. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  5111. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5112. </div>
  5113. </div> -->
  5114. </div>
  5115. <div class="toolSort" v-if="itemTool.toolType == 7">
  5116. <div class="tool" :class="{
  5117. isToolChoose:
  5118. itemTool.tool.indexOf(40) != -1,
  5119. }" @click.stop="
  5120. addTools(40, itemTaskIndex, toolIndex)
  5121. ">
  5122. <div class="whiteBIcon" @click.stop="
  5123. openTools(itemTaskIndex, 40, toolIndex)
  5124. ">
  5125. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  5126. <div style="margin: 5px 0">个人评价</div>
  5127. </div>
  5128. <div class="noCTool">
  5129. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5130. </div>
  5131. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  5132. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5133. </div>
  5134. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  5135. <img src="../../../assets/icon/checkNo.png" alt
  5136. v-if="itemTool.tool.indexOf(40) == -1" />
  5137. <div class="checkDiv" v-else>
  5138. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5139. </div>
  5140. </div> -->
  5141. </div>
  5142. </div>
  5143. <div class="toolSort" v-if="itemTool.toolType == 5">
  5144. <div class="tool" :class="{
  5145. isToolChoose:
  5146. itemTool.tool.indexOf(28) != -1,
  5147. }" @click="
  5148. addTools(28, itemTaskIndex, toolIndex)
  5149. ">
  5150. <div class="whiteBIcon" @click.stop="
  5151. addTools(28, itemTaskIndex, toolIndex)
  5152. ">
  5153. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  5154. <div style="margin: 5px 0">翻译</div>
  5155. </div>
  5156. <div class="noCTool">
  5157. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5158. </div>
  5159. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  5160. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5161. </div>
  5162. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5163. <img src="../../../assets/icon/checkNo.png" alt
  5164. v-if="itemTool.tool.indexOf(28) == -1" />
  5165. <div class="checkDiv" v-else>
  5166. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5167. </div>
  5168. </div> -->
  5169. </div>
  5170. <div class="tool" :class="{
  5171. isToolChoose:
  5172. itemTool.tool.indexOf(31) != -1,
  5173. }" @click="
  5174. addTools(31, itemTaskIndex, toolIndex)
  5175. ">
  5176. <div class="whiteBIcon" @click.stop="
  5177. addTools(31, itemTaskIndex, toolIndex)
  5178. ">
  5179. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5180. <div style="margin: 5px 0">数字画板</div>
  5181. </div>
  5182. <div class="noCTool">
  5183. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5184. </div>
  5185. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  5186. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5187. </div>
  5188. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5189. <img src="../../../assets/icon/checkNo.png" alt
  5190. v-if="itemTool.tool.indexOf(31) == -1" />
  5191. <div class="checkDiv" v-else>
  5192. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5193. </div>
  5194. </div> -->
  5195. </div>
  5196. <div class="tool" :class="{
  5197. isToolChoose:
  5198. itemTool.tool.indexOf(39) != -1,
  5199. }" @click="
  5200. addTools(39, itemTaskIndex, toolIndex)
  5201. ">
  5202. <div class="whiteBIcon" @click.stop="
  5203. addTools(39, itemTaskIndex, toolIndex)
  5204. ">
  5205. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5206. <div style="margin: 5px 0">GeoGebra</div>
  5207. </div>
  5208. <div class="noCTool">
  5209. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5210. </div>
  5211. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  5212. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5213. </div>
  5214. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5215. <img src="../../../assets/icon/checkNo.png" alt
  5216. v-if="itemTool.tool.indexOf(39) == -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" :class="{
  5223. isToolChoose:
  5224. itemTool.tool.indexOf(66) != -1,
  5225. }" @click="
  5226. addTools(66, itemTaskIndex, toolIndex)
  5227. ">
  5228. <div class="whiteBIcon" @click.stop="
  5229. addTools(66, itemTaskIndex, toolIndex)
  5230. ">
  5231. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  5232. <div style="margin: 5px 0">公式编辑</div>
  5233. </div>
  5234. <div class="noCTool">
  5235. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5236. </div>
  5237. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  5238. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5239. </div>
  5240. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  5241. <img src="../../../assets/icon/checkNo.png" alt
  5242. v-if="itemTool.tool.indexOf(66) == -1" />
  5243. <div class="checkDiv" v-else>
  5244. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5245. </div>
  5246. </div> -->
  5247. </div>
  5248. <!-- <div class="tool">
  5249. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  5250. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  5251. <div style="margin: 5px 0">分子结构</div>
  5252. </div>
  5253. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  5254. <img src="../../../assets/icon/checkNo.png" alt
  5255. v-if="itemTool.tool.indexOf(67) == -1" />
  5256. <div class="checkDiv" v-else>
  5257. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5258. </div>
  5259. </div>
  5260. </div> -->
  5261. <!-- <div class="tool" :class="{
  5262. isToolChoose:
  5263. itemTool.tool.indexOf(68) != -1,
  5264. }" @click="
  5265. addTools(68, itemTaskIndex, toolIndex)
  5266. ">
  5267. <div class="whiteBIcon" @click.stop="
  5268. addTools(68, itemTaskIndex, toolIndex)
  5269. ">
  5270. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  5271. <div style="margin: 5px 0">时间轴</div>
  5272. </div>
  5273. <div class="noCTool">
  5274. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5275. </div>
  5276. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  5277. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5278. </div> -->
  5279. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  5280. <img src="../../../assets/icon/checkNo.png" alt
  5281. v-if="itemTool.tool.indexOf(68) == -1" />
  5282. <div class="checkDiv" v-else>
  5283. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5284. </div>
  5285. </div> -->
  5286. <!-- </div> -->
  5287. <div class="tool" :class="{
  5288. isToolChoose:
  5289. itemTool.tool.indexOf(69) != -1,
  5290. }" @click="
  5291. addTools(69, itemTaskIndex, toolIndex)
  5292. ">
  5293. <div class="whiteBIcon" @click.stop="
  5294. openTools(itemTaskIndex, 69, toolIndex)
  5295. ">
  5296. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  5297. <div style="margin: 5px 0">英语写作</div>
  5298. </div>
  5299. <div class="noCTool">
  5300. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5301. </div>
  5302. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  5303. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5304. </div>
  5305. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  5306. <img src="../../../assets/icon/checkNo.png" alt
  5307. v-if="itemTool.tool.indexOf(4) == -1" />
  5308. <div class="checkDiv" v-else>
  5309. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5310. </div>
  5311. </div> -->
  5312. </div>
  5313. <div class="tool" :class="{
  5314. isToolChoose:
  5315. itemTool.tool.indexOf(70) != -1,
  5316. }" @click="
  5317. addTools(70, itemTaskIndex, toolIndex)
  5318. ">
  5319. <div class="whiteBIcon" @click.stop="
  5320. openTools(itemTaskIndex, 70, toolIndex)
  5321. ">
  5322. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  5323. <div style="margin: 5px 0">英语口语</div>
  5324. </div>
  5325. <div class="noCTool">
  5326. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5327. </div>
  5328. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  5329. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5330. </div>
  5331. </div>
  5332. <!-- <div class="tool">
  5333. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  5334. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  5335. <div style="margin: 5px 0">翻译</div>
  5336. </div>
  5337. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5338. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  5339. <div class="checkDiv" v-else>
  5340. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5341. </div>
  5342. </div>
  5343. </div>
  5344. <div class="tool">
  5345. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  5346. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  5347. <div style="margin: 5px 0">魔盒识字</div>
  5348. </div>
  5349. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  5350. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  5351. <div class="checkDiv" v-else>
  5352. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5353. </div>
  5354. </div>
  5355. </div>
  5356. <div class="tool">
  5357. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  5358. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  5359. <div style="margin: 5px 0">24点</div>
  5360. </div>
  5361. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  5362. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  5363. <div class="checkDiv" v-else>
  5364. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5365. </div>
  5366. </div>
  5367. </div>
  5368. <div class="tool">
  5369. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  5370. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5371. <div style="margin: 5px 0">数学画板</div>
  5372. </div>
  5373. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5374. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  5375. <div class="checkDiv" v-else>
  5376. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5377. </div>
  5378. </div>
  5379. </div>
  5380. <div class="tool">
  5381. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  5382. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5383. <div style="margin: 5px 0">GeoGebra</div>
  5384. </div>
  5385. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5386. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  5387. <div class="checkDiv" v-else>
  5388. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5389. </div>
  5390. </div>
  5391. </div>
  5392. <div class="tool">
  5393. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  5394. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  5395. <div style="margin: 5px 0">模拟驾驶</div>
  5396. </div>
  5397. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  5398. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  5399. <div class="checkDiv" v-else>
  5400. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5401. </div>
  5402. </div>
  5403. </div>
  5404. <div class="tool">
  5405. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  5406. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  5407. <div style="margin: 5px 0">路径搜索</div>
  5408. </div>
  5409. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  5410. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  5411. <div class="checkDiv" v-else>
  5412. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5413. </div>
  5414. </div>
  5415. </div>
  5416. <div class="tool">
  5417. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  5418. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  5419. <div style="margin: 5px 0">深度学习</div>
  5420. </div>
  5421. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  5422. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  5423. <div class="checkDiv" v-else>
  5424. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5425. </div>
  5426. </div>
  5427. </div>
  5428. <div class="tool">
  5429. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  5430. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  5431. <div style="margin: 5px 0">全历史</div>
  5432. </div>
  5433. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  5434. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  5435. <div class="checkDiv" v-else>
  5436. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5437. </div>
  5438. </div>
  5439. </div>
  5440. </div>
  5441. <div class="toolSort" v-if="itemTool.toolType == 4">
  5442. <div class="tool">
  5443. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  5444. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  5445. <div style="margin: 5px 0">课程设计</div>
  5446. </div>
  5447. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  5448. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  5449. <div class="checkDiv" v-else>
  5450. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5451. </div>
  5452. </div>
  5453. </div>
  5454. <div class="tool">
  5455. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  5456. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  5457. <div style="margin: 5px 0">目标管理</div>
  5458. </div>
  5459. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  5460. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  5461. <div class="checkDiv" v-else>
  5462. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5463. </div>
  5464. </div>
  5465. </div> -->
  5466. <!-- <div class="tool">
  5467. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  5468. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  5469. <div style="margin: 5px 0">汉字宫</div>
  5470. </div>
  5471. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  5472. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  5473. <div class="checkDiv" v-else>
  5474. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5475. </div>
  5476. </div>
  5477. </div> -->
  5478. </div>
  5479. </div>
  5480. <!-- v-show="!itemTool.isFold3" -->
  5481. <div class="op_tool_box"
  5482. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1"
  5483. element-loading-text="小可正在努力生成中,请稍等...">
  5484. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  5485. class="binfo_input" style="
  5486. margin: 0 0 20px 0;
  5487. width: 100% !important;
  5488. " v-model="itemTool.toolDetail"></textarea>
  5489. <div class="op_box"
  5490. :class="{op_box_isquote: isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]}">
  5491. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  5492. <div class="op_box_right">
  5493. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5494. <div class="r_pub_button_op"
  5495. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)"
  5496. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)">
  5497. 智能优化</div>
  5498. </el-tooltip>
  5499. <el-switch style="margin-left: 10px"
  5500. v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" active-text="引用"
  5501. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  5502. @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  5503. </div>
  5504. </div>
  5505. </div>
  5506. <evaList :toolsData="toolsData" :unitJson="unitJson" :itemTaskIndex="itemTaskIndex"
  5507. :toolIndex="toolIndex" :knowFileids="knowFileids" :languageSetting="languageSetting"
  5508. :userid="userid" :aiJson="aiJson" @addAppendixEva="addAppendixEva"
  5509. @setEvaList="setEvaList" @addCourseBehavior="addCourseBehavior"
  5510. v-if="panTaskElist() == 0 && pjIndex.indexOf(itemTool.tool[0]) != -1"
  5511. :ref="'evalist'+itemTaskIndex+toolIndex"></evaList>
  5512. </div>
  5513. <button class="c_pub_button_add pub_btn_tool_img"
  5514. @click="addToolFun(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具描述-添加按钮`)"
  5515. style="
  5516. margin: 0 auto;
  5517. padding: 0 30px;
  5518. height: 45px;
  5519. ">
  5520. 添加工具
  5521. </button>
  5522. </div>
  5523. </div>
  5524. <div class="elist_css" v-if="panElist(itemTask) > 0">
  5525. <div class="elist_title">
  5526. <div style=" display: flex; flex-direction: row; align-items: center; margin: 20px 0; ">
  5527. <div class="lineTitle clineTitle" style="width: auto">任务评价体系</div>
  5528. </div>
  5529. <div>
  5530. <MindTask :showBar="false" :mindData="itemTask" style="width: 100%"
  5531. :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' "
  5532. :ref="unitIndex + '-' + itemTaskIndex + 'mindTask'"></MindTask>
  5533. </div>
  5534. </div>
  5535. </div>
  5536. <div class="elist_css" v-if="panTaskElist() > 0"
  5537. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])"
  5538. element-loading-text="小可正在努力生成中,请稍等...">
  5539. <div class="elist_title">
  5540. <div style="
  5541. display: flex;
  5542. flex-direction: row;
  5543. align-items: center;
  5544. margin: 20px 0;
  5545. ">
  5546. <div class="lineTitle clineTitle">评价设置</div>
  5547. <div style="margin-left:auto;display: flex;">
  5548. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  5549. v-if="itemTask.eList && itemTask.eList.length">
  5550. <div class="r_pub_button_op"
  5551. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  5552. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  5553. </el-tooltip>
  5554. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  5555. v-if="itemTask.eList && itemTask.eList.length">
  5556. <div class="r_pub_button_op" style="margin-left:10px;"
  5557. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  5558. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  5559. </el-tooltip>
  5560. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5561. <div class="r_pub_button_op" style="margin-left:10px;"
  5562. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  5563. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList &&
  5564. itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
  5565. </el-tooltip>
  5566. </div>
  5567. <!-- <div class="line" style="width: 90%"></div> -->
  5568. </div>
  5569. </div>
  5570. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5571. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5572. 上传补充资料
  5573. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  5574. style="display: none" v-if="inputShow" @change="
  5575. beforeUploadInfo2(
  5576. $event,
  5577. 18,
  5578. itemTaskIndex
  5579. )
  5580. " />
  5581. </button>
  5582. <div style="margin-top: 10px;width:100%"
  5583. v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  5584. <div class="add_chapters_box add_c_none" v-if="
  5585. pingjiaInfoData[itemTaskIndex] &&
  5586. pingjiaInfoData[itemTaskIndex].length == 0
  5587. ">
  5588. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5589. <span>暂时还没有内容,快去添加吧</span>
  5590. </div>
  5591. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5592. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]"
  5593. :key="item1.id" @click="
  5594. getChapterData(
  5595. $event,
  5596. index1,
  5597. item1.type
  5598. )
  5599. ">
  5600. <div class="chapter_upload_o" style="
  5601. position: relative;
  5602. display: flex;
  5603. align-items: center;
  5604. ">
  5605. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5606. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5607. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5608. </div>
  5609. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5610. </div>
  5611. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5612. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5613. </div>
  5614. <div v-if="item1.type == 14" class="chapter_upload_l_i14"
  5615. style="margin-left: 1px">
  5616. </div>
  5617. <div v-if="item1.type == 12" class="chapter_upload_l_i12"
  5618. style="margin-left: 1px">
  5619. </div>
  5620. <div v-if="item1.type == 13" class="chapter_upload_l_i13"
  5621. style="margin-left: 1px">
  5622. </div>
  5623. </div>
  5624. <div class="chapter_upload_n">
  5625. <input readonly="true" v-if="
  5626. item1.type == 2 ||
  5627. item1.type == 3 ||
  5628. item1.type == 12 ||
  5629. item1.type == 13 ||
  5630. item1.type == 7
  5631. " :placeholder="item1.name" @click.stop="
  5632. checkChpater3($event, index1, item1)
  5633. " style="
  5634. border: none;
  5635. outline: none;
  5636. width: 80%;
  5637. minwidth: 215px;
  5638. z-index: 99;
  5639. font-size: 14px;
  5640. white-space: nowrap;
  5641. overflow: hidden;
  5642. text-overflow: ellipsis;
  5643. " />
  5644. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5645. border: none;
  5646. outline: none;
  5647. width: 80%;
  5648. white-space: nowrap;
  5649. overflow: hidden;
  5650. text-overflow: ellipsis;
  5651. " readonly="true" @click="
  5652. selectAttText(index1)
  5653. " />
  5654. <input :placeholder="item1.title ? item1.title : '链接'
  5655. " v-if="item1.type == 8" style="
  5656. border: none;
  5657. outline: none;
  5658. width: 80%;
  5659. white-space: nowrap;
  5660. overflow: hidden;
  5661. text-overflow: ellipsis;
  5662. " readonly="true" @click="selectLine(index1)" />
  5663. <input :placeholder="item1.title ? item1.title : '链接'
  5664. " v-if="item1.type == 14" style="
  5665. border: none;
  5666. outline: none;
  5667. width: 80%;
  5668. white-space: nowrap;
  5669. overflow: hidden;
  5670. text-overflow: ellipsis;
  5671. " readonly="true" @click="
  5672. openUpdateSource(index1)
  5673. " />
  5674. </div>
  5675. <div class="chapter_upload_ic">
  5676. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5677. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5678. checkChpater3($event, index1, item1)
  5679. ">
  5680. <div></div>
  5681. </div>
  5682. <div class="chapter_upload_ic_r" @click.stop="
  5683. deletepingjiaInfoData(
  5684. $event,
  5685. index1,
  5686. itemTaskIndex
  5687. )
  5688. ">
  5689. <div></div>
  5690. </div>
  5691. </div>
  5692. </div>
  5693. </div>
  5694. </div>
  5695. </div>
  5696. <div v-if="
  5697. pingjiainfoproVisible[itemTaskIndex]
  5698. " class="mask">
  5699. <div class="progressBox">
  5700. <div class="lbox">
  5701. <img src="../../../assets/loading.gif" />上传中,请稍后
  5702. </div>
  5703. <div style="margin-bottom: 10px">
  5704. <span>{{
  5705. pingjiainfoisFinishSize[itemTaskIndex]
  5706. }}</span>
  5707. /
  5708. <span>{{
  5709. pingjiainfoisAllSize[itemTaskIndex]
  5710. }}</span>
  5711. </div>
  5712. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5713. ? pingjiainfoprogress[itemTaskIndex]
  5714. : 0
  5715. " style="width: 80%"></el-progress> -->
  5716. </div>
  5717. </div>
  5718. </div>
  5719. <div class="mbCss">
  5720. <div class="pjCss" :style="{
  5721. width: itemTask.isEvaFold
  5722. ? 'calc(100% - 55%)'
  5723. : 'calc(100% - 120px)',
  5724. }">
  5725. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5726. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5727. <div class="elist_inptu_text">
  5728. <span>目标:</span>
  5729. <!-- <span>核心素养:</span> -->
  5730. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标"
  5731. style="width: calc(100% - 280px);" />
  5732. <el-switch @change="forceUpdate" class="rateSwitch" style="margin-left: auto;"
  5733. v-model="itemTask.eList[eIndex].isai" active-color="#0061FF" active-text="AI评分"
  5734. inactive-text="" active-value="1" inactive-value="2">
  5735. </el-switch>
  5736. </div>
  5737. <div class="elist_inptu_text" v-show="false">
  5738. <!-- <span>评价维度:</span> -->
  5739. <span>能力:</span>
  5740. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5741. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5742. <!-- </el-tooltip> -->
  5743. <!-- <span>评星等级:</span>
  5744. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5745. disabled></el-rate> -->
  5746. <div class="remove" @click="
  5747. deletEList(
  5748. unitIndex,
  5749. itemTaskIndex,
  5750. eIndex
  5751. )
  5752. "></div>
  5753. </div>
  5754. <div class="elist_inptu_text">
  5755. <!-- <span>维度描述:</span> -->
  5756. <span>评价标准:</span>
  5757. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5758. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5759. <div class="remove" @click="
  5760. deletEList(
  5761. unitIndex,
  5762. itemTaskIndex,
  5763. eIndex
  5764. )
  5765. "></div>
  5766. <!-- </el-tooltip> -->
  5767. </div>
  5768. <div class="elist_inptu_text" v-if="evalua">
  5769. <span>目标:</span>
  5770. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5771. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5772. @change="forceUpdate()">
  5773. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5774. :value="e.name">
  5775. </el-option>
  5776. </el-select> -->
  5777. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5778. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5779. </div>
  5780. <div class="elist_inptu_text" style="align-items: flex-start;"
  5781. v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]"
  5782. element-loading-text="小可正在努力生成中,请稍等...">
  5783. <span>评价细则:</span>
  5784. <div style="width: calc(100%);">
  5785. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn"
  5786. v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' :
  5787. '展开细则'}}</div>
  5788. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5789. <div class="ruleBtn"
  5790. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5791. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5792. </el-tooltip>
  5793. <div style="width: calc(100%);" class='op_task_box'
  5794. v-if="itemTask.eList[eIndex].isrule">
  5795. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  5796. v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5797. <div class="op_box">
  5798. <div class="op_remark"></div>
  5799. <div class="op_box_right">
  5800. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5801. <div class="r_pub_button_op"
  5802. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5803. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">
  5804. {{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5805. </el-tooltip>
  5806. </div>
  5807. </div>
  5808. </div>
  5809. </div>
  5810. </div>
  5811. </div>
  5812. </div>
  5813. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5814. style="margin: 35px 35px 0 0">
  5815. <div class="addToolImg">
  5816. <img src="../../../assets/icon/add.png" alt />
  5817. </div>
  5818. <div>添加</div>
  5819. </div> -->
  5820. <div class="eva_btn_box">
  5821. <div class="eva_btn_left_box">
  5822. <button class="c_pub_button_add pub_btn_eval_img"
  5823. @click="addEList(unitIndex, itemTaskIndex)">
  5824. 添加
  5825. </button>
  5826. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5827. @click="openEList(unitIndex, itemTaskIndex)">
  5828. 资源
  5829. </button> -->
  5830. </div>
  5831. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5832. v-if="itemTask.eList && itemTask.eList.length">
  5833. 添加资源模板
  5834. </button>
  5835. </div>
  5836. </div>
  5837. <div v-if="evalua" style="
  5838. border: 1px solid #e5e5e5;
  5839. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5840. " :style="{
  5841. width: itemTask.isEvaFold ? '55%' : '116px',
  5842. }" class="evaCss">
  5843. <!-- <div class="e_add_top">
  5844. <div class="e_add_title">
  5845. <span>当前使用目标管理</span>
  5846. <span>{{ eTitle }}</span>
  5847. <img src="../../../assets/line.png" class="cru_line" style="
  5848. width: 125px;
  5849. height: 20px;
  5850. bottom: -10px;
  5851. left: 155px;
  5852. " />
  5853. </div>
  5854. </div> -->
  5855. <div class="e_add_content" style="width: 100%">
  5856. <div class="e_add_list_pbox" style="width: 100%">
  5857. <div class="e_add_list_pbox_title">
  5858. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5859. <div class="type_content" v-if="itemTask.isEvaFold">
  5860. <span :class="{ active: typeMode == 1 }"
  5861. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5862. <span :class="{ active: typeMode == 2 }"
  5863. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5864. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5865. </div>
  5866. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5867. @click="foldEva(itemTaskIndex)">
  5868. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5869. </div>
  5870. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5871. @click="foldEva(itemTaskIndex)">
  5872. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5873. </div>
  5874. </div>
  5875. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5876. style="min-height: 200px">
  5877. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5878. " v-if="typeMode == 1"></Mind>
  5879. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5880. </Sunburst>
  5881. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5882. v-if="typeMode == 3"></SeeBoard>
  5883. </div>
  5884. </div>
  5885. </div>
  5886. </div>
  5887. </div>
  5888. </div>
  5889. <div class="funBlock" style="padding: 0">
  5890. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5891. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5892. <div>
  5893. {{
  5894. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5895. }}
  5896. </div>
  5897. </div>
  5898. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5899. <div>展开</div>
  5900. <div class="arrow">
  5901. <img src="../../../assets/icon/expand.png" alt />
  5902. </div>
  5903. </div> -->
  5904. </div>
  5905. </div>
  5906. </div>
  5907. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5908. <!-- <div>
  5909. <img src="../../../../assets/icon/new/addStage.png" alt />
  5910. <span>添加任务</span>
  5911. </div> -->
  5912. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5913. 添加任务
  5914. </button>
  5915. </div>
  5916. <div class="appendixBox whiteBg taskBorder" style="background: #fff; margin: 10px 0 10px;"
  5917. :style="{ paddingBottom: appendixPan ? '10px' : '0px', minHeight: appendixPan ? '670px' : 'unset' }" v-if="(appendixTaskCheck != 'all' || appendixTypeCheck != 'all') || allFile().length" v-loading="appendixLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5918. <div class="whiteBg" style="border-radius: 0; ">
  5919. <div class="appendix_info_title" style="margin: 0 20px 0 20px;position:relative; padding: 0 0 15px;">
  5920. <span>附件</span>
  5921. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  5922. @click="appendixPan = !appendixPan">{{ appendixPan ? '折叠' : '展开' }}</button>
  5923. </div>
  5924. <div style="width: 100%; box-sizing: border-box;"
  5925. v-show="appendixPan">
  5926. <div class="appendix_check_box">
  5927. <div class="appendix_check_task">
  5928. <span>任务:</span>
  5929. <div class="checkButton" :class="{ checked: appendixTaskCheck == 'all' }" @click="appendixTaskCheck = 'all'">全部</div>
  5930. <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>
  5931. </div>
  5932. <div class="appendix_check_type">
  5933. <span>文件类型:</span>
  5934. <div class="checkButton" :class="{ checked: appendixTypeCheck == 'all' }" @click="appendixTypeCheck = 'all'">全部</div>
  5935. <div class="checkButton" :class="{ checked: appendixTypeCheck == tIndex }" @click="appendixTypeCheck = t.value" v-for="(t, tIndex) in appendixType" :key="tIndex">{{ t.label }}</div>
  5936. </div>
  5937. <div class="appendix_check_all_box">
  5938. <div class="appendix_check_all" v-if="allFile().length" @click="checkAllappendixFile()">
  5939. <div class="chapter_upload_check" :class="{ checked: panAppendixCheckAll() }"></div>
  5940. <div class="appendix_check_all_text">全选</div>
  5941. </div>
  5942. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="exportAppendixFiles">批量下载</button>
  5943. </div>
  5944. </div>
  5945. <div class="appendix_file_box">
  5946. <div class="add_chapters_box" style="display: flex; flex-direction: column">
  5947. <div style="height: 50px; display: flex ; align-items: center; justify-content: center;" v-if="allFile().length == 0 ">
  5948. <span>暂时还没有内容,快去添加吧</span>
  5949. </div>
  5950. <div class="chapter_upload" v-for="(item1, index1) in allFile()" :key="item1.id">
  5951. <div class="chapter_upload_o"
  5952. style=" position: relative; display: flex; align-items: center; ">
  5953. <div class="chapter_upload_check"
  5954. :class="{ checked: appendixFiles.indexOf(item1.url) != -1 }"
  5955. @click="checkAppendixFile(item1.url)"></div>
  5956. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5957. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5958. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5959. </div>
  5960. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5961. </div>
  5962. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5963. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5964. </div>
  5965. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5966. </div>
  5967. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5968. </div>
  5969. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5970. </div>
  5971. </div>
  5972. <div class="chapter_upload_n" style="width: 100%;">
  5973. <div @click.stop="
  5974. checkChpater3($event, index1, item1)
  5975. " v-if="
  5976. item1.type == 2 ||
  5977. item1.type == 3 ||
  5978. item1.type == 12 ||
  5979. item1.type == 13 ||
  5980. item1.type == 7
  5981. " class="chapter_upload_box">{{ item1.name }}</div>
  5982. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  5983. selectAttText(0, index1)
  5984. ">{{ item1.name }}</div>
  5985. <div v-if="item1.type == 8" class="chapter_upload_box"
  5986. @click="selectLine(0, index1)">{{ item1.title ? item1.title : '链接' }}</div>
  5987. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  5988. openUpdateSource(0, index1)
  5989. ">{{ item1.title ? item1.title : '链接' }}</div>
  5990. </div>
  5991. <div class="chapter_upload_ic">
  5992. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5993. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5994. checkChpater3($event, index1, item1)
  5995. ">
  5996. <div></div>
  5997. </div>
  5998. <div class="chapter_upload_ic_download" @click.stop="downloadFile(item1)">
  5999. <div></div>
  6000. </div>
  6001. </div>
  6002. </div>
  6003. </div>
  6004. </div>
  6005. </div>
  6006. </div>
  6007. </div>
  6008. </div>
  6009. </div>
  6010. <div class="info_btnBox3" v-show="istemplate == 1">
  6011. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  6012. goTo(
  6013. '/course?userid=' +
  6014. userid +
  6015. '&oid=' +
  6016. oid +
  6017. '&org=' +
  6018. org +
  6019. '&role=' +
  6020. role
  6021. )
  6022. ">
  6023. 返回课程
  6024. </button>
  6025. <button class="c_pub_button_return pub_btn_last_img"
  6026. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  6027. {{ steps == 4 ? "返回课程" : "上一步" }}
  6028. </button>
  6029. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  6030. pub_btn_next_img: steps != 3,
  6031. pub_btn_finish_img: steps == 3,
  6032. }">
  6033. {{ steps == 3 ? "确认上传" : "下一步" }}
  6034. </button>
  6035. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  6036. '修改模板' : '保存模板'}}</button>
  6037. </div>
  6038. </div>
  6039. </div>
  6040. </div>
  6041. </div>
  6042. <div style="
  6043. width: calc(100% - 20px);
  6044. background: rgb(255, 255, 255);
  6045. border-radius: 10px;
  6046. " v-if="steps == 4">
  6047. <div class="basic_box_success">
  6048. <div class="right_img">
  6049. <img src="../../../assets/icon/right.png" alt />
  6050. </div>
  6051. <div style="font-weight: bold">成功</div>
  6052. <!-- <div>您的课程编号</div>
  6053. <div class="number">{{ number }}</div>-->
  6054. <!-- <div class="success_button">
  6055. <div class="look_course" @click="isNoFinsh">
  6056. 邀请老师协同编辑
  6057. </div>
  6058. <div class="attend_others" @click="goCourse">预览课程</div>
  6059. </div> -->
  6060. </div>
  6061. </div>
  6062. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  6063. @mouseleave="btnDisplay(false)" v-if="false">
  6064. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  6065. goTo(
  6066. '/course?userid=' +
  6067. userid +
  6068. '&oid=' +
  6069. oid +
  6070. '&org=' +
  6071. org +
  6072. '&role=' +
  6073. role
  6074. )
  6075. ">
  6076. 返回课程
  6077. </button>
  6078. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  6079. @click="lastSteps">
  6080. {{ steps == 4 ? "返回课程" : "上一步" }}
  6081. </button>
  6082. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  6083. pub_btn_next_img: steps != 3,
  6084. pub_btn_finish_img: steps == 3,
  6085. }">
  6086. {{ steps == 3 ? "确认上传" : "下一步" }}
  6087. </button>
  6088. </div>
  6089. </div>
  6090. </div>
  6091. <div class="leftBar" style="height: calc(100% - 36px - 20px);margin-top: 36px;" v-if="istemplate == 1">
  6092. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson"
  6093. v-if="!yiKeTemplateArray.includes(templateid)" />
  6094. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson"
  6095. v-if="!yiKeTemplateArray.includes(templateid)" />
  6096. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson"
  6097. v-if="!yiKeTemplateArray.includes(templateid)" />
  6098. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  6099. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson"
  6100. v-if="!yiKeTemplateArray.includes(templateid)" />
  6101. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson"
  6102. v-if="!yiKeTemplateArray.includes(templateid)" />
  6103. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson"
  6104. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6105. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson"
  6106. v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'" />
  6107. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2"
  6108. @setAiJson="setAiJson" />
  6109. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson"
  6110. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6111. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson"
  6112. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6113. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson"
  6114. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6115. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson"
  6116. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6117. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson"
  6118. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6119. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson"
  6120. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6121. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  6122. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  6123. @setAiJson="setAiJson" /> -->
  6124. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  6125. @setAiJson="setAiJson" />
  6126. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  6127. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  6128. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  6129. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  6130. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  6131. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  6132. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  6133. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson" />
  6134. </div>
  6135. <div class="leftBar2 resizable" style="height: calc(100% - 36px - 20px);margin-top: 36px;"
  6136. v-show="istemplate != 1 && isDialog == 1 && chatid && isDisplay">
  6137. <div class="resizer"></div>
  6138. <aiBoxRight :languageSetting="languageSetting" :courseId="chatid" :unitJson="unitJson" :quoteArray="isQuote"
  6139. :teacherCourseText="teacherCourseText" :targetCourseText="targetCourseText" :courseText2="courseText"
  6140. :targetCourseText2="targetCourseText2" :cpote="cpote" @addCourseBehavior="addCourseBehavior"
  6141. :fileids='[...knowFileids, ...knowFileids2]' @setIsQuote="setIsQuote" @addChatAppendixFile="addChatAppendixFile"></aiBoxRight>
  6142. </div>
  6143. <div class="close_btn" @click="closeRight" :class="!isDisplay ? 'close_btn_voice' : ''"
  6144. v-show="istemplate != 1 && isDialog == 1 && chatid">
  6145. <img src="../../../assets/icon/course/arrow.svg">
  6146. </div>
  6147. </div>
  6148. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  6149. class="dialog_diy2 customWidth">
  6150. <div>请复制该链接邀请协同编辑</div>
  6151. <div>http://www.boomyon.com/index-zhang.com</div>
  6152. <span slot="footer" class="dialog-footer">
  6153. <el-button type="primary">复制链接分享</el-button>
  6154. <el-button @click="dialogVisible = false">取消</el-button>
  6155. </span>
  6156. </el-dialog>
  6157. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  6158. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  6159. <el-form>
  6160. <el-form-item label="文档标题">
  6161. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  6162. </el-form-item>
  6163. <div>文档简介</div>
  6164. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  6165. </el-form>
  6166. <span slot="footer" class="dialog-footer">
  6167. <el-button @click="dialogVisible1 = false">取 消</el-button>
  6168. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  6169. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  6170. </span>
  6171. </el-dialog>
  6172. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  6173. :before-close="handleClose" class="dialog_diy">
  6174. <el-form>
  6175. <el-form-item label="文档标题">
  6176. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  6177. </el-form-item>
  6178. <div>文档内容</div>
  6179. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  6180. </el-form>
  6181. <span slot="footer" class="dialog-footer">
  6182. <el-button @click="clearChoose">取 消</el-button>
  6183. <el-button type="primary" @click="wordNext()">确定</el-button>
  6184. </span>
  6185. </el-dialog>
  6186. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  6187. :before-close="handleClose" class="dialog_diy">
  6188. <el-form>
  6189. <el-form-item label="文本标题">
  6190. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  6191. placeholder="请输入文本标题..."></el-input>
  6192. </el-form-item>
  6193. <!-- <div>富文本内容</div> -->
  6194. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  6195. </el-form>
  6196. <span slot="footer" class="dialog-footer">
  6197. <el-button @click="clearAttText">取 消</el-button>
  6198. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  6199. </span>
  6200. </el-dialog>
  6201. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  6202. :before-close="handleClose" class="dialog_diy lineCss">
  6203. <el-form>
  6204. <el-form-item label="标题" :label-width="formLabelWidth">
  6205. <span>
  6206. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  6207. </span>
  6208. </el-form-item>
  6209. <el-form-item label="链接" :label-width="formLabelWidth">
  6210. <span>
  6211. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  6212. </span>
  6213. </el-form-item>
  6214. </el-form>
  6215. <span slot="footer" class="dialog-footer">
  6216. <el-button @click="clearLine">取 消</el-button>
  6217. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  6218. </span>
  6219. </el-dialog>
  6220. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  6221. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  6222. <div>
  6223. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  6224. </div>
  6225. <span slot="footer" class="dialog-footer">
  6226. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  6227. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  6228. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  6229. </span>
  6230. </el-dialog>
  6231. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  6232. :before-close="handleClose" class="addNewPP customWidth">
  6233. <div class="people">
  6234. <div class="people_top">
  6235. <div class="people_nav">选择成员</div>
  6236. <div class="people_top_right">
  6237. <div class="people_search">
  6238. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  6239. <div class="search_img" @click="searchStudent">
  6240. <img src="../../../assets/icon/search.png" alt />
  6241. </div>
  6242. </div>
  6243. </div>
  6244. </div>
  6245. <el-checkbox-group v-model="checkboxList" class="people_name">
  6246. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  6247. "暂无学生可选" }}</el-checkbox>
  6248. </el-checkbox-group>
  6249. </div>
  6250. <span slot="footer" class="dialog-footer">
  6251. <el-button @click="dialogVisible3 = false">取 消</el-button>
  6252. <el-button type="primary" @click="isAddPP">确定</el-button>
  6253. </span>
  6254. </el-dialog>
  6255. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  6256. :before-close="handleClose" class="addNewPP2">
  6257. <div class="check_classBox">
  6258. <div class="check_class_right">
  6259. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  6260. 全部
  6261. </div>
  6262. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  6263. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  6264. {{ item.name }}
  6265. </div>
  6266. </el-tooltip>
  6267. </div>
  6268. <div class="check_class_left">
  6269. <div class="check_class_all_box">
  6270. <div class="check_class_left_title">选择班级</div>
  6271. <div style="display: flex; align-items: center; margin-left: auto">
  6272. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  6273. </div>
  6274. </div>
  6275. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  6276. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  6277. </div> -->
  6278. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  6279. v-if="grade2.length">
  6280. <div v-for="item in grade2" :key="item.id" class="class_item">
  6281. <el-checkbox :label="item.id">
  6282. {{ item.name }}
  6283. </el-checkbox>
  6284. </div>
  6285. </el-checkbox-group>
  6286. <div v-if="!grade2.length">暂无数据</div>
  6287. </div>
  6288. </div>
  6289. <span slot="footer" class="dialog-footer">
  6290. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  6291. <el-button type="primary" @click="isAddClass">确定</el-button>
  6292. </span>
  6293. </el-dialog>
  6294. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  6295. :before-close="handleClose" class="addNewPP customWidth">
  6296. <div style="display: flex;justify-content: space-between;">
  6297. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  6298. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  6299. 全部
  6300. </div>
  6301. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  6302. v-for="(i) in CollaborativeTeaList" :key="i.id">
  6303. <el-tooltip placement="top" :content="i.name">
  6304. <span>{{i.name}}</span>
  6305. </el-tooltip>
  6306. </div>
  6307. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  6308. 其他
  6309. </div>
  6310. </div>
  6311. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  6312. <div class="people">
  6313. <div class="people_top">
  6314. <div class="people_top_right">
  6315. <div class="people_search">
  6316. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  6317. <div class="search_img" @click="getTeacher(collid)">
  6318. <img src="../../../assets/icon/search.png" alt />
  6319. </div>
  6320. </div>
  6321. </div>
  6322. <div class="people_nav" style="display: flex; align-items: center">
  6323. <div class="check_class_left_title">选择成员</div>
  6324. <div style="display: flex; align-items: center; margin-left: auto">
  6325. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  6326. </div>
  6327. </div>
  6328. </div>
  6329. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  6330. @change="InviteChange2">
  6331. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  6332. <div class="t_j_box">
  6333. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  6334. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  6335. </el-tooltip>
  6336. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  6337. <span>{{ item.username.split('@')[0] }}</span>
  6338. </el-tooltip>
  6339. <el-tooltip placement="top" :content="item.school">
  6340. <span>{{ item.school }}</span>
  6341. </el-tooltip>
  6342. </div>
  6343. </el-checkbox>
  6344. </el-checkbox-group>
  6345. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  6346. </div>
  6347. </div>
  6348. </div>
  6349. <span slot="footer" class="dialog-footer">
  6350. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  6351. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  6352. </span>
  6353. </el-dialog>
  6354. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  6355. closePan(4);
  6356. }
  6357. " class="dialog_diy fullStyle">
  6358. <div style="height: 100%">
  6359. <div class="a_add_title" style="
  6360. display: flex;
  6361. flex-direction: row;
  6362. align-items: center;
  6363. justify-content: center;
  6364. ">
  6365. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  6366. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6367. </div>
  6368. <div class="a_addBox" style="height: calc(100% - 50px)">
  6369. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  6370. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  6371. <div class="a_add_checkType">
  6372. <span :class="{
  6373. active:
  6374. askJson.askJson[index1].type == '1' ||
  6375. !askJson.askJson[index1].type,
  6376. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  6377. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  6378. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  6379. </div>
  6380. <div class="a_add_head">
  6381. <div style="
  6382. display: flex;
  6383. align-items: center;
  6384. width: 100%;
  6385. margin-right: 20px;
  6386. ">
  6387. <span style="min-width: fit-content">{{
  6388. index1 + 1 + "、"
  6389. }}</span>
  6390. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6391. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  6392. $forceUpdate();
  6393. }
  6394. "></textarea>
  6395. </div>
  6396. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  6397. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  6398. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  6399. </div>
  6400. <div class="a_add_head_div">
  6401. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  6402. </el-button>
  6403. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  6404. </div>
  6405. </div>
  6406. <div class="a_add_body">
  6407. <div class="a_add_input" style="flex-direction: column">
  6408. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  6409. margin: 20px 10px 0 0;
  6410. display: flex;
  6411. align-items: center;
  6412. position: relative;
  6413. ">
  6414. <div style="margin-right: 10px">{{ optionTypeList[checkIndex] }}.</div>
  6415. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6416. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  6417. @change="() => {
  6418. $forceUpdate();
  6419. }
  6420. "></textarea>
  6421. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  6422. v-if="askJson.askJson[index1].askItem != 1">
  6423. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  6424. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  6425. </div>
  6426. <div class="a_add_body_div">
  6427. <el-button type="primary" size="small"
  6428. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  6429. <el-button type="primary" size="small" @click="
  6430. deletecheckList(askJson.askJson[index1], checkIndex)
  6431. " v-if="askJson.askJson[index1].askItem != 1">删除
  6432. </el-button>
  6433. </div>
  6434. </div>
  6435. </div>
  6436. <!-- <div class="a_add_body_div">
  6437. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  6438. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  6439. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  6440. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  6441. </el-button>
  6442. </div> -->
  6443. </div>
  6444. </div>
  6445. </div>
  6446. </div>
  6447. <span slot="footer" class="dialog-footer">
  6448. <el-button @click="closePan(4)">取 消</el-button>
  6449. <el-button type="primary" @click="addAsk">确 定</el-button>
  6450. </span>
  6451. </el-dialog>
  6452. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  6453. closePan(45);
  6454. }
  6455. " class="dialog_diy fullStyle">
  6456. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  6457. <!-- <div class="a_add_title" style="
  6458. display: flex;
  6459. flex-direction: row;
  6460. align-items: center;
  6461. justify-content: center;
  6462. ">
  6463. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  6464. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6465. </div> -->
  6466. <div class="a_addBox" style="height: 100%">
  6467. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  6468. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  6469. 上传补充资料
  6470. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none"
  6471. v-if="inputShow" @change="
  6472. beforeUploadInfo2(
  6473. $event,
  6474. 17
  6475. )
  6476. " />
  6477. </button>
  6478. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  6479. <div class="add_chapters_box add_c_none" v-if="
  6480. xuanzeInfoData &&
  6481. xuanzeInfoData.length == 0
  6482. ">
  6483. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  6484. <span>暂时还没有内容,快去添加吧</span>
  6485. </div>
  6486. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  6487. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  6488. getChapterData(
  6489. $event,
  6490. index1,
  6491. item1.type
  6492. )
  6493. ">
  6494. <div class="chapter_upload_o" style="
  6495. position: relative;
  6496. display: flex;
  6497. align-items: center;
  6498. ">
  6499. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  6500. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  6501. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  6502. </div>
  6503. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  6504. </div>
  6505. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  6506. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  6507. </div>
  6508. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  6509. </div>
  6510. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  6511. </div>
  6512. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  6513. </div>
  6514. </div>
  6515. <div class="chapter_upload_n">
  6516. <input readonly="true" v-if="
  6517. item1.type == 2 ||
  6518. item1.type == 3 ||
  6519. item1.type == 12 ||
  6520. item1.type == 13 ||
  6521. item1.type == 7
  6522. " :placeholder="item1.name" @click.stop="
  6523. checkChpater3($event, index1, item1)
  6524. " style="
  6525. border: none;
  6526. outline: none;
  6527. width: 80%;
  6528. minwidth: 215px;
  6529. z-index: 99;
  6530. font-size: 14px;
  6531. white-space: nowrap;
  6532. overflow: hidden;
  6533. text-overflow: ellipsis;
  6534. " />
  6535. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  6536. border: none;
  6537. outline: none;
  6538. width: 80%;
  6539. white-space: nowrap;
  6540. overflow: hidden;
  6541. text-overflow: ellipsis;
  6542. " readonly="true" @click="
  6543. selectAttText(index1)
  6544. " />
  6545. <input :placeholder="item1.title ? item1.title : '链接'
  6546. " v-if="item1.type == 8" style="
  6547. border: none;
  6548. outline: none;
  6549. width: 80%;
  6550. white-space: nowrap;
  6551. overflow: hidden;
  6552. text-overflow: ellipsis;
  6553. " readonly="true" @click="selectLine(index1)" />
  6554. <input :placeholder="item1.title ? item1.title : '链接'
  6555. " v-if="item1.type == 14" style="
  6556. border: none;
  6557. outline: none;
  6558. width: 80%;
  6559. white-space: nowrap;
  6560. overflow: hidden;
  6561. text-overflow: ellipsis;
  6562. " readonly="true" @click="
  6563. openUpdateSource(index1)
  6564. " />
  6565. </div>
  6566. <div class="chapter_upload_ic">
  6567. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  6568. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  6569. checkChpater3($event, index1, item1)
  6570. ">
  6571. <div></div>
  6572. </div>
  6573. <div class="chapter_upload_ic_r" @click.stop="
  6574. deletexuanzeInfoData(
  6575. $event,
  6576. index1
  6577. )
  6578. ">
  6579. <div></div>
  6580. </div>
  6581. </div>
  6582. </div>
  6583. </div>
  6584. </div>
  6585. </div>
  6586. <div v-if="
  6587. xuanzeinfoproVisible
  6588. " class="mask">
  6589. <div class="progressBox">
  6590. <div class="lbox">
  6591. <img src="../../../assets/loading.gif" />上传中,请稍后
  6592. </div>
  6593. <div style="margin-bottom: 10px">
  6594. <span>{{
  6595. xuanzeinfoisFinishSize
  6596. }}</span>
  6597. /
  6598. <span>{{
  6599. xuanzeinfoisAllSize
  6600. }}</span>
  6601. </div>
  6602. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  6603. ? xuanzeinfoprogress
  6604. : 0
  6605. " style="width: 80%"></el-progress> -->
  6606. </div>
  6607. </div>
  6608. </div>
  6609. <div style="
  6610. font-size: 16px;
  6611. color: #c7c7c7;
  6612. display: flex;
  6613. align-items: center;
  6614. justify-content: flex-end;
  6615. ">
  6616. <!-- 请输入题目内容 -->
  6617. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  6618. 智能生成
  6619. </button>
  6620. <!-- 请输入题目内容 -->
  6621. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  6622. v-if="isPasteChoice">
  6623. 智能粘贴
  6624. </button>
  6625. </div>
  6626. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  6627. <div class="a_add_checkType">
  6628. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  6629. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  6630. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  6631. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  6632. </div>
  6633. <div class="a_add_head">
  6634. <div class="timuUpImg">
  6635. <div style="display: flex; align-items: center">
  6636. <span style="min-width: fit-content">{{
  6637. index1 + 1 + "、"
  6638. }}</span>
  6639. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  6640. placeholder="请输入题目">
  6641. </el-input> -->
  6642. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6643. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  6644. $forceUpdate();
  6645. }
  6646. "></textarea>
  6647. </div>
  6648. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  6649. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  6650. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  6651. </div>
  6652. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  6653. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6654. <input type="file" accept="image/*" style="display: none"
  6655. @change="beforeUploadTiMu($event, index1)" />
  6656. </div>
  6657. </div>
  6658. <div class="a_add_head_div">
  6659. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  6660. </el-button>
  6661. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  6662. </div>
  6663. </div>
  6664. <div class="timuImgBox" v-if="
  6665. testJson.testJson[index1].timuList &&
  6666. testJson.testJson[index1].timuList.length
  6667. ">
  6668. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  6669. @click.stop="previewImg(timg.src)">
  6670. <img :src="timg.src" alt="" />
  6671. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  6672. <img src="../../../assets/icon/delete.png" alt="" />
  6673. </div>
  6674. </div>
  6675. </div>
  6676. <div class="a_add_body">
  6677. <div class="a_add_input a_add_input_choice">
  6678. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  6679. @change="() => {
  6680. $forceUpdate();
  6681. }
  6682. ">
  6683. <div class="radioBox">
  6684. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  6685. .testItem" :key="checkIndex" :label="checkIndex">
  6686. <div style="margin-right: 10px">
  6687. {{ optionTypeList[checkIndex] }}.
  6688. </div>
  6689. <div style="margin-right: 10px; width: 300px" v-if="
  6690. testJson.testJson[index1].checkList[checkIndex] &&
  6691. testJson.testJson[index1].checkList[checkIndex]
  6692. .imgType &&
  6693. testJson.testJson[index1].checkList[checkIndex]
  6694. .imgType == 1
  6695. ">
  6696. <div class="inImg" @click.stop="
  6697. previewImg(
  6698. testJson.testJson[index1].checkList[checkIndex]
  6699. .src
  6700. )
  6701. ">
  6702. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  6703. .src
  6704. " lazy />
  6705. <!-- <img :src="
  6706. testJson.testJson[index1].checkList[checkIndex]
  6707. .src
  6708. " alt="" /> -->
  6709. </div>
  6710. </div>
  6711. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  6712. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6713. $forceUpdate();
  6714. }
  6715. "></textarea>
  6716. <div class="xzUpImg" @click.stop="addImg($event)">
  6717. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6718. <input type="file" accept="image/*" style="display: none"
  6719. @change="beforeUploadTi($event, index1, checkIndex)" />
  6720. </div>
  6721. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6722. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  6723. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  6724. </div>
  6725. <div class="a_add_body_div">
  6726. <el-button type="primary" size="small" @click.stop="
  6727. addTcheckList(testJson.testJson[index1], checkIndex)
  6728. ">添加</el-button>
  6729. <el-button type="primary" size="small" @click.stop="
  6730. deleteTcheckList(
  6731. testJson.testJson[index1],
  6732. checkIndex
  6733. )
  6734. " v-if="testJson.testJson[index1].testItem != 1">删除
  6735. </el-button>
  6736. </div>
  6737. </el-radio>
  6738. </div>
  6739. </el-radio-group>
  6740. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6741. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6742. $forceUpdate();
  6743. }
  6744. ">
  6745. <div class="radioBox">
  6746. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6747. .testItem" :key="checkIndex1" :label="checkIndex1">
  6748. <div style="margin-right: 10px">
  6749. {{ optionTypeList[checkIndex1] }}.
  6750. </div>
  6751. <div style="margin-right: 10px; width: 300px" v-if="
  6752. testJson.testJson[index1].checkList[checkIndex1] &&
  6753. testJson.testJson[index1].checkList[checkIndex1]
  6754. .imgType &&
  6755. testJson.testJson[index1].checkList[checkIndex1]
  6756. .imgType == 1
  6757. ">
  6758. <div class="inImg" @click.stop="
  6759. previewImg(
  6760. testJson.testJson[index1].checkList[checkIndex1]
  6761. .src
  6762. )
  6763. ">
  6764. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6765. .src
  6766. " lazy />
  6767. <!-- <img :src="
  6768. testJson.testJson[index1].checkList[checkIndex1]
  6769. .src
  6770. " alt="" /> -->
  6771. </div>
  6772. </div>
  6773. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6774. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6775. $forceUpdate();
  6776. }
  6777. "></textarea>
  6778. <div class="xzUpImg" @click.stop="addImg($event)">
  6779. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6780. <input type="file" accept="image/*" style="display: none"
  6781. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6782. </div>
  6783. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6784. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6785. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6786. </div>
  6787. <div class="a_add_body_div">
  6788. <el-button type="primary" size="small" @click.stop="
  6789. addTcheckList(
  6790. testJson.testJson[index1],
  6791. checkIndex1
  6792. )
  6793. ">添加</el-button>
  6794. <el-button type="primary" size="small" @click.stop="
  6795. deleteTcheckList(
  6796. testJson.testJson[index1],
  6797. checkIndex1
  6798. )
  6799. " v-if="testJson.testJson[index1].testItem != 1">删除
  6800. </el-button>
  6801. </div>
  6802. </el-checkbox>
  6803. </div>
  6804. </el-checkbox-group>
  6805. </div>
  6806. <!-- <div class="a_add_body_div">
  6807. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6808. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6809. v-if="testJson.testJson[index1].testItem != 1">删除
  6810. </el-button>
  6811. </div> -->
  6812. </div>
  6813. </div>
  6814. </div>
  6815. </div>
  6816. <span slot="footer" class="dialog-footer">
  6817. <el-button @click="closePan(45)">取 消</el-button>
  6818. <el-button type="primary" @click="addTest">确 定</el-button>
  6819. </span>
  6820. </el-dialog>
  6821. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6822. :before-close="handleClose" class="dialog_diy addToolsDia">
  6823. <div class="toolChoose">
  6824. <div class="tools">
  6825. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6826. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6827. <div style="
  6828. display: flex;
  6829. flex-direction: row;
  6830. align-items: baseline;
  6831. flex-wrap: nowrap;
  6832. justify-content: flex-start;
  6833. position: relative;
  6834. ">
  6835. <div class="chooseWho">
  6836. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6837. 互动类
  6838. </div>
  6839. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6840. 思维类
  6841. </div>
  6842. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6843. 评价类
  6844. </div>
  6845. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6846. 其他
  6847. </div>
  6848. </div>
  6849. </div>
  6850. <div style="min-height: 163px">
  6851. <div class="toolSort" v-if="chapToolsType == 0">
  6852. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6853. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6854. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6855. <div style="margin: 5px 0">素材库</div>
  6856. </div>
  6857. <div class="noCTool">
  6858. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6859. </div>
  6860. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6861. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6862. </div>
  6863. <!-- <div class="check" @click="chapAddTools(8)">
  6864. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6865. <div class="checkDiv" v-else>
  6866. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6867. </div>
  6868. </div> -->
  6869. </div>
  6870. </div>
  6871. <div class="toolSort" v-if="chapToolsType == 1">
  6872. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6873. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6874. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6875. <div style="margin: 5px 0">思维网格</div>
  6876. </div>
  6877. <div class="noCTool">
  6878. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6879. </div>
  6880. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6881. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6882. </div>
  6883. <!-- <div class="check" @click="chapAddTools(7)">
  6884. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6885. <div class="checkDiv" v-else>
  6886. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6887. </div>
  6888. </div> -->
  6889. </div>
  6890. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6891. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6892. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6893. <div style="margin: 5px 0">电子白板</div>
  6894. </div>
  6895. <div class="noCTool">
  6896. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6897. </div>
  6898. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6899. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6900. </div>
  6901. <!-- <div class="check" @click="chapAddTools(1)">
  6902. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6903. <div class="checkDiv" v-else>
  6904. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6905. </div>
  6906. </div> -->
  6907. </div>
  6908. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6909. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6910. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6911. <div style="margin: 5px 0">便签</div>
  6912. </div>
  6913. <div class="noCTool">
  6914. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6915. </div>
  6916. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6917. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6918. </div>
  6919. <!-- <div class="check" @click="chapAddTools(2)">
  6920. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6921. <div class="checkDiv" v-else>
  6922. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6923. </div>
  6924. </div> -->
  6925. </div>
  6926. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6927. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6928. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6929. <div style="margin: 5px 0">协同文档</div>
  6930. </div>
  6931. <div class="noCTool">
  6932. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6933. </div>
  6934. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6935. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6936. </div>
  6937. <!-- <div class="check" @click="chapAddTools(6)">
  6938. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6939. <div class="checkDiv" v-else>
  6940. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6941. </div>
  6942. </div> -->
  6943. </div>
  6944. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6945. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6946. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6947. <div style="margin: 5px 0">思维导图</div>
  6948. </div>
  6949. <div class="noCTool">
  6950. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6951. </div>
  6952. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6953. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6954. </div>
  6955. <!-- <div class="check" @click="chapAddTools(3)">
  6956. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6957. <div class="checkDiv" v-else>
  6958. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6959. </div>
  6960. </div> -->
  6961. </div>
  6962. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6963. @click="chapAddTools(31)">
  6964. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6965. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6966. <div style="margin: 5px 0">数学画板</div>
  6967. </div>
  6968. <div class="noCTool">
  6969. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6970. </div>
  6971. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6972. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6973. </div>
  6974. <!-- <div class="check" @click="chapAddTools(31)">
  6975. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6976. <div class="checkDiv" v-else>
  6977. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6978. </div>
  6979. </div> -->
  6980. </div>
  6981. </div>
  6982. <div class="toolSort" v-if="chapToolsType == 2">
  6983. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6984. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6985. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6986. <div style="margin: 5px 0">量规评分</div>
  6987. </div>
  6988. <div class="noCTool">
  6989. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6990. </div>
  6991. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6992. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6993. </div>
  6994. <!-- <div class="check" @click="chapAddTools(5)">
  6995. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6996. <div class="checkDiv" v-else>
  6997. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6998. </div>
  6999. </div> -->
  7000. </div>
  7001. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  7002. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  7003. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  7004. <div style="margin: 5px 0">问卷调查</div>
  7005. </div>
  7006. <div class="noCTool">
  7007. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  7008. </div>
  7009. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  7010. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  7011. </div>
  7012. <!-- <div class="check" @click="chapAddTools(4)">
  7013. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  7014. <div class="checkDiv" v-else>
  7015. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  7016. </div>
  7017. </div> -->
  7018. </div>
  7019. </div>
  7020. </div>
  7021. <div>
  7022. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  7023. v-model="itemTools.toolDetail" />
  7024. </div>
  7025. </div>
  7026. </div>
  7027. </div>
  7028. <span slot="footer" class="dialog-footer">
  7029. <el-button @click="dialogVisible4 = false">取 消</el-button>
  7030. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  7031. </span>
  7032. </el-dialog>
  7033. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  7034. closePan(15);
  7035. }
  7036. " class="dialog_diy">
  7037. <div>
  7038. <div class="a_add_title" style="
  7039. display: flex;
  7040. flex-direction: column;
  7041. align-items: flex-start;
  7042. justify-content: center;
  7043. ">
  7044. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  7045. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  7046. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  7047. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  7048. </div>
  7049. </div>
  7050. <span slot="footer" class="dialog-footer">
  7051. <el-button @click="closePan(15)">取 消</el-button>
  7052. <el-button type="primary" @click="addAnswer">确 定</el-button>
  7053. </span>
  7054. </el-dialog>
  7055. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  7056. :before-close="handleClose" class="dialog_diy">
  7057. <div>
  7058. <div class="a_add_title" style="
  7059. display: flex;
  7060. flex-direction: column;
  7061. align-items: flex-start;
  7062. justify-content: center;
  7063. ">
  7064. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  7065. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  7066. </div>
  7067. </div>
  7068. <span slot="footer" class="dialog-footer">
  7069. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  7070. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  7071. </span>
  7072. </el-dialog>
  7073. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  7074. :before-close="handleClose" class="dialog_diy">
  7075. <div>
  7076. <div class="fileCss" style="padding-top: 20px">
  7077. <div>
  7078. <button class="info_btn" @click="addImg($event)">
  7079. 选择本地文件
  7080. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  7081. </button>
  7082. <div class="spanName">选择本地文件</div>
  7083. </div>
  7084. <!-- <div>
  7085. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  7086. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  7087. <img :src="cover[0].url" alt="" />
  7088. <div class="deletePic" @click="deleteSysPic">
  7089. <img src="../../../assets/icon/delete.png" alt="" />
  7090. </div>
  7091. </div>
  7092. <div class="spanName">选择系统文件</div>
  7093. </div> -->
  7094. <div>
  7095. <el-button @click="(searchImageValue = courseName), resetImage()"
  7096. v-if="isSysPic2 == false">选择网络文件</el-button>
  7097. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  7098. <img :src="cover[0].url" alt="" />
  7099. <div class="deletePic" @click="deleteSysPic">
  7100. <img src="../../../assets/icon/delete.png" alt="" />
  7101. </div>
  7102. </div>
  7103. <div class="spanName">选择网络文件</div>
  7104. </div>
  7105. </div>
  7106. <!-- <div class="fileCss">
  7107. </div> -->
  7108. </div>
  7109. <span slot="footer" class="dialog-footer">
  7110. <el-button @click="choosePicVisible = false">取 消</el-button>
  7111. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  7112. </span>
  7113. </el-dialog>
  7114. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  7115. :before-close="handleClose" class="dialog_diy">
  7116. <div class="cru_selectBox" style="margin: 0">
  7117. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  7118. 绘画
  7119. </div>
  7120. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  7121. 科技
  7122. </div>
  7123. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  7124. 人文
  7125. </div>
  7126. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  7127. 艺术
  7128. </div>
  7129. </div>
  7130. <div class="sysPicBox">
  7131. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  7132. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  7133. </div>
  7134. </div>
  7135. </el-dialog>
  7136. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  7137. :before-close="handleClose" class="dialog_diy">
  7138. <div>
  7139. <div class="people_top_right" style="display: flex; align-items: center">
  7140. <div style="position: relative; width: 100%">
  7141. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  7142. @keyup.enter.native="resetImage()"></el-input>
  7143. <div class="search_img" @click="resetImage" style="right: 10px">
  7144. <img src="../../../assets/icon/search.png" alt />
  7145. </div>
  7146. </div>
  7147. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  7148. </div>
  7149. <div class="sysPicBox" v-loading="imageloading">
  7150. <div class="picNone" v-if="!imageList.length">
  7151. 请输入关键词搜索图片
  7152. </div>
  7153. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  7154. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  7155. </div>
  7156. </div>
  7157. </div>
  7158. </el-dialog>
  7159. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  7160. closePan(41);
  7161. }
  7162. " class="dialog_diy dialog_diy3 fullStyle">
  7163. <div v-if="selectJson" style="height: 100%">
  7164. <div class="select_box1" v-if="selectSteps == 1">
  7165. <div class="select_box1_img">
  7166. <div class="select_box1_title">
  7167. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  7168. </div>
  7169. <div class="select_box1_add_img">
  7170. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  7171. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  7172. <img src="../../../assets/icon/addPoster.png" alt="" />
  7173. </div>
  7174. <div class="isSysPic" v-else>
  7175. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  7176. <div class="deletePic" @click="deleteSelectPic">
  7177. <img src="../../../assets/icon/delete.png" alt="" />
  7178. </div>
  7179. </div>
  7180. </div>
  7181. </div>
  7182. <div class="select_box1_select">
  7183. <div class="select_box1_title">
  7184. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  7185. </div>
  7186. <div class="select_box1_select_box">
  7187. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  7188. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  7189. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  7190. <div class="select_box1_select_box_add">
  7191. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  7192. 添加</el-button>
  7193. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  7194. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  7195. </div>
  7196. </div>
  7197. </div>
  7198. </div>
  7199. <div v-if="selectSteps == 2" style="height: 100%">
  7200. <div class="select_box2">
  7201. <div class="select_box2_title">设置每道题目的正确选项</div>
  7202. <div class="select_box2_box">
  7203. <div class="select_box2_img">
  7204. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  7205. </div>
  7206. <div class="select_box2_answer">
  7207. <div class="select_answer_title">根据题目选择对应答案</div>
  7208. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  7209. <span>{{ checkIndex + 1 }}、</span>
  7210. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  7211. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  7212. </el-option>
  7213. </el-select>
  7214. </div>
  7215. </div>
  7216. </div>
  7217. </div>
  7218. </div>
  7219. </div>
  7220. <span slot="footer" class="dialog-footer">
  7221. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  7222. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  7223. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  7224. </span>
  7225. </el-dialog>
  7226. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  7227. :before-close="handleClose" class="dialog_diy">
  7228. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  7229. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  7230. <div class="pjCss" style="width: 100%">
  7231. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  7232. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  7233. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  7234. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  7235. <div class="remove" @click="deletRateList(eIndex)"></div>
  7236. <div style="width: 100%; display: flex">
  7237. <span style="min-width: 100px; text-align: right">评星等级:</span>
  7238. <el-rate v-model="eItem.score" disabled></el-rate>
  7239. </div>
  7240. <div class="elist_inptu_text" style="align-items: flex-start">
  7241. <span style="min-width: 100px; text-align: right">描述:</span>
  7242. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  7243. </div>
  7244. </div>
  7245. </div>
  7246. <div class="addToolFun" @click="addRateList()">
  7247. <div class="addToolImg">
  7248. <img src="../../../assets/icon/add.png" alt />
  7249. </div>
  7250. <div>添加</div>
  7251. </div>
  7252. </div>
  7253. </div>
  7254. <span slot="footer" class="dialog-footer">
  7255. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  7256. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  7257. </span>
  7258. </el-dialog>
  7259. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  7260. closePan(47);
  7261. }
  7262. " class="dialog_diy dialog_diy3 fullStyle">
  7263. <div style="height: 100%">
  7264. <div class="sentenBox" style="height: 100%">
  7265. <div class="addSen" @click="addSt">添加题目</div>
  7266. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  7267. <div class="sentenTopBox">
  7268. <div class="sentenTop" :index="stIndex + 1">
  7269. <div>题目设置</div>
  7270. <div>
  7271. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  7272. </div>
  7273. <div @click="addSen(stIndex)">添加</div>
  7274. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  7275. </div>
  7276. </div>
  7277. <div class="cardList">
  7278. <div v-if="st.addSentence.length > 0" class="cardBox">
  7279. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  7280. @click="setRightAnswer(s, stIndex, sIndex)">
  7281. <el-tooltip class="item" effect="light" :content="s" placement="top">
  7282. <div>{{ s }}</div>
  7283. </el-tooltip>
  7284. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  7285. <img src="../../../assets/icon/delete.png" alt="" />
  7286. </div>
  7287. </div>
  7288. </div>
  7289. <div class="card">
  7290. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  7291. </div>
  7292. </div>
  7293. <div class="rightCardBox">
  7294. <div>正确顺序</div>
  7295. <div class="rightCardList">
  7296. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  7297. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  7298. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  7299. <el-tooltip class="item" effect="light" :content="r" placement="top">
  7300. <div>{{ r }}</div>
  7301. </el-tooltip>
  7302. </div>
  7303. <div>{{ rIndex + 1 }}</div>
  7304. </div>
  7305. </div>
  7306. <div class="card" v-if="st.rightAnswer.length == 0">
  7307. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  7308. </div>
  7309. <div class="card" v-else>
  7310. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  7311. </div>
  7312. </div>
  7313. </div>
  7314. </div>
  7315. </div>
  7316. </div>
  7317. <span slot="footer" class="dialog-footer">
  7318. <el-button @click="closePan(47)">取 消</el-button>
  7319. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  7320. </span>
  7321. </el-dialog>
  7322. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  7323. :before-close="handleClose" class="dialog_diy">
  7324. <el-form>
  7325. <!-- <el-form-item label="文本标题">
  7326. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7327. </el-form-item> -->
  7328. <div>表格内容</div>
  7329. <Table v-model="tableJson.text" @change="change"></Table>
  7330. </el-form>
  7331. <span slot="footer" class="dialog-footer">
  7332. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  7333. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  7334. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  7335. </span>
  7336. </el-dialog>
  7337. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  7338. :before-close="handleClose" class="dialog_diy">
  7339. <el-form>
  7340. <!-- <el-form-item label="文本标题">
  7341. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7342. </el-form-item> -->
  7343. <div>文档内容</div>
  7344. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  7345. </el-form>
  7346. <span slot="footer" class="dialog-footer">
  7347. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  7348. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  7349. </span>
  7350. </el-dialog>
  7351. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  7352. :before-close="handleClose" class="dialog_diy">
  7353. <div style="
  7354. width: 100%;
  7355. display: flex;
  7356. flex-direction: row;
  7357. flex-wrap: nowrap;
  7358. align-items: center;
  7359. justify-content: center;
  7360. ">
  7361. <div>班级:</div>
  7362. <el-select multiple v-model="uploadJson" placeholder="请选择">
  7363. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  7364. </el-option>
  7365. </el-select>
  7366. </div>
  7367. <span slot="footer" class="dialog-footer">
  7368. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  7369. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  7370. </span>
  7371. </el-dialog>
  7372. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  7373. :before-close="handleClose" class="dialog_diy">
  7374. <div style="
  7375. width: 100%;
  7376. display: flex;
  7377. flex-direction: row;
  7378. flex-wrap: nowrap;
  7379. align-items: center;
  7380. justify-content: center;
  7381. ">
  7382. <div>随机码:</div>
  7383. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  7384. </div>
  7385. <span slot="footer" class="dialog-footer">
  7386. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  7387. <el-button type="primary" @click="addInvite">确定</el-button>
  7388. </span>
  7389. </el-dialog>
  7390. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  7391. :before-close="handleClose" class="dialog_diy">
  7392. <div>
  7393. <div style="margin-bottom: 20px; color: #999">
  7394. 提示:点击“+”或“-”修改倒计时时长。
  7395. </div>
  7396. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  7397. </div>
  7398. <span slot="footer" class="dialog-footer">
  7399. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  7400. <el-button type="primary" @click="addPreTime">确定</el-button>
  7401. </span>
  7402. </el-dialog>
  7403. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  7404. :before-close="handleClose" class="dialog_diy">
  7405. <div>
  7406. <div style="
  7407. width: 100%;
  7408. display: flex;
  7409. flex-direction: row;
  7410. flex-wrap: nowrap;
  7411. align-content: center;
  7412. align-items: center;
  7413. justify-content: space-between;
  7414. ">
  7415. <div style="
  7416. display: flex;
  7417. flex-flow: row nowrap;
  7418. align-items: flex-start;
  7419. width: 100%;
  7420. flex-direction: column;
  7421. flex-wrap: nowrap;
  7422. position: relative;
  7423. ">
  7424. <div class="e_box">
  7425. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  7426. <div class="e_card_picture">
  7427. <img src="../../../assets/e_picture.png" />
  7428. </div>
  7429. <div class="e_card_name">
  7430. <span>{{ item.title }}</span>
  7431. </div>
  7432. <div class="e_card_btn">
  7433. <span @click="checkEva(item.id, 2)">导入</span>
  7434. </div>
  7435. </div> -->
  7436. <!-- <div class="addEva" @click="openT">
  7437. <img src="../../../assets/icon/addEva.png" alt="" />
  7438. </div> -->
  7439. <div style="
  7440. display: flex;
  7441. justify-content: flex-end;
  7442. margin-bottom: 10px;
  7443. ">
  7444. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  7445. </div>
  7446. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  7447. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  7448. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  7449. </el-table-column>
  7450. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  7451. </el-table-column>
  7452. <el-table-column label="操作" width="250px">
  7453. <template slot-scope="scope">
  7454. <div class="btnBox">
  7455. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  7456. </div>
  7457. </template>
  7458. </el-table-column>
  7459. </el-table>
  7460. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  7461. 暂无数据
  7462. </div>
  7463. </div>
  7464. </div>
  7465. </div>
  7466. </div>
  7467. <span slot="footer" class="dialog-footer">
  7468. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  7469. </span>
  7470. </el-dialog>
  7471. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  7472. :before-close="handleClose" class="dialog_diy">
  7473. <div class="groupBox">
  7474. <div v-if="groupJson.group" class="groupContent">
  7475. <div class="groupTitle">请设置小组数量及名称</div>
  7476. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  7477. <span class="groupn">第{{ index + 1 }}组名称:</span>
  7478. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  7479. <div class="groupBtn">
  7480. <el-button type="primary" size="small" @click="addGroup(index)"
  7481. v-if="groupJson.group.length - 1 == index">
  7482. 添加</el-button>
  7483. <el-button type="primary" size="small" @click="deleteGroup(index)"
  7484. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  7485. </div>
  7486. </div>
  7487. </div>
  7488. <div class="groupContent">
  7489. <div class="groupTitle">请设置每组人数</div>
  7490. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  7491. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  7492. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  7493. @change="numberPan"></el-input>
  7494. </div>
  7495. </div>
  7496. <span slot="footer" class="dialog-footer">
  7497. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  7498. <el-button type="primary" @click="addGroupJson">确定</el-button>
  7499. </span>
  7500. </el-dialog>
  7501. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  7502. :before-close="handleClose" class="dialog_diy">
  7503. <div style="
  7504. width: 100%;
  7505. display: flex;
  7506. flex-direction: row;
  7507. flex-wrap: nowrap;
  7508. align-items: center;
  7509. justify-content: center;
  7510. ">
  7511. <div style="min-width: fit-content">文件名称:</div>
  7512. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  7513. </div>
  7514. <span slot="footer" class="dialog-footer">
  7515. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  7516. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  7517. </span>
  7518. </el-dialog>
  7519. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  7520. closePan(69);
  7521. }
  7522. " class="dialog_diy fullStyle fullStyle1">
  7523. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  7524. <span slot="footer" class="dialog-footer">
  7525. <el-button @click="englishDialogVisible = false">取 消</el-button>
  7526. <el-button type="primary" @click="addEnglish">确 定</el-button>
  7527. </span>
  7528. </el-dialog>
  7529. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  7530. :before-close="handleClose" class="dialog_diy">
  7531. <div class="template_box">
  7532. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  7533. :class="{ wordTeacherA: ctJson.id == aa.id }">
  7534. <div class="wordPic">
  7535. <img src="../../../assets/icon/new/course_template.png" alt />
  7536. </div>
  7537. <el-tooltip effect="dark" :content="aa.title" placement="top">
  7538. <div style="
  7539. margin-top: 10px;
  7540. line-height: 19px;
  7541. overflow: hidden;
  7542. text-overflow: ellipsis;
  7543. white-space: nowrap;
  7544. padding: 0 10px;
  7545. box-sizing: border-box;
  7546. width: 100%;
  7547. ">
  7548. {{ aa.title }}
  7549. </div>
  7550. </el-tooltip>
  7551. </div>
  7552. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  7553. :class="{ wordTeacherA: ctJson.id == 1 }">
  7554. <div class="wordPic">
  7555. <img src="../../../assets/icon/new/course_template.png" alt />
  7556. </div>
  7557. <div style="
  7558. margin-top: 10px;
  7559. line-height: 19px;
  7560. overflow: hidden;
  7561. text-overflow: ellipsis;
  7562. white-space: nowrap;
  7563. padding: 0 20px;
  7564. ">
  7565. 简易模板
  7566. </div>
  7567. </div>
  7568. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  7569. :class="{ wordTeacherA: ctJson.id == 2 }">
  7570. <div class="wordPic">
  7571. <img src="../../../assets/icon/new/course_template.png" alt />
  7572. </div>
  7573. <div style="
  7574. margin-top: 10px;
  7575. line-height: 19px;
  7576. overflow: hidden;
  7577. text-overflow: ellipsis;
  7578. white-space: nowrap;
  7579. padding: 0 20px;
  7580. ">
  7581. 智能粘贴模式
  7582. </div>
  7583. </div>
  7584. </div>
  7585. <span slot="footer" class="dialog-footer">
  7586. <el-button @click="templateDialog = false">取 消</el-button>
  7587. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  7588. </span>
  7589. </el-dialog>
  7590. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  7591. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  7592. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  7593. <div class="change_stageBox">
  7594. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  7595. <div class="nt_taskBox">
  7596. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  7597. <div class="nt_taskName">
  7598. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7599. <span>{{ t.dyName }}</span>
  7600. </el-tooltip>
  7601. </div>
  7602. </div>
  7603. <div class="moveBtn" v-if="unitJson3.length > 1">
  7604. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7605. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7606. </div>
  7607. </div>
  7608. </div>
  7609. <span slot="footer" class="dialog-footer">
  7610. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  7611. <el-button type="primary" @click="updateChange">确定</el-button>
  7612. </span>
  7613. </el-dialog>
  7614. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7615. :before-close="handleClose" class="dialog_diy">
  7616. <div class="addTypeChoose" style="justify-content: center">
  7617. <div style="min-width: 100px">模板名称:</div>
  7618. <el-input v-model="templateName" style="width: 200px"></el-input>
  7619. </div>
  7620. <div class="addTypeBox">
  7621. <div class="addTypeChoose">
  7622. <div style="min-width: 100px">选择一级分类:</div>
  7623. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  7624. style="width: 200px">
  7625. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7626. </el-option>
  7627. </el-select>
  7628. </div>
  7629. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7630. <div style="min-width: 100px">选择二级分类:</div>
  7631. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  7632. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7633. </el-option>
  7634. </el-select>
  7635. </div>
  7636. </div>
  7637. <span slot="footer" class="dialog-footer">
  7638. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  7639. <el-button @click="close()">关 闭</el-button>
  7640. </span>
  7641. </el-dialog>
  7642. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7643. </evaBox>
  7644. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7645. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7646. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3"
  7647. @aiConfirm="aiConfirm" :clickType="clickType">
  7648. </aiDialog>
  7649. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7650. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7651. <div class="pptBox" :class="{'ppClass': pptBoxDialog && panPptCount() > 0 && pptCount.length}">
  7652. <div class="box" v-show="pptBoxDialog">
  7653. <aiCreateDialog v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson" :key="index"
  7654. :languageSetting="languageSetting" :dialogVisibleAiCreate="dialogVisibleAiCreate2.includes(index)"
  7655. :courseName="courseName" @createAiPpt="createAiPpt" @closeAiPpt="closeAiPpt" :infoData="infoData"
  7656. :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="index"
  7657. :unitJson="unitJson" :ref="'ppt'+index"
  7658. v-show="dialogVisibleAiCreate2.includes(index) && pptCount.includes(index)"></aiCreateDialog>
  7659. </div>
  7660. <span v-show="panPptCount() > 0 && pptCount.length" class="r_pub_button_edit"
  7661. :style="{marginTop: panPptCount() > 0 ? '10px' : '0'}" style="justify-content: flex-start;"
  7662. @click="pptBoxDialog = !pptBoxDialog">{{ pptBoxDialog ? "收缩" : "展开" }}</span>
  7663. </div>
  7664. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName"
  7665. @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson">
  7666. </aiCreateVideoDialog>
  7667. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7668. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl"></wOffice>
  7669. <appDialog ref="appDialog" @success="selectAppSuccess"></appDialog>
  7670. <CodeEditor ref="CodeEditorRef" @success="addHtmlSuccess"></CodeEditor>
  7671. <selectHtmlPageDialog ref="selectHtmlPageDialogRef" @success="selectHtmlPageSuccess"/>
  7672. </div>
  7673. </template>
  7674. <script>
  7675. import "../../../common/aws-sdk-2.235.1.min.js";
  7676. import { tools as toolsData } from "../../../common/tools.js";
  7677. // import "../../../common/aws-sdk-2.99.0.min.js";
  7678. import $ from "jquery";
  7679. import EditorBar from "../../../components/tools/wangEnduit";
  7680. import Table from "../../../components/tools/table";
  7681. import Mind from "../../tools/jsmind2";
  7682. import Time from "../../tools/time.vue";
  7683. import Sunburst from "../../tools/sunburst";
  7684. import SeeBoard from "../../tools/seeBoard";
  7685. import weilaiData from "../components/weilai.js";
  7686. import sourceDialog from "../teacherSource/dialog.vue";
  7687. import interVideo from "../interVideo/index.vue";
  7688. import englishRight from "../components/englishRight.vue";
  7689. import evaBox from "../evaBox/index.vue";
  7690. import EnglishVoice from "../EnglishVoice/index.vue";
  7691. import aiBox from './aiBox.vue'
  7692. import aiBoxRight from './aiBoxRight.vue'
  7693. import aiBoxCourseDetail from './aiBoxCourseDetail.vue'
  7694. import recordV from './record.vue'
  7695. import aiDialog from './aiDialog'
  7696. import aiTips from './aiTips.vue'
  7697. import tipsDialog from './tipsDialog.vue'
  7698. import { v4 as uuidv4 } from "uuid";
  7699. import MarkdownIt from "markdown-it";
  7700. import aiCreateDialog from './aiCreateDialog.vue'
  7701. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7702. import wpdf from "../test/file/wPdf2.vue";
  7703. import wOffice from "../test/file/wOffice.vue";
  7704. import htmlDocx from "html-docx-js/dist/html-docx";
  7705. import TurndownService from 'turndown';
  7706. import JSZip from "jszip";
  7707. import evaList from "./evaList.vue";
  7708. import MindTask from "./jsmind2";
  7709. import ConvertApi from 'convertapi-js'
  7710. let convertApi = ConvertApi.auth('secret_U1EO5rhgMCnoBnBT')
  7711. import appDialog from '../components/appDialog.vue'
  7712. import { myMixin } from "@/mixins/mixin.js"
  7713. import CodeEditor from "../components/CodeEditor";
  7714. import { uploadFileMixin } from "../../tools/uploadFileMixin.js";
  7715. var OpenCC = require("opencc-js");
  7716. let converter = OpenCC.Converter({
  7717. from:'hk',
  7718. to:'cn'
  7719. })
  7720. let converter2 = OpenCC.Converter({
  7721. from:'cn',
  7722. to:'hk'
  7723. })
  7724. import selectHtmlPageDialog from '../dialog/selectHtmlPageDialog.vue'
  7725. const getFile = (url) => {
  7726. return new Promise((resolve, reject) => {
  7727. var credentials = {
  7728. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7729. secretAccessKey: "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",
  7730. }; //秘钥形式的登录上传
  7731. window.AWS.config.update(credentials);
  7732. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7733. let url2 = url;
  7734. let _url2 = "";
  7735. if (
  7736. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  7737. ) {
  7738. _url2 = url2.split(
  7739. "https://view.officeapps.live.com/op/view.aspx?src="
  7740. )[1];
  7741. } else {
  7742. _url2 = url2;
  7743. }
  7744. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  7745. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  7746. var params = {
  7747. Bucket: "ccrb",
  7748. Key: name
  7749. };
  7750. s3.getObject(params, function (err, data) {
  7751. if (err) {
  7752. console.log(err, err.stack)
  7753. resolve({ data: 1 });
  7754. }else {
  7755. resolve({ data: data.Body });
  7756. console.log(data);
  7757. } // sxuccessful response
  7758. });
  7759. });
  7760. };
  7761. export default {
  7762. mixins: [ myMixin,uploadFileMixin ],
  7763. components: {
  7764. CodeEditor,
  7765. EditorBar,
  7766. Mind,
  7767. Time,
  7768. Sunburst,
  7769. SeeBoard,
  7770. Table,
  7771. sourceDialog,
  7772. interVideo,
  7773. englishRight,
  7774. evaBox,
  7775. EnglishVoice,
  7776. aiBox,
  7777. aiBoxRight,
  7778. aiBoxCourseDetail,
  7779. aiDialog,
  7780. aiTips,
  7781. tipsDialog,
  7782. aiCreateDialog,
  7783. aiCreateVideoDialog,
  7784. wpdf,
  7785. wOffice,
  7786. evaList,
  7787. MindTask,
  7788. recordV,
  7789. appDialog,
  7790. selectHtmlPageDialog
  7791. },
  7792. data() {
  7793. return {
  7794. gotype: (window.topU && window.topU.gotype) ? window.topU.gotype : '',
  7795. checkAll: false,
  7796. checkAll2: false,
  7797. chooseType: 1,
  7798. checkedCities: [],
  7799. isIndeterminate: true,
  7800. isIndeterminate2: true,
  7801. isSysPic: false,
  7802. isSysPic2: false,
  7803. steps: 1,
  7804. stepsNav: 1,
  7805. nbOrder: 0,
  7806. courseId: "",
  7807. chapToolsType: 0,
  7808. chapTools: [
  7809. {
  7810. tools: [],
  7811. toolDetail: "",
  7812. },
  7813. ],
  7814. line: "",
  7815. lineTitle: "",
  7816. sysPic: [],
  7817. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7818. sentenceList2: [],
  7819. isPushTitleList: [],
  7820. lineCount: 0,
  7821. lineType: 0,
  7822. chapCount: 0,
  7823. courseName: "",
  7824. isTeacherSee: false,
  7825. courseText: "",
  7826. textLoading: false,
  7827. ttextLoading: false,
  7828. courseText2: "",
  7829. preTime: 0,
  7830. formLabelWidth: "100px",
  7831. choosePicVisible: false,
  7832. sysPicVisible: false,
  7833. sysPicVisible2: false,
  7834. uploadLoading1: false,
  7835. noneBtnImg: false,
  7836. updateBoolean2: false,
  7837. unitIndex: 0,
  7838. taskCount: 0,
  7839. dialogVisible: false,
  7840. dialogVisible1: false,
  7841. dialogVisible2: false,
  7842. dialogVisible3: false,
  7843. dialogVisible4: false,
  7844. dialogVisible5: false,
  7845. dialogVisible6: false,
  7846. dialogVisible7: false,
  7847. dialogVisible8: false,
  7848. dialogVisible9: false,
  7849. dialogVisibleClass: false,
  7850. dialogVisibleMember: false,
  7851. dialogVisibleMp3: false,
  7852. dialogVisibleSelect: false,
  7853. dialogVisibleSentence: false,
  7854. dialogVisibleRate: false,
  7855. dialogVisibleChoice: false,
  7856. dialogVisiblemb: false,
  7857. dialogVisibleInvite: false,
  7858. dialogVisibleSource: false,
  7859. dialogVisibleVideo: false,
  7860. dialogVisibleStageChange: false,
  7861. dialogVisibleupdataVideoT: false,
  7862. englishDialogVisible: false,
  7863. templateDialog: false,
  7864. ctJson: {},
  7865. isClickColor: 1,
  7866. toolIndexType: "",
  7867. publicTool: 0,
  7868. searchPeople: "",
  7869. searchTN: "",
  7870. collid: '',
  7871. CollLoading: false,
  7872. userid: this.$route.query.userid,
  7873. oid: this.$route.query.oid,
  7874. org: this.$route.query.org,
  7875. role: this.$route.query.role,
  7876. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7877. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7878. dialogVisibleTable: false,
  7879. dialogVisibleWord: false,
  7880. tableJson: { text: "" },
  7881. wordJson: { text: "" },
  7882. dialogVisibleMoreUpload: false,
  7883. dialogVisiblePreTime: false,
  7884. uploadJson: [],
  7885. classJuri: [],
  7886. gradeList: [],
  7887. cover: [], //课程封面
  7888. myWord: [],
  7889. evaJuri: [],
  7890. evalua: "",
  7891. targetArray: [],
  7892. eTitle: "",
  7893. eJson: {},
  7894. fid: "", //一级
  7895. sid: "", //二级
  7896. tid: "", //二级
  7897. typeMode: 3,
  7898. eJSONNum: 0,
  7899. data: {
  7900. meta: {
  7901. name: "example",
  7902. author: "dd@163.com",
  7903. version: "0.2",
  7904. },
  7905. format: "node_array",
  7906. data: [{ id: "root", isroot: true, topic: "" }],
  7907. },
  7908. askJson: {
  7909. askCount: 1,
  7910. askTitle: "",
  7911. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7912. },
  7913. askJson2: {},
  7914. testJson: {},
  7915. testJson2: {},
  7916. selectJson: {},
  7917. selectJson2: {},
  7918. rateJson: [],
  7919. unitJson2: [],
  7920. unitJson3: [],
  7921. unitJson: [
  7922. {
  7923. dyName: "", //单元标题
  7924. chapterInfo: [
  7925. {
  7926. isread: false,
  7927. chapterid: this.guid(),
  7928. title: "",
  7929. courseName: "",
  7930. taskJson: [
  7931. {
  7932. task: "",
  7933. taskDetail: "",
  7934. chapterData: [],
  7935. toolText: "",
  7936. toolChoose: [
  7937. {
  7938. tool: [],
  7939. toolDetail: "",
  7940. toolType: 0,
  7941. askCount: 1,
  7942. askTitle: "",
  7943. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7944. },
  7945. ],
  7946. isShowTools: false,
  7947. askCount: 1,
  7948. isFold: 1,
  7949. askTitle: "",
  7950. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7951. checkJson: [{ checkCount: [], checkPerent: [] }],
  7952. homeworkList: [],
  7953. },
  7954. ],
  7955. itemCount: 1,
  7956. fileList1: [],
  7957. video: [],
  7958. testData: [],
  7959. pData: [],
  7960. templateArray: [],
  7961. },
  7962. ],
  7963. },
  7964. ],
  7965. templateArray: [],
  7966. studentJuri: [],
  7967. teacherJuri: [],
  7968. CollaborativeTeaList: [],
  7969. checkboxList: [],
  7970. checkboxList2: [],
  7971. checkboxList3: [],
  7972. classSearch: "",
  7973. gradeId: "",
  7974. number: "",
  7975. tTitle: "",
  7976. tdetail: "",
  7977. templateC: {},
  7978. AttText: {},
  7979. AttTextType: 0,
  7980. AttTextIndex: 0,
  7981. cTemplate: "",
  7982. CourseType: [],
  7983. CourseType1: [],
  7984. CourseType2: [],
  7985. CourseTypeJson: {},
  7986. CourseTypeJson1: {},
  7987. courseTypeId: [],
  7988. courseTypeId1: [],
  7989. courseTypeSon: [],
  7990. clearArray: [],
  7991. pTypeCheck: [],
  7992. pTypeCheckName: [],
  7993. loading: false,
  7994. toolType: 0,
  7995. inputShow: true,
  7996. inputShow2: true,
  7997. toolIndex: 0,
  7998. cidType: 0,
  7999. answerQ: "",
  8000. answerQ2: "",
  8001. grade: [],
  8002. grade2: [],
  8003. courseUserid: "",
  8004. timer: null,
  8005. timer2: null,
  8006. pasteTimer: null,
  8007. checkId: "",
  8008. isDelete: 1,
  8009. addindex: 0,
  8010. selectSteps: 1,
  8011. groupJson: {},
  8012. dialogVisibleGroup: false,
  8013. rightBoxHeight: 0,
  8014. ManAarray: [],
  8015. checkBoolean: false,
  8016. inviteCode: [],
  8017. inviteId: "",
  8018. icode: "",
  8019. easyArray: [2, 4],
  8020. sourceData: {},
  8021. updateSourcePan: false,
  8022. videoJson: {},
  8023. isBtnDisplay: false,
  8024. isStepDisplay: false,
  8025. isPasteStage: false,
  8026. isPasteTask: false,
  8027. isPasteChoice: false,
  8028. imageList: [],
  8029. imageloading: false,
  8030. imageloading2: false,
  8031. searchImageValue: "",
  8032. ppage: 1,
  8033. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  8034. oldIndex: 0,
  8035. dragType: "",
  8036. oldUnitIndex: 0,
  8037. oldData: null,
  8038. newIndex: "",
  8039. englishList: {},
  8040. typeIndex: "",
  8041. courseState: 5,
  8042. taskJSONa: [
  8043. {
  8044. task: "",
  8045. taskDetail: "",
  8046. chapterData: [],
  8047. toolText: "",
  8048. toolChoose: [
  8049. {
  8050. tool: [],
  8051. toolDetail: "",
  8052. toolType: 0,
  8053. askCount: 1,
  8054. askTitle: "",
  8055. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8056. },
  8057. ],
  8058. isShowTools: false,
  8059. askCount: 1,
  8060. isFold: 1,
  8061. askTitle: "",
  8062. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8063. checkJson: [{ checkCount: [], checkPerent: [] }],
  8064. homeworkList: [],
  8065. },
  8066. ],
  8067. checkUnitIndex: 0,
  8068. isdrag: "",
  8069. evaIndex: "",
  8070. evatIndex: "",
  8071. evaBoxDialog: false,
  8072. EnglishVoiceDialog: false,
  8073. englishVoiceJson: {},
  8074. cetIndex: "",
  8075. cettIndex: "",
  8076. cetBoxDialog: false,
  8077. templateName: "",
  8078. setTypeJson: {
  8079. one: "",
  8080. two: "",
  8081. },
  8082. twoJson: [],
  8083. oneJson: [],
  8084. updateKey: 1,
  8085. isOutline: false,
  8086. isOutline2: false,
  8087. infoData: [],
  8088. infoproVisible: false,
  8089. infoisFinishSize: 0,
  8090. infoisAllSize: 0,
  8091. infoprogress: 0,
  8092. taskDetailLoading: [],
  8093. ttaskDetailLoading: [],
  8094. taskDetailLoading2: [],
  8095. ttaskDetailLoading2: [],
  8096. taskDetailLoading3: [],
  8097. ttaskDetailLoading3: [],
  8098. taskDetailLoading4: [],
  8099. taskDetailLoading5: [],
  8100. ttaskDetailLoading5: [],
  8101. dArray: [],
  8102. dialogVisibleAiD: false,
  8103. aitype: "",
  8104. aiJson: {
  8105. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  8106. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  8107. "aiTask": "请根据<教学任务教案>。",
  8108. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  8109. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  8110. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  8111. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  8112. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  8113. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  8114. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  8115. },
  8116. aiText: "",
  8117. aiText2: "",
  8118. aiText3: "",
  8119. aiCallBack: "",
  8120. aiIndex: "",
  8121. clickType: 1,
  8122. promptShow: false,
  8123. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  8124. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  8125. dialogVisibleTips: false,
  8126. tipsJson: {},
  8127. cpote:{
  8128. cpote1: '',
  8129. cpote2: '',
  8130. cpote3: '',
  8131. cpote4: '',
  8132. },
  8133. cpoteLoading:{
  8134. cpote1: false,
  8135. cpote2: false,
  8136. cpote3: false,
  8137. cpote4: false,
  8138. },
  8139. cpotetLoading:{
  8140. cpote1: false,
  8141. cpote2: false,
  8142. cpote3: false,
  8143. cpote4: false,
  8144. },
  8145. cpoteType: 0,
  8146. dialogVisibleAiCreate: false,
  8147. dialogVisibleAiCreate2: [],
  8148. pptBoxDialog: true,
  8149. pptCount: [],
  8150. dialogVisibleAiCreateVideo: false,
  8151. teacherText: [],
  8152. isFileSearch: true,
  8153. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  8154. 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'],
  8155. courseJie:1,
  8156. courseTime:45,
  8157. allTextArray: [],
  8158. dialogVisiblePdf: false,
  8159. dialogVisibleOffice: false,
  8160. wurl: "",
  8161. choiceLoading: false,
  8162. teacherInfoData: [],
  8163. teacherinfoproVisible: false,
  8164. teacherinfoisFinishSize: 0,
  8165. teacherinfoisAllSize: 0,
  8166. teacherinfoprogress: 0,
  8167. teacherCourseText: "",
  8168. teacherTextLoading: false,
  8169. tteacherTextLoading: false,
  8170. targetCourseText: "",
  8171. targetTextLoading: false,
  8172. ttargetTextLoading: false,
  8173. cankaoInfoData: [],
  8174. fileSLoading: false,
  8175. infoData2: [],
  8176. isuseT: false,
  8177. mode: 1,
  8178. targetCourseText2: "",
  8179. targetTextLoading2: false,
  8180. ttargetTextLoading2: false,
  8181. courseTextBool: false,
  8182. teacherCourseTextB: true,
  8183. targetCourseTextB: true,
  8184. courseTextB: true,
  8185. targetCourseText2B: true,
  8186. // 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'],
  8187. yiKeTemplateArray:[],
  8188. taskLoading: [],
  8189. ruleLoading: [],
  8190. mubiaoInfoData: [],
  8191. mubiaoinfoproVisible: false,
  8192. mubiaoinfoisFinishSize: 0,
  8193. mubiaoinfoisAllSize: 0,
  8194. mubiaoinfoprogress: 0,
  8195. xuanzeInfoData: [],
  8196. xuanzeinfoproVisible: false,
  8197. xuanzeinfoisFinishSize: 0,
  8198. xuanzeinfoisAllSize: 0,
  8199. xuanzeinfoprogress: 0,
  8200. pingjiaInfoData: [],
  8201. pingjiainfoproVisible: [],
  8202. pingjiainfoisFinishSize: [],
  8203. pingjiainfoisAllSize: [],
  8204. pingjiainfoprogress: [],
  8205. taskGLoading: [],
  8206. ttaskGLoading: [],
  8207. isOutlineCancelToken: null,
  8208. isFileCancelToken: null,
  8209. isTargetCancelToken1: null,
  8210. isTargetCancelToken2: null,
  8211. isTextCancelToken: null,
  8212. isTeacherTextCancelToken: null,
  8213. isTeacherTaskCancelToken: null,
  8214. isOutlineTaskCancelToken: [],
  8215. isTeacherTaskCancelToken2: [],
  8216. isTeacherTaskCancelSource: [],
  8217. isTextCancelSource: null,
  8218. isOutlineTaskCancelSource: [],
  8219. isTeacherTextCancelSource: null,
  8220. isTargetCancelSource1: null,
  8221. isTargetCancelSource2: null,
  8222. fileidArray: [],
  8223. interPan: true,
  8224. interFlash: true,
  8225. agentid: "",
  8226. interSetting: false,
  8227. chatid: "",
  8228. languageSetting: 0, //0中文 1繁体 2英文
  8229. isQuote: {},
  8230. knowFileArray: [],
  8231. knowInfoData: [],
  8232. knowinfoproVisible: false,
  8233. knowinfoisFinishSize: 0,
  8234. knowinfoisAllSize: 0,
  8235. knowinfoprogress: 0,
  8236. knowFileids: [],
  8237. searchFileName: "",
  8238. knowInfoDataLoading: false,
  8239. isfindMatchingContents: null,
  8240. findMatchingContentsPage: 1,
  8241. findMatchingContentsFinish: false,
  8242. knowInfoData2: [],
  8243. knowinfoproVisible2: false,
  8244. knowinfoisFinishSize2: 0,
  8245. knowinfoisAllSize2: 0,
  8246. knowinfoprogress2: 0,
  8247. knowFileids2: [],
  8248. knowInfoData3: [],
  8249. knowFileids3: [],
  8250. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8251. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41, 72],
  8252. taskAnLoading: [],
  8253. taskAnCancelToken: [],
  8254. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8255. taskCancelToken1: [],
  8256. isTaskCancelSource1: [],
  8257. taskCancelToken2: [],
  8258. isDisplay: false,
  8259. isDialog: 0,
  8260. recordVideoText: "",
  8261. recordAudioUrl: "",
  8262. r_agentid: "",
  8263. course_info: "",
  8264. stepShow: true,
  8265. anLoading: [],
  8266. appendixFile: [],
  8267. appendixPan: true,
  8268. appendixFiles: [],
  8269. appendixTypeCheck: 'all',
  8270. appendixTaskCheck: 'all',
  8271. appendixType: [
  8272. {
  8273. label: "教案",
  8274. value: 0,
  8275. },
  8276. {
  8277. label: "PPT",
  8278. value: 1,
  8279. },
  8280. {
  8281. label: "学历案",
  8282. value: 2,
  8283. },
  8284. {
  8285. label: "量规",
  8286. value: 3,
  8287. },
  8288. {
  8289. label: "聊天栏记录",
  8290. value: 4,
  8291. },
  8292. ],
  8293. appendixLoading: false,
  8294. interFindPan: true,
  8295. typeC1: [],
  8296. typeC2: [],
  8297. knowFileType1: "",
  8298. knowFileType2: "",
  8299. knowFileType: "",
  8300. knowFileTypeArray1: ['上册', '下册'],
  8301. knowFileTypeArray: ['作业', '教案', '其他'],
  8302. optionTypeList:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'],
  8303. changeId:"",
  8304. };
  8305. },
  8306. directives: {
  8307. autoHeight: {
  8308. update(el, binding) {
  8309. const { value } = binding;
  8310. if (value && typeof value === "number") {
  8311. el.style.height = `${value}px`;
  8312. } else {
  8313. el.style.height = "auto";
  8314. }
  8315. },
  8316. componentUpdated(el) {
  8317. el.style.height = `${el.scrollHeight + 25}px`;
  8318. },
  8319. },
  8320. },
  8321. computed: {
  8322. // rightBoxHeight: function () {
  8323. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  8324. // },
  8325. offsetLetfPx: function () {
  8326. //addnum可以直接在模板语法里面用,相当于data内的值
  8327. return (
  8328. $(".cru_select")[this.unitIndex] &&
  8329. $(".cru_select")[this.unitIndex].offsetLeft + 5
  8330. );
  8331. },
  8332. getMan2() {
  8333. return function (people) {
  8334. let _people = people;
  8335. let _people2 = "";
  8336. if (this.ManAarray.length) {
  8337. for (var i = 0; i < this.ManAarray.length; i++) {
  8338. if (this.ManAarray[i].userid == people) {
  8339. _people2 = this.ManAarray[i].name;
  8340. break;
  8341. }
  8342. }
  8343. }
  8344. if (people == this.courseUserid) {
  8345. return "";
  8346. }
  8347. return this.ManAarray.length ? _people2 : "";
  8348. };
  8349. },
  8350. getListMan2() {
  8351. return function (list) {
  8352. console.log('getListMan2',list);
  8353. let _people2 = [];
  8354. if (this.ManAarray.length) {
  8355. list.slice(0, 10).forEach(people => {
  8356. let name = this.ManAarray.find(man => man.userid === people && people !== this.courseUserid).name || "";
  8357. if (name) {
  8358. _people2.push(name);
  8359. }
  8360. });
  8361. }
  8362. return _people2.join("、");
  8363. };
  8364. },
  8365. isInvite() {
  8366. return function (cid) {
  8367. let array = [];
  8368. for (var i = 0; i < this.inviteCode.length; i++) {
  8369. array.push(this.inviteCode[i].cid);
  8370. }
  8371. return array.indexOf(cid) != -1;
  8372. };
  8373. },
  8374. getInviteCodeC() {
  8375. return function (cid) {
  8376. let array = [];
  8377. for (var i = 0; i < this.inviteCode.length; i++) {
  8378. array.push(this.inviteCode[i].cid);
  8379. }
  8380. return this.inviteCode[array.indexOf(cid)].ic;
  8381. };
  8382. },
  8383. getClassC() {
  8384. return function (c) {
  8385. let _c2 = "";
  8386. if (this.grade.length) {
  8387. for (var i = 0; i < this.grade.length; i++) {
  8388. if (this.grade[i].id == c) {
  8389. _c2 = this.grade[i].name;
  8390. break;
  8391. }
  8392. }
  8393. }
  8394. return this.grade.length ? _c2 : "";
  8395. };
  8396. },
  8397. getListClassC() {
  8398. return function (list) {
  8399. let _c2 = [];
  8400. if (this.grade.length) {
  8401. for (var j = 0; j < list.length; j++) {
  8402. let c = list[j];
  8403. for (var i = 0; i < this.grade.length; i++) {
  8404. if (this.grade[i].id == c) {
  8405. _c2.push(this.grade[i].name);
  8406. break;
  8407. }
  8408. }
  8409. }
  8410. }
  8411. return this.grade.length ? _c2.join("、") : "";
  8412. };
  8413. },
  8414. MarkdownT() {
  8415. return function (c) {
  8416. let md = new MarkdownIt();
  8417. return c
  8418. ? md.render(c) : "";
  8419. };
  8420. },
  8421. panOutline(){
  8422. return function () {
  8423. let count = 0;
  8424. for(var i = 0; i < this.unitJson.length; i++){
  8425. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8426. for(var j = 0; j < _task.length; j++){
  8427. if(_task[j].taskDetail2){
  8428. count++
  8429. }
  8430. }
  8431. }
  8432. return count;
  8433. };
  8434. },
  8435. panTeacher(){
  8436. return function () {
  8437. let count = 0;
  8438. for(var i = 0; i < this.unitJson.length; i++){
  8439. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8440. for(var j = 0; j < _task.length; j++){
  8441. if(_task[j].taskDetail3){
  8442. count++
  8443. }
  8444. }
  8445. }
  8446. return count;
  8447. };
  8448. },
  8449. panTask(){
  8450. return function () {
  8451. let count = 0;
  8452. for(var i = 0; i < this.unitJson.length; i++){
  8453. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8454. for(var j = 0; j < _task.length; j++){
  8455. if(_task[j].taskDetail){
  8456. count++
  8457. }
  8458. }
  8459. }
  8460. return count;
  8461. };
  8462. },
  8463. panElist(){
  8464. return function (array) {
  8465. let count = 0;
  8466. for(var i = 0; i < array.toolChoose.length; i++){
  8467. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  8468. count++
  8469. }
  8470. }
  8471. return count;
  8472. };
  8473. },
  8474. panTaskElist(){
  8475. return function () {
  8476. let count = 0;
  8477. for(var i = 0; i < this.unitJson.length; i++){
  8478. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8479. for(var j = 0; j < _task.length; j++){
  8480. if(_task[j].eList && _task[j].eList.length){
  8481. count++
  8482. }
  8483. }
  8484. }
  8485. return count;
  8486. };
  8487. },
  8488. panEvaCont(){
  8489. return function () {
  8490. let count = 0;
  8491. for(var i = 0; i < this.unitJson.length; i++){
  8492. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8493. for(var j = 0; j < _task.length; j++){
  8494. let tool = _task[j].toolChoose
  8495. for(var k = 0; k < tool.length; k++){
  8496. if(tool[k].eList && tool[k].eList.length){
  8497. count++
  8498. }
  8499. }
  8500. }
  8501. }
  8502. return count;
  8503. };
  8504. },
  8505. dataCheckPan(){
  8506. return function (fileid) {
  8507. for(let i = 0; i < this.infoData.length; i++){
  8508. if(this.infoData[i].fileid == fileid){
  8509. return true
  8510. }
  8511. }
  8512. return false;
  8513. };
  8514. },
  8515. interUrl: function () {
  8516. let agentid = this.aiJson.agentid
  8517. let sagentid = this.aiJson.sagentid
  8518. let url = ''
  8519. if(sagentid){
  8520. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${sagentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8521. }else{
  8522. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8523. }
  8524. return url;
  8525. },
  8526. panPptCount(){
  8527. return function () {
  8528. let ppts = 0
  8529. for(var i = 0; i < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; i++){
  8530. let ppt = this.$refs['ppt'+i]
  8531. if(ppt && ppt[0].tanDialog){
  8532. ppts++
  8533. }
  8534. }
  8535. if(!this.pptCount.length){
  8536. this.pptBoxDialog = false
  8537. }
  8538. return ppts;
  8539. };
  8540. },
  8541. panDanTool(){
  8542. return function (array) {
  8543. let count = 0;
  8544. for(var i = 0; i < array.toolChoose.length; i++){
  8545. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8546. count++
  8547. }
  8548. }
  8549. return count;
  8550. };
  8551. },
  8552. panDanToolEva(){
  8553. return function (array) {
  8554. let count = 0;
  8555. let tool = array.toolChoose
  8556. for(var k = 0; k < tool.length; k++){
  8557. if(tool[k].eList && tool[k].eList.length){
  8558. count++
  8559. }
  8560. }
  8561. return count;
  8562. };
  8563. },
  8564. panTool(){
  8565. return function () {
  8566. let count = 0;
  8567. for(var j = 0; j < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; j++){
  8568. let array = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[j]
  8569. for(var i = 0; i < array.toolChoose.length; i++){
  8570. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8571. count++
  8572. }
  8573. }
  8574. }
  8575. return count;
  8576. };
  8577. },
  8578. allFile(){
  8579. return function (type) {
  8580. let file = [...this.knowInfoData, ...this.infoData, ...this.knowInfoData2, ...this.appendixFile];
  8581. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8582. let _task = this.unitJson[0].chapterInfo[0].taskJson[i];
  8583. for(var j = 0; j < _task.chapterData.length; j++){
  8584. if(_task.chapterData[j].type == 3){
  8585. file.push({..._task.chapterData[j], tool:j, task:i});
  8586. }
  8587. }
  8588. }
  8589. let uniqueUrls = new Set(file.map(item => item.url)); // 使用Set去重
  8590. let uniqueFile = Array.from(uniqueUrls).map(url => file.find(item => item.url === url)); // 根据url获取唯一文件
  8591. if(this.appendixTaskCheck != 'all' && type != '2'){
  8592. uniqueFile = uniqueFile.filter(file => file.task+1 == this.appendixTaskCheck || file.name.includes('任务'+this.appendixTaskCheck) || file.name.includes('任务'+this.numberToChinese(this.appendixTaskCheck)));
  8593. }
  8594. if(this.appendixTypeCheck != 'all' && type != '2'){
  8595. if(this.appendixTypeCheck == 0){
  8596. uniqueFile = uniqueFile.filter(file => file.name.includes('教案'));
  8597. }else if(this.appendixTypeCheck == 1){
  8598. uniqueFile = uniqueFile.filter(file => file.name.toUpperCase().includes('PPT') || file.name.toUpperCase().includes('PPTX'));
  8599. }else if(this.appendixTypeCheck == 2){
  8600. uniqueFile = uniqueFile.filter(file => file.name.includes('学历案'));
  8601. }else if(this.appendixTypeCheck == 3){
  8602. uniqueFile = uniqueFile.filter(file => file.name.includes('的评价'));
  8603. }else if(this.appendixTypeCheck == 4){
  8604. uniqueFile = uniqueFile.filter(file => file.task == 'dialog');
  8605. }
  8606. }
  8607. return uniqueFile;
  8608. };
  8609. },
  8610. panAppendixCheckAll(){
  8611. return function(){
  8612. let files = this.allFile();
  8613. let count = 0
  8614. for(var i = 0; i < files.length; i++){
  8615. if(this.appendixFiles.includes(files[i].url)){
  8616. count++
  8617. }
  8618. }
  8619. if (count == files.length) {
  8620. return true
  8621. }else {
  8622. false
  8623. }
  8624. }
  8625. },
  8626. getTypeC(){
  8627. return function(index){
  8628. let sub = []
  8629. let grade = []
  8630. if (this.courseTypeId.length) {
  8631. for (var i = 0; i < this.courseTypeId.length; i++) {
  8632. let _sid = this.courseTypeId[i]
  8633. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8634. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  8635. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  8636. }
  8637. }
  8638. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8639. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  8640. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  8641. }
  8642. }
  8643. }
  8644. }
  8645. if(index == 1){
  8646. return sub
  8647. }else if(index == 2){
  8648. return grade
  8649. }
  8650. }
  8651. },
  8652. getFileType(){
  8653. return function (name) {
  8654. let fileType = this.getKnowType();
  8655. for (let type of fileType) {
  8656. if (converter(name).includes(type)) {
  8657. return type; // 判断name中是否包含对应的文件类型
  8658. }
  8659. }
  8660. return '其他';
  8661. };
  8662. },
  8663. allknowInfoData3(){
  8664. return function () {
  8665. let knowInfoData = this.knowInfoData3;
  8666. if(this.knowFileType){
  8667. // if(converter(this.knowFileType) == '其他'){
  8668. // let fileType = this.getKnowType().filter(item => item != '其他');
  8669. // knowInfoData = knowInfoData.filter(item => {
  8670. // return !fileType.some(type => converter(item.name).includes(type));
  8671. // });
  8672. // }else{
  8673. knowInfoData = knowInfoData.filter(item => converter(item.file_type).includes(this.knowFileType))
  8674. // }
  8675. }
  8676. if(this.knowFileType1){
  8677. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType1))
  8678. }
  8679. if(this.knowFileType2){
  8680. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(converter(`第${this.knowFileType2}单元`)) || converter(item.name).includes(converter(`第${this.numberToChinese(this.knowFileType2)}单元`)))
  8681. }
  8682. return knowInfoData;
  8683. };
  8684. },
  8685. getKnowType(){
  8686. return function () {
  8687. let knowInfoData = this.knowInfoData3;
  8688. let array = []
  8689. for(var i = 0; i < knowInfoData.length; i++){
  8690. if(array.indexOf(knowInfoData[i].file_type) == -1){
  8691. array.push(knowInfoData[i].file_type)
  8692. }
  8693. }
  8694. return array;
  8695. };
  8696. },
  8697. panknowInfoData3CheckAll(){
  8698. return function(){
  8699. let files = this.allknowInfoData3();
  8700. let count = 0
  8701. for(var i = 0; i < files.length; i++){
  8702. if(this.knowFileids3.includes(files[i].url)){
  8703. count++
  8704. }
  8705. }
  8706. if (count == files.length) {
  8707. return true
  8708. }else {
  8709. false
  8710. }
  8711. }
  8712. },
  8713. },
  8714. watch: {
  8715. unitIndex(newValue, oldValue) {
  8716. // return;
  8717. if (this.isDelete == 2) {
  8718. this.isDelete = 1;
  8719. return;
  8720. }
  8721. if (this.cid != "") {
  8722. let _unitIndex = oldValue;
  8723. if (
  8724. JSON.stringify(this.unitJson2[_unitIndex]) ==
  8725. JSON.stringify(this.unitJson[_unitIndex])
  8726. ) {
  8727. this.$refs.rightboxR.scrollTop = 0;
  8728. return;
  8729. }
  8730. let cPan = 1;
  8731. for (
  8732. var j = 0;
  8733. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8734. j++
  8735. ) {
  8736. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8737. j
  8738. ].proVisible = false;
  8739. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8740. j
  8741. ].proVisible2 = false;
  8742. if (
  8743. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8744. .length > 1
  8745. ) {
  8746. for (
  8747. var z = 0;
  8748. z <
  8749. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8750. .length;
  8751. z++
  8752. ) {
  8753. if (
  8754. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  8755. .toolChoose[z].tool.length
  8756. ) {
  8757. this.$message.error("请把工具添加完整");
  8758. cPan = 2;
  8759. break;
  8760. }
  8761. }
  8762. }
  8763. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8764. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8765. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8766. (ele) => {
  8767. return ele.value != "" || ele.detail != "" || ele.target != "";
  8768. }
  8769. );
  8770. }
  8771. }
  8772. if (cPan == 2) {
  8773. this.unitIndex = oldValue;
  8774. return;
  8775. }
  8776. for (var i = 0; i < this.unitJson.length; i++) {
  8777. if (this.addindex != i) {
  8778. delete this.unitJson[i].isUpdate;
  8779. }
  8780. }
  8781. this.$refs.rightboxR.scrollTop = 0;
  8782. this.addindex = -1;
  8783. let params = [
  8784. {
  8785. cid: this.cid,
  8786. chapters: JSON.stringify(this.unitJson),
  8787. uid: this.userid,
  8788. unitIndex: _unitIndex,
  8789. },
  8790. ];
  8791. this.ajax
  8792. .post(this.$store.state.api + "updateWorkNew4", params)
  8793. .then((res) => {
  8794. // this.$message({
  8795. // message: "修改成功",
  8796. // type: "success",
  8797. // });
  8798. // this.courseId = this.cid;
  8799. this.addtips()
  8800. })
  8801. .catch((err) => {
  8802. this.$message.error("网络不佳");
  8803. console.error(err);
  8804. });
  8805. }
  8806. },
  8807. steps(newValue, old) {
  8808. if(newValue == 2){
  8809. this.steps = old
  8810. }
  8811. if (newValue == 4) {
  8812. let cPan = 1;
  8813. for (var i = 0; i < this.unitJson.length; i++) {
  8814. for (
  8815. var j = 0;
  8816. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8817. j++
  8818. ) {
  8819. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8820. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8821. if (
  8822. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8823. ) {
  8824. for (
  8825. var z = 0;
  8826. z <
  8827. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8828. z++
  8829. ) {
  8830. if (
  8831. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  8832. .tool.length
  8833. ) {
  8834. this.$message.error("请把工具添加完整");
  8835. cPan = 2;
  8836. break;
  8837. }
  8838. }
  8839. }
  8840. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8841. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8842. i
  8843. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8844. return ele.value != "" || ele.detail != "" || ele.target != "";
  8845. });
  8846. }
  8847. }
  8848. }
  8849. this.inputShow = true;
  8850. if (cPan == 2) {
  8851. this.steps = old;
  8852. return;
  8853. }
  8854. this.goTo(
  8855. "/course?userid=" +
  8856. this.userid +
  8857. "&oid=" +
  8858. this.oid +
  8859. "&org=" +
  8860. this.org +
  8861. "&role=" +
  8862. this.role
  8863. );
  8864. }
  8865. },
  8866. courseName(newVal, oldVal) {
  8867. this.setCourseInfo();
  8868. },
  8869. courseTypeId: {
  8870. immediate: true,
  8871. deep: true,
  8872. handler(newValue, oldValue) {
  8873. this.setCourseInfo();
  8874. }
  8875. },
  8876. knowFileids(newVal, oldVal) {
  8877. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8878. },
  8879. knowFileids2(newVal, oldVal) {
  8880. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8881. },
  8882. },
  8883. methods: {
  8884. tableRowClassName({ row, rowIndex }) {
  8885. if ((rowIndex + 1) % 2 === 0) {
  8886. return "even_row";
  8887. } else {
  8888. return "";
  8889. }
  8890. },
  8891. close() {
  8892. this.cetIndex = "";
  8893. this.cettIndex = "";
  8894. this.templateName = "";
  8895. this.cetBoxDialog = false;
  8896. },
  8897. openAI() {
  8898. window.topU.postMessage({ tools: "64" }, "*");
  8899. },
  8900. setMan() {
  8901. // let teacherJuri = this.teacherJuri2;
  8902. this.ManAarray = [];
  8903. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  8904. if (_user.indexOf(this.userid) == -1) {
  8905. _user.push(this.userid);
  8906. }
  8907. if (_user.indexOf(this.courseUserid) == -1) {
  8908. _user.push(this.courseUserid);
  8909. }
  8910. let params = [{
  8911. uid: _user.join(","),
  8912. }];
  8913. this.ajax
  8914. .post(this.$store.state.api + "getAllUserByIdP", params)
  8915. .then((res) => {
  8916. let teacherJuri = res.data[0];
  8917. this.ManAarray = teacherJuri;
  8918. })
  8919. .catch((err) => {
  8920. console.error(err);
  8921. });
  8922. },
  8923. previewImg(url) {
  8924. this.$hevueImgPreview(url);
  8925. },
  8926. btnDisplay(bool) {
  8927. this.isBtnDisplay = bool;
  8928. },
  8929. stepDisplay(bool) {
  8930. this.isStepDisplay = bool;
  8931. },
  8932. scrollChange() {
  8933. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8934. },
  8935. addHw(e) {
  8936. var el = e.currentTarget;
  8937. el.getElementsByTagName("input")[0].click();
  8938. },
  8939. change(val) {
  8940. if (this.dialogVisible1) {
  8941. this.tdetail = val;
  8942. } else if (this.dialogVisible6) {
  8943. this.AttText.text = val;
  8944. } else if (this.dialogVisible2) {
  8945. this.cTemplate = val;
  8946. } else if (this.dialogVisibleTable) {
  8947. this.tableJson.text = val;
  8948. }
  8949. this.$forceUpdate();
  8950. console.log(val);
  8951. },
  8952. change2(val) {
  8953. console.log(val);
  8954. this.$forceUpdate();
  8955. },
  8956. handleClose(done) {
  8957. done();
  8958. },
  8959. closePan(tool) {
  8960. if (tool == 15) {
  8961. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8962. this.dialogVisible8 = false;
  8963. } else {
  8964. this.closeConfirm(tool);
  8965. }
  8966. } else if (tool == 4) {
  8967. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8968. this.dialogVisible5 = false;
  8969. } else {
  8970. this.closeConfirm(tool);
  8971. }
  8972. } else if (tool == 45) {
  8973. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8974. this.dialogVisibleChoice = false;
  8975. } else {
  8976. this.closeConfirm(tool);
  8977. }
  8978. } else if (tool == 41) {
  8979. if (
  8980. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8981. ) {
  8982. this.dialogVisibleSelect = false;
  8983. } else {
  8984. this.closeConfirm(tool);
  8985. }
  8986. } else if (tool == 47) {
  8987. if (
  8988. JSON.stringify(this.sentenceList) ==
  8989. JSON.stringify(this.sentenceList2)
  8990. ) {
  8991. this.dialogVisibleSentence = false;
  8992. } else {
  8993. this.closeConfirm(tool);
  8994. }
  8995. } else if (tool == 69) {
  8996. if (
  8997. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8998. ) {
  8999. this.englishDialogVisible = false;
  9000. } else {
  9001. this.closeConfirm(tool);
  9002. }
  9003. }
  9004. },
  9005. closeConfirm(tool) {
  9006. this.$confirm("是否保存已编辑内容?", "提示", {
  9007. confirmButtonText: "保存",
  9008. cancelButtonText: "不保存",
  9009. type: "warning",
  9010. })
  9011. .then(() => {
  9012. if (tool == 15) {
  9013. this.addAnswer();
  9014. } else if (tool == 4) {
  9015. this.addAsk();
  9016. } else if (tool == 45) {
  9017. this.addTest();
  9018. } else if (tool == 41) {
  9019. this.addSelectAnswer();
  9020. } else if (tool == 47) {
  9021. this.addSentenceTool();
  9022. } else if (tool == 69) {
  9023. this.addEnglish();
  9024. }
  9025. })
  9026. .catch(() => {
  9027. if (tool == 15) {
  9028. this.dialogVisible8 = false;
  9029. } else if (tool == 4) {
  9030. this.dialogVisible5 = false;
  9031. } else if (tool == 45) {
  9032. this.dialogVisibleChoice = false;
  9033. } else if (tool == 41) {
  9034. this.dialogVisibleSelect = false;
  9035. } else if (tool == 47) {
  9036. this.dialogVisibleSentence = false;
  9037. } else if (tool == 69) {
  9038. this.englishDialogVisible = false;
  9039. }
  9040. });
  9041. },
  9042. addEnglish(jsonType) {
  9043. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  9044. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  9045. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  9046. if (
  9047. this.englishList.engTitle == "" ||
  9048. this.englishList.englishText == ""
  9049. ) {
  9050. this.$message.error("请将内容填写完整!");
  9051. return;
  9052. }
  9053. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9054. this.taskCount
  9055. ].toolChoose[this.toolIndex].englishList = this.englishList;
  9056. this.englishList = {};
  9057. if (jsonType && jsonType == 1) {
  9058. this.englishDialogVisible = true;
  9059. } else {
  9060. this.englishDialogVisible = false;
  9061. }
  9062. if (
  9063. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  9064. .toolChoose[this.toolIndex].tool != 69
  9065. ) {
  9066. this.addTools(69, this.taskCount, this.toolIndex);
  9067. }
  9068. },
  9069. imgChange2(i, j) {
  9070. var _tmp = this.testJson.testJson[i].checkList[j];
  9071. this.noneBtnImg = _tmp.length >= 1;
  9072. },
  9073. imgChange3(i) {
  9074. var _tmp = this.testJson.testJson[i];
  9075. this.noneBtnImg = _tmp.length >= 1;
  9076. },
  9077. imgChange1(file, fileList, type, itemTaskIndex) {
  9078. if (type == 1) {
  9079. var _tmp = this.cover;
  9080. } else if (
  9081. type == 2 ||
  9082. type == 3 ||
  9083. type == 6 ||
  9084. type == 7 ||
  9085. type == 8
  9086. ) {
  9087. var _tmp =
  9088. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9089. .chapterData;
  9090. } else if (type == 4) {
  9091. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  9092. } else {
  9093. var _tmp =
  9094. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9095. .homeworkList;
  9096. }
  9097. this.noneBtnImg = _tmp.length >= 1;
  9098. },
  9099. goTo(path) {
  9100. this.$router.push(path);
  9101. },
  9102. guid() {
  9103. var _num,
  9104. i,
  9105. _guid = "";
  9106. for (i = 0; i < 32; i++) {
  9107. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  9108. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  9109. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  9110. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  9111. _guid += "-";
  9112. }
  9113. }
  9114. return _guid;
  9115. },
  9116. retrunCourse() {
  9117. if(this.istemplate == 1){
  9118. this.goTo(
  9119. "/course?userid=" +
  9120. this.userid +
  9121. "&oid=" +
  9122. this.oid +
  9123. "&org=" +
  9124. this.org +
  9125. "&role=" +
  9126. this.role
  9127. );
  9128. return
  9129. }
  9130. this.$confirm("是否保存已编辑内容?", "提示", {
  9131. confirmButtonText: "保存",
  9132. cancelButtonText: "不保存",
  9133. distinguishCancelAndClose: true,
  9134. type: "warning",
  9135. customClass: 'custom-confirm-box'
  9136. })
  9137. .then(() => {
  9138. if (this.taskLoading.length) {
  9139. let _pan = 1
  9140. for(var k = 0; k < this.taskLoading.length; k++){
  9141. if(this.taskLoading[k]){
  9142. this.$message({
  9143. message: `请等待任务${k+1}回答完毕后再保存`,
  9144. type: "warning"
  9145. });
  9146. _pan = 2
  9147. }
  9148. }
  9149. if(_pan == 2){
  9150. return
  9151. }
  9152. }
  9153. if(this.taskGLoading.length){
  9154. let _pan = 1
  9155. for(var k = 0; k < this.taskGLoading.length; k++){
  9156. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9157. this.$message({
  9158. message: `请等待任务${k+1}回答完毕后再保存`,
  9159. type: "warning"
  9160. });
  9161. _pan = 2
  9162. }
  9163. }
  9164. if(_pan == 2){
  9165. return
  9166. }
  9167. }
  9168. let pan2 = 1
  9169. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9170. for(var index = 0; index < taskJson.length; index++){
  9171. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9172. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9173. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9174. this.$message({
  9175. message: `请等待任务${index+1}回答完毕后再继续`,
  9176. type: "warning"
  9177. });
  9178. pan2 = 2
  9179. }
  9180. }
  9181. }
  9182. }
  9183. if(pan2 == 2){
  9184. return
  9185. }
  9186. if (this.cid == "" || this.cid == undefined) {
  9187. if (this.courseName == "") {
  9188. this.$message.error("请补充填写课程名称");
  9189. return;
  9190. } else {
  9191. this.addWork();
  9192. }
  9193. this.steps = 4;
  9194. } else {
  9195. if (this.courseName == "") {
  9196. this.$message.error("请补充填写课程名称");
  9197. return;
  9198. } else {
  9199. if (this.userid != this.courseUserid && this.role != "1") {
  9200. this.updateWork2();
  9201. } else {
  9202. this.updateWork();
  9203. }
  9204. this.steps = 4;
  9205. }
  9206. }
  9207. })
  9208. .catch((v) => {
  9209. console.log(v);
  9210. if (v == "cancel") {
  9211. this.goTo(
  9212. "/course?userid=" +
  9213. this.userid +
  9214. "&oid=" +
  9215. this.oid +
  9216. "&org=" +
  9217. this.org +
  9218. "&role=" +
  9219. this.role
  9220. );
  9221. }
  9222. });
  9223. setTimeout(() => {
  9224. this.setTipsIndex()
  9225. }, 500)
  9226. },
  9227. lastSteps() {
  9228. if (this.steps == 4) {
  9229. this.goTo(
  9230. "/course?userid=" +
  9231. this.userid +
  9232. "&oid=" +
  9233. this.oid +
  9234. "&org=" +
  9235. this.org +
  9236. "&role=" +
  9237. this.role
  9238. );
  9239. } else {
  9240. // if (this.cidType == 0) {
  9241. // this.steps--;
  9242. // if (this.steps == 1) {
  9243. // setTimeout(() => {
  9244. // this.checkEva(this.checkId);
  9245. // setTimeout(() => {
  9246. // this.checkEva(this.checkId);
  9247. // }, 100);
  9248. // }, 100);
  9249. // }
  9250. // } else {
  9251. if (this.steps == 3) {
  9252. this.steps = 1;
  9253. setTimeout(() => {
  9254. this.checkEva(this.checkId);
  9255. setTimeout(() => {
  9256. this.checkEva(this.checkId);
  9257. }, 100);
  9258. }, 100);
  9259. }
  9260. // }
  9261. }
  9262. },
  9263. navSteps(s) {
  9264. if (this.courseName == "") {
  9265. this.$message.error("请补充填写课程名称");
  9266. return;
  9267. }
  9268. if (this.cidType == 0) {
  9269. if (this.steps == 1) {
  9270. if (this.cid == "" || this.cid == undefined) {
  9271. this.addWork();
  9272. } else {
  9273. if (this.userid != this.courseUserid && this.role != "1") {
  9274. this.updateWork2();
  9275. } else {
  9276. this.updateWork();
  9277. }
  9278. }
  9279. }
  9280. if (s == 1) {
  9281. this.steps = 1;
  9282. setTimeout(() => {
  9283. this.checkEva(this.checkId);
  9284. setTimeout(() => {
  9285. this.checkEva(this.checkId);
  9286. }, 100);
  9287. }, 100);
  9288. }
  9289. if (s == 2) {
  9290. this.steps = 2;
  9291. }
  9292. if (s == 3) {
  9293. this.cTemplate = this.templateC.content;
  9294. this.dialogVisible2 = false;
  9295. this.steps = 3;
  9296. this.isClickColor = 1;
  9297. this.unitJson[
  9298. this.unitIndex
  9299. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9300. this.$forceUpdate();
  9301. setTimeout(() => {
  9302. this.checkEva(this.checkId);
  9303. setTimeout(() => {
  9304. this.checkEva(this.checkId);
  9305. }, 100);
  9306. }, 1000);
  9307. }
  9308. } else {
  9309. if (this.steps == 1) {
  9310. if (this.cid == "" || this.cid == undefined) {
  9311. this.addWork();
  9312. } else {
  9313. if (this.userid != this.courseUserid && this.role != "1") {
  9314. this.updateWork2();
  9315. } else {
  9316. this.updateWork();
  9317. }
  9318. }
  9319. }
  9320. if (s == 1) {
  9321. this.steps = 1;
  9322. setTimeout(() => {
  9323. this.checkEva(this.checkId);
  9324. setTimeout(() => {
  9325. this.checkEva(this.checkId);
  9326. }, 100);
  9327. }, 100);
  9328. }
  9329. if (s == 3) {
  9330. this.cTemplate = this.templateC.content;
  9331. this.dialogVisible2 = false;
  9332. this.steps = 3;
  9333. this.isClickColor = 1;
  9334. this.unitJson[
  9335. this.unitIndex
  9336. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9337. this.$forceUpdate();
  9338. setTimeout(() => {
  9339. this.checkEva(this.checkId);
  9340. setTimeout(() => {
  9341. this.checkEva(this.checkId);
  9342. }, 100);
  9343. }, 1000);
  9344. }
  9345. }
  9346. this.$refs.stepBox.scrollTop = 0;
  9347. },
  9348. setTipsIndex(){
  9349. // 使用 setTimeout 确保对话框已经渲染完成
  9350. this.$nextTick(() => {
  9351. const dialog = document.querySelector('.custom-confirm-box');
  9352. if (dialog) {
  9353. const parent = dialog.parentElement;
  9354. if (parent) {
  9355. parent.style.zIndex = 9999999;
  9356. const adjacentElement = parent.nextElementSibling;
  9357. if (adjacentElement) {
  9358. adjacentElement.style.zIndex = 9999998;
  9359. }
  9360. }
  9361. }
  9362. });
  9363. },
  9364. nextSteps(clickType, ttype) {
  9365. if(!this.time()){
  9366. return
  9367. }
  9368. // if (this.cidType == 1) {
  9369. if (this.steps == 1) {
  9370. if (this.courseName != "") {
  9371. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  9372. // this.$message({
  9373. // message: "请回答完毕后再次发送",
  9374. // type: "warning"
  9375. // });
  9376. if(this.ttaskDetailLoading.length){
  9377. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  9378. this.$message({
  9379. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9380. type: "warning"
  9381. });
  9382. }
  9383. if(this.cpotetLoading.cpote1){
  9384. this.$message({
  9385. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  9386. type: "warning"
  9387. });
  9388. }
  9389. if(this.cpotetLoading.cpote2){
  9390. this.$message({
  9391. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  9392. type: "warning"
  9393. });
  9394. }
  9395. if(this.cpotetLoading.cpote3){
  9396. this.$message({
  9397. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  9398. type: "warning"
  9399. });
  9400. }
  9401. if(this.cpotetLoading.cpote4){
  9402. this.$message({
  9403. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  9404. type: "warning"
  9405. });
  9406. }
  9407. return;
  9408. }
  9409. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  9410. if(!this.courseText && !this.teacherCourseText){
  9411. this.$message.error("请生成简要描述后再生成大纲");
  9412. return;
  9413. }
  9414. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  9415. this.openAiDialog(clickType, 'aiOutline2')
  9416. if(clickType == 1){
  9417. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9418. }else {
  9419. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9420. }
  9421. }else {
  9422. this.openAiDialog(clickType, 'aiOutline')
  9423. if(clickType == 1){
  9424. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9425. }else {
  9426. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9427. }
  9428. }
  9429. return;
  9430. }
  9431. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  9432. let _type = ''
  9433. if(this.cpoteType == 0){
  9434. _type = 'aiCpote1'
  9435. if(clickType == 1){
  9436. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  9437. }else {
  9438. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  9439. }
  9440. }else if(this.cpoteType == 1){
  9441. _type = 'aiCpote2'
  9442. if(clickType == 1){
  9443. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  9444. }else {
  9445. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  9446. }
  9447. }else if(this.cpoteType == 2){
  9448. _type = 'aiCpote3'
  9449. if(clickType == 1){
  9450. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  9451. }else {
  9452. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  9453. }
  9454. }else if(this.cpoteType == 3){
  9455. _type = 'aiCpote4'
  9456. if(clickType == 1){
  9457. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  9458. }else {
  9459. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  9460. }
  9461. }
  9462. this.cpoteType++
  9463. this.openAiDialog(clickType, _type)
  9464. return;
  9465. }
  9466. // if (!this.isOutline2) {
  9467. // this.openAiDialog(clickType, 'aiTeacher')
  9468. // return;
  9469. // }
  9470. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  9471. this.openAiDialog(clickType, 'aiTeacher3')
  9472. if(clickType == 1){
  9473. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9474. }else {
  9475. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9476. }
  9477. return;
  9478. }
  9479. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  9480. this.openAiDialog(clickType, 'aiTeacher2')
  9481. if(clickType == 1){
  9482. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9483. }else {
  9484. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9485. }
  9486. return;
  9487. }
  9488. let _pan2 = 1
  9489. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  9490. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  9491. _pan2 = 2
  9492. this.$message.error(`请完善任务${k+1}的课程大纲`)
  9493. break;
  9494. }
  9495. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  9496. _pan2 = 2
  9497. this.$message.error(`请完善任务${k+1}的课程教案`)
  9498. break;
  9499. }
  9500. }
  9501. if(_pan2 == 2){
  9502. return;
  9503. }
  9504. const functionA = () => {
  9505. setTimeout(() => {
  9506. this.loading = false
  9507. this.steps = 3;
  9508. }, 0)
  9509. this.isClickColor = 1;
  9510. this.unitJson[
  9511. this.unitIndex
  9512. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9513. this.$forceUpdate();
  9514. setTimeout(() => {
  9515. this.checkEva(this.checkId);
  9516. setTimeout(() => {
  9517. this.checkEva(this.checkId);
  9518. }, 100);
  9519. }, 1000);
  9520. if (this.cid == "" || this.cid == undefined) {
  9521. this.addWork();
  9522. } else {
  9523. if (this.userid != this.courseUserid && this.role != "1") {
  9524. this.updateWork2();
  9525. } else {
  9526. this.updateWork();
  9527. }
  9528. }
  9529. }
  9530. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  9531. if(this.ttaskDetailLoading5.length){
  9532. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  9533. // this.$message({
  9534. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9535. // type: "warning"
  9536. // });
  9537. this.$confirm("还有教案描述未生成完毕,是否直接下一步?", "提示", {
  9538. confirmButtonText: "确定",
  9539. cancelButtonText: "取消",
  9540. distinguishCancelAndClose: true,
  9541. type: "warning",
  9542. customClass: 'custom-confirm-box'
  9543. })
  9544. .then(() => {
  9545. if(this.isTeacherTaskCancelToken2){
  9546. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  9547. if(this.isTeacherTaskCancelToken2[i]){
  9548. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  9549. this.isTeacherTaskCancelToken2[i] = null;
  9550. }
  9551. }
  9552. }
  9553. this.taskDetailLoading5 = []
  9554. this.ttaskDetailLoading5 = []
  9555. if(this.isTeacherTaskCancelSource){
  9556. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  9557. if(this.isTeacherTaskCancelSource[i]){
  9558. this.isTeacherTaskCancelSource[i].close()
  9559. this.isTeacherTaskCancelSource[i] = null
  9560. }
  9561. }
  9562. }
  9563. if (this.cid) {
  9564. this.loading = true
  9565. functionA()
  9566. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9567. } else {
  9568. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9569. if(clickType == 1){
  9570. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  9571. }else {
  9572. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9573. }
  9574. }
  9575. }).catch((v) => {
  9576. console.log(v);
  9577. })
  9578. setTimeout(() => {
  9579. this.setTipsIndex()
  9580. }, 500)
  9581. }
  9582. return;
  9583. }
  9584. if (this.cid && this.panTask() > 0) {
  9585. this.loading = true
  9586. functionA()
  9587. } else {
  9588. // if(ttype == 2){
  9589. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9590. // }else {
  9591. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  9592. // }
  9593. }
  9594. } else {
  9595. this.$message.error("请补充填写课程名称");
  9596. return;
  9597. }
  9598. } else if (this.steps == 3) {
  9599. if (this.taskLoading.length) {
  9600. let _pan = 1
  9601. for(var k = 0; k < this.taskLoading.length; k++){
  9602. if(this.taskLoading[k]){
  9603. this.$message({
  9604. message: `请等待任务${k+1}回答完毕后再上传`,
  9605. type: "warning"
  9606. });
  9607. _pan = 2
  9608. }
  9609. }
  9610. if(_pan == 2){
  9611. return
  9612. }
  9613. }
  9614. if(this.taskGLoading.length){
  9615. let _pan = 1
  9616. for(var k = 0; k < this.taskGLoading.length; k++){
  9617. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9618. this.$message({
  9619. message: `请等待任务${k+1}回答完毕后再保存`,
  9620. type: "warning"
  9621. });
  9622. _pan = 2
  9623. }
  9624. }
  9625. if(_pan == 2){
  9626. return
  9627. }
  9628. }
  9629. let pan2 = 1
  9630. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9631. for(var index = 0; index < taskJson.length; index++){
  9632. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9633. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9634. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9635. this.$message({
  9636. message: `请等待任务${index+1}回答完毕后再继续`,
  9637. type: "warning"
  9638. });
  9639. pan2 = 2
  9640. }
  9641. }
  9642. }
  9643. }
  9644. if(pan2 == 2){
  9645. return
  9646. }
  9647. if (this.cid == "" || this.cid == undefined) {
  9648. if (this.courseName == "") {
  9649. this.$message.error("请补充填写课程名称");
  9650. return;
  9651. } else {
  9652. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9653. this.addWork();
  9654. this.steps++;
  9655. }
  9656. } else {
  9657. if (this.courseName == "") {
  9658. this.$message.error("请补充填写课程名称");
  9659. return;
  9660. } else {
  9661. if (this.userid != this.courseUserid && this.role != "1") {
  9662. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9663. this.updateWork2();
  9664. } else {
  9665. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9666. this.updateWork();
  9667. }
  9668. this.steps++;
  9669. }
  9670. }
  9671. }
  9672. // } else {
  9673. // if (this.steps == 1) {
  9674. // if (this.courseName != "") {
  9675. // if (this.cid == "" || this.cid == undefined) {
  9676. // this.addWork();
  9677. // } else {
  9678. // if (this.userid != this.courseUserid && this.role != "1") {
  9679. // // this.updateWork2();
  9680. // } else {
  9681. // this.updateWork();
  9682. // }
  9683. // }
  9684. // this.steps++;
  9685. // } else {
  9686. // this.$message.error("请补充填写课程名称");
  9687. // return;
  9688. // }
  9689. // } else if (this.steps == 2) {
  9690. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  9691. // this.cTemplate = this.templateC.content;
  9692. // }
  9693. // this.dialogVisible2 = false;
  9694. // this.steps++;
  9695. // setTimeout(() => {
  9696. // this.checkEva(this.checkId);
  9697. // setTimeout(() => {
  9698. // this.checkEva(this.checkId);
  9699. // }, 100);
  9700. // }, 1000);
  9701. // } else if (this.steps == 3) {
  9702. // if (this.cid == "" || this.cid == undefined) {
  9703. // if (this.courseName == "") {
  9704. // this.$message.error("请补充填写课程名称");
  9705. // return;
  9706. // } else {
  9707. // this.addWork();
  9708. // this.steps++;
  9709. // }
  9710. // } else {
  9711. // if (this.courseName == "") {
  9712. // this.$message.error("请补充填写课程名称");
  9713. // return;
  9714. // } else {
  9715. // if (this.userid != this.courseUserid && this.role != "1") {
  9716. // this.updateWork2();
  9717. // } else {
  9718. // this.updateWork();
  9719. // }
  9720. // this.steps++;
  9721. // }
  9722. // }
  9723. // }
  9724. // }
  9725. this.$refs.stepBox.scrollTop = 0;
  9726. },
  9727. unitSet(i) {
  9728. if (this.unitIndex == i) {
  9729. return;
  9730. }
  9731. this.unitIndex = i;
  9732. this.isClickColor = 1;
  9733. // this.$refs.rightboxR.scrollTop = 0;
  9734. this.$refs.unitBox.scrollTop = 0;
  9735. },
  9736. panUnitJson() {
  9737. let _unitIndex = this.unitIndex;
  9738. let cPan = 1;
  9739. for (
  9740. var j = 0;
  9741. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9742. j++
  9743. ) {
  9744. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9745. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9746. j
  9747. ].proVisible2 = false;
  9748. if (
  9749. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9750. .length > 1
  9751. ) {
  9752. for (
  9753. var z = 0;
  9754. z <
  9755. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9756. .length;
  9757. z++
  9758. ) {
  9759. if (
  9760. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9761. z
  9762. ].tool.length
  9763. ) {
  9764. this.$message.error("请把工具添加完整");
  9765. cPan = 2;
  9766. break;
  9767. }
  9768. }
  9769. }
  9770. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9771. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9772. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9773. (ele) => {
  9774. return ele.value != "" || ele.detail != "" || ele.target != "";
  9775. }
  9776. );
  9777. }
  9778. }
  9779. return cPan;
  9780. },
  9781. unitOpen(i) {
  9782. if (this.unitJson[i].toolOpen) {
  9783. this.unitJson[i].toolOpen = false;
  9784. } else {
  9785. this.unitJson[i].toolOpen = true;
  9786. }
  9787. this.updateWork();
  9788. this.$forceUpdate();
  9789. },
  9790. unitSet2(i) {
  9791. if (this.panUnitJson() == 2) {
  9792. return;
  9793. }
  9794. // if(this.unitJson[i].toolOpen){
  9795. // this.unitJson[i].toolOpen = false
  9796. // this.updateWork()
  9797. // this.$forceUpdate()
  9798. // return
  9799. // }else {
  9800. this.unitJson[i].toolOpen = true;
  9801. // }
  9802. this.$forceUpdate();
  9803. if (this.unitIndex == i) {
  9804. return;
  9805. }
  9806. this.unitIndex = i;
  9807. this.isClickColor = 1;
  9808. // this.$refs.rightboxR.scrollTop = 0;
  9809. this.$refs.unitBox.scrollTop = 0;
  9810. },
  9811. updateCourseState(i) {
  9812. let params = [
  9813. {
  9814. cid: this.cid,
  9815. state: i,
  9816. },
  9817. ];
  9818. this.ajax
  9819. .post(this.$store.state.api + "updateCourseMode", params)
  9820. .then((res) => {
  9821. this.courseState = i;
  9822. })
  9823. .catch((err) => {
  9824. this.$message.error("网络不佳");
  9825. console.error(err);
  9826. });
  9827. },
  9828. addtips(){
  9829. let params = [
  9830. {
  9831. cid: this.cid,
  9832. tips: JSON.stringify(this.aiJson),
  9833. tid: this.templateid
  9834. },
  9835. ];
  9836. this.ajax
  9837. .post(this.$store.state.api + "addTips", params)
  9838. .then((res) => {
  9839. })
  9840. .catch((err) => {
  9841. this.$message.error("网络不佳");
  9842. console.error(err);
  9843. });
  9844. },
  9845. openSaveTips(){
  9846. this.dialogVisibleTips = true
  9847. },
  9848. time() {
  9849. if (!this.now) {
  9850. this.now = new Date().getTime();
  9851. return true;
  9852. } else {
  9853. let time = new Date().getTime();
  9854. if (time - this.now > 1000) {
  9855. this.now = time;
  9856. return true;
  9857. } else {
  9858. return false;
  9859. }
  9860. }
  9861. },
  9862. deleteUnit(i) {
  9863. var _this = this;
  9864. if (i == 0 && _this.unitJson.length == 1) {
  9865. _this
  9866. .$confirm("确定切换成任务模式吗?", "提示", {
  9867. confirmButtonText: "确定",
  9868. cancelButtonText: "取消",
  9869. type: "warning",
  9870. })
  9871. .then(() => {
  9872. _this.unitJson[i].dyName = "";
  9873. // _this.updateCourseState(2);
  9874. })
  9875. .catch(() => {
  9876. return;
  9877. });
  9878. } else {
  9879. _this
  9880. .$confirm("确定删除此阶段吗?", "提示", {
  9881. confirmButtonText: "确定",
  9882. cancelButtonText: "取消",
  9883. type: "warning",
  9884. })
  9885. .then(() => {
  9886. _this.isDelete = 2;
  9887. // _this.unitIndex = _this.unitIndex - 1;
  9888. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  9889. // _this.$message.success("删除成功");
  9890. })
  9891. .catch(() => {
  9892. return;
  9893. });
  9894. }
  9895. },
  9896. deleteWork(chapid) {
  9897. let params = [
  9898. {
  9899. cid: this.cid,
  9900. chapters: JSON.stringify(this.unitJson),
  9901. uid: this.userid,
  9902. chapid: chapid,
  9903. },
  9904. ];
  9905. this.ajax
  9906. .post(this.$store.state.api + "deleteWork", params)
  9907. .then((res) => {
  9908. this.$message({
  9909. message: "删除成功",
  9910. type: "success",
  9911. });
  9912. let task = JSON.parse(
  9913. JSON.stringify(
  9914. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  9915. )
  9916. );
  9917. this.unitJson.splice(this.unitIndex, 1);
  9918. if (this.unitIndex == 0) {
  9919. this.unitIndex = 0;
  9920. } else {
  9921. this.unitIndex = this.unitIndex - 1;
  9922. }
  9923. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  9924. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  9925. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  9926. ...task,
  9927. ];
  9928. }
  9929. })
  9930. .catch((err) => {
  9931. this.$message.error("网络不佳");
  9932. console.error(err);
  9933. });
  9934. },
  9935. deleteTool(itemTaskIndex, i) {
  9936. var _this = this;
  9937. if (_this.time()) {
  9938. _this
  9939. .$confirm("确定删除此工具吗?", "提示", {
  9940. confirmButtonText: "确定",
  9941. cancelButtonText: "取消",
  9942. type: "warning",
  9943. })
  9944. .then(() => {
  9945. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9946. itemTaskIndex
  9947. ].toolChoose.splice(i, 1);
  9948. _this.$message.success("删除成功");
  9949. })
  9950. .catch(() => {
  9951. return;
  9952. });
  9953. }
  9954. },
  9955. deleteSentence(i) {
  9956. var _this = this;
  9957. _this
  9958. .$confirm("确定删除此题目吗?", "提示", {
  9959. confirmButtonText: "确定",
  9960. cancelButtonText: "取消",
  9961. type: "warning",
  9962. })
  9963. .then(() => {
  9964. _this.sentenceList.splice(i, 1);
  9965. _this.$message.success("删除成功");
  9966. })
  9967. .catch(() => {
  9968. return;
  9969. });
  9970. },
  9971. deleteS(s, i, j) {
  9972. this.sentenceList[i].addSentence.splice(j, 1);
  9973. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9974. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9975. this.sentenceList[i].rightAnswer.splice(a, 1);
  9976. }
  9977. },
  9978. openT() {
  9979. window.topU.postMessage({ tools: "25" }, "*");
  9980. },
  9981. deleteTask(i) {
  9982. var _this = this;
  9983. if (_this.time()) {
  9984. _this
  9985. .$confirm(
  9986. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9987. 1 ==
  9988. i
  9989. ? "确定删除此任务吗?"
  9990. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  9991. "提示",
  9992. {
  9993. confirmButtonText: "确定",
  9994. cancelButtonText: "取消",
  9995. type: "warning",
  9996. }
  9997. )
  9998. .then(() => {
  9999. if (i == 0 && _this.courseState == 4) {
  10000. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10001. i + 1
  10002. ].chapterData = JSON.parse(
  10003. JSON.stringify(
  10004. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  10005. .chapterData
  10006. )
  10007. );
  10008. }
  10009. _this.$forceUpdate();
  10010. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  10011. i,
  10012. 1
  10013. );
  10014. _this.$message.success("删除成功");
  10015. })
  10016. .catch(() => {
  10017. return;
  10018. });
  10019. }
  10020. },
  10021. deleteTask2(i) {
  10022. var _this = this;
  10023. if (_this.time()) {
  10024. _this
  10025. .$confirm(
  10026. "确定删除此任务吗?",
  10027. "提示",
  10028. {
  10029. confirmButtonText: "确定",
  10030. cancelButtonText: "取消",
  10031. type: "warning",
  10032. }
  10033. )
  10034. .then(() => {
  10035. if (i == 0 && _this.courseState == 4) {
  10036. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10037. i + 1
  10038. ].chapterData = JSON.parse(
  10039. JSON.stringify(
  10040. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  10041. .chapterData
  10042. )
  10043. );
  10044. }
  10045. _this.$forceUpdate();
  10046. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  10047. i,
  10048. 1
  10049. );
  10050. _this.$message.success("删除成功");
  10051. })
  10052. .catch(() => {
  10053. return;
  10054. });
  10055. }
  10056. },
  10057. handlePictureCardPreview(file) {
  10058. this.dialogImageUrl = file.url;
  10059. },
  10060. clean(i, c) {
  10061. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  10062. },
  10063. handle_remove1(file, fileList, type) {
  10064. var _tmp = this.cover;
  10065. // for (var i = 0, len = _tmp.length; i < len; i++) {
  10066. // if (_tmp[i].uid == file.uid) {
  10067. // _tmp.splice(i, 1);
  10068. // break;
  10069. // }
  10070. // this.cover = _tmp;
  10071. // }
  10072. this.cover = [];
  10073. this.noneBtnImg = this.cover.length >= 1;
  10074. this.isSysPic = false;
  10075. this.isSysPic2 = false;
  10076. this.$forceUpdate();
  10077. },
  10078. addImg(e) {
  10079. var el = e.currentTarget;
  10080. el.getElementsByTagName("input")[0].click();
  10081. e.target.value = "";
  10082. },
  10083. addChaptersTools(i) {
  10084. this.chapTools = [
  10085. {
  10086. tools: [],
  10087. toolDetail: "",
  10088. },
  10089. ];
  10090. this.chapCount = i;
  10091. this.dialogVisible4 = true;
  10092. },
  10093. isNoFinsh() {
  10094. this.$message.warning("功能正在开发中");
  10095. },
  10096. addAttText(i) {
  10097. this.AttText = {
  10098. title: "",
  10099. text: "",
  10100. };
  10101. this.taskCount = i;
  10102. this.AttTextType = 0;
  10103. this.$forceUpdate();
  10104. this.dialogVisible6 = true;
  10105. setTimeout(() => {
  10106. this.$refs["fuInput"].focus();
  10107. }, 100);
  10108. },
  10109. openLine(i) {
  10110. this.line = "";
  10111. this.lineCount = i;
  10112. this.lineType = 0;
  10113. this.$forceUpdate();
  10114. this.dialogVisible7 = true;
  10115. },
  10116. pasteLine(i) {
  10117. navigator.clipboard
  10118. .readText()
  10119. .then((v) => {
  10120. console.log("获取剪贴板成功:", v);
  10121. const html = v;
  10122. const regex = /src="(.*?)"/g;
  10123. const match = regex.exec(html);
  10124. if (match && match[1]) {
  10125. console.log(match[1]);
  10126. this.$message.success("粘贴成功");
  10127. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10128. i
  10129. ].chapterData.unshift({
  10130. name: "链接",
  10131. title: "嵌入代码",
  10132. url: match[1],
  10133. type: 8,
  10134. });
  10135. } else {
  10136. // console.log("未找到包含 src 属性的 iframe");
  10137. this.$message.error(
  10138. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  10139. );
  10140. }
  10141. })
  10142. .catch((v) => {
  10143. console.log("获取剪贴板失败: ", v);
  10144. });
  10145. },
  10146. openSource(i) {
  10147. this.lineCount = i;
  10148. this.sourceData = {};
  10149. this.dialogVisibleSource = true;
  10150. this.updateSourcePan = false;
  10151. },
  10152. openAiCreate(i){
  10153. // this.lineCount = i;
  10154. // this.dialogVisibleAiCreate = true;
  10155. if(!this.pptCount.includes(i)){
  10156. this.pptCount.push(i)
  10157. this.dialogVisibleAiCreate2.push(i);
  10158. }else{
  10159. this.$refs['ppt'+i][0].tanDialog = false
  10160. this.$refs['ppt'+i][0].dialogVisibleAiCreate2 = true
  10161. }
  10162. this.pptBoxDialog = true
  10163. },
  10164. createAiPpt(json, i){
  10165. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10166. // this.dialogVisibleAiCreate = false;
  10167. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10168. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10169. },
  10170. closeAiPpt(i){
  10171. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10172. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10173. },
  10174. openAiCreateVideo(i){
  10175. this.lineCount = i;
  10176. this.dialogVisibleAiCreateVideo = true;
  10177. },
  10178. createAiVideo(json){
  10179. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10180. // this.dialogVisibleAiCreateVideo = false;
  10181. },
  10182. async createTeacherAn(index, type){
  10183. // this.lineCount = index;
  10184. let md = new MarkdownIt();
  10185. if(this.courseState == 4){
  10186. this.anLoading[0] = true
  10187. // if(index == 0 || index){
  10188. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10189. // let name = _task.task+'-教案'
  10190. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10191. // await this.generate(name, _html, 0)
  10192. // }else {
  10193. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10194. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10195. let name = `任务${i+1}`+_task.task+'-教案'
  10196. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10197. await this.generate(name, _html, 0)
  10198. }
  10199. // }
  10200. }else if(this.courseState == 5){
  10201. if(type != 2){
  10202. this.anLoading[index] = true
  10203. }
  10204. if(index == 0 || index){
  10205. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10206. let name = `任务${index+1}`+_task.task+'-教案'
  10207. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10208. await this.generate(name, _html, index,"", type)
  10209. }else {
  10210. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10211. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10212. let name = `任务${i+1}`+_task.task+'-教案'
  10213. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10214. await this.generate(name, _html, i)
  10215. }
  10216. }
  10217. }
  10218. },
  10219. async createTaskAn(index){
  10220. // this.lineCount = index;
  10221. if(this.taskAnLoading[index]){
  10222. // this.$message.error('请等待当前学历案生成完成')
  10223. this.cancelAjax('taskAn', index)
  10224. return
  10225. }
  10226. this.taskAnLoading[index] = true
  10227. this.$forceUpdate()
  10228. let _this = this
  10229. let md = new MarkdownIt();
  10230. let messages = ""
  10231. messages = `NOTICE
  10232. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  10233. Language: ${this.getLang()}
  10234. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  10235. ## 任务教案
  10236. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  10237. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  10238. let parm = {
  10239. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  10240. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  10241. session_name: uuidv4(),
  10242. userId: this.userid,
  10243. file_ids: [],
  10244. model: 'gpt-4o-2024-11-20',
  10245. temperature: this.mode == 3 ? 0.5 : 0.1,
  10246. }
  10247. this.ajax
  10248. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  10249. .then(async (response) => {
  10250. console.log(response);
  10251. let data = response.data.FunctionResponse
  10252. if (data.message) {
  10253. console.log(data.message);
  10254. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  10255. let name = _task.task+'-学历案'
  10256. let _html = md.render(data.message).replace(/[\r\n]+/g, '').replace(/<hr>/g, '').replace(/<ol[^>]*>/g, '').replace(/<\/ol>/g, '').replace(/<li[^>]*>(.*?)<\/li>/g, (match, content) => {
  10257. // 去除内容为空的<li>标签
  10258. if (!content.trim()) {
  10259. return ''; // 如果<li>标签内容为空,删除该标签
  10260. }
  10261. // 去掉<li>中的标签,保留纯文本内容
  10262. return `<li>${content.replace(/<[^>]+>/g, '')}</li>`;
  10263. }); // 去掉 <ol> 和 </ol> 标签
  10264. console.log(_html)
  10265. await _this.generate(name, _html, index, ()=>{
  10266. _this.taskAnLoading[index] = false
  10267. _this.taskAnCancelToken[index] = null
  10268. })
  10269. }else{
  10270. _this.taskAnLoading[index] = false
  10271. _this.taskAnCancelToken[index] = null
  10272. }
  10273. }).catch((error) => {
  10274. console.log(error);
  10275. _this.taskAnLoading[index] = false
  10276. _this.taskAnCancelToken[index] = null
  10277. });
  10278. },
  10279. async generate(a, html, index, callback, type) {
  10280. // <html lang="en">
  10281. // 将html文件中需要用到的数据挂载到store上
  10282. const content = `<!DOCTYPE html>
  10283. <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'>
  10284. <head>
  10285. <!--[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]-->
  10286. <meta charset="UTF-8">
  10287. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10288. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10289. <title>${a}</title>
  10290. <style>
  10291. table {
  10292. border-collapse: collapse; /* 折叠边框 */
  10293. width: 100%;
  10294. }
  10295. th, td {
  10296. border: 1px solid black; /* 线条样式 */
  10297. padding: 8px;
  10298. text-align: left;
  10299. }
  10300. </style>
  10301. </head>
  10302. <body>
  10303. ${html}
  10304. </body>
  10305. </html>`;
  10306. // debugger
  10307. const blob = htmlDocx.asBlob(content)
  10308. // debugger
  10309. let dname = a + ".docx";
  10310. // 创建文件流
  10311. // 创建bolb实例时,内容一定要放在[]中
  10312. // const blob = new Blob([content], {
  10313. // type: "text/plain;charset='utf-8'",
  10314. // });
  10315. // const file = new File([blob], dname, { type: 'application/msword' });
  10316. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10317. // let params = convertApi.createParams()
  10318. // params.add('file', file)
  10319. // try {
  10320. // let result = await convertApi.convert('docx', 'docx', params)
  10321. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10322. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10323. // });
  10324. // await this.beforeUploadHtml(file, index, callback)
  10325. // } catch (error) {
  10326. // console.log('=================','报错')
  10327. // await this.beforeUploadHtml(file, index, callback)
  10328. // return
  10329. // }
  10330. await this.beforeUploadHtml(file, index, callback, type)
  10331. },
  10332. async generateExport(a, html, index) {
  10333. // <html lang="en">
  10334. // 将html文件中需要用到的数据挂载到store上
  10335. const content = `<!DOCTYPE html>
  10336. <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'>
  10337. <head>
  10338. <!--[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]-->
  10339. <meta charset="UTF-8">
  10340. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10341. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10342. <title>${a}</title>
  10343. <style>
  10344. table {
  10345. border-collapse: collapse; /* 折叠边框 */
  10346. width: 100%;
  10347. }
  10348. th, td {
  10349. border: 1px solid black; /* 线条样式 */
  10350. padding: 8px;
  10351. text-align: left;
  10352. }
  10353. </style>
  10354. </head>
  10355. <body>
  10356. ${html}
  10357. </body>
  10358. </html>`;
  10359. // debugger
  10360. const blob = htmlDocx.asBlob(content)
  10361. // debugger
  10362. const dname = `${a}.docx`;
  10363. // 创建文件流
  10364. // const file = new File([blob], dname, { type: 'application/msword' });
  10365. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10366. // let params = convertApi.createParams()
  10367. // params.add('file', file)
  10368. // try {
  10369. // let result = await convertApi.convert('docx', 'docx', params)
  10370. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10371. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10372. // });
  10373. // // 执行下载
  10374. // saveAs(file, dname);
  10375. // } catch (error) {
  10376. // saveAs(file, dname);
  10377. // // this.$message.error('导出失败')
  10378. // }
  10379. saveAs(file, dname);
  10380. // return file
  10381. },
  10382. async generateExport2(a, html, index) {
  10383. return new Promise(async (resolve) => {
  10384. // <html lang="en">
  10385. // 将html文件中需要用到的数据挂载到store上
  10386. const content = `<!DOCTYPE html>
  10387. <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'>
  10388. <head>
  10389. <!--[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]-->
  10390. <meta charset="UTF-8">
  10391. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10392. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10393. <title>${a}</title>
  10394. <style>
  10395. table {
  10396. border-collapse: collapse; /* 折叠边框 */
  10397. width: 100%;
  10398. }
  10399. th, td {
  10400. border: 1px solid black; /* 线条样式 */
  10401. padding: 8px;
  10402. text-align: left;
  10403. }
  10404. </style>
  10405. </head>
  10406. <body>
  10407. ${html}
  10408. </body>
  10409. </html>`;
  10410. // debugger
  10411. const blob = htmlDocx.asBlob(content)
  10412. // debugger
  10413. const dname = `${a}`;
  10414. // 创建文件流
  10415. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10416. let params = convertApi.createParams()
  10417. params.add('file', file)
  10418. resolve(file); // 通过 Promise 返回 File 对象
  10419. // try {
  10420. // let result = await convertApi.convert('docx', 'docx', params)
  10421. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10422. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10423. // });
  10424. // resolve(file); // 通过 Promise 返回 File 对象
  10425. // } catch (error) {
  10426. // resolve(''); // 通过 Promise 返回 File 对象
  10427. // }
  10428. });
  10429. },
  10430. async addChatAppendixFile(name, html){
  10431. await this.generate(name, html, 0,"", 3)
  10432. },
  10433. beforeUploadHtml(event, index, callback, type) {
  10434. var file = event;
  10435. var credentials = {
  10436. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10437. secretAccessKey: "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",
  10438. }; //秘钥形式的登录上传
  10439. window.AWS.config.update(credentials);
  10440. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10441. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10442. var _this = this;
  10443. if (file) {
  10444. var params = {
  10445. Key:
  10446. file.name.split(".")[0] +
  10447. new Date().getTime() +
  10448. "." +
  10449. file.name.split(".")[file.name.split(".").length - 1],
  10450. ContentType: file.type,
  10451. Body: file,
  10452. "Access-Control-Allow-Credentials": "*",
  10453. ACL: "public-read",
  10454. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10455. var options = {
  10456. partSize: 2048 * 1024 * 1024,
  10457. queueSize: 2,
  10458. leavePartsOnError: true,
  10459. };
  10460. bucket
  10461. .upload(params, options)
  10462. .on("httpUploadProgress", function (evt) {
  10463. //这里可以写进度条
  10464. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10465. })
  10466. .send(function (err, data) {
  10467. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  10468. _this.anLoading[0] = false
  10469. }
  10470. if(_this.courseState == 5){
  10471. _this.anLoading[index] = false
  10472. }
  10473. callback ? callback() : ''
  10474. _this.$forceUpdate();
  10475. if (err) {
  10476. _this.$message.error("上传失败");
  10477. } else {
  10478. let _index = 0
  10479. // if(_this.lineCount == 0 || _this.lineCount){
  10480. // _index = _this.lineCount
  10481. // }else {
  10482. _index = index
  10483. // }
  10484. if(type != 2 && type != 3){
  10485. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  10486. name: file.name,
  10487. url: data.Location,
  10488. type: 3,
  10489. })
  10490. }else{
  10491. let fileName = file.name;
  10492. let baseName = fileName.split('.').slice(0, -1).join('.'); // 获取不带扩展名的文件名
  10493. let extension = fileName.split('.').pop(); // 获取文件扩展名
  10494. let count = 1;
  10495. // 检查文件名是否已存在
  10496. while (_this.appendixFile.some(item => item.name === fileName)) {
  10497. fileName = `${baseName} (${count}).${extension}`; // 修改文件名
  10498. count++;
  10499. }
  10500. if(type == 3){
  10501. _this.$message.success('保存到附件成功')
  10502. _this.appendixFile.unshift({
  10503. name: fileName,
  10504. url: data.Location,
  10505. type: 3,
  10506. task: 'dialog'
  10507. })
  10508. }else{
  10509. _this.appendixFile.unshift({
  10510. name: fileName,
  10511. url: data.Location,
  10512. type: 3,
  10513. })
  10514. }
  10515. }
  10516. console.log(data.Location);
  10517. }
  10518. });
  10519. }
  10520. },
  10521. async generate2(a, html, index, callback) {
  10522. // 将html文件中需要用到的数据挂载到store上
  10523. const content = `<!DOCTYPE html>
  10524. <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'>
  10525. <head>
  10526. <!--[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]-->
  10527. <meta charset="UTF-8">
  10528. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10529. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10530. <title>${a}</title>
  10531. <style>
  10532. table {
  10533. border-collapse: collapse; /* 折叠边框 */
  10534. width: 100%;
  10535. }
  10536. th, td {
  10537. border: 1px solid black; /* 线条样式 */
  10538. padding: 8px;
  10539. text-align: left;
  10540. }
  10541. </style>
  10542. </head>
  10543. <body>
  10544. ${html}
  10545. </body>
  10546. </html>`;
  10547. const blob = htmlDocx.asBlob(content)
  10548. // debugger
  10549. let dname = a + ".docx";
  10550. // 创建文件流
  10551. // 创建bolb实例时,内容一定要放在[]中
  10552. // const blob = new Blob([content], {
  10553. // type: "text/plain;charset='utf-8'",
  10554. // });
  10555. // const file = new File([blob], dname, { type: 'application/msword' });
  10556. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10557. // let params = convertApi.createParams()
  10558. // params.add('file', file)
  10559. // try {
  10560. // let result = await convertApi.convert('docx', 'docx', params)
  10561. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10562. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10563. // });
  10564. // await this.beforeUploadHtml2(file, index, callback)
  10565. // } catch (error) {
  10566. // await this.beforeUploadHtml2(file, index, callback)
  10567. // return;
  10568. // }
  10569. await this.beforeUploadHtml2(file, index, callback)
  10570. },
  10571. beforeUploadHtml2(event, index, callback) {
  10572. var file = event;
  10573. var credentials = {
  10574. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10575. secretAccessKey: "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",
  10576. }; //秘钥形式的登录上传
  10577. window.AWS.config.update(credentials);
  10578. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10579. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10580. var _this = this;
  10581. if (file) {
  10582. var params = {
  10583. Key:
  10584. file.name.split(".")[0] +
  10585. new Date().getTime() +
  10586. "." +
  10587. file.name.split(".")[file.name.split(".").length - 1],
  10588. ContentType: file.type,
  10589. Body: file,
  10590. "Access-Control-Allow-Credentials": "*",
  10591. ACL: "public-read",
  10592. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10593. var options = {
  10594. partSize: 2048 * 1024 * 1024,
  10595. queueSize: 2,
  10596. leavePartsOnError: true,
  10597. };
  10598. bucket
  10599. .upload(params, options)
  10600. .on("httpUploadProgress", function (evt) {
  10601. //这里可以写进度条
  10602. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10603. })
  10604. .send(async function (err, data) {
  10605. if(_this.courseState == 5){
  10606. _this.loading = false
  10607. }
  10608. if (err) {
  10609. callback ? callback() : ''
  10610. _this.$message.error("上传失败");
  10611. } else {
  10612. let fileid = await _this.createFileid(data.Location)
  10613. // _this.cankaoInfoData.push({
  10614. //                   name: file.name,
  10615. //                   url: data.Location,
  10616. //                   type: 3,
  10617. // fileid: fileid,
  10618. //   })
  10619. _this.infoData2.push({
  10620.                   name: file.name,
  10621.                   url: data.Location,
  10622.                   type: 3,
  10623. fileid: fileid == 1 ? '' : fileid,
  10624.   })
  10625. _this.infoData.push({
  10626. name: file.name,
  10627. url: data.Location,
  10628. type: 3,
  10629. fileid: fileid == 1 ? '' : fileid,
  10630. });
  10631. console.log(data.Location);
  10632. callback ? callback() : ''
  10633. }
  10634. });
  10635. }
  10636. },
  10637. addSource() {
  10638. if (!Object.keys(this.sourceData).length) {
  10639. this.$message.error("请选择要上传的资源");
  10640. return;
  10641. }
  10642. let keys = Object.keys(this.sourceData);
  10643. for (var i = 0; i < keys.length; i++) {
  10644. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10645. this.lineCount
  10646. ].chapterData.unshift({
  10647. name: "链接",
  10648. title: this.sourceData[keys[i]].name,
  10649. url: this.sourceData[keys[i]].url,
  10650. type: 14,
  10651. id: keys[i],
  10652. });
  10653. }
  10654. this.$forceUpdate();
  10655. this.dialogVisibleSource = false;
  10656. },
  10657. updateSource() {
  10658. if (!Object.keys(this.sourceData).length) {
  10659. this.$message.error("请选择要上传的资源");
  10660. return;
  10661. }
  10662. let keys = Object.keys(this.sourceData);
  10663. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10664. this.taskCount
  10665. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  10666. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10667. this.taskCount
  10668. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  10669. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10670. this.taskCount
  10671. ].chapterData[this.lineCount].id = keys[0];
  10672. this.updateSourcePan = false;
  10673. this.$forceUpdate();
  10674. this.dialogVisibleSource = false;
  10675. },
  10676. deleteM(i, j) {
  10677. this.testJson.testJson[i].timuList.splice(j, 1);
  10678. },
  10679. beforeUploadTiMu(event, i) {
  10680. const loading = this.openLoading();
  10681. var file = event.target.files[0];
  10682. var credentials = {
  10683. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10684. secretAccessKey: "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",
  10685. }; //秘钥形式的登录上传
  10686. window.AWS.config.update(credentials);
  10687. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10688. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10689. var _this = this;
  10690. if (file) {
  10691. var params = {
  10692. Key:
  10693. file.name.split(".")[0] +
  10694. new Date().getTime() +
  10695. "." +
  10696. file.name.split(".")[file.name.split(".").length - 1],
  10697. ContentType: file.type,
  10698. Body: file,
  10699. "Access-Control-Allow-Credentials": "*",
  10700. ACL: "public-read",
  10701. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10702. var options = {
  10703. partSize: 2048 * 1024 * 1024,
  10704. queueSize: 2,
  10705. leavePartsOnError: true,
  10706. };
  10707. bucket
  10708. .upload(params, options)
  10709. .on("httpUploadProgress", function (evt) {
  10710. //这里可以写进度条
  10711. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10712. })
  10713. .send(function (err, data) {
  10714. loading.close();
  10715. if (err) {
  10716. _this.$message.error("上传失败");
  10717. } else {
  10718. if (_this.testJson.testJson[i].timuList) {
  10719. _this.testJson.testJson[i].timuList.push({
  10720. src: data.Location,
  10721. });
  10722. } else {
  10723. _this.testJson.testJson[i].timuList = [];
  10724. _this.testJson.testJson[i].timuList.push({
  10725. src: data.Location,
  10726. });
  10727. }
  10728. _this.imgChange3(i);
  10729. _this.$forceUpdate();
  10730. }
  10731. });
  10732. }
  10733. },
  10734. beforeUploadTi(event, i, j) {
  10735. const loading = this.openLoading();
  10736. var file = event.target.files[0];
  10737. var credentials = {
  10738. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10739. secretAccessKey: "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",
  10740. }; //秘钥形式的登录上传
  10741. window.AWS.config.update(credentials);
  10742. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10743. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10744. var _this = this;
  10745. if (file) {
  10746. var params = {
  10747. Key:
  10748. file.name.split(".")[0] +
  10749. new Date().getTime() +
  10750. "." +
  10751. file.name.split(".")[file.name.split(".").length - 1],
  10752. ContentType: file.type,
  10753. Body: file,
  10754. "Access-Control-Allow-Credentials": "*",
  10755. ACL: "public-read",
  10756. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10757. var options = {
  10758. partSize: 2048 * 1024 * 1024,
  10759. queueSize: 2,
  10760. leavePartsOnError: true,
  10761. };
  10762. bucket
  10763. .upload(params, options)
  10764. .on("httpUploadProgress", function (evt) {
  10765. //这里可以写进度条
  10766. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10767. })
  10768. .send(function (err, data) {
  10769. loading.close();
  10770. if (err) {
  10771. _this.$message.error("上传失败");
  10772. } else {
  10773. _this.testJson.testJson[i].checkList[j] = {};
  10774. _this.testJson.testJson[i].checkList[j].src = data.Location;
  10775. _this.testJson.testJson[i].checkList[j].imgType = 1;
  10776. _this.imgChange2(i, j);
  10777. _this.$forceUpdate();
  10778. }
  10779. });
  10780. }
  10781. },
  10782. beforeUpload1(event, type) {
  10783. // const loading = this.openLoading();
  10784. var file = event.target.files[0];
  10785. var credentials = {
  10786. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10787. secretAccessKey: "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",
  10788. }; //秘钥形式的登录上传
  10789. window.AWS.config.update(credentials);
  10790. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10791. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10792. var _this = this;
  10793. if (file) {
  10794. var params = {
  10795. Key:
  10796. file.name.split(".")[0] +
  10797. new Date().getTime() +
  10798. "." +
  10799. file.name.split(".")[file.name.split(".").length - 1],
  10800. ContentType: file.type,
  10801. Body: file,
  10802. "Access-Control-Allow-Credentials": "*",
  10803. ACL: "public-read",
  10804. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10805. var options = {
  10806. partSize: 2048 * 1024 * 1024,
  10807. queueSize: 2,
  10808. leavePartsOnError: true,
  10809. };
  10810. bucket
  10811. .upload(params, options)
  10812. .on("httpUploadProgress", function (evt) {
  10813. //这里可以写进度条
  10814. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10815. })
  10816. .send(function (err, data) {
  10817. // loading.close();
  10818. if (err) {
  10819. // var a = _this.$refs.upload1.uploadFiles;
  10820. // a.splice(a.length - 1, a.length);
  10821. _this.$message.error("上传失败");
  10822. } else {
  10823. // _this.cover.push({
  10824. // name: file.name,
  10825. // url: data.Location,
  10826. // uid: file.uid,
  10827. // });
  10828. _this.cover = [
  10829. {
  10830. name: file.name,
  10831. url: data.Location,
  10832. uid: file.uid,
  10833. },
  10834. ];
  10835. _this.imgChange1(null, null, 1, null);
  10836. _this.choosePicVisible = false;
  10837. console.log(data.Location);
  10838. }
  10839. });
  10840. }
  10841. },
  10842. beforeUploadSelect(event, type) {
  10843. // const loading = this.openLoading();
  10844. var file = event.target.files[0];
  10845. var credentials = {
  10846. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10847. secretAccessKey: "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",
  10848. }; //秘钥形式的登录上传
  10849. window.AWS.config.update(credentials);
  10850. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10851. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10852. var _this = this;
  10853. if (file) {
  10854. var params = {
  10855. Key:
  10856. file.name.split(".")[0] +
  10857. new Date().getTime() +
  10858. "." +
  10859. file.name.split(".")[file.name.split(".").length - 1],
  10860. ContentType: file.type,
  10861. Body: file,
  10862. "Access-Control-Allow-Credentials": "*",
  10863. ACL: "public-read",
  10864. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10865. var options = {
  10866. partSize: 2048 * 1024 * 1024,
  10867. queueSize: 2,
  10868. leavePartsOnError: true,
  10869. };
  10870. bucket
  10871. .upload(params, options)
  10872. .on("httpUploadProgress", function (evt) {
  10873. //这里可以写进度条
  10874. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10875. })
  10876. .send(function (err, data) {
  10877. // loading.close();
  10878. if (err) {
  10879. _this.$message.error("上传失败");
  10880. } else {
  10881. _this.selectJson.url = data.Location;
  10882. console.log(data.Location);
  10883. }
  10884. });
  10885. }
  10886. },
  10887. chooseSysPic(p) {
  10888. this.cover = [];
  10889. setTimeout(() => {
  10890. this.cover[0] = {
  10891. name: "系统图片.png",
  10892. url: p,
  10893. };
  10894. this.imgChange1(null, null, 1, null);
  10895. this.$forceUpdate();
  10896. }, 0);
  10897. this.isSysPic = true;
  10898. this.isSysPic2 = false;
  10899. this.sysPicVisible = false;
  10900. this.$forceUpdate();
  10901. },
  10902. chooseSysPic2(p) {
  10903. this.cover = [];
  10904. setTimeout(() => {
  10905. this.cover[0] = {
  10906. name: "网络图片.png",
  10907. url: p,
  10908. };
  10909. this.imgChange1(null, null, 1, null);
  10910. this.$forceUpdate();
  10911. }, 0);
  10912. this.isSysPic2 = true;
  10913. this.isSysPic = false;
  10914. this.sysPicVisible2 = false;
  10915. this.$forceUpdate();
  10916. },
  10917. beforeUpload(data) {
  10918. this.$refs.upload1.uploadFiles;
  10919. this.uploadLoading1 = true;
  10920. var file = data.file;
  10921. var credentials = {
  10922. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10923. secretAccessKey: "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",
  10924. }; //秘钥形式的登录上传
  10925. window.AWS.config.update(credentials);
  10926. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10927. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10928. var _this = this;
  10929. if (file) {
  10930. var params = {
  10931. Key:
  10932. file.name.split(".")[0] +
  10933. new Date().getTime() +
  10934. "." +
  10935. file.name.split(".")[file.name.split(".").length - 1],
  10936. ContentType: file.type,
  10937. Body: file,
  10938. "Access-Control-Allow-Credentials": "*",
  10939. ACL: "public-read",
  10940. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10941. var options = {
  10942. partSize: 2048 * 1024 * 1024,
  10943. queueSize: 2,
  10944. leavePartsOnError: true,
  10945. };
  10946. bucket
  10947. .upload(params, options)
  10948. .on("httpUploadProgress", function (evt) {
  10949. //这里可以写进度条
  10950. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10951. })
  10952. .send(function (err, data) {
  10953. _this.uploadLoading1 = false;
  10954. if (err) {
  10955. // var a = _this.$refs.upload1.uploadFiles;
  10956. // a.splice(a.length - 1, a.length);
  10957. _this.$message.error("上传失败");
  10958. } else {
  10959. //上传成功处理
  10960. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  10961. name: file.name,
  10962. url: data.Location,
  10963. uid: file.uid,
  10964. });
  10965. _this.imgChange();
  10966. console.log(data.Location);
  10967. }
  10968. });
  10969. }
  10970. },
  10971. onExceed() {
  10972. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  10973. },
  10974. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  10975. let file = "";
  10976. let cfindex2 = 0;
  10977. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10978. // var file = event.target.files[0];
  10979. file = event.target.files[cfindex];
  10980. let fileName = file.name
  10981. let fileUid = file.uid
  10982. // const loading = this.openLoading();
  10983. // var file = event.target.files[0];
  10984. var credentials = {
  10985. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10986. secretAccessKey: "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",
  10987. }; //秘钥形式的登录上传
  10988. window.AWS.config.update(credentials);
  10989. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10990. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10991. var _this = this;
  10992. if (type == 3) {
  10993. var b = [
  10994. "DOC",
  10995. "DOCX",
  10996. "DOCM",
  10997. "DOTM",
  10998. "DOTX",
  10999. "PPTX",
  11000. "PPSX",
  11001. "PPT",
  11002. "PPS",
  11003. "PPTM",
  11004. "POTM",
  11005. "PPAM",
  11006. "POTX",
  11007. "PPSM",
  11008. ];
  11009. if (
  11010. b.indexOf(
  11011. file.name
  11012. .split(".")
  11013. [file.name.split(".").length - 1].toLocaleUpperCase()
  11014. ) != -1
  11015. ) {
  11016. if (file.size / 1024 / 1024 > 80) {
  11017. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11018. this.inputShow = true;
  11019. // var a = _this.$refs.upload1.uploadFiles;
  11020. // a.splice(a.length - 1, a.length);
  11021. // loading.close();
  11022. return;
  11023. }
  11024. } else if (
  11025. file.name
  11026. .split(".")
  11027. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11028. ) {
  11029. if (file.size / 1024 / 1024 > 80) {
  11030. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11031. this.inputShow = true;
  11032. // var a = _this.$refs.upload1.uploadFiles;
  11033. // a.splice(a.length - 1, a.length);
  11034. // loading.close();
  11035. return;
  11036. }
  11037. }
  11038. }
  11039. this.inputShow = false;
  11040. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11041. // itemTaskIndex
  11042. // ].progress = 0;
  11043. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11044. itemTaskIndex
  11045. ].proVisible = true;
  11046. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11047. itemTaskIndex
  11048. ].isFinishSize = 0;
  11049. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11050. itemTaskIndex
  11051. ].isAllSize = event.target.files.length;
  11052. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11053. // itemTaskIndex
  11054. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11055. _this.$forceUpdate();
  11056. if (file) {
  11057. var params = {
  11058. Key:
  11059. file.name.split(".")[0] +
  11060. new Date().getTime() +
  11061. "." +
  11062. file.name.split(".")[file.name.split(".").length - 1],
  11063. ContentType: file.type,
  11064. Body: file,
  11065. "Access-Control-Allow-Credentials": "*",
  11066. ACL: "public-read",
  11067. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11068. var options = {
  11069. partSize: 2048 * 1024 * 1024,
  11070. queueSize: 2,
  11071. leavePartsOnError: true,
  11072. };
  11073. bucket
  11074. .upload(params, options)
  11075. .on("httpUploadProgress", function (evt) {
  11076. //这里可以写进度条
  11077. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11078. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11079. // itemTaskIndex
  11080. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  11081. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11082. // itemTaskIndex
  11083. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11084. // _this.$forceUpdate();
  11085. })
  11086. .send(function (err, data) {
  11087. cfindex2++
  11088. // loading.close();
  11089. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11090. // itemTaskIndex
  11091. // ].progress = 100;
  11092. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11093. itemTaskIndex
  11094. ].isFinishSize = cfindex2
  11095. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11096. // itemTaskIndex
  11097. // ].isAllSize;
  11098. _this.$forceUpdate();
  11099. setTimeout(() => {
  11100. if (
  11101. cfindex2 == event.target.files.length ||
  11102. cfindex2 > event.target.files.length
  11103. ) {
  11104. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11105. itemTaskIndex
  11106. ].proVisible = false;
  11107. }
  11108. _this.$forceUpdate();
  11109. }, 1000);
  11110. _this.inputShow = true;
  11111. if (err) {
  11112. // var a = _this.$refs.upload1.uploadFiles;
  11113. // a.splice(a.length - 1, a.length);
  11114. _this.$message.error("上传失败");
  11115. } else {
  11116. if (type == 13) {
  11117. let _type = 2;
  11118. var imgA = [
  11119. "png",
  11120. "jpg",
  11121. "jpeg",
  11122. "bmp",
  11123. "gif",
  11124. "webp",
  11125. "psd",
  11126. "svg",
  11127. "tiff",
  11128. ];
  11129. var fileA = [
  11130. "PDF",
  11131. "DOC",
  11132. "DOCX",
  11133. "DOCM",
  11134. "DOTM",
  11135. "DOTX",
  11136. "PPTX",
  11137. "PPSX",
  11138. "PPT",
  11139. "PPS",
  11140. "PPTM",
  11141. "POTM",
  11142. "PPAM",
  11143. "POTX",
  11144. "PPSM",
  11145. "XLSX",
  11146. "XLS",
  11147. ];
  11148. var videoA = [
  11149. "AVI",
  11150. "NAVI",
  11151. "MPEG",
  11152. "ASF",
  11153. "MOV",
  11154. "WMV",
  11155. "3GP",
  11156. "RM",
  11157. "RMVB",
  11158. "FLV",
  11159. "F4V",
  11160. "H.264",
  11161. "H.265",
  11162. "REAL VIDEO",
  11163. "MKV",
  11164. "WebM",
  11165. "HDDVD",
  11166. "MP4",
  11167. "MPG",
  11168. "M4V",
  11169. "MGV",
  11170. "OGV",
  11171. "QTM",
  11172. "STR",
  11173. "AMC",
  11174. "DVX",
  11175. "EVO",
  11176. "DAT",
  11177. "OGG",
  11178. "OGM",
  11179. ];
  11180. if (
  11181. fileA.indexOf(
  11182. data.Location.split(".")[
  11183. data.Location.split(".").length - 1
  11184. ].toLocaleUpperCase()
  11185. ) != -1
  11186. ) {
  11187. _type = 3;
  11188. } else if (
  11189. videoA.indexOf(
  11190. data.Location.split(".")[
  11191. data.Location.split(".").length - 1
  11192. ].toLocaleUpperCase()
  11193. ) != -1
  11194. ) {
  11195. _type = 2;
  11196. } else if (
  11197. imgA.indexOf(
  11198. data.Location.split(".")[
  11199. data.Location.split(".").length - 1
  11200. ].toLocaleLowerCase()
  11201. ) != -1
  11202. ) {
  11203. _type = 13;
  11204. } else {
  11205. _type = 12;
  11206. }
  11207. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11208. itemTaskIndex
  11209. ].chapterData.unshift({
  11210. name: fileName,
  11211. url: data.Location,
  11212. uid: fileUid,
  11213. type: _type,
  11214. });
  11215. _this.imgChange1(null, null, _type, itemTaskIndex);
  11216. } else if (type == 2 || type == 3 || type == 12) {
  11217. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11218. itemTaskIndex
  11219. ].chapterData.unshift({
  11220. name: fileName,
  11221. url: data.Location,
  11222. uid: fileUid,
  11223. type: type,
  11224. });
  11225. _this.imgChange1(null, null, type, itemTaskIndex);
  11226. } else if (type == 4) {
  11227. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11228. itemTaskIndex
  11229. ].fileList1.push({
  11230. name: fileName,
  11231. url: data.Location,
  11232. uid: fileUid,
  11233. });
  11234. _this.imgChange1(null, null, type, itemTaskIndex);
  11235. } else if (type == 5) {
  11236. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11237. itemTaskIndex
  11238. ].homeworkList.push({
  11239. name: fileName,
  11240. url: data.Location,
  11241. uid: fileUid,
  11242. });
  11243. _this.imgChange1(null, null, type, itemTaskIndex);
  11244. }
  11245. console.log(data.Location);
  11246. }
  11247. });
  11248. }
  11249. }
  11250. },
  11251. async beforeUploadInfo2(event, type, tindex) {
  11252. // const loading = this.openLoading();
  11253. let file = "";
  11254. let cfindex2 = 0;
  11255. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  11256. // var file = event.target.files[0];
  11257. file = event.target.files[cfindex];
  11258. let fileName = file.name
  11259. let fileUid = file.uid
  11260. var credentials = {
  11261. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11262. secretAccessKey: "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",
  11263. }; //秘钥形式的登录上传
  11264. window.AWS.config.update(credentials);
  11265. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11266. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11267. var _this = this;
  11268. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  11269. if (
  11270. xianObj.indexOf(
  11271. file.name
  11272. .split(".")
  11273. [file.name.split(".").length - 1].toLocaleUpperCase()
  11274. ) == -1
  11275. ) {
  11276. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  11277. this.inputShow = true;
  11278. // var a = _this.$refs.upload1.uploadFiles;
  11279. // a.splice(a.length - 1, a.length);
  11280. // loading.close();
  11281. return;
  11282. }
  11283. // if (
  11284. // ['DOC'].indexOf(
  11285. // file.name
  11286. // .split(".")
  11287. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11288. // ) !== -1
  11289. // ) {
  11290. // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11291. // this.inputShow = true;
  11292. // return;
  11293. // }
  11294. if (type == 3) {
  11295. var b = [
  11296. "DOC",
  11297. "DOCX",
  11298. "DOCM",
  11299. "DOTM",
  11300. "DOTX",
  11301. "PPTX",
  11302. "PPSX",
  11303. "PPT",
  11304. "PPS",
  11305. "PPTM",
  11306. "POTM",
  11307. "PPAM",
  11308. "POTX",
  11309. "PPSM",
  11310. ];
  11311. if (
  11312. b.indexOf(
  11313. file.name
  11314. .split(".")
  11315. [file.name.split(".").length - 1].toLocaleUpperCase()
  11316. ) != -1
  11317. ) {
  11318. if (file.size / 1024 / 1024 > 80) {
  11319. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11320. this.inputShow = true;
  11321. // var a = _this.$refs.upload1.uploadFiles;
  11322. // a.splice(a.length - 1, a.length);
  11323. // loading.close();
  11324. return;
  11325. }
  11326. } else if (
  11327. file.name
  11328. .split(".")
  11329. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11330. ) {
  11331. if (file.size / 1024 / 1024 > 80) {
  11332. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11333. this.inputShow = true;
  11334. // var a = _this.$refs.upload1.uploadFiles;
  11335. // a.splice(a.length - 1, a.length);
  11336. // loading.close();
  11337. return;
  11338. }
  11339. }
  11340. }
  11341. this.inputShow = false;
  11342. if(type == 14){
  11343. // _this.teacherinfoprogress = 0;
  11344. _this.teacherinfoproVisible = true;
  11345. _this.teacherinfoisFinishSize = 0;
  11346. _this.teacherinfoisAllSize = event.target.files.length;
  11347. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  11348. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11349. }else if(type == 16){
  11350. _this.mubiaoinfoprogress = 0;
  11351. _this.mubiaoinfoproVisible = true;
  11352. _this.mubiaoinfoisFinishSize = 0;
  11353. _this.mubiaoinfoisAllSize = event.target.files.length;
  11354. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  11355. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11356. }else if(type == 17){
  11357. _this.xuanzeinfoprogress = 0;
  11358. _this.xuanzeinfoproVisible = true;
  11359. _this.xuanzeinfoisFinishSize = 0;
  11360. _this.xuanzeinfoisAllSize = event.target.files.length;
  11361. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11362. }else if(type == 18){
  11363. _this.pingjiainfoprogress[tindex] = 0;
  11364. _this.pingjiainfoproVisible[tindex] = true;
  11365. _this.pingjiainfoisFinishSize[tindex] = 0;
  11366. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  11367. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  11368. }else if(type == 19){
  11369. _this.knowinfoprogress = 0;
  11370. _this.knowinfoproVisible = true;
  11371. _this.knowinfoisFinishSize = 0;
  11372. _this.knowinfoisAllSize = event.target.files.length;
  11373. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11374. }else if(type == 20){
  11375. _this.knowinfoprogress2 = 0;
  11376. _this.knowinfoproVisible2 = true;
  11377. _this.knowinfoisFinishSize2 = 0;
  11378. _this.knowinfoisAllSize2 = event.target.files.length;
  11379. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11380. }else{
  11381. _this.infoprogress = 0;
  11382. _this.infoproVisible = true;
  11383. _this.infoisFinishSize = 0;
  11384. _this.infoisAllSize = event.target.files.length;
  11385. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11386. }
  11387. // if (
  11388. // ['DOC'].indexOf(
  11389. // file.name
  11390. // .split(".")
  11391. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11392. // ) !== -1
  11393. // ) {
  11394. // // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11395. // // this.inputShow = true;
  11396. // let params = convertApi.createParams()
  11397. // params.add('file', file)
  11398. // try {
  11399. // let result = await convertApi.convert('doc', 'docx', params);
  11400. // // Get result file URL
  11401. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  11402. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  11403. // });
  11404. // console.log(result)
  11405. // console.log(file)
  11406. // } catch (error) {
  11407. // cfindex2++;
  11408. // if(type == 14){
  11409. // _this.teacherinfoisFinishSize = cfindex2;
  11410. // }else if(type == 16){
  11411. // _this.mubiaoinfoisFinishSize = cfindex2;
  11412. // }else if(type == 17){
  11413. // _this.xuanzeinfoisFinishSize = cfindex2;
  11414. // }else if(type == 18){
  11415. // _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11416. // }else if(type == 19){
  11417. // _this.knowinfoisFinishSize = cfindex2;
  11418. // }else if(type == 20){
  11419. // _this.knowinfoisFinishSize2 = cfindex2;
  11420. // }else {
  11421. // _this.infoisFinishSize = cfindex2;
  11422. // }
  11423. // setTimeout(() => {
  11424. // if (
  11425. // cfindex2 == event.target.files.length ||
  11426. // cfindex2 > event.target.files.length
  11427. // ) {
  11428. // if(type == 14){
  11429. // _this.teacherinfoproVisible = false;
  11430. // }else if(type == 16){
  11431. // _this.mubiaoinfoproVisible = false;
  11432. // }else if(type == 17){
  11433. // _this.xuanzeinfoproVisible = false;
  11434. // }else if(type == 18){
  11435. // _this.pingjiainfoproVisible[tindex] = false;
  11436. // }else if(type == 19){
  11437. // _this.knowinfoproVisible = false;
  11438. // }else if(type == 20){
  11439. // _this.knowinfoproVisible2 = false;
  11440. // }else{
  11441. // _this.infoproVisible = false;
  11442. // }
  11443. // }
  11444. // _this.$forceUpdate();
  11445. // }, 1000);
  11446. // _this.inputShow = true;
  11447. // _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11448. // // 捕捉到这个convertApi.convert报错就不要往下走了
  11449. // return; // 直接返回,不继续执行后续代码
  11450. // }
  11451. // // return;
  11452. // }
  11453. _this.$forceUpdate();
  11454. if (file) {
  11455. var params = {
  11456. Key:
  11457. file.name.split(".")[0] +
  11458. new Date().getTime() +
  11459. "." +
  11460. file.name.split(".")[file.name.split(".").length - 1],
  11461. ContentType: file.type,
  11462. Body: file,
  11463. "Access-Control-Allow-Credentials": "*",
  11464. ACL: "public-read",
  11465. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11466. var options = {
  11467. partSize: 2048 * 1024 * 1024,
  11468. queueSize: 2,
  11469. leavePartsOnError: true,
  11470. };
  11471. bucket
  11472. .upload(params, options)
  11473. .on("httpUploadProgress", function (evt) {
  11474. //这里可以写进度条
  11475. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11476. // if(type == 14){
  11477. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11478. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11479. // }else if(type == 16){
  11480. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11481. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11482. // }else if(type == 17){
  11483. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11484. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11485. // }else if(type == 18){
  11486. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  11487. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  11488. // }else {
  11489. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  11490. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11491. // }
  11492. _this.$forceUpdate();
  11493. })
  11494. .send(async function (err, data) {
  11495. // loading.close();
  11496. // if(type == 14){
  11497. // _this.teacherinfoprogress = 100;
  11498. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  11499. // }else if(type == 16){
  11500. // _this.mubiaoinfoprogress = 100;
  11501. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  11502. // }else if(type == 17){
  11503. // _this.xuanzeinfoprogress = 100;
  11504. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  11505. // }else if(type == 18){
  11506. // _this.pingjiainfoprogress[tindex] = 100;
  11507. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  11508. // }else {
  11509. // _this.infoprogress = 100;
  11510. // _this.infoisFinishSize = _this.infoisAllSize;
  11511. // }
  11512. _this.$forceUpdate();
  11513. _this.inputShow = true;
  11514. if (err) {
  11515. cfindex2++;
  11516. if(type == 14){
  11517. _this.teacherinfoisFinishSize = cfindex2;
  11518. }else if(type == 16){
  11519. _this.mubiaoinfoisFinishSize = cfindex2;
  11520. }else if(type == 17){
  11521. _this.xuanzeinfoisFinishSize = cfindex2;
  11522. }else if(type == 18){
  11523. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11524. }else if(type == 19){
  11525. _this.knowinfoisFinishSize = cfindex2;
  11526. }else if(type == 20){
  11527. _this.knowinfoisFinishSize2 = cfindex2;
  11528. }else {
  11529. _this.infoisFinishSize = cfindex2;
  11530. }
  11531. setTimeout(() => {
  11532. if (
  11533. cfindex2 == event.target.files.length ||
  11534. cfindex2 > event.target.files.length
  11535. ) {
  11536. if(type == 14){
  11537. _this.teacherinfoproVisible = false;
  11538. }else if(type == 16){
  11539. _this.mubiaoinfoproVisible = false;
  11540. }else if(type == 17){
  11541. _this.xuanzeinfoproVisible = false;
  11542. }else if(type == 18){
  11543. _this.pingjiainfoproVisible[tindex] = false;
  11544. }else if(type == 19){
  11545. _this.knowinfoproVisible = false;
  11546. }else if(type == 20){
  11547. _this.knowinfoproVisible2 = false;
  11548. }else{
  11549. _this.infoproVisible = false;
  11550. }
  11551. }
  11552. _this.$forceUpdate();
  11553. }, 1000);
  11554. // var a = _this.$refs.upload1.uploadFiles;
  11555. // a.splice(a.length - 1, a.length);
  11556. _this.$message.error("上传失败");
  11557. } else {
  11558. let fileid = await _this.createFileid(data.Location)
  11559. if(fileid){
  11560. cfindex2++;
  11561. if(type == 14){
  11562. _this.teacherinfoisFinishSize = cfindex2;
  11563. }else if(type == 16){
  11564. _this.mubiaoinfoisFinishSize = cfindex2;
  11565. }else if(type == 17){
  11566. _this.xuanzeinfoisFinishSize = cfindex2;
  11567. }else if(type == 18){
  11568. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11569. }else if(type == 19){
  11570. _this.knowinfoisFinishSize = cfindex2;
  11571. }else if(type == 20){
  11572. _this.knowinfoisFinishSize2 = cfindex2;
  11573. }else {
  11574. _this.infoisFinishSize = cfindex2;
  11575. }
  11576. if (
  11577. cfindex2 == event.target.files.length ||
  11578. cfindex2 > event.target.files.length
  11579. ) {
  11580. if(type == 14){
  11581. _this.teacherinfoproVisible = false;
  11582. }else if(type == 16){
  11583. _this.mubiaoinfoproVisible = false;
  11584. }else if(type == 17){
  11585. _this.xuanzeinfoproVisible = false;
  11586. }else if(type == 18){
  11587. _this.pingjiainfoproVisible[tindex] = false;
  11588. }else if(type == 19){
  11589. _this.knowinfoproVisible = false;
  11590. }else if(type == 20){
  11591. _this.knowinfoproVisible2 = false;
  11592. }else{
  11593. _this.infoproVisible = false;
  11594. }
  11595. }
  11596. _this.$forceUpdate();
  11597. }
  11598. if(fileid == 1){
  11599. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  11600. return;
  11601. }
  11602. var imgA = [
  11603. "png",
  11604. "jpg",
  11605. "jpeg",
  11606. "bmp",
  11607. "gif",
  11608. "webp",
  11609. "psd",
  11610. "svg",
  11611. "tiff",
  11612. ];
  11613. var fileA = [
  11614. "PDF",
  11615. "DOC",
  11616. "DOCX",
  11617. "DOCM",
  11618. "DOTM",
  11619. "DOTX",
  11620. "PPTX",
  11621. "PPSX",
  11622. "PPT",
  11623. "PPS",
  11624. "PPTM",
  11625. "POTM",
  11626. "PPAM",
  11627. "POTX",
  11628. "PPSM",
  11629. "XLSX",
  11630. "XLS",
  11631. ];
  11632. var videoA = [
  11633. "AVI",
  11634. "NAVI",
  11635. "MPEG",
  11636. "ASF",
  11637. "MOV",
  11638. "WMV",
  11639. "3GP",
  11640. "RM",
  11641. "RMVB",
  11642. "FLV",
  11643. "F4V",
  11644. "H.264",
  11645. "H.265",
  11646. "REAL VIDEO",
  11647. "MKV",
  11648. "WebM",
  11649. "HDDVD",
  11650. "MP4",
  11651. "MPG",
  11652. "M4V",
  11653. "MGV",
  11654. "OGV",
  11655. "QTM",
  11656. "STR",
  11657. "AMC",
  11658. "DVX",
  11659. "EVO",
  11660. "DAT",
  11661. "OGG",
  11662. "OGM",
  11663. ];
  11664. let _type = 2;
  11665. if (
  11666. fileA.indexOf(
  11667. data.Location.split(".")[
  11668. data.Location.split(".").length - 1
  11669. ].toLocaleUpperCase()
  11670. ) != -1
  11671. ) {
  11672. _type = 3;
  11673. } else if (
  11674. videoA.indexOf(
  11675. data.Location.split(".")[
  11676. data.Location.split(".").length - 1
  11677. ].toLocaleUpperCase()
  11678. ) != -1
  11679. ) {
  11680. _type = 2;
  11681. } else if (
  11682. imgA.indexOf(
  11683. data.Location.split(".")[
  11684. data.Location.split(".").length - 1
  11685. ].toLocaleLowerCase()
  11686. ) != -1
  11687. ) {
  11688. _type = 13;
  11689. } else {
  11690. _type = 12;
  11691. }
  11692. if (type == 13) {
  11693. _this.infoData.push({
  11694. name: fileName,
  11695. url: data.Location,
  11696. uid: fileUid,
  11697. type: _type,
  11698. fileid: fileid == 1 ? '' : fileid,
  11699. });
  11700. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11701. name: fileName,
  11702. url: data.Location,
  11703. uid: fileUid,
  11704. type: _type,
  11705. fileid: fileid == 1 ? '' : fileid,
  11706. })
  11707. }else if (type == 14) {
  11708. _this.teacherInfoData.push({
  11709. name: fileName,
  11710. url: data.Location,
  11711. uid: fileUid,
  11712. type: _type,
  11713. fileid: fileid == 1 ? '' : fileid,
  11714. });
  11715. _this.infoData2.push({
  11716. name: fileName,
  11717. url: data.Location,
  11718. uid: fileUid,
  11719. type: _type,
  11720. fileid: fileid == 1 ? '' : fileid,
  11721. });
  11722. _this.infoData.push({
  11723. name: fileName,
  11724. url: data.Location,
  11725. uid: fileUid,
  11726. type: _type,
  11727. fileid: fileid == 1 ? '' : fileid,
  11728. });
  11729. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11730. name: fileName,
  11731. url: data.Location,
  11732. uid: fileUid,
  11733. type: _type,
  11734. fileid: fileid == 1 ? '' : fileid,
  11735. })
  11736. }else if (type == 15) {
  11737. _this.infoData2.push({
  11738. name: fileName,
  11739. url: data.Location,
  11740. uid: fileUid,
  11741. type: _type,
  11742. fileid: fileid == 1 ? '' : fileid,
  11743. });
  11744. _this.infoData.push({
  11745. name: fileName,
  11746. url: data.Location,
  11747. uid: fileUid,
  11748. type: _type,
  11749. fileid: fileid == 1 ? '' : fileid,
  11750. });
  11751. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11752. name: fileName,
  11753. url: data.Location,
  11754. uid: fileUid,
  11755. type: _type,
  11756. fileid: fileid == 1 ? '' : fileid,
  11757. })
  11758. }else if (type == 16) {
  11759. _this.mubiaoInfoData.push({
  11760. name: fileName,
  11761. url: data.Location,
  11762. uid: fileUid,
  11763. type: _type,
  11764. fileid: fileid == 1 ? '' : fileid,
  11765. });
  11766. }else if (type == 17) {
  11767. _this.xuanzeInfoData.push({
  11768. name: fileName,
  11769. url: data.Location,
  11770. uid: fileUid,
  11771. type: _type,
  11772. fileid: fileid == 1 ? '' : fileid,
  11773. });
  11774. }else if (type == 18) {
  11775. if(!_this.pingjiaInfoData[tindex]){
  11776. _this.pingjiaInfoData[tindex] = []
  11777. }
  11778. _this.pingjiaInfoData[tindex].push({
  11779. name: fileName,
  11780. url: data.Location,
  11781. uid: fileUid,
  11782. type: _type,
  11783. fileid: fileid == 1 ? '' : fileid,
  11784. });
  11785. }else if (type == 19) {
  11786. _this.knowInfoData.push({
  11787. name: fileName,
  11788. url: data.Location,
  11789. uid: fileUid,
  11790. type: _type,
  11791. fileid: fileid == 1 ? '' : fileid,
  11792. });
  11793. if(fileid != 1){
  11794. _this.knowFileids.push(fileid)
  11795. }
  11796. }else if (type == 20) {
  11797. _this.knowInfoData2.push({
  11798. name: fileName,
  11799. url: data.Location,
  11800. uid: fileUid,
  11801. type: _type,
  11802. fileid: fileid == 1 ? '' : fileid,
  11803. });
  11804. if(fileid != 1){
  11805. _this.knowFileids2.push(fileid)
  11806. }
  11807. }
  11808. console.log(data.Location);
  11809. console.log(fileName,'----------',fileid);
  11810. }
  11811. });
  11812. }
  11813. }
  11814. },
  11815. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  11816. // const loading = this.openLoading();
  11817. var file = event.target.files[0];
  11818. var credentials = {
  11819. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11820. secretAccessKey: "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",
  11821. }; //秘钥形式的登录上传
  11822. window.AWS.config.update(credentials);
  11823. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11824. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11825. var _this = this;
  11826. if (type == 3) {
  11827. var b = [
  11828. "DOC",
  11829. "DOCX",
  11830. "DOCM",
  11831. "DOTM",
  11832. "DOTX",
  11833. "PPTX",
  11834. "PPSX",
  11835. "PPT",
  11836. "PPS",
  11837. "PPTM",
  11838. "POTM",
  11839. "PPAM",
  11840. "POTX",
  11841. "PPSM",
  11842. ];
  11843. if (
  11844. b.indexOf(
  11845. file.name
  11846. .split(".")
  11847. [file.name.split(".").length - 1].toLocaleUpperCase()
  11848. ) != -1
  11849. ) {
  11850. if (file.size / 1024 / 1024 > 80) {
  11851. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11852. this.inputShow = true;
  11853. // var a = _this.$refs.upload1.uploadFiles;
  11854. // a.splice(a.length - 1, a.length);
  11855. // loading.close();
  11856. return;
  11857. }
  11858. } else if (
  11859. file.name
  11860. .split(".")
  11861. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11862. ) {
  11863. if (file.size / 1024 / 1024 > 80) {
  11864. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11865. this.inputShow = true;
  11866. // var a = _this.$refs.upload1.uploadFiles;
  11867. // a.splice(a.length - 1, a.length);
  11868. // loading.close();
  11869. return;
  11870. }
  11871. }
  11872. }
  11873. this.inputShow = false;
  11874. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11875. itemTaskIndex
  11876. ].progress = 0;
  11877. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11878. itemTaskIndex
  11879. ].proVisible = true;
  11880. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11881. itemTaskIndex
  11882. ].isFinishSize = 0;
  11883. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11884. itemTaskIndex
  11885. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11886. _this.$forceUpdate();
  11887. if (file) {
  11888. var params = {
  11889. Key:
  11890. file.name.split(".")[0] +
  11891. new Date().getTime() +
  11892. "." +
  11893. file.name.split(".")[file.name.split(".").length - 1],
  11894. ContentType: file.type,
  11895. Body: file,
  11896. "Access-Control-Allow-Credentials": "*",
  11897. ACL: "public-read",
  11898. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11899. var options = {
  11900. partSize: 2048 * 1024 * 1024,
  11901. queueSize: 2,
  11902. leavePartsOnError: true,
  11903. };
  11904. bucket
  11905. .upload(params, options)
  11906. .on("httpUploadProgress", function (evt) {
  11907. //这里可以写进度条
  11908. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11909. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11910. itemTaskIndex
  11911. ].progress = parseInt((evt.loaded / evt.total) * 100);
  11912. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11913. itemTaskIndex
  11914. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11915. _this.$forceUpdate();
  11916. })
  11917. .send(function (err, data) {
  11918. // loading.close();
  11919. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11920. itemTaskIndex
  11921. ].progress = 100;
  11922. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11923. itemTaskIndex
  11924. ].isFinishSize =
  11925. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11926. itemTaskIndex
  11927. ].isAllSize;
  11928. _this.$forceUpdate();
  11929. setTimeout(() => {
  11930. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11931. itemTaskIndex
  11932. ].proVisible = false;
  11933. _this.$forceUpdate();
  11934. }, 1000);
  11935. _this.inputShow = true;
  11936. if (err) {
  11937. // var a = _this.$refs.upload1.uploadFiles;
  11938. // a.splice(a.length - 1, a.length);
  11939. _this.$message.error("上传失败");
  11940. } else {
  11941. if (type == 2 || type == 3) {
  11942. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11943. itemTaskIndex
  11944. ].chapterData.unshift({
  11945. name: file.name,
  11946. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11947. // itemTaskIndex
  11948. // ].chapterData.length+1),
  11949. url: data.Location,
  11950. uid: file.uid,
  11951. type: type,
  11952. text: string,
  11953. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11954. // itemTaskIndex
  11955. // ].chapterData.length + 1),
  11956. });
  11957. _this.imgChange1(null, null, type, itemTaskIndex);
  11958. } else if (type == 4) {
  11959. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11960. itemTaskIndex
  11961. ].fileList1.push({
  11962. name: file.name,
  11963. url: data.Location,
  11964. uid: file.uid,
  11965. });
  11966. _this.imgChange1(null, null, type, itemTaskIndex);
  11967. } else if (type == 5) {
  11968. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11969. itemTaskIndex
  11970. ].homeworkList.push({
  11971. name: file.name,
  11972. url: data.Location,
  11973. uid: file.uid,
  11974. });
  11975. _this.imgChange1(null, null, type, itemTaskIndex);
  11976. }
  11977. console.log(data.Location);
  11978. }
  11979. });
  11980. }
  11981. },
  11982. addunit() {
  11983. this.unitJson.push({
  11984. dyName: "", //单元标题
  11985. isUpdate: 1,
  11986. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  11987. chapterInfo: [
  11988. {
  11989. isread: false,
  11990. chapterid: this.guid(),
  11991. title: "",
  11992. courseName: "",
  11993. taskJson: [
  11994. {
  11995. task: "",
  11996. taskDetail: "",
  11997. chapterData: [],
  11998. toolText: "",
  11999. toolChoose: [
  12000. {
  12001. tool: [],
  12002. toolDetail: "",
  12003. toolType: 0,
  12004. askCount: 1,
  12005. askTitle: "",
  12006. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12007. },
  12008. ],
  12009. isShowTools: false,
  12010. askCount: 1,
  12011. isFold: 1,
  12012. askTitle: "",
  12013. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12014. checkJson: [{ checkCount: [], checkPerent: [] }],
  12015. homeworkList: [],
  12016. },
  12017. ],
  12018. itemCount: 1,
  12019. fileList1: [],
  12020. video: [],
  12021. testData: [],
  12022. pData: [],
  12023. templateArray: [],
  12024. },
  12025. ],
  12026. });
  12027. this.addindex = this.unitJson.length - 1;
  12028. setTimeout(() => {
  12029. this.unitIndex = this.unitJson.length - 1;
  12030. setTimeout(() => {
  12031. console.log(this.$refs.dyInput);
  12032. this.$refs.dyInput[0].focus();
  12033. }, 100);
  12034. this.unitSet(this.unitIndex);
  12035. }, 0);
  12036. },
  12037. addToolFun(itemTaskIndex) {
  12038. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12039. itemTaskIndex
  12040. ].toolChoose.push({
  12041. tool: [],
  12042. toolDetail: "",
  12043. toolType: 0,
  12044. askCount: 1,
  12045. askTitle: "",
  12046. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12047. });
  12048. },
  12049. addTaskBorder() {
  12050. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  12051. task: "",
  12052. taskDetail: "",
  12053. chapterData: [],
  12054. toolText: "",
  12055. toolChoose: [
  12056. {
  12057. tool: [],
  12058. toolDetail: "",
  12059. toolType: 0,
  12060. askCount: 1,
  12061. askTitle: "",
  12062. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12063. },
  12064. ],
  12065. isShowTools: false,
  12066. askCount: 1,
  12067. isFold: 1, //任务收起状态
  12068. askTitle: "",
  12069. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12070. checkJson: [{ checkCount: [], checkPerent: [] }],
  12071. homeworkList: [],
  12072. });
  12073. setTimeout(() => {
  12074. this.checkEva(this.checkId);
  12075. setTimeout(() => {
  12076. this.checkEva(this.checkId);
  12077. }, 100);
  12078. }, 100);
  12079. },
  12080. addTaskBorder2(type, index) {
  12081. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  12082. this.$message({
  12083. message: "有大纲在生成请生成完之后才能使用此功能",
  12084. type: "warning"
  12085. });
  12086. return;
  12087. }
  12088. if(type == 1){
  12089. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  12090. task: "",
  12091. isTask2: true,
  12092. isTask3: true,
  12093. taskDetail: "",
  12094. chapterData: [],
  12095. toolText: "",
  12096. toolChoose: [
  12097. {
  12098. tool: [],
  12099. toolDetail: "",
  12100. toolType: 0,
  12101. askCount: 1,
  12102. askTitle: "",
  12103. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12104. },
  12105. ],
  12106. isShowTools: false,
  12107. askCount: 1,
  12108. isFold: 0, //任务收起状态
  12109. askTitle: "",
  12110. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12111. checkJson: [{ checkCount: [], checkPerent: [] }],
  12112. homeworkList: [],
  12113. })
  12114. }else if(type == 2){
  12115. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  12116. task: "",
  12117. isTask2: true,
  12118. isTask3: true,
  12119. taskDetail: "",
  12120. chapterData: [],
  12121. toolText: "",
  12122. toolChoose: [
  12123. {
  12124. tool: [],
  12125. toolDetail: "",
  12126. toolType: 0,
  12127. askCount: 1,
  12128. askTitle: "",
  12129. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12130. },
  12131. ],
  12132. isShowTools: false,
  12133. askCount: 1,
  12134. isFold: 0, //任务收起状态
  12135. askTitle: "",
  12136. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12137. checkJson: [{ checkCount: [], checkPerent: [] }],
  12138. homeworkList: [],
  12139. })
  12140. }
  12141. setTimeout(() => {
  12142. this.checkEva(this.checkId);
  12143. setTimeout(() => {
  12144. this.checkEva(this.checkId);
  12145. }, 100);
  12146. }, 100);
  12147. },
  12148. add(e, i) {
  12149. var el = e.currentTarget;
  12150. el.getElementsByTagName("input")[0].click();
  12151. },
  12152. fold(i, e) {
  12153. if (
  12154. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  12155. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  12156. ) {
  12157. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  12158. } else {
  12159. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  12160. }
  12161. },
  12162. fold2(i) {
  12163. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  12164. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12165. i
  12166. ].isFold2 = false;
  12167. } else {
  12168. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  12169. }
  12170. this.$forceUpdate();
  12171. },
  12172. foldEva(i) {
  12173. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  12174. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12175. i
  12176. ].isEvaFold = false;
  12177. } else {
  12178. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12179. i
  12180. ].isEvaFold = true;
  12181. setTimeout(() => {
  12182. this.checkEva(this.checkId);
  12183. setTimeout(() => {
  12184. this.checkEva(this.checkId);
  12185. }, 500);
  12186. }, 0);
  12187. }
  12188. this.$forceUpdate();
  12189. },
  12190. foldC(i) {
  12191. if (
  12192. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  12193. ) {
  12194. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12195. i
  12196. ].isFoldchapter = false;
  12197. } else {
  12198. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12199. i
  12200. ].isFoldchapter = true;
  12201. }
  12202. this.$forceUpdate();
  12203. },
  12204. fold3(i, ti) {
  12205. if (
  12206. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  12207. .isFold3
  12208. ) {
  12209. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12210. ti
  12211. ].isFold3 = false;
  12212. } else {
  12213. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12214. ti
  12215. ].isFold3 = true;
  12216. }
  12217. this.$forceUpdate();
  12218. },
  12219. deleteHomeworkBox(unitIndex, index, i) {
  12220. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  12221. this.taskCount
  12222. ].homeworkList.splice(i, 1);
  12223. },
  12224. getStudent() {
  12225. let params = {
  12226. oid: this.oid,
  12227. cu: "",
  12228. cn: this.searchPeople,
  12229. };
  12230. this.ajax
  12231. .get(this.$store.state.api + "selectStudentAdd", params)
  12232. .then((res) => {
  12233. this.studentJuri = res.data[0];
  12234. })
  12235. .catch((err) => {
  12236. this.isLoading = false;
  12237. console.error(err);
  12238. });
  12239. },
  12240. // 添加协同成员其他选项按钮
  12241. getTeacherCopy(){
  12242. this.CollLoading=true
  12243. this.collid = ''
  12244. this.collid = '1xpz'
  12245. let params = {
  12246. oid:
  12247. this.org && this.org != "undefined" && this.org != "null"
  12248. ? this.org
  12249. : this.oid,
  12250. cu: "",
  12251. cn: this.searchTN,
  12252. coll: ''
  12253. };
  12254. this.ajax
  12255. .get(
  12256. this.$store.state.api +
  12257. (this.org && this.org != "undefined" && this.org != "null"
  12258. ? "selectCollaborativeMembersOrg"
  12259. : "selectCollaborativeMembers"),
  12260. params
  12261. )
  12262. .then((res) => {
  12263. let teacherJuri = res.data[0];
  12264. this.CollaborativeTeaList = res.data[1];
  12265. for (var i = 0; i < teacherJuri.length; i++) {
  12266. if (teacherJuri[i].userid == this.userid) {
  12267. teacherJuri.splice(i, 1);
  12268. break;
  12269. }
  12270. }
  12271. this.teacherJuri = teacherJuri.filter((i,index)=>{
  12272. return (i.cclassid == '' || i.cclassid == null)
  12273. })
  12274. console.log(' this.teacherJuri', this.teacherJuri);
  12275. let _check = [];
  12276. let _check2 = [];
  12277. for (var i = 0; i < this.teacherJuri.length; i++) {
  12278. var gid = this.teacherJuri[i].userid;
  12279. _check.push(gid);
  12280. }
  12281. for (var i = 0; i < this.checkboxList3.length; i++) {
  12282. var _id = this.checkboxList3[i];
  12283. if (_check.indexOf(_id) !== -1) {
  12284. _check2.push(_id);
  12285. }
  12286. }
  12287. if (_check2.length==0 && _check.length==0) {
  12288. }else{
  12289. this.checkAll2 = _check2.length === _check.length;
  12290. }
  12291. this.CollLoading=false
  12292. })
  12293. .catch((err) => {
  12294. console.error(err);
  12295. this.CollLoading=false
  12296. });
  12297. },
  12298. getTeacher(val) {
  12299. this.CollLoading=true
  12300. this.collid = ''
  12301. this.collid = !val ? '' : val
  12302. let params = {
  12303. oid:
  12304. this.org && this.org != "undefined" && this.org != "null"
  12305. ? this.org
  12306. : this.oid,
  12307. cu: "",
  12308. cn: this.searchTN,
  12309. coll: this.collid
  12310. };
  12311. this.ajax
  12312. .get(
  12313. this.$store.state.api +
  12314. (this.org && this.org != "undefined" && this.org != "null"
  12315. ? "selectCollaborativeMembersOrg"
  12316. : "selectCollaborativeMembers"),
  12317. params
  12318. )
  12319. .then((res) => {
  12320. let teacherJuri = res.data[0];
  12321. this.CollaborativeTeaList = res.data[1];
  12322. for (var i = 0; i < teacherJuri.length; i++) {
  12323. if (teacherJuri[i].userid == this.userid) {
  12324. teacherJuri.splice(i, 1);
  12325. break;
  12326. }
  12327. }
  12328. this.teacherJuri = teacherJuri;
  12329. let _check = [];
  12330. let _check2 = [];
  12331. for (var i = 0; i < this.teacherJuri.length; i++) {
  12332. var gid = this.teacherJuri[i].userid;
  12333. _check.push(gid);
  12334. }
  12335. for (var i = 0; i < this.checkboxList3.length; i++) {
  12336. var _id = this.checkboxList3[i];
  12337. if (_check.indexOf(_id) !== -1) {
  12338. _check2.push(_id);
  12339. }
  12340. }
  12341. if (_check2.length==0 && _check.length==0) {
  12342. }else{
  12343. this.checkAll2 = _check2.length === _check.length;
  12344. }
  12345. this.CollLoading=false
  12346. })
  12347. .catch((err) => {
  12348. console.error(err);
  12349. this.CollLoading=false
  12350. });
  12351. },
  12352. searchStudent() {
  12353. this.getStudent();
  12354. },
  12355. selectGrage() {
  12356. let params = {
  12357. oid: this.oid,
  12358. };
  12359. this.ajax
  12360. .get(this.$store.state.api + "selectGrageBySchool", params)
  12361. .then((res) => {
  12362. this.gradeList = res.data[0];
  12363. })
  12364. .catch((err) => {
  12365. this.isLoading = false;
  12366. console.error(err);
  12367. });
  12368. },
  12369. //获取班级列表
  12370. getClass() {
  12371. let params = {
  12372. oid: this.oid,
  12373. gid: this.gradeId,
  12374. cn: this.classSearch,
  12375. };
  12376. this.ajax
  12377. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  12378. .then((res) => {
  12379. if (!this.grade.length) {
  12380. this.grade = res.data[0];
  12381. }
  12382. this.grade2 = res.data[0];
  12383. this.classJuri = res.data[0];
  12384. let _check = [];
  12385. let _check2 = [];
  12386. for (var i = 0; i < this.grade2.length; i++) {
  12387. var gid = this.grade2[i].id;
  12388. _check.push(gid);
  12389. }
  12390. for (var i = 0; i < this.checkboxList2.length; i++) {
  12391. var _id = this.checkboxList2[i];
  12392. if (_check.indexOf(_id) !== -1) {
  12393. _check2.push(_id);
  12394. }
  12395. }
  12396. this.checkAll = _check2.length === _check.length;
  12397. })
  12398. .catch((err) => {
  12399. this.isLoading = false;
  12400. console.error(err);
  12401. });
  12402. },
  12403. CourseType2Change(val) {
  12404. this.pTypeCheck = [];
  12405. for (var i = 0; i < this.CourseType2.length; i++) {
  12406. let typeA = this.CourseType2[i];
  12407. if (val.indexOf(typeA.name) != -1) {
  12408. this.pTypeCheck.push(...typeA.id);
  12409. }
  12410. }
  12411. },
  12412. arrayToArray(arrayo, arrayt) {
  12413. let array1 = arrayo;
  12414. let array2 = arrayt;
  12415. let commonElements = [];
  12416. for (let i = 0; i < array1.length; i++) {
  12417. for (let j = 0; j < array2.length; j++) {
  12418. if (array1[i] === array2[j]) {
  12419. commonElements.push(array1[i]);
  12420. }
  12421. }
  12422. }
  12423. return commonElements;
  12424. },
  12425. typeChange(){
  12426. let courseInfo = ``
  12427. let sub = []
  12428. let mclass = []
  12429. let theme = []
  12430. if (this.courseTypeId.length) {
  12431. for (var i = 0; i < this.courseTypeId.length; i++) {
  12432. let _sid = this.courseTypeId[i]
  12433. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12434. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  12435. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  12436. }
  12437. }
  12438. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12439. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  12440. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  12441. }
  12442. }
  12443. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12444. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  12445. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  12446. }
  12447. }
  12448. }
  12449. }
  12450. sub = JSON.parse(converter(JSON.stringify(sub)))
  12451. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  12452. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  12453. let _file = this.knowFileArray[fi]
  12454. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  12455. let fileS = _file.name ? converter(_file.name).split('/') : 1
  12456. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  12457. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  12458. let fileids = this.knowInfoData.map((item) => item.fileid)
  12459. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12460. this.knowInfoData.push({
  12461. name: _file.filename,
  12462. url: _file.url,
  12463. uid: '',
  12464. type: 3,
  12465. fileid: _file.fileid,
  12466. });
  12467. this.knowFileids.push(_file.fileid)
  12468. }
  12469. fileids = this.knowInfoData.map((item) => item.fileid)
  12470. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12471. this.knowInfoData.push({
  12472. name: _file.filename,
  12473. url: _file.url,
  12474. uid: '',
  12475. type: 3,
  12476. fileid: _file.fileid,
  12477. });
  12478. this.knowFileids.push(_file.fileid)
  12479. }
  12480. fileids = this.knowInfoData.map((item) => item.fileid)
  12481. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12482. this.knowInfoData.push({
  12483. name: _file.filename,
  12484. url: _file.url,
  12485. uid: '',
  12486. type: 3,
  12487. fileid: _file.fileid,
  12488. });
  12489. this.knowFileids.push(_file.fileid)
  12490. }
  12491. fileids = this.knowInfoData.map((item) => item.fileid)
  12492. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12493. this.knowInfoData.push({
  12494. name: _file.filename,
  12495. url: _file.url,
  12496. uid: '',
  12497. type: 3,
  12498. fileid: _file.fileid,
  12499. });
  12500. this.knowFileids.push(_file.fileid)
  12501. }
  12502. fileids = this.knowInfoData.map((item) => item.fileid)
  12503. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  12504. this.knowInfoData.push({
  12505. name: _file.filename,
  12506. url: _file.url,
  12507. uid: '',
  12508. type: 3,
  12509. fileid: _file.fileid,
  12510. });
  12511. this.knowFileids.push(_file.fileid)
  12512. }
  12513. }
  12514. if(mclass.length){
  12515. courseInfo += `年级:${mclass.join(',')} `
  12516. }
  12517. if(sub.length){
  12518. courseInfo += `学科:${sub.join(',')} `
  12519. }
  12520. if(theme.length){
  12521. courseInfo += `主题:${theme.join(',')} `
  12522. }
  12523. this.addCourseBehavior('courseBehavior', `点击选择分类-${courseInfo}`)
  12524. this.typeC1 = this.getTypeC(2)
  12525. this.typeC2 = this.getTypeC(1)
  12526. },
  12527. getChapterData(e, i, j, ic, type) {
  12528. e.stopPropagation();
  12529. this.updataC = true;
  12530. this.icc = ic;
  12531. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  12532. console.log("还不能下载图片喔");
  12533. }
  12534. },
  12535. deleteChapterData(e, i, j, ic, taskI) {
  12536. e.stopPropagation();
  12537. let _this = this;
  12538. _this
  12539. .$confirm("确定删除此项?", "提示", {
  12540. confirmButtonText: "确定",
  12541. cancelButtonText: "取消",
  12542. type: "warning",
  12543. })
  12544. .then(() => {
  12545. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  12546. ic,
  12547. 1
  12548. );
  12549. })
  12550. .catch(() => {
  12551. return;
  12552. });
  12553. },
  12554. checkInfoData(fileid, file){
  12555. let type = 1
  12556. let index = 0
  12557. for(let i = 0; i < this.infoData.length; i++){
  12558. if(this.infoData[i].fileid == fileid){
  12559. type = 2
  12560. index = i
  12561. }
  12562. }
  12563. if(type == 2){
  12564. this.infoData.splice(index, 1)
  12565. }else {
  12566. this.infoData.push({...file})
  12567. }
  12568. },
  12569. checkKnowInfoData(fileid){
  12570. if(this.knowFileids.indexOf(fileid) == -1){
  12571. this.knowFileids.push(fileid)
  12572. }else {
  12573. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  12574. }
  12575. },
  12576. checkKnowInfoData2(fileid){
  12577. if(!fileid){
  12578. return
  12579. }
  12580. if(this.knowFileids2.indexOf(fileid) == -1){
  12581. this.knowFileids2.push(fileid)
  12582. }else {
  12583. this.knowFileids2.splice(this.knowFileids2.indexOf(fileid), 1)
  12584. }
  12585. },
  12586. checkKnowInfoData3(fileid){
  12587. if(this.knowFileids3.indexOf(fileid) == -1){
  12588. this.knowFileids3.push(fileid)
  12589. }else {
  12590. this.knowFileids3.splice(this.knowFileids3.indexOf(fileid), 1)
  12591. }
  12592. },
  12593. checkAllKnowInfoData3(){
  12594. // let array = this.knowInfoData3;
  12595. // if(this.knowFileids3.length === array.length){
  12596. // this.knowFileids3 = []; // 取消全选
  12597. // } else {
  12598. // this.knowFileids3 = array.map(item => item.url); // 全选
  12599. // }
  12600. let files = this.allknowInfoData3();
  12601. let count = 0
  12602. for(var i = 0; i < files.length; i++){
  12603. if(this.knowFileids3.includes(files[i].url)){
  12604. count++
  12605. }
  12606. }
  12607. if (count == files.length) {
  12608. this.knowFileids3 = this.knowFileids3.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12609. } else {
  12610. this.knowFileids3 = [...new Set([...this.knowFileids3, ...files.map(file => file.url)])]; // 全选并添加新文件
  12611. }
  12612. },
  12613. checkAllKnowInfoData2(){
  12614. let array = this.knowInfoData2;
  12615. if(this.knowFileids2.length === array.length){
  12616. this.knowFileids2 = []; // 取消全选
  12617. } else {
  12618. this.knowFileids2 = array.map(item => item.fileid); // 全选
  12619. }
  12620. },
  12621. deleteCheckAllKnowInfoData2(){
  12622. let _this = this;
  12623. _this
  12624. .$confirm("确定删除所选文件么?", "提示", {
  12625. confirmButtonText: "确定",
  12626. cancelButtonText: "取消",
  12627. type: "warning",
  12628. })
  12629. .then(() => {
  12630. _this.knowInfoData2 = _this.knowInfoData2.filter(item => !_this.knowFileids2.includes(item.fileid))
  12631. _this.knowFileids2 = []
  12632. _this.$forceUpdate()
  12633. })
  12634. .catch(() => {
  12635. return;
  12636. });
  12637. },
  12638. checkAppendixFile(url){
  12639. if(this.appendixFiles.indexOf(url) == -1){
  12640. this.appendixFiles.push(url)
  12641. }else {
  12642. this.appendixFiles.splice(this.appendixFiles.indexOf(url), 1)
  12643. }
  12644. },
  12645. checkAllappendixFile(){
  12646. let files = this.allFile();
  12647. let count = 0
  12648. for(var i = 0; i < files.length; i++){
  12649. if(this.appendixFiles.includes(files[i].url)){
  12650. count++
  12651. }
  12652. }
  12653. if (count == files.length) {
  12654. this.appendixFiles = this.appendixFiles.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12655. if(this.appendixTypeCheck == 'all' && this.appendixTaskCheck == 'all'){
  12656. this.appendixFiles = []
  12657. }
  12658. } else {
  12659. this.appendixFiles = [...new Set([...this.appendixFiles, ...files.map(file => file.url)])]; // 全选并添加新文件
  12660. }
  12661. },
  12662. async exportAppendixFiles(){
  12663. let files = this.allFile(2);
  12664. let uploadFile = []
  12665. for(var i = 0; i < files.length; i++){
  12666. if(this.appendixFiles.includes(files[i].url)){
  12667. uploadFile.push(files[i])
  12668. }
  12669. }
  12670. if(!uploadFile.length){
  12671. this.$message.error('请先选需要下载的附件')
  12672. return
  12673. }
  12674. this.appendixLoading = true
  12675. const zip = new JSZip();
  12676. for(var j = 0; j < uploadFile.length; j++){
  12677. let fileZ = uploadFile[j]
  12678. let name = fileZ.name
  12679. let file = await getFile(fileZ.url)
  12680. const file_name = fileZ.name; // 获取文件名
  12681. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  12682. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  12683. // 判断是否有重复的文件名字
  12684. if (!zip.file(file_name)) {
  12685. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  12686. } else {
  12687. // 如果有重复的文件名,则在文件名后添加序号
  12688. let count = 1;
  12689. let newFileName = fileNameWithoutExt;
  12690. while (zip.file(`${newFileName}.${fileExt}`)) {
  12691. newFileName = `${fileNameWithoutExt}(${count})`;
  12692. count++;
  12693. }
  12694. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  12695. }
  12696. // zip.file(`${name}`, file.data, { binary: true })
  12697. }
  12698. zip.generateAsync({ type: "blob" }).then((content) => {
  12699. // 生成二进制流
  12700. saveAs(
  12701. content,
  12702. this.courseName + "-" + "附件.zip"
  12703. ); // 利用file-saver保存文件 自定义文件名
  12704. setTimeout(() => {
  12705. this.appendixLoading = false
  12706. }, 2000);
  12707. });
  12708. },
  12709. deleteInfoData(e, ic) {
  12710. e.stopPropagation();
  12711. let _this = this;
  12712. _this
  12713. .$confirm("确定删除此项?", "提示", {
  12714. confirmButtonText: "确定",
  12715. cancelButtonText: "取消",
  12716. type: "warning",
  12717. })
  12718. .then(() => {
  12719. _this.infoData.splice(
  12720. ic,
  12721. 1
  12722. );
  12723. })
  12724. .catch(() => {
  12725. return;
  12726. });
  12727. },
  12728. deleteInfoData2(e, ic) {
  12729. e.stopPropagation();
  12730. let _this = this;
  12731. _this
  12732. .$confirm("确定删除此项?", "提示", {
  12733. confirmButtonText: "确定",
  12734. cancelButtonText: "取消",
  12735. type: "warning",
  12736. })
  12737. .then(() => {
  12738. let fileid = _this.infoData2[ic].fileid;
  12739. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  12740. _this.infoData2.splice(
  12741. ic,
  12742. 1
  12743. );
  12744. })
  12745. .catch(() => {
  12746. return;
  12747. });
  12748. },
  12749. deleteKnowInfoData(e, ic) {
  12750. e.stopPropagation();
  12751. let _this = this;
  12752. _this
  12753. .$confirm("确定删除此项?", "提示", {
  12754. confirmButtonText: "确定",
  12755. cancelButtonText: "取消",
  12756. type: "warning",
  12757. })
  12758. .then(() => {
  12759. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12760. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  12761. }
  12762. _this.knowInfoData.splice(
  12763. ic,
  12764. 1
  12765. );
  12766. })
  12767. .catch(() => {
  12768. return;
  12769. });
  12770. },
  12771. deleteKnowInfoData2(e, ic) {
  12772. e.stopPropagation();
  12773. let _this = this;
  12774. _this
  12775. .$confirm("确定删除此项?", "提示", {
  12776. confirmButtonText: "确定",
  12777. cancelButtonText: "取消",
  12778. type: "warning",
  12779. })
  12780. .then(() => {
  12781. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12782. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  12783. }
  12784. _this.knowInfoData2.splice(
  12785. ic,
  12786. 1
  12787. );
  12788. })
  12789. .catch(() => {
  12790. return;
  12791. });
  12792. },
  12793. deletemubiaoInfoData(e, ic) {
  12794. e.stopPropagation();
  12795. let _this = this;
  12796. _this
  12797. .$confirm("确定删除此项?", "提示", {
  12798. confirmButtonText: "确定",
  12799. cancelButtonText: "取消",
  12800. type: "warning",
  12801. })
  12802. .then(() => {
  12803. _this.mubiaoInfoData.splice(
  12804. ic,
  12805. 1
  12806. );
  12807. })
  12808. .catch(() => {
  12809. return;
  12810. });
  12811. },
  12812. deletexuanzeInfoData(e, ic) {
  12813. e.stopPropagation();
  12814. let _this = this;
  12815. _this
  12816. .$confirm("确定删除此项?", "提示", {
  12817. confirmButtonText: "确定",
  12818. cancelButtonText: "取消",
  12819. type: "warning",
  12820. })
  12821. .then(() => {
  12822. _this.xuanzeInfoData.splice(
  12823. ic,
  12824. 1
  12825. );
  12826. })
  12827. .catch(() => {
  12828. return;
  12829. });
  12830. },
  12831. deletepingjiaInfoData(e, ic, tindex) {
  12832. e.stopPropagation();
  12833. let _this = this;
  12834. _this
  12835. .$confirm("确定删除此项?", "提示", {
  12836. confirmButtonText: "确定",
  12837. cancelButtonText: "取消",
  12838. type: "warning",
  12839. })
  12840. .then(() => {
  12841. _this.pingjiaInfoData[tindex].splice(
  12842. ic,
  12843. 1
  12844. );
  12845. })
  12846. .catch(() => {
  12847. return;
  12848. });
  12849. },
  12850. deleteCankaoInfoData(e, ic) {
  12851. e.stopPropagation();
  12852. let _this = this;
  12853. _this
  12854. .$confirm("确定删除此项?", "提示", {
  12855. confirmButtonText: "确定",
  12856. cancelButtonText: "取消",
  12857. type: "warning",
  12858. })
  12859. .then(() => {
  12860. _this.cankaoInfoData.splice(
  12861. ic,
  12862. 1
  12863. );
  12864. })
  12865. .catch(() => {
  12866. return;
  12867. });
  12868. },
  12869. deleteTeacherInfoData(e, ic) {
  12870. e.stopPropagation();
  12871. let _this = this;
  12872. _this
  12873. .$confirm("确定删除此项?", "提示", {
  12874. confirmButtonText: "确定",
  12875. cancelButtonText: "取消",
  12876. type: "warning",
  12877. })
  12878. .then(() => {
  12879. _this.teacherInfoData.splice(
  12880. ic,
  12881. 1
  12882. );
  12883. })
  12884. .catch(() => {
  12885. return;
  12886. });
  12887. },
  12888. updataVideoT(e, i, j, ic) {
  12889. // e.stopPropagation();
  12890. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  12891. // ic
  12892. // ].name = JSON.parse(JSON.stringify(e.target.value));
  12893. this.line =
  12894. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  12895. this.taskCount = j;
  12896. this.lineCount = ic;
  12897. this.dialogVisibleupdataVideoT = true;
  12898. this.$forceUpdate();
  12899. },
  12900. checkChpater(e, i, j, ic){
  12901. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  12902. if(type == 3){
  12903. var fileA = [
  12904. "DOC",
  12905. "DOCX",
  12906. "DOCM",
  12907. "DOTM",
  12908. "DOTX",
  12909. "PPTX",
  12910. "PPSX",
  12911. "PPT",
  12912. "PPS",
  12913. "PPTM",
  12914. "POTM",
  12915. "PPAM",
  12916. "POTX",
  12917. "PPSM",
  12918. "XLSX",
  12919. "XLS"
  12920. ];
  12921. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  12922. if (
  12923. fileA.indexOf(
  12924. url.split(".")[
  12925. url.split(".").length - 1
  12926. ].toLocaleUpperCase()
  12927. ) != -1
  12928. ) {
  12929. this.dialogVisibleOffice = true
  12930. this.wurl = url
  12931. } else if (
  12932. "pdf".indexOf(
  12933. url.split(".")[
  12934. url.split(".").length - 1
  12935. ].toLocaleLowerCase()
  12936. ) != -1
  12937. ) {
  12938. this.dialogVisiblePdf = true
  12939. this.wurl = url
  12940. }
  12941. }
  12942. },
  12943. checkChpater2(e, ic){
  12944. let type = this.infoData2[ic].type
  12945. if(type == 3){
  12946. var fileA = [
  12947. "DOC",
  12948. "DOCX",
  12949. "DOCM",
  12950. "DOTM",
  12951. "DOTX",
  12952. "PPTX",
  12953. "PPSX",
  12954. "PPT",
  12955. "PPS",
  12956. "PPTM",
  12957. "POTM",
  12958. "PPAM",
  12959. "POTX",
  12960. "PPSM",
  12961. "XLSX",
  12962. "XLS"
  12963. ];
  12964. let url = this.infoData2[ic].url
  12965. if (
  12966. fileA.indexOf(
  12967. url.split(".")[
  12968. url.split(".").length - 1
  12969. ].toLocaleUpperCase()
  12970. ) != -1
  12971. ) {
  12972. this.dialogVisibleOffice = true
  12973. this.wurl = url
  12974. } else if (
  12975. "pdf".indexOf(
  12976. url.split(".")[
  12977. url.split(".").length - 1
  12978. ].toLocaleLowerCase()
  12979. ) != -1
  12980. ) {
  12981. this.dialogVisiblePdf = true
  12982. this.wurl = url
  12983. }
  12984. }
  12985. },
  12986. checkChpater3(e, ic, item){
  12987. let type = item.type
  12988. if(type == 3){
  12989. var fileA = [
  12990. "DOC",
  12991. "DOCX",
  12992. "DOCM",
  12993. "DOTM",
  12994. "DOTX",
  12995. "PPTX",
  12996. "PPSX",
  12997. "PPT",
  12998. "PPS",
  12999. "PPTM",
  13000. "POTM",
  13001. "PPAM",
  13002. "POTX",
  13003. "PPSM",
  13004. "XLSX",
  13005. "XLS"
  13006. ];
  13007. let url = item.url
  13008. if (
  13009. fileA.indexOf(
  13010. url.split(".")[
  13011. url.split(".").length - 1
  13012. ].toLocaleUpperCase()
  13013. ) != -1
  13014. ) {
  13015. this.dialogVisibleOffice = true
  13016. this.wurl = url
  13017. } else if (
  13018. "pdf".indexOf(
  13019. url.split(".")[
  13020. url.split(".").length - 1
  13021. ].toLocaleLowerCase()
  13022. ) != -1
  13023. ) {
  13024. this.dialogVisiblePdf = true
  13025. this.wurl = url
  13026. }
  13027. }
  13028. },
  13029. updataVideoC() {
  13030. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13031. this.taskCount
  13032. ].chapterData[this.lineCount].name = JSON.parse(
  13033. JSON.stringify(this.line)
  13034. );
  13035. this.dialogVisibleupdataVideoT = false;
  13036. this.$forceUpdate();
  13037. },
  13038. upCd(e, i, j, taskCount, ic) {
  13039. e.stopPropagation();
  13040. if (ic == 0) {
  13041. return;
  13042. }
  13043. var a = JSON.parse(
  13044. JSON.stringify(
  13045. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  13046. ic - 1
  13047. ]
  13048. )
  13049. );
  13050. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  13051. JSON.parse(
  13052. JSON.stringify(
  13053. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  13054. )
  13055. );
  13056. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  13057. this.$forceUpdate();
  13058. },
  13059. downCd(e, i, j, taskCount, ic) {
  13060. e.stopPropagation();
  13061. if (
  13062. ic ==
  13063. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  13064. 1
  13065. ) {
  13066. return;
  13067. }
  13068. var a = JSON.parse(
  13069. JSON.stringify(
  13070. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  13071. ic + 1
  13072. ]
  13073. )
  13074. );
  13075. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  13076. JSON.parse(
  13077. JSON.stringify(
  13078. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  13079. )
  13080. );
  13081. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  13082. this.$forceUpdate();
  13083. },
  13084. async upTool(e, i, j, tooli) {
  13085. e.stopPropagation();
  13086. if (tooli == 0) {
  13087. return;
  13088. }
  13089. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  13090. let count2 = await this.getWorksCount(3, i, j, tooli);
  13091. if (count1 > 0 || count2 > 0) {
  13092. this.$confirm(
  13093. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  13094. "提示",
  13095. {
  13096. confirmButtonText: "确定",
  13097. cancelButtonText: "取消",
  13098. type: "warning",
  13099. }
  13100. )
  13101. .then(() => {
  13102. var a = JSON.parse(
  13103. JSON.stringify(
  13104. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  13105. tooli - 1
  13106. ]
  13107. )
  13108. );
  13109. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  13110. JSON.parse(
  13111. JSON.stringify(
  13112. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13113. )
  13114. );
  13115. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13116. this.$forceUpdate();
  13117. })
  13118. .catch(() => {
  13119. return;
  13120. });
  13121. } else {
  13122. var a = JSON.parse(
  13123. JSON.stringify(
  13124. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  13125. )
  13126. );
  13127. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  13128. JSON.parse(
  13129. JSON.stringify(
  13130. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13131. )
  13132. );
  13133. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13134. this.$forceUpdate();
  13135. }
  13136. },
  13137. async downTool(e, i, j, tooli) {
  13138. e.stopPropagation();
  13139. if (
  13140. tooli ==
  13141. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  13142. ) {
  13143. return;
  13144. }
  13145. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  13146. let count2 = await this.getWorksCount(3, i, j, tooli);
  13147. if (count1 > 0 || count2 > 0) {
  13148. this.$confirm(
  13149. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  13150. "提示",
  13151. {
  13152. confirmButtonText: "确定",
  13153. cancelButtonText: "取消",
  13154. type: "warning",
  13155. }
  13156. )
  13157. .then(() => {
  13158. var a = JSON.parse(
  13159. JSON.stringify(
  13160. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  13161. tooli + 1
  13162. ]
  13163. )
  13164. );
  13165. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13166. JSON.parse(
  13167. JSON.stringify(
  13168. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13169. )
  13170. );
  13171. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13172. this.$forceUpdate();
  13173. })
  13174. .catch(() => {
  13175. return;
  13176. });
  13177. } else {
  13178. var a = JSON.parse(
  13179. JSON.stringify(
  13180. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  13181. )
  13182. );
  13183. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13184. JSON.parse(
  13185. JSON.stringify(
  13186. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13187. )
  13188. );
  13189. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13190. this.$forceUpdate();
  13191. }
  13192. },
  13193. addWork(type) {
  13194. if(type == 2 && this.courseName == "") {
  13195. this.$message.error("请补充填写课程名称");
  13196. return;
  13197. }
  13198. let cPan = 1;
  13199. for (var i = 0; i < this.unitJson.length; i++) {
  13200. for (
  13201. var j = 0;
  13202. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13203. j++
  13204. ) {
  13205. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13206. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13207. if (
  13208. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13209. ) {
  13210. for (
  13211. var z = 0;
  13212. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13213. z++
  13214. ) {
  13215. if (
  13216. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13217. .length
  13218. ) {
  13219. this.$message.error("请把工具添加完整");
  13220. cPan = 2;
  13221. break;
  13222. }
  13223. }
  13224. }
  13225. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13226. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13227. i
  13228. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13229. return ele.value != "" || ele.detail != "" || ele.target != "";
  13230. });
  13231. }
  13232. }
  13233. }
  13234. this.inputShow = true;
  13235. if (cPan == 2) {
  13236. this.steps--;
  13237. return;
  13238. }
  13239. for (var i = 0; i < this.unitJson.length; i++) {
  13240. delete this.unitJson[i].isUpdate;
  13241. }
  13242. if(!this.targetCourseText2){
  13243. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13244. }
  13245. let params = [
  13246. {
  13247. uid: this.userid,
  13248. title: this.courseName,
  13249. brief: this.courseText,
  13250. cover:
  13251. this.cover.length > 0
  13252. ? JSON.stringify(this.cover)
  13253. : JSON.stringify([
  13254. {
  13255. name: "noBanner.jpg",
  13256. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  13257. uid: 1656409780264,
  13258. status: "success",
  13259. },
  13260. ]),
  13261. evaId: this.evalua,
  13262. astudent:
  13263. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13264. see: this.isTeacherSee == true ? 1 : 0,
  13265. chapters: JSON.stringify(this.unitJson),
  13266. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  13267. courseType: JSON.stringify(this.courseTypeId),
  13268. ateacher:
  13269. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13270. inviteCode: JSON.stringify(this.inviteCode),
  13271. refile: JSON.stringify(this.infoData),
  13272. reBrief: this.courseText2,
  13273. cpote: JSON.stringify(this.cpote),
  13274. setting: JSON.stringify({
  13275. courseJie: this.courseJie,
  13276. courseTime: this.courseTime,
  13277. teacherInfoData: this.teacherInfoData,
  13278. teacherCourseText: this.teacherCourseText,
  13279. targetCourseText: this.targetCourseText,
  13280. cankaoInfoData: this.cankaoInfoData,
  13281. mubiaoInfoData: this.mubiaoInfoData,
  13282. xuanzeInfoData: this.xuanzeInfoData,
  13283. pingjiaInfoData: this.pingjiaInfoData,
  13284. infoData2: this.infoData2,
  13285. isuseT: this.isuseT,
  13286. mode: this.mode,
  13287. targetCourseText2: this.targetCourseText2,
  13288. chatid: this.chatid,
  13289. languageSetting: this.languageSetting,
  13290. knowInfoData: this.knowInfoData,
  13291. knowFileids: this.knowFileids,
  13292. knowInfoData2: this.knowInfoData2,
  13293. knowFileids2: this.knowFileids2,
  13294. recordVideoText: this.recordVideoText,
  13295. recordAudioUrl: this.recordAudioUrl,
  13296. appendixFile: this.appendixFile,
  13297. }),
  13298. iresearch: this.isFileSearch ? 1 : 2,
  13299. },
  13300. ];
  13301. this.ajax
  13302. .post(this.$store.state.api + "addWorkNew2AI3", params)
  13303. .then((res) => {
  13304. console.log(this.steps);
  13305. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13306. this.$message({
  13307. message: "新增成功",
  13308. type: "success",
  13309. });
  13310. }
  13311. this.number = res.data.ordernumber;
  13312. this.courseId = res.data.courseId;
  13313. this.cid = res.data.courseId;
  13314. this.courseUserid = this.userid;
  13315. this.islogin = true;
  13316. // this.updateCourseState(4);
  13317. this.updateCourseState(5);
  13318. this.addtips()
  13319. if(type == 2){
  13320. this.retrunCourse()
  13321. }
  13322. if(type == 3){
  13323. this.steps = 4
  13324. }
  13325. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13326. })
  13327. .catch((err) => {
  13328. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13329. this.$message.error("网络不佳");
  13330. console.error(err);
  13331. });
  13332. },
  13333. goCourse() {
  13334. window.topU.postMessage({ cid: this.courseId, type: "1" }, "*");
  13335. },
  13336. updateWork2() {
  13337. let _unitIndex = this.unitIndex;
  13338. let cPan = 1;
  13339. for (
  13340. var j = 0;
  13341. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13342. j++
  13343. ) {
  13344. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13345. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13346. j
  13347. ].proVisible2 = false;
  13348. if (
  13349. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13350. .length > 1
  13351. ) {
  13352. for (
  13353. var z = 0;
  13354. z <
  13355. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13356. .length;
  13357. z++
  13358. ) {
  13359. if (
  13360. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13361. z
  13362. ].tool.length
  13363. ) {
  13364. this.$message.error("请把工具添加完整");
  13365. cPan = 2;
  13366. break;
  13367. }
  13368. }
  13369. }
  13370. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13371. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13372. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13373. (ele) => {
  13374. return ele.value != "" || ele.detail != "" || ele.target != "";
  13375. }
  13376. );
  13377. }
  13378. }
  13379. this.inputShow = true;
  13380. if (cPan == 2) {
  13381. this.steps--;
  13382. return;
  13383. }
  13384. let params = [
  13385. {
  13386. cid: this.cid,
  13387. chapters: JSON.stringify(this.unitJson),
  13388. uid: this.userid,
  13389. unitIndex: _unitIndex,
  13390. },
  13391. ];
  13392. this.ajax
  13393. .post(this.$store.state.api + "updateWorkNew4", params)
  13394. .then((res) => {
  13395. this.$message({
  13396. message: "修改成功",
  13397. type: "success",
  13398. });
  13399. this.courseId = this.cid;
  13400. this.addtips();
  13401. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13402. })
  13403. .catch((err) => {
  13404. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13405. this.$message.error("网络不佳");
  13406. console.error(err);
  13407. });
  13408. },
  13409. updateWork3(unitIndex) {
  13410. let _unitIndex = unitIndex;
  13411. let cPan = 1;
  13412. for (
  13413. var j = 0;
  13414. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13415. j++
  13416. ) {
  13417. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13418. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13419. j
  13420. ].proVisible2 = false;
  13421. if (
  13422. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13423. .length > 1
  13424. ) {
  13425. for (
  13426. var z = 0;
  13427. z <
  13428. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13429. .length;
  13430. z++
  13431. ) {
  13432. if (
  13433. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13434. z
  13435. ].tool.length
  13436. ) {
  13437. this.$message.error("请把工具添加完整");
  13438. cPan = 2;
  13439. break;
  13440. }
  13441. }
  13442. }
  13443. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13444. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13445. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13446. (ele) => {
  13447. return ele.value != "" || ele.detail != "" || ele.target != "";
  13448. }
  13449. );
  13450. }
  13451. }
  13452. this.inputShow = true;
  13453. if (cPan == 2) {
  13454. this.steps--;
  13455. return;
  13456. }
  13457. let params = [
  13458. {
  13459. cid: this.cid,
  13460. chapters: JSON.stringify(this.unitJson),
  13461. uid: this.userid,
  13462. unitIndex: _unitIndex,
  13463. },
  13464. ];
  13465. this.ajax
  13466. .post(this.$store.state.api + "updateWorkNew4", params)
  13467. .then((res) => {
  13468. // this.$message({
  13469. // message: "修改成功",
  13470. // type: "success",
  13471. // });
  13472. this.courseId = this.cid;
  13473. this.addtips()
  13474. })
  13475. .catch((err) => {
  13476. this.$message.error("网络不佳");
  13477. console.error(err);
  13478. });
  13479. },
  13480. updateWork() {
  13481. let cPan = 1;
  13482. for (var i = 0; i < this.unitJson.length; i++) {
  13483. for (
  13484. var j = 0;
  13485. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13486. j++
  13487. ) {
  13488. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13489. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13490. if (
  13491. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13492. ) {
  13493. for (
  13494. var z = 0;
  13495. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13496. z++
  13497. ) {
  13498. if (
  13499. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13500. .length
  13501. ) {
  13502. this.$message.error("请把工具添加完整");
  13503. cPan = 2;
  13504. break;
  13505. }
  13506. }
  13507. }
  13508. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13509. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13510. i
  13511. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13512. return ele.value != "" || ele.detail != "" || ele.target != "";
  13513. });
  13514. }
  13515. }
  13516. }
  13517. this.inputShow = true;
  13518. if (cPan == 2) {
  13519. this.steps--;
  13520. return;
  13521. }
  13522. for (var i = 0; i < this.unitJson.length; i++) {
  13523. delete this.unitJson[i].isUpdate;
  13524. }
  13525. if(!this.targetCourseText2){
  13526. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13527. }
  13528. let params = [
  13529. {
  13530. cid: this.cid,
  13531. title: this.courseName,
  13532. brief: this.courseText,
  13533. cover:
  13534. this.cover.length > 0
  13535. ? JSON.stringify(this.cover)
  13536. : JSON.stringify([
  13537. {
  13538. name: "noBanner.jpg",
  13539. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  13540. uid: 1656409780264,
  13541. status: "success",
  13542. },
  13543. ]),
  13544. evaId: this.evalua,
  13545. astudent:
  13546. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13547. see: this.isTeacherSee == true ? 1 : 0,
  13548. chapters: JSON.stringify(this.unitJson),
  13549. template: this.myWord != "undefined" ? this.myWord : [],
  13550. uid: this.userid,
  13551. courseType: JSON.stringify(this.courseTypeId),
  13552. ateacher:
  13553. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13554. inviteCode: JSON.stringify(this.inviteCode),
  13555. refile: JSON.stringify(this.infoData),
  13556. reBrief: this.courseText2,
  13557. cpote: JSON.stringify(this.cpote),
  13558. setting: JSON.stringify({
  13559. courseJie: this.courseJie,
  13560. courseTime: this.courseTime,
  13561. teacherInfoData: this.teacherInfoData,
  13562. teacherCourseText: this.teacherCourseText,
  13563. targetCourseText: this.targetCourseText,
  13564. cankaoInfoData: this.cankaoInfoData,
  13565. mubiaoInfoData: this.mubiaoInfoData,
  13566. xuanzeInfoData: this.xuanzeInfoData,
  13567. pingjiaInfoData: this.pingjiaInfoData,
  13568. infoData2: this.infoData2,
  13569. isuseT: this.isuseT,
  13570. mode: this.mode,
  13571. targetCourseText2: this.targetCourseText2,
  13572. chatid: this.chatid,
  13573. languageSetting: this.languageSetting,
  13574. knowInfoData: this.knowInfoData,
  13575. knowFileids: this.knowFileids,
  13576. knowInfoData2: this.knowInfoData2,
  13577. knowFileids2: this.knowFileids2,
  13578. recordVideoText: this.recordVideoText,
  13579. recordAudioUrl: this.recordAudioUrl,
  13580. appendixFile: this.appendixFile,
  13581. }),
  13582. iresearch: this.isFileSearch ? 1 : 2,
  13583. },
  13584. ];
  13585. this.ajax
  13586. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  13587. .then((res) => {
  13588. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13589. if (this.cidType == 1) {
  13590. this.$message({
  13591. message: "修改成功",
  13592. type: "success",
  13593. });
  13594. } else {
  13595. this.$message({
  13596. message: "新增成功",
  13597. type: "success",
  13598. });
  13599. }
  13600. }
  13601. this.number = this.nbOrder;
  13602. this.courseId = this.cid;
  13603. this.addtips()
  13604. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13605. })
  13606. .catch((err) => {
  13607. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13608. this.$message.error("网络不佳");
  13609. console.error(err);
  13610. });
  13611. },
  13612. insertWord() {
  13613. this.dialogVisible1 = true;
  13614. this.updateBoolean2 = false;
  13615. this.tTitle = "";
  13616. this.tdetail = "";
  13617. },
  13618. addWord() {
  13619. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  13620. name: this.tTitle,
  13621. content: this.tdetail,
  13622. uid: this.guid(),
  13623. });
  13624. this.dialogVisible1 = false;
  13625. },
  13626. upWord() { },
  13627. selectWord(uid, i, c) {
  13628. this.dialogVisible1 = true;
  13629. this.updateBoolean2 = true;
  13630. if (
  13631. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  13632. ) {
  13633. this.tTitle =
  13634. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  13635. this.tdetail =
  13636. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  13637. }
  13638. },
  13639. isAddPP() {
  13640. if (this.checkboxList.length > 0) {
  13641. this.$message({
  13642. message: "添加成功",
  13643. type: "success",
  13644. });
  13645. this.dialogVisible3 = false;
  13646. } else {
  13647. this.$message({
  13648. message: "请添加课程成员",
  13649. type: "error",
  13650. });
  13651. }
  13652. },
  13653. isAddClass() {
  13654. this.dialogVisibleClass = false;
  13655. },
  13656. isAddPPTeacher() {
  13657. this.dialogVisibleMember = false;
  13658. this.setMan();
  13659. },
  13660. getTipsTemplate(){
  13661. if(this.templateid){
  13662. let params = {
  13663. id: this.templateid
  13664. }
  13665. this.ajax
  13666. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13667. .then((res) => {
  13668. if(res.data[0].length){
  13669. this.tipsJson = res.data[0][0]
  13670. this.aiJson = JSON.parse(res.data[0][0].tips)
  13671. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13672. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13673. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13674. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13675. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13676. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13677. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13678. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13679. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13680. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13681. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13682. }
  13683. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13684. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13685. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13686. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  13687. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  13688. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  13689. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  13690. - 我们的课程主题可以如何与学生的实际生活联系起来?
  13691. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  13692. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  13693. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  13694. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  13695. - 学生个人最终要完成什么?学生小组最终要完成什么?
  13696. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  13697. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  13698. 问题:<议程和问题引导>中的问题
  13699. 讨论:<转文本内容>`
  13700. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下<讨论>,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  13701. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  13702. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  13703. // }
  13704. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  13705. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13706. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13707. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13708. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  13709. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13710. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  13711. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13712. // }
  13713. this.$forceUpdate();
  13714. this.isDialog = res.data[0][0].isDialog
  13715. }
  13716. })
  13717. .catch((err) => { });
  13718. }
  13719. },
  13720. getTipsTemplateIsDialog(){
  13721. if(this.templateid){
  13722. let params = {
  13723. id: this.templateid
  13724. }
  13725. this.ajax
  13726. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13727. .then((res) => {
  13728. if(res.data[0].length){
  13729. this.isDialog = res.data[0][0].isDialog
  13730. }
  13731. })
  13732. .catch((err) => { });
  13733. }
  13734. },
  13735. getTemplate() {
  13736. this.ajax
  13737. .get(this.$store.state.api + "getCourseTemplateT", "")
  13738. .then((res) => {
  13739. this.templateArray = res.data[0];
  13740. this.getTemplateOid();
  13741. this.$forceUpdate();
  13742. })
  13743. .catch((err) => { });
  13744. },
  13745. getTemplateOid() {
  13746. let params = {
  13747. oid: this.oid,
  13748. };
  13749. this.ajax
  13750. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13751. .then((res) => {
  13752. if (res.data[0].length) {
  13753. this.templateArray = [...res.data[0], ...this.templateArray];
  13754. }
  13755. this.getTemplateOrg();
  13756. this.$forceUpdate();
  13757. })
  13758. .catch((err) => { });
  13759. },
  13760. getTemplateOrg() {
  13761. let params = {
  13762. oid: this.org,
  13763. };
  13764. this.ajax
  13765. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13766. .then((res) => {
  13767. if (res.data[0].length) {
  13768. this.templateArray = [...res.data[0], ...this.templateArray];
  13769. }
  13770. this.$forceUpdate();
  13771. })
  13772. .catch((err) => { });
  13773. },
  13774. clearChoose() {
  13775. this.clearArray.splice(this.templateC.id, 1);
  13776. this.dialogVisible2 = false;
  13777. },
  13778. clearAttText() {
  13779. this.AttText = {
  13780. title: "",
  13781. text: "",
  13782. };
  13783. this.dialogVisible6 = false;
  13784. },
  13785. clearLine() {
  13786. this.line = "";
  13787. this.dialogVisible7 = false;
  13788. },
  13789. openTemplate() {
  13790. this.ctJson = {};
  13791. this.templateDialog = true;
  13792. },
  13793. checkctJson(json) {
  13794. if (this.ctJson.id == json.id) {
  13795. this.ctJson = {};
  13796. } else {
  13797. this.ctJson = json;
  13798. }
  13799. },
  13800. addTemplate(res) {
  13801. let _this = this;
  13802. let _res = [];
  13803. if (res.id == 1) {
  13804. _res = [
  13805. {
  13806. dyName: "", //单元标题
  13807. easy: 1,
  13808. chapterInfo: [
  13809. {
  13810. isread: false,
  13811. chapterid: this.guid(),
  13812. title: "",
  13813. courseName: "",
  13814. taskJson: [
  13815. {
  13816. task: "",
  13817. taskDetail: "",
  13818. chapterData: [],
  13819. toolText: "",
  13820. toolChoose: [
  13821. {
  13822. tool: [],
  13823. toolDetail: "",
  13824. toolType: 0,
  13825. askCount: 1,
  13826. askTitle: "",
  13827. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13828. },
  13829. ],
  13830. isShowTools: false,
  13831. askCount: 1,
  13832. isFold: 1,
  13833. askTitle: "",
  13834. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13835. checkJson: [{ checkCount: [], checkPerent: [] }],
  13836. homeworkList: [],
  13837. },
  13838. ],
  13839. itemCount: 1,
  13840. fileList1: [],
  13841. video: [],
  13842. testData: [],
  13843. pData: [],
  13844. templateArray: [],
  13845. },
  13846. ],
  13847. },
  13848. ];
  13849. this.updateCourseState(1);
  13850. } else if (res.id == 2) {
  13851. let stageData = [];
  13852. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  13853. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  13854. if (!iframe && !iframe2) {
  13855. this.$message.error("请使用AI共创生成");
  13856. return;
  13857. }
  13858. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13859. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13860. if (
  13861. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13862. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13863. ) {
  13864. this.$message.error("请使用AI共创生成");
  13865. return;
  13866. }
  13867. stageData = copyData
  13868. ? copyData.stageData
  13869. : copyData2
  13870. ? copyData2.stageData
  13871. : [""];
  13872. for (var i = 0; i < stageData.length; i++) {
  13873. _res.push({
  13874. dyName: stageData[i], //单元标题
  13875. chapterInfo: [
  13876. {
  13877. isread: false,
  13878. chapterid: this.guid(),
  13879. title: "",
  13880. courseName: "",
  13881. taskJson: [
  13882. {
  13883. task: "",
  13884. taskDetail: "",
  13885. chapterData: [],
  13886. toolText: "",
  13887. toolChoose: [
  13888. {
  13889. tool: [],
  13890. toolDetail: "",
  13891. toolType: 0,
  13892. askCount: 1,
  13893. askTitle: "",
  13894. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13895. },
  13896. ],
  13897. isShowTools: false,
  13898. askCount: 1,
  13899. isFold: 1,
  13900. askTitle: "",
  13901. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13902. checkJson: [{ checkCount: [], checkPerent: [] }],
  13903. homeworkList: [],
  13904. },
  13905. ],
  13906. itemCount: 1,
  13907. fileList1: [],
  13908. video: [],
  13909. testData: [],
  13910. pData: [],
  13911. templateArray: [],
  13912. },
  13913. ],
  13914. });
  13915. }
  13916. this.updateCourseState(1);
  13917. } else if (!Object.keys(res).length) {
  13918. this.$message.error("请选择模板");
  13919. retrun;
  13920. } else {
  13921. _res = JSON.parse(res.chapters);
  13922. this.updateCourseState(parseInt(res.state));
  13923. }
  13924. _this
  13925. .$confirm(
  13926. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13927. "提示",
  13928. {
  13929. confirmButtonText: "确定",
  13930. cancelButtonText: "取消",
  13931. type: "warning",
  13932. }
  13933. )
  13934. .then(() => {
  13935. _this.unitJson = _res;
  13936. _this.updateWork();
  13937. // _this.steps++;
  13938. _this.templateDialog = false;
  13939. setTimeout(() => {
  13940. this.checkEva(this.checkId);
  13941. setTimeout(() => {
  13942. this.checkEva(this.checkId);
  13943. }, 100);
  13944. }, 1000);
  13945. })
  13946. .catch(() => {
  13947. return;
  13948. });
  13949. },
  13950. checkTemplate(res) {
  13951. let _this = this;
  13952. _this
  13953. .$confirm(
  13954. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13955. "提示",
  13956. {
  13957. confirmButtonText: "确定",
  13958. cancelButtonText: "取消",
  13959. type: "warning",
  13960. }
  13961. )
  13962. .then(() => {
  13963. _this.unitJson = JSON.parse(res.chapters);
  13964. _this.steps++;
  13965. setTimeout(() => {
  13966. this.checkEva(this.checkId);
  13967. setTimeout(() => {
  13968. this.checkEva(this.checkId);
  13969. }, 100);
  13970. }, 1000);
  13971. })
  13972. .catch(() => {
  13973. return;
  13974. });
  13975. },
  13976. checkTemplate1(w) {
  13977. this.steps++;
  13978. },
  13979. checkTemplate2() {
  13980. let _this = this;
  13981. _this
  13982. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  13983. confirmButtonText: "确定",
  13984. cancelButtonText: "取消",
  13985. type: "warning",
  13986. })
  13987. .then(() => {
  13988. _this.unitIndex = 0;
  13989. _this.unitJson = [
  13990. {
  13991. dyName: "", //单元标题
  13992. chapterInfo: [
  13993. {
  13994. isread: false,
  13995. chapterid: this.guid(),
  13996. title: "",
  13997. courseName: "",
  13998. taskJson: [
  13999. {
  14000. task: "",
  14001. taskDetail: "",
  14002. chapterData: [],
  14003. toolText: "",
  14004. toolChoose: [
  14005. {
  14006. tool: [],
  14007. toolDetail: "",
  14008. toolType: 0,
  14009. askCount: 1,
  14010. askTitle: "",
  14011. askJson: [
  14012. { askstitle: "", askItem: 1, checkList: [] },
  14013. ],
  14014. },
  14015. ],
  14016. isShowTools: false,
  14017. askCount: 1,
  14018. isFold: 1,
  14019. askTitle: "",
  14020. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14021. checkJson: [{ checkCount: [], checkPerent: [] }],
  14022. homeworkList: [],
  14023. },
  14024. ],
  14025. itemCount: 1,
  14026. fileList1: [],
  14027. video: [],
  14028. testData: [],
  14029. pData: [],
  14030. templateArray: [],
  14031. },
  14032. ],
  14033. },
  14034. ];
  14035. this.steps++;
  14036. setTimeout(() => {
  14037. this.checkEva(this.checkId);
  14038. setTimeout(() => {
  14039. this.checkEva(this.checkId);
  14040. }, 100);
  14041. }, 1000);
  14042. this.updateWork();
  14043. })
  14044. .catch(() => {
  14045. return;
  14046. });
  14047. },
  14048. checkTemplate3() {
  14049. let _this = this;
  14050. _this
  14051. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  14052. confirmButtonText: "确定",
  14053. cancelButtonText: "取消",
  14054. type: "warning",
  14055. })
  14056. .then(() => {
  14057. _this.unitIndex = 0;
  14058. _this.unitJson = [
  14059. {
  14060. dyName: "", //单元标题
  14061. easy: 1,
  14062. chapterInfo: [
  14063. {
  14064. isread: false,
  14065. chapterid: this.guid(),
  14066. title: "",
  14067. courseName: "",
  14068. taskJson: [
  14069. {
  14070. task: "",
  14071. taskDetail: "",
  14072. chapterData: [],
  14073. toolText: "",
  14074. toolChoose: [
  14075. {
  14076. tool: [],
  14077. toolDetail: "",
  14078. toolType: 0,
  14079. askCount: 1,
  14080. askTitle: "",
  14081. askJson: [
  14082. { askstitle: "", askItem: 1, checkList: [] },
  14083. ],
  14084. },
  14085. ],
  14086. isShowTools: false,
  14087. askCount: 1,
  14088. isFold: 1,
  14089. askTitle: "",
  14090. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14091. checkJson: [{ checkCount: [], checkPerent: [] }],
  14092. homeworkList: [],
  14093. },
  14094. ],
  14095. itemCount: 1,
  14096. fileList1: [],
  14097. video: [],
  14098. testData: [],
  14099. pData: [],
  14100. templateArray: [],
  14101. },
  14102. ],
  14103. },
  14104. ];
  14105. // this.steps++;
  14106. this.updateWork();
  14107. })
  14108. .catch(() => {
  14109. return;
  14110. });
  14111. },
  14112. checkTemplate4() {
  14113. let _this = this;
  14114. _this
  14115. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  14116. confirmButtonText: "确定",
  14117. cancelButtonText: "取消",
  14118. type: "warning",
  14119. })
  14120. .then(() => {
  14121. _this.unitIndex = 0;
  14122. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  14123. this.steps++;
  14124. this.updateWork();
  14125. })
  14126. .catch(() => {
  14127. return;
  14128. });
  14129. },
  14130. wordNext() {
  14131. this.dialogVisible2 = false;
  14132. },
  14133. isAddOrUpdateAttText() {
  14134. if (this.AttTextType == 0) {
  14135. this.addAttTextMessage();
  14136. } else {
  14137. this.updateAttText();
  14138. }
  14139. },
  14140. isAddOrUpdateLine() {
  14141. if (!this.lineTitle) {
  14142. this.$message.error("请填写链接标题");
  14143. return;
  14144. }
  14145. if (this.lineType == 0) {
  14146. this.addLine();
  14147. } else {
  14148. this.updateLine();
  14149. }
  14150. },
  14151. addAttTextMessage() {
  14152. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14153. this.taskCount
  14154. ].chapterData.unshift({
  14155. name: this.AttText.title,
  14156. url: this.AttText.text,
  14157. type: 6,
  14158. });
  14159. this.imgChange1(null, null, 6, this.taskCount);
  14160. this.dialogVisible6 = false;
  14161. },
  14162. selectAttText(itemTaskIndex, i) {
  14163. this.AttText.title =
  14164. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14165. itemTaskIndex
  14166. ].chapterData[i].name;
  14167. this.AttText.text =
  14168. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14169. itemTaskIndex
  14170. ].chapterData[i].url;
  14171. this.taskCount = itemTaskIndex;
  14172. this.AttTextIndex = i;
  14173. this.AttTextType = 1;
  14174. this.dialogVisible6 = true;
  14175. },
  14176. updateAttText() {
  14177. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14178. this.taskCount
  14179. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  14180. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14181. this.taskCount
  14182. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  14183. this.dialogVisible6 = false;
  14184. },
  14185. addLine() {
  14186. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14187. this.lineCount
  14188. ].chapterData.unshift({
  14189. name: "链接",
  14190. title: this.lineTitle,
  14191. url: this.line,
  14192. type: 8,
  14193. });
  14194. this.imgChange1(null, null, 8, this.lineCount);
  14195. this.dialogVisible7 = false;
  14196. },
  14197. selectLine(itemTaskIndex, i) {
  14198. this.line =
  14199. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14200. itemTaskIndex
  14201. ].chapterData[i].url;
  14202. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14203. itemTaskIndex
  14204. ].chapterData[i].title
  14205. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14206. .chapterData[i].title
  14207. : "";
  14208. this.taskCount = itemTaskIndex;
  14209. this.lineCount = i;
  14210. this.lineType = 1;
  14211. this.dialogVisible7 = true;
  14212. },
  14213. openUpdateSource(itemTaskIndex, i) {
  14214. this.sourceData = {};
  14215. let source =
  14216. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14217. .chapterData[i];
  14218. this.sourceData[source.id] = {};
  14219. this.sourceData[source.id].name = source.title;
  14220. this.sourceData[source.id].url = source.url;
  14221. this.dialogVisibleSource = true;
  14222. this.updateSourcePan = true;
  14223. this.taskCount = itemTaskIndex;
  14224. this.lineCount = i;
  14225. },
  14226. updateLine() {
  14227. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14228. this.taskCount
  14229. ].chapterData[this.lineCount].url = this.line;
  14230. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14231. this.taskCount
  14232. ].chapterData[this.lineCount].title = this.lineTitle;
  14233. this.dialogVisible7 = false;
  14234. },
  14235. addPP() {
  14236. this.dialogVisible3 = true;
  14237. },
  14238. goTo(path) {
  14239. this.$router.push(path);
  14240. },
  14241. openTools(itemTaskIndex, i, toolIndex) {
  14242. this.toolIndex = toolIndex;
  14243. this.taskCount = itemTaskIndex;
  14244. if (i == 4) {
  14245. if (toolIndex == null) {
  14246. var a =
  14247. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14248. .chapterData;
  14249. for (var i = 0; i < a.length; i++) {
  14250. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  14251. this.askJson =
  14252. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14253. itemTaskIndex
  14254. ].chapterData[i].askJson;
  14255. }
  14256. }
  14257. } else {
  14258. this.askJson = JSON.parse(
  14259. JSON.stringify(
  14260. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14261. itemTaskIndex
  14262. ].toolChoose[toolIndex]
  14263. )
  14264. );
  14265. }
  14266. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  14267. this.dialogVisible5 = true;
  14268. } else if (i == 45) {
  14269. if (
  14270. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14271. .toolChoose[toolIndex].testJson
  14272. ) {
  14273. this.testJson = JSON.parse(
  14274. JSON.stringify(
  14275. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14276. itemTaskIndex
  14277. ].toolChoose[toolIndex].testJson
  14278. )
  14279. );
  14280. } else {
  14281. var testJson = {
  14282. testCount: 1,
  14283. testTitle: "",
  14284. testJson: [
  14285. {
  14286. teststitle: "",
  14287. testItem: 1,
  14288. checkList: [],
  14289. timuList: [],
  14290. answer: [],
  14291. type: "1",
  14292. },
  14293. ],
  14294. };
  14295. this.testJson = testJson;
  14296. }
  14297. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  14298. this.dialogVisibleChoice = true;
  14299. } else if (i == 47) {
  14300. if (
  14301. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14302. .toolChoose[toolIndex].sentenceList
  14303. ) {
  14304. this.sentenceList = JSON.parse(
  14305. JSON.stringify(
  14306. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14307. itemTaskIndex
  14308. ].toolChoose[toolIndex].sentenceList
  14309. )
  14310. );
  14311. } else {
  14312. var sentenceList = [
  14313. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14314. ];
  14315. this.sentenceList = sentenceList;
  14316. }
  14317. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  14318. this.dialogVisibleSentence = true;
  14319. } else if (i == 48) {
  14320. if (
  14321. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14322. .toolChoose[toolIndex].tableJson
  14323. ) {
  14324. this.tableJson = JSON.parse(
  14325. JSON.stringify(
  14326. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14327. itemTaskIndex
  14328. ].toolChoose[toolIndex].tableJson
  14329. )
  14330. );
  14331. } else {
  14332. var tableJson = { text: "" };
  14333. this.tableJson = tableJson;
  14334. }
  14335. this.dialogVisibleTable = true;
  14336. } else if (i == 52) {
  14337. if (
  14338. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14339. .toolChoose[toolIndex].wordJson
  14340. ) {
  14341. this.wordJson = JSON.parse(
  14342. JSON.stringify(
  14343. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14344. itemTaskIndex
  14345. ].toolChoose[toolIndex].wordJson
  14346. )
  14347. );
  14348. } else {
  14349. var wordJson = { text: "" };
  14350. this.wordJson = wordJson;
  14351. }
  14352. this.dialogVisibleWord = true;
  14353. // else if (i == 50) {
  14354. // if (
  14355. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14356. // .toolChoose[toolIndex].uploadJson
  14357. // ) {
  14358. // this.uploadJson = JSON.parse(
  14359. // JSON.stringify(
  14360. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14361. // itemTaskIndex
  14362. // ].toolChoose[toolIndex].uploadJson
  14363. // )
  14364. // );
  14365. // } else {
  14366. // var uploadJson = [];
  14367. // this.uploadJson = uploadJson;
  14368. // }
  14369. // this.dialogVisibleMoreUpload = true;
  14370. // }
  14371. } else if (i == 10) {
  14372. if (
  14373. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14374. .toolChoose[toolIndex].preTime
  14375. ) {
  14376. this.preTime = JSON.parse(
  14377. JSON.stringify(
  14378. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14379. itemTaskIndex
  14380. ].toolChoose[toolIndex].preTime
  14381. )
  14382. );
  14383. } else {
  14384. var preTime = 0;
  14385. this.preTime = preTime;
  14386. }
  14387. this.dialogVisiblePreTime = true;
  14388. } else if (i == 49) {
  14389. if (
  14390. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14391. .toolChoose[toolIndex].groupJson
  14392. ) {
  14393. this.groupJson = JSON.parse(
  14394. JSON.stringify(
  14395. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14396. itemTaskIndex
  14397. ].toolChoose[toolIndex].groupJson
  14398. )
  14399. );
  14400. } else {
  14401. var groupJson = {
  14402. group: [{ name: "第1组" }],
  14403. number: undefined,
  14404. islock: 1,
  14405. };
  14406. this.groupJson = groupJson;
  14407. }
  14408. this.dialogVisibleGroup = true;
  14409. } else if (i == 62) {
  14410. if (
  14411. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14412. .toolChoose[toolIndex].videoJson
  14413. ) {
  14414. this.videoJson = JSON.parse(
  14415. JSON.stringify(
  14416. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14417. itemTaskIndex
  14418. ].toolChoose[toolIndex].videoJson
  14419. )
  14420. );
  14421. } else {
  14422. var videoJson = {
  14423. video: "",
  14424. setting: [],
  14425. };
  14426. this.videoJson = videoJson;
  14427. }
  14428. this.dialogVisibleVideo = true;
  14429. } else if (i == 15) {
  14430. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14431. itemTaskIndex
  14432. ].toolChoose[toolIndex].answerQ
  14433. ? JSON.parse(
  14434. JSON.stringify(
  14435. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14436. itemTaskIndex
  14437. ].toolChoose[toolIndex].answerQ
  14438. )
  14439. )
  14440. : "";
  14441. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  14442. this.dialogVisible8 = true;
  14443. } else if (i == 40) {
  14444. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14445. itemTaskIndex
  14446. ].toolChoose[toolIndex].rateJson
  14447. ? JSON.parse(
  14448. JSON.stringify(
  14449. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14450. itemTaskIndex
  14451. ].toolChoose[toolIndex].rateJson
  14452. )
  14453. )
  14454. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  14455. this.selectSteps = 1;
  14456. this.dialogVisibleRate = true;
  14457. } else if (i == 42) {
  14458. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14459. itemTaskIndex
  14460. ].toolChoose[toolIndex].answerQ
  14461. ? JSON.parse(
  14462. JSON.stringify(
  14463. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14464. itemTaskIndex
  14465. ].toolChoose[toolIndex].answerQ
  14466. )
  14467. )
  14468. : "";
  14469. this.dialogVisibleMp3 = true;
  14470. } else if (i == 41) {
  14471. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14472. itemTaskIndex
  14473. ].toolChoose[toolIndex].selectJson
  14474. ? JSON.parse(
  14475. JSON.stringify(
  14476. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14477. itemTaskIndex
  14478. ].toolChoose[toolIndex].selectJson
  14479. )
  14480. )
  14481. : { url: "", select: [], answer: [] };
  14482. this.selectSteps = 1;
  14483. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  14484. this.dialogVisibleSelect = true;
  14485. } else if (i == 3) {
  14486. window.topU.postMessage(
  14487. {
  14488. tools: "3y",
  14489. cid: this.cid,
  14490. stage: this.unitIndex,
  14491. task: itemTaskIndex,
  14492. tool: toolIndex,
  14493. },
  14494. "*"
  14495. );
  14496. } else if (i == 1) {
  14497. window.topU.postMessage(
  14498. {
  14499. tools: "1y",
  14500. cid: this.cid,
  14501. stage: this.unitIndex,
  14502. task: itemTaskIndex,
  14503. tool: toolIndex,
  14504. },
  14505. "*"
  14506. );
  14507. } else if (i == 57) {
  14508. window.topU.postMessage(
  14509. {
  14510. tools: "57y",
  14511. cid: this.cid,
  14512. stage: this.unitIndex,
  14513. task: itemTaskIndex,
  14514. tool: toolIndex,
  14515. },
  14516. "*"
  14517. );
  14518. } else if (i == 69) {
  14519. this.englishList = {};
  14520. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  14521. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  14522. ? JSON.parse(
  14523. JSON.stringify(
  14524. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14525. itemTaskIndex
  14526. ].toolChoose[toolIndex].englishList
  14527. )
  14528. )
  14529. : {};
  14530. this.$forceUpdate();
  14531. this.englishDialogVisible = true;
  14532. } else if (i == 70) {
  14533. this.englishVoiceJson = {};
  14534. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  14535. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  14536. ? JSON.parse(
  14537. JSON.stringify(
  14538. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14539. itemTaskIndex
  14540. ].toolChoose[toolIndex].englishVoiceJson
  14541. )
  14542. )
  14543. : {
  14544. title: '',
  14545. detail: '',
  14546. array: []
  14547. };
  14548. // {
  14549. // time: "",
  14550. // class: "",
  14551. // difficulty: 0,
  14552. // topic: "",
  14553. // isShow: false,
  14554. // eva: 0,
  14555. // aiEva: {
  14556. // isAiEva: false,
  14557. // aiEvaChoose: [],
  14558. // },
  14559. // allfType: [],
  14560. // englishJson: {},
  14561. // };
  14562. this.$forceUpdate();
  14563. this.EnglishVoiceDialog = true;
  14564. }else if(i == 72){
  14565. let appJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14566. itemTaskIndex
  14567. ].toolChoose[toolIndex].appJson
  14568. ? JSON.parse(
  14569. JSON.stringify(
  14570. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14571. itemTaskIndex
  14572. ].toolChoose[toolIndex].appJson
  14573. )
  14574. )
  14575. : {
  14576. url:'',
  14577. };
  14578. this.$forceUpdate();
  14579. this.$refs.appDialog.openG(appJson,this.unitIndex,itemTaskIndex,toolIndex);
  14580. }
  14581. if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
  14582. && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
  14583. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
  14584. }
  14585. },
  14586. setEnglishVoiceJson(val) {
  14587. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14588. this.taskCount
  14589. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  14590. JSON.stringify(val)
  14591. );
  14592. this.$forceUpdate();
  14593. if (
  14594. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14595. .toolChoose[this.toolIndex].tool != 70
  14596. ) {
  14597. this.addTools(70, this.taskCount, this.toolIndex);
  14598. }
  14599. },
  14600. chapAddTools(i) {
  14601. if (this.chapTools[0].tools.length == 0) {
  14602. this.chapTools[0].tools.push(i);
  14603. } else {
  14604. if (this.chapTools[0].tools.indexOf(i) != -1) {
  14605. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  14606. } else {
  14607. this.chapTools[0].tools.push(i);
  14608. }
  14609. }
  14610. this.$forceUpdate();
  14611. },
  14612. addChaptersDataTools() {
  14613. if (this.chapTools[0].tools.indexOf(4) != -1) {
  14614. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14615. this.chapCount
  14616. ].chapterData.unshift({
  14617. name: this.chapTools[0].toolDetail,
  14618. url: this.chapTools[0].tools,
  14619. type: 7,
  14620. askJson: this.askJson,
  14621. });
  14622. } else {
  14623. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14624. this.chapCount
  14625. ].chapterData.unshift({
  14626. name: this.chapTools[0].toolDetail,
  14627. url: this.chapTools[0].tools,
  14628. type: 7,
  14629. });
  14630. }
  14631. this.imgChange1(null, null, 7, this.chapCount);
  14632. this.dialogVisible4 = false;
  14633. },
  14634. addTools(i, itemTaskIndex, toolIndex) {
  14635. // if (
  14636. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14637. // .toolChoose[toolIndex].tool.length == 0
  14638. // ) {
  14639. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14640. // itemTaskIndex
  14641. // ].toolChoose[toolIndex].tool.push(i);
  14642. // } else {
  14643. // if (
  14644. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14645. // itemTaskIndex
  14646. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14647. // ) {
  14648. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14649. // itemTaskIndex
  14650. // ].toolChoose[toolIndex].tool.splice(
  14651. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14652. // itemTaskIndex
  14653. // ].toolChoose[toolIndex].tool.indexOf(i),
  14654. // 1
  14655. // );
  14656. // } else {
  14657. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14658. // itemTaskIndex
  14659. // ].toolChoose[toolIndex].tool.push(i);
  14660. // }
  14661. // console.log(
  14662. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14663. // .toolChoose[toolIndex].tool
  14664. // );
  14665. // }
  14666. if (i == 4) {
  14667. if (
  14668. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14669. .toolChoose[toolIndex].askJson.askTitle == "" ||
  14670. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14671. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  14672. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14673. .toolChoose[toolIndex].askJson[0].checkList < 2
  14674. ) {
  14675. this.openTools(itemTaskIndex, 4, toolIndex);
  14676. // this.$message({
  14677. // message: "请填写完整问卷内容",
  14678. // type: "error",
  14679. // });
  14680. return;
  14681. }
  14682. }
  14683. if (i == 45) {
  14684. if (
  14685. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14686. .toolChoose[toolIndex].testJson ||
  14687. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14688. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  14689. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14690. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  14691. ) {
  14692. this.openTools(itemTaskIndex, 45, toolIndex);
  14693. // this.$message({
  14694. // message: "请填写完整问卷内容",
  14695. // type: "error",
  14696. // });
  14697. return;
  14698. }
  14699. }
  14700. if (i == 47) {
  14701. if (
  14702. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14703. .toolChoose[toolIndex].sentenceList ||
  14704. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14705. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  14706. ) {
  14707. this.openTools(itemTaskIndex, 47, toolIndex);
  14708. return;
  14709. }
  14710. }
  14711. if (i == 69) {
  14712. if (
  14713. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14714. .toolChoose[toolIndex].englishList
  14715. ) {
  14716. this.openTools(itemTaskIndex, 69, toolIndex);
  14717. return;
  14718. }
  14719. }
  14720. if (i == 70) {
  14721. if (
  14722. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14723. .toolChoose[toolIndex].englishVoiceJson
  14724. ) {
  14725. this.openTools(itemTaskIndex, 70, toolIndex);
  14726. return;
  14727. }
  14728. }
  14729. if(i == 72){
  14730. if (
  14731. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14732. .toolChoose[toolIndex].appJson || Object.keys(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14733. .toolChoose[toolIndex].appJson).length == 0
  14734. ) {
  14735. this.openTools(itemTaskIndex, 72, toolIndex);
  14736. return;
  14737. }
  14738. }
  14739. // if (i == 48) {
  14740. // if (
  14741. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14742. // .toolChoose[toolIndex].tableJson
  14743. // ) {
  14744. // this.openTools(itemTaskIndex, 48, toolIndex);
  14745. // return;
  14746. // }
  14747. // }
  14748. // if (i == 50) {
  14749. // if (
  14750. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14751. // .toolChoose[toolIndex].uploadJson
  14752. // ) {
  14753. // this.openTools(itemTaskIndex, 50, toolIndex);
  14754. // return;
  14755. // }
  14756. // }
  14757. if (i == 49) {
  14758. if (
  14759. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14760. .toolChoose[toolIndex].groupJson
  14761. ) {
  14762. this.openTools(itemTaskIndex, 49, toolIndex);
  14763. return;
  14764. }
  14765. }
  14766. if (i == 62) {
  14767. if (
  14768. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14769. .toolChoose[toolIndex].videoJson
  14770. ) {
  14771. this.openTools(itemTaskIndex, 62, toolIndex);
  14772. return;
  14773. }
  14774. }
  14775. if (i == 15) {
  14776. if (
  14777. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14778. .toolChoose[toolIndex].answerQ ||
  14779. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14780. .toolChoose[toolIndex].answerQ == ""
  14781. ) {
  14782. this.openTools(itemTaskIndex, 15, toolIndex);
  14783. // this.$message({
  14784. // message: "请填写问答内容",
  14785. // type: "error",
  14786. // });
  14787. return;
  14788. }
  14789. }
  14790. if (i == 40) {
  14791. if (
  14792. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14793. .toolChoose[toolIndex].rateJson ||
  14794. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14795. .toolChoose[toolIndex].rateJson.length
  14796. ) {
  14797. this.openTools(itemTaskIndex, 40, toolIndex);
  14798. return;
  14799. }
  14800. }
  14801. if (i == 41) {
  14802. if (
  14803. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14804. .toolChoose[toolIndex].selectJson ||
  14805. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14806. .toolChoose[toolIndex].selectJson.url == "" ||
  14807. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14808. .toolChoose[toolIndex].selectJson.select.length ||
  14809. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14810. .toolChoose[toolIndex].selectJson.answer.length
  14811. ) {
  14812. this.openTools(itemTaskIndex, 41, toolIndex);
  14813. return;
  14814. }
  14815. }
  14816. if (i == 42) {
  14817. if (
  14818. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14819. .toolChoose[toolIndex].answerQ ||
  14820. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14821. .toolChoose[toolIndex].answerQ == ""
  14822. ) {
  14823. this.openTools(itemTaskIndex, 42, toolIndex);
  14824. return;
  14825. }
  14826. }
  14827. if (
  14828. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14829. .toolChoose[toolIndex].tool.length > 0
  14830. ) {
  14831. if (
  14832. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14833. itemTaskIndex
  14834. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14835. ) {
  14836. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14837. itemTaskIndex
  14838. ].toolChoose[toolIndex].tool.splice(
  14839. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14840. itemTaskIndex
  14841. ].toolChoose[toolIndex].tool.indexOf(i),
  14842. 1
  14843. );
  14844. } else {
  14845. // this.$message({
  14846. // message: "每个工具只能添加一个",
  14847. // type: "error",
  14848. // });
  14849. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14850. itemTaskIndex
  14851. ].toolChoose[toolIndex].tool = [];
  14852. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14853. itemTaskIndex
  14854. ].toolChoose[toolIndex].tool.push(i);
  14855. }
  14856. } else {
  14857. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14858. itemTaskIndex
  14859. ].toolChoose[toolIndex].tool.push(i);
  14860. }
  14861. if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
  14862. && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
  14863. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
  14864. }
  14865. this.$forceUpdate();
  14866. },
  14867. addAskList(index) {
  14868. this.askJson.askJson.splice(index + 1, 0, {
  14869. askstitle: "",
  14870. askItem: 1,
  14871. checkList: [],
  14872. });
  14873. this.askJson.askCount++;
  14874. },
  14875. addTestList(index) {
  14876. this.testJson.testJson.splice(index + 1, 0, {
  14877. teststitle: "",
  14878. testItem: 1,
  14879. checkList: [],
  14880. timuList: [],
  14881. answer: [],
  14882. type: "1",
  14883. });
  14884. this.testJson.testCount++;
  14885. },
  14886. deleteAskList(index) {
  14887. if (
  14888. !this.askJson.askJson[index].askstitle &&
  14889. this.askJson.askJson[index].askItem == 1 &&
  14890. !this.askJson.askJson[index].checkList[0]
  14891. ) {
  14892. this.askJson.askJson.splice(index, 1);
  14893. this.askJson.askCount--;
  14894. } else {
  14895. let _this = this;
  14896. _this
  14897. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14898. confirmButtonText: "确定",
  14899. cancelButtonText: "取消",
  14900. type: "warning",
  14901. })
  14902. .then(() => {
  14903. _this.askJson.askJson.splice(index, 1);
  14904. _this.askJson.askCount--;
  14905. })
  14906. .catch(() => {
  14907. return;
  14908. });
  14909. }
  14910. },
  14911. deleteTestList(index) {
  14912. if (
  14913. !this.testJson.testJson[index].teststitle &&
  14914. this.testJson.testJson[index].testItem == 1 &&
  14915. !this.testJson.testJson[index].checkList[0]
  14916. ) {
  14917. this.testJson.testJson.splice(index, 1);
  14918. this.testJson.testCount--;
  14919. } else {
  14920. let _this = this;
  14921. _this
  14922. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14923. confirmButtonText: "确定",
  14924. cancelButtonText: "取消",
  14925. type: "warning",
  14926. })
  14927. .then(() => {
  14928. _this.testJson.testJson.splice(index, 1);
  14929. _this.testJson.testCount--;
  14930. })
  14931. .catch(() => {
  14932. return;
  14933. });
  14934. }
  14935. },
  14936. askMove(type, index) {
  14937. if (type == 1) {
  14938. if (index > 0) {
  14939. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  14940. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14941. this.askJson.askJson[index - 1] = b;
  14942. this.askJson.askJson[index] = a;
  14943. }
  14944. } else {
  14945. if (index < this.askJson.askJson.length - 1) {
  14946. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  14947. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14948. this.askJson.askJson[index + 1] = b;
  14949. this.askJson.askJson[index] = a;
  14950. }
  14951. }
  14952. this.$forceUpdate();
  14953. },
  14954. checkMove(type, index, checkIndex) {
  14955. if (type == 1) {
  14956. if (checkIndex > 0) {
  14957. let a = JSON.parse(
  14958. JSON.stringify(
  14959. this.askJson.askJson[index].checkList[checkIndex - 1]
  14960. )
  14961. );
  14962. let b = JSON.parse(
  14963. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14964. );
  14965. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  14966. this.askJson.askJson[index].checkList[checkIndex] = a;
  14967. }
  14968. } else {
  14969. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  14970. let a = JSON.parse(
  14971. JSON.stringify(
  14972. this.askJson.askJson[index].checkList[checkIndex + 1]
  14973. )
  14974. );
  14975. let b = JSON.parse(
  14976. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14977. );
  14978. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  14979. this.askJson.askJson[index].checkList[checkIndex] = a;
  14980. }
  14981. }
  14982. this.$forceUpdate();
  14983. },
  14984. testMove(type, index) {
  14985. if (type == 1) {
  14986. if (index > 0) {
  14987. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  14988. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14989. this.testJson.testJson[index - 1] = b;
  14990. this.testJson.testJson[index] = a;
  14991. }
  14992. } else {
  14993. if (index < this.testJson.testJson.length - 1) {
  14994. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  14995. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14996. this.testJson.testJson[index + 1] = b;
  14997. this.testJson.testJson[index] = a;
  14998. }
  14999. }
  15000. this.$forceUpdate();
  15001. },
  15002. tcheckMove(type, index, checkIndex) {
  15003. if (type == 1) {
  15004. if (checkIndex > 0) {
  15005. let a = JSON.parse(
  15006. JSON.stringify(
  15007. this.testJson.testJson[index].checkList[checkIndex - 1]
  15008. )
  15009. );
  15010. let b = JSON.parse(
  15011. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  15012. );
  15013. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  15014. this.testJson.testJson[index].checkList[checkIndex] = a;
  15015. }
  15016. } else {
  15017. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  15018. let a = JSON.parse(
  15019. JSON.stringify(
  15020. this.testJson.testJson[index].checkList[checkIndex + 1]
  15021. )
  15022. );
  15023. let b = JSON.parse(
  15024. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  15025. );
  15026. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  15027. this.testJson.testJson[index].checkList[checkIndex] = a;
  15028. }
  15029. }
  15030. this.$forceUpdate();
  15031. },
  15032. addcheckList(json, index) {
  15033. // json.checkList.length++;
  15034. json.checkList.splice(index + 1, 0, "");
  15035. json.askItem++;
  15036. this.$forceUpdate();
  15037. },
  15038. deletecheckList(json, index) {
  15039. // json.checkList.length--;
  15040. json.checkList.splice(index, 1);
  15041. json.askItem--;
  15042. this.$forceUpdate();
  15043. },
  15044. addTcheckList(json, index) {
  15045. // json.checkList.length++;
  15046. json.checkList.splice(index + 1, 0, "");
  15047. json.testItem++;
  15048. this.$forceUpdate();
  15049. },
  15050. deleteTcheckList(json, index) {
  15051. // json.checkList.length--;
  15052. json.checkList.splice(index, 1);
  15053. json.testItem--;
  15054. this.$forceUpdate();
  15055. },
  15056. checkTestType(type, json) {
  15057. json.type = type;
  15058. setTimeout(() => {
  15059. json.answer = [];
  15060. }, 100);
  15061. },
  15062. checkAskType(type, json) {
  15063. json.type = type;
  15064. // json.checkList = [];
  15065. this.$forceUpdate();
  15066. },
  15067. addSelectList(json) {
  15068. json.select.push("");
  15069. json.answer.push("");
  15070. },
  15071. deleteSelectList(json) {
  15072. // json.select.length--;
  15073. // json.answer.length--;
  15074. json.select.splice(json.select.length - 1, 1);
  15075. json.answer.splice(json.answer.length - 1, 1);
  15076. },
  15077. addAsk() {
  15078. if (this.askJson.askTitle === "") {
  15079. this.$message.error("标题不能为空!");
  15080. return;
  15081. }
  15082. var aj = this.askJson.askJson;
  15083. var b = 1;
  15084. for (var i = 0; i < aj.length; i++) {
  15085. if (aj[i].askstitle === "") {
  15086. var a = 1;
  15087. for (let index = 0; index < aj[i].askItem; index++) {
  15088. const element = aj[i].checkList[index]
  15089. ? aj[i].checkList[index]
  15090. : "";
  15091. if (element != "") {
  15092. b++;
  15093. this.$message.error(`请将题目${i + 1}填写完整。`);
  15094. return;
  15095. } else {
  15096. a++;
  15097. }
  15098. }
  15099. if (b == 1) {
  15100. this.$message.error("至少填写一个问题");
  15101. return;
  15102. }
  15103. } else if (aj[i].askstitle != "") {
  15104. for (let index = 0; index < aj[i].askItem; index++) {
  15105. const element = aj[i].checkList[index]
  15106. ? aj[i].checkList[index]
  15107. : "";
  15108. var index = 0;
  15109. for (var z = 0; z < aj[i].checkList.length; z++) {
  15110. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15111. if (checkC != "") {
  15112. index++;
  15113. } else {
  15114. this.$message.error(`题目${i + 1}选项不能为空!`);
  15115. return;
  15116. }
  15117. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15118. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15119. if (checkC == checkC2) {
  15120. this.$message.error(
  15121. `第${i + 1}题的选项${this.optionTypeList[z]}和选项${this.optionTypeList[z2]}重复了,请修改!`
  15122. );
  15123. return;
  15124. }
  15125. }
  15126. }
  15127. b++;
  15128. if (index < 2) {
  15129. this.$message.error("每道题目至少需要设置2个选项。");
  15130. return;
  15131. }
  15132. }
  15133. }
  15134. }
  15135. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  15136. var elc = el.checkList.filter((element) => {
  15137. return element != "";
  15138. });
  15139. return el.askstitle != "" && elc.length != 0;
  15140. });
  15141. if (!this.dialogVisible4) {
  15142. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15143. this.taskCount
  15144. ].toolChoose[this.toolIndex] = this.askJson;
  15145. }
  15146. this.dialogVisible5 = false;
  15147. if (
  15148. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15149. .toolChoose[this.toolIndex].tool != 4
  15150. ) {
  15151. this.addTools(4, this.taskCount, this.toolIndex);
  15152. }
  15153. },
  15154. addTest() {
  15155. // if (this.testJson.testTitle === "") {
  15156. // this.$message.error("标题不能为空!");
  15157. // return;
  15158. // }
  15159. var aj = this.testJson.testJson;
  15160. var b = 1;
  15161. for (var i = 0; i < aj.length; i++) {
  15162. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  15163. var a = 1;
  15164. for (let index = 0; index < aj[i].testItem; index++) {
  15165. const element = aj[i].checkList[index]
  15166. ? aj[i].checkList[index]
  15167. : "";
  15168. if (element != "") {
  15169. b++;
  15170. this.$message.error(`请将题目${i + 1}填写完整。`);
  15171. return;
  15172. } else {
  15173. a++;
  15174. }
  15175. }
  15176. if (b == 1) {
  15177. this.$message.error("至少填写一个问题");
  15178. return;
  15179. }
  15180. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  15181. for (let index = 0; index < aj[i].testItem; index++) {
  15182. const element = aj[i].checkList[index]
  15183. ? aj[i].checkList[index]
  15184. : "";
  15185. var index = 0;
  15186. for (var z = 0; z < aj[i].checkList.length; z++) {
  15187. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15188. if (checkC != "") {
  15189. index++;
  15190. } else {
  15191. this.$message.error(`题目${i + 1}选项不能为空!`);
  15192. return;
  15193. }
  15194. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15195. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15196. if (checkC == checkC2) {
  15197. this.$message.error(
  15198. `第${i + 1}题的选项${this.optionTypeList[z]}和选项${this.optionTypeList[z2]}重复了,请修改!`
  15199. );
  15200. return;
  15201. }
  15202. }
  15203. }
  15204. b++;
  15205. if (index < 2) {
  15206. this.$message.error("每道题目至少需要设置2个选项。");
  15207. return;
  15208. }
  15209. if (
  15210. (aj[i].type == "2" && !aj[i].answer.length) ||
  15211. (aj[i].type == "1" &&
  15212. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  15213. (aj[i].answer !== 0 && !aj[i].answer)))
  15214. ) {
  15215. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  15216. return;
  15217. }
  15218. }
  15219. }
  15220. }
  15221. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15222. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15223. var elc = el.checkList.filter((element) => {
  15224. return element != "";
  15225. });
  15226. return (
  15227. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  15228. );
  15229. });
  15230. isTestJson.testCount = isTestJson.testJson.length;
  15231. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15232. this.taskCount
  15233. ].toolChoose[this.toolIndex].testJson = isTestJson;
  15234. this.dialogVisibleChoice = false;
  15235. if (
  15236. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15237. .toolChoose[this.toolIndex].tool != 45
  15238. ) {
  15239. this.addTools(45, this.taskCount, this.toolIndex);
  15240. }
  15241. },
  15242. addVideoJson(videoJson) {
  15243. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15244. this.taskCount
  15245. ].toolChoose[this.toolIndex].videoJson = videoJson;
  15246. this.dialogVisibleVideo = false;
  15247. if (
  15248. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15249. .toolChoose[this.toolIndex].tool != 62
  15250. ) {
  15251. this.addTools(62, this.taskCount, this.toolIndex);
  15252. }
  15253. },
  15254. //自动获取剪贴板
  15255. pasteOption() {
  15256. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15257. if (!iframe) {
  15258. this.$message.error("请使用AI共创生成题目");
  15259. return;
  15260. }
  15261. let copyData = iframe.contentWindow.copyData;
  15262. if (!copyData || !copyData.selectData.length) {
  15263. this.$message.error("请使用AI共创生成题目");
  15264. return;
  15265. }
  15266. let selectData = copyData.selectData;
  15267. for (var i = 0; i < selectData.length; i++) {
  15268. let answer = 0;
  15269. switch (selectData[i].answer[0]) {
  15270. case "A":
  15271. answer = 0;
  15272. break;
  15273. case "B":
  15274. answer = 1;
  15275. break;
  15276. case "C":
  15277. answer = 2;
  15278. break;
  15279. case "D":
  15280. answer = 3;
  15281. break;
  15282. case "E":
  15283. answer = 4;
  15284. break;
  15285. default:
  15286. break;
  15287. }
  15288. this.testJson.testJson.push({
  15289. teststitle: selectData[i].subject,
  15290. testItem: selectData[i].options.length,
  15291. checkList: selectData[i].options,
  15292. timuList: [],
  15293. answer: answer,
  15294. type: "1",
  15295. });
  15296. this.testJson.testCount++;
  15297. }
  15298. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15299. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15300. var elc = el.checkList.filter((element) => {
  15301. return element != "";
  15302. });
  15303. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  15304. });
  15305. isTestJson.testCount = isTestJson.testJson.length;
  15306. if (!isTestJson.testCount) {
  15307. return;
  15308. }
  15309. this.testJson = isTestJson;
  15310. this.$forceUpdate();
  15311. },
  15312. pasteTask(taskJson) {
  15313. let stageTasksData = [];
  15314. if (taskJson) {
  15315. stageTasksData = taskJson;
  15316. } else {
  15317. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15318. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  15319. if (!iframe && !iframe2) {
  15320. this.$message.error("请使用AI共创生成");
  15321. return;
  15322. }
  15323. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15324. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15325. if (
  15326. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  15327. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  15328. ) {
  15329. this.$message.error("请使用AI共创生成");
  15330. return;
  15331. }
  15332. stageTasksData = copyData
  15333. ? copyData.tasksData
  15334. : copyData2
  15335. ? copyData2.tasksData
  15336. : [{ taskName: "", taskDecs: "" }];
  15337. }
  15338. let taskA = [];
  15339. let tasks = stageTasksData;
  15340. for (var j = 0; j < tasks.length; j++) {
  15341. taskA.push({
  15342. task: tasks[j].taskName,
  15343. taskDetail: tasks[j].taskDecs,
  15344. chapterData: [],
  15345. toolText: "",
  15346. toolChoose: [
  15347. {
  15348. tool: [],
  15349. toolDetail: "",
  15350. toolType: 0,
  15351. askCount: 1,
  15352. askTitle: "",
  15353. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15354. },
  15355. ],
  15356. isShowTools: false,
  15357. askCount: 1,
  15358. isFold: 1,
  15359. askTitle: "",
  15360. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15361. checkJson: [{ checkCount: [], checkPerent: [] }],
  15362. homeworkList: [],
  15363. });
  15364. }
  15365. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  15366. this.$forceUpdate();
  15367. },
  15368. pasteStage(stageJson) {
  15369. let stageData = [];
  15370. if (stageJson) {
  15371. stageData = stageJson;
  15372. } else {
  15373. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15374. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  15375. if (!iframe && !iframe2) {
  15376. this.$message.error("请使用AI共创生成");
  15377. return;
  15378. }
  15379. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15380. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15381. if (
  15382. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  15383. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  15384. ) {
  15385. this.$message.error("请使用AI共创生成");
  15386. return;
  15387. }
  15388. stageData = copyData
  15389. ? copyData.stageData
  15390. : copyData2
  15391. ? copyData2.stageData
  15392. : [""];
  15393. }
  15394. let stage = [];
  15395. for (var i = 0; i < stageData.length; i++) {
  15396. stage.push({
  15397. dyName: stageData[i], //单元标题
  15398. chapterInfo: [
  15399. {
  15400. isread: false,
  15401. chapterid: this.guid(),
  15402. title: "",
  15403. courseName: "",
  15404. taskJson: [
  15405. {
  15406. task: "",
  15407. taskDetail: "",
  15408. chapterData: [],
  15409. toolText: "",
  15410. toolChoose: [
  15411. {
  15412. tool: [],
  15413. toolDetail: "",
  15414. toolType: 0,
  15415. askCount: 1,
  15416. askTitle: "",
  15417. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15418. },
  15419. ],
  15420. isShowTools: false,
  15421. askCount: 1,
  15422. isFold: 1,
  15423. askTitle: "",
  15424. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15425. checkJson: [{ checkCount: [], checkPerent: [] }],
  15426. homeworkList: [],
  15427. },
  15428. ],
  15429. itemCount: 1,
  15430. fileList1: [],
  15431. video: [],
  15432. testData: [],
  15433. pData: [],
  15434. templateArray: [],
  15435. },
  15436. ],
  15437. });
  15438. }
  15439. let _this = this;
  15440. if (stageJson) {
  15441. if (!_this.cid) {
  15442. _this.unitJson = stage;
  15443. } else {
  15444. _this.unitIndex = 0;
  15445. _this.unitJson = stage;
  15446. _this.updateWork();
  15447. }
  15448. } else {
  15449. _this
  15450. .$confirm(
  15451. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  15452. "提示",
  15453. {
  15454. confirmButtonText: "确定",
  15455. cancelButtonText: "取消",
  15456. type: "warning",
  15457. }
  15458. )
  15459. .then(() => {
  15460. _this.unitIndex = 0;
  15461. _this.unitJson = stage;
  15462. // _this.steps++;
  15463. _this.updateWork();
  15464. })
  15465. .catch(() => {
  15466. return;
  15467. });
  15468. }
  15469. },
  15470. openStageBox() {
  15471. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  15472. this.dialogVisibleStageChange = true;
  15473. },
  15474. updateChange() {
  15475. this.$confirm(
  15476. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  15477. "提示",
  15478. {
  15479. confirmButtonText: "确定",
  15480. cancelButtonText: "取消",
  15481. type: "warning",
  15482. }
  15483. )
  15484. .then(() => {
  15485. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  15486. this.updateWork();
  15487. this.dialogVisibleStageChange = false;
  15488. })
  15489. .catch(() => {
  15490. return;
  15491. });
  15492. },
  15493. addAnswer() {
  15494. if (this.answerQ == "") {
  15495. this.$message.error("请输入您想要问的问题");
  15496. return;
  15497. }
  15498. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15499. this.taskCount
  15500. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15501. this.dialogVisible8 = false;
  15502. if (
  15503. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15504. .toolChoose[this.toolIndex].tool != 15
  15505. ) {
  15506. this.addTools(15, this.taskCount, this.toolIndex);
  15507. }
  15508. },
  15509. addMp3Answer() {
  15510. if (this.answerQ == "") {
  15511. this.$message.error("请输入您想要回答的问题");
  15512. return;
  15513. }
  15514. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15515. this.taskCount
  15516. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15517. this.dialogVisibleMp3 = false;
  15518. },
  15519. addRateAnswer() {
  15520. var a = 1;
  15521. for (var i = 0; i < this.rateJson.length; i++) {
  15522. if (this.rateJson[i].value == "") {
  15523. a = 2;
  15524. break;
  15525. }
  15526. }
  15527. if (a == 2) {
  15528. this.$message.error("请把评价信息填写完整");
  15529. return;
  15530. }
  15531. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15532. this.taskCount
  15533. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  15534. this.dialogVisibleRate = false;
  15535. if (
  15536. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15537. .toolChoose[this.toolIndex].tool != 40
  15538. ) {
  15539. this.addTools(40, this.taskCount, this.toolIndex);
  15540. }
  15541. },
  15542. addSelectAnswer() {
  15543. if (this.selectJson.url == "") {
  15544. this.$message.error("请上传题目");
  15545. return;
  15546. }
  15547. if (!this.selectJson.select.length) {
  15548. this.$message.error("请添加选项");
  15549. return;
  15550. }
  15551. if (!this.selectJson.answer.length) {
  15552. this.$message.error("请设置答案");
  15553. return;
  15554. }
  15555. var a = 1;
  15556. for (var i = 0; i < this.selectJson.answer.length; i++) {
  15557. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  15558. a = 2;
  15559. }
  15560. }
  15561. if (a == 2) {
  15562. this.$message.error("请设置答案");
  15563. return;
  15564. }
  15565. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15566. this.taskCount
  15567. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  15568. this.dialogVisibleSelect = false;
  15569. if (
  15570. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15571. .toolChoose[this.toolIndex].tool != 41
  15572. ) {
  15573. this.addTools(41, this.taskCount, this.toolIndex);
  15574. }
  15575. },
  15576. nextSelectSteps() {
  15577. if (this.selectJson.url == "") {
  15578. this.$message.error("请上传题目");
  15579. return;
  15580. }
  15581. if (!this.selectJson.select.length) {
  15582. this.$message.error("请添加选项");
  15583. return;
  15584. } else {
  15585. for (var z = 0; z < this.selectJson.select.length; z++) {
  15586. let checkC = this.selectJson.select[z];
  15587. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  15588. let checkC2 = this.selectJson.select[z2];
  15589. if (checkC == checkC2) {
  15590. this.$message.error(
  15591. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  15592. );
  15593. return;
  15594. }
  15595. }
  15596. }
  15597. }
  15598. var a = 1;
  15599. for (var i = 0; i < this.selectJson.select.length; i++) {
  15600. if (!this.selectJson.select[i]) {
  15601. a = 2;
  15602. }
  15603. }
  15604. if (a == 2) {
  15605. this.$message.error("添加的选项不能为空");
  15606. return;
  15607. }
  15608. this.selectSteps++;
  15609. },
  15610. selectCourseDetail() {
  15611. if (this.cid == "" || this.cid == undefined) {
  15612. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  15613. this.isTeacherSee = true;
  15614. }
  15615. console.log("这是新增课程");
  15616. this.selectAllType();
  15617. this.chatid = uuidv4();
  15618. // this.courseTextB = false
  15619. } else {
  15620. this.isOutline = true
  15621. this.isOutline2 = true
  15622. this.cpoteType = 4
  15623. this.cidType = 1;
  15624. let params = {
  15625. cid: this.cid,
  15626. };
  15627. this.ajax
  15628. .get(this.$store.state.api + "select_course_detail", params)
  15629. .then((res) => {
  15630. this.unitJson = JSON.parse(res.data[0][0].chapters);
  15631. this.courseState = res.data[0][0].state;
  15632. for (var j = 0; j < this.unitJson.length; j++) {
  15633. for (
  15634. var k = 0;
  15635. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  15636. k++
  15637. ) {
  15638. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  15639. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15640. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15641. : [];
  15642. let _chapterData = [];
  15643. for (
  15644. var c = 0;
  15645. c <
  15646. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  15647. .length;
  15648. c++
  15649. ) {
  15650. if (
  15651. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15652. ) {
  15653. _chapterData.push(
  15654. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15655. );
  15656. }
  15657. }
  15658. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  15659. _chapterData;
  15660. }
  15661. }
  15662. this.$forceUpdate();
  15663. this.courseName = res.data[0][0].title;
  15664. this.searchFileName = JSON.parse(JSON.stringify(this.courseName))
  15665. this.courseText = res.data[0][0].brief;
  15666. this.courseText2 = res.data[0][0].reBrief;
  15667. this.evalua = res.data[0][0].evaId;
  15668. this.cover = JSON.parse(res.data[0][0].cover);
  15669. this.noneBtnImg = this.cover.length >= 1;
  15670. if (res.data[0][0].refile) {
  15671. this.infoData = JSON.parse(res.data[0][0].refile)
  15672. }
  15673. // this.checkboxList =
  15674. // res.data[0][0].course_student.length > 0
  15675. // ? JSON.parse(res.data[0][0].course_student)
  15676. // : [];
  15677. this.checkboxList2 = res.data[0][0].juri
  15678. ? res.data[0][0].juri.split(",")
  15679. : [];
  15680. this.inviteCode = [];
  15681. for (var i = 0; i < res.data[2].length; i++) {
  15682. this.inviteCode.push({
  15683. cid: res.data[2][i].classid,
  15684. ic: res.data[2][i].code,
  15685. });
  15686. }
  15687. this.checkboxList3 = res.data[0][0].course_teacher
  15688. ? res.data[0][0].course_teacher.split(",")
  15689. : [];
  15690. // this.isTeacherSee =
  15691. // res.data[0][0].is_teacher_look == 0 ? true : false;
  15692. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15693. this.myWord = res.data[0][0].template;
  15694. this.templateC.id = "123";
  15695. this.courseUserid = res.data[0][0].userid;
  15696. // if(this.courseUserid == this.userid){
  15697. // this.InviteChange(this.checkboxList2)
  15698. // }
  15699. this.nbOrder = res.data[0][0].ordernumber;
  15700. this.courseTypeId = [];
  15701. for (var i = 0; i < res.data[1].length; i++) {
  15702. this.courseTypeId.push(res.data[1][i].typeid);
  15703. }
  15704. console.log(this.courseTypeId);
  15705. // if (this.timer) clearInterval(this.timer);
  15706. if (this.timer) clearTimeout(this.timer);
  15707. this.timer = null;
  15708. // this.timer = setInterval(() => {
  15709. if(res.data[3].length){
  15710. try {
  15711. this.aiJson = JSON.parse(res.data[3][0].tips);
  15712. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15713. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15714. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15715. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15716. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15717. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15718. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15719. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15720. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15721. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15722. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15723. }
  15724. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15725. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15726. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15727. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15728. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15729. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15730. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15731. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15732. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15733. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15734. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15735. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15736. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15737. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15738. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15739. 讨论:<转文本内容>`
  15740. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15741. this.templateid = res.data[3][0].template;
  15742. this.getTipsTemplateIsDialog()
  15743. }catch(error){
  15744. console.error(error)
  15745. }
  15746. }
  15747. if(res.data[0][0].cpote){
  15748. try {
  15749. this.cpote = JSON.parse(res.data[0][0].cpote);
  15750. }catch(error){
  15751. console.error(error)
  15752. }
  15753. }
  15754. if(res.data[0][0].setting){
  15755. try {
  15756. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15757. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15758. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  15759. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15760. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15761. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15762. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15763. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15764. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15765. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  15766. 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;
  15767. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15768. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15769. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15770. 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;
  15771. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15772. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15773. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15774. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15775. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15776. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15777. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15778. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15779. this.courseTextBool = true
  15780. }
  15781. // if(!this.teacherCourseText && !this.targetCourseText2){
  15782. // this.isuseT = 1
  15783. // }
  15784. }catch(error){
  15785. console.error(error)
  15786. }
  15787. }
  15788. if(this.courseText){
  15789. this.courseTextB = false
  15790. }
  15791. if(this.teacherCourseText){
  15792. this.teacherCourseTextB = false
  15793. }
  15794. if(this.targetCourseText){
  15795. this.targetCourseTextB = false
  15796. }
  15797. if(this.targetCourseText2){
  15798. this.targetCourseText2B = false
  15799. }
  15800. this.isFileSearch = res.data[0][0].iresearch == 1
  15801. // this.seleteCourseUpdate();
  15802. this.setMan();
  15803. this.selectAllType();
  15804. this.unitJson[
  15805. this.unitIndex
  15806. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15807. // }, 5000);
  15808. this.$forceUpdate();
  15809. setTimeout(() => {
  15810. this.checkEva(this.evalua);
  15811. setTimeout(() => {
  15812. this.checkEva(this.evalua);
  15813. }, 100);
  15814. }, 100);
  15815. })
  15816. .catch((err) => {
  15817. console.error(err);
  15818. });
  15819. }
  15820. if(this.aiId){
  15821. let params = {
  15822. cid: this.aiId,
  15823. };
  15824. this.ajax
  15825. .get(this.$store.state.api + "select_course_detail", params)
  15826. .then((res) => {
  15827. let _unitJson = JSON.parse(res.data[0][0].chapters);
  15828. let fileInfo = []
  15829. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  15830. for(var i = 0; i < _unitJson.length; i++){
  15831. let tasks = _unitJson[i].chapterInfo[0].taskJson
  15832. for(var j = 0; j < tasks.length; j++){
  15833. let _infoData = tasks[j].chapterData.filter(el => {
  15834. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  15835. })
  15836. if(_infoData.length){
  15837. fileInfo = [...fileInfo, ..._infoData]
  15838. }
  15839. }
  15840. }
  15841. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  15842. this.$forceUpdate();
  15843. this.courseName = res.data[0][0].title;
  15844. this.courseText = res.data[0][0].brief;
  15845. this.courseText2 = res.data[0][0].reBrief;
  15846. this.cover = JSON.parse(res.data[0][0].cover);
  15847. this.noneBtnImg = this.cover.length >= 1;
  15848. this.checkboxList2 = res.data[0][0].juri
  15849. ? res.data[0][0].juri.split(",")
  15850. : [];
  15851. this.inviteCode = [];
  15852. for (var i = 0; i < res.data[2].length; i++) {
  15853. this.inviteCode.push({
  15854. cid: res.data[2][i].classid,
  15855. ic: res.data[2][i].code,
  15856. });
  15857. }
  15858. this.checkboxList3 = res.data[0][0].course_teacher
  15859. ? res.data[0][0].course_teacher.split(",")
  15860. : [];
  15861. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15862. this.myWord = res.data[0][0].template;
  15863. this.templateC.id = "123";
  15864. this.courseTypeId = [];
  15865. for (var i = 0; i < res.data[1].length; i++) {
  15866. this.courseTypeId.push(res.data[1][i].typeid);
  15867. }
  15868. console.log(this.courseTypeId);
  15869. if(res.data[3].length){
  15870. try {
  15871. this.aiJson = JSON.parse(res.data[3][0].tips);
  15872. this.templateid = res.data[3][0].template;
  15873. this.getTipsTemplateIsDialog()
  15874. }catch(error){
  15875. console.error(error)
  15876. }
  15877. }
  15878. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15879. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15880. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15881. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15882. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15883. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15884. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15885. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15886. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15887. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15888. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15889. }
  15890. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15891. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15892. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15893. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15894. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15895. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15896. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15897. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15898. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15899. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15900. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15901. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15902. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15903. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15904. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15905. 讨论:<转文本内容>`
  15906. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15907. if(res.data[0][0].cpote){
  15908. try {
  15909. this.cpote = JSON.parse(res.data[0][0].cpote);
  15910. }catch(error){
  15911. console.error(error)
  15912. }
  15913. }
  15914. if(res.data[0][0].setting){
  15915. try {
  15916. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15917. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15918. 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];
  15919. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15920. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15921. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15922. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15923. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15924. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15925. 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];
  15926. 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;
  15927. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15928. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15929. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15930. 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;
  15931. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15932. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15933. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15934. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15935. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15936. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15937. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15938. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15939. this.courseTextBool = true
  15940. }
  15941. // if(!this.teacherCourseText && !this.targetCourseText2){
  15942. // this.isuseT = 1
  15943. // }
  15944. }catch(error){
  15945. console.error(error)
  15946. }
  15947. }
  15948. if(this.teacherInfoData.length){
  15949. this.isuseT = true
  15950. }
  15951. if(this.courseText){
  15952. this.courseTextB = false
  15953. }
  15954. if(this.teacherCourseText){
  15955. this.teacherCourseTextB = false
  15956. }
  15957. if(this.targetCourseText){
  15958. this.targetCourseTextB = false
  15959. }
  15960. if(this.targetCourseText2){
  15961. this.targetCourseText2B = false
  15962. }
  15963. this.setMan();
  15964. this.unitJson[
  15965. this.unitIndex
  15966. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15967. this.$forceUpdate();
  15968. setTimeout(() => {
  15969. this.checkEva(this.evalua);
  15970. setTimeout(() => {
  15971. this.checkEva(this.evalua);
  15972. }, 100);
  15973. }, 100);
  15974. })
  15975. .catch((err) => {
  15976. console.error(err);
  15977. });
  15978. }
  15979. // if(this.cidType != 1 && this.templateid == ''){
  15980. // this.promptShow = true
  15981. // }
  15982. },
  15983. seleteCourseUpdate() {
  15984. let params = {
  15985. cid: this.cid,
  15986. };
  15987. this.ajax
  15988. .get(this.$store.state.api + "select_course_detail", params)
  15989. .then((res) => {
  15990. // console.log(this.unitJson);
  15991. let unitJson = JSON.parse(res.data[0][0].chapters);
  15992. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  15993. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  15994. let _unitJson = [];
  15995. let _chapAarry = [];
  15996. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  15997. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  15998. let index = 1;
  15999. let chapindex;
  16000. if (_unitJson2.length > unitJson.length) {
  16001. for (let c = 0; c < _unitJson2.length; c++) {
  16002. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  16003. }
  16004. for (let j = 0; j < unitJson.length; j++) {
  16005. let count = 0;
  16006. for (let k = 0; k < _unitJson2.length; k++) {
  16007. if (
  16008. unitJson[j].chapterInfo[0].chapterid ==
  16009. _unitJson2[k].chapterInfo[0].chapterid
  16010. ) {
  16011. count++;
  16012. _chapAarry.splice(
  16013. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  16014. 1
  16015. );
  16016. _unitJson.push(unitJson[j]);
  16017. break;
  16018. }
  16019. }
  16020. // if(count === 0){
  16021. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  16022. // }
  16023. }
  16024. for (let k = 0; k < _unitJson2.length; k++) {
  16025. if (_unitJson2[k].isUpdate == 1) {
  16026. _chapAarry.splice(
  16027. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  16028. 1
  16029. );
  16030. _unitJson.push(_unitJson2[k]);
  16031. }
  16032. }
  16033. console.log(_chapAarry);
  16034. for (let d = 0; d < _unitJson2.length; d++) {
  16035. if (
  16036. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  16037. ) {
  16038. if (_unitIndex == d) {
  16039. index = 2;
  16040. }
  16041. chapindex = d;
  16042. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  16043. }
  16044. }
  16045. } else {
  16046. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  16047. }
  16048. for (let i = 0; i < unitJson.length; i++) {
  16049. if (
  16050. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  16051. _unitJson[i].chapterInfo[0].chapterid !=
  16052. unitJson[i].chapterInfo[0].chapterid
  16053. ) {
  16054. if (i == _unitJson.length - 1) {
  16055. // this.unitIndex++
  16056. _unitIndex2++;
  16057. }
  16058. _unitJson.splice(i, 0, unitJson[i]);
  16059. } else if (i > _unitJson.length - 1) {
  16060. _unitJson.push(unitJson[i]);
  16061. } else if (
  16062. _unitJson[i].chapterInfo[0].chapterid ==
  16063. unitJson[i].chapterInfo[0].chapterid
  16064. ) {
  16065. _unitJson[i] = unitJson[i];
  16066. }
  16067. // if (i == _unitIndex) {
  16068. // continue;
  16069. // } else
  16070. }
  16071. if (_chapAarry.length && index != 2) {
  16072. if (chapindex < _unitIndex) {
  16073. this.isDelete = 2;
  16074. // this.unitIndex--;
  16075. _unitIndex2--;
  16076. } else if (
  16077. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  16078. _unitJson[_unitIndex].chapterInfo[0].chapterid
  16079. ) {
  16080. this.isDelete = 2;
  16081. for (let n = 0; n < _unitJson.length; n++) {
  16082. if (
  16083. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  16084. _unitJson[n].chapterInfo[0].chapterid
  16085. ) {
  16086. // this.unitIndex = n;
  16087. _unitIndex2 = n;
  16088. _unitJson[n] = _unitJson2[_unitIndex];
  16089. break;
  16090. }
  16091. }
  16092. }
  16093. } else if (index != 2) {
  16094. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  16095. _unitJson2[_unitIndex];
  16096. for (
  16097. var ci = 0;
  16098. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  16099. ci++
  16100. ) {
  16101. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  16102. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  16103. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16104. .toolChoose
  16105. : [];
  16106. let _chapterData = [];
  16107. for (
  16108. var c = 0;
  16109. c <
  16110. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  16111. .length;
  16112. c++
  16113. ) {
  16114. if (
  16115. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16116. .chapterData[c]
  16117. ) {
  16118. _chapterData.push(
  16119. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16120. .chapterData[c]
  16121. );
  16122. }
  16123. }
  16124. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  16125. _chapterData;
  16126. }
  16127. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  16128. }
  16129. if (index == 1) {
  16130. this.unitJson = _unitJson;
  16131. this.$forceUpdate();
  16132. setTimeout(() => {
  16133. if (this.unitIndex != _unitIndex2) {
  16134. this.isDelete = 2;
  16135. this.unitIndex = _unitIndex2;
  16136. }
  16137. }, 0);
  16138. this.timer = setTimeout(() => {
  16139. this.seleteCourseUpdate();
  16140. }, 5000);
  16141. } else if (index == 2) {
  16142. let _this = this;
  16143. _this
  16144. .$confirm(
  16145. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  16146. "提示",
  16147. {
  16148. confirmButtonText: "需要",
  16149. cancelButtonText: "取消",
  16150. type: "warning",
  16151. }
  16152. )
  16153. .then(() => {
  16154. if (_this.time()) {
  16155. _this.restoreWork(
  16156. _chapAarry[0],
  16157. _unitJson,
  16158. chapindex,
  16159. _unitJson2,
  16160. _unitIndex2
  16161. );
  16162. }
  16163. })
  16164. .catch(() => {
  16165. _this.unitJson = _unitJson;
  16166. _this.$forceUpdate();
  16167. setTimeout(() => {
  16168. if (this.unitIndex != _unitIndex2) {
  16169. this.isDelete = 2;
  16170. this.unitIndex = _unitIndex2;
  16171. }
  16172. }, 0);
  16173. _this.timer = setTimeout(() => {
  16174. _this.seleteCourseUpdate();
  16175. }, 5000);
  16176. });
  16177. }
  16178. // 在复制操作之前记录滚动位置
  16179. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16180. // 执行复制操作
  16181. // 复制操作完成后恢复滚动位置
  16182. this.$nextTick(() => {
  16183. if (this.$refs.scrollContainer) {
  16184. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16185. }
  16186. });
  16187. })
  16188. .catch((err) => {
  16189. console.error(err);
  16190. });
  16191. },
  16192. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  16193. let params = [
  16194. {
  16195. cid: this.cid,
  16196. chapters: JSON.stringify(this.unitJson),
  16197. uid: this.userid,
  16198. chapid: chapid,
  16199. },
  16200. ];
  16201. this.ajax
  16202. .post(this.$store.state.api + "restoreWork", params)
  16203. .then((res) => {
  16204. this.$message({
  16205. message: "恢复成功",
  16206. type: "success",
  16207. });
  16208. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  16209. this.unitJson = unitJson;
  16210. this.$forceUpdate();
  16211. setTimeout(() => {
  16212. if (this.unitIndex != unitIndex2) {
  16213. this.isDelete = 2;
  16214. this.unitIndex = unitIndex2;
  16215. }
  16216. }, 0);
  16217. this.timer = setTimeout(() => {
  16218. this.seleteCourseUpdate();
  16219. }, 5000);
  16220. })
  16221. .catch((err) => {
  16222. this.$message.error("网络不佳");
  16223. console.error(err);
  16224. });
  16225. },
  16226. getTypeName() {
  16227. console.log(this.courseTypeId);
  16228. this.$forceUpdate();
  16229. },
  16230. selectAllType() {
  16231. let params = {
  16232. org: this.org && this.org != "" ? this.org : "",
  16233. oid: this.oid && this.oid != "" ? this.oid : "",
  16234. stand: "cn"
  16235. };
  16236. this.ajax
  16237. .get(this.$store.state.api + "selectAllTypeStand", params)
  16238. .then((res) => {
  16239. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16240. res.data[0] = [...res.data[0], ...res.data[4]];
  16241. }
  16242. this.CourseType = res.data;
  16243. this.CourseType2 = [
  16244. { name: "智见课程", id: [] },
  16245. { name: "智行课程", id: [] },
  16246. { name: "智创课程", id: [] },
  16247. ];
  16248. for (var cti = 0; cti < res.data[0].length; cti++) {
  16249. if (
  16250. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16251. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  16252. ) {
  16253. this.CourseType2[0].id.push(res.data[0][cti].id);
  16254. } else if (
  16255. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  16256. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16257. ) {
  16258. this.CourseType2[1].id.push(res.data[0][cti].id);
  16259. } else if (
  16260. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16261. ) {
  16262. this.CourseType2[2].id.push(res.data[0][cti].id);
  16263. }
  16264. if (
  16265. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16266. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  16267. ) {
  16268. res.data[0][cti].name = "年级";
  16269. } else if (
  16270. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  16271. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16272. ) {
  16273. res.data[0][cti].name = "学科";
  16274. } else if (
  16275. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16276. ) {
  16277. res.data[0][cti].name = "主题";
  16278. }
  16279. }
  16280. let _courseTypeId = [];
  16281. for (var i = 0; i < res.data[0].length; i++) {
  16282. if (!this.cid) {
  16283. this.courseTypeId[res.data[0][i].id] = [];
  16284. }
  16285. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  16286. // }
  16287. this.CourseTypeJson[res.data[0][i].id] = [];
  16288. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16289. if (res.data[0][i].name == "栏目") {
  16290. this.CourseType[0][i].name = "主题";
  16291. }
  16292. }
  16293. if (res.data[2].length == 0 && res.data[3].length == 0) {
  16294. for (var j = 0; j < res.data[1].length; j++) {
  16295. if (
  16296. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  16297. _courseTypeId.indexOf(res.data[1][j].id) == -1
  16298. ) {
  16299. _courseTypeId.push(res.data[1][j].id);
  16300. }
  16301. if (res.data[0][i].id == res.data[1][j].pid) {
  16302. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16303. }
  16304. }
  16305. } else {
  16306. if (res.data[2].length > 0) {
  16307. for (var j = 0; j < res.data[2].length; j++) {
  16308. if (
  16309. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  16310. _courseTypeId.indexOf(res.data[2][j].id) == -1
  16311. ) {
  16312. _courseTypeId.push(res.data[2][j].id);
  16313. }
  16314. if (res.data[0][i].id == res.data[2][j].pid) {
  16315. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16316. }
  16317. }
  16318. }
  16319. if (res.data[3].length > 0) {
  16320. for (var j = 0; j < res.data[3].length; j++) {
  16321. if (
  16322. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  16323. _courseTypeId.indexOf(res.data[3][j].id) == -1
  16324. ) {
  16325. _courseTypeId.push(res.data[3][j].id);
  16326. }
  16327. if (res.data[0][i].id == res.data[3][j].pid) {
  16328. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16329. }
  16330. }
  16331. }
  16332. }
  16333. }
  16334. this.courseTypeId = _courseTypeId;
  16335. this.typeC1 = this.getTypeC(2)
  16336. this.typeC2 = this.getTypeC(1)
  16337. })
  16338. .catch((err) => {
  16339. console.error(err);
  16340. });
  16341. },
  16342. selectType() {
  16343. this.ajax
  16344. .get(this.$store.state.api + "selectType")
  16345. .then((res) => {
  16346. this.CourseType = res.data;
  16347. for (var i = 0; i < res.data[0].length; i++) {
  16348. if (!this.cid) {
  16349. this.courseTypeId[res.data[0][i].id] = "";
  16350. }
  16351. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16352. if (res.data[0][i].name == "栏目") {
  16353. this.CourseType[0][i].name = "主题";
  16354. }
  16355. }
  16356. for (var j = 0; j < res.data[1].length; j++) {
  16357. if (res.data[0][i].id == res.data[1][j].pid) {
  16358. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16359. this.CourseTypeJson[res.data[0][i].id] = [];
  16360. }
  16361. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16362. }
  16363. }
  16364. }
  16365. this.selectTypeByOid();
  16366. this.selectTypeByOrg();
  16367. })
  16368. .catch((err) => {
  16369. console.error(err);
  16370. });
  16371. },
  16372. selectTypeByOid() {
  16373. let params = {
  16374. oid: this.oid,
  16375. };
  16376. this.ajax
  16377. .get(this.$store.state.api + "selectTypeByOid", params)
  16378. .then((res) => {
  16379. for (var i = 0; i < res.data[0].length; i++) {
  16380. for (var j = 0; j < res.data[1].length; j++) {
  16381. if (res.data[0][i].id == res.data[1][j].pid) {
  16382. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16383. this.CourseTypeJson[res.data[0][i].id] = [];
  16384. }
  16385. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16386. }
  16387. }
  16388. }
  16389. })
  16390. .catch((err) => {
  16391. console.error(err);
  16392. });
  16393. },
  16394. selectTypeByOrg() {
  16395. let params = {
  16396. oid: this.org,
  16397. };
  16398. this.ajax
  16399. .get(this.$store.state.api + "selectTypeByOrg", params)
  16400. .then((res) => {
  16401. for (var i = 0; i < res.data[0].length; i++) {
  16402. for (var j = 0; j < res.data[1].length; j++) {
  16403. if (res.data[0][i].id == res.data[1][j].pid) {
  16404. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16405. this.CourseTypeJson[res.data[0][i].id] = [];
  16406. }
  16407. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16408. }
  16409. }
  16410. }
  16411. this.$forceUpdate();
  16412. })
  16413. .catch((err) => {
  16414. console.error(err);
  16415. });
  16416. },
  16417. OtherMb(type, task) {
  16418. if (task === 0 || task) {
  16419. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16420. task
  16421. ].isEvaFold = true;
  16422. }
  16423. this.typeMode = type;
  16424. setTimeout(() => {
  16425. this.checkEva(this.checkId);
  16426. setTimeout(() => {
  16427. this.checkEva(this.checkId);
  16428. }, 100);
  16429. }, 100);
  16430. },
  16431. openMember() {
  16432. this.searchTN = "";
  16433. this.getTeacher();
  16434. this.dialogVisibleMember = true;
  16435. },
  16436. checkEva(id, type) {
  16437. this.dialogVisiblemb = false;
  16438. this.selectEva();
  16439. if (this.evalua != id && type == 2) {
  16440. this.$message.success("导入成功");
  16441. setTimeout(() => {
  16442. this.checkEva(id);
  16443. }, 100);
  16444. }
  16445. this.evalua = id;
  16446. this.checkId = id;
  16447. if (this.evalua != "") {
  16448. for (var i = 0; i < this.evaJuri.length; i++) {
  16449. if (this.evalua == this.evaJuri[i].id) {
  16450. this.eTitle = this.evaJuri[i].title;
  16451. this.eJson = JSON.parse(this.evaJuri[i].content);
  16452. }
  16453. }
  16454. this.data.data = [];
  16455. this.$forceUpdate();
  16456. setTimeout(() => {
  16457. this.setMindData();
  16458. }, 1000);
  16459. }
  16460. },
  16461. deleteEva() {
  16462. let _this = this;
  16463. if (_this.evalua == "") {
  16464. this.$message.warning("内容已经清空了,请勿重复清空");
  16465. return;
  16466. }
  16467. _this
  16468. .$confirm("确定删除此目标吗?", "提示", {
  16469. confirmButtonText: "确定",
  16470. cancelButtonText: "取消",
  16471. type: "warning",
  16472. })
  16473. .then(() => {
  16474. _this.evalua = "";
  16475. _this.checkId = "";
  16476. _this.eTitle = "";
  16477. let _unitJson = _this.unitJson;
  16478. for (var i = 0; i < _unitJson.length; i++) {
  16479. let _task = _unitJson[i].chapterInfo[0].taskJson;
  16480. for (var j = 0; j < _task.length; j++) {
  16481. let _eList = _task[j].eList;
  16482. for (var k = 0; k < _eList.length; k++) {
  16483. delete _eList[k].target;
  16484. }
  16485. }
  16486. }
  16487. _this.$forceUpdate();
  16488. if (_this.cid) {
  16489. _this.updateWork();
  16490. }
  16491. })
  16492. .catch(() => {
  16493. return;
  16494. });
  16495. },
  16496. selectEva() {
  16497. let params = {
  16498. oid: this.oid,
  16499. };
  16500. this.ajax
  16501. .get(this.$store.state.api + "selectAllEvaluation", params)
  16502. .then((res) => {
  16503. this.evaJuri = res.data[0];
  16504. // 在复制操作之前记录滚动位置
  16505. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16506. // 执行复制操作
  16507. // 复制操作完成后恢复滚动位置
  16508. this.$nextTick(() => {
  16509. if (this.$refs.scrollContainer) {
  16510. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16511. }
  16512. });
  16513. })
  16514. .catch((err) => {
  16515. console.error(err);
  16516. });
  16517. },
  16518. setMindData() {
  16519. let targetArray = [];
  16520. this.data.data = [];
  16521. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  16522. let _eJson = Object.keys(this.eJson);
  16523. let _e = this.eJson;
  16524. for (let i = 0; i < _eJson.length; i++) {
  16525. let element = _e[_eJson[i]];
  16526. this.data.data.push({
  16527. id: element.id,
  16528. parentid: "root",
  16529. topic: element.name,
  16530. });
  16531. // targetArray.push({
  16532. // id: element.id,
  16533. // parentid: "root",
  16534. // name: element.name,
  16535. // });
  16536. targetArray.push({
  16537. value: element.name,
  16538. label: element.name,
  16539. children: [],
  16540. });
  16541. let _eJsonc = Object.keys(element.child);
  16542. let _e2 = element.child;
  16543. for (let j = 0; j < _eJsonc.length; j++) {
  16544. let _ec = _e2[_eJsonc[j]];
  16545. this.data.data.push({
  16546. id: _ec.id,
  16547. parentid: element.id,
  16548. topic: _ec.name,
  16549. });
  16550. // targetArray.push({
  16551. // id: _ec.id,
  16552. // parentid: element.id,
  16553. // name: _ec.name,
  16554. // });
  16555. targetArray[i].children.push({
  16556. value: _ec.name,
  16557. label: _ec.name,
  16558. children: [],
  16559. });
  16560. let _eJsonz = Object.keys(_ec.child);
  16561. let _e3 = _ec.child;
  16562. for (let z = 0; z < _eJsonz.length; z++) {
  16563. let _ez = _e3[_eJsonz[z]];
  16564. this.data.data.push({
  16565. id: _ez.id,
  16566. parentid: _ec.id,
  16567. topic: _ez.name,
  16568. });
  16569. // targetArray.push({
  16570. // id: _ez.id,
  16571. // parentid: _ec.id,
  16572. // name: _ez.name,
  16573. // });
  16574. targetArray[i].children[j].children.push({
  16575. value: _ez.name,
  16576. label: _ez.name,
  16577. });
  16578. }
  16579. }
  16580. }
  16581. this.targetArray = targetArray;
  16582. this.$forceUpdate();
  16583. },
  16584. /*添加评价 */
  16585. addEList(index, tIndex) {
  16586. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  16587. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  16588. value: "",
  16589. detail: "",
  16590. score: 5,
  16591. isai: "1",
  16592. })
  16593. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  16594. { value: "", detail: "", score: 5,isai: "1", },
  16595. ]);
  16596. this.$forceUpdate();
  16597. },
  16598. openEList(index, tIndex) {
  16599. this.evaIndex = index;
  16600. this.evatIndex = tIndex;
  16601. this.evaBoxDialog = true;
  16602. },
  16603. addCET(index, tIndex) {
  16604. this.cetIndex = index;
  16605. this.cettIndex = tIndex;
  16606. this.selectAllType1();
  16607. },
  16608. addCETemplate() {
  16609. var array =
  16610. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  16611. .eList;
  16612. let params = [
  16613. {
  16614. uid: this.userid,
  16615. n: this.templateName,
  16616. json: JSON.stringify(array),
  16617. t: 1,
  16618. oid: this.oid,
  16619. },
  16620. ];
  16621. this.ajax
  16622. .post(this.$store.state.api + "addCETShare", params)
  16623. .then((res) => {
  16624. this.addTypeByCET(res.data[0][0].id);
  16625. })
  16626. .catch((err) => {
  16627. this.$message.error("网络不佳");
  16628. console.error(err);
  16629. });
  16630. },
  16631. addTypeByCET(id) {
  16632. if (this.setTypeJson.two == "") {
  16633. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  16634. return;
  16635. }
  16636. let params = {
  16637. cid: id,
  16638. };
  16639. this.ajax
  16640. .get(this.$store.state.api + "deleteCETLabel", params)
  16641. .then((res) => {
  16642. for (var i = 0; i < 2; i++) {
  16643. let tid = "";
  16644. if (i == 0) {
  16645. tid = this.setTypeJson.one;
  16646. } else {
  16647. tid = this.setTypeJson.two;
  16648. }
  16649. let params = [
  16650. {
  16651. cid: id,
  16652. tid: tid,
  16653. uid: this.userid,
  16654. },
  16655. ];
  16656. this.ajax
  16657. .post(this.$store.state.api + "addCETLabel", params)
  16658. .then((res) => {
  16659. this.$message({
  16660. message: "添加成功",
  16661. type: "success",
  16662. });
  16663. this.close();
  16664. })
  16665. .catch((err) => {
  16666. this.$message.error("网络不佳");
  16667. console.error(err);
  16668. });
  16669. }
  16670. })
  16671. .catch((err) => {
  16672. this.$message.error("网络不佳");
  16673. console.error(err);
  16674. });
  16675. },
  16676. updateEvaJson(array) {
  16677. array = array.filter((item) => {
  16678. item.isai = "1"
  16679. return item;
  16680. });
  16681. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  16682. this.evatIndex
  16683. ].eList = array;
  16684. },
  16685. forceUpdate() {
  16686. this.$forceUpdate();
  16687. },
  16688. forceUpdate2() {
  16689. setTimeout(() => {
  16690. this.courseText += "*0*%*";
  16691. setTimeout(() => {
  16692. this.courseText = this.courseText.replaceAll("*0*%*", "");
  16693. }, 0);
  16694. }, 100);
  16695. this.$forceUpdate();
  16696. },
  16697. deletEList(index, tIndex, eIndex) {
  16698. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  16699. eIndex,
  16700. 1
  16701. );
  16702. this.$forceUpdate();
  16703. },
  16704. getChoosePic(t) {
  16705. this.chooseType = t;
  16706. this.getAllBanner();
  16707. },
  16708. getAllBanner() {
  16709. this.sysPicVisible = true;
  16710. let params = {
  16711. t: this.chooseType,
  16712. };
  16713. this.ajax
  16714. .get(this.$store.state.api + "selectAllBanner", params)
  16715. .then((res) => {
  16716. this.sysPic = res.data[0];
  16717. })
  16718. .catch((err) => {
  16719. console.error(err);
  16720. });
  16721. },
  16722. // getClass() {
  16723. // let params = {
  16724. // oid: this.oid,
  16725. // };
  16726. // this.ajax
  16727. // .get(this.$store.state.api + "selectClassBySchool", params)
  16728. // .then((res) => {
  16729. // this.classJuri = res.data[0];
  16730. // })
  16731. // .catch((err) => {
  16732. // console.error(err);
  16733. // });
  16734. // },
  16735. deleteSysPic() {
  16736. this.cover = [];
  16737. this.isSysPic = false;
  16738. this.isSysPic2 = false;
  16739. },
  16740. deleteSelectPic() {
  16741. this.selectJson.url = "";
  16742. },
  16743. setEListStar() {
  16744. this.$forceUpdate();
  16745. },
  16746. deletRateList(i) {
  16747. this.rateJson.splice(i, 1);
  16748. },
  16749. addRateList() {
  16750. this.rateJson.push({ detail: "", score: 5, value: "" });
  16751. },
  16752. addSt() {
  16753. this.sentenceList.push({
  16754. sentenceTitle: "",
  16755. addSentence: [],
  16756. rightAnswer: [],
  16757. });
  16758. },
  16759. addSen(i) {
  16760. if (!this.sentenceList[i].sentenceTitle) {
  16761. this.$message.error("请填写卡片内容!");
  16762. return;
  16763. }
  16764. if (this.sentenceList[i].sentenceTitle.length > 10) {
  16765. this.$message.error("卡片内容字数不能超过10位");
  16766. return;
  16767. }
  16768. if (
  16769. this.sentenceList[i].addSentence.indexOf(
  16770. this.sentenceList[i].sentenceTitle
  16771. ) !== -1
  16772. ) {
  16773. this.$message.error("不能添加重复的卡片内容!");
  16774. return;
  16775. }
  16776. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  16777. // this.isPushTitleList.push(this.sentenceTitle);
  16778. this.sentenceList[i].sentenceTitle = "";
  16779. },
  16780. setRightAnswer(s, i, j) {
  16781. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  16782. this.sentenceList[i].rightAnswer.push(s);
  16783. }
  16784. },
  16785. returnCard(r, i, j) {
  16786. this.sentenceList[i].rightAnswer.splice(j, 1);
  16787. },
  16788. addSentenceTool() {
  16789. for (var i = 0; i < this.sentenceList.length; i++) {
  16790. if (this.sentenceList[i].rightAnswer.length == 0) {
  16791. this.$message.error(`请将题目${i + 1}设置完整。`);
  16792. return;
  16793. }
  16794. if (
  16795. this.sentenceList[i].addSentence.length !=
  16796. this.sentenceList[i].rightAnswer.length
  16797. ) {
  16798. this.$message.error(`请将题目${i + 1}设置完整。`);
  16799. return;
  16800. }
  16801. }
  16802. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16803. this.taskCount
  16804. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  16805. this.sentenceList = [
  16806. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  16807. ];
  16808. this.dialogVisibleSentence = false;
  16809. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16810. // itemTaskIndex
  16811. // ].toolChoose[toolIndex].tool = [];
  16812. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16813. // itemTaskIndex
  16814. // ].toolChoose[toolIndex].tool.push(i);
  16815. if (
  16816. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16817. .toolChoose[this.toolIndex].tool != 47
  16818. ) {
  16819. this.addTools(47, this.taskCount, this.toolIndex);
  16820. }
  16821. },
  16822. addTableJson() {
  16823. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  16824. // this.$message.error("请将信息填写完整!");
  16825. // return;
  16826. // }
  16827. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16828. this.taskCount
  16829. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  16830. // this.tableJson = [{ text: "" }];
  16831. // this.dialogVisibleTable = false;
  16832. this.$message.success("上传成功");
  16833. if (
  16834. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16835. .toolChoose[this.toolIndex].tool != 48
  16836. ) {
  16837. this.addTools(48, this.taskCount, this.toolIndex);
  16838. }
  16839. },
  16840. addWordJson() {
  16841. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16842. this.taskCount
  16843. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  16844. // this.wordJson = [{ text: "" }];
  16845. // this.dialogVisibleWord = false;
  16846. this.$message.success("上传成功");
  16847. if (
  16848. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16849. .toolChoose[this.toolIndex].tool != 52
  16850. ) {
  16851. this.addTools(52, this.taskCount, this.toolIndex);
  16852. }
  16853. },
  16854. addMoreUpload() {
  16855. if (this.uploadJson.length == 0) {
  16856. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16857. this.taskCount
  16858. ].toolChoose[this.toolIndex].uploadJson = [];
  16859. } else {
  16860. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16861. this.taskCount
  16862. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  16863. }
  16864. this.uploadJson = [];
  16865. this.dialogVisibleMoreUpload = false;
  16866. if (
  16867. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16868. .toolChoose[this.toolIndex].tool != 50
  16869. ) {
  16870. this.addTools(50, this.taskCount, this.toolIndex);
  16871. }
  16872. },
  16873. addPreTime() {
  16874. if (this.preTime == 0) {
  16875. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16876. this.taskCount
  16877. ].toolChoose[this.toolIndex].preTime = 0;
  16878. } else {
  16879. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16880. this.taskCount
  16881. ].toolChoose[this.toolIndex].preTime = this.preTime;
  16882. }
  16883. this.preTime = 0;
  16884. this.dialogVisiblePreTime = false;
  16885. if (
  16886. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16887. .toolChoose[this.toolIndex].tool != 10
  16888. ) {
  16889. this.addTools(10, this.taskCount, this.toolIndex);
  16890. }
  16891. },
  16892. goToTask(i) {
  16893. this.toolIndexType = "";
  16894. if (this.isClickColor == i + 1) {
  16895. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16896. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16897. // } else {
  16898. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16899. i
  16900. ].toolOpen = true;
  16901. // }
  16902. this.$forceUpdate();
  16903. return;
  16904. }
  16905. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16906. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16907. // } else {
  16908. document.querySelectorAll(".basic_box")[0].scrollTop =
  16909. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16910. this.isClickColor = i + 1;
  16911. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16912. // }
  16913. this.$forceUpdate();
  16914. },
  16915. taskScroll(){
  16916. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  16917. const sections = document.querySelectorAll('.taskBorder');
  16918. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  16919. sections.forEach((section, index) => {
  16920. const offsetTop = section.offsetTop;
  16921. const offsetHeight = section.offsetHeight;
  16922. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  16923. this.isClickColor = index +1;
  16924. }
  16925. });
  16926. },
  16927. taskOpen(i, stageIndex) {
  16928. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16929. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  16930. } else {
  16931. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16932. }
  16933. this.updateWork3(stageIndex);
  16934. this.$forceUpdate();
  16935. },
  16936. goToTask2(i, stage) {
  16937. this.toolIndexType = "";
  16938. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  16939. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16940. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16941. // } else {
  16942. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16943. i
  16944. ].toolOpen = true;
  16945. // }
  16946. this.$forceUpdate();
  16947. return;
  16948. }
  16949. if (this.unitIndex != stage) {
  16950. if (this.panUnitJson() == 2) {
  16951. return;
  16952. }
  16953. this.unitSet(stage);
  16954. }
  16955. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16956. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16957. // } else {
  16958. document.querySelectorAll(".basic_box")[0].scrollTop =
  16959. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16960. this.isClickColor = i + 1;
  16961. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16962. // }
  16963. this.$forceUpdate();
  16964. },
  16965. taskMove(type, index) {
  16966. this.$confirm(
  16967. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  16968. "提示",
  16969. {
  16970. confirmButtonText: "确定",
  16971. cancelButtonText: "取消",
  16972. type: "warning",
  16973. }
  16974. )
  16975. .then(() => {
  16976. if (type == 1) {
  16977. if (index > 0) {
  16978. let a = JSON.parse(
  16979. JSON.stringify(
  16980. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16981. index - 1
  16982. ]
  16983. )
  16984. );
  16985. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  16986. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16987. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16988. }
  16989. } else {
  16990. if (
  16991. index <
  16992. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  16993. ) {
  16994. let a = JSON.parse(
  16995. JSON.stringify(
  16996. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16997. index + 1
  16998. ]
  16999. )
  17000. );
  17001. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  17002. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  17003. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  17004. }
  17005. }
  17006. this.$forceUpdate();
  17007. })
  17008. .catch(() => {
  17009. return;
  17010. });
  17011. },
  17012. stageMove(type, index) {
  17013. if (type == 1) {
  17014. if (index > 0) {
  17015. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  17016. let acid = JSON.parse(
  17017. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  17018. );
  17019. let bcid = JSON.parse(
  17020. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  17021. );
  17022. this.unitJson3[index - 1] = this.unitJson3[index];
  17023. this.unitJson3[index] = a;
  17024. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  17025. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  17026. }
  17027. } else {
  17028. if (index < this.unitJson3.length - 1) {
  17029. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  17030. let acid = JSON.parse(
  17031. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  17032. );
  17033. let bcid = JSON.parse(
  17034. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  17035. );
  17036. this.unitJson3[index + 1] = this.unitJson3[index];
  17037. this.unitJson3[index] = a;
  17038. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  17039. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  17040. }
  17041. }
  17042. this.$forceUpdate();
  17043. },
  17044. addGroup(i) {
  17045. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  17046. this.groupJson.group.push({
  17047. name: "第" + (this.groupJson.group.length + 1) + "组",
  17048. });
  17049. },
  17050. deleteGroup(i) {
  17051. this.groupJson.group.splice(i, 1);
  17052. },
  17053. numberPan() {
  17054. if (
  17055. /[^\d]/.test(this.groupJson.number) ||
  17056. this.groupJson.number < 2 ||
  17057. this.groupJson.number > 10
  17058. ) {
  17059. this.$message.error("请输入2-10的数字");
  17060. this.groupJson.number = "";
  17061. }
  17062. },
  17063. numberPanJie() {
  17064. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  17065. this.$message.error('请输入大于1的数字')
  17066. this.courseJie = 1
  17067. }
  17068. },
  17069. numberPanTime() {
  17070. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  17071. this.$message.error('请输入大于1的数字')
  17072. this.courseTime = 1
  17073. }
  17074. },
  17075. addGroupJson() {
  17076. for (var i = 0; i < this.groupJson.group.length; i++) {
  17077. if (!this.groupJson.group[i].name) {
  17078. this.$message.error("请将信息填写完整!");
  17079. return;
  17080. }
  17081. }
  17082. if (!this.groupJson.number) {
  17083. this.$message.error("请将信息填写完整!");
  17084. return;
  17085. }
  17086. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17087. this.taskCount
  17088. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  17089. JSON.stringify(this.groupJson)
  17090. );
  17091. this.dialogVisibleGroup = false;
  17092. this.groupJson = {};
  17093. if (
  17094. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17095. .toolChoose[this.toolIndex].tool != 49
  17096. ) {
  17097. this.addTools(49, this.taskCount, this.toolIndex);
  17098. }
  17099. },
  17100. updateTime(preTime) {
  17101. this.preTime = preTime;
  17102. },
  17103. InviteChange(val) {
  17104. console.log(val);
  17105. let _check = [];
  17106. let _check2 = [];
  17107. for (var i = 0; i < this.grade2.length; i++) {
  17108. var gid = this.grade2[i].id;
  17109. _check.push(gid);
  17110. }
  17111. for (var i = 0; i < this.checkboxList2.length; i++) {
  17112. var _id = this.checkboxList2[i];
  17113. if (_check.indexOf(_id) !== -1) {
  17114. _check2.push(_id);
  17115. }
  17116. }
  17117. this.checkAll = _check2.length === _check.length;
  17118. return;
  17119. let array = JSON.parse(JSON.stringify(val));
  17120. this.inviteCode = this.inviteCode.filter((el) => {
  17121. if (val.indexOf(el.cid) != -1) {
  17122. array.splice(array.indexOf(el.cid), 1);
  17123. return el;
  17124. }
  17125. });
  17126. for (var i = 0; i < array.length; i++) {
  17127. this.getInviteCode(array[i]);
  17128. }
  17129. },
  17130. InviteChange2(val) {
  17131. console.log(val);
  17132. let _check = [];
  17133. let _check2 = [];
  17134. for (var i = 0; i < this.teacherJuri.length; i++) {
  17135. var gid = this.teacherJuri[i].userid;
  17136. _check.push(gid);
  17137. }
  17138. for (var i = 0; i < this.checkboxList3.length; i++) {
  17139. var _id = this.checkboxList3[i];
  17140. if (_check.indexOf(_id) !== -1) {
  17141. _check2.push(_id);
  17142. }
  17143. }
  17144. this.checkAll2 = _check2.length === _check.length;
  17145. this.setMan();
  17146. return;
  17147. let array = JSON.parse(JSON.stringify(val));
  17148. this.inviteCode = this.inviteCode.filter((el) => {
  17149. if (val.indexOf(el.cid) != -1) {
  17150. array.splice(array.indexOf(el.cid), 1);
  17151. return el;
  17152. }
  17153. });
  17154. for (var i = 0; i < array.length; i++) {
  17155. this.getInviteCode(array[i]);
  17156. }
  17157. },
  17158. handleCheckAllChange(val) {
  17159. if (val) {
  17160. for (var i = 0; i < this.grade2.length; i++) {
  17161. var gid = this.grade2[i].id;
  17162. if (this.checkboxList2.indexOf(gid) === -1) {
  17163. this.checkboxList2.push(gid);
  17164. }
  17165. }
  17166. } else {
  17167. let _check = [];
  17168. let _check2 = [];
  17169. for (var i = 0; i < this.grade2.length; i++) {
  17170. var gid = this.grade2[i].id;
  17171. _check.push(gid);
  17172. }
  17173. for (var i = 0; i < this.checkboxList2.length; i++) {
  17174. var _id = this.checkboxList2[i];
  17175. if (_check.indexOf(_id) === -1) {
  17176. _check2.push(_id);
  17177. }
  17178. }
  17179. this.checkboxList2 = _check2;
  17180. }
  17181. this.isIndeterminate = false;
  17182. },
  17183. handleCheckAllChange2(val) {
  17184. if (val) {
  17185. for (var i = 0; i < this.teacherJuri.length; i++) {
  17186. var gid = this.teacherJuri[i].userid;
  17187. if (this.checkboxList3.indexOf(gid) === -1) {
  17188. this.checkboxList3.push(gid);
  17189. }
  17190. }
  17191. } else {
  17192. let _check = [];
  17193. let _check2 = [];
  17194. for (var i = 0; i < this.teacherJuri.length; i++) {
  17195. var gid = this.teacherJuri[i].userid;
  17196. _check.push(gid);
  17197. }
  17198. for (var i = 0; i < this.checkboxList3.length; i++) {
  17199. var _id = this.checkboxList3[i];
  17200. if (_check.indexOf(_id) === -1) {
  17201. _check2.push(_id);
  17202. }
  17203. }
  17204. this.checkboxList3 = _check2;
  17205. }
  17206. this.isIndeterminate2 = false;
  17207. },
  17208. async getInviteCode(cid) {
  17209. let code = this.randomNumber();
  17210. let params = {
  17211. code: code,
  17212. oid: this.oid,
  17213. };
  17214. let type = 1;
  17215. for (var i = 0; i < this.inviteCode.length; i++) {
  17216. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  17217. type = 2;
  17218. }
  17219. }
  17220. if (type == 2) {
  17221. this.getInviteCode(cid);
  17222. return;
  17223. }
  17224. const res = await this.ajax.get(
  17225. this.$store.state.api + "selectInviteCode2",
  17226. params
  17227. );
  17228. if (
  17229. res.data.length &&
  17230. res.data[0].length &&
  17231. res.data[0][0].courseId != this.cid
  17232. ) {
  17233. this.getInviteCode(cid);
  17234. return;
  17235. }
  17236. let array = [];
  17237. for (var i = 0; i < this.inviteCode.length; i++) {
  17238. array.push(this.inviteCode[i].cid);
  17239. }
  17240. if (array.indexOf(cid) != -1) {
  17241. this.inviteCode[array.indexOf(cid)].ic = code;
  17242. } else {
  17243. this.inviteCode.push({ cid: cid, ic: code });
  17244. }
  17245. },
  17246. OpenInviteD(cid) {
  17247. let array = [];
  17248. this.icode = "";
  17249. for (var i = 0; i < this.inviteCode.length; i++) {
  17250. array.push(this.inviteCode[i].cid);
  17251. }
  17252. if (array.indexOf(cid) != -1) {
  17253. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  17254. }
  17255. this.inviteId = cid;
  17256. this.dialogVisibleInvite = true;
  17257. },
  17258. addInvite() {
  17259. let reg = /^[A-Za-z0-9]{4,}$/;
  17260. if (!reg.test(this.icode)) {
  17261. this.$message.error("请输入至少四位数字或英文组合的随机码");
  17262. return;
  17263. }
  17264. let type = 1;
  17265. for (var i = 0; i < this.inviteCode.length; i++) {
  17266. if (
  17267. this.inviteCode[i].cid != this.inviteId &&
  17268. this.icode == this.inviteCode[i].ic
  17269. ) {
  17270. type = 2;
  17271. }
  17272. }
  17273. if (type == 2) {
  17274. this.$message.error("已有此随机码,不能重复");
  17275. return;
  17276. }
  17277. let params = {
  17278. code: this.icode,
  17279. oid: this.oid,
  17280. };
  17281. this.ajax
  17282. .get(this.$store.state.api + "selectInviteCode", params)
  17283. .then((res) => {
  17284. if (
  17285. res.data.length &&
  17286. res.data[0].length &&
  17287. res.data[0][0].courseId != this.cid
  17288. ) {
  17289. this.$message.error("已有此随机码,不能重复");
  17290. return;
  17291. }
  17292. let array = [];
  17293. for (var i = 0; i < this.inviteCode.length; i++) {
  17294. array.push(this.inviteCode[i].cid);
  17295. }
  17296. if (array.indexOf(this.inviteId) != -1) {
  17297. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  17298. } else {
  17299. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  17300. }
  17301. this.icode = "";
  17302. this.dialogVisibleInvite = false;
  17303. })
  17304. .catch((err) => {
  17305. console.error(err);
  17306. });
  17307. },
  17308. randomNumber() {
  17309. // 随机生成两位数
  17310. // let num = Math.floor(Math.random() * 900) + 100;
  17311. // 生成 0 到 99 之间的随机整数
  17312. const randomNumber = Math.floor(Math.random() * 100);
  17313. // 如果随机数小于 10,补上前导零
  17314. const num =
  17315. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  17316. // 随机生成两个大写字母
  17317. let letters = "";
  17318. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  17319. for (let i = 0; i < 3; i++) {
  17320. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  17321. }
  17322. // 随机生成两位数字和字母的组合
  17323. let mix = "";
  17324. let chars =
  17325. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  17326. for (let i = 0; i < 3; i++) {
  17327. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  17328. mix += char;
  17329. }
  17330. // 随机选择一种类型
  17331. let type = Math.floor(Math.random() * 3);
  17332. return num;
  17333. // 根据类型输出结果
  17334. switch (type) {
  17335. case 0:
  17336. console.log(num); // 输出两位数
  17337. return num;
  17338. case 1:
  17339. console.log(letters); // 输出两个大写字母
  17340. return letters;
  17341. case 2:
  17342. console.log(mix); // 输出两位数字和字母的组合
  17343. return mix;
  17344. }
  17345. },
  17346. getPaste() {
  17347. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  17348. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  17349. if (!iframe && !iframe2) {
  17350. return;
  17351. }
  17352. let copyData = iframe ? iframe.contentWindow.copyData : false;
  17353. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  17354. if (copyData && copyData.stageData && copyData.stageData.length) {
  17355. this.isPasteStage = true;
  17356. }
  17357. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  17358. this.isPasteStage = true;
  17359. }
  17360. if (copyData && copyData.selectData.length) {
  17361. this.isPasteChoice = true;
  17362. }
  17363. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  17364. this.isPasteTask = true;
  17365. }
  17366. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  17367. this.isPasteTask = true;
  17368. }
  17369. },
  17370. getPaste2() {
  17371. let iframe = document.querySelectorAll(".interIframe")[0];
  17372. const turndownService = new TurndownService();
  17373. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  17374. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  17375. if(confirm_next_step){
  17376. this.courseText += turndownService.turndown(confirm_next_step)
  17377. iframe.contentWindow.confirm_next_step = ''
  17378. }
  17379. if(work_area_text && work_area_text.aiContent){
  17380. this.courseText += turndownService.turndown(work_area_text.aiContent)
  17381. iframe.contentWindow.work_area_text = ''
  17382. }
  17383. },
  17384. textAreaChange(type, index){
  17385. if(type == 'courseText'){
  17386. this.addCourseBehavior('courseBehavior', `手动修改课程概况信息-${this.courseText}`)
  17387. }
  17388. if(type == 'targetCourseText2'){
  17389. this.addCourseBehavior('courseBehavior', `手动修改课程目标信息-${this.targetCourseText2}`)
  17390. }
  17391. if(type == 'taskDetail2'){
  17392. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程大纲信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2}`)
  17393. }
  17394. if(type == 'taskDetail3'){
  17395. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程教案信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3}`)
  17396. }
  17397. },
  17398. setCourseInfo(type){
  17399. let courseInfo = ''
  17400. let sub = []
  17401. let mclass = []
  17402. if (this.courseTypeId.length) {
  17403. for (var i = 0; i < this.courseTypeId.length; i++) {
  17404. let _sid = this.courseTypeId[i]
  17405. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17406. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17407. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17408. }
  17409. }
  17410. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17411. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17412. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17413. }
  17414. }
  17415. }
  17416. }
  17417. if(this.courseName){
  17418. courseInfo = `课程名称:${this.courseName} `
  17419. }
  17420. if(mclass.length){
  17421. courseInfo += `年级:${mclass.join(',')} `
  17422. }
  17423. if(sub.length){
  17424. courseInfo += `学科:${sub.join(',')} `
  17425. }
  17426. console.log(courseInfo)
  17427. window.course_info = courseInfo
  17428. this.course_info = courseInfo
  17429. window.course_lang = this.languageSetting
  17430. },
  17431. saveCourse(){
  17432. if (this.cid == "" || this.cid == undefined) {
  17433. this.addWork();
  17434. } else {
  17435. if (this.userid != this.courseUserid && this.role != "1") {
  17436. this.updateWork2();
  17437. } else {
  17438. this.updateWork();
  17439. }
  17440. }
  17441. },
  17442. setCover($event, attempts = 0) {
  17443. var _this = this;
  17444. this.addCourseBehavior('courseBehavior', `修改课程名称-${this.courseName}`)
  17445. _this.searchFileName = JSON.parse(JSON.stringify(_this.courseName))
  17446. if (_this.cover.length || attempts >= 3) {
  17447. return;
  17448. }
  17449. _this.findMatchingContents()
  17450. _this.imageloading2 = true;
  17451. _this.ajax
  17452. .post("https://gpt.cocorobo.cn/search_image", {
  17453. page: _this.ppage,
  17454. pagesize: 9,
  17455. query: _this.courseName,
  17456. })
  17457. .then(function (response) {
  17458. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  17459. if(data){
  17460. _this.cover = [];
  17461. setTimeout(() => {
  17462. _this.cover[0] = {
  17463. name: "网络图片.png",
  17464. url: data[0].thumbnail,
  17465. };
  17466. _this.imgChange1(null, null, 1, null);
  17467. _this.$forceUpdate();
  17468. _this.saveCourse()
  17469. }, 0);
  17470. _this.imageloading2 = false;
  17471. }else {
  17472. _this.imageloading2 = false;
  17473. _this.setCover($event, attempts + 1);
  17474. }
  17475. })
  17476. .catch(function (error) {
  17477. _this.imageloading2 = false;
  17478. _this.setCover($event, attempts + 1);
  17479. console.log(error);
  17480. });
  17481. },
  17482. searchImage() {
  17483. var _this = this;
  17484. _this.imageList = [];
  17485. if (!_this.searchImageValue) {
  17486. _this.sysPicVisible2 = true;
  17487. return;
  17488. }
  17489. _this.imageloading = true;
  17490. _this.ajax
  17491. .post("https://gpt.cocorobo.cn/search_image", {
  17492. page: _this.ppage,
  17493. pagesize: 9,
  17494. query: _this.searchImageValue,
  17495. })
  17496. .then(function (response) {
  17497. // console.log(response.data.data);
  17498. var data = response.data.FunctionResponse.result;
  17499. for (var i = 0; i < data.length; i++) {
  17500. _this.imageList.push({ url: data[i].thumbnail });
  17501. }
  17502. _this.imageloading = false;
  17503. })
  17504. .catch(function (error) {
  17505. console.log(error);
  17506. });
  17507. _this.sysPicVisible2 = true;
  17508. },
  17509. changePicture() {
  17510. this.ppage++;
  17511. this.searchImage();
  17512. },
  17513. resetImage() {
  17514. this.ppage = 1;
  17515. this.searchImage();
  17516. },
  17517. jumpGj(i, j) {
  17518. if (i + 1 != this.isClickColor) {
  17519. this.isClickColor = i + 1;
  17520. }
  17521. var a = document.scrollingElement;
  17522. this.toolIndexType = `gj${i}${j}`;
  17523. let target = document.querySelector(`#gj${i}${j}`);
  17524. if (target) {
  17525. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17526. setTimeout(() => {
  17527. target.scrollIntoView(true);
  17528. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17529. j
  17530. ].isFold3 = false;
  17531. setTimeout(() => {
  17532. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17533. }, 0);
  17534. }, 0);
  17535. }
  17536. },
  17537. jumpGj2(i, j, k) {
  17538. if (this.unitIndex != k) {
  17539. if (this.panUnitJson() == 2) {
  17540. return;
  17541. }
  17542. this.unitSet(k);
  17543. }
  17544. setTimeout(() => {
  17545. if (i + 1 != this.isClickColor) {
  17546. this.isClickColor = i + 1;
  17547. }
  17548. var a = document.scrollingElement;
  17549. this.toolIndexType = `gj${i}${j}${k}`;
  17550. let target = document.querySelector(`#gj${i}${j}`);
  17551. if (target) {
  17552. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17553. setTimeout(() => {
  17554. target.scrollIntoView(true);
  17555. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17556. j
  17557. ].isFold3 = false;
  17558. setTimeout(() => {
  17559. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17560. }, 0);
  17561. }, 0);
  17562. }
  17563. }, 0);
  17564. },
  17565. dragStart(val, i, j) {
  17566. console.log(this.taskCount);
  17567. this.dragType = "drag";
  17568. this.taskCount = j;
  17569. this.oldIndex = i;
  17570. this.oldData = val;
  17571. },
  17572. dragOver(i, j) {
  17573. this.typeIndex = "chapter-" + j + "-" + i;
  17574. this.newIndex = i;
  17575. },
  17576. dragEnd() {
  17577. if (this.dragType != "drag") {
  17578. this.typeIndex = "";
  17579. this.newIndex = "";
  17580. this.dragType = "";
  17581. this.isdrag = "";
  17582. return;
  17583. }
  17584. console.log(this.taskCount);
  17585. let newItems = [
  17586. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17587. .chapterData,
  17588. ];
  17589. // 删除老的节点
  17590. newItems.splice(this.oldIndex, 1);
  17591. // 在列表中目标位置增加新的节点
  17592. newItems.splice(this.newIndex, 0, this.oldData);
  17593. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17594. this.taskCount
  17595. ].chapterData = [...newItems];
  17596. this.typeIndex = "";
  17597. this.newIndex = "";
  17598. this.dragType = "";
  17599. this.isdrag = "";
  17600. this.$forceUpdate();
  17601. },
  17602. dragTaskStart(val, i, j) {
  17603. this.dragType = "task";
  17604. this.oldIndex = i;
  17605. this.oldData = val;
  17606. this.oldUnitIndex = j;
  17607. },
  17608. dragTaskOver(i, j) {
  17609. this.typeIndex = "task-" + i;
  17610. this.newIndex = i;
  17611. this.checkUnitIndex = j;
  17612. },
  17613. async dragTaskEnd() {
  17614. if (this.dragType != "task") {
  17615. this.newIndex = "";
  17616. this.dragType = "";
  17617. this.typeIndex = "";
  17618. this.checkUnitIndex = "";
  17619. this.isdrag = "";
  17620. return;
  17621. }
  17622. if (
  17623. this.newIndex == this.oldIndex &&
  17624. this.oldUnitIndex == this.checkUnitIndex
  17625. ) {
  17626. this.newIndex = "";
  17627. this.dragType = "";
  17628. this.typeIndex = "";
  17629. this.checkUnitIndex = "";
  17630. this.isdrag = "";
  17631. return;
  17632. }
  17633. let count1 = await this.getWorksCount(
  17634. 2,
  17635. this.checkUnitIndex,
  17636. this.newIndex,
  17637. 0
  17638. );
  17639. let count2 = await this.getWorksCount(
  17640. 2,
  17641. this.oldUnitIndex,
  17642. this.oldIndex,
  17643. 0
  17644. );
  17645. if (count1 > 0 || count2 > 0) {
  17646. this.$confirm(
  17647. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  17648. "提示",
  17649. {
  17650. confirmButtonText: "确定",
  17651. cancelButtonText: "取消",
  17652. type: "warning",
  17653. }
  17654. )
  17655. .then(() => {
  17656. if (this.oldUnitIndex != this.checkUnitIndex) {
  17657. let newItems = [
  17658. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17659. ];
  17660. // 删除老的节点
  17661. newItems.splice(this.oldIndex, 1);
  17662. // 在列表中目标位置增加新的节点
  17663. let newItems2 = [
  17664. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17665. ];
  17666. newItems2.splice(this.newIndex, 0, this.oldData);
  17667. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17668. ...newItems,
  17669. ];
  17670. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17671. ...newItems2,
  17672. ];
  17673. } else {
  17674. let newItems = [
  17675. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17676. ];
  17677. let chapterData = []
  17678. if (this.oldIndex == 0) {
  17679. chapterData = newItems[this.oldIndex].chapterData
  17680. newItems[this.oldIndex].chapterData = []
  17681. } else if (this.newIndex == 0) {
  17682. chapterData = newItems[this.newIndex].chapterData
  17683. newItems[this.oldIndex].chapterData = []
  17684. }
  17685. // 删除老的节点
  17686. newItems.splice(this.oldIndex, 1);
  17687. // 在列表中目标位置增加新的节点
  17688. newItems.splice(this.newIndex, 0, this.oldData);
  17689. if (this.oldIndex == 0 || this.newIndex == 0) {
  17690. newItems[0].chapterData = chapterData
  17691. }
  17692. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17693. ...newItems,
  17694. ];
  17695. }
  17696. this.typeIndex = "";
  17697. this.newIndex = "";
  17698. this.dragType = "";
  17699. this.checkUnitIndex = "";
  17700. this.isdrag = "";
  17701. this.updateWork();
  17702. this.$forceUpdate();
  17703. })
  17704. .catch(() => {
  17705. this.newIndex = "";
  17706. this.dragType = "";
  17707. this.typeIndex = "";
  17708. this.checkUnitIndex = "";
  17709. this.isdrag = "";
  17710. return;
  17711. });
  17712. } else {
  17713. if (this.oldUnitIndex != this.checkUnitIndex) {
  17714. let newItems = [
  17715. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17716. ];
  17717. // 删除老的节点
  17718. newItems.splice(this.oldIndex, 1);
  17719. // 在列表中目标位置增加新的节点
  17720. let newItems2 = [
  17721. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17722. ];
  17723. newItems2.splice(this.newIndex, 0, this.oldData);
  17724. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17725. ...newItems,
  17726. ];
  17727. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17728. ...newItems2,
  17729. ];
  17730. } else {
  17731. let newItems = [
  17732. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17733. ];
  17734. let chapterData = []
  17735. if (this.oldIndex == 0) {
  17736. chapterData = newItems[this.oldIndex].chapterData
  17737. newItems[this.oldIndex].chapterData = []
  17738. } else if (this.newIndex == 0) {
  17739. chapterData = newItems[this.newIndex].chapterData
  17740. newItems[this.oldIndex].chapterData = []
  17741. }
  17742. // 删除老的节点
  17743. newItems.splice(this.oldIndex, 1);
  17744. // 在列表中目标位置增加新的节点
  17745. newItems.splice(this.newIndex, 0, this.oldData);
  17746. if (this.oldIndex == 0 || this.newIndex == 0) {
  17747. newItems[0].chapterData = chapterData
  17748. }
  17749. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17750. ...newItems,
  17751. ];
  17752. }
  17753. this.typeIndex = "";
  17754. this.newIndex = "";
  17755. this.dragType = "";
  17756. this.checkUnitIndex = "";
  17757. this.isdrag = "";
  17758. this.updateWork();
  17759. this.$forceUpdate();
  17760. }
  17761. },
  17762. dragUnitStart(val, i) {
  17763. this.dragType = "Unit";
  17764. this.oldIndex = i;
  17765. this.oldData = val;
  17766. },
  17767. dragUnitOver(i) {
  17768. this.typeIndex = "Unit-" + i;
  17769. this.newIndex = i;
  17770. console.log(i, this.unitJson[i].toolOpen);
  17771. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  17772. this.unitJson[i].toolOpen = true;
  17773. this.updateWork();
  17774. this.$forceUpdate();
  17775. }
  17776. },
  17777. async dragUnitEnd() {
  17778. if (this.dragType != "Unit") {
  17779. this.newIndex = "";
  17780. this.dragType = "";
  17781. this.typeIndex = "";
  17782. this.isdrag = "";
  17783. return;
  17784. }
  17785. if (this.newIndex == this.oldIndex) {
  17786. this.newIndex = "";
  17787. this.dragType = "";
  17788. this.typeIndex = "";
  17789. this.isdrag = "";
  17790. return;
  17791. }
  17792. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  17793. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  17794. console.log(count1, count2);
  17795. if (count1 > 0 || count2 > 0) {
  17796. this.$confirm(
  17797. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  17798. "提示",
  17799. {
  17800. confirmButtonText: "确定",
  17801. cancelButtonText: "取消",
  17802. type: "warning",
  17803. }
  17804. )
  17805. .then(() => {
  17806. let newItems = [...this.unitJson];
  17807. // 删除老的节点
  17808. newItems.splice(this.oldIndex, 1);
  17809. // 在列表中目标位置增加新的节点
  17810. newItems.splice(this.newIndex, 0, this.oldData);
  17811. this.unitJson = [...newItems];
  17812. this.typeIndex = "";
  17813. this.newIndex = "";
  17814. this.dragType = "";
  17815. this.isdrag = "";
  17816. this.updateWork();
  17817. this.$forceUpdate();
  17818. })
  17819. .catch(() => {
  17820. this.newIndex = "";
  17821. this.dragType = "";
  17822. this.typeIndex = "";
  17823. this.isdrag = "";
  17824. return;
  17825. });
  17826. } else {
  17827. let newItems = [...this.unitJson];
  17828. // 删除老的节点
  17829. newItems.splice(this.oldIndex, 1);
  17830. // 在列表中目标位置增加新的节点
  17831. newItems.splice(this.newIndex, 0, this.oldData);
  17832. this.unitJson = [...newItems];
  17833. this.typeIndex = "";
  17834. this.newIndex = "";
  17835. this.dragType = "";
  17836. this.isdrag = "";
  17837. this.updateWork();
  17838. this.$forceUpdate();
  17839. }
  17840. },
  17841. getWorksCount(type, stage, task, tool) {
  17842. return new Promise((resolve, reject) => {
  17843. let params = [
  17844. {
  17845. cid: this.cid,
  17846. stage: stage,
  17847. task: task,
  17848. tool: tool,
  17849. type: type,
  17850. },
  17851. ];
  17852. this.ajax
  17853. .post(this.$store.state.api + "getCourseWorkCount", params)
  17854. .then((res) => {
  17855. let count = res.data[0][0].count;
  17856. resolve(count);
  17857. })
  17858. .catch((err) => {
  17859. resolve(0);
  17860. this.$message.error("网络不佳");
  17861. console.error(err);
  17862. });
  17863. });
  17864. },
  17865. getTwoType(id) {
  17866. this.twoJson = [];
  17867. var array = this.CourseTypeJson1[
  17868. "3f8eed32-aba9-11ee-b534-005056b86db5"
  17869. ].filter((e) => {
  17870. return e.ppid == id;
  17871. });
  17872. this.twoJson = array;
  17873. this.$forceUpdate();
  17874. },
  17875. ctype() {
  17876. this.oneJson =
  17877. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  17878. },
  17879. selectAllType1() {
  17880. this.CourseType1 = [];
  17881. this.CourseTypeJson1 = {};
  17882. this.courseTypeId1 = {};
  17883. this.$forceUpdate();
  17884. let params = {
  17885. org: this.org && this.org != "" ? this.org : "",
  17886. oid: this.oid && this.oid != "" ? this.oid : "",
  17887. };
  17888. this.ajax
  17889. .get(this.$store.state.api + "selectAllEvaType", params)
  17890. .then((res) => {
  17891. this.CourseType1 = res.data;
  17892. for (var i = 0; i < res.data[0].length; i++) {
  17893. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  17894. res.data[0][i].name = "一级分类";
  17895. } else if (
  17896. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  17897. ) {
  17898. res.data[0][i].name = "二级分类";
  17899. }
  17900. if (!this.cid) {
  17901. this.courseTypeId1[res.data[0][i].id] = [];
  17902. }
  17903. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  17904. this.CourseTypeJson1[res.data[0][i].id] = [];
  17905. }
  17906. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  17907. for (var j = 0; j < res.data[1].length; j++) {
  17908. if (res.data[0][i].id == res.data[1][j].pid) {
  17909. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  17910. }
  17911. }
  17912. // } else {
  17913. if (res.data[2].length > 0) {
  17914. for (var j = 0; j < res.data[2].length; j++) {
  17915. if (res.data[0][i].id == res.data[2][j].pid) {
  17916. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  17917. }
  17918. }
  17919. }
  17920. if (res.data[3].length > 0) {
  17921. for (var j = 0; j < res.data[3].length; j++) {
  17922. if (res.data[0][i].id == res.data[3][j].pid) {
  17923. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  17924. }
  17925. }
  17926. }
  17927. // }
  17928. }
  17929. this.ctype();
  17930. this.cetBoxDialog = true;
  17931. })
  17932. .catch((err) => {
  17933. console.error(err);
  17934. });
  17935. },
  17936. allEvaCan() {
  17937. if (this.taskLoading.length) {
  17938. let _pan = 1
  17939. for (var k = 0; k < this.taskLoading.length; k++) {
  17940. if (this.taskLoading[k]) {
  17941. this.$message({
  17942. message: `请等待任务${k + 1}回答完毕后再继续`,
  17943. type: "warning"
  17944. });
  17945. _pan = 2
  17946. }
  17947. }
  17948. if (_pan == 2) {
  17949. return
  17950. }
  17951. }
  17952. if (this.taskGLoading.length) {
  17953. let _pan = 1
  17954. for (var k = 0; k < this.taskGLoading.length; k++) {
  17955. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  17956. this.$message({
  17957. message: `请等待任务${k + 1}回答完毕后再继续`,
  17958. type: "warning"
  17959. });
  17960. _pan = 2
  17961. }
  17962. }
  17963. if (_pan == 2) {
  17964. return
  17965. }
  17966. }
  17967. this.$confirm("是否一键生成所有工具的评价设置?会占用您一些时间。", "提示", {
  17968. confirmButtonText: "确定",
  17969. cancelButtonText: "取消",
  17970. type: "warning",
  17971. customClass: 'custom-confirm-box'
  17972. })
  17973. .then(() => {
  17974. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17975. for (var index = 0; index < taskJson.length; index++) {
  17976. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  17977. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  17978. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  17979. }
  17980. }
  17981. }
  17982. })
  17983. .catch(() => {
  17984. });
  17985. setTimeout(() => {
  17986. this.setTipsIndex()
  17987. }, 500)
  17988. },
  17989. allEvaCan2(index) {
  17990. if (this.taskLoading.length) {
  17991. let _pan = 1
  17992. for (var k = 0; k < this.taskLoading.length; k++) {
  17993. if (this.taskLoading[k]) {
  17994. this.$message({
  17995. message: `请等待任务${k + 1}回答完毕后再继续`,
  17996. type: "warning"
  17997. });
  17998. _pan = 2
  17999. }
  18000. }
  18001. if (_pan == 2) {
  18002. return
  18003. }
  18004. }
  18005. if (this.taskGLoading.length) {
  18006. let _pan = 1
  18007. for (var k = 0; k < this.taskGLoading.length; k++) {
  18008. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  18009. this.$message({
  18010. message: `请等待任务${k + 1}回答完毕后再继续`,
  18011. type: "warning"
  18012. });
  18013. _pan = 2
  18014. }
  18015. }
  18016. if (_pan == 2) {
  18017. return
  18018. }
  18019. }
  18020. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18021. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  18022. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  18023. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  18024. }
  18025. }
  18026. this.$message({
  18027. message: `执行成功`,
  18028. type: "success"
  18029. });
  18030. },
  18031. setAiJson(pan,string,string2,string3){
  18032. if(pan == 'aiTeacher2'){
  18033. this.aiJson['teacherDetail2'] = string
  18034. }else if(pan == 'aiRateRuleA'){
  18035. this.aiJson['aiRateRule'] = string
  18036. }else if(pan == 'aiOutline2'){
  18037. this.aiJson['aiOutlineTask'] = string
  18038. this.aiJson['aiOutlineDetail'] = string2
  18039. }else if(pan == 'aiTeacher3'){
  18040. this.aiJson['aiCpoteTask'] = string
  18041. this.aiJson['teacherDetail2'] = string2
  18042. }else if(pan == 'aiTask2'){
  18043. this.aiJson['aiTask'] = string
  18044. }else if(pan == 'aiTask3'){
  18045. this.aiJson['aiTaskG1'] = string
  18046. this.aiJson['aiTaskG2'] = string2
  18047. this.aiJson['aiTaskG3'] = string3
  18048. }else if(pan == 'aiteacherTextDetail'){
  18049. this.aiJson['aiAbstract'] = string
  18050. }else if(pan == 'aitargetTextDetail'){
  18051. this.aiJson['aiTarget'] = string
  18052. }else if(pan == 'aitargetTextDetail2'){
  18053. this.aiJson['aiTarget2'] = string
  18054. }else if(pan == 'aitargetTextDetail3'){
  18055. this.aiJson['aiTargetGet'] = string
  18056. this.aiJson['aiTarget2'] = string2
  18057. }else {
  18058. this.aiJson[pan] = string
  18059. }
  18060. this.aiText2 = ''
  18061. this.aiText3 = ''
  18062. this.$forceUpdate();
  18063. },
  18064. editTask3(index){
  18065. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  18066. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  18067. }else {
  18068. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  18069. }
  18070. setTimeout(() => {
  18071. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  18072. setTimeout(() => {
  18073. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  18074. }, 0);
  18075. }, 100);
  18076. this.$forceUpdate();
  18077. },
  18078. editTask2(index){
  18079. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  18080. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  18081. }else {
  18082. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  18083. }
  18084. setTimeout(() => {
  18085. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  18086. setTimeout(() => {
  18087. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  18088. }, 0);
  18089. }, 100);
  18090. this.$forceUpdate();
  18091. },
  18092. openRule(i, k){
  18093. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  18094. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  18095. }else {
  18096. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  18097. }
  18098. setTimeout(() => {
  18099. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  18100. setTimeout(() => {
  18101. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  18102. }, 0);
  18103. }, 200);
  18104. this.$forceUpdate();
  18105. },
  18106. editCpote(index){
  18107. if(this.cpote[index]){
  18108. this.cpote[index] = false
  18109. }else {
  18110. this.cpote[index] = true
  18111. }
  18112. setTimeout(() => {
  18113. this.cpote[index.replace('s','')] += "*0*%*";
  18114. setTimeout(() => {
  18115. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  18116. }, 0);
  18117. }, 100);
  18118. this.$forceUpdate();
  18119. },
  18120. clickGenTT(){
  18121. if(!this.teacherInfoData.length){
  18122. this.$message.error("请上传教案");
  18123. return;
  18124. }
  18125. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  18126. this.openAiDialog(2, 'aiteacherTextDetail',1)
  18127. setTimeout(() => {
  18128. this.openAiDialog(2, 'aitargetTextDetail',1)
  18129. }, 500);
  18130. },
  18131. async getUserName() {
  18132. let params = { uid: this.userid };
  18133. try {
  18134. let res = await this.ajax.get(
  18135. this.$store.state.api + "getUser",
  18136. params
  18137. );
  18138. return res.data[0][0].name;
  18139. } catch (err) {
  18140. console.error(err);
  18141. }
  18142. },
  18143. getCGN(type){
  18144. let sub = [] //学科
  18145. let mclass = [] //年纪
  18146. let theme = []
  18147. if (this.courseTypeId.length) {
  18148. for (var i = 0; i < this.courseTypeId.length; i++) {
  18149. let _sid = this.courseTypeId[i]
  18150. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18151. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18152. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18153. }
  18154. }
  18155. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18156. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18157. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18158. }
  18159. }
  18160. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18161. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  18162. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  18163. }
  18164. }
  18165. }
  18166. if(type == 1){
  18167. return sub.join(",")
  18168. }else if(type == 2){
  18169. return mclass.join(",")
  18170. }else if(type == 3){
  18171. return theme.join(",")
  18172. }
  18173. }
  18174. },
  18175. async exportTeachPlan(){
  18176. this.loading = true
  18177. const zip = new JSZip();
  18178. let md = new MarkdownIt();
  18179. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18180. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18181. let String = ''
  18182. String += `<h1 style="text-align: center;">${this.courseName}</h1>`
  18183. String += `<h2>课程基本信息</h2>`
  18184. String += `<div><strong>设计者:</strong><span>${await this.getUserName()}</span></div>`
  18185. String += `<div><strong>年级:</strong><span></span>${this.getCGN(2)}</div>`
  18186. String += `<div><strong>主题:</strong><span></span>${this.getCGN(3)}</div>`
  18187. String += `<div><strong>学科:</strong><span></span>${this.getCGN(1)}</div>`
  18188. if(courseText){
  18189. String += `<h2>课程概况</h2>`
  18190. String += md.render(courseText)
  18191. }
  18192. if(target){
  18193. String += `<h2>课程目标</h2>`
  18194. String += md.render(target)
  18195. }
  18196. String += `<h2>课程教案</h2>`
  18197. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18198. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18199. // let name = _task.task+'-教案'
  18200. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  18201. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  18202. await this.generate(name, _html, i)
  18203. }
  18204. String += `<h3>任务${i+1}</h3>`
  18205. String += `<h4>${_task.task}</h4>`
  18206. String += _html
  18207. // let file = await this.generateExport(name, _html, i)
  18208. // zip.file(`${name}.docx`, file, { binary: true })
  18209. }
  18210. await this.generateExport(this.courseName, String, i)
  18211. setTimeout(() => {
  18212. this.loading = false
  18213. }, 2000);
  18214. // zip.generateAsync({ type: "blob" }).then((content) => {
  18215. // // 生成二进制流
  18216. // saveAs(
  18217. // content,
  18218. // this.courseName + "-" + "教案.zip"
  18219. // ); // 利用file-saver保存文件 自定义文件名
  18220. // setTimeout(() => {
  18221. // this.loading = false
  18222. // // if(!this.cid){
  18223. // // this.addWork(3)
  18224. // // }else{
  18225. // // this.updateWork();
  18226. // // this.steps = 4;
  18227. // // }
  18228. // }, 2000);
  18229. // });
  18230. },
  18231. async exportTaskEA(){
  18232. this.loading = true
  18233. const zip = new JSZip();
  18234. let md = new MarkdownIt();
  18235. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18236. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18237. for(var j = 0; j < _task.chapterData.length; j++){
  18238. if(_task.chapterData[j].type == 3 && _task.chapterData[j].name.includes('学历案')){
  18239. let file = await getFile(_task.chapterData[j].url)
  18240. if (file.data != 1) {
  18241. // 下载文件, 并存成ArrayBuffer对象
  18242. const file_name = _task.chapterData[j].name; // 获取文件名
  18243. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  18244. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  18245. // 判断是否有重复的文件名字
  18246. if (!zip.file(file_name)) {
  18247. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  18248. } else {
  18249. // 如果有重复的文件名,则在文件名后添加序号
  18250. let count = 1;
  18251. let newFileName = fileNameWithoutExt;
  18252. while (zip.file(`${newFileName}.${fileExt}`)) {
  18253. newFileName = `${fileNameWithoutExt}(${count})`;
  18254. count++;
  18255. }
  18256. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  18257. }
  18258. }
  18259. }
  18260. }
  18261. for(var j = 0; j < _task.toolChoose.length; j++){
  18262. let tool = _task.toolChoose[j]
  18263. if(tool.eList && tool.eList.length){
  18264. let tableContent = '| 素养 | 评价标准 | 评价细则 |\n| --- | --- | --- |\n';
  18265. tool.eList.forEach(item => {
  18266. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18267. });
  18268. let html = md.render(tableContent);
  18269. let name = `任务${i+1}工具${j+1}的评价.docx`
  18270. let file = await this.generateExport2(name, html, i)
  18271. zip.file(`${name}`, file, { binary: true })
  18272. }
  18273. }
  18274. // let file = await this.generateExport(name, _html, i)
  18275. // zip.file(`${name}.docx`, file, { binary: true })
  18276. }
  18277. zip.generateAsync({ type: "blob" }).then((content) => {
  18278. // 生成二进制流
  18279. saveAs(
  18280. content,
  18281. this.courseName + "-" + "评价和学历案.zip"
  18282. ); // 利用file-saver保存文件 自定义文件名
  18283. setTimeout(() => {
  18284. this.loading = false
  18285. }, 2000);
  18286. });
  18287. },
  18288. async downloadFile(item){
  18289. let data = await getFile(item.url)
  18290. let file = new File([data.data], item.name);
  18291. saveAs(file, item.name);
  18292. },
  18293. async addAppendixEva(i, j){
  18294. let md = new MarkdownIt();
  18295. let tool = this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose[j]
  18296. if(tool.eList && tool.eList.length){
  18297. let tableContent = '| 素养 | 评价标准 | 评价细则 |\n| --- | --- | --- |\n';
  18298. tool.eList.forEach(item => {
  18299. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18300. });
  18301. let html = md.render(tableContent);
  18302. let name = `任务${i+1}工具${j+1}的评价.docx`
  18303. let file = await this.generateExport2(name, html, i)
  18304. this.beforeUploadHtml(file, 0, "", 2)
  18305. }
  18306. },
  18307. clickGenTT2(){
  18308. if (this.courseName == "") {
  18309. this.$message.error("请补充填写课程名称");
  18310. return;
  18311. }
  18312. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  18313. let functionA = ''
  18314. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18315. // setTimeout(() => {
  18316. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18317. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18318. // }, 500);
  18319. functionA = ()=>{
  18320. this.openAiDialog(2, 'aitargetTextDetail3',1)
  18321. }
  18322. }
  18323. this.openAiDialog(2, 'aiDetail',1, functionA)
  18324. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18325. // setTimeout(() => {
  18326. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18327. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18328. // }, 500);
  18329. }
  18330. this.courseTextBool = true
  18331. },
  18332. changeIsuseT(){
  18333. if(this.isuseT == 1){
  18334. this.courseTextB = false
  18335. }else if(this.isuseT == 2){
  18336. navigator.mediaDevices.getUserMedia({ audio: true })
  18337. .then(stream => {
  18338. console.log('获取录音权限成功');
  18339. })
  18340. .catch(err => {
  18341. this.$message.error('获取录音权限失败')
  18342. console.error('获取录音权限失败:', err);
  18343. });
  18344. }else{
  18345. if(this.courseText){
  18346. this.courseTextB = false
  18347. }else{
  18348. this.courseTextB = true
  18349. }
  18350. }
  18351. this.interSetting = false
  18352. this.interPan = true
  18353. },
  18354. changeLang(){
  18355. window.course_lang = this.languageSetting
  18356. },
  18357. openInterPanSetting(){
  18358. this.interSetting = !this.interSetting
  18359. if(this.interSetting){
  18360. if(this.istemplate == 1){
  18361. this.agentid = this.aiJson.agentid
  18362. }else {
  18363. this.agentid = this.aiJson.sagentid
  18364. }
  18365. }else {
  18366. this.agentid = ''
  18367. }
  18368. },
  18369. openInterPanSetting2(){
  18370. this.interSetting = !this.interSetting
  18371. if(this.interSetting){
  18372. this.r_agentid = this.aiJson.recordAgentid
  18373. }else {
  18374. this.r_agentid = ''
  18375. }
  18376. },
  18377. setAgentid(){
  18378. if(!this.agentid.trim()){
  18379. this.$message.error('请输入工作流链接')
  18380. return;
  18381. }
  18382. if(this.istemplate == 1){
  18383. this.aiJson.agentid = this.agentid.trim()
  18384. }else {
  18385. this.aiJson.sagentid = this.agentid.trim()
  18386. }
  18387. this.interFlash = false
  18388. setTimeout(() => {
  18389. this.interFlash = true
  18390. }, 100);
  18391. this.interSetting = false
  18392. },
  18393. setAgentid2(){
  18394. if(!this.r_agentid.trim()){
  18395. this.$message.error('请输入工作流链接')
  18396. return;
  18397. }
  18398. this.aiJson.recordAgentid = this.r_agentid.trim()
  18399. this.interSetting = false
  18400. },
  18401. rebuildAgentid(){
  18402. this.aiJson.sagentid = ''
  18403. this.interFlash = false
  18404. setTimeout(() => {
  18405. this.interFlash = true
  18406. }, 100);
  18407. this.interSetting = false
  18408. },
  18409. cancelInterSetting(){
  18410. this.agentid = ''
  18411. this.interSetting = false
  18412. },
  18413. cancelInterSetting2(){
  18414. this.r_agentid = ''
  18415. this.interSetting = false
  18416. },
  18417. openAiDialog2(clickType, type, callback, index, tindex){
  18418. if (this.taskLoading.length) {
  18419. let _pan = 1
  18420. for(var k = 0; k < this.taskLoading.length; k++){
  18421. if(this.taskLoading[k]){
  18422. this.$message({
  18423. message: `请等待任务${k+1}回答完毕后再继续`,
  18424. type: "warning"
  18425. });
  18426. _pan = 2
  18427. }
  18428. }
  18429. if(_pan == 2){
  18430. return
  18431. }
  18432. }
  18433. if(this.taskGLoading.length){
  18434. let _pan = 1
  18435. for(var k = 0; k < this.taskGLoading.length; k++){
  18436. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  18437. this.$message({
  18438. message: `请等待任务${k+1}回答完毕后再继续`,
  18439. type: "warning"
  18440. });
  18441. _pan = 2
  18442. }
  18443. }
  18444. if(_pan == 2){
  18445. return
  18446. }
  18447. }
  18448. let pan2 = 1
  18449. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18450. for(var _index = 0; _index < taskJson.length; _index++){
  18451. for (var j = 0; j < taskJson[_index].toolChoose.length; j++) {
  18452. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[_index].toolChoose[j].tool[0]) != -1){
  18453. if(this.$refs['evalist'+_index+j] && this.$refs['evalist'+_index+j][0].loading){
  18454. this.$message({
  18455. message: `请等待任务${_index+1}回答完毕后再继续`,
  18456. type: "warning"
  18457. });
  18458. pan2 = 2
  18459. }
  18460. }
  18461. }
  18462. }
  18463. if(pan2 == 2){
  18464. return
  18465. }
  18466. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  18467. confirmButtonText: "确定",
  18468. cancelButtonText: "取消",
  18469. type: "warning",
  18470. customClass: 'custom-confirm-box'
  18471. })
  18472. .then(() => {
  18473. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  18474. // this.openAiDialog(clickType, 'aiTeacher')
  18475. // }else {
  18476. this.openAiDialog(clickType, type, callback, index, tindex)
  18477. // }
  18478. })
  18479. .catch(() => {
  18480. });
  18481. setTimeout(() => {
  18482. this.setTipsIndex()
  18483. }, 500)
  18484. },
  18485. async openAiDialog(clickType, type, callback, index, tindex) {
  18486. let fileid = this.isFileSearch ? [...this.fileIds] : []
  18487. fileid = [...fileid]
  18488. if (this.infoData.length) {
  18489. for (var i = 0; i < this.infoData.length; i++) {
  18490. if(this.infoData[i].fileid){
  18491. fileid.push(this.infoData[i].fileid)
  18492. }else {
  18493. let _fileid = await this.createFileid(this.infoData[i].url)
  18494. if(_fileid){
  18495. this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18496. this.$forceUpdate();
  18497. if(_fileid != 1){
  18498. fileid.push(_fileid)
  18499. }
  18500. }
  18501. }
  18502. }
  18503. }
  18504. fileid = [...fileid, ...this.knowFileids, ...this.knowFileids2]
  18505. if(fileid.length > 30){
  18506. this.$message.error('目前检索文件不能超过30个噢,请减少一些')
  18507. return;
  18508. }
  18509. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  18510. this.$message.error("您没有权限修改/查看提示词");
  18511. return;
  18512. }
  18513. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  18514. this.$message.error("请上传教案");
  18515. return;
  18516. }
  18517. if (this.courseName == "") {
  18518. this.$message.error("请补充填写课程名称");
  18519. return;
  18520. }
  18521. this.aiText2 = ''
  18522. this.clickType = clickType
  18523. let sub = []
  18524. if (this.courseTypeId.length) {
  18525. for (var i = 0; i < this.courseTypeId.length; i++) {
  18526. let _sid = this.courseTypeId[i]
  18527. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18528. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18529. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18530. }
  18531. }
  18532. }
  18533. }
  18534. let mclass = []
  18535. if (this.courseTypeId.length) {
  18536. for (var i = 0; i < this.courseTypeId.length; i++) {
  18537. let _sid = this.courseTypeId[i]
  18538. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18539. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18540. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18541. }
  18542. }
  18543. }
  18544. }
  18545. if (type == "aiDetail") {
  18546. if (this.ttextLoading) {
  18547. this.$message({
  18548. message: "请回答完毕后再次发送",
  18549. type: "warning"
  18550. });
  18551. return;
  18552. }
  18553. this.aitype = "aiDetail"
  18554. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  18555. this.aiText = this.aiJson.aiDetail
  18556. this.aiCallBack = [callback, index]
  18557. } else if (type == "aiOutline") {
  18558. this.aitype = "aiOutline"
  18559. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18560. this.aiText = this.aiJson.aiOutline
  18561. } else if (type == "aiOutline2") {
  18562. this.aitype = "aiOutline2"
  18563. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18564. this.aiText = this.aiJson.aiOutlineTask
  18565. this.aiText2 = this.aiJson.aiOutlineDetail
  18566. } else if (type == "aiOutlineDetail2") {
  18567. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  18568. this.$message({
  18569. message: "请回答完毕后再次发送",
  18570. type: "warning"
  18571. });
  18572. return;
  18573. }
  18574. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  18575. this.$message.error('请输入任务名称')
  18576. return;
  18577. }
  18578. this.aitype = type
  18579. this.aiCallBack = callback
  18580. this.aiText = this.aiJson.aiOutlineDetail2
  18581. } else if (type == "aiTask") {
  18582. this.aitype = "aiTask"
  18583. var _text = ""
  18584. for (var i = 0; i < this.teacherText.length; i++) {
  18585. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  18586. }
  18587. // this.aiText = `请根据${_text}。`
  18588. this.aiText = this.aiJson.aiTask
  18589. this.aiCallBack = callback
  18590. } else if (type == "aiTask2") {
  18591. if (this.taskLoading[callback]) {
  18592. this.$message({
  18593. message: "请回答完毕后再次发送",
  18594. type: "warning"
  18595. });
  18596. return;
  18597. }
  18598. this.aitype = "aiTask2"
  18599. this.aiText = this.aiJson.aiTask
  18600. this.aiCallBack = [callback, index]
  18601. } else if (type == "aiTask3") {
  18602. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  18603. this.$message({
  18604. message: "请回答完毕后再次发送",
  18605. type: "warning"
  18606. });
  18607. return;
  18608. }
  18609. this.aitype = type
  18610. this.aiText = this.aiJson.aiTaskG1
  18611. this.aiText2 = this.aiJson.aiTaskG2
  18612. this.aiText3 = this.aiJson.aiTaskG3
  18613. this.aiCallBack = [callback, index]
  18614. } else if (type == "aiTaskG3") {
  18615. if (this.taskGLoading[callback] && this.taskGLoading[callback][0] && (this.taskGLoading[callback][0][2])) {
  18616. this.$message({
  18617. message: "请回答完毕后再次发送",
  18618. type: "warning"
  18619. });
  18620. return;
  18621. }
  18622. this.aitype = type
  18623. this.aiText = this.aiJson.aiTaskG3
  18624. this.aiCallBack = callback
  18625. } else if (type == "aiTaskG2") {
  18626. if (this.taskGLoading[callback] && this.taskGLoading[callback][0] && (this.taskGLoading[callback][0][1])) {
  18627. this.$message({
  18628. message: "请回答完毕后再次发送",
  18629. type: "warning"
  18630. });
  18631. return;
  18632. }
  18633. if(callback != 'all' && !this.unitJson[0].chapterInfo[0].taskJson[callback].taskDetail3){
  18634. this.$message({
  18635. message: `请先生成任务${callback}的教案在执行此操作`,
  18636. type: "warning"
  18637. });
  18638. return;
  18639. }
  18640. this.aitype = type
  18641. this.aiText = this.aiJson.aiTaskG2
  18642. this.aiCallBack = callback
  18643. } else if (type == "aiDetail1") {
  18644. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  18645. this.$message({
  18646. message: "请回答完毕后再次发送",
  18647. type: "warning"
  18648. });
  18649. return;
  18650. }
  18651. this.aitype = "aiDetail1"
  18652. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  18653. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  18654. this.aiText = this.aiJson.aiDetail1
  18655. this.aiCallBack = callback
  18656. this.aiIndex = index
  18657. } else if (type == "aiDetail2") {
  18658. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  18659. this.$message({
  18660. message: "请回答完毕后再次发送",
  18661. type: "warning"
  18662. });
  18663. return;
  18664. }
  18665. this.aitype = "aiDetail2"
  18666. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  18667. this.aiText = this.aiJson.aiDetail2
  18668. this.aiCallBack = callback
  18669. this.aiIndex = index
  18670. } else if (type == "aiDetail3") {
  18671. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  18672. this.$message({
  18673. message: "请回答完毕后再次发送",
  18674. type: "warning"
  18675. });
  18676. return;
  18677. }
  18678. this.aitype = "aiDetail3"
  18679. this.aiText = this.aiJson.aiDetail3
  18680. this.aiIndex = index + '-' + tindex
  18681. } else if (type == "aiDetail4") {
  18682. var _text = ""
  18683. if(callback && callback.length){
  18684. for (var i = 0; i < callback.length; i++) {
  18685. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  18686. }
  18687. }
  18688. this.aitype = "aiDetail4"
  18689. this.aiText = this.aiJson.aiDetail4
  18690. this.aiIndex = index
  18691. } else if (type == "aiTeacher") {
  18692. this.aitype = "aiTeacher"
  18693. var _text = ""
  18694. for (var i = 0; i < this.dArray.length; i++) {
  18695. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  18696. }
  18697. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18698. this.aiText = this.aiJson.aiTeacher
  18699. this.aiCallBack = callback
  18700. } else if (type == "aiTeacher2") {
  18701. if(this.ttaskDetailLoading5.length){
  18702. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  18703. this.$message({
  18704. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  18705. type: "warning"
  18706. });
  18707. return
  18708. }
  18709. this.aitype = "aiTeacher2"
  18710. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18711. } else if (type == "aiTeacher3") {
  18712. this.aitype = type
  18713. this.aiText = this.aiJson.aiCpoteTask
  18714. this.aiText2 = this.aiJson.teacherDetail2
  18715. } else if (type == "teacherDetail") {
  18716. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18717. this.$message({
  18718. message: "请回答完毕后再次发送",
  18719. type: "warning"
  18720. });
  18721. return;
  18722. }
  18723. this.aitype = "teacherDetail"
  18724. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18725. this.aiText = this.aiJson.teacherDetail
  18726. this.aiCallBack = callback
  18727. this.aiIndex = index
  18728. } else if (type == "teacherDetail2") {
  18729. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  18730. this.$message.error('请输入任务名称')
  18731. return;
  18732. }
  18733. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18734. // this.$message({
  18735. // message: "请回答完毕后再次发送",
  18736. // type: "warning"
  18737. // });
  18738. // return;
  18739. this.$confirm("还未生成完毕,是否直接重新生成?", "提示", {
  18740. confirmButtonText: "确定重新生成",
  18741. cancelButtonText: "取消",
  18742. distinguishCancelAndClose: true,
  18743. type: "warning",
  18744. customClass: 'custom-confirm-box'
  18745. })
  18746. .then(() => {
  18747. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  18748. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  18749. this.isTeacherTaskCancelToken2[index] = null;
  18750. }
  18751. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18752. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18753. if(this.isTeacherTaskCancelSource[index]){
  18754. this.isTeacherTaskCancelSource[index].close()
  18755. this.isTeacherTaskCancelSource[index] = null
  18756. }
  18757. this.aitype = "teacherDetail2"
  18758. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18759. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18760. this.aiCallBack = callback
  18761. this.aiIndex = index
  18762. this.dialogVisibleAiD = true
  18763. }).catch((v) => {
  18764. console.log(v);
  18765. })
  18766. setTimeout(() => {
  18767. this.setTipsIndex()
  18768. }, 500)
  18769. return;
  18770. }else {
  18771. this.aitype = "teacherDetail2"
  18772. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18773. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18774. this.aiCallBack = callback
  18775. this.aiIndex = index
  18776. this.dialogVisibleAiD = true
  18777. }
  18778. } else if (type == "aiCpote1") {
  18779. if (this.cpotetLoading.cpote1) {
  18780. this.$message({
  18781. message: "请回答完毕后再次发送",
  18782. type: "warning"
  18783. });
  18784. return;
  18785. }
  18786. this.aitype = "aiCpote1"
  18787. this.aiText = this.aiJson.cpote1
  18788. this.aiCallBack = callback
  18789. } else if (type == "aiCpote2") {
  18790. if (this.cpotetLoading.cpote2) {
  18791. this.$message({
  18792. message: "请回答完毕后再次发送",
  18793. type: "warning"
  18794. });
  18795. return;
  18796. }
  18797. this.aitype = "aiCpote2"
  18798. this.aiText = this.aiJson.cpote2
  18799. this.aiCallBack = callback
  18800. } else if (type == "aiCpote3") {
  18801. if (this.cpotetLoading.cpote3) {
  18802. this.$message({
  18803. message: "请回答完毕后再次发送",
  18804. type: "warning"
  18805. });
  18806. return;
  18807. }
  18808. this.aitype = "aiCpote3"
  18809. this.aiText = this.aiJson.cpote3
  18810. this.aiCallBack = callback
  18811. } else if (type == "aiCpote4") {
  18812. if (this.cpotetLoading.cpote4) {
  18813. this.$message({
  18814. message: "请回答完毕后再次发送",
  18815. type: "warning"
  18816. });
  18817. return;
  18818. }
  18819. this.aitype = "aiCpote4"
  18820. this.aiText = this.aiJson.cpote4
  18821. this.aiCallBack = callback
  18822. } else if (type == 'aiteacherTextDetail'){
  18823. if (this.tteacherTextLoading) {
  18824. this.$message({
  18825. message: "请回答完毕后再次发送",
  18826. type: "warning"
  18827. });
  18828. return;
  18829. }
  18830. this.aitype = type
  18831. this.aiText = this.aiJson.aiAbstract
  18832. this.aiCallBack = callback
  18833. } else if (type == 'aitargetTextDetail'){
  18834. if (this.ttargetTextLoading) {
  18835. this.$message({
  18836. message: "请回答完毕后再次发送",
  18837. type: "warning"
  18838. });
  18839. return;
  18840. }
  18841. this.aitype = type
  18842. this.aiText = this.aiJson.aiTarget
  18843. this.aiCallBack = callback
  18844. } else if (type == 'aitargetTextDetail2'){
  18845. if (this.ttargetTextLoading2) {
  18846. this.$message({
  18847. message: "请回答完毕后再次发送",
  18848. type: "warning"
  18849. });
  18850. return;
  18851. }
  18852. this.aitype = type
  18853. this.aiText = this.aiJson.aiTarget2
  18854. this.aiCallBack = callback
  18855. } else if (type == 'aitargetTextDetail3'){
  18856. if (this.ttargetTextLoading2) {
  18857. this.$message({
  18858. message: "请回答完毕后再次发送",
  18859. type: "warning"
  18860. });
  18861. return;
  18862. }
  18863. if(!this.courseText){
  18864. this.$message.error("请生成简要描述后再生成目标");
  18865. return;
  18866. }
  18867. this.$nextTick(() => {
  18868. const targetDiv = this.$refs.aitargetTextDetail3;
  18869. if (targetDiv) {
  18870. targetDiv.scrollIntoView();
  18871. }
  18872. });
  18873. this.aitype = type
  18874. this.aiText = this.aiJson.aiTargetGet
  18875. this.aiText2 = this.aiJson.aiTarget2
  18876. this.aiCallBack= callback
  18877. } else if (type == 'aiSearchFile'){
  18878. if(this.fileSLoading) {
  18879. this.$message({
  18880. message: "请回答完毕后再次发送",
  18881. type: "warning"
  18882. });
  18883. return;
  18884. }
  18885. this.aitype = type
  18886. this.aiText = this.aiJson.aiSearchFile
  18887. } else if (type == 'aiSearchFile2'){
  18888. if(this.fileSLoading) {
  18889. this.$message({
  18890. message: "请回答完毕后再次发送",
  18891. type: "warning"
  18892. });
  18893. return;
  18894. }
  18895. this.aitype = type
  18896. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  18897. #输出样例
  18898. <学科1>:关键词
  18899. - 匹配到的内容1
  18900. - 匹配到的内容2
  18901. - 匹配到的内容3
  18902. - 匹配到的内容4
  18903. - 匹配到的内容5
  18904. <学科2>:关键词
  18905. - 匹配到的内容1
  18906. - 匹配到的内容2
  18907. - 匹配到的内容3
  18908. - 匹配到的内容4
  18909. - 匹配到的内容5
  18910. ...
  18911. <学科n>:关键词
  18912. - 匹配到的内容1
  18913. - 匹配到的内容2
  18914. - 匹配到的内容3
  18915. - 匹配到的内容4
  18916. - 匹配到的内容5
  18917. `
  18918. } else if (type == 'aiRateRule'){
  18919. this.aitype = type
  18920. this.aiText = this.aiJson.aiRateRule
  18921. this.aiCallBack = [callback, index]
  18922. } else if (type == 'aiRateRuleA'){
  18923. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  18924. confirmButtonText: "生成所有",
  18925. cancelButtonText: "仅生成该任务",
  18926. distinguishCancelAndClose: true,
  18927. type: "warning",
  18928. })
  18929. .then(() => {
  18930. this.aitype = type
  18931. this.aiText = this.aiJson.aiRateRule
  18932. this.aiCallBack = [1,callback]
  18933. this.dialogVisibleAiD = true
  18934. }).catch((v) => {
  18935. console.log(v);
  18936. if (v == "cancel") {
  18937. this.aitype = type
  18938. this.aiText = this.aiJson.aiRateRule
  18939. this.aiCallBack = [2,callback]
  18940. this.dialogVisibleAiD = true
  18941. }
  18942. })
  18943. }
  18944. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  18945. this.dialogVisibleAiD = true
  18946. }
  18947. },
  18948. async aiConfirm(msg,msg2,msg3) {
  18949. let sub = []
  18950. if (this.courseTypeId.length) {
  18951. for (var i = 0; i < this.courseTypeId.length; i++) {
  18952. let _sid = this.courseTypeId[i]
  18953. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18954. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18955. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18956. }
  18957. }
  18958. }
  18959. }
  18960. let mclass = []
  18961. if (this.courseTypeId.length) {
  18962. for (var i = 0; i < this.courseTypeId.length; i++) {
  18963. let _sid = this.courseTypeId[i]
  18964. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18965. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18966. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18967. }
  18968. }
  18969. }
  18970. }
  18971. let url = []
  18972. if (this.infoData.length) {
  18973. for (var i = 0; i < this.infoData.length; i++) {
  18974. url.push(this.infoData[i].url)
  18975. }
  18976. }
  18977. if (this.aitype == "aiDetail") {
  18978. this.detailYou(msg)
  18979. } else if (this.aitype == "aiOutline") {
  18980. this.loading = true
  18981. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18982. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  18983. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  18984. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18985. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18986. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18987. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18988. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18989. if(this.languageSetting == 2){
  18990. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18991. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18992. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18993. }
  18994. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18995. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18996. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18997. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18998. let message = `NOTICE
  18999. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19000. Output: Provide your output in json format.
  19001. Language: ${this.getLang()}
  19002. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19003. Instruction: Based on the context, follow "Format example", write content.
  19004. # Context
  19005. ## 要求
  19006. ${msg} 以及##参考资料
  19007. ## 参考资料
  19008. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19009. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19010. detail至少输出300tokens,markdown格式输出。
  19011. detail包含子教学目标、过程性成果、子评价标准
  19012. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19013. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19014. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  19015. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  19016. # Format example`
  19017. message = message.replaceAll('\n', ' ')
  19018. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  19019. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  19020. // detail输出不要输出成json,文本或者markdown都可以
  19021. this.aiGet2(message, () => {
  19022. this.loading = false
  19023. this.isOutline = true
  19024. })
  19025. } else if (this.aitype == "aiOutline2") {
  19026. this.loading = true
  19027. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19028. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19029. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19030. let message = `NOTICE
  19031. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19032. Language: ${this.getLang()}
  19033. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19034. Instruction: Based on the context, follow "Format example", write content.
  19035. # Context
  19036. ## 要求
  19037. ${msg} 以及##参考资料
  19038. ## 参考资料
  19039. 课程名字:${this.courseName}
  19040. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  19041. ${sub.length ? '学科:' + sub.join(",") : ''}
  19042. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19043. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19044. # Format example
  19045. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  19046. this.aiGetTask2(message, () => {
  19047. this.loading = false
  19048. this.isOutline = true
  19049. })
  19050. } else if (this.aitype == "aiOutlineDetail2") {
  19051. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  19052. } else if (this.aitype == "aiTask") {
  19053. var _text = ""
  19054. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19055. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19056. }
  19057. let message = `NOTICE
  19058. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19059. Language: ${this.getLang()}
  19060. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19061. Instruction: Based on the context, follow "Format example", write content.
  19062. # Context
  19063. ## 要求
  19064. ${msg} 为**每个教学任务分别输出**以下内容。
  19065.  
  19066. ${(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','') : ''}
  19067. ## 参考资料
  19068. 教学任务教案:${_text}
  19069. ## 格式要求
  19070. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  19071. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19072. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  19073. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19074. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19075. 出现选择题和问答题的概率提高
  19076. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  19077.  
  19078. # Format example
  19079. [{"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":"工具描述"}]}]`
  19080. this.loading = true
  19081. this.aiGet3(message, this.aiCallBack)
  19082. } else if (this.aitype == "aiTask2") {
  19083. if(this.aiCallBack[0] == 'all'){
  19084. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19085. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19086. let message = `NOTICE
  19087. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19088. Language: ${this.getLang()}
  19089. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19090. Instruction: Based on the context, follow "Format example", write content.
  19091. # Context
  19092. ## 要求
  19093. ${msg} 为教学任务分别输出以下内容。
  19094.  
  19095. ${(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','') : ''}
  19096. ## 参考资料
  19097. 教学任务教案:${_text}
  19098. ## 格式要求
  19099. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19100. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19101. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19102. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19103. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  19104.  
  19105. # Format example
  19106. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19107. this.taskLoading[_task] = true
  19108. this.aiGet32(message, _task)
  19109. }
  19110. }else{
  19111. 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`
  19112. let message = `NOTICE
  19113. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19114. Language: ${this.getLang()}
  19115. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19116. Instruction: Based on the context, follow "Format example", write content.
  19117. # Context
  19118. ## 要求
  19119. ${msg} 为教学任务分别输出以下内容。
  19120.  
  19121. ${(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','') : ''}
  19122. ## 参考资料
  19123. 教学任务教案:${_text}
  19124. ## 格式要求
  19125. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19126. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19127. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19128. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19129. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  19130.  
  19131. # Format example
  19132. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19133. this.taskLoading[this.aiCallBack[0]] = true
  19134. this.aiGet32(message, this.aiCallBack[0])
  19135. }
  19136. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19137. } else if (this.aitype == "aiTask3") {
  19138. if(this.aiCallBack[0] == 'all'){
  19139. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19140. if(!this.taskGLoading[_task]){
  19141. this.taskGLoading[_task] = []
  19142. this.ttaskGLoading[_task] = []
  19143. }
  19144. this.taskGLoading[_task][0] = true
  19145. this.ttaskGLoading[_task][0] = true
  19146. // this.taskGLoading[_task][1] = true
  19147. // this.taskGLoading[_task][2] = true
  19148. // this.aiGetG323(message3, _task)
  19149. }
  19150. let ij = 0;
  19151. let _this = this
  19152. function processNext() {
  19153. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19154. if(!_this.taskGLoading[ij][0]){
  19155. ij++;
  19156. processNext();
  19157. return;
  19158. }
  19159. let message1 = `NOTICE
  19160. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19161. Language: ${_this.getLang()}
  19162. # Context
  19163. ## 要求
  19164. ${msg}
  19165.  
  19166. ## 参考资料
  19167. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19168. # 输出格式与要求
  19169. 任务描述(告诉学生他们需要做什么):
  19170. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19171. # 范例
  19172. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19173. _this.aiGetG321L(message1, ij, (callback2) => {
  19174. // _this.aiGetG322(message2, ij, callback2);
  19175. callback2 ? callback2() : ''
  19176. }, () => {
  19177. // 回调函数,当前任务完成后执行
  19178. ij++;
  19179. processNext(); // 处理下一个任务
  19180. });
  19181. }
  19182. }
  19183. processNext(); // 启动处理
  19184. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19185. }else{
  19186. let message1 = `NOTICE
  19187. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19188. Language: ${this.getLang()}
  19189. # Context
  19190. ## 要求
  19191. ${msg}
  19192.  
  19193. ## 参考资料
  19194. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19195. # 输出格式与要求
  19196. 任务描述(告诉学生他们需要做什么):
  19197. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19198. # 范例
  19199. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19200. if(!this.taskGLoading[this.aiCallBack[0]]){
  19201. this.taskGLoading[this.aiCallBack[0]] = []
  19202. this.ttaskGLoading[this.aiCallBack[0]] = []
  19203. }
  19204. this.taskGLoading[this.aiCallBack[0]][0] = true
  19205. this.ttaskGLoading[this.aiCallBack[0]][0] = true
  19206. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19207. // this.taskGLoading[this.aiCallBack[0]][2] = true
  19208. this.aiGetG321L(message1, this.aiCallBack[0], () => {
  19209. // this.aiGetG322(message2, this.aiCallBack[0])
  19210. // this.aiCallBack[0] ? this.aiCallBack[0]() : ''
  19211. })
  19212. // this.aiGetG323(message3, this.aiCallBack[0])
  19213. }
  19214. } else if (this.aitype == "aiTaskG3") {
  19215. let message3 = `NOTICE
  19216. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19217. Language: ${this.getLang()}
  19218. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19219. Instruction: Based on the context, follow "Format example", write content.
  19220. # Context
  19221. ## 要求
  19222. ${msg3}
  19223.  
  19224. ## 参考资料
  19225. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19226. # 输出格式与要求
  19227. 核心素养:从教案中提取
  19228. 目标:从教案中提取
  19229. 评价标准:从教案中提取评价标准
  19230. # Format example
  19231. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  19232. if(!this.taskGLoading[this.aiCallBack]){
  19233. this.taskGLoading[this.aiCallBack] = []
  19234. }
  19235. this.taskGLoading[this.aiCallBack][2] = true
  19236. this.aiGetG323(message3, this.aiCallBack)
  19237. } else if (this.aitype == "aiTaskG2") {
  19238. if(this.aiCallBack == 'all'){
  19239. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19240. if(!this.taskGLoading[_task]){
  19241. this.taskGLoading[_task] = []
  19242. }
  19243. this.taskGLoading[_task][1] = true
  19244. }
  19245. let ij = 0;
  19246. let _this = this
  19247. function processNext() {
  19248. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19249. if(!_this.taskGLoading[ij][1] || !_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3){
  19250. _this.taskGLoading[ij][1] = false
  19251. ij++;
  19252. processNext();
  19253. return;
  19254. }
  19255. let message2 = `NOTICE
  19256. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19257. Language: ${_this.getLang()}
  19258. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19259. Instruction: Based on the context, follow "Format example", write content.
  19260. # Context
  19261. ## 要求
  19262. ${msg2}
  19263.  
  19264. ## 参考资料
  19265. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19266. # 输出格式与要求
  19267. 互动工具列表
  19268. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19269. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19270. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  19271. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19272. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19273. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19274. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19275. # Format example
  19276. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19277. _this.aiGetG322(message2, ij, () => {
  19278. // 回调函数,当前任务完成后执行
  19279. ij++;
  19280. processNext(); // 处理下一个任务
  19281. });
  19282. }
  19283. }
  19284. processNext(); // 启动处理
  19285. }else{
  19286. let message2 = `NOTICE
  19287. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19288. Language: ${this.getLang()}
  19289. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19290. Instruction: Based on the context, follow "Format example", write content.
  19291. # Context
  19292. ## 要求
  19293. ${msg2}
  19294.  
  19295. ## 参考资料
  19296. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19297. # 输出格式与要求
  19298. 互动工具列表
  19299. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19300. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19301. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  19302. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19303. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19304. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19305. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19306. # Format example
  19307. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19308. if(!this.taskGLoading[this.aiCallBack]){
  19309. this.taskGLoading[this.aiCallBack] = []
  19310. }
  19311. // this.taskGLoading[this.aiCallBack[0]][0] = true
  19312. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19313. this.taskGLoading[this.aiCallBack][1] = true
  19314. this.aiGetG322(message2, this.aiCallBack)
  19315. }
  19316. } else if (this.aitype == "aiDetail1") {
  19317. this.aiDetail(msg, this.aiIndex)
  19318. } else if (this.aitype == "aiDetail2") {
  19319. this.aiDetail2(msg, this.aiIndex)
  19320. } else if (this.aitype == "aiDetail3") {
  19321. let _index = this.aiIndex.split('-')
  19322. this.aiDetail3(msg, _index[0], _index[1])
  19323. } else if (this.aitype == "aiDetail4") {
  19324. this.aiDetail4(msg, this.aiIndex)
  19325. } else if (this.aitype == "teacherDetail") {
  19326. this.aiDetail5(msg, this.aiIndex)
  19327. } else if (this.aitype == "teacherDetail2") {
  19328. this.aiDetail52(msg, this.aiIndex)
  19329. } else if (this.aitype == "aiCpote1") {
  19330. this.aiCpote(msg, this.aiCallBack)
  19331. } else if (this.aitype == "aiCpote2") {
  19332. this.aiCpote(msg, this.aiCallBack)
  19333. } else if (this.aitype == "aiCpote3") {
  19334. this.aiCpote(msg, this.aiCallBack)
  19335. } else if (this.aitype == "aiCpote4") {
  19336. this.aiCpote(msg, this.aiCallBack)
  19337. } else if (this.aitype == "aiTeacher") {
  19338. this.loading = true
  19339. var _text = ""
  19340. for (var i = 0; i < this.dArray.length; i++) {
  19341. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  19342. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  19343. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19344. let message = ` NOTICE
  19345. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19346. Language: ${this.getLang()}
  19347. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19348. Instruction: Based on the context, follow "Format example", write content.
  19349. # Context
  19350. ## 要求
  19351. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  19352. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  19353. ${(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','') : ''}
  19354. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19355. ## Format example
  19356. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  19357. this.aiGet4(message, () => {
  19358. this.loading = false
  19359. this.isOutline2 = true
  19360. })
  19361. } else if (this.aitype == "aiTeacher2"){
  19362. this.isOutline2 = true
  19363. let _this = this
  19364. setTimeout(()=>{
  19365. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19366. const _tindex = 'task-' + i;
  19367. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19368. _this.taskDetailLoading5.push(_tindex)
  19369. }
  19370. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  19371. _this.ttaskDetailLoading5.push(_tindex)
  19372. }
  19373. // this.aiDetail52(msg, i)
  19374. }
  19375. let ij = 0;
  19376. function processNext() {
  19377. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19378. const _tindex = 'task-' + ij;
  19379. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19380. ij++;
  19381. processNext();
  19382. return;
  19383. }
  19384. // 处理当前任务
  19385. _this.aiDetail52(msg, ij, function () {
  19386. // 回调函数,当前任务完成后执行
  19387. ij++;
  19388. processNext(); // 处理下一个任务
  19389. });
  19390. }
  19391. }
  19392. processNext(); // 启动处理
  19393. }, 0)
  19394. } else if (this.aitype == "aiTeacher3"){
  19395. this.loading = true
  19396. let message = `NOTICE
  19397. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19398. Language: ${this.getLang()}
  19399. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19400. Instruction: Based on the context, follow "Format example", write content.
  19401. # Context
  19402. ## 要求
  19403. ${msg} 以及##参考资料
  19404. ## 参考资料
  19405. 任务簇:${this.cpote.cpote4}
  19406. # Format example
  19407. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  19408. this.aiGetTask3(message, () => {
  19409. this.loading = false
  19410. this.isOutline2 = true
  19411. })
  19412. } else if (this.aitype == "aiteacherTextDetail") {
  19413. this.aiteacherTextDetail(msg)
  19414. } else if (this.aitype == "aitargetTextDetail") {
  19415. this.aitargetTextDetail(msg)
  19416. } else if (this.aitype == "aitargetTextDetail2") {
  19417. this.aitargetTextDetail2(msg)
  19418. } else if (this.aitype == "aitargetTextDetail3") {
  19419. this.aitargetTextDetail3(msg)
  19420. } else if (this.aitype == 'aiSearchFile'){
  19421. let messages = `NOTICE
  19422. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19423. Language: ${this.getLang()}
  19424. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19425. Instruction: Based on the context, follow "Format example", write content.
  19426. ## 参考资料
  19427. 关键词:${this.courseName}
  19428. # Context
  19429. ## 要求
  19430. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  19431. # Format example
  19432. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  19433. this.fileSLoading = true
  19434. this.aiSearchFile(messages,()=>{
  19435. this.fileSLoading = false
  19436. })
  19437. } else if (this.aitype == 'aiSearchFile2'){
  19438. let messages = `${msg}
  19439. 课程名字:${this.courseName}
  19440. ${sub.length ? '学科:' + sub.join(",") : ''}
  19441. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  19442. this.fileSLoading = true
  19443. this.aiSearchFile2(messages,()=>{
  19444. this.fileSLoading = false
  19445. })
  19446. } else if (this.aitype == 'aiRateRule'){
  19447. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  19448. } else if (this.aitype == 'aiRateRuleA'){
  19449. if(this.aiCallBack[0] == 1){
  19450. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19451. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  19452. for(var k = 0; k < task.eList.length; k++){
  19453. if(!task.eList[k].rule){
  19454. this.againEva(msg, i, k)
  19455. }
  19456. }
  19457. }
  19458. }else if(this.aiCallBack[0] == 2){
  19459. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  19460. for(var k = 0; k < task.eList.length; k++){
  19461. if(!task.eList[k].rule){
  19462. this.againEva(msg, this.aiCallBack[1], k)
  19463. }
  19464. }
  19465. }
  19466. }
  19467. this.setAiJson(this.aitype, msg, msg2, msg3)
  19468. },
  19469. getLang(){
  19470. let lang = ''
  19471. if(this.languageSetting == 0){
  19472. lang = 'Chinese.'
  19473. }else if(this.languageSetting == 1){
  19474. lang = 'Traditional Chinese.'
  19475. }else if(this.languageSetting == 2){
  19476. lang = 'English.'
  19477. }
  19478. return lang
  19479. },
  19480. detailYou(message) {
  19481. this.textLoading = true
  19482. this.ttextLoading = true
  19483. let sub = []
  19484. if (this.courseTypeId.length) {
  19485. for (var i = 0; i < this.courseTypeId.length; i++) {
  19486. let _sid = this.courseTypeId[i]
  19487. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19488. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19489. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19490. }
  19491. }
  19492. }
  19493. }
  19494. let mclass = []
  19495. if (this.courseTypeId.length) {
  19496. for (var i = 0; i < this.courseTypeId.length; i++) {
  19497. let _sid = this.courseTypeId[i]
  19498. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19499. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19500. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19501. }
  19502. }
  19503. }
  19504. }
  19505. let url = []
  19506. if (this.infoData.length) {
  19507. for (var i = 0; i < this.infoData.length; i++) {
  19508. url.push(this.infoData[i].url)
  19509. }
  19510. }
  19511. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  19512. // --------
  19513. // ## 补充参考资料
  19514. // 补充资料:${url.join(",")}
  19515. // 补充描述:${this.courseText2} ##补充参考资料和
  19516. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19517. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19518. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19519. let msg = `NOTICE
  19520. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  19521. Language: ${this.getLang()}
  19522. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19523. Instruction: Based on the context, follow "Format example", write content.
  19524. #Context
  19525. ## 参考资料
  19526. 课程名字:${this.courseName}
  19527. ${sub.length ? '学科:' + sub.join(",") : ''}
  19528. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19529. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  19530. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  19531. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  19532. ## 要求
  19533. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  19534. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4' && this.templateid != '9dd4bb76-1e48-11ef-bee5-005056b86db5') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  19535. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19536. this.aiGet(msg)
  19537. },
  19538. setUnitJson() {
  19539. 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 }] }
  19540. this.$forceUpdate()
  19541. },
  19542. async aiGet(messages) {
  19543. let _this = this
  19544. let fileid = []
  19545. if(!this.yiKeTemplateArray.includes(this.templateid)){
  19546. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  19547. if(_this.cankaoInfoData[i].fileid){
  19548. fileid.push(_this.cankaoInfoData[i].fileid)
  19549. }else {
  19550. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  19551. if(_fileid){
  19552. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19553. _this.$forceUpdate();
  19554. if(_fileid != 1){
  19555. fileid.push(_fileid)
  19556. }
  19557. }
  19558. }
  19559. }
  19560. if(this.mode == 1){
  19561. for (var i = 0; i < _this.infoData.length; i++) {
  19562. if(_this.infoData[i].fileid){
  19563. fileid.push(_this.infoData[i].fileid)
  19564. }else {
  19565. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19566. if(_fileid){
  19567. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19568. _this.$forceUpdate();
  19569. if(_fileid != 1){
  19570. fileid.push(_fileid)
  19571. }
  19572. }
  19573. }
  19574. }
  19575. }
  19576. } else {
  19577. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19578. fileid = [...fileid]
  19579. if (_this.infoData.length) {
  19580. for (var i = 0; i < _this.infoData.length; i++) {
  19581. if(_this.infoData[i].fileid){
  19582. fileid.push(_this.infoData[i].fileid)
  19583. }else {
  19584. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19585. if(_fileid){
  19586. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19587. _this.$forceUpdate();
  19588. if(_fileid != 1){
  19589. fileid.push(_fileid)
  19590. }
  19591. }
  19592. }
  19593. }
  19594. }
  19595. }
  19596. _this.isTextCancelToken = _this.ajax.setCancelSource();
  19597. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19598. let _uuid = uuidv4();
  19599. // let params = JSON.stringify({
  19600. // // "model": "Chat",
  19601. // model: 'gpt-3.5-turbo',
  19602. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19603. // max_tokens: 4096,
  19604. // top_p: 1,
  19605. // frequency_penalty: 0,
  19606. // presence_penalty: 0,
  19607. // messages: [{
  19608. // content: messages,
  19609. // role: 'user'
  19610. // }],
  19611. // uid: _uuid,
  19612. // mind_map_question: "",
  19613. // })
  19614. let params = {
  19615. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19616. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19617. session_name: _uuid,
  19618. userId: _this.userid,
  19619. uid: _uuid,
  19620. file_ids: fileid.length ? [...fileid] : '',
  19621. model: 'gpt-4o-2024-11-20',
  19622. temperature: this.mode == 3 ? 0.5 : 0.1,
  19623. }
  19624. // let params = JSON.stringify({
  19625. // message: {
  19626. // anthropic_version: "bedrock-2023-05-31",
  19627. // max_tokens: 4096,
  19628. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19629. // top_p: 1,
  19630. // messages: [{
  19631. // "role": "user",
  19632. // "content": messages
  19633. // }] ,
  19634. // },
  19635. // uid: _uuid,
  19636. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19637. // });
  19638. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19639. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  19640. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19641. console.log(response);
  19642. // let data = response.data.FunctionResponse
  19643. // if (data.choices && data.choices.length && data.choices[0].message) {
  19644. // _this.courseText = data.choices[0].message.content
  19645. // }
  19646. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19647. } else {
  19648. _this.$message.warning(response.data.FunctionResponse.result);
  19649. }
  19650. _this.isTextCancelToken = null
  19651. }).catch(function (error) {
  19652. _this.textLoading = false
  19653. _this.ttextLoading = false
  19654. _this.isTextCancelToken = null
  19655. if(error && error.message != 'Request canceled by the user.'){
  19656. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19657. }
  19658. console.log(error);
  19659. });
  19660. await _this.aiGetgetAiContent(_uuid)
  19661. },
  19662. aiGetgetAiContent(_uid) {
  19663. try {
  19664. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19665. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19666. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19667. } catch(error){
  19668. console.log('EventSource error:', error);
  19669. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19670. this.textLoading = false
  19671. this.ttextLoading = false
  19672. this.isTextCancelToken = null
  19673. return;
  19674. }
  19675. let _allText = "";
  19676. let _mdText = "";
  19677. let _iindex = 0
  19678. this.isTextCancelSource.onmessage = _e => {
  19679. let _eData = JSON.parse(_e.data).content;
  19680. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19681. //对话已经完成
  19682. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19683. this.isTextCancelSource.close();
  19684. this.isTextCancelSource = null;
  19685. this.courseText = _mdText;
  19686. this.textLoading = false
  19687. this.ttextLoading = false
  19688. this.courseTextB = false
  19689. this.isTextCancelToken = null
  19690. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19691. this.saveCourse()
  19692. return;
  19693. } else {
  19694. _iindex++
  19695. //对话还在继续
  19696. let _text = "";
  19697. _text = _eData.replaceAll("'", "");
  19698. if (_allText == "") {
  19699. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19700. } else {
  19701. _allText += _text;
  19702. }
  19703. _mdText = _allText + "_";
  19704. _mdText = _mdText.replace(/\\n/g, "\n");
  19705. _mdText = _mdText.replace(/\\/g, "");
  19706. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19707. //转化返回的回复流数据
  19708. if(_iindex == 10){
  19709. this.courseText = _mdText;
  19710. _iindex = 0
  19711. }
  19712. this.textLoading = false
  19713. // 处理流数据
  19714. }
  19715. // this.$forceUpdate();
  19716. };
  19717. let _this = this
  19718. this.isTextCancelSource.onerror = function(event) {
  19719. // 处理错误,可以尝试重新连接
  19720. console.log('EventSource error:', event);
  19721. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19722. _this.textLoading = false
  19723. _this.ttextLoading = false
  19724. _this.isTextCancelToken = null
  19725. _this.isTextCancelSource.close();
  19726. _this.isTextCancelSource = null;
  19727. };
  19728. },
  19729. numberToChinese(number) {
  19730. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  19731. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  19732. let result = '';
  19733. let num = parseInt(number, 10);
  19734. let i = 0;
  19735. while (num > 0) {
  19736. result = chineseNum[num % 10] + chineseUnit[i] + result;
  19737. num = Math.floor(num / 10);
  19738. i++;
  19739. }
  19740. // 去除连续的零,保留一个零
  19741. result = result.replace(/零+/g, '零');
  19742. return result;
  19743. },
  19744. async aiGet2(messages, callback) {
  19745. let _this = this
  19746. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19747. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19748. if (_this.infoData.length) {
  19749. for (var i = 0; i < _this.infoData.length; i++) {
  19750. if(_this.infoData[i].fileid){
  19751. fileid.push(_this.infoData[i].fileid)
  19752. }else {
  19753. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19754. if(_fileid){
  19755. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19756. _this.$forceUpdate();
  19757. if(_fileid != 1){
  19758. fileid.push(_fileid)
  19759. }
  19760. }
  19761. }
  19762. }
  19763. }
  19764. console.log('fileid=========',fileid)
  19765. // let params = JSON.stringify({
  19766. // // "model": "Chat",
  19767. // model: 'gpt-3.5-turbo',
  19768. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19769. // max_tokens: 4096,
  19770. // top_p: 1,
  19771. // frequency_penalty: 0,
  19772. // presence_penalty: 0,
  19773. // messages: [{
  19774. // content: messages,
  19775. // role: 'user'
  19776. // }],
  19777. // stream: false,
  19778. // uid: this.userid,
  19779. // mind_map_question: "",
  19780. // })
  19781. // // let params = JSON.stringify({
  19782. // // message: {
  19783. // // anthropic_version: "bedrock-2023-05-31",
  19784. // // max_tokens: 4096,
  19785. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19786. // // top_p: 1,
  19787. // // messages: [{
  19788. // // content: messages,
  19789. // // role: 'user'
  19790. // // }], //
  19791. // // },
  19792. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19793. // // });
  19794. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19795. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19796. // console.log(response);
  19797. // let data = response.data.FunctionResponse
  19798. // if (data.choices && data.choices.length && data.choices[0].message) {
  19799. // console.log(data.choices[0].message.content);
  19800. // let dArray = JSON.parse(data.choices[0].message.content)
  19801. // _this.dArray = dArray
  19802. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19803. // for (var i = 0; i < dArray.length; i++) {
  19804. // let _task = dArray[i]
  19805. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19806. // task: _task.task,
  19807. // taskDetail: "",
  19808. // taskDetail2: _task.detail,
  19809. // taskDetail3: "",
  19810. // chapterData: [],
  19811. // toolText: "",
  19812. // toolChoose: [
  19813. // {
  19814. // tool: [],
  19815. // toolDetail: "",
  19816. // toolType: 0,
  19817. // askCount: 1,
  19818. // askTitle: "",
  19819. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19820. // },
  19821. // ],
  19822. // isShowTools: false,
  19823. // askCount: 1,
  19824. // isFold: 0,
  19825. // askTitle: "",
  19826. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19827. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19828. // homeworkList: [],
  19829. // })
  19830. // }
  19831. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19832. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19833. // _this.$forceUpdate();
  19834. // }
  19835. // // if (data.result) {
  19836. // // console.log(data.result);
  19837. // // let dArray = JSON.parse(data.result)
  19838. // // _this.dArray = dArray
  19839. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19840. // // for (var i = 0; i < dArray.length; i++) {
  19841. // // let _task = dArray[i]
  19842. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19843. // // task: _task.task,
  19844. // // taskDetail: "",
  19845. // // taskDetail2: _task.detail,
  19846. // // taskDetail3: "",
  19847. // // chapterData: [],
  19848. // // toolText: "",
  19849. // // toolChoose: [
  19850. // // {
  19851. // // tool: [],
  19852. // // toolDetail: "",
  19853. // // toolType: 0,
  19854. // // askCount: 1,
  19855. // // askTitle: "",
  19856. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19857. // // },
  19858. // // ],
  19859. // // isShowTools: false,
  19860. // // askCount: 1,
  19861. // // isFold: 1,
  19862. // // askTitle: "",
  19863. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19864. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19865. // // homeworkList: [],
  19866. // // })
  19867. // // }
  19868. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19869. // // _this.$forceUpdate();
  19870. // // }
  19871. // callback ? callback() : ''
  19872. // }).catch(function (error) {
  19873. // _this.loading = false
  19874. // console.log(error);
  19875. // });
  19876. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19877. let parm = {
  19878. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  19879. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  19880. session_name: uuidv4(),
  19881. userId: this.userid,
  19882. file_ids: fileid.length ? [...fileid] : '',
  19883. model: 'gpt-4o-2024-11-20',
  19884. temperature: this.mode == 3 ? 0.5 : 0.1,
  19885. }
  19886. this.ajax
  19887. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19888. .then((response) => {
  19889. console.log(response);
  19890. let data = response.data.FunctionResponse
  19891. if (data.message) {
  19892. console.log(data.message);
  19893. let dArray = {}
  19894. try {
  19895. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19896. } catch (error) {
  19897. console.log("error_________________" + error);
  19898. try {
  19899. let regex = new RegExp(/```json([\s\S]*?)```/);
  19900. let match = data.message.match(regex);
  19901. dArray = JSON.parse(match[1]);
  19902. // var message = data.message;
  19903. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19904. // var jsonEnd = message.indexOf("```", jsonStart);
  19905. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19906. // dArray = JSON.parse(jsonString);
  19907. } catch (error) {
  19908. try {
  19909. let regex = new RegExp(/```json([\s\S]*?)```/);
  19910. let match = data.message.match(regex);
  19911. // eval("var aaa = " + match[0])
  19912. if(match && match[1]){
  19913. dArray = JSON.parse(match[1].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19914. }else {
  19915. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19916. }
  19917. } catch (error) {
  19918. _this.$message.error('返回json格式不正确')
  19919. // +data.message
  19920. // _this.aiGet2(messages, callback);
  19921. _this.loading = false
  19922. _this.isOutlineCancelToken = null
  19923. console.log("error_________________" + error);
  19924. return;
  19925. }
  19926. console.log("error_________________" + error);
  19927. }
  19928. }
  19929. _this.dArray = dArray
  19930. console.log(dArray)
  19931. if(_this.panOutline() > 0){
  19932. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19933. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19934. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19935. }
  19936. for (var i = 0; i < dArray.length; i++) {
  19937. let _task = dArray[i]
  19938. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19939. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  19940. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  19941. }else {
  19942. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19943. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19944. taskDetail: "",
  19945. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19946. taskDetail3: "",
  19947. chapterData: [],
  19948. toolText: "",
  19949. toolChoose: [
  19950. {
  19951. tool: [],
  19952. toolDetail: "",
  19953. toolType: 0,
  19954. askCount: 1,
  19955. askTitle: "",
  19956. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19957. },
  19958. ],
  19959. isShowTools: false,
  19960. askCount: 1,
  19961. isFold: 0,
  19962. askTitle: "",
  19963. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19964. checkJson: [{ checkCount: [], checkPerent: [] }],
  19965. homeworkList: [],
  19966. })
  19967. }
  19968. }
  19969. }else {
  19970. _this.unitJson[0].chapterInfo[0].taskJson = []
  19971. for (var i = 0; i < dArray.length; i++) {
  19972. let _task = dArray[i]
  19973. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19974. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19975. taskDetail: "",
  19976. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19977. taskDetail3: "",
  19978. chapterData: [],
  19979. toolText: "",
  19980. toolChoose: [
  19981. {
  19982. tool: [],
  19983. toolDetail: "",
  19984. toolType: 0,
  19985. askCount: 1,
  19986. askTitle: "",
  19987. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19988. },
  19989. ],
  19990. isShowTools: false,
  19991. askCount: 1,
  19992. isFold: 0,
  19993. askTitle: "",
  19994. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19995. checkJson: [{ checkCount: [], checkPerent: [] }],
  19996. homeworkList: [],
  19997. })
  19998. }
  19999. }
  20000. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20001. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20002. _this.$forceUpdate();
  20003. _this.saveCourse()
  20004. }
  20005. callback ? callback() : ''
  20006. _this.isOutlineCancelToken = null
  20007. })
  20008. .catch((error) => {
  20009. _this.loading = false
  20010. _this.isOutlineCancelToken = null
  20011. console.log(error);
  20012. });
  20013. },
  20014. cancelAjax(type, index){
  20015. if (this.isOutlineCancelToken && type == 'outline') {
  20016. this.$message.success("已经成功停止生成课程大纲")
  20017. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  20018. this.isOutlineCancelToken = null;
  20019. this.loading = false
  20020. }
  20021. if (this.isFileCancelToken && type == 'file') {
  20022. this.$message.success("已经成功停止智能生成检索资料")
  20023. this.isFileCancelToken.cancel('Request canceled by the user.');
  20024. this.isFileCancelToken = null;
  20025. this.fileSLoading = false
  20026. }
  20027. if(this.isTextCancelToken && type == 'text'){
  20028. this.$message.success("已经成功停止AI优化")
  20029. this.isTextCancelToken.cancel('Request canceled by the user.');
  20030. this.isTextCancelToken = null;
  20031. this.textLoading = false
  20032. this.ttextLoading = true
  20033. if(this.isTextCancelSource){
  20034. this.isTextCancelSource.close()
  20035. this.isTextCancelSource = null
  20036. }
  20037. }
  20038. if(this.isTargetCancelToken2 && type == 'target2'){
  20039. this.$message.success("已经成功停止生成目标")
  20040. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  20041. this.isTargetCancelToken2 = null;
  20042. this.targetTextLoading2 = false
  20043. this.ttargetTextLoading2 = false
  20044. if(this.isTargetCancelSource2){
  20045. this.isTargetCancelSource2.close()
  20046. this.isTargetCancelSource2 = null
  20047. }
  20048. this.$nextTick(() => {
  20049. const targetDiv = this.$refs.aitargetTextDetail3;
  20050. if (targetDiv) {
  20051. targetDiv.scrollIntoView();
  20052. }
  20053. });
  20054. }
  20055. if(this.isTargetCancelToken1 && type == 'target1'){
  20056. this.$message.success("已经成功停止生成目标")
  20057. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  20058. this.isTargetCancelToken1 = null;
  20059. this.targetTextLoading = false
  20060. this.ttargetTextLoading = false
  20061. if(this.isTargetCancelSource1){
  20062. this.isTargetCancelSource1.close()
  20063. this.isTargetCancelSource1 = null
  20064. }
  20065. }
  20066. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  20067. this.$message.success("已经成功停止提取摘要")
  20068. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  20069. this.isTeacherTextCancelToken = null;
  20070. this.teacherTextLoading = false
  20071. this.tteacherTextLoading = false
  20072. if(this.isTeacherTextCancelSource){
  20073. this.isTeacherTextCancelSource.close()
  20074. this.isTeacherTextCancelSource = null
  20075. }
  20076. }
  20077. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  20078. this.$message.success("已经成功停止生成教案")
  20079. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  20080. this.isTeacherTaskCancelToken = null;
  20081. this.loading = false
  20082. }
  20083. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  20084. this.$message.success("已经成功停止生成大纲")
  20085. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  20086. this.isOutlineTaskCancelToken[index] = null;
  20087. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  20088. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  20089. if(this.isOutlineTaskCancelSource[index]){
  20090. this.isOutlineTaskCancelSource[index].close()
  20091. this.isOutlineTaskCancelSource[index] = null
  20092. }
  20093. }
  20094. if(type == 'teacherDetail2'){
  20095. this.$message.success("已经成功停止生成教案")
  20096. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  20097. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  20098. this.isTeacherTaskCancelToken2[index] = null;
  20099. }
  20100. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  20101. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  20102. }
  20103. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  20104. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  20105. }
  20106. if(this.isTeacherTaskCancelSource[index]){
  20107. this.isTeacherTaskCancelSource[index].close()
  20108. this.isTeacherTaskCancelSource[index] = null
  20109. }
  20110. }
  20111. if(type == 'aiTaskGL1'){
  20112. this.$message.success("已经成功停止生成任务概述")
  20113. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  20114. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  20115. this.taskCancelToken1[index] = null;
  20116. }
  20117. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  20118. this.taskGLoading[index][0] = false
  20119. }
  20120. if(this.isTaskCancelSource1[index]){
  20121. this.isTaskCancelSource1[index].close()
  20122. this.isTaskCancelSource1[index] = null
  20123. }
  20124. setTimeout(() => {
  20125. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  20126. this.cancelAjax('aiTaskGL2', index)
  20127. }
  20128. }, 1000)
  20129. this.$forceUpdate()
  20130. }
  20131. if(type == 'aiTaskGL2'){
  20132. this.$message.success("已经成功停止生成任务工具")
  20133. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  20134. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  20135. this.taskCancelToken2[index] = null;
  20136. }
  20137. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  20138. this.taskGLoading[index][1] = false
  20139. }
  20140. this.$forceUpdate()
  20141. }
  20142. if(type == 'taskAn'){
  20143. this.$message.success("已经成功停止生成任务概述")
  20144. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  20145. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  20146. this.taskAnCancelToken[index] = null;
  20147. }
  20148. if(this.taskAnLoading[index]){
  20149. this.taskAnLoading[index] = false
  20150. }
  20151. this.$forceUpdate()
  20152. }
  20153. if(type == 'findMatchingContents'){
  20154. this.$message.success("已经成功停止检索资料")
  20155. if(this.isfindMatchingContents){
  20156. this.isfindMatchingContents.cancel('Request canceled by the user.');
  20157. this.isfindMatchingContents = null;
  20158. }
  20159. if(this.knowInfoDataLoading){
  20160. this.knowInfoDataLoading = false
  20161. }
  20162. if(this.findMatchingContentsPage > 1){
  20163. this.findMatchingContentsPage --
  20164. }
  20165. this.$forceUpdate()
  20166. }
  20167. },
  20168. async aiGetTask2(messages, callback) {
  20169. let _this = this
  20170. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20171. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20172. if (_this.infoData.length) {
  20173. for (var i = 0; i < _this.infoData.length; i++) {
  20174. if(_this.infoData[i].fileid){
  20175. fileid.push(_this.infoData[i].fileid)
  20176. }else {
  20177. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20178. if(_fileid){
  20179. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20180. _this.$forceUpdate();
  20181. if(_fileid != 1){
  20182. fileid.push(_fileid)
  20183. }
  20184. }
  20185. }
  20186. }
  20187. }
  20188. console.log('fileid=========',fileid)
  20189. // let params = JSON.stringify({
  20190. // // "model": "Chat",
  20191. // model: 'gpt-3.5-turbo',
  20192. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20193. // max_tokens: 4096,
  20194. // top_p: 1,
  20195. // frequency_penalty: 0,
  20196. // presence_penalty: 0,
  20197. // messages: [{
  20198. // content: messages,
  20199. // role: 'user'
  20200. // }],
  20201. // stream: false,
  20202. // uid: this.userid,
  20203. // mind_map_question: "",
  20204. // })
  20205. // // let params = JSON.stringify({
  20206. // // message: {
  20207. // // anthropic_version: "bedrock-2023-05-31",
  20208. // // max_tokens: 4096,
  20209. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20210. // // top_p: 1,
  20211. // // messages: [{
  20212. // // content: messages,
  20213. // // role: 'user'
  20214. // // }], //
  20215. // // },
  20216. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20217. // // });
  20218. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20219. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20220. // console.log(response);
  20221. // let data = response.data.FunctionResponse
  20222. // if (data.choices && data.choices.length && data.choices[0].message) {
  20223. // console.log(data.choices[0].message.content);
  20224. // let dArray = JSON.parse(data.choices[0].message.content)
  20225. // _this.dArray = dArray
  20226. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20227. // for (var i = 0; i < dArray.length; i++) {
  20228. // let _task = dArray[i]
  20229. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20230. // task: _task.task,
  20231. // taskDetail: "",
  20232. // taskDetail2: _task.detail,
  20233. // taskDetail3: "",
  20234. // chapterData: [],
  20235. // toolText: "",
  20236. // toolChoose: [
  20237. // {
  20238. // tool: [],
  20239. // toolDetail: "",
  20240. // toolType: 0,
  20241. // askCount: 1,
  20242. // askTitle: "",
  20243. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20244. // },
  20245. // ],
  20246. // isShowTools: false,
  20247. // askCount: 1,
  20248. // isFold: 0,
  20249. // askTitle: "",
  20250. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20251. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20252. // homeworkList: [],
  20253. // })
  20254. // }
  20255. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20256. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20257. // _this.$forceUpdate();
  20258. // }
  20259. // // if (data.result) {
  20260. // // console.log(data.result);
  20261. // // let dArray = JSON.parse(data.result)
  20262. // // _this.dArray = dArray
  20263. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20264. // // for (var i = 0; i < dArray.length; i++) {
  20265. // // let _task = dArray[i]
  20266. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20267. // // task: _task.task,
  20268. // // taskDetail: "",
  20269. // // taskDetail2: _task.detail,
  20270. // // taskDetail3: "",
  20271. // // chapterData: [],
  20272. // // toolText: "",
  20273. // // toolChoose: [
  20274. // // {
  20275. // // tool: [],
  20276. // // toolDetail: "",
  20277. // // toolType: 0,
  20278. // // askCount: 1,
  20279. // // askTitle: "",
  20280. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20281. // // },
  20282. // // ],
  20283. // // isShowTools: false,
  20284. // // askCount: 1,
  20285. // // isFold: 1,
  20286. // // askTitle: "",
  20287. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20288. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20289. // // homeworkList: [],
  20290. // // })
  20291. // // }
  20292. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20293. // // _this.$forceUpdate();
  20294. // // }
  20295. // callback ? callback() : ''
  20296. // }).catch(function (error) {
  20297. // _this.loading = false
  20298. // console.log(error);
  20299. // });
  20300. this.isOutlineCancelToken = this.ajax.setCancelSource();
  20301. let parm = {
  20302. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20303. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20304. session_name: uuidv4(),
  20305. userId: this.userid,
  20306. file_ids: fileid.length ? [...fileid] : '',
  20307. model: 'gpt-4o-2024-11-20',
  20308. temperature: this.mode == 3 ? 0.5 : 0.1,
  20309. }
  20310. this.ajax
  20311. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  20312. .then((response) => {
  20313. console.log(response);
  20314. let data = response.data.FunctionResponse
  20315. if (data.message) {
  20316. console.log(data.message);
  20317. let dArray = {}
  20318. try {
  20319. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20320. } catch (error) {
  20321. console.log("error_________________" + error);
  20322. try {
  20323. let regex = new RegExp(/```json([\s\S]*?)```/);
  20324. let match = data.message.match(regex);
  20325. dArray = JSON.parse(match[1]);
  20326. // var message = data.message;
  20327. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20328. // var jsonEnd = message.indexOf("```", jsonStart);
  20329. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20330. // dArray = JSON.parse(jsonString);
  20331. } catch (error) {
  20332. try {
  20333. let regex = new RegExp(/```json([\s\S]*?)```/);
  20334. let match = data.message.match(regex);
  20335. // eval("var aaa = " + match[0])
  20336. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20337. } catch (error) {
  20338. console.log("error_________________" + error);
  20339. }
  20340. console.log("error_________________" + error);
  20341. }
  20342. }
  20343. _this.dArray = dArray
  20344. if(_this.panOutline() > 0){
  20345. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20346. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20347. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  20348. }
  20349. for (var i = 0; i < dArray.length; i++) {
  20350. let _task = dArray[i]
  20351. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20352. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  20353. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20354. }else {
  20355. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20356. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20357. taskDetail: "",
  20358. taskDetail2: "",
  20359. taskDetail3: "",
  20360. chapterData: [],
  20361. toolText: "",
  20362. toolChoose: [
  20363. {
  20364. tool: [],
  20365. toolDetail: "",
  20366. toolType: 0,
  20367. askCount: 1,
  20368. askTitle: "",
  20369. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20370. },
  20371. ],
  20372. isShowTools: false,
  20373. askCount: 1,
  20374. isFold: 0,
  20375. askTitle: "",
  20376. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20377. checkJson: [{ checkCount: [], checkPerent: [] }],
  20378. homeworkList: [],
  20379. })
  20380. }
  20381. }
  20382. }else {
  20383. _this.unitJson[0].chapterInfo[0].taskJson = []
  20384. for (var i = 0; i < dArray.length; i++) {
  20385. let _task = dArray[i]
  20386. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20387. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20388. taskDetail: "",
  20389. taskDetail2: "",
  20390. taskDetail3: "",
  20391. chapterData: [],
  20392. toolText: "",
  20393. toolChoose: [
  20394. {
  20395. tool: [],
  20396. toolDetail: "",
  20397. toolType: 0,
  20398. askCount: 1,
  20399. askTitle: "",
  20400. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20401. },
  20402. ],
  20403. isShowTools: false,
  20404. askCount: 1,
  20405. isFold: 0,
  20406. askTitle: "",
  20407. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20408. checkJson: [{ checkCount: [], checkPerent: [] }],
  20409. homeworkList: [],
  20410. })
  20411. }
  20412. }
  20413. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20414. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20415. _this.$forceUpdate();
  20416. _this.saveCourse()
  20417. setTimeout(()=>{
  20418. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20419. this.aiOutlineDetail('', i)
  20420. }
  20421. }, 0)
  20422. }
  20423. callback ? callback() : ''
  20424. _this.isOutlineCancelToken = null
  20425. })
  20426. .catch((error) => {
  20427. _this.loading = false
  20428. _this.isOutlineCancelToken = null
  20429. console.log(error);
  20430. });
  20431. },
  20432. async aiGetTask3(messages, callback) {
  20433. let _this = this
  20434. // let params = JSON.stringify({
  20435. // // "model": "Chat",
  20436. // model: 'gpt-3.5-turbo',
  20437. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20438. // max_tokens: 4096,
  20439. // top_p: 1,
  20440. // frequency_penalty: 0,
  20441. // presence_penalty: 0,
  20442. // messages: [{
  20443. // content: messages,
  20444. // role: 'user'
  20445. // }],
  20446. // stream: false,
  20447. // uid: this.userid,
  20448. // mind_map_question: "",
  20449. // })
  20450. // // let params = JSON.stringify({
  20451. // // message: {
  20452. // // anthropic_version: "bedrock-2023-05-31",
  20453. // // max_tokens: 4096,
  20454. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20455. // // top_p: 1,
  20456. // // messages: [{
  20457. // // content: messages,
  20458. // // role: 'user'
  20459. // // }], //
  20460. // // },
  20461. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20462. // // });
  20463. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20464. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20465. // console.log(response);
  20466. // let data = response.data.FunctionResponse
  20467. // if (data.choices && data.choices.length && data.choices[0].message) {
  20468. // console.log(data.choices[0].message.content);
  20469. // let dArray = JSON.parse(data.choices[0].message.content)
  20470. // _this.dArray = dArray
  20471. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20472. // for (var i = 0; i < dArray.length; i++) {
  20473. // let _task = dArray[i]
  20474. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20475. // task: _task.task,
  20476. // taskDetail: "",
  20477. // taskDetail2: _task.detail,
  20478. // taskDetail3: "",
  20479. // chapterData: [],
  20480. // toolText: "",
  20481. // toolChoose: [
  20482. // {
  20483. // tool: [],
  20484. // toolDetail: "",
  20485. // toolType: 0,
  20486. // askCount: 1,
  20487. // askTitle: "",
  20488. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20489. // },
  20490. // ],
  20491. // isShowTools: false,
  20492. // askCount: 1,
  20493. // isFold: 0,
  20494. // askTitle: "",
  20495. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20496. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20497. // homeworkList: [],
  20498. // })
  20499. // }
  20500. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20501. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20502. // _this.$forceUpdate();
  20503. // }
  20504. // // if (data.result) {
  20505. // // console.log(data.result);
  20506. // // let dArray = JSON.parse(data.result)
  20507. // // _this.dArray = dArray
  20508. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20509. // // for (var i = 0; i < dArray.length; i++) {
  20510. // // let _task = dArray[i]
  20511. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20512. // // task: _task.task,
  20513. // // taskDetail: "",
  20514. // // taskDetail2: _task.detail,
  20515. // // taskDetail3: "",
  20516. // // chapterData: [],
  20517. // // toolText: "",
  20518. // // toolChoose: [
  20519. // // {
  20520. // // tool: [],
  20521. // // toolDetail: "",
  20522. // // toolType: 0,
  20523. // // askCount: 1,
  20524. // // askTitle: "",
  20525. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20526. // // },
  20527. // // ],
  20528. // // isShowTools: false,
  20529. // // askCount: 1,
  20530. // // isFold: 1,
  20531. // // askTitle: "",
  20532. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20533. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20534. // // homeworkList: [],
  20535. // // })
  20536. // // }
  20537. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20538. // // _this.$forceUpdate();
  20539. // // }
  20540. // callback ? callback() : ''
  20541. // }).catch(function (error) {
  20542. // _this.loading = false
  20543. // console.log(error);
  20544. // });
  20545. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  20546. let parm = {
  20547. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20548. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20549. session_name: uuidv4(),
  20550. userId: this.userid,
  20551. file_ids: '',
  20552. model: 'gpt-4o-2024-11-20',
  20553. temperature: this.mode == 3 ? 0.5 : 0.1,
  20554. }
  20555. this.ajax
  20556. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  20557. .then((response) => {
  20558. console.log(response);
  20559. let data = response.data.FunctionResponse
  20560. if (data.message) {
  20561. console.log(data.message);
  20562. let dArray = {}
  20563. try {
  20564. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20565. } catch (error) {
  20566. console.log("error_________________" + error);
  20567. try {
  20568. let regex = new RegExp(/```json([\s\S]*?)```/);
  20569. let match = data.message.match(regex);
  20570. dArray = JSON.parse(match[1]);
  20571. // var message = data.message;
  20572. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20573. // var jsonEnd = message.indexOf("```", jsonStart);
  20574. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20575. // dArray = JSON.parse(jsonString);
  20576. } catch (error) {
  20577. try {
  20578. let regex = new RegExp(/```json([\s\S]*?)```/);
  20579. let match = data.message.match(regex);
  20580. // eval("var aaa = " + match[0])
  20581. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20582. } catch (error) {
  20583. console.log("error_________________" + error);
  20584. }
  20585. console.log("error_________________" + error);
  20586. }
  20587. }
  20588. _this.dArray = dArray
  20589. if(_this.panOutline() > 0){
  20590. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20591. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20592. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  20593. }
  20594. for (var i = 0; i < dArray.length; i++) {
  20595. let _task = dArray[i]
  20596. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20597. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  20598. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20599. }else {
  20600. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20601. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20602. taskDetail: "",
  20603. taskDetail2: "",
  20604. taskDetail3: "",
  20605. chapterData: [],
  20606. toolText: "",
  20607. toolChoose: [
  20608. {
  20609. tool: [],
  20610. toolDetail: "",
  20611. toolType: 0,
  20612. askCount: 1,
  20613. askTitle: "",
  20614. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20615. },
  20616. ],
  20617. isShowTools: false,
  20618. askCount: 1,
  20619. isFold: 0,
  20620. askTitle: "",
  20621. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20622. checkJson: [{ checkCount: [], checkPerent: [] }],
  20623. homeworkList: [],
  20624. })
  20625. }
  20626. }
  20627. }else {
  20628. _this.unitJson[0].chapterInfo[0].taskJson = []
  20629. for (var i = 0; i < dArray.length; i++) {
  20630. let _task = dArray[i]
  20631. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20632. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20633. taskDetail: "",
  20634. taskDetail2: "",
  20635. taskDetail3: "",
  20636. chapterData: [],
  20637. toolText: "",
  20638. toolChoose: [
  20639. {
  20640. tool: [],
  20641. toolDetail: "",
  20642. toolType: 0,
  20643. askCount: 1,
  20644. askTitle: "",
  20645. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20646. },
  20647. ],
  20648. isShowTools: false,
  20649. askCount: 1,
  20650. isFold: 0,
  20651. askTitle: "",
  20652. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20653. checkJson: [{ checkCount: [], checkPerent: [] }],
  20654. homeworkList: [],
  20655. })
  20656. }
  20657. }
  20658. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20659. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20660. _this.$forceUpdate();
  20661. _this.saveCourse()
  20662. // setTimeout(()=>{
  20663. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20664. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  20665. // }
  20666. // }, 0)
  20667. setTimeout(()=>{
  20668. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20669. const _tindex = 'task-' + i;
  20670. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20671. _this.taskDetailLoading5.push(_tindex)
  20672. }
  20673. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  20674. _this.ttaskDetailLoading5.push(_tindex)
  20675. }
  20676. }
  20677. let ij = 0;
  20678. function processNext() {
  20679. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  20680. const _tindex = 'task-' + ij;
  20681. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20682. ij++;
  20683. processNext();
  20684. return;
  20685. }
  20686. // 处理当前任务
  20687. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  20688. // 回调函数,当前任务完成后执行
  20689. ij++;
  20690. processNext(); // 处理下一个任务
  20691. });
  20692. }
  20693. }
  20694. processNext(); // 启动处理
  20695. }, 0)
  20696. }
  20697. callback ? callback() : ''
  20698. _this.isTeacherTaskCancelToken = null
  20699. })
  20700. .catch((error) => {
  20701. _this.loading = false
  20702. _this.isTeacherTaskCancelToken = null
  20703. console.log(error);
  20704. });
  20705. },
  20706. async aiGet3(messages, callback) {
  20707. let _this = this
  20708. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20709. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20710. if (_this.infoData.length) {
  20711. for (var i = 0; i < _this.infoData.length; i++) {
  20712. if(_this.infoData[i].fileid){
  20713. fileid.push(_this.infoData[i].fileid)
  20714. }else {
  20715. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20716. if(_fileid){
  20717. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20718. _this.$forceUpdate();
  20719. if(_fileid != 1){
  20720. fileid.push(_fileid)
  20721. }
  20722. }
  20723. }
  20724. }
  20725. }
  20726. // let params = JSON.stringify({
  20727. // // "model": "Chat",
  20728. // model: 'gpt-3.5-turbo',
  20729. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20730. // max_tokens: 4096,
  20731. // top_p: 1,
  20732. // frequency_penalty: 0,
  20733. // presence_penalty: 0,
  20734. // messages: [{
  20735. // content: messages,
  20736. // role: 'user'
  20737. // }],
  20738. // stream: false,
  20739. // uid: this.userid,
  20740. // mind_map_question: "",
  20741. // })
  20742. // // let params = JSON.stringify({
  20743. // // message: {
  20744. // // anthropic_version: "bedrock-2023-05-31",
  20745. // // max_tokens: 4096,
  20746. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20747. // // top_p: 1,
  20748. // // messages: [{
  20749. // // content: messages,
  20750. // // role: 'user'
  20751. // // }], //
  20752. // // },
  20753. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20754. // // });
  20755. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20756. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20757. // console.log(response);
  20758. // let data = response.data.FunctionResponse
  20759. // if (data.choices && data.choices.length && data.choices[0].message) {
  20760. // console.log(data.choices[0].message.content);
  20761. // let tArray = JSON.parse(data.choices[0].message.content)
  20762. // // _this.unitJson[0].chapterInfo[0].task = []
  20763. // let toolsJson = {
  20764. // "电子白板": { tool: 1, type: 1 },
  20765. // "文档": { tool: 52, type: 1 },
  20766. // "思维导图": { tool: 3, type: 1 },
  20767. // "表格": { tool: 48, type: 1 },
  20768. // "作业提交": { tool: 16, type: 2 }
  20769. // }
  20770. // for (var i = 0; i < tArray.length; i++) {
  20771. // let _task = tArray[i]
  20772. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20773. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20774. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20775. // if (_task.toolChoose.length) {
  20776. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20777. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20778. // {
  20779. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20780. // toolDetail: _task.toolChoose[j].detail,
  20781. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20782. // askCount: 1,
  20783. // askTitle: "",
  20784. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20785. // },
  20786. // )
  20787. // }
  20788. // } else {
  20789. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20790. // {
  20791. // tool: [],
  20792. // toolDetail: "",
  20793. // toolType: 0,
  20794. // askCount: 1,
  20795. // askTitle: "",
  20796. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20797. // },
  20798. // )
  20799. // }
  20800. // }
  20801. // // if (_this.infoData.length) {
  20802. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20803. // // }
  20804. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20805. // _this.$forceUpdate();
  20806. // }
  20807. // // if (data.result) {
  20808. // // console.log(data.result);
  20809. // // let tArray = JSON.parse(data.result)
  20810. // // // _this.unitJson[0].chapterInfo[0].task = []
  20811. // // let toolsJson = {
  20812. // // "电子白板": { tool: 1, type: 1 },
  20813. // // "文档": { tool: 52, type: 1 },
  20814. // // "思维导图": { tool: 3, type: 1 },
  20815. // // "表格": { tool: 48, type: 1 },
  20816. // // "作业提交": { tool: 16, type: 2 }
  20817. // // }
  20818. // // for (var i = 0; i < tArray.length; i++) {
  20819. // // let _task = tArray[i]
  20820. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20821. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20822. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20823. // // if (_task.toolChoose.length) {
  20824. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20825. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20826. // // {
  20827. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20828. // // toolDetail: _task.toolChoose[j].detail,
  20829. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20830. // // askCount: 1,
  20831. // // askTitle: "",
  20832. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20833. // // },
  20834. // // )
  20835. // // }
  20836. // // } else {
  20837. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20838. // // {
  20839. // // tool: [],
  20840. // // toolDetail: "",
  20841. // // toolType: 0,
  20842. // // askCount: 1,
  20843. // // askTitle: "",
  20844. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20845. // // },
  20846. // // )
  20847. // // }
  20848. // // }
  20849. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20850. // // _this.$forceUpdate();
  20851. // // }
  20852. // callback ? callback() : ''
  20853. // }).catch(function (error) {
  20854. // _this.loading = false
  20855. // console.log(error);
  20856. // });
  20857. let parm = {
  20858. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20859. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20860. session_name: uuidv4(),
  20861. userId: this.userid,
  20862. file_ids: fileid.length ? [...fileid] : '',
  20863. model: 'gpt-4o-2024-11-20',
  20864. temperature: this.mode == 3 ? 0.5 : 0.1,
  20865. }
  20866. this.ajax
  20867. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20868. .then(async (response) => {
  20869. console.log(response);
  20870. let data = response.data.FunctionResponse
  20871. if (data.message) {
  20872. console.log(data.message);
  20873. let tArray = {}
  20874. try {
  20875. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20876. } catch (error) {
  20877. console.log("error_________________" + error);
  20878. try {
  20879. let regex = new RegExp(/```json([\s\S]*?)```/);
  20880. let match = data.message.match(regex);
  20881. tArray = JSON.parse(match[1]);
  20882. // var message = data.message;
  20883. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20884. // var jsonEnd = message.indexOf("```", jsonStart);
  20885. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20886. // tArray = JSON.parse(jsonString);
  20887. } catch (error) {
  20888. try {
  20889. let regex = new RegExp(/```json([\s\S]*?)```/);
  20890. let match = data.message.match(regex);
  20891. // eval("var aaa = " + match[0])
  20892. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20893. } catch (error) {
  20894. console.log("error_________________" + error);
  20895. }
  20896. console.log("error_________________" + error);
  20897. }
  20898. }
  20899. let toolsJson = {
  20900. "电子白板": { tool: 1, type: 1 },
  20901. "文档": { tool: 52, type: 1 },
  20902. "思维导图": { tool: 3, type: 1 },
  20903. "表格": { tool: 48, type: 1 },
  20904. "作业提交": { tool: 16, type: 2 },
  20905. "问答": { tool: 15, type: 2 },
  20906. "选择题": { tool: 45, type: 2 },
  20907. }
  20908. // answerQ:"sssssssssssssss"
  20909. for (var i = 0; i < tArray.length; i++) {
  20910. let _task = tArray[i]
  20911. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20912. _task.elist = _task.elist.filter(el=>{
  20913. el.isai = "1"
  20914. return el
  20915. })
  20916. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20917. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20918. if (_task.toolChoose.length) {
  20919. for (var j = 0; j < _task.toolChoose.length; j++) {
  20920. let _json = {
  20921. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  20922. toolDetail: _task.toolChoose[j].detail,
  20923. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20924. askCount: 1,
  20925. askTitle: "",
  20926. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20927. }
  20928. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  20929. let answerQ = await _this.aiCreateQuestion(15, i)
  20930. _json.answerQ = answerQ.answerQ
  20931. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  20932. let testJson = await _this.aiCreateQuestion(45, i)
  20933. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20934. }
  20935. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  20936. }
  20937. } else {
  20938. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20939. {
  20940. tool: [],
  20941. toolDetail: "",
  20942. toolType: 0,
  20943. askCount: 1,
  20944. askTitle: "",
  20945. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20946. },
  20947. )
  20948. }
  20949. }
  20950. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20951. _this.$forceUpdate();
  20952. _this.createTeacherAn();
  20953. }
  20954. callback ? callback() : ''
  20955. })
  20956. .catch((error) => {
  20957. _this.loading = false
  20958. console.log(error);
  20959. });
  20960. },
  20961. async aiGet32(messages, index) {
  20962. let _this = this
  20963. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20964. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20965. if (_this.infoData.length) {
  20966. for (var i = 0; i < _this.infoData.length; i++) {
  20967. if(_this.infoData[i].fileid){
  20968. fileid.push(_this.infoData[i].fileid)
  20969. }else {
  20970. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20971. if(_fileid){
  20972. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20973. _this.$forceUpdate();
  20974. if(_fileid != 1){
  20975. fileid.push(_fileid)
  20976. }
  20977. }
  20978. }
  20979. }
  20980. }
  20981. // let params = JSON.stringify({
  20982. // // "model": "Chat",
  20983. // model: 'gpt-3.5-turbo',
  20984. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20985. // max_tokens: 4096,
  20986. // top_p: 1,
  20987. // frequency_penalty: 0,
  20988. // presence_penalty: 0,
  20989. // messages: [{
  20990. // content: messages,
  20991. // role: 'user'
  20992. // }],
  20993. // stream: false,
  20994. // uid: this.userid,
  20995. // mind_map_question: "",
  20996. // })
  20997. // // let params = JSON.stringify({
  20998. // // message: {
  20999. // // anthropic_version: "bedrock-2023-05-31",
  21000. // // max_tokens: 4096,
  21001. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  21002. // // top_p: 1,
  21003. // // messages: [{
  21004. // // content: messages,
  21005. // // role: 'user'
  21006. // // }], //
  21007. // // },
  21008. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21009. // // });
  21010. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21011. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21012. // console.log(response);
  21013. // let data = response.data.FunctionResponse
  21014. // if (data.choices && data.choices.length && data.choices[0].message) {
  21015. // console.log(data.choices[0].message.content);
  21016. // let tArray = JSON.parse(data.choices[0].message.content)
  21017. // // _this.unitJson[0].chapterInfo[0].task = []
  21018. // let toolsJson = {
  21019. // "电子白板": { tool: 1, type: 1 },
  21020. // "文档": { tool: 52, type: 1 },
  21021. // "思维导图": { tool: 3, type: 1 },
  21022. // "表格": { tool: 48, type: 1 },
  21023. // "作业提交": { tool: 16, type: 2 }
  21024. // }
  21025. // for (var i = 0; i < tArray.length; i++) {
  21026. // let _task = tArray[i]
  21027. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  21028. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  21029. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  21030. // if (_task.toolChoose.length) {
  21031. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21032. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21033. // {
  21034. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  21035. // toolDetail: _task.toolChoose[j].detail,
  21036. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  21037. // askCount: 1,
  21038. // askTitle: "",
  21039. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21040. // },
  21041. // )
  21042. // }
  21043. // } else {
  21044. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21045. // {
  21046. // tool: [],
  21047. // toolDetail: "",
  21048. // toolType: 0,
  21049. // askCount: 1,
  21050. // askTitle: "",
  21051. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21052. // },
  21053. // )
  21054. // }
  21055. // }
  21056. // // if (_this.infoData.length) {
  21057. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  21058. // // }
  21059. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21060. // _this.$forceUpdate();
  21061. // }
  21062. // // if (data.result) {
  21063. // // console.log(data.result);
  21064. // // let tArray = JSON.parse(data.result)
  21065. // // // _this.unitJson[0].chapterInfo[0].task = []
  21066. // // let toolsJson = {
  21067. // // "电子白板": { tool: 1, type: 1 },
  21068. // // "文档": { tool: 52, type: 1 },
  21069. // // "思维导图": { tool: 3, type: 1 },
  21070. // // "表格": { tool: 48, type: 1 },
  21071. // // "作业提交": { tool: 16, type: 2 }
  21072. // // }
  21073. // // for (var i = 0; i < tArray.length; i++) {
  21074. // // let _task = tArray[i]
  21075. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  21076. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  21077. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  21078. // // if (_task.toolChoose.length) {
  21079. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  21080. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21081. // // {
  21082. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  21083. // // toolDetail: _task.toolChoose[j].detail,
  21084. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  21085. // // askCount: 1,
  21086. // // askTitle: "",
  21087. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21088. // // },
  21089. // // )
  21090. // // }
  21091. // // } else {
  21092. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21093. // // {
  21094. // // tool: [],
  21095. // // toolDetail: "",
  21096. // // toolType: 0,
  21097. // // askCount: 1,
  21098. // // askTitle: "",
  21099. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21100. // // },
  21101. // // )
  21102. // // }
  21103. // // }
  21104. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21105. // // _this.$forceUpdate();
  21106. // // }
  21107. // callback ? callback() : ''
  21108. // }).catch(function (error) {
  21109. // _this.loading = false
  21110. // console.log(error);
  21111. // });
  21112. let parm = {
  21113. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21114. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21115. session_name: uuidv4(),
  21116. userId: this.userid,
  21117. file_ids: fileid.length ? [...fileid] : '',
  21118. model: 'gpt-4o-2024-11-20',
  21119. temperature: this.mode == 3 ? 0.5 : 0.1,
  21120. }
  21121. this.ajax
  21122. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21123. .then(async (response) => {
  21124. console.log(response);
  21125. let data = response.data.FunctionResponse
  21126. if (data.message) {
  21127. console.log(data.message);
  21128. let tArray = {}
  21129. try {
  21130. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21131. } catch (error) {
  21132. console.log("error_________________" + error);
  21133. try {
  21134. let regex = new RegExp(/```json([\s\S]*?)```/);
  21135. let match = data.message.match(regex);
  21136. tArray = JSON.parse(match[1]);
  21137. // var message = data.message;
  21138. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21139. // var jsonEnd = message.indexOf("```", jsonStart);
  21140. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21141. // tArray = JSON.parse(jsonString);
  21142. } catch (error) {
  21143. try {
  21144. let regex = new RegExp(/```json([\s\S]*?)```/);
  21145. let match = data.message.match(regex);
  21146. // eval("var aaa = " + match[0])
  21147. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21148. } catch (error) {
  21149. console.log("error_________________" + error);
  21150. }
  21151. console.log("error_________________" + error);
  21152. }
  21153. }
  21154. let toolsJson = {
  21155. "电子白板": { tool: 1, type: 1 },
  21156. "文档": { tool: 52, type: 1 },
  21157. "思维导图": { tool: 3, type: 1 },
  21158. "表格": { tool: 48, type: 1 },
  21159. "作业提交": { tool: 16, type: 2 },
  21160. "问答": { tool: 15, type: 2 },
  21161. "选择题": { tool: 45, type: 2 },
  21162. }
  21163. // answerQ:"sssssssssssssss"
  21164. // for (var i = 0; i < tArray.length; i++) {
  21165. let _task = tArray
  21166. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  21167. _task.elist = _task.elist.filter(el=>{
  21168. el.isai = 1
  21169. return el
  21170. })
  21171. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21172. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21173. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  21174. console.log("error_________________JSON不对重新生成");
  21175. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21176. _this.aiGet32(messages, index)
  21177. return;
  21178. }
  21179. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21180. if (_task.toolChoose && _task.toolChoose.length) {
  21181. for (var j = 0; j < _task.toolChoose.length; j++) {
  21182. let _json = {
  21183. tool: [],
  21184. toolDetail: _task.toolChoose[j].detail,
  21185. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21186. askCount: 1,
  21187. askTitle: "",
  21188. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21189. }
  21190. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21191. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  21192. let answerQ = await _this.aiCreateQuestion(15, index)
  21193. // _json.answerQ = answerQ.answerQ
  21194. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21195. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  21196. let testJson = await _this.aiCreateQuestion(45, index)
  21197. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21198. _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}
  21199. }
  21200. _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]
  21201. _this.$forceUpdate();
  21202. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21203. }
  21204. } else {
  21205. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21206. {
  21207. tool: [],
  21208. toolDetail: "",
  21209. toolType: 0,
  21210. askCount: 1,
  21211. askTitle: "",
  21212. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21213. },
  21214. )
  21215. }
  21216. // }
  21217. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21218. _this.$forceUpdate();
  21219. _this.createTeacherAn(index);
  21220. }
  21221. // callback ? callback() : ''
  21222. _this.taskLoading[index] = false
  21223. })
  21224. .catch((error) => {
  21225. // _this.loading = false
  21226. _this.taskLoading[index] = false
  21227. console.log(error);
  21228. });
  21229. },
  21230. async aiGetG321(messages, index, callback, callback2) {
  21231. let _this = this
  21232. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21233. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21234. if (_this.infoData.length) {
  21235. for (var i = 0; i < _this.infoData.length; i++) {
  21236. if(_this.infoData[i].fileid){
  21237. fileid.push(_this.infoData[i].fileid)
  21238. }else {
  21239. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21240. if(_fileid){
  21241. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21242. _this.$forceUpdate();
  21243. if(_fileid != 1){
  21244. fileid.push(_fileid)
  21245. }
  21246. }
  21247. }
  21248. }
  21249. }
  21250. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21251. let parm = {
  21252. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21253. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21254. session_name: uuidv4(),
  21255. userId: this.userid,
  21256. file_ids: fileid.length ? [...fileid] : '',
  21257. model: 'gpt-4o-2024-11-20',
  21258. temperature: this.mode == 3 ? 0.5 : 0.1,
  21259. }
  21260. this.ajax
  21261. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  21262. .then(async (response) => {
  21263. console.log(response);
  21264. let data = response.data.FunctionResponse
  21265. if (data.message) {
  21266. let tArray = {}
  21267. try {
  21268. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21269. } catch (error) {
  21270. console.log("error_________________" + error);
  21271. try {
  21272. let regex = new RegExp(/```json([\s\S]*?)```/);
  21273. let match = data.message.match(regex);
  21274. tArray = JSON.parse(match[1]);
  21275. } catch (error) {
  21276. try {
  21277. let regex = new RegExp(/```json([\s\S]*?)```/);
  21278. let match = data.message.match(regex);
  21279. // eval("var aaa = " + match[0])
  21280. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21281. } catch (error) {
  21282. console.log("error_________________" + error);
  21283. }
  21284. console.log("error_________________" + error);
  21285. }
  21286. }
  21287. console.log(data.message);
  21288. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  21289. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21290. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21291. _this.$forceUpdate();
  21292. _this.createTeacherAn(index);
  21293. }
  21294. callback ? callback(callback2) : ''
  21295. _this.taskGLoading[index][0] = false
  21296. _this.taskCancelToken1[index] = null
  21297. _this.$forceUpdate();
  21298. })
  21299. .catch((error) => {
  21300. // _this.loading = false
  21301. callback ? callback(callback2) : ''
  21302. _this.taskGLoading[index][0] = false
  21303. _this.taskCancelToken1[index] = null
  21304. _this.$forceUpdate();
  21305. console.log(error);
  21306. });
  21307. },
  21308. async aiGetG321L(messages, index, callback, callback2) {
  21309. let _this = this
  21310. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21311. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21312. if (_this.infoData.length) {
  21313. for (var i = 0; i < _this.infoData.length; i++) {
  21314. if(_this.infoData[i].fileid){
  21315. fileid.push(_this.infoData[i].fileid)
  21316. }else {
  21317. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21318. if(_fileid){
  21319. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21320. _this.$forceUpdate();
  21321. if(_fileid != 1){
  21322. fileid.push(_fileid)
  21323. }
  21324. }
  21325. }
  21326. }
  21327. }
  21328. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21329. let _uuid = uuidv4();
  21330. let parm = {
  21331. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21332. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21333. session_name: uuidv4(),
  21334. userId: this.userid,
  21335. file_ids: fileid.length ? [...fileid] : '',
  21336. uid: _uuid,
  21337. // model: 'gpt-4o-2024-11-20',
  21338. model: 'gpt-4o-mini',
  21339. temperature: this.mode == 3 ? 0.5 : 0.1,
  21340. }
  21341. this.ajax
  21342. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", parm, _this.taskCancelToken1[index])
  21343. .then(async (response) => {
  21344. console.log(response);
  21345. // }
  21346. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21347. } else {
  21348. _this.$message.warning(response.data.FunctionResponse.result);
  21349. callback ? callback(callback2) : ''
  21350. _this.taskGLoading[index][0] = false
  21351. _this.ttaskGLoading[index][0] = false
  21352. _this.taskCancelToken1[index] = null
  21353. }
  21354. _this.taskCancelToken1[index] = null
  21355. _this.$forceUpdate();
  21356. })
  21357. .catch((error) => {
  21358. // _this.loading = false
  21359. callback ? callback(callback2) : ''
  21360. _this.taskGLoading[index][0] = false
  21361. _this.ttaskGLoading[index][0] = false
  21362. _this.taskCancelToken1[index] = null
  21363. _this.$forceUpdate();
  21364. console.log(error);
  21365. });
  21366. await _this.aiGetG321LgetAiContent(_uuid, index, callback, callback2)
  21367. },
  21368. aiGetG321LgetAiContent(_uid, index, callback, callback2) {
  21369. try {
  21370. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21371. this.isTaskCancelSource1[index] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21372. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21373. } catch(error){
  21374. console.log('EventSource error:', error);
  21375. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21376. callback ? callback(callback2) : ''
  21377. this.taskGLoading[index][0] = false
  21378. this.ttaskGLoading[index][0] = false
  21379. this.taskCancelToken1[index][0] = null
  21380. return;
  21381. }
  21382. let _allText = "";
  21383. let _mdText = "";
  21384. let _iindex = 0
  21385. this.isTaskCancelSource1[index].onmessage = _e => {
  21386. let _eData = JSON.parse(_e.data).content;
  21387. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21388. //对话已经完成
  21389. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21390. callback ? callback(callback2) : ''
  21391. this.isTaskCancelSource1[index].close();
  21392. this.isTaskCancelSource1[index] = null;
  21393. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21394. this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21395. this.createTeacherAn(index);
  21396. this.taskGLoading[index][0] = false
  21397. this.ttaskGLoading[index][0] = false
  21398. this.taskCancelToken1[index][0] = null
  21399. return;
  21400. } else {
  21401. _iindex++
  21402. //对话还在继续
  21403. let _text = "";
  21404. _text = _eData.replaceAll("'", "");
  21405. if (_allText == "") {
  21406. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21407. } else {
  21408. _allText += _text;
  21409. }
  21410. _mdText = _allText + "_";
  21411. _mdText = _mdText.replace(/\\n/g, "\n");
  21412. _mdText = _mdText.replace(/\\/g, "");
  21413. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21414. //转化返回的回复流数据.
  21415. if(_iindex == 10){
  21416. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21417. _iindex = 0
  21418. }
  21419. this.taskGLoading[index][0] = false
  21420. // 处理流数据
  21421. }
  21422. // this.$forceUpdate();
  21423. };
  21424. let _this = this
  21425. this.isTaskCancelSource1[index].onerror = function(event) {
  21426. // 处理错误,可以尝试重新连接
  21427. console.log('EventSource error:', event);
  21428. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21429. callback ? callback(callback2) : ''
  21430. _this.taskGLoading[index][0] = false
  21431. _this.ttaskGLoading[index][0] = false
  21432. _this.isTaskCancelSource1[index].close();
  21433. _this.isTaskCancelSource1[index] = null;
  21434. _this.taskCancelToken1[index][0] = null
  21435. };
  21436. },
  21437. async aiGetG322(messages, index, callback) {
  21438. let _this = this
  21439. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21440. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21441. if (_this.infoData.length) {
  21442. for (var i = 0; i < _this.infoData.length; i++) {
  21443. if(_this.infoData[i].fileid){
  21444. fileid.push(_this.infoData[i].fileid)
  21445. }else {
  21446. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21447. if(_fileid){
  21448. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21449. _this.$forceUpdate();
  21450. if(_fileid != 1){
  21451. fileid.push(_fileid)
  21452. }
  21453. }
  21454. }
  21455. }
  21456. }
  21457. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  21458. let parm = {
  21459. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21460. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21461. session_name: uuidv4(),
  21462. userId: this.userid,
  21463. file_ids: fileid.length ? [...fileid] : '',
  21464. model: 'gpt-4o-2024-11-20',
  21465. temperature: this.mode == 3 ? 0.5 : 0.1,
  21466. }
  21467. this.ajax
  21468. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  21469. .then(async (response) => {
  21470. console.log(response);
  21471. let data = response.data.FunctionResponse
  21472. if (data.message) {
  21473. console.log(data.message);
  21474. let tArray = {}
  21475. try {
  21476. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21477. } catch (error) {
  21478. console.log("error_________________" + error);
  21479. try {
  21480. let regex = new RegExp(/```json([\s\S]*?)```/);
  21481. let match = data.message.match(regex);
  21482. tArray = JSON.parse(match[1]);
  21483. } catch (error) {
  21484. try {
  21485. let regex = new RegExp(/```json([\s\S]*?)```/);
  21486. let match = data.message.match(regex);
  21487. // eval("var aaa = " + match[0])
  21488. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21489. } catch (error) {
  21490. console.log("error_________________" + error);
  21491. }
  21492. console.log("error_________________" + error);
  21493. }
  21494. }
  21495. let toolsJson = {
  21496. "电子白板": { tool: 1, type: 1 },
  21497. "文档": { tool: 52, type: 1 },
  21498. "思维导图": { tool: 3, type: 1 },
  21499. "表格": { tool: 48, type: 1 },
  21500. "作业提交": { tool: 16, type: 2 },
  21501. "问答": { tool: 15, type: 2 },
  21502. "选择题": { tool: 45, type: 2 },
  21503. }
  21504. if(_this.languageSetting == 1){
  21505. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  21506. }else if(_this.languageSetting == 2){
  21507. toolsJson = {
  21508. "Mind Map Tool": { tool: 1, type: 1 },
  21509. "Document tool": { tool: 52, type: 1 },
  21510. "Diagram Tool": { tool: 3, type: 1 },
  21511. "Spreadsheet tool": { tool: 48, type: 1 },
  21512. "作业提交": { tool: 16, type: 2 },
  21513. "Q&A Tool": { tool: 15, type: 2 },
  21514. "Choice tool": { tool: 45, type: 2 },
  21515. }
  21516. }
  21517. let _task = tArray
  21518. if(!_task.toolChoose){
  21519. console.log("error_________________JSON不对重新生成");
  21520. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21521. _this.aiGetG322(messages, index)
  21522. return;
  21523. }
  21524. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21525. if (_task.toolChoose && _task.toolChoose.length) {
  21526. for (var j = 0; j < _task.toolChoose.length; j++) {
  21527. let _json = {
  21528. tool: [],
  21529. toolDetail: _task.toolChoose[j].detail,
  21530. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21531. askCount: 1,
  21532. askTitle: "",
  21533. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21534. }
  21535. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21536. if(converter(_task.toolChoose[j].tool) == converter('问答') || _task.toolChoose[j].tool == 'Q&A Tool'){
  21537. let answerQ = await _this.aiCreateQuestion(15, index)
  21538. // _json.answerQ = answerQ.answerQ
  21539. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21540. }else if(converter(_task.toolChoose[j].tool) == converter('选择题') || _task.toolChoose[j].tool == 'Choice tool'){
  21541. let testJson = await _this.aiCreateQuestion(45, index)
  21542. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21543. _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}
  21544. }
  21545. _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]
  21546. _this.$forceUpdate();
  21547. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21548. }
  21549. } else {
  21550. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21551. {
  21552. tool: [],
  21553. toolDetail: "",
  21554. toolType: 0,
  21555. askCount: 1,
  21556. askTitle: "",
  21557. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21558. },
  21559. )
  21560. }
  21561. //
  21562. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21563. _this.$forceUpdate();
  21564. // _this.$nextTick(()=>{
  21565. // setTimeout(() => {
  21566. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21567. // if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  21568. // _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  21569. // }
  21570. // }
  21571. // }, 2000);
  21572. // })
  21573. }
  21574. callback ? callback() : ''
  21575. _this.taskGLoading[index][1] = false
  21576. _this.taskCancelToken2[index] = null
  21577. _this.$forceUpdate();
  21578. })
  21579. .catch((error) => {
  21580. // _this.loading = false
  21581. callback ? callback() : ''
  21582. _this.taskGLoading[index][1] = false
  21583. _this.taskCancelToken2[index] = null
  21584. _this.$forceUpdate();
  21585. console.log(error);
  21586. });
  21587. },
  21588. async aiGetG323(messages, index) {
  21589. let _this = this
  21590. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21591. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21592. if (_this.infoData.length) {
  21593. for (var i = 0; i < _this.infoData.length; i++) {
  21594. if(_this.infoData[i].fileid){
  21595. fileid.push(_this.infoData[i].fileid)
  21596. }else {
  21597. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21598. if(_fileid){
  21599. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21600. _this.$forceUpdate();
  21601. if(_fileid != 1){
  21602. fileid.push(_fileid)
  21603. }
  21604. }
  21605. }
  21606. }
  21607. }
  21608. let parm = {
  21609. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21610. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21611. session_name: uuidv4(),
  21612. userId: this.userid,
  21613. file_ids: fileid.length ? [...fileid] : '',
  21614. model: 'gpt-4o-2024-11-20',
  21615. temperature: this.mode == 3 ? 0.5 : 0.1,
  21616. }
  21617. this.ajax
  21618. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21619. .then(async (response) => {
  21620. console.log(response);
  21621. let data = response.data.FunctionResponse
  21622. if (data.message) {
  21623. console.log(data.message);
  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. } catch (error) {
  21634. try {
  21635. let regex = new RegExp(/```json([\s\S]*?)```/);
  21636. let match = data.message.match(regex);
  21637. // eval("var aaa = " + match[0])
  21638. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21639. } catch (error) {
  21640. console.log("error_________________" + error);
  21641. }
  21642. console.log("error_________________" + error);
  21643. }
  21644. }
  21645. let _task = tArray
  21646. if(!_task.elist){
  21647. console.log("error_________________JSON不对重新生成");
  21648. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21649. _this.aiGetG322(messages, index)
  21650. return;
  21651. }
  21652. _task.elist = _task.elist.filter(el=>{
  21653. el.isai = "1"
  21654. return el
  21655. })
  21656. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21657. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21658. _this.$forceUpdate();
  21659. }
  21660. // callback ? callback() : ''
  21661. _this.taskGLoading[index][2] = false
  21662. })
  21663. .catch((error) => {
  21664. // _this.loading = false
  21665. _this.taskGLoading[index][2] = false
  21666. console.log(error);
  21667. });
  21668. },
  21669. async aiCreateQuestion(type, task) {
  21670. let _this = this
  21671. return new Promise((resolve, reject) => {
  21672. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21673. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21674. if (_this.infoData.length) {
  21675. for (var i = 0; i < _this.infoData.length; i++) {
  21676. if(_this.infoData[i].fileid){
  21677. fileid.push(_this.infoData[i].fileid)
  21678. }
  21679. }
  21680. }
  21681. let sub = []
  21682. let mclass = []
  21683. if (this.courseTypeId.length) {
  21684. for (var i = 0; i < this.courseTypeId.length; i++) {
  21685. let _sid = this.courseTypeId[i]
  21686. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21687. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21688. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21689. }
  21690. }
  21691. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21692. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21693. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21694. }
  21695. }
  21696. }
  21697. }
  21698. let messages = ""
  21699. if(type == 15){
  21700. messages = `NOTICE
  21701. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21702. Language: ${this.getLang()}
  21703. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21704. Instruction: Based on the context, follow "Format example", write content.
  21705. # Context
  21706. ## 任务
  21707. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21708. ## 限制
  21709. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21710. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21711. ## 课程简介
  21712. 课程名字:${_this.courseName}
  21713. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21714. ${sub.length ? '学科:' + sub.join(",") : ''}
  21715. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21716. ## 教案
  21717. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21718. # Format example
  21719. {"answerQ":"问题"}
  21720. `
  21721. }else if(type == 45){
  21722. messages = `NOTICE
  21723. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21724. Language: ${this.getLang()}
  21725. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21726. Instruction: Based on the context, follow "Format example", write content.
  21727. # Context
  21728. ## 任务
  21729. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21730. ## 限制
  21731. - 生成题目禁止重复。
  21732. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21733. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21734. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21735. ## 课程简介
  21736. 课程名字:${_this.courseName}
  21737. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21738. ${sub.length ? '学科:' + sub.join(",") : ''}
  21739. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21740. ## 教案
  21741. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21742. # Format example
  21743. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21744. `
  21745. }
  21746. let parm = {
  21747. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21748. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21749. session_name: uuidv4(),
  21750. userId: this.userid,
  21751. file_ids: fileid.length ? [...fileid] : '',
  21752. model: 'gpt-4o-2024-11-20',
  21753. temperature: this.mode == 3 ? 0.5 : 0.1,
  21754. }
  21755. this.ajax
  21756. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21757. .then((response) => {
  21758. console.log(response);
  21759. let data = response.data.FunctionResponse
  21760. if (data.message) {
  21761. console.log(data.message);
  21762. try {
  21763. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21764. let tArray = {}
  21765. try {
  21766. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21767. } catch (error) {
  21768. console.log("error_________________" + error);
  21769. try {
  21770. let regex = new RegExp(/```json([\s\S]*?)```/);
  21771. let match = data.message.match(regex);
  21772. tArray = JSON.parse(match[1]);
  21773. // var message = data.message;
  21774. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21775. // var jsonEnd = message.indexOf("```", jsonStart);
  21776. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21777. // tArray = JSON.parse(jsonString);
  21778. } catch (error) {
  21779. try {
  21780. let regex = new RegExp(/```json([\s\S]*?)```/);
  21781. let match = data.message.match(regex);
  21782. // eval("var aaa = " + match[0])
  21783. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21784. } catch (error) {
  21785. try {
  21786. let regex = new RegExp(/```json([\s\S]*?)```/);
  21787. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21788. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21789. // eval("var aaa = " + match[0])
  21790. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21791. } catch (error) {
  21792. console.log("error_________________" + error);
  21793. }
  21794. console.log("error_________________" + error);
  21795. }
  21796. console.log("error_________________" + error);
  21797. }
  21798. }
  21799. resolve(tArray)
  21800. } catch (error) {
  21801. if(type == 15){
  21802. resolve({answerQ: "题目"})
  21803. }else if(type == 45){
  21804. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21805. }
  21806. }
  21807. }else if(type == 15){
  21808. resolve({answerQ: "题目"})
  21809. }else if(type == 45){
  21810. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21811. }
  21812. })
  21813. .catch((error) => {
  21814. if(type == 15){
  21815. resolve({answerQ: "题目"})
  21816. }else if(type == 45){
  21817. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21818. }
  21819. console.log(error);
  21820. });
  21821. });
  21822. },
  21823. async aiChoice(type){
  21824. if(type == 45){
  21825. this.choiceLoading = true
  21826. }
  21827. let _this = this
  21828. let fileid = []
  21829. if (_this.xuanzeInfoData.length) {
  21830. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  21831. if(_this.xuanzeInfoData[i].fileid){
  21832. fileid.push(_this.xuanzeInfoData[i].fileid)
  21833. }
  21834. }
  21835. }else{
  21836. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21837. if (_this.infoData.length) {
  21838. for (var i = 0; i < _this.infoData.length; i++) {
  21839. if(_this.infoData[i].fileid){
  21840. fileid.push(_this.infoData[i].fileid)
  21841. }
  21842. }
  21843. }
  21844. }
  21845. let sub = []
  21846. let mclass = []
  21847. if (this.courseTypeId.length) {
  21848. for (var i = 0; i < this.courseTypeId.length; i++) {
  21849. let _sid = this.courseTypeId[i]
  21850. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21851. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21852. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21853. }
  21854. }
  21855. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21856. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21857. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21858. }
  21859. }
  21860. }
  21861. }
  21862. let messages = ""
  21863. if(type == 15){
  21864. messages = `NOTICE
  21865. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21866. Language: ${this.getLang()}
  21867. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21868. Instruction: Based on the context, follow "Format example", write content.
  21869. # Context
  21870. ## 任务
  21871. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21872. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21873. ## 限制
  21874. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21875. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21876. ## 课程简介
  21877. 课程名字:${_this.courseName}
  21878. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21879. ${sub.length ? '学科:' + sub.join(",") : ''}
  21880. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21881. ## 教案
  21882. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21883. # Format example
  21884. {"answerQ":"问题"}
  21885. `
  21886. }else if(type == 45){
  21887. messages = `NOTICE
  21888. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21889. Language: ${this.getLang()}
  21890. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21891. Instruction: Based on the context, follow "Format example", write content.
  21892. # Context
  21893. ## 任务
  21894. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21895. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21896. ## 限制
  21897. - 生成题目禁止重复。
  21898. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21899. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21900. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21901. ## 课程简介
  21902. 课程名字:${_this.courseName}
  21903. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21904. ${sub.length ? '学科:' + sub.join(",") : ''}
  21905. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21906. ## 教案
  21907. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21908. # Format example
  21909. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21910. `
  21911. }
  21912. let parm = {
  21913. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21914. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21915. session_name: uuidv4(),
  21916. userId: this.userid,
  21917. file_ids: fileid.length ? [...fileid] : '',
  21918. model: 'gpt-4o-2024-11-20',
  21919. temperature: this.mode == 3 ? 0.5 : 0.1,
  21920. }
  21921. this.ajax
  21922. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21923. .then((response) => {
  21924. console.log(response);
  21925. let data = response.data.FunctionResponse
  21926. if (data.message) {
  21927. console.log(data.message);
  21928. try {
  21929. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21930. let tArray = {}
  21931. try {
  21932. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21933. } catch (error) {
  21934. console.log("error_________________" + error);
  21935. try {
  21936. let regex = new RegExp(/```json([\s\S]*?)```/);
  21937. let match = data.message.match(regex);
  21938. tArray = JSON.parse(match[1]);
  21939. // var message = data.message;
  21940. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21941. // var jsonEnd = message.indexOf("```", jsonStart);
  21942. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21943. // tArray = JSON.parse(jsonString);
  21944. } catch (error) {
  21945. try {
  21946. let regex = new RegExp(/```json([\s\S]*?)```/);
  21947. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21948. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21949. // eval("var aaa = " + match[0])
  21950. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21951. } catch (error) {
  21952. console.log("error_________________" + error);
  21953. }
  21954. console.log("error_________________" + error);
  21955. }
  21956. }
  21957. if(type == 45){
  21958. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  21959. }
  21960. } catch (error) {
  21961. if(type == 15){
  21962. {answerQ: "题目"}
  21963. }else if(type == 45){
  21964. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21965. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21966. }
  21967. _this.choiceLoading = false
  21968. }
  21969. }else if(type == 15){
  21970. {answerQ: "题目"}
  21971. }else if(type == 45){
  21972. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21973. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21974. }
  21975. _this.choiceLoading = false
  21976. }).catch((error) => {
  21977. if(type == 15){
  21978. {answerQ: "题目"}
  21979. }else if(type == 45){
  21980. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21981. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21982. }
  21983. console.log(error);
  21984. _this.choiceLoading = false
  21985. });
  21986. },
  21987. async aiGet4(messages, callback, clickType) {
  21988. let _this = this
  21989. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21990. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21991. if (_this.infoData.length) {
  21992. for (var i = 0; i < _this.infoData.length; i++) {
  21993. if(_this.infoData[i].fileid){
  21994. fileid.push(_this.infoData[i].fileid)
  21995. }else {
  21996. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21997. if(_fileid){
  21998. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21999. _this.$forceUpdate();
  22000. if(_fileid != 1){
  22001. fileid.push(_fileid)
  22002. }
  22003. }
  22004. }
  22005. }
  22006. }
  22007. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  22008. if(_this.cankaoInfoData[i].fileid){
  22009. fileid.push(_this.cankaoInfoData[i].fileid)
  22010. }else {
  22011. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  22012. if(_fileid){
  22013. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22014. _this.$forceUpdate();
  22015. if(_fileid != 1){
  22016. fileid.push(_fileid)
  22017. }
  22018. }
  22019. }
  22020. }
  22021. // let params = JSON.stringify({
  22022. // // "model": "Chat",
  22023. // model: 'gpt-3.5-turbo',
  22024. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22025. // max_tokens: 4096,
  22026. // top_p: 1,
  22027. // frequency_penalty: 0,
  22028. // presence_penalty: 0,
  22029. // messages: [{
  22030. // content: messages,
  22031. // role: 'user'
  22032. // }],
  22033. // stream: false,
  22034. // uid: this.userid,
  22035. // mind_map_question: "",
  22036. // })
  22037. // // let params = JSON.stringify({
  22038. // // message: {
  22039. // // anthropic_version: "bedrock-2023-05-31",
  22040. // // max_tokens: 4096,
  22041. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  22042. // // top_p: 1,
  22043. // // messages: [{
  22044. // // content: messages,
  22045. // // role: 'user'
  22046. // // }], //
  22047. // // },
  22048. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22049. // // });
  22050. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22051. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  22052. // console.log(response);
  22053. // let data = response.data.FunctionResponse
  22054. // if (data.choices && data.choices.length && data.choices[0].message) {
  22055. // console.log(data.choices[0].message.content);
  22056. // let dArray = JSON.parse(data.choices[0].message.content)
  22057. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  22058. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  22059. // _this.unitJson[0].chapterInfo[0].taskJson = []
  22060. // for (var i = 0; i < dArray.length; i++) {
  22061. // let _task = dArray[i]
  22062. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  22063. // task: _task.task,
  22064. // taskDetail: "",
  22065. // taskDetail2: "",
  22066. // taskDetail3: _task.detail,
  22067. // chapterData: [],
  22068. // toolText: "",
  22069. // toolChoose: [
  22070. // {
  22071. // tool: [],
  22072. // toolDetail: "",
  22073. // toolType: 0,
  22074. // askCount: 1,
  22075. // askTitle: "",
  22076. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22077. // },
  22078. // ],
  22079. // isShowTools: false,
  22080. // askCount: 1,
  22081. // isFold: 0,
  22082. // askTitle: "",
  22083. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22084. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22085. // homeworkList: [],
  22086. // })
  22087. // }
  22088. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  22089. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22090. // _this.$forceUpdate();
  22091. // } else {
  22092. // for (var i = 0; i < dArray.length; i++) {
  22093. // let _task = dArray[i]
  22094. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22095. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22096. // }else {
  22097. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22098. // task: _task.task,
  22099. // taskDetail: "",
  22100. // taskDetail2: "",
  22101. // taskDetail3: _task.detail,
  22102. // chapterData: [],
  22103. // toolText: "",
  22104. // toolChoose: [
  22105. // {
  22106. // tool: [],
  22107. // toolDetail: "",
  22108. // toolType: 0,
  22109. // askCount: 1,
  22110. // askTitle: "",
  22111. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22112. // },
  22113. // ],
  22114. // isShowTools: false,
  22115. // askCount: 1,
  22116. // isFold: 0,
  22117. // askTitle: "",
  22118. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22119. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22120. // homeworkList: [],
  22121. // }
  22122. // }
  22123. // }
  22124. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22125. // _this.$forceUpdate();
  22126. // }
  22127. // }
  22128. // // if (data.result) {
  22129. // // console.log(data.result);
  22130. // // let dArray = JSON.parse(data.result)
  22131. // // _this.teacherText = JSON.parse(data.result)
  22132. // // for (var i = 0; i < dArray.length; i++) {
  22133. // // let _task = dArray[i]
  22134. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22135. // // }
  22136. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22137. // // _this.$forceUpdate();
  22138. // // }
  22139. // callback ? callback() : ''
  22140. // _this.loading = false
  22141. // }).catch(function (error) {
  22142. // _this.loading = false
  22143. // console.log(error);
  22144. // });
  22145. let parm = {
  22146. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22147. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22148. session_name: uuidv4(),
  22149. userId: this.userid,
  22150. file_ids: fileid.length ? [...fileid] : '',
  22151. model: 'gpt-4o-2024-11-20',
  22152. temperature: this.mode == 3 ? 0.5 : 0.1,
  22153. }
  22154. this.ajax
  22155. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  22156. .then((response) => {
  22157. console.log(response);
  22158. let data = response.data.FunctionResponse
  22159. if (data.message) {
  22160. console.log(data.message);
  22161. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  22162. let dArray = []
  22163. try {
  22164. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  22165. } catch (error) {
  22166. console.log("error_________________" + error);
  22167. try {
  22168. let regex = new RegExp(/```json([\s\S]*?)```/);
  22169. let match = data.message.match(regex);
  22170. dArray = JSON.parse(match[1]);
  22171. // var message = data.message;
  22172. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  22173. // var jsonEnd = message.indexOf("```", jsonStart);
  22174. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  22175. // dArray = JSON.parse(jsonString);
  22176. } catch (error) {
  22177. _this.aiGet4(messages, callback)
  22178. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  22179. console.log("error_________________" + error);
  22180. return;
  22181. console.log("error_________________" + error);
  22182. _this.loading = false
  22183. }
  22184. }
  22185. try {
  22186. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  22187. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  22188. if(_this.panTeacher() > 0){
  22189. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  22190. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  22191. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  22192. }
  22193. for (var i = 0; i < dArray.length; i++) {
  22194. let _task = dArray[i]
  22195. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22196. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  22197. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22198. }else {
  22199. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22200. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  22201. taskDetail: "",
  22202. taskDetail2: "",
  22203. taskDetail3: _task.detail,
  22204. chapterData: [],
  22205. toolText: "",
  22206. toolChoose: [
  22207. {
  22208. tool: [],
  22209. toolDetail: "",
  22210. toolType: 0,
  22211. askCount: 1,
  22212. askTitle: "",
  22213. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22214. },
  22215. ],
  22216. isShowTools: false,
  22217. askCount: 1,
  22218. isFold: 0,
  22219. askTitle: "",
  22220. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22221. checkJson: [{ checkCount: [], checkPerent: [] }],
  22222. homeworkList: [],
  22223. })
  22224. }
  22225. }
  22226. }else {
  22227. _this.unitJson[0].chapterInfo[0].taskJson = []
  22228. for (var i = 0; i < dArray.length; i++) {
  22229. let _task = dArray[i]
  22230. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22231. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  22232. taskDetail: "",
  22233. taskDetail2: "",
  22234. taskDetail3: _task.detail,
  22235. chapterData: [],
  22236. toolText: "",
  22237. toolChoose: [
  22238. {
  22239. tool: [],
  22240. toolDetail: "",
  22241. toolType: 0,
  22242. askCount: 1,
  22243. askTitle: "",
  22244. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22245. },
  22246. ],
  22247. isShowTools: false,
  22248. askCount: 1,
  22249. isFold: 0,
  22250. askTitle: "",
  22251. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22252. checkJson: [{ checkCount: [], checkPerent: [] }],
  22253. homeworkList: [],
  22254. })
  22255. }
  22256. }
  22257. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  22258. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22259. _this.$forceUpdate();
  22260. } else {
  22261. for (var i = 0; i < dArray.length; i++) {
  22262. let _task = dArray[i]
  22263. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22264. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22265. }else {
  22266. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22267. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  22268. taskDetail: "",
  22269. taskDetail2: "",
  22270. taskDetail3: _task.detail,
  22271. chapterData: [],
  22272. toolText: "",
  22273. toolChoose: [
  22274. {
  22275. tool: [],
  22276. toolDetail: "",
  22277. toolType: 0,
  22278. askCount: 1,
  22279. askTitle: "",
  22280. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22281. },
  22282. ],
  22283. isShowTools: false,
  22284. askCount: 1,
  22285. isFold: 0,
  22286. askTitle: "",
  22287. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22288. checkJson: [{ checkCount: [], checkPerent: [] }],
  22289. homeworkList: [],
  22290. }
  22291. }
  22292. }
  22293. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22294. _this.$forceUpdate();
  22295. }
  22296. } catch (error) {
  22297. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  22298. _this.aiGet4(messages, callback)
  22299. console.log("error_________________" + error);
  22300. return;
  22301. // _this.loading = false
  22302. }
  22303. }
  22304. callback ? callback() : ''
  22305. })
  22306. .catch((error) => {
  22307. _this.loading = false
  22308. console.log(error);
  22309. });
  22310. },
  22311. async aiDetail(msg, index) {
  22312. let _this = this
  22313. const _tindex = 'task-' + index
  22314. const _tindex2 = index
  22315. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22316. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22317. if (_this.infoData.length) {
  22318. for (var i = 0; i < _this.infoData.length; i++) {
  22319. if(_this.infoData[i].fileid){
  22320. fileid.push(_this.infoData[i].fileid)
  22321. }else {
  22322. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22323. if(_fileid){
  22324. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22325. _this.$forceUpdate();
  22326. if(_fileid != 1){
  22327. fileid.push(_fileid)
  22328. }
  22329. }
  22330. }
  22331. }
  22332. }
  22333. let url = []
  22334. if (this.infoData.length) {
  22335. for (var i = 0; i < this.infoData.length; i++) {
  22336. url.push(this.infoData[i].url)
  22337. }
  22338. }
  22339. let messages = `NOTICE
  22340. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22341. Language: ${this.getLang()}
  22342. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22343. Instruction: Based on the context, follow "Format example", write content.
  22344. #Context
  22345. ## 要求
  22346. ${msg}
  22347. ## 参考信息
  22348. 任务名称:${_this.aiCallBack.task}
  22349. ## 优化内容
  22350. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  22351. // -------- #补充参考资料和
  22352. // ## 补充参考资料
  22353. // - 补充资料:${url.join(",")}
  22354. // - 补充描述:${_this.courseText2}
  22355. _this.taskDetailLoading.push(_tindex)
  22356. _this.ttaskDetailLoading.push(_tindex)
  22357. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22358. let _uuid = uuidv4();
  22359. // let params = JSON.stringify({
  22360. // // "model": "Chat",
  22361. // model: 'gpt-3.5-turbo',
  22362. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22363. // max_tokens: 4096,
  22364. // top_p: 1,
  22365. // frequency_penalty: 0,
  22366. // presence_penalty: 0,
  22367. // messages: [{
  22368. // content: messages,
  22369. // role: 'user'
  22370. // }],
  22371. // uid: _uuid,
  22372. // mind_map_question: "",
  22373. // })
  22374. let params = {
  22375. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22376. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  22377. session_name: _uuid,
  22378. userId: _this.userid,
  22379. uid: _uuid,
  22380. file_ids: fileid.length ? [...fileid] : '',
  22381. model: 'gpt-4o-2024-11-20',
  22382. temperature: this.mode == 3 ? 0.5 : 0.1,
  22383. }
  22384. // let params = JSON.stringify({
  22385. // message: {
  22386. // anthropic_version: "bedrock-2023-05-31",
  22387. // max_tokens: 4096,
  22388. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22389. // top_p: 1,
  22390. // messages: [{
  22391. // "role": "user",
  22392. // "content": messages
  22393. // }] ,
  22394. // },
  22395. // uid: _uuid,
  22396. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22397. // });
  22398. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22399. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22400. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22401. console.log(response);
  22402. // let data = response.data.FunctionResponse
  22403. // if (data.choices && data.choices.length && data.choices[0].message) {
  22404. // console.log(data.choices[0].message.content);
  22405. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22406. // _this.$forceUpdate()
  22407. // }
  22408. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22409. } else {
  22410. _this.$message.warning(response.data.FunctionResponse.result);
  22411. }
  22412. _this.isOutlineTaskCancelToken[index] = null
  22413. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22414. }).catch(function (error) {
  22415. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22416. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22417. _this.isOutlineTaskCancelToken[index] = null
  22418. if(error && error.message != 'Request canceled by the user.'){
  22419. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22420. }
  22421. console.log(error);
  22422. });
  22423. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  22424. },
  22425. aiDetailgetAiContent(_uid, loading, _tindex2) {
  22426. try {
  22427. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22428. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22429. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22430. } catch(error){
  22431. console.log('EventSource error:', error);
  22432. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22433. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22434. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22435. this.isOutlineTaskCancelToken[_tindex2] = null
  22436. return;
  22437. }
  22438. let _allText = "";
  22439. let _mdText = "";
  22440. let _iindex = 0
  22441. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22442. let _eData = JSON.parse(_e.data).content;
  22443. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22444. //对话已经完成
  22445. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22446. this.isOutlineTaskCancelSource[_tindex2].close();
  22447. this.isOutlineTaskCancelSource[_tindex2] = null;
  22448. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22449. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22450. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22451. this.isOutlineTaskCancelToken[_tindex2] = null
  22452. return;
  22453. } else {
  22454. _iindex++
  22455. //对话还在继续
  22456. let _text = "";
  22457. _text = _eData.replaceAll("'", "");
  22458. if (_allText == "") {
  22459. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22460. } else {
  22461. _allText += _text;
  22462. }
  22463. _mdText = _allText + "_";
  22464. _mdText = _mdText.replace(/\\n/g, "\n");
  22465. _mdText = _mdText.replace(/\\/g, "");
  22466. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22467. //转化返回的回复流数据.
  22468. if(_iindex == 10){
  22469. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22470. _iindex = 0
  22471. }
  22472. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22473. // 处理流数据
  22474. }
  22475. // this.$forceUpdate();
  22476. };
  22477. let _this = this
  22478. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22479. // 处理错误,可以尝试重新连接
  22480. console.log('EventSource error:', event);
  22481. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22482. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22483. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22484. _this.isOutlineTaskCancelToken[_tindex2] = null
  22485. _this.isOutlineTaskCancelSource[_tindex2].close();
  22486. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22487. };
  22488. },
  22489. async aiOutlineDetail(msg, index) {
  22490. let _this = this
  22491. const _tindex = 'task-' + index
  22492. const _tindex2 = index
  22493. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22494. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22495. if (_this.infoData.length) {
  22496. for (var i = 0; i < _this.infoData.length; i++) {
  22497. if(_this.infoData[i].fileid){
  22498. fileid.push(_this.infoData[i].fileid)
  22499. }else {
  22500. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22501. if(_fileid){
  22502. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22503. _this.$forceUpdate();
  22504. if(_fileid != 1){
  22505. fileid.push(_fileid)
  22506. }
  22507. }
  22508. }
  22509. }
  22510. }
  22511. let url = []
  22512. if (this.infoData.length) {
  22513. for (var i = 0; i < this.infoData.length; i++) {
  22514. url.push(this.infoData[i].url)
  22515. }
  22516. }
  22517. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22518. let messages = `NOTICE
  22519. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22520. Language: ${this.getLang()}
  22521. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22522. Instruction: Based on the context, follow "Format example", write content.
  22523. #Context
  22524. ## 要求
  22525. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  22526. ## 参考信息
  22527. 课程名字:${_this.courseName}
  22528. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22529. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22530. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22531. # Format example
  22532. 子任务名称:名称应该总结了该任务是在做什么,
  22533. 子任务设计:任务设计。
  22534. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  22535. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  22536. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  22537. `
  22538. // 教学目标:教学目标。
  22539. // 任务设计:任务设计。
  22540. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22541. // -------- #补充参考资料和
  22542. // ## 补充参考资料
  22543. // - 补充资料:${url.join(",")}
  22544. // - 补充描述:${_this.courseText2}
  22545. _this.taskDetailLoading.push(_tindex)
  22546. _this.ttaskDetailLoading.push(_tindex)
  22547. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22548. let _uuid = uuidv4();
  22549. // let params = JSON.stringify({
  22550. // // "model": "Chat",
  22551. // model: 'gpt-3.5-turbo',
  22552. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22553. // max_tokens: 4096,
  22554. // top_p: 1,
  22555. // frequency_penalty: 0,
  22556. // presence_penalty: 0,
  22557. // messages: [{
  22558. // content: messages,
  22559. // role: 'user'
  22560. // }],
  22561. // uid: _uuid,
  22562. // mind_map_question: "",
  22563. // })
  22564. let params = {
  22565. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22566. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22567. session_name: _uuid,
  22568. userId: _this.userid,
  22569. uid: _uuid,
  22570. file_ids: fileid.length ? [...fileid] : '',
  22571. model: 'gpt-4o-2024-11-20',
  22572. temperature: this.mode == 3 ? 0.5 : 0.1,
  22573. }
  22574. // let params = JSON.stringify({
  22575. // message: {
  22576. // anthropic_version: "bedrock-2023-05-31",
  22577. // max_tokens: 4096,
  22578. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22579. // top_p: 1,
  22580. // messages: [{
  22581. // "role": "user",
  22582. // "content": messages
  22583. // }] ,
  22584. // },
  22585. // uid: _uuid,
  22586. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22587. // });
  22588. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22589. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22590. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22591. console.log(response);
  22592. // let data = response.data.FunctionResponse
  22593. // if (data.choices && data.choices.length && data.choices[0].message) {
  22594. // console.log(data.choices[0].message.content);
  22595. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22596. // _this.$forceUpdate()
  22597. // }
  22598. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22599. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22600. } else {
  22601. _this.$message.warning(response.data.FunctionResponse.result);
  22602. }
  22603. _this.isOutlineTaskCancelToken[index] = null
  22604. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22605. }).catch(function (error) {
  22606. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22607. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22608. _this.isOutlineTaskCancelToken[index] = null
  22609. if(error && error.message != 'Request canceled by the user.'){
  22610. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22611. }
  22612. console.log(error);
  22613. });
  22614. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22615. },
  22616. async aiOutlineDetail2(msg, index) {
  22617. let _this = this
  22618. const _tindex = 'task-' + index
  22619. const _tindex2 = index
  22620. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22621. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22622. if (_this.infoData.length) {
  22623. for (var i = 0; i < _this.infoData.length; i++) {
  22624. if(_this.infoData[i].fileid){
  22625. fileid.push(_this.infoData[i].fileid)
  22626. }else {
  22627. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22628. if(_fileid){
  22629. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22630. _this.$forceUpdate();
  22631. if(_fileid != 1){
  22632. fileid.push(_fileid)
  22633. }
  22634. }
  22635. }
  22636. }
  22637. }
  22638. let url = []
  22639. if (this.infoData.length) {
  22640. for (var i = 0; i < this.infoData.length; i++) {
  22641. url.push(this.infoData[i].url)
  22642. }
  22643. }
  22644. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22645. let taskArray = []
  22646. let taskArrayD = []
  22647. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  22648. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  22649. if(k != index){
  22650. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  22651. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  22652. }
  22653. }
  22654. let messages = `NOTICE
  22655. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22656. Language: ${this.getLang()}
  22657. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22658. Instruction: Based on the context, follow "Format example", write content.
  22659. #Context
  22660. ## 要求
  22661. ${msg}
  22662. ## 参考信息
  22663. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22664. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22665. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22666. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  22667. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  22668. # Format example
  22669. **子任务标题**:环节+子任务名称
  22670. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  22671. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  22672. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  22673. `
  22674. // 教学目标:教学目标。
  22675. // 任务设计:任务设计。
  22676. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22677. // -------- #补充参考资料和
  22678. // ## 补充参考资料
  22679. // - 补充资料:${url.join(",")}
  22680. // - 补充描述:${_this.courseText2}
  22681. _this.taskDetailLoading.push(_tindex)
  22682. _this.ttaskDetailLoading.push(_tindex)
  22683. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22684. let _uuid = uuidv4();
  22685. // let params = JSON.stringify({
  22686. // // "model": "Chat",
  22687. // model: 'gpt-3.5-turbo',
  22688. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22689. // max_tokens: 4096,
  22690. // top_p: 1,
  22691. // frequency_penalty: 0,
  22692. // presence_penalty: 0,
  22693. // messages: [{
  22694. // content: messages,
  22695. // role: 'user'
  22696. // }],
  22697. // uid: _uuid,
  22698. // mind_map_question: "",
  22699. // })
  22700. let params = {
  22701. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22702. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  22703. session_name: _uuid,
  22704. userId: _this.userid,
  22705. uid: _uuid,
  22706. file_ids: fileid.length ? [...fileid] : '',
  22707. model: 'gpt-4o-2024-11-20',
  22708. temperature: this.mode == 3 ? 0.5 : 0.1,
  22709. }
  22710. // let params = JSON.stringify({
  22711. // message: {
  22712. // anthropic_version: "bedrock-2023-05-31",
  22713. // max_tokens: 4096,
  22714. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22715. // top_p: 1,
  22716. // messages: [{
  22717. // "role": "user",
  22718. // "content": messages
  22719. // }] ,
  22720. // },
  22721. // uid: _uuid,
  22722. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22723. // });
  22724. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22725. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22726. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22727. console.log(response);
  22728. // let data = response.data.FunctionResponse
  22729. // if (data.choices && data.choices.length && data.choices[0].message) {
  22730. // console.log(data.choices[0].message.content);
  22731. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22732. // _this.$forceUpdate()
  22733. // }
  22734. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22735. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22736. } else {
  22737. _this.$message.warning(response.data.FunctionResponse.result);
  22738. }
  22739. _this.isOutlineTaskCancelToken[index] = null
  22740. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22741. }).catch(function (error) {
  22742. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22743. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22744. _this.isOutlineTaskCancelToken[index] = null
  22745. if(error && error.message != 'Request canceled by the user.'){
  22746. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22747. }
  22748. console.log(error);
  22749. });
  22750. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22751. },
  22752. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  22753. try {
  22754. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22755. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22756. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22757. } catch(error) {
  22758. console.log('EventSource error:', error);
  22759. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22760. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22761. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22762. this.isOutlineTaskCancelToken[_tindex2] = null
  22763. return;
  22764. }
  22765. let _allText = "";
  22766. let _mdText = "";
  22767. let _iindex = 0
  22768. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22769. let _eData = JSON.parse(_e.data).content;
  22770. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22771. //对话已经完成
  22772. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22773. this.isOutlineTaskCancelSource[_tindex2].close();
  22774. this.isOutlineTaskCancelSource[_tindex2] = null;
  22775. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22776. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  22777. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  22778. }
  22779. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22780. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22781. this.isOutlineTaskCancelToken[_tindex2] = null
  22782. return;
  22783. } else {
  22784. _iindex++
  22785. //对话还在继续
  22786. let _text = "";
  22787. _text = _eData.replaceAll("'", "");
  22788. if (_allText == "") {
  22789. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22790. } else {
  22791. _allText += _text;
  22792. }
  22793. _mdText = _allText + "_";
  22794. _mdText = _mdText.replace(/\\n/g, "\n");
  22795. _mdText = _mdText.replace(/\\/g, "");
  22796. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22797. //转化返回的回复流数据.
  22798. if(_iindex == 10){
  22799. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22800. _iindex = 0
  22801. }
  22802. if(this.taskDetailLoading.indexOf(loading) !== -1){
  22803. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22804. }
  22805. // 处理流数据
  22806. }
  22807. // this.$forceUpdate();
  22808. };
  22809. let _this = this
  22810. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22811. // 处理错误,可以尝试重新连接
  22812. console.log('EventSource error:', event);
  22813. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22814. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22815. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22816. _this.isOutlineTaskCancelToken[_tindex2] = null
  22817. _this.isOutlineTaskCancelSource[_tindex2].close();
  22818. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22819. };
  22820. },
  22821. async aiDetail2(msg, index) {
  22822. let _this = this
  22823. const _tindex = 'task-' + index
  22824. const _tindex2 = index
  22825. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22826. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22827. if (_this.infoData.length) {
  22828. for (var i = 0; i < _this.infoData.length; i++) {
  22829. if(_this.infoData[i].fileid){
  22830. fileid.push(_this.infoData[i].fileid)
  22831. }else {
  22832. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22833. if(_fileid){
  22834. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22835. _this.$forceUpdate();
  22836. if(_fileid != 1){
  22837. fileid.push(_fileid)
  22838. }
  22839. }
  22840. }
  22841. }
  22842. }
  22843. let messages = `NOTICE
  22844. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22845. Language: ${this.getLang()}
  22846. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22847. Instruction: Based on the context, follow "Format example", write content.
  22848. #Context
  22849. ## 要求
  22850. ${msg}
  22851. ## 参考资料
  22852. 任务名字: ${_this.aiCallBack.task}
  22853. ## 优化信息
  22854. ${_this.aiCallBack.taskDetail}
  22855. # Format example
  22856. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  22857. _this.taskDetailLoading2.push(_tindex)
  22858. _this.ttaskDetailLoading2.push(_tindex)
  22859. let _uuid = uuidv4();
  22860. // let params = JSON.stringify({
  22861. // // "model": "Chat",
  22862. // model: 'gpt-3.5-turbo',
  22863. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22864. // max_tokens: 4096,
  22865. // top_p: 1,
  22866. // frequency_penalty: 0,
  22867. // presence_penalty: 0,
  22868. // messages: [{
  22869. // content: messages,
  22870. // role: 'user'
  22871. // }],
  22872. // uid: _uuid,
  22873. // mind_map_question: "",
  22874. // })
  22875. let params = {
  22876. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22877. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  22878. session_name: _uuid,
  22879. userId: _this.userid,
  22880. uid: _uuid,
  22881. file_ids: fileid.length ? [...fileid] : '',
  22882. model: 'gpt-4o-2024-11-20',
  22883. temperature: this.mode == 3 ? 0.5 : 0.1,
  22884. }
  22885. // let params = JSON.stringify({
  22886. // message: {
  22887. // anthropic_version: "bedrock-2023-05-31",
  22888. // max_tokens: 4096,
  22889. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22890. // top_p: 1,
  22891. // messages: [{
  22892. // "role": "user",
  22893. // "content": messages
  22894. // }] ,
  22895. // },
  22896. // uid: _uuid,
  22897. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22898. // });
  22899. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22900. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22901. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22902. console.log(response);
  22903. // let data = response.data.FunctionResponse
  22904. // if (data.choices && data.choices.length && data.choices[0].message) {
  22905. // console.log(data.choices[0].message.content);
  22906. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22907. // _this.$forceUpdate()
  22908. // }
  22909. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22910. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22911. } else {
  22912. _this.$message.warning(response.data.FunctionResponse.result);
  22913. }
  22914. }).catch(function (error) {
  22915. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  22916. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  22917. if(error && error.message != 'Request canceled by the user.'){
  22918. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22919. }
  22920. console.log(error);
  22921. });
  22922. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  22923. },
  22924. aiDetail2getAiContent(_uid, loading, _tindex2) {
  22925. let _source;
  22926. try {
  22927. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22928. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22929. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22930. } catch(error) {
  22931. console.log('EventSource error:', error);
  22932. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22933. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22934. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22935. return;
  22936. }
  22937. let _allText = "";
  22938. let _mdText = "";
  22939. let _iindex = 0
  22940. _source.onmessage = _e => {
  22941. let _eData = JSON.parse(_e.data).content;
  22942. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22943. //对话已经完成
  22944. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22945. _source.close();
  22946. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22947. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22948. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22949. return;
  22950. } else {
  22951. _iindex++
  22952. //对话还在继续
  22953. let _text = "";
  22954. _text = _eData.replaceAll("'", "");
  22955. if (_allText == "") {
  22956. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22957. } else {
  22958. _allText += _text;
  22959. }
  22960. _mdText = _allText + "_";
  22961. _mdText = _mdText.replace(/\\n/g, "\n");
  22962. _mdText = _mdText.replace(/\\/g, "");
  22963. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22964. //转化返回的回复流数据
  22965. if(_iindex == 10){
  22966. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22967. _iindex = 0
  22968. }
  22969. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22970. // 处理流数据
  22971. }
  22972. // this.$forceUpdate();
  22973. };
  22974. let _this = this
  22975. _source.onerror = function(event) {
  22976. // 处理错误,可以尝试重新连接
  22977. console.log('EventSource error:', event);
  22978. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22979. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  22980. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  22981. _source.close();
  22982. };
  22983. },
  22984. async aiDetail3(msg, index, tindex) {
  22985. let _this = this
  22986. const _tindex = 'task-' + index + tindex
  22987. const _tindex2 = index
  22988. const _tindex3 = tindex
  22989. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22990. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22991. if (_this.infoData.length) {
  22992. for (var i = 0; i < _this.infoData.length; i++) {
  22993. if(_this.infoData[i].fileid){
  22994. fileid.push(_this.infoData[i].fileid)
  22995. }else {
  22996. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22997. if(_fileid){
  22998. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22999. _this.$forceUpdate();
  23000. if(_fileid != 1){
  23001. fileid.push(_fileid)
  23002. }
  23003. }
  23004. }
  23005. }
  23006. }
  23007. let tool = _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]
  23008. let appJson = _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].appJson
  23009. // **重点考虑该任务及工具名和工具内容的情况下*
  23010. let messages = `NOTICE
  23011. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  23012. Language: ${this.getLang()}
  23013. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23014. Instruction: Based on the context, follow "Format example", write content.
  23015. #Context
  23016. ## 参考内容
  23017. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23018. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23019. 工具名称:${_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 : '无'}
  23020. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  23021. ${tool == 72 && appJson && appJson.name && `应用名称:${appJson.name}`}
  23022. ${tool == 72 && appJson && appJson.detail && `应用描述:${appJson.detail}`}
  23023. ## 要求
  23024. ${msg} 输出格式和内容要求参考#格式与要求
  23025. # Format example
  23026. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  23027. _this.taskDetailLoading3.push(_tindex)
  23028. _this.ttaskDetailLoading3.push(_tindex)
  23029. let _uuid = uuidv4();
  23030. // let params = JSON.stringify({
  23031. // // "model": "Chat",
  23032. // model: 'gpt-3.5-turbo',
  23033. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23034. // max_tokens: 4096,
  23035. // top_p: 1,
  23036. // frequency_penalty: 0,
  23037. // presence_penalty: 0,
  23038. // messages: [{
  23039. // content: messages,
  23040. // role: 'user'
  23041. // }],
  23042. // uid: _uuid,
  23043. // mind_map_question: "",
  23044. // })
  23045. let params = {
  23046. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23047. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23048. session_name: _uuid,
  23049. userId: _this.userid,
  23050. uid: _uuid,
  23051. file_ids: fileid.length ? [...fileid] : '',
  23052. model: 'gpt-4o-2024-11-20',
  23053. temperature: this.mode == 3 ? 0.5 : 0.1,
  23054. }
  23055. // let params = JSON.stringify({
  23056. // message: {
  23057. // anthropic_version: "bedrock-2023-05-31",
  23058. // max_tokens: 4096,
  23059. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23060. // top_p: 1,
  23061. // messages: [{
  23062. // "role": "user",
  23063. // "content": messages
  23064. // }] ,
  23065. // },
  23066. // uid: _uuid,
  23067. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23068. // });
  23069. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23070. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23071. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23072. console.log(response);
  23073. let data = response.data.FunctionResponse
  23074. // if (data.choices && data.choices.length && data.choices[0].message) {
  23075. // console.log(data.choices[0].message.content);
  23076. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  23077. // _this.$forceUpdate()
  23078. // }
  23079. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  23080. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23081. } else {
  23082. _this.$message.warning(response.data.FunctionResponse.result);
  23083. }
  23084. }).catch(function (error) {
  23085. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  23086. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  23087. if(error && error.message != 'Request canceled by the user.'){
  23088. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23089. }
  23090. console.log(error);
  23091. });
  23092. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  23093. },
  23094. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  23095. let _source;
  23096. try {
  23097. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23098. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23099. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23100. } catch(error) {
  23101. console.log('EventSource error:', event);
  23102. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23103. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23104. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  23105. return;
  23106. }
  23107. let _allText = "";
  23108. let _mdText = "";
  23109. let _iindex = 0
  23110. _source.onmessage = _e => {
  23111. let _eData = JSON.parse(_e.data).content;
  23112. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23113. //对话已经完成
  23114. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23115. _source.close();
  23116. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  23117. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23118. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  23119. return;
  23120. } else {
  23121. _iindex++
  23122. //对话还在继续
  23123. let _text = "";
  23124. _text = _eData.replaceAll("'", "");
  23125. if (_allText == "") {
  23126. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23127. } else {
  23128. _allText += _text;
  23129. }
  23130. _mdText = _allText + "_";
  23131. _mdText = _mdText.replace(/\\n/g, "\n");
  23132. _mdText = _mdText.replace(/\\/g, "");
  23133. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23134. //转化返回的回复流数据
  23135. if(_iindex == 10){
  23136. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  23137. _iindex = 0
  23138. }
  23139. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23140. // 处理流数据
  23141. }
  23142. // this.$forceUpdate();
  23143. };
  23144. let _this = this
  23145. _source.onerror = function(event) {
  23146. // 处理错误,可以尝试重新连接
  23147. console.log('EventSource error:', event);
  23148. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23149. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  23150. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  23151. _source.close();
  23152. };
  23153. },
  23154. async aiDetail4(msg, index) {
  23155. if (!msg.length) {
  23156. this.$message.error("请添加评价后才能优化")
  23157. return
  23158. }
  23159. let _this = this
  23160. const _tindex = 'task-' + index
  23161. const _tindex2 = index
  23162. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23163. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23164. if (_this.infoData.length) {
  23165. for (var i = 0; i < _this.infoData.length; i++) {
  23166. if(_this.infoData[i].fileid){
  23167. fileid.push(_this.infoData[i].fileid)
  23168. }else {
  23169. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23170. if(_fileid){
  23171. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23172. _this.$forceUpdate();
  23173. if(_fileid != 1){
  23174. fileid.push(_fileid)
  23175. }
  23176. }
  23177. }
  23178. }
  23179. }
  23180. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  23181. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  23182. if(_this.pingjiaInfoData[index][i].fileid){
  23183. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  23184. }
  23185. }
  23186. }
  23187. var _text = ""
  23188. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  23189. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  23190. // _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 : ''} `
  23191. _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 : ''} `
  23192. }
  23193. }
  23194. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  23195. // **重点考虑该任务详情**
  23196. // let messages = `
  23197. // Language: ${this.getLang()}
  23198. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23199. // #Context
  23200. // ## 参考内容
  23201. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23202. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23203. // 评价设计:${_text}
  23204. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23205. // ## 要求
  23206. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  23207. // # 格式与要求
  23208. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  23209. // # Format example
  23210. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  23211. let messages = `
  23212. Language: ${this.getLang()}
  23213. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23214. #Context
  23215. ## 参考内容
  23216. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23217. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23218. ${_text ? '评价设计:'+_text : ''}
  23219. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23220. ## 要求
  23221. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  23222. # 格式与要求
  23223. 核心素养:从教案中提取
  23224. 目标:从教案中提取
  23225. 评价标准:从教案中提取评价标准
  23226. # Format example
  23227. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  23228. _this.taskDetailLoading4.push(_tindex)
  23229. // let params = JSON.stringify({
  23230. // // "model": "Chat",
  23231. // model: 'gpt-3.5-turbo',
  23232. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23233. // max_tokens: 4096,
  23234. // top_p: 1,
  23235. // frequency_penalty: 0,
  23236. // presence_penalty: 0,
  23237. // messages: [{
  23238. // content: messages,
  23239. // role: 'user'
  23240. // }],
  23241. // stream: false,
  23242. // uid: this.userid,
  23243. // mind_map_question: "",
  23244. // })
  23245. let params = {
  23246. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  23247. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23248. session_name: uuidv4(),
  23249. userId: _this.userid,
  23250. file_ids: fileid.length ? [...fileid] : '',
  23251. model: 'gpt-4o-2024-11-20',
  23252. temperature: this.mode == 3 ? 0.5 : 0.1,
  23253. }
  23254. // let params = JSON.stringify({
  23255. // message: {
  23256. // anthropic_version: "bedrock-2023-05-31",
  23257. // max_tokens: 4096,
  23258. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23259. // top_p: 1,
  23260. // messages: [{
  23261. // content: messages,
  23262. // role: 'user'
  23263. // }], //
  23264. // },
  23265. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23266. // });
  23267. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23268. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  23269. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  23270. console.log(response);
  23271. let data = response.data.FunctionResponse
  23272. // if (data.choices && data.choices.length && data.choices[0].message) {
  23273. // console.log(data.choices[0].message.content);
  23274. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  23275. // _this.$forceUpdate()
  23276. // }
  23277. if (data.message) {
  23278. console.log(data.message);
  23279. try {
  23280. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  23281. } catch (e) {
  23282. console.log("error_________________" + e);
  23283. // _this.$message.error(data.message)
  23284. try {
  23285. let regex = new RegExp(/```json([\s\S]*?)```/);
  23286. let match = data.message.match(regex);
  23287. let elist = JSON.parse(match[1])
  23288. elist = elist.filter(el=>{
  23289. el.isai = 1
  23290. return el
  23291. })
  23292. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  23293. // var message = data.message;
  23294. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  23295. // var jsonEnd = message.indexOf("```", jsonStart);
  23296. // if (jsonStart !== -1 && jsonEnd !== -1) {
  23297. // var jsonString = message
  23298. // .substring(jsonStart, jsonEnd)
  23299. // .trim();
  23300. // var _data2 = JSON.parse(jsonString);
  23301. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  23302. // }
  23303. } catch (error) {
  23304. }
  23305. }
  23306. _this.$forceUpdate()
  23307. }
  23308. // if (data.result) {
  23309. // console.log(data.result);
  23310. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  23311. // _this.$forceUpdate()
  23312. // }
  23313. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23314. }).catch(function (error) {
  23315. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23316. if(error && error.message != 'Request canceled by the user.'){
  23317. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23318. }
  23319. console.log(error);
  23320. });
  23321. },
  23322. async aiDetail5(msg, index) {
  23323. let _this = this
  23324. const _tindex = 'task-' + index
  23325. const _tindex2 = index
  23326. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23327. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23328. if (_this.infoData.length) {
  23329. for (var i = 0; i < _this.infoData.length; i++) {
  23330. if(_this.infoData[i].fileid){
  23331. fileid.push(_this.infoData[i].fileid)
  23332. }else {
  23333. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23334. if(_fileid){
  23335. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23336. _this.$forceUpdate();
  23337. if(_fileid != 1){
  23338. fileid.push(_fileid)
  23339. }
  23340. }
  23341. }
  23342. }
  23343. }
  23344. let url = []
  23345. if (this.infoData.length) {
  23346. for (var i = 0; i < this.infoData.length; i++) {
  23347. url.push(this.infoData[i].url)
  23348. }
  23349. }
  23350. var _text = ""
  23351. var _text2 = ""
  23352. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  23353. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23354. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23355. }
  23356. let messages = `
  23357. Language: ${this.getLang()}
  23358. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23359. --------
  23360. ## 要求
  23361. ${msg}
  23362. -------
  23363. ## 本教案描述
  23364. ${_this.aiCallBack}
  23365. -------
  23366. ## 课程大纲
  23367. ${_text}
  23368. -------
  23369. ## 其他教学任务教案
  23370. ${_text2}`
  23371. // ## 补充参考资料
  23372. // - 补充资料:${url.join(",")}
  23373. // - 补充描述:${this.courseText2}
  23374. _this.taskDetailLoading5.push(_tindex)
  23375. _this.ttaskDetailLoading5.push(_tindex)
  23376. let _uuid = uuidv4();
  23377. // let params = JSON.stringify({
  23378. // // "model": "Chat",
  23379. // model: 'gpt-3.5-turbo',
  23380. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23381. // max_tokens: 4096,
  23382. // top_p: 1,
  23383. // frequency_penalty: 0,
  23384. // presence_penalty: 0,
  23385. // messages: [{
  23386. // content: messages,
  23387. // role: 'user'
  23388. // }],
  23389. // uid: _uuid,
  23390. // mind_map_question: "",
  23391. // })
  23392. let params = {
  23393. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23394. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23395. session_name: _uuid,
  23396. userId: _this.userid,
  23397. uid: _uuid,
  23398. file_ids: fileid.length ? [...fileid] : '',
  23399. model: 'gpt-4o-2024-11-20',
  23400. temperature: this.mode == 3 ? 0.5 : 0.1,
  23401. }
  23402. // let params = JSON.stringify({
  23403. // message: {
  23404. // anthropic_version: "bedrock-2023-05-31",
  23405. // max_tokens: 4096,
  23406. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23407. // top_p: 1,
  23408. // messages: [{
  23409. // "role": "user",
  23410. // "content": messages
  23411. // }] ,
  23412. // },
  23413. // uid: _uuid,
  23414. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23415. // });
  23416. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23417. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23418. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23419. console.log(response);
  23420. // let data = response.data.FunctionResponse
  23421. // if (data.choices && data.choices.length && data.choices[0].message) {
  23422. // console.log(data.choices[0].message.content);
  23423. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23424. // _this.$forceUpdate()
  23425. // }
  23426. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23427. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23428. } else {
  23429. _this.$message.warning(response.data.FunctionResponse.result);
  23430. }
  23431. }).catch(function (error) {
  23432. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23433. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23434. }
  23435. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23436. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23437. }
  23438. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23439. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23440. if(error && error.message != 'Request canceled by the user.'){
  23441. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23442. }
  23443. console.log(error);
  23444. });
  23445. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  23446. },
  23447. aiDetail5getAiContent(_uid, loading, _tindex2) {
  23448. let _source;
  23449. try {
  23450. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23451. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23452. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23453. } catch(error){
  23454. console.log('EventSource error:', error);
  23455. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23456. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23457. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23458. }
  23459. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23460. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23461. }
  23462. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23463. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23464. return;
  23465. }
  23466. let _allText = "";
  23467. let _mdText = "";
  23468. let _iindex = 0
  23469. _source.onmessage = _e => {
  23470. let _eData = JSON.parse(_e.data).content;
  23471. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23472. //对话已经完成
  23473. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23474. _source.close();
  23475. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23476. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23477. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23478. }
  23479. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23480. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23481. }
  23482. return;
  23483. } else {
  23484. _iindex++
  23485. //对话还在继续
  23486. let _text = "";
  23487. _text = _eData.replaceAll("'", "");
  23488. if (_allText == "") {
  23489. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23490. } else {
  23491. _allText += _text;
  23492. }
  23493. _mdText = _allText + "_";
  23494. _mdText = _mdText.replace(/\\n/g, "\n");
  23495. _mdText = _mdText.replace(/\\/g, "");
  23496. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23497. //转化返回的回复流数据
  23498. if(_iindex == 10){
  23499. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23500. _iindex = 0
  23501. }
  23502. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23503. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23504. }
  23505. // 处理流数据
  23506. }
  23507. // this.$forceUpdate();
  23508. };
  23509. let _this = this
  23510. _source.onerror = function(event) {
  23511. // 处理错误,可以尝试重新连接
  23512. console.log('EventSource error:', event);
  23513. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23514. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23515. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23516. }
  23517. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23518. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23519. }
  23520. _source.close();
  23521. };
  23522. },
  23523. async aiDetail52(msg, index, callback) {
  23524. let _this = this
  23525. const _tindex = 'task-' + index
  23526. const _tindex2 = index
  23527. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23528. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23529. if (_this.infoData.length) {
  23530. for (var i = 0; i < _this.infoData.length; i++) {
  23531. if(_this.infoData[i].fileid){
  23532. fileid.push(_this.infoData[i].fileid)
  23533. }else {
  23534. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23535. if(_fileid){
  23536. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23537. _this.$forceUpdate();
  23538. if(_fileid != 1){
  23539. fileid.push(_fileid)
  23540. }
  23541. }
  23542. }
  23543. }
  23544. }
  23545. let url = []
  23546. if (this.infoData.length) {
  23547. for (var i = 0; i < this.infoData.length; i++) {
  23548. url.push(this.infoData[i].url)
  23549. }
  23550. }
  23551. let taskN = []
  23552. let taskD = []
  23553. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  23554. if(_tindex2 != ti){
  23555. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  23556. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  23557. }
  23558. }
  23559. let messages = `NOTICE
  23560. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23561. Language: ${this.getLang()}
  23562. ATTENTION: follow "Language"
  23563. #Context
  23564. ## 要求
  23565. ${msg}
  23566. ## 补充描述
  23567. 课程简要描述:${_this.courseText}
  23568. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23569. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  23570. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  23571. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23572. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  23573. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23574. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23575. `
  23576. // ## 补充参考资料
  23577. // - 补充资料:${url.join(",")}
  23578. // - 补充描述:${this.courseText2}
  23579. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  23580. _this.taskDetailLoading5.push(_tindex)
  23581. }
  23582. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  23583. _this.ttaskDetailLoading5.push(_tindex)
  23584. }
  23585. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  23586. let _uuid = uuidv4();
  23587. // let params = JSON.stringify({
  23588. // // "model": "Chat",
  23589. // model: 'gpt-3.5-turbo',
  23590. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23591. // max_tokens: 4096,
  23592. // top_p: 1,
  23593. // frequency_penalty: 0,
  23594. // presence_penalty: 0,
  23595. // messages: [{
  23596. // content: messages,
  23597. // role: 'user'
  23598. // }],
  23599. // uid: _uuid,
  23600. // mind_map_question: "",
  23601. // })
  23602. let params = {
  23603. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23604. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23605. session_name: _uuid,
  23606. userId: _this.userid,
  23607. uid: _uuid,
  23608. file_ids: fileid.length ? [...fileid] : '',
  23609. model: 'gpt-4o-2024-11-20',
  23610. temperature: this.mode == 3 ? 0.5 : 0.1,
  23611. }
  23612. // let params = JSON.stringify({
  23613. // message: {
  23614. // anthropic_version: "bedrock-2023-05-31",
  23615. // max_tokens: 4096,
  23616. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23617. // top_p: 1,
  23618. // messages: [{
  23619. // "role": "user",
  23620. // "content": messages
  23621. // }] ,
  23622. // },
  23623. // uid: _uuid,
  23624. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23625. // });
  23626. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23627. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  23628. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23629. console.log(response);
  23630. // let data = response.data.FunctionResponse
  23631. // if (data.choices && data.choices.length && data.choices[0].message) {
  23632. // console.log(data.choices[0].message.content);
  23633. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23634. // _this.$forceUpdate()
  23635. // }
  23636. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23637. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23638. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  23639. } else {
  23640. _this.$message.warning(response.data.FunctionResponse.result);
  23641. }
  23642. _this.isTeacherTaskCancelToken2[index] = null
  23643. }).catch(function (error) {
  23644. if(error && error.message != 'Request canceled by the user.'){
  23645. _this.isTeacherTaskCancelToken2[index] = null
  23646. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23647. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23648. }
  23649. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23650. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23651. }
  23652. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23653. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23654. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23655. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23656. confirmButtonText: "确定",
  23657. cancelButtonText: "取消",
  23658. distinguishCancelAndClose: true,
  23659. type: "warning",
  23660. customClass: 'custom-confirm-box'
  23661. })
  23662. .then(() => {
  23663. _this.aiDetail52(msg, index, callback)
  23664. }).catch((v) => {
  23665. console.log(v);
  23666. callback ? callback() : ''
  23667. })
  23668. setTimeout(() => {
  23669. _this.setTipsIndex()
  23670. }, 500)
  23671. }
  23672. console.log(error);
  23673. });
  23674. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  23675. },
  23676. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  23677. try {
  23678. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23679. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23680. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23681. } catch(error) {
  23682. console.log('EventSource error:', error);
  23683. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23684. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23685. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23686. }
  23687. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23688. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23689. }
  23690. this.isTeacherTaskCancelToken2[_tindex2] = null
  23691. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23692. confirmButtonText: "确定",
  23693. cancelButtonText: "取消",
  23694. distinguishCancelAndClose: true,
  23695. type: "warning",
  23696. customClass: 'custom-confirm-box'
  23697. })
  23698. .then(() => {
  23699. _this.aiDetail52(msg, _tindex2, callback)
  23700. }).catch((v) => {
  23701. console.log(v);
  23702. callback ? callback() : ''
  23703. })
  23704. setTimeout(() => {
  23705. _this.setTipsIndex()
  23706. }, 500)
  23707. return;
  23708. }
  23709. let _allText = "";
  23710. let _mdText = "";
  23711. this.allTextArray[_tindex2] = ""
  23712. let _iindex = 0
  23713. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  23714. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  23715. let _eData = JSON.parse(_e.data).content;
  23716. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23717. //对话已经完成
  23718. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23719. this.isTeacherTaskCancelSource[_tindex2].close();
  23720. this.isTeacherTaskCancelSource[_tindex2] = null;
  23721. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23722. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23723. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23724. }
  23725. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23726. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23727. }
  23728. this.isTeacherTaskCancelToken2[_tindex2] = null
  23729. callback ? callback() : ''
  23730. // this.createTeacherAn(_tindex2, 2);
  23731. this.saveCourse()
  23732. return;
  23733. } else {
  23734. _iindex++
  23735. //对话还在继续
  23736. let _text = "";
  23737. _text = _eData.replaceAll("'", "");
  23738. if (_allText == "") {
  23739. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23740. } else {
  23741. _allText += _text;
  23742. }
  23743. _mdText = _allText + "_";
  23744. _mdText = _mdText.replace(/\\n/g, "\n");
  23745. _mdText = _mdText.replace(/\\/g, "");
  23746. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23747. //转化返回的回复流数据
  23748. if(_iindex == 10){
  23749. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23750. _iindex = 0
  23751. }
  23752. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23753. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23754. }
  23755. // 处理流数据
  23756. }
  23757. };
  23758. let _this = this
  23759. _this.isTeacherTaskCancelSource.onerror = function(event) {
  23760. // 处理错误,可以尝试重新连接
  23761. console.log('EventSource error:', event);
  23762. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23763. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23764. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23765. }
  23766. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23767. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23768. }
  23769. _this.isTeacherTaskCancelSource[_tindex2].close();
  23770. _this.isTeacherTaskCancelSource[_tindex2] = null;
  23771. _this.isTeacherTaskCancelToken2[_tindex2] = null
  23772. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23773. confirmButtonText: "确定",
  23774. cancelButtonText: "取消",
  23775. distinguishCancelAndClose: true,
  23776. type: "warning",
  23777. customClass: 'custom-confirm-box'
  23778. })
  23779. .then(() => {
  23780. _this.aiDetail52(msg, _tindex2, callback)
  23781. }).catch((v) => {
  23782. console.log(v);
  23783. callback ? callback() : ''
  23784. })
  23785. setTimeout(() => {
  23786. _this.setTipsIndex()
  23787. }, 500)
  23788. };
  23789. },
  23790. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  23791. let _mdText = "";
  23792. let _eData = JSON.parse(_e.data).content;
  23793. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23794. //对话已经完成
  23795. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23796. _source.close();
  23797. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23798. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23799. return;
  23800. } else {
  23801. //对话还在继续
  23802. let _text = "";
  23803. _text = _eData.replaceAll("'", "");
  23804. if (this.allTextArray[_tindex2] == "") {
  23805. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23806. } else {
  23807. this.allTextArray[_tindex2] += _text;
  23808. }
  23809. _mdText = this.allTextArray[_tindex2] + "_";
  23810. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  23811. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  23812. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  23813. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  23814. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23815. // 处理流数据
  23816. }
  23817. },
  23818. async aiCpote(msg, callback) {
  23819. let _this = this
  23820. let _index = _this.aitype.replace("aiC","c")
  23821. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23822. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23823. if (_this.infoData.length) {
  23824. for (var i = 0; i < _this.infoData.length; i++) {
  23825. if(_this.infoData[i].fileid){
  23826. fileid.push(_this.infoData[i].fileid)
  23827. }else {
  23828. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23829. if(_fileid){
  23830. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23831. _this.$forceUpdate();
  23832. if(_fileid != 1){
  23833. fileid.push(_fileid)
  23834. }
  23835. }
  23836. }
  23837. }
  23838. }
  23839. let sub = []
  23840. if (this.courseTypeId.length) {
  23841. for (var i = 0; i < this.courseTypeId.length; i++) {
  23842. let _sid = this.courseTypeId[i]
  23843. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23844. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23845. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23846. }
  23847. }
  23848. }
  23849. }
  23850. let mclass = []
  23851. if (this.courseTypeId.length) {
  23852. for (var i = 0; i < this.courseTypeId.length; i++) {
  23853. let _sid = this.courseTypeId[i]
  23854. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23855. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23856. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23857. }
  23858. }
  23859. }
  23860. }
  23861. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  23862. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  23863. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  23864. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  23865. let messages = `NOTICE
  23866. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23867. Language: ${this.getLang()}
  23868. ATTENTION: follow "Language"
  23869. ${msg}
  23870. ## 课程简介
  23871. 课程名字:${this.courseName}
  23872. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23873. ${sub.length ? '学科:' + sub.join(",") : ''}
  23874. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23875. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23876. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  23877. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  23878. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  23879. _this.cpoteLoading[_index] = true
  23880. _this.cpotetLoading[_index] = true
  23881. let _uuid = uuidv4();
  23882. // let params = JSON.stringify({
  23883. // // "model": "Chat",
  23884. // model: 'gpt-3.5-turbo',
  23885. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23886. // max_tokens: 4096,
  23887. // top_p: 1,
  23888. // frequency_penalty: 0,
  23889. // presence_penalty: 0,
  23890. // messages: [{
  23891. // content: messages,
  23892. // role: 'user'
  23893. // }],
  23894. // uid: _uuid,
  23895. // mind_map_question: "",
  23896. // })
  23897. let params = {
  23898. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23899. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23900. session_name: _uuid,
  23901. userId: _this.userid,
  23902. uid: _uuid,
  23903. file_ids: fileid.length ? [...fileid] : '',
  23904. model: 'gpt-4o-2024-11-20',
  23905. temperature: this.mode == 3 ? 0.5 : 0.1,
  23906. }
  23907. // let params = JSON.stringify({
  23908. // message: {
  23909. // anthropic_version: "bedrock-2023-05-31",
  23910. // max_tokens: 4096,
  23911. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23912. // top_p: 1,
  23913. // messages: [{
  23914. // "role": "user",
  23915. // "content": messages
  23916. // }] ,
  23917. // },
  23918. // uid: _uuid,
  23919. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23920. // });
  23921. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23922. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23923. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23924. console.log(response);
  23925. // let data = response.data.FunctionResponse
  23926. // if (data.choices && data.choices.length && data.choices[0].message) {
  23927. // console.log(data.choices[0].message.content);
  23928. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23929. // _this.$forceUpdate()
  23930. // }
  23931. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23932. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23933. } else {
  23934. _this.$message.warning(response.data.FunctionResponse.result);
  23935. }
  23936. }).catch(function (error) {
  23937. _this.cpoteLoading[_index] = false
  23938. _this.cpotetLoading[_index] = false
  23939. callback ? callback() : ''
  23940. if(error && error.message != 'Request canceled by the user.'){
  23941. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23942. }
  23943. console.log(error);
  23944. });
  23945. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  23946. },
  23947. aiCpotegetAiContent(_uid, loading, callback) {
  23948. let _source;
  23949. try {
  23950. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23951. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23952. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23953. } catch(error){
  23954. console.log('EventSource error:', error);
  23955. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23956. this.cpoteLoading[loading] = false
  23957. this.cpotetLoading[loading] = false
  23958. return;
  23959. }
  23960. let _allText = "";
  23961. let _mdText = "";
  23962. let _iindex = 0
  23963. _source.onmessage = _e => {
  23964. let _eData = JSON.parse(_e.data).content;
  23965. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23966. //对话已经完成
  23967. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23968. _source.close();
  23969. this.cpote[loading] = _mdText;
  23970. this.cpoteLoading[loading] = false
  23971. this.cpotetLoading[loading] = false
  23972. callback ? callback() : ''
  23973. this.saveCourse()
  23974. return;
  23975. } else {
  23976. _iindex++
  23977. //对话还在继续
  23978. let _text = "";
  23979. _text = _eData.replaceAll("'", "");
  23980. if (_allText == "") {
  23981. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23982. } else {
  23983. _allText += _text;
  23984. }
  23985. _mdText = _allText + "_";
  23986. _mdText = _mdText.replace(/\\n/g, "\n");
  23987. _mdText = _mdText.replace(/\\/g, "");
  23988. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23989. //转化返回的回复流数据
  23990. if(_iindex == 10){
  23991. this.cpote[loading] = _mdText;
  23992. _iindex = 0
  23993. }
  23994. this.cpoteLoading[loading] = false
  23995. // 处理流数据
  23996. }
  23997. // this.$forceUpdate();
  23998. };
  23999. let _this = this
  24000. _source.onerror = function(event) {
  24001. // 处理错误,可以尝试重新连接
  24002. console.log('EventSource error:', event);
  24003. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24004. _this.cpoteLoading[loading] = false
  24005. _this.cpotetLoading[loading] = false
  24006. _source.close();
  24007. };
  24008. },
  24009. async aiteacherTextDetail(msg) {
  24010. let _this = this
  24011. let fileid = []
  24012. if (_this.teacherInfoData.length) {
  24013. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  24014. if(_this.teacherInfoData[i].fileid){
  24015. fileid.push(_this.teacherInfoData[i].fileid)
  24016. }else {
  24017. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  24018. if(_fileid){
  24019. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24020. _this.$forceUpdate();
  24021. if(_fileid != 1){
  24022. fileid.push(_fileid)
  24023. }
  24024. }
  24025. }
  24026. }
  24027. }
  24028. _this.teacherTextLoading = true
  24029. _this.tteacherTextLoading = true
  24030. let sub = []
  24031. if (_this.courseTypeId.length) {
  24032. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24033. let _sid = _this.courseTypeId[i]
  24034. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24035. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24036. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24037. }
  24038. }
  24039. }
  24040. }
  24041. let mclass = []
  24042. if (_this.courseTypeId.length) {
  24043. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24044. let _sid = _this.courseTypeId[i]
  24045. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24046. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24047. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24048. }
  24049. }
  24050. }
  24051. }
  24052. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  24053. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  24054. let messages = `NOTICE
  24055. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24056. Language: ${this.getLang()}
  24057. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24058. Instruction: Based on the context, follow "Format example", write content.
  24059. #Context
  24060. ## 参考资料
  24061. 课程名字:${this.courseName}
  24062. ${sub.length ? '学科:' + sub.join(",") : ''}
  24063. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24064. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  24065. ## 要求
  24066. ${msg}
  24067. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24068. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  24069. let _uuid = uuidv4();
  24070. // let params = JSON.stringify({
  24071. // // "model": "Chat",
  24072. // model: 'gpt-3.5-turbo',
  24073. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24074. // max_tokens: 4096,
  24075. // top_p: 1,
  24076. // frequency_penalty: 0,
  24077. // presence_penalty: 0,
  24078. // messages: [{
  24079. // content: messages,
  24080. // role: 'user'
  24081. // }],
  24082. // uid: _uuid,
  24083. // mind_map_question: "",
  24084. // })
  24085. let params = {
  24086. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24087. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24088. session_name: _uuid,
  24089. userId: _this.userid,
  24090. uid: _uuid,
  24091. file_ids: fileid.length ? [...fileid] : '',
  24092. model: 'gpt-4o-2024-11-20',
  24093. temperature: this.mode == 3 ? 0.5 : 0.1,
  24094. }
  24095. // let params = JSON.stringify({
  24096. // message: {
  24097. // anthropic_version: "bedrock-2023-05-31",
  24098. // max_tokens: 4096,
  24099. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24100. // top_p: 1,
  24101. // messages: [{
  24102. // "role": "user",
  24103. // "content": messages
  24104. // }] ,
  24105. // },
  24106. // uid: _uuid,
  24107. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24108. // });
  24109. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24110. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  24111. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24112. console.log(response);
  24113. // let data = response.data.FunctionResponse
  24114. // if (data.choices && data.choices.length && data.choices[0].message) {
  24115. // _this.courseText = data.choices[0].message.content
  24116. // }
  24117. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24118. } else {
  24119. _this.$message.warning(response.data.FunctionResponse.result);
  24120. }
  24121. _this.isTeacherTextCancelToken = null
  24122. }).catch(function (error) {
  24123. _this.teacherTextLoading = false
  24124. _this.tteacherTextLoading = false
  24125. _this.isTeacherTextCancelToken = null
  24126. if(error && error.message != 'Request canceled by the user.'){
  24127. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24128. }
  24129. console.log(error);
  24130. });
  24131. await _this.aiteacherTextDetailgetAiContent(_uuid)
  24132. },
  24133. aiteacherTextDetailgetAiContent(_uid) {
  24134. try {
  24135. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24136. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24137. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24138. } catch(error) {
  24139. console.log('EventSource error:', event);
  24140. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24141. this.teacherTextLoading = false
  24142. this.tteacherTextLoading = false
  24143. this.isTeacherTextCancelToken = null
  24144. return;
  24145. }
  24146. let _allText = "";
  24147. let _mdText = "";
  24148. let _iindex = 0
  24149. this.isTeacherTextCancelSource.onmessage = _e => {
  24150. let _eData = JSON.parse(_e.data).content;
  24151. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24152. //对话已经完成
  24153. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24154. this.isTeacherTextCancelSource.close();
  24155. this.isTeacherTextCancelSource = null;
  24156. this.teacherCourseText = _mdText;
  24157. this.teacherTextLoading = false
  24158. this.tteacherTextLoading = false
  24159. this.teacherCourseTextB = false
  24160. this.isTeacherTextCancelToken = null
  24161. return;
  24162. } else {
  24163. _iindex++
  24164. //对话还在继续
  24165. let _text = "";
  24166. _text = _eData.replaceAll("'", "");
  24167. if (_allText == "") {
  24168. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24169. } else {
  24170. _allText += _text;
  24171. }
  24172. _mdText = _allText + "_";
  24173. _mdText = _mdText.replace(/\\n/g, "\n");
  24174. _mdText = _mdText.replace(/\\/g, "");
  24175. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24176. //转化返回的回复流数据
  24177. if(_iindex == 10){
  24178. this.teacherCourseText = _mdText;
  24179. _iindex = 0
  24180. }
  24181. if(this.teacherTextLoading){
  24182. this.teacherTextLoading = false
  24183. }
  24184. // 处理流数据
  24185. }
  24186. // this.$forceUpdate();
  24187. };
  24188. let _this = this
  24189. this.isTeacherTextCancelSource.onerror = function(event) {
  24190. // 处理错误,可以尝试重新连接
  24191. console.log('EventSource error:', event);
  24192. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24193. _this.teacherTextLoading = false
  24194. _this.tteacherTextLoading = false
  24195. _this.isTeacherTextCancelToken = null
  24196. _this.isTeacherTextCancelSource.close();
  24197. _this.isTeacherTextCancelSource = null;
  24198. };
  24199. },
  24200. async aitargetTextDetail(msg) {
  24201. let _this = this
  24202. let fileid = []
  24203. if (_this.teacherInfoData.length) {
  24204. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  24205. if(_this.teacherInfoData[i].fileid){
  24206. fileid.push(_this.teacherInfoData[i].fileid)
  24207. }else {
  24208. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  24209. if(_fileid){
  24210. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24211. _this.$forceUpdate();
  24212. if(_fileid != 1){
  24213. fileid.push(_fileid)
  24214. }
  24215. }
  24216. }
  24217. }
  24218. }
  24219. _this.targetTextLoading = true
  24220. _this.ttargetTextLoading = true
  24221. let sub = []
  24222. if (_this.courseTypeId.length) {
  24223. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24224. let _sid = _this.courseTypeId[i]
  24225. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24226. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24227. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24228. }
  24229. }
  24230. }
  24231. }
  24232. let mclass = []
  24233. if (_this.courseTypeId.length) {
  24234. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24235. let _sid = _this.courseTypeId[i]
  24236. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24237. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24238. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24239. }
  24240. }
  24241. }
  24242. }
  24243. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  24244. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  24245. let messages = `NOTICE
  24246. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24247. Language: ${this.getLang()}
  24248. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24249. Instruction: Based on the context, follow "Format example", write content.
  24250. #Context
  24251. ## 参考资料
  24252. 课程名字:${this.courseName}
  24253. ${sub.length ? '学科:' + sub.join(",") : ''}
  24254. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24255. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24256. ## 要求
  24257. ${msg}
  24258. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24259. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  24260. let _uuid = uuidv4();
  24261. // let params = JSON.stringify({
  24262. // // "model": "Chat",
  24263. // model: 'gpt-3.5-turbo',
  24264. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24265. // max_tokens: 4096,
  24266. // top_p: 1,
  24267. // frequency_penalty: 0,
  24268. // presence_penalty: 0,
  24269. // messages: [{
  24270. // content: messages,
  24271. // role: 'user'
  24272. // }],
  24273. // uid: _uuid,
  24274. // mind_map_question: "",
  24275. // })
  24276. let params = {
  24277. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24278. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24279. session_name: _uuid,
  24280. userId: _this.userid,
  24281. uid: _uuid,
  24282. file_ids: fileid.length ? [...fileid] : '',
  24283. model: 'gpt-4o-2024-11-20',
  24284. temperature: this.mode == 3 ? 0.5 : 0.1,
  24285. }
  24286. // let params = JSON.stringify({
  24287. // message: {
  24288. // anthropic_version: "bedrock-2023-05-31",
  24289. // max_tokens: 4096,
  24290. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24291. // top_p: 1,
  24292. // messages: [{
  24293. // "role": "user",
  24294. // "content": messages
  24295. // }] ,
  24296. // },
  24297. // uid: _uuid,
  24298. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24299. // });
  24300. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24301. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  24302. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24303. console.log(response);
  24304. // let data = response.data.FunctionResponse
  24305. // if (data.choices && data.choices.length && data.choices[0].message) {
  24306. // _this.courseText = data.choices[0].message.content
  24307. // }
  24308. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24309. } else {
  24310. _this.$message.warning(response.data.FunctionResponse.result);
  24311. }
  24312. _this.isTargetCancelToken1 = null
  24313. }).catch(function (error) {
  24314. _this.targetTextLoading = false
  24315. _this.ttargetTextLoading = false
  24316. _this.isTargetCancelToken1 = null
  24317. if(error && error.message != 'Request canceled by the user.'){
  24318. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24319. }
  24320. console.log(error);
  24321. });
  24322. await _this.aitargetTextDetailgetAiContent(_uuid)
  24323. },
  24324. aitargetTextDetailgetAiContent(_uid) {
  24325. try {
  24326. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24327. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24328. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24329. } catch (error) {
  24330. console.log('EventSource error:', error);
  24331. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24332. this.targetTextLoading = false
  24333. this.ttargetTextLoading = false
  24334. this.isTargetCancelToken1 = null
  24335. return;
  24336. }
  24337. let _allText = "";
  24338. let _mdText = "";
  24339. let _iindex = 0
  24340. this.isTargetCancelSource1.onmessage = _e => {
  24341. let _eData = JSON.parse(_e.data).content;
  24342. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24343. //对话已经完成
  24344. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24345. this.isTargetCancelSource1.close();
  24346. this.isTargetCancelSource1 = null;
  24347. this.targetCourseText = _mdText;
  24348. this.targetTextLoading = false
  24349. this.ttargetTextLoading = false
  24350. this.targetCourseTextB = false
  24351. this.isTargetCancelToken1 = null
  24352. return;
  24353. } else {
  24354. _iindex++
  24355. //对话还在继续
  24356. let _text = "";
  24357. _text = _eData.replaceAll("'", "");
  24358. if (_allText == "") {
  24359. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24360. } else {
  24361. _allText += _text;
  24362. }
  24363. _mdText = _allText + "_";
  24364. _mdText = _mdText.replace(/\\n/g, "\n");
  24365. _mdText = _mdText.replace(/\\/g, "");
  24366. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24367. //转化返回的回复流数据
  24368. if(_iindex == 10){
  24369. this.targetCourseText = _mdText;
  24370. _iindex = 0
  24371. }
  24372. if(this.targetTextLoading){
  24373. this.targetTextLoading = false
  24374. }
  24375. // 处理流数据
  24376. }
  24377. // this.$forceUpdate();
  24378. };
  24379. let _this = this
  24380. this.isTargetCancelSource1.onerror = function(event) {
  24381. // 处理错误,可以尝试重新连接
  24382. console.log('EventSource error:', event);
  24383. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24384. _this.targetTextLoading = false
  24385. _this.ttargetTextLoading = false
  24386. _this.isTargetCancelToken1 = null
  24387. _this.isTargetCancelSource1.close();
  24388. _this.isTargetCancelSource1 = null;
  24389. };
  24390. },
  24391. async aitargetTextDetail2(msg) {
  24392. let _this = this
  24393. let fileid = []
  24394. if(_this.mubiaoInfoData.length){
  24395. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24396. if(_this.mubiaoInfoData[i].fileid){
  24397. fileid.push(_this.mubiaoInfoData[i].fileid)
  24398. }else {
  24399. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24400. if(_fileid){
  24401. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24402. _this.$forceUpdate();
  24403. if(_fileid != 1){
  24404. fileid.push(_fileid)
  24405. }
  24406. }
  24407. }
  24408. }
  24409. }
  24410. _this.targetTextLoading2 = true
  24411. _this.ttargetTextLoading2 = true
  24412. let sub = []
  24413. if (_this.courseTypeId.length) {
  24414. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24415. let _sid = _this.courseTypeId[i]
  24416. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24417. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24418. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24419. }
  24420. }
  24421. }
  24422. }
  24423. let mclass = []
  24424. if (_this.courseTypeId.length) {
  24425. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24426. let _sid = _this.courseTypeId[i]
  24427. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24428. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24429. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24430. }
  24431. }
  24432. }
  24433. }
  24434. if(sub.length){
  24435. let _fileid = _this.importFileid(sub)
  24436. fileid = [...fileid, ..._fileid]
  24437. }
  24438. let messages = `NOTICE
  24439. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24440. Language: ${this.getLang()}
  24441. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24442. Instruction: Based on the context, follow "Format example", write content.
  24443. #Context
  24444. ## 参考资料
  24445. 课程标题:${this.courseName}
  24446. ${sub.length ? '学科:' + sub.join(",") : ''}
  24447. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24448. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24449. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24450. ## 要求
  24451. ${msg}
  24452. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24453. let _uuid = uuidv4();
  24454. // let params = JSON.stringify({
  24455. // // "model": "Chat",
  24456. // model: 'gpt-3.5-turbo',
  24457. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24458. // max_tokens: 4096,
  24459. // top_p: 1,
  24460. // frequency_penalty: 0,
  24461. // presence_penalty: 0,
  24462. // messages: [{
  24463. // content: messages,
  24464. // role: 'user'
  24465. // }],
  24466. // uid: _uuid,
  24467. // mind_map_question: "",
  24468. // })
  24469. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24470. let params = {
  24471. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24472. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24473. session_name: _uuid,
  24474. userId: _this.userid,
  24475. uid: _uuid,
  24476. file_ids: fileid.length ? [...fileid] : '',
  24477. model: 'gpt-4o-2024-11-20',
  24478. temperature: this.mode == 3 ? 0.5 : 0.1,
  24479. }
  24480. // let params = JSON.stringify({
  24481. // message: {
  24482. // anthropic_version: "bedrock-2023-05-31",
  24483. // max_tokens: 4096,
  24484. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24485. // top_p: 1,
  24486. // messages: [{
  24487. // "role": "user",
  24488. // "content": messages
  24489. // }] ,
  24490. // },
  24491. // uid: _uuid,
  24492. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24493. // });
  24494. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24495. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24496. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24497. console.log(response);
  24498. // let data = response.data.FunctionResponse
  24499. // if (data.choices && data.choices.length && data.choices[0].message) {
  24500. // _this.courseText = data.choices[0].message.content
  24501. // }
  24502. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24503. } else {
  24504. _this.$message.warning(response.data.FunctionResponse.result);
  24505. }
  24506. _this.isTargetCancelToken2 = null
  24507. }).catch(function (error) {
  24508. _this.targetTextLoading2 = false
  24509. _this.ttargetTextLoading2 = false
  24510. _this.isTargetCancelToken2 = null
  24511. if(error && error.message != 'Request canceled by the user.'){
  24512. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24513. }
  24514. console.log(error);
  24515. });
  24516. await _this.aitargetTextDetail2getAiContent(_uuid)
  24517. },
  24518. importFileid(sub){
  24519. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  24520. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  24521. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  24522. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  24523. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  24524. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  24525. let _sub = converter(sub.join(","))
  24526. let fileid = []
  24527. for(var i = 0; i < this.fileidArray.length; i++){
  24528. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  24529. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  24530. fileid.push(this.fileidArray[i].fileid)
  24531. }
  24532. }
  24533. }
  24534. return fileid
  24535. },
  24536. selectFileid(){
  24537. let params = {
  24538. oid: this.oid,
  24539. };
  24540. this.ajax
  24541. .get(this.$store.state.api + "selectFileid", params)
  24542. .then((res) => {
  24543. this.fileidArray = res.data[0]
  24544. if(res.data[1].length){
  24545. this.fileidArray = res.data[1]
  24546. }
  24547. if(res.data[2].length){
  24548. this.fileidArray = res.data[2]
  24549. }
  24550. })
  24551. .catch((err) => {
  24552. console.error(err);
  24553. });
  24554. },
  24555. selectAiFileid(){
  24556. let params = {
  24557. oid: this.oid,
  24558. };
  24559. this.ajax
  24560. .get(this.$store.state.api + "selectAiFileid", params)
  24561. .then((res) => {
  24562. let fileIds = []
  24563. for(var i = 0; i < res.data[0].length; i++){
  24564. fileIds.push(res.data[0][i].fileid)
  24565. }
  24566. this.fileIds = fileIds
  24567. if(res.data[1].length){
  24568. fileIds = []
  24569. for(var i = 0; i < res.data[1].length; i++){
  24570. fileIds.push(res.data[0][i].fileid)
  24571. }
  24572. this.fileIds = fileIds
  24573. }
  24574. if(res.data[2].length){
  24575. fileIds = []
  24576. for(var i = 0; i < res.data[2].length; i++){
  24577. fileIds.push(res.data[0][i].fileid)
  24578. }
  24579. this.fileIds = fileIds
  24580. }
  24581. })
  24582. .catch((err) => {
  24583. console.error(err);
  24584. });
  24585. },
  24586. selectKnowFileid(){
  24587. let params = {
  24588. oid: this.oid,
  24589. sta: 'cn'
  24590. };
  24591. this.ajax
  24592. .get(this.$store.state.api + "selectKnowFileid", params)
  24593. .then((res) => {
  24594. this.knowFileArray = res.data[0]
  24595. if(res.data[1].length){
  24596. this.knowFileArray = res.data[1]
  24597. }
  24598. if(res.data[2].length){
  24599. this.knowFileArray = res.data[2]
  24600. }
  24601. })
  24602. .catch((err) => {
  24603. console.error(err);
  24604. });
  24605. },
  24606. async aitargetTextDetail22(msg,msg2) {
  24607. let _this = this
  24608. let fileid = []
  24609. _this.targetTextLoading2 = true
  24610. _this.ttargetTextLoading2 = true
  24611. let sub = []
  24612. if (_this.courseTypeId.length) {
  24613. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24614. let _sid = _this.courseTypeId[i]
  24615. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24616. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24617. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24618. }
  24619. }
  24620. }
  24621. }
  24622. let mclass = []
  24623. if (_this.courseTypeId.length) {
  24624. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24625. let _sid = _this.courseTypeId[i]
  24626. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24627. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24628. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24629. }
  24630. }
  24631. }
  24632. }
  24633. if(!msg2 && sub.length){
  24634. // let _fileid = _this.importFileid(sub)
  24635. // fileid = [...fileid, ..._fileid]
  24636. }
  24637. let messages = `NOTICE
  24638. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24639. Language: ${this.getLang()}
  24640. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24641. Instruction: Based on the context, follow "Format example", write content.
  24642. #Context
  24643. ## 参考资料
  24644. 课程标题:${this.courseName}
  24645. ${sub.length ? '学科:' + sub.join(",") : ''}
  24646. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24647. 课程目标:${msg2}
  24648. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24649. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24650. ## 要求
  24651. ${msg}
  24652. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24653. let _uuid = uuidv4();
  24654. // let params = JSON.stringify({
  24655. // // "model": "Chat",
  24656. // model: 'gpt-3.5-turbo',
  24657. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24658. // max_tokens: 4096,
  24659. // top_p: 1,
  24660. // frequency_penalty: 0,
  24661. // presence_penalty: 0,
  24662. // messages: [{
  24663. // content: messages,
  24664. // role: 'user'
  24665. // }],
  24666. // uid: _uuid,
  24667. // mind_map_question: "",
  24668. // })
  24669. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24670. let params = {
  24671. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  24672. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24673. session_name: _uuid,
  24674. userId: _this.userid,
  24675. uid: _uuid,
  24676. file_ids: fileid.length ? [...fileid] : '',
  24677. model: 'gpt-4o-2024-11-20',
  24678. temperature: this.mode == 3 ? 0.5 : 0.1,
  24679. }
  24680. // let params = JSON.stringify({
  24681. // message: {
  24682. // anthropic_version: "bedrock-2023-05-31",
  24683. // max_tokens: 4096,
  24684. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24685. // top_p: 1,
  24686. // messages: [{
  24687. // "role": "user",
  24688. // "content": messages
  24689. // }] ,
  24690. // },
  24691. // uid: _uuid,
  24692. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24693. // });
  24694. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24695. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24696. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24697. console.log(response);
  24698. // let data = response.data.FunctionResponse
  24699. // if (data.choices && data.choices.length && data.choices[0].message) {
  24700. // _this.courseText = data.choices[0].message.content
  24701. // }
  24702. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24703. } else {
  24704. _this.$message.warning(response.data.FunctionResponse.result);
  24705. }
  24706. _this.isTargetCancelToken2 = null
  24707. }).catch(function (error) {
  24708. _this.targetTextLoading2 = false
  24709. _this.ttargetTextLoading2 = false
  24710. _this.isTargetCancelToken2 = null
  24711. if(error && error.message != 'Request canceled by the user.'){
  24712. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24713. }
  24714. console.log(error);
  24715. });
  24716. await _this.aitargetTextDetail2getAiContent(_uuid)
  24717. },
  24718. aitargetTextDetail2getAiContent(_uid) {
  24719. try {
  24720. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24721. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24722. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24723. } catch(error) {
  24724. console.log('EventSource error:', error);
  24725. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24726. this.targetTextLoading2 = false
  24727. this.ttargetTextLoading2 = false
  24728. this.isTargetCancelToken2 = null
  24729. return;
  24730. }
  24731. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  24732. let _allText = "";
  24733. let _mdText = "";
  24734. let _iindex = 0
  24735. this.isTargetCancelSource2.onmessage = _e => {
  24736. let _eData = JSON.parse(_e.data).content;
  24737. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24738. //对话已经完成
  24739. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24740. this.isTargetCancelSource2.close();
  24741. this.isTargetCancelSource2 = null;
  24742. this.targetCourseText2 = text1+' \n '+_mdText;
  24743. this.targetTextLoading2 = false
  24744. this.ttargetTextLoading2 = false
  24745. this.targetCourseText2B = false
  24746. this.isTargetCancelToken2 = null
  24747. this.saveCourse()
  24748. return;
  24749. } else {
  24750. _iindex++
  24751. //对话还在继续
  24752. let _text = "";
  24753. _text = _eData.replaceAll("'", "");
  24754. if (_allText == "") {
  24755. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24756. } else {
  24757. _allText += _text;
  24758. }
  24759. _mdText = _allText + "_";
  24760. _mdText = _mdText.replace(/\\n/g, "\n");
  24761. _mdText = _mdText.replace(/\\/g, "");
  24762. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24763. //转化返回的回复流数据
  24764. if(_iindex == 10){
  24765. this.targetCourseText2 = text1+' \n '+_mdText;
  24766. _iindex = 0
  24767. }
  24768. if(this.targetTextLoading2){
  24769. this.targetTextLoading2 = false
  24770. }
  24771. // 处理流数据
  24772. }
  24773. // this.$forceUpdate();
  24774. };
  24775. let _this = this
  24776. this.isTargetCancelSource2.onerror = function(event) {
  24777. // 处理错误,可以尝试重新连接
  24778. console.log('EventSource error:', event);
  24779. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24780. _this.targetTextLoading2 = false
  24781. _this.ttargetTextLoading2 = false
  24782. _this.isTargetCancelToken2 = null
  24783. _this.isTargetCancelSource2.close();
  24784. _this.isTargetCancelSource2 = null;
  24785. };
  24786. },
  24787. async aitargetTextDetail3(msg) {
  24788. let _this = this
  24789. let fileid = []
  24790. if(_this.mubiaoInfoData.length){
  24791. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24792. if(_this.mubiaoInfoData[i].fileid){
  24793. fileid.push(_this.mubiaoInfoData[i].fileid)
  24794. }else {
  24795. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24796. if(_fileid){
  24797. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24798. _this.$forceUpdate();
  24799. if(_fileid != 1){
  24800. fileid.push(_fileid)
  24801. }
  24802. }
  24803. }
  24804. }
  24805. }
  24806. _this.targetTextLoading2 = true
  24807. _this.ttargetTextLoading2 = true
  24808. let sub = []
  24809. if (_this.courseTypeId.length) {
  24810. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24811. let _sid = _this.courseTypeId[i]
  24812. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24813. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24814. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24815. }
  24816. }
  24817. }
  24818. }
  24819. let mclass = []
  24820. if (_this.courseTypeId.length) {
  24821. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24822. let _sid = _this.courseTypeId[i]
  24823. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24824. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24825. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24826. }
  24827. }
  24828. }
  24829. }
  24830. // if(sub.length){
  24831. // let _fileid = _this.importFileid(sub)
  24832. // fileid = [...fileid, ..._fileid]
  24833. // }
  24834. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24835. if (_this.infoData.length) {
  24836. for (var i = 0; i < _this.infoData.length; i++) {
  24837. if(_this.infoData[i].fileid){
  24838. fileid.push(_this.infoData[i].fileid)
  24839. }else {
  24840. let _fileid = await _this.createFileid(_this.infoData[i].url)
  24841. if(_fileid){
  24842. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  24843. _this.$forceUpdate();
  24844. if(_fileid != 1){
  24845. fileid.push(_fileid)
  24846. }
  24847. }
  24848. }
  24849. }
  24850. }
  24851. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24852. let messages = `Language: ${this.getLang()}
  24853. ${msg}
  24854. ## 课程信息
  24855. 课程名字:${this.courseName}
  24856. 课程概况:${this.courseText}
  24857. ${sub.length ? '学科:' + sub.join(",") : ''}
  24858. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  24859. let _uuid = uuidv4();
  24860. // let params = JSON.stringify({
  24861. // // "model": "Chat",
  24862. // model: 'gpt-3.5-turbo',
  24863. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24864. // max_tokens: 4096,
  24865. // top_p: 1,
  24866. // frequency_penalty: 0,
  24867. // presence_penalty: 0,
  24868. // messages: [{
  24869. // content: messages,
  24870. // role: 'user'
  24871. // }],
  24872. // uid: _uuid,
  24873. // mind_map_question: "",
  24874. // })
  24875. let params = {
  24876. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24877. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24878. session_name: _uuid,
  24879. userId: _this.userid,
  24880. uid: _uuid,
  24881. file_ids: fileid.length ? [...fileid] : '',
  24882. model: 'gpt-4o-2024-11-20',
  24883. temperature: this.mode == 3 ? 0.5 : 0.1,
  24884. }
  24885. // let params = JSON.stringify({
  24886. // message: {
  24887. // anthropic_version: "bedrock-2023-05-31",
  24888. // max_tokens: 4096,
  24889. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24890. // top_p: 1,
  24891. // messages: [{
  24892. // "role": "user",
  24893. // "content": messages
  24894. // }] ,
  24895. // },
  24896. // uid: _uuid,
  24897. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24898. // });
  24899. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24900. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  24901. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24902. console.log(response);
  24903. // let data = response.data.FunctionResponse
  24904. // if (data.choices && data.choices.length && data.choices[0].message) {
  24905. // _this.courseText = data.choices[0].message.content
  24906. // }
  24907. console.log(response);
  24908. let data = response.data.FunctionResponse
  24909. // if (data.choices && data.choices.length && data.choices[0].message) {
  24910. // console.log(data.choices[0].message.content);
  24911. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  24912. // _this.$forceUpdate()
  24913. // }
  24914. if (data.message) {
  24915. console.log('返回回来的目标:',data.message);
  24916. _this.targetCourseText2 = data.message
  24917. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  24918. }
  24919. _this.isTargetCancelToken2 = null
  24920. }).catch(function (error) {
  24921. _this.targetTextLoading2 = false
  24922. _this.ttargetTextLoading2 = false
  24923. _this.isTargetCancelToken2 = null
  24924. if(error && error.message != 'Request canceled by the user.'){
  24925. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24926. }
  24927. console.log(error);
  24928. });
  24929. },
  24930. againEva(msg, i, k) {
  24931. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  24932. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  24933. return;
  24934. }
  24935. if (this.ruleLoading[i]) {
  24936. this.ruleLoading[i][k] = true
  24937. } else {
  24938. this.ruleLoading[i] = []
  24939. this.ruleLoading[i][k] = true
  24940. }
  24941. let message = `NOTICE
  24942. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  24943. Language: ${this.getLang()}
  24944. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24945. Instruction: Based on the context, follow "Format example", write content.
  24946. #Context
  24947. ##要求
  24948. ${msg}
  24949. ##制定标准资料
  24950. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  24951. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  24952. # Format example
  24953. ==
  24954. 0 星,作业内容与作业要求无关;
  24955. 1 星,没有识别问题和需求;
  24956. 2 星,问题或需求没有被清晰理解或准确识别;
  24957. 3 星,问题或需求的一部分被识别;
  24958. 4 星,问题或需求的大部分被识别;
  24959. 5 星,问题或需求都被识别。
  24960. ==
  24961. `
  24962. // let params = {
  24963. // // "model": "Chat",
  24964. // model: 'gpt-4o-2024-11-20',
  24965. // // model: "gpt-4o",
  24966. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24967. // max_tokens: 4096,
  24968. // top_p: 1,
  24969. // frequency_penalty: 0,
  24970. // presence_penalty: 0,
  24971. // messages: [
  24972. // {
  24973. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  24974. // role: "user"
  24975. // }
  24976. // ],
  24977. // stream: false,
  24978. // uid: this.userid,
  24979. // mind_map_question: ""
  24980. // };
  24981. // this.ajax
  24982. // .post("https://gpt4.cocorobo.cn/chat", params)
  24983. // .then(response => {
  24984. // let data = response.data.FunctionResponse;
  24985. // console.log("data", data);
  24986. // if (data.choices && data.choices.length && data.choices[0].message) {
  24987. // let content = data.choices[0].message.content;
  24988. // var regex = new RegExp('==([^=]+)==');
  24989. // let match = content.match(regex);
  24990. // if (match) {
  24991. // content = match[1].trim().replaceAll(' ', '');
  24992. // // 获取匹配到的内容并去除两端空格
  24993. // console.log('contentInsideDoubleEquals', content);
  24994. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24995. // console.log("未有星级。");
  24996. // this.againEva(msg, i, k)
  24997. // return
  24998. // }
  24999. // //  return
  25000. // } else {
  25001. // console.log("未找到匹配的内容。");
  25002. // this.againEva(msg, i, k)
  25003. // return
  25004. // }
  25005. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  25006. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25007. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25008. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  25009. // this.$forceUpdate();
  25010. // this.ruleLoading[i][k] = false
  25011. // }else{
  25012. // this.ruleLoading[i][k] = false
  25013. // }
  25014. // })
  25015. // .catch(error => {
  25016. // console.log(error);
  25017. // this.ruleLoading[i][k] = false
  25018. // });
  25019. let parm = {
  25020. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  25021. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  25022. session_name: uuidv4(),
  25023. userId: this.userid,
  25024. file_ids: [],
  25025. model: 'gpt-4o-2024-11-20',
  25026. temperature: this.mode == 3 ? 0.5 : 0.1,
  25027. }
  25028. this.ajax
  25029. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  25030. .then(async (response) => {
  25031. console.log(response);
  25032. let data = response.data.FunctionResponse
  25033. if (data.message) {
  25034. console.log(data.message);
  25035. let content = data.message;
  25036. var regex = new RegExp('==([^=]+)==');
  25037. let match = content.match(regex);
  25038. if (match) {
  25039. content = match[1].trim().replaceAll(' ', '');
  25040. // 获取匹配到的内容并去除两端空格
  25041. console.log('contentInsideDoubleEquals', content);
  25042. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  25043. console.log("未有星级。");
  25044. this.againEva(msg, i, k)
  25045. return
  25046. }
  25047. //  return
  25048. } else {
  25049. console.log("未找到匹配的内容。");
  25050. this.againEva(msg, i, k)
  25051. return
  25052. }
  25053. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  25054. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25055. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  25056. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  25057. this.$forceUpdate();
  25058. this.ruleLoading[i][k] = false
  25059. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  25060. }else {
  25061. this.ruleLoading[i][k] = false
  25062. }
  25063. })
  25064. .catch((error) => {
  25065. this.ruleLoading[i][k] = false
  25066. console.log(error);
  25067. });
  25068. },
  25069. async aiSearchFile(messages, callback) {
  25070. let _this = this
  25071. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  25072. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  25073. console.log('fileid=========',fileid)
  25074. // let params = JSON.stringify({
  25075. // // "model": "Chat",
  25076. // model: 'gpt-3.5-turbo',
  25077. // temperature: this.mode == 3 ? 0.5 : 0.1,
  25078. // max_tokens: 4096,
  25079. // top_p: 1,
  25080. // frequency_penalty: 0,
  25081. // presence_penalty: 0,
  25082. // messages: [{
  25083. // content: messages,
  25084. // role: 'user'
  25085. // }],
  25086. // stream: false,
  25087. // uid: this.userid,
  25088. // mind_map_question: "",
  25089. // })
  25090. // // let params = JSON.stringify({
  25091. // // message: {
  25092. // // anthropic_version: "bedrock-2023-05-31",
  25093. // // max_tokens: 4096,
  25094. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  25095. // // top_p: 1,
  25096. // // messages: [{
  25097. // // content: messages,
  25098. // // role: 'user'
  25099. // // }], //
  25100. // // },
  25101. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  25102. // // });
  25103. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  25104. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  25105. // console.log(response);
  25106. // let data = response.data.FunctionResponse
  25107. // if (data.choices && data.choices.length && data.choices[0].message) {
  25108. // console.log(data.choices[0].message.content);
  25109. // let dArray = JSON.parse(data.choices[0].message.content)
  25110. // _this.dArray = dArray
  25111. // _this.unitJson[0].chapterInfo[0].taskJson = []
  25112. // for (var i = 0; i < dArray.length; i++) {
  25113. // let _task = dArray[i]
  25114. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  25115. // task: _task.task,
  25116. // taskDetail: "",
  25117. // taskDetail2: _task.detail,
  25118. // taskDetail3: "",
  25119. // chapterData: [],
  25120. // toolText: "",
  25121. // toolChoose: [
  25122. // {
  25123. // tool: [],
  25124. // toolDetail: "",
  25125. // toolType: 0,
  25126. // askCount: 1,
  25127. // askTitle: "",
  25128. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25129. // },
  25130. // ],
  25131. // isShowTools: false,
  25132. // askCount: 1,
  25133. // isFold: 0,
  25134. // askTitle: "",
  25135. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25136. // checkJson: [{ checkCount: [], checkPerent: [] }],
  25137. // homeworkList: [],
  25138. // })
  25139. // }
  25140. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  25141. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  25142. // _this.$forceUpdate();
  25143. // }
  25144. // // if (data.result) {
  25145. // // console.log(data.result);
  25146. // // let dArray = JSON.parse(data.result)
  25147. // // _this.dArray = dArray
  25148. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  25149. // // for (var i = 0; i < dArray.length; i++) {
  25150. // // let _task = dArray[i]
  25151. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  25152. // // task: _task.task,
  25153. // // taskDetail: "",
  25154. // // taskDetail2: _task.detail,
  25155. // // taskDetail3: "",
  25156. // // chapterData: [],
  25157. // // toolText: "",
  25158. // // toolChoose: [
  25159. // // {
  25160. // // tool: [],
  25161. // // toolDetail: "",
  25162. // // toolType: 0,
  25163. // // askCount: 1,
  25164. // // askTitle: "",
  25165. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25166. // // },
  25167. // // ],
  25168. // // isShowTools: false,
  25169. // // askCount: 1,
  25170. // // isFold: 1,
  25171. // // askTitle: "",
  25172. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25173. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  25174. // // homeworkList: [],
  25175. // // })
  25176. // // }
  25177. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  25178. // // _this.$forceUpdate();
  25179. // // }
  25180. // callback ? callback() : ''
  25181. // }).catch(function (error) {
  25182. // _this.loading = false
  25183. // console.log(error);
  25184. // });
  25185. this.isFileCancelToken = this.ajax.setCancelSource();
  25186. let parm = {
  25187. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  25188. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25189. session_name: uuidv4(),
  25190. userId: this.userid,
  25191. file_ids: fileid.length ? [...fileid] : '',
  25192. model: 'gpt-4o-2024-11-20',
  25193. temperature: this.mode == 3 ? 0.5 : 0.1,
  25194. }
  25195. this.ajax
  25196. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25197. .then((response) => {
  25198. console.log(response);
  25199. let data = response.data.FunctionResponse
  25200. if (data.message) {
  25201. console.log(data.message);
  25202. let dArray = []
  25203. try {
  25204. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  25205. let regex3 = new RegExp('(?<!")content(?!")','g')
  25206. //
  25207. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  25208. } catch (error) {
  25209. // callback ? callback() : ''
  25210. console.log("error_________________" + error);
  25211. try {
  25212. let regex = new RegExp(/```json([\s\S]*?)```/);
  25213. let match = data.message.match(regex);
  25214. dArray = JSON.parse(match[1]);
  25215. } catch (error) {
  25216. // callback ? callback() : ''
  25217. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  25218. console.log("error_________________" + error);
  25219. _this.isFileCancelToken = null;
  25220. _this.aiSearchFile(messages, callback)
  25221. return
  25222. }
  25223. }
  25224. for(let i = 0; i < dArray.length; i++){
  25225. let content = dArray[i].content
  25226. let name = '参考资料'+(i+1)
  25227. let md = new MarkdownIt();
  25228. let _html = content ? md.render(content) : ''
  25229. setTimeout(()=>{
  25230. if(i == (dArray.length - 1)){
  25231. _this.generate2(name, _html, i, callback)
  25232. }else {
  25233. _this.generate2(name, _html, i)
  25234. }
  25235. }, 500 * i)
  25236. }
  25237. _this.isFileCancelToken = null
  25238. _this.$forceUpdate();
  25239. }
  25240. })
  25241. .catch((error) => {
  25242. callback ? callback() : ''
  25243. _this.isFileCancelToken = null
  25244. console.log(error);
  25245. });
  25246. },
  25247. async aiSearchFile2(messages, callback) {
  25248. let _this = this
  25249. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  25250. console.log('fileid=========',fileid)
  25251. this.isFileCancelToken = this.ajax.setCancelSource();
  25252. let parm = {
  25253. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  25254. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25255. session_name: uuidv4(),
  25256. userId: this.userid,
  25257. file_ids: fileid.length ? [...fileid] : '',
  25258. model: 'gpt-4o-2024-11-20',
  25259. temperature: this.mode == 3 ? 0.5 : 0.1,
  25260. }
  25261. this.ajax
  25262. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25263. .then((response) => {
  25264. console.log(response);
  25265. let data = response.data.FunctionResponse
  25266. if (data.message) {
  25267. console.log(data.message);
  25268. let content = data.message
  25269. let name = '参考资料'
  25270. let md = new MarkdownIt();
  25271. let _html = content ? md.render(content) : ''
  25272. _this.generate2(name, _html, 0, callback)
  25273. _this.isFileCancelToken = null
  25274. _this.$forceUpdate();
  25275. }
  25276. })
  25277. .catch((error) => {
  25278. callback ? callback() : ''
  25279. _this.isFileCancelToken = null
  25280. console.log(error);
  25281. });
  25282. },
  25283. createFileid(url) {
  25284. let _this = this
  25285. return new Promise((resolve, reject) => {
  25286. try {
  25287. _this.ajax
  25288. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  25289. url: url,
  25290. })
  25291. .then((res) => {
  25292. let _data = res.data.FunctionResponse;
  25293. if (_data.result && _data.result.id) {
  25294. resolve(_data.result.id)
  25295. }else {
  25296. resolve(1)
  25297. }
  25298. }).catch(function (error) {
  25299. resolve(1)
  25300. });
  25301. }catch (e){
  25302. resolve(1)
  25303. }
  25304. });
  25305. },
  25306. handleSwitchChange(string){
  25307. // let area = ''
  25308. // let text = ''
  25309. // if(string == 'aiteacherTextDetail'){
  25310. // area = '已有教案摘要'
  25311. // text = this.teacherCourseText
  25312. // }else if(string == 'aitargetTextDetail'){
  25313. // area = '课程目标'
  25314. // text = this.targetCourseText
  25315. // }else if(string == 'aiDetail'){
  25316. // area = '课程简要描述'
  25317. // text = this.courseText
  25318. // }else if(string == 'aitargetTextDetail2'){
  25319. // area = '课程目标'
  25320. // text = this.targetCourseText2
  25321. // }else if(string.indexOf('aiDetail1') != -1){
  25322. // let index = parseInt(string.split('aiDetail1-')[1])
  25323. // area = `任务${index+1}课程大纲`
  25324. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  25325. // }else if(string == 'aiCpote1'){
  25326. // area = '概念群'
  25327. // text = this.cpote.cpote1
  25328. // }else if(string == 'aiCpote2'){
  25329. // area = '问题链'
  25330. // text = this.cpote.cpote2
  25331. // }else if(string == 'aiCpote3'){
  25332. // area = '目标层'
  25333. // text = this.cpote.cpote3
  25334. // }else if(string == 'aiCpote4'){
  25335. // area = '任务簇'
  25336. // text = this.cpote.cpote4
  25337. // }else if(string.indexOf('teacherDetail2') != -1){
  25338. // let index = parseInt(string.split('teacherDetail2-')[1])
  25339. // area = `任务${index+1}教案`
  25340. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  25341. // }else if(string.indexOf('aiDetail2') != -1){
  25342. // let index = parseInt(string.split('aiDetail2-')[1])
  25343. // area = `任务${index+1}任务描述`
  25344. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  25345. // }else if(string.indexOf('aiDetail3') != -1){
  25346. // let index = parseInt(string.split('-')[1])
  25347. // let index2 = parseInt(string.split('-')[2])
  25348. // area = `任务${index+1}工具${index2+1}的工具描述`
  25349. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  25350. // }
  25351. // if(this.isQuote[string] && text){
  25352. // this.quoteArray.push({
  25353. // string,
  25354. // area,
  25355. // value: text
  25356. // })
  25357. // }
  25358. console.log(this.isQuote)
  25359. },
  25360. setIsQuote(string){
  25361. this.isQuote[string] = false
  25362. },
  25363. setEvaList(task, tool, elist){
  25364. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  25365. this.$forceUpdate()
  25366. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  25367. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  25368. }
  25369. },
  25370. closeRight(){
  25371. this.isDisplay = !this.isDisplay;
  25372. },
  25373. addCourseBehavior(type, _html) { // 保存行为操作
  25374. let params = [{
  25375. uid: this.userid,
  25376. courseId: '',
  25377. type: type,
  25378. content: _html,
  25379. }];
  25380. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  25381. if (res.data == 1) {
  25382. console.log('保存操作成功');
  25383. } else {
  25384. console.log('保存操作失败');
  25385. }
  25386. }).catch(e => {
  25387. console.log('保存操作失败');
  25388. console.log(e);
  25389. });
  25390. },
  25391. async useUrl(){
  25392. if(!this.knowFileids3.length){
  25393. this.$message.error('请选择要使用的检索资料')
  25394. return
  25395. }
  25396. let array = []
  25397. for(var i = 0; i < this.knowFileids3.length; i++){
  25398. let item = this.knowFileids3[i]
  25399. for(var j = 0; j < this.knowInfoData3.length; j++){
  25400. if(item == this.knowInfoData3[j].url){
  25401. let isExist = this.knowInfoData2.some(item => item.name === this.knowInfoData3[j].name);
  25402. if (!isExist) {
  25403. this.knowInfoData2.push(this.knowInfoData3[j]);
  25404. }
  25405. }
  25406. }
  25407. }
  25408. this.$nextTick(() => {
  25409. this.$refs.rightKnow.scrollTop = this.$refs.rightKnow.scrollHeight;
  25410. });
  25411. this.knowFileids3 = []
  25412. for (let i = 0; i < this.knowInfoData2.length; i++) {
  25413. if (!this.knowInfoData2[i].fileid) {
  25414. let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25415. this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25416. console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25417. if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25418. this.knowFileids2.push(fileid)
  25419. }
  25420. }
  25421. }
  25422. },
  25423. panFind(event) {
  25424. // if(!this.findMatchingContentsFinish){
  25425. // const { scrollTop, clientHeight, scrollHeight } = event.target;
  25426. // // 判断是否触底
  25427. // if (scrollTop + clientHeight >= scrollHeight - 5 && !this.knowInfoDataLoading) {
  25428. // this.findMatchingContentsPage++
  25429. // this.findMatchingContents(); // 调用下拉刷新方法
  25430. // }
  25431. // }
  25432. if(!this.findMatchingContentsFinish){
  25433. this.findMatchingContentsPage++
  25434. this.findMatchingContents(); // 调用下拉刷新方法
  25435. }else{
  25436. this.$message.error('已获取全部数据')
  25437. }
  25438. },
  25439. startFindMatchingContents(){
  25440. if(!this.searchFileName){
  25441. this.$message.error('请输入检索关键词')
  25442. return
  25443. }
  25444. if(this.knowInfoDataLoading){
  25445. this.$message.error('检索中请稍后')
  25446. return
  25447. }
  25448. if(this.isfindMatchingContents && this.findMatchingContentsPage < 10){
  25449. this.isfindMatchingContents.cancel('Request canceled by the user.');
  25450. this.isfindMatchingContents = null;
  25451. }else if(this.isfindMatchingContents){
  25452. this.$message.error('检索中请稍后')
  25453. return
  25454. }
  25455. this.findMatchingContentsFinish = false
  25456. this.findMatchingContentsPage = 1
  25457. this.knowInfoData3 = []
  25458. this.knowFileType1 = ''
  25459. this.knowFileType2 = ''
  25460. this.knowFileType = ''
  25461. this.findMatchingContents(); // 调用下拉刷新方法
  25462. },
  25463. findMatchingContents(){
  25464. if(!this.searchFileName){
  25465. this.$message.error('请输入检索关键词')
  25466. return
  25467. }
  25468. if(this.isfindMatchingContents){
  25469. this.$message.error('检索中请稍后')
  25470. return
  25471. }
  25472. let sub = []
  25473. let grade = []
  25474. if (this.courseTypeId.length) {
  25475. for (var i = 0; i < this.courseTypeId.length; i++) {
  25476. let _sid = this.courseTypeId[i]
  25477. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25478. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  25479. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  25480. }
  25481. }
  25482. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25483. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  25484. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  25485. }
  25486. }
  25487. }
  25488. }
  25489. if(this.findMatchingContentsPage < 2){
  25490. this.knowInfoDataLoading = true
  25491. }
  25492. let params = {
  25493. type: this.typeC2.join(","),
  25494. string: this.searchFileName,
  25495. grade: this.typeC1.join(","),
  25496. page: this.findMatchingContentsPage
  25497. };
  25498. let md = new MarkdownIt();
  25499. this.isfindMatchingContents = this.ajax.setCancelSource()
  25500. this.ajax.get(this.$store.state.api + 'findMatchingContentsPage2', params, this.isfindMatchingContents).then(async res => {
  25501. console.log(res)
  25502. this.isfindMatchingContents = null
  25503. this.knowInfoDataLoading = false
  25504. if(res.data.length){
  25505. let files = []
  25506. // let knowFile = JSON.parse(JSON.stringify(this.knowFileids2))
  25507. for (var i = 0; i < res.data.length; i++) {
  25508. // files.push(await this.generateExport2(el.title, md.render(el.content)));
  25509. let el = res.data[i];
  25510. let url = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn' + el.file_url;
  25511. let extension = url.split('.').pop().toLowerCase();
  25512. let _type = 2; // 默认类型为2
  25513. // 定义文件类型数组
  25514. let imgA = ["png", "jpg", "jpeg", "bmp", "gif", "webp", "psd", "svg", "tiff"];
  25515. let fileA = ["PDF", "DOC", "DOCX", "DOCM", "DOTM", "DOTX", "PPTX", "PPSX", "PPT", "PPS", "PPTM", "POTM", "PPAM", "POTX", "PPSM", "XLSX", "XLS"];
  25516. 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"];
  25517. // 根据文件扩展名判断文件类型
  25518. if (fileA.includes(extension.toUpperCase())) {
  25519. _type = 3;
  25520. } else if (videoA.includes(extension.toUpperCase())) {
  25521. _type = 2;
  25522. } else if (imgA.includes(extension)) {
  25523. _type = 13;
  25524. } else {
  25525. _type = 12;
  25526. }
  25527. let isExist = this.knowInfoData3.some(item => item.name === el.title);
  25528. if (!isExist) {
  25529. // let fileid = await this.createFileid(url)
  25530. this.knowInfoData3.push({
  25531. name: el.title,
  25532. url: url,
  25533. uid: '',
  25534. type: _type,
  25535. fileid: '',
  25536. file_type: el.file_type
  25537. // fileid == 1 ? '' : fileid
  25538. });
  25539. // if(fileid != 1){
  25540. // this.knowFileids2.push(fileid)
  25541. // }
  25542. }
  25543. }
  25544. // for (let i = 0; i < this.knowInfoData3.length; i++) {
  25545. // if (!this.knowInfoData2[i].fileid) {
  25546. // let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25547. // this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25548. // console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25549. // if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25550. // this.knowFileids2.push(fileid)
  25551. // }
  25552. // }
  25553. // }
  25554. // let data = {
  25555. // target:{
  25556. // files: files
  25557. // }
  25558. // }
  25559. // console.log(data)
  25560. // this.beforeUploadInfo2(data, 20)
  25561. if(this.findMatchingContentsPage < 10){
  25562. this.panFind()
  25563. }
  25564. }else{
  25565. if(this.findMatchingContentsPage == 1){
  25566. this.$message.error('未检索出内容')
  25567. }else {
  25568. this.findMatchingContentsFinish = true
  25569. }
  25570. }
  25571. }).catch(e => {
  25572. console.log('查询失败');
  25573. this.isfindMatchingContents = null
  25574. this.knowInfoDataLoading = false
  25575. console.log(e);
  25576. });
  25577. },
  25578. openCodeEditor(type,val, unitIndex,itemTaskIndex,index1){
  25579. console.log('openCodeEditor',type,val,unitIndex,itemTaskIndex,index1);
  25580. this.$refs.CodeEditorRef.open(type,val, unitIndex,itemTaskIndex, index1)
  25581. },
  25582. addHtmlSuccess({Tname,url,type,unitIndex,itemTaskIndex,index1}){
  25583. console.log('addHtmlSuccess',Tname,url,'type:',type,'unitIndex',unitIndex,'itemTaskIndex',itemTaskIndex,'index1',index1);
  25584. if (type == 1) {
  25585. this.unitJson[unitIndex].chapterInfo[0].taskJson[
  25586. itemTaskIndex
  25587. ].chapterData.splice(index1,1,{
  25588. name: Tname,
  25589. url: url,
  25590. type: 16
  25591. })
  25592. }else{
  25593. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25594. itemTaskIndex
  25595. ].chapterData.push({
  25596. name: Tname,
  25597. url: url,
  25598. type: 16
  25599. });
  25600. }
  25601. },
  25602. openAddApp(i) {
  25603. this.lineCount = i;
  25604. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25605. this.lineCount
  25606. ].chapterData.findIndex(i => i.type == 15);
  25607. let _obj = {}
  25608. if (_index != -1) {
  25609. _obj = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25610. this.lineCount
  25611. ].chapterData[_index]
  25612. }
  25613. this.$refs.appDialog.openG(_obj, "", "", "", 2);
  25614. },
  25615. selectAppSuccess({ data, type }) {
  25616. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25617. this.lineCount
  25618. ].chapterData.findIndex(i => i.type == 15);
  25619. if (_index != -1) {
  25620. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25621. this.lineCount
  25622. ].chapterData.splice(_index, 1);
  25623. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25624. this.lineCount
  25625. ].chapterData.push({
  25626. name: data.name,
  25627. title: data.name,
  25628. id:data.id,
  25629. url: data.url,
  25630. type: 15
  25631. });
  25632. } else {
  25633. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25634. this.lineCount
  25635. ].chapterData.push({
  25636. name: data.name,
  25637. title: data.name,
  25638. id:data.id,
  25639. url: data.url,
  25640. type: 15
  25641. });
  25642. }
  25643. this.imgChange1(null, null, 8, this.lineCount);
  25644. this.dialogVisible7 = false;
  25645. },
  25646. // zip压缩文件上传
  25647. uploadZIPFile(i){
  25648. this.lineCount = i;
  25649. // 只支持上传zip文件
  25650. let input = document.createElement('input');
  25651. input.type = 'file';
  25652. input.accept = '.zip';
  25653. input.style.display = 'none';
  25654. // 只允许上传一个文件
  25655. input.multiple = false;
  25656. input.onchange = async (e) => {
  25657. let file = e.target.files[0];
  25658. if (!file) return;
  25659. if (file.type !== 'application/zip' && !file.name.endsWith('.zip')) {
  25660. this.$message.error('只支持上传zip文件');
  25661. return;
  25662. }
  25663. try{
  25664. const zip = new JSZip();
  25665. const content = await zip.loadAsync(file);
  25666. let _fileStructure = this.buildFileStructure(file,content);
  25667. let _time = new Date().getTime();
  25668. let _resultList = await this.uploadZipFileFn(_fileStructure.files,`${_time}_${_fileStructure.folderName}`);
  25669. this.changeId = "";
  25670. this.$refs.selectHtmlPageDialogRef.open(_resultList);
  25671. }catch(e){
  25672. console.log(e)
  25673. this.$message.error("解析zip文件失败")
  25674. }
  25675. };
  25676. document.body.appendChild(input);
  25677. input.click();
  25678. setTimeout(() => {
  25679. document.body.removeChild(input);
  25680. }, 1000);
  25681. },
  25682. // 构建文件结构树
  25683. buildFileStructure(file,zip) {
  25684. const root = {
  25685. folderName: file.name.replace(/\.[^/.]+$/, ""), // 移除扩展名
  25686. files: []
  25687. };
  25688. // 遍历ZIP文件中的所有文件/文件夹
  25689. zip.forEach((relativePath, file) => {
  25690. if (file.dir) return; // 跳过目录
  25691. const parts = relativePath.split('/');
  25692. let currentLevel = root.files;
  25693. for (let i = 0; i < parts.length; i++) {
  25694. const part = parts[i];
  25695. const isLast = i === parts.length - 1;
  25696. if (isLast) {
  25697. // 添加文件
  25698. currentLevel.push({fileName:part,file:file});
  25699. } else {
  25700. // 查找或创建文件夹
  25701. let folder = currentLevel.find(item =>
  25702. typeof item === 'object' && item.folderName === part
  25703. );
  25704. if (!folder) {
  25705. folder = {
  25706. folderName: part,
  25707. files: []
  25708. };
  25709. currentLevel.push(folder);
  25710. }
  25711. currentLevel = folder.files;
  25712. }
  25713. }
  25714. });
  25715. return root;
  25716. },
  25717. //按路径上传文件
  25718. async uploadZipFileFn(fileList,path){
  25719. return new Promise(async (resolve)=>{
  25720. let _copyFileList = fileList;
  25721. let promise = [];
  25722. for(let i = 0; i < _copyFileList.length; i++){
  25723. if(_copyFileList[i].folderName){
  25724. let _path = `${path}/${_copyFileList[i].folderName}`;
  25725. promise.push(this.uploadZipFileFn(_copyFileList[i].files,_path).then(res=>{
  25726. _copyFileList[i].files = res;
  25727. }))
  25728. }else if(_copyFileList[i].fileName){
  25729. // 将 ZIP 条目转换为文件对象
  25730. const blob = await _copyFileList[i].file.async('blob');
  25731. // 根据文件名设置type
  25732. let type = 'text/html';
  25733. if (_copyFileList[i].fileName.endsWith('.js')) {
  25734. type = 'application/javascript';
  25735. } else if (_copyFileList[i].fileName.endsWith('.css')) {
  25736. type = 'text/css';
  25737. } else if (_copyFileList[i].fileName.endsWith('.json')) {
  25738. type = 'application/json';
  25739. } else if (_copyFileList[i].fileName.endsWith('.png')) {
  25740. type = 'image/png';
  25741. } else if (_copyFileList[i].fileName.endsWith('.jpg') || _copyFileList[i].fileName.endsWith('.jpeg')) {
  25742. type = 'image/jpeg';
  25743. } else if (_copyFileList[i].fileName.endsWith('.gif')) {
  25744. type = 'image/gif';
  25745. } else if (_copyFileList[i].fileName.endsWith('.svg')) {
  25746. type = 'image/svg+xml';
  25747. } else if (_copyFileList[i].fileName.endsWith('.html') || _copyFileList[i].fileName.endsWith('.htm')) {
  25748. type = 'text/html';
  25749. } else if (_copyFileList[i].fileName.endsWith('.txt')) {
  25750. type = 'text/plain';
  25751. } else if (_copyFileList[i].fileName.endsWith('.pdf')) {
  25752. type = 'application/pdf';
  25753. } else if (_copyFileList[i].fileName.endsWith('.mp3')) {
  25754. type = 'audio/mpeg';
  25755. } else if (_copyFileList[i].fileName.endsWith('.mp4')) {
  25756. type = 'video/mp4';
  25757. } else if (_copyFileList[i].fileName.endsWith('.zip')) {
  25758. type = 'application/zip';
  25759. } else if (_copyFileList[i].fileName.endsWith('.xml')) {
  25760. type = 'application/xml';
  25761. } else if (_copyFileList[i].fileName.endsWith('.csv')) {
  25762. type = 'text/csv';
  25763. } else if (_copyFileList[i].fileName.endsWith('.md')) {
  25764. type = 'text/markdown';
  25765. }
  25766. let _file = new File([blob], _copyFileList[i].fileName, {type: type, lastModified: new Date().getTime()});
  25767. promise.push(this.awsupload({file:_file,path:`${path}/${_copyFileList[i].fileName}`}).then(res=>{
  25768. delete _copyFileList[i].file;
  25769. _copyFileList[i].url = decodeURIComponent(res.Location);
  25770. }))
  25771. }
  25772. }
  25773. Promise.all(promise).then(res=>{
  25774. resolve(_copyFileList);
  25775. })
  25776. })
  25777. },
  25778. selectHtmlPageSuccess(data){
  25779. let _selectFile = data.find(i=>i.isSelect==="1");
  25780. if(!_selectFile){
  25781. this.changeId = "";
  25782. return this.$message.info("未选择主页面")
  25783. }
  25784. console.log("_selectFile",_selectFile)
  25785. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25786. this.lineCount
  25787. ].chapterData.findIndex(i => i.type == 17 && i.id == this.changeId);
  25788. if (_index != -1) {
  25789. console.log("_index",_index)
  25790. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25791. this.lineCount
  25792. ].chapterData[_index] = {
  25793. name: _selectFile.fileName,
  25794. title: _selectFile.fileName,
  25795. id:this.changeId,
  25796. url: _selectFile.url,
  25797. fileList:data,
  25798. type: 17
  25799. };
  25800. } else {
  25801. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25802. this.lineCount
  25803. ].chapterData.push({
  25804. name: _selectFile.fileName,
  25805. title: _selectFile.fileName,
  25806. id:new Date().getTime(),
  25807. url: _selectFile.url,
  25808. fileList:data,
  25809. type: 17
  25810. });
  25811. }
  25812. this.changeId = "";
  25813. this.$forceUpdate();
  25814. this.$refs.selectHtmlPageDialogRef.close();
  25815. },
  25816. changeHTmlPage(itemTaskIndex,i){
  25817. let _data = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25818. itemTaskIndex
  25819. ].chapterData[i];
  25820. this.lineCount = itemTaskIndex;
  25821. this.changeId = _data.id;
  25822. this.$refs.selectHtmlPageDialogRef.open(_data.fileList);
  25823. }
  25824. },
  25825. beforeDestroy() {
  25826. // clearTimeout(this.timer);
  25827. // this.timer = null;
  25828. // clearInterval(this.timer2);
  25829. // this.timer2 = null;
  25830. clearInterval(this.pasteTimer);
  25831. this.pasteTimer = null;
  25832. },
  25833. beforeRouteLeave(to, from, next) {
  25834. // clearTimeout(this.timer);
  25835. // this.timer = null;
  25836. // clearInterval(this.timer2);
  25837. // this.timer2 = null;
  25838. clearInterval(this.pasteTimer);
  25839. this.pasteTimer = null;
  25840. next();
  25841. },
  25842. mounted(){
  25843. let _this = this
  25844. // 监听浏览器后退或者刷新等离开页面的操作
  25845. window.onbeforeunload = function(event) {
  25846. // 检查是否有未保存的更改
  25847. const message = "你有未保存的更改,确定要离开吗?";
  25848. // 现代浏览器通常会显示一个默认的提示信息,不能完全自定义提示内容
  25849. event.returnValue = message; // 兼容大部分浏览器
  25850. console.log(message)
  25851. return message; // 兼容部分浏览器
  25852. };
  25853. const resizable = this.$el.querySelector('.resizable');
  25854. const resizer = this.$el.querySelector('.resizer');
  25855. const maxWidth = document.body.offsetWidth / 2;
  25856. const maxWidth2 = window.innerWidth / 2;
  25857. let startX, startWidth;
  25858. const mouseMoveHandler = (e) => {
  25859. e.preventDefault(); // 添加此行以防止选中其他文本
  25860. const dx = startX - e.clientX;
  25861. const newWidth = startWidth + dx;
  25862. if (newWidth >= 350 && newWidth <= maxWidth) {
  25863. resizable.style.minWidth = `${newWidth}px`;
  25864. }
  25865. };
  25866. const mouseUpHandler = () => {
  25867. document.removeEventListener('mousemove', mouseMoveHandler);
  25868. document.removeEventListener('mouseup', mouseUpHandler);
  25869. document.body.style.cursor = 'default';
  25870. };
  25871. const mouseDownHandler = (e) => {
  25872. e.preventDefault(); // 添加此行以防止选中其他文本
  25873. startX = e.clientX;
  25874. startWidth = resizable.getBoundingClientRect().width;
  25875. document.addEventListener('mousemove', mouseMoveHandler);
  25876. document.addEventListener('mouseup', mouseUpHandler);
  25877. document.body.style.cursor = 'ew-resize';
  25878. };
  25879. resizer.addEventListener('mousedown', mouseDownHandler);
  25880. const touchMoveHandler = (e) => {
  25881. e.preventDefault(); // 添加此行以防止选中其他文本
  25882. const dx = startX - e.touches[0].clientX;
  25883. const newWidth = startWidth + dx;
  25884. if (newWidth >= 350 && newWidth <= maxWidth2) {
  25885. resizable.style.minWidth = `${newWidth}px`;
  25886. }
  25887. };
  25888. const touchEndHandler = () => {
  25889. document.removeEventListener('touchmove', touchMoveHandler);
  25890. document.removeEventListener('touchend', touchEndHandler);
  25891. document.body.style.cursor = 'default';
  25892. };
  25893. const touchStartHandler = (e) => {
  25894. e.preventDefault(); // 添加此行以防止选中其他文本
  25895. startX = e.touches[0].clientX;
  25896. startWidth = resizable.getBoundingClientRect().width;
  25897. document.addEventListener('touchmove', touchMoveHandler);
  25898. document.addEventListener('touchend', touchEndHandler);
  25899. document.body.style.cursor = 'ew-resize';
  25900. };
  25901. resizer.addEventListener('touchstart', touchStartHandler);
  25902. },
  25903. created() {
  25904. this.selectFileid();
  25905. // this.selectAiFileid();
  25906. this.selectKnowFileid();
  25907. this.getStudent();
  25908. this.getTeacher();
  25909. this.getClass();
  25910. this.selectGrage();
  25911. this.getTemplate();
  25912. this.getTipsTemplate();
  25913. // this.selectType();
  25914. this.selectEva();
  25915. if(this.istemplate == 1){
  25916. this.isOutline = true
  25917. this.isOutline2 = true
  25918. this.courseTextBool = true
  25919. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  25920. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  25921. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25922. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  25923. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  25924. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25925. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  25926. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  25927. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  25928. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  25929. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  25930. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  25931. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  25932. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  25933. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  25934. - 我们的课程主题可以如何与学生的实际生活联系起来?
  25935. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  25936. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  25937. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  25938. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  25939. - 学生个人最终要完成什么?学生小组最终要完成什么?
  25940. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  25941. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  25942. 讨论:<转文本内容>`
  25943. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  25944. }
  25945. this.loading = false;
  25946. // this.timer2 = setInterval(() => {
  25947. // this.selectEva();
  25948. // }, 5000);
  25949. // this.pasteTimer = setInterval(() => {
  25950. // this.getPaste();
  25951. // }, 1000);
  25952. this.pasteTimer = setInterval(() => {
  25953. this.getPaste2();
  25954. }, 500);
  25955. setTimeout(() => {
  25956. // this.selectAllType();
  25957. this.selectCourseDetail();
  25958. }, 500);
  25959. let _this = this;
  25960. window.pasteStage = function (json) {
  25961. _this.pasteStage(json);
  25962. };
  25963. window.pasteTask = function (json) {
  25964. _this.pasteTask(json);
  25965. };
  25966. },
  25967. };
  25968. </script>
  25969. <style scoped>
  25970. @media screen and (max-width: 1280px) {
  25971. .mbCss {
  25972. flex-direction: column !important;
  25973. }
  25974. .pjCss {
  25975. width: 100% !important;
  25976. }
  25977. .evaCss {
  25978. width: 100% !important;
  25979. margin-top: 10px;
  25980. }
  25981. }
  25982. .el-table>>>.even_row {
  25983. background-color: #f1f1f1 !important;
  25984. }
  25985. .dialog_diy>>>.el-dialog__header {
  25986. background: #3c3c3c !important;
  25987. padding: 15px 20px;
  25988. }
  25989. .dialog_diy>>>.el-dialog__title {
  25990. color: #fff;
  25991. }
  25992. .dialog_diy>>>.el-dialog__headerbtn {
  25993. top: 19px;
  25994. }
  25995. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  25996. color: #fff;
  25997. }
  25998. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  25999. color: #fff;
  26000. }
  26001. .dialog_diy>>>.el-dialog__body,
  26002. .dialog_diy>>>.el-dialog__footer {
  26003. background: #fafafa;
  26004. }
  26005. .dialog_diy3>>>.el-dialog__body,
  26006. .dialog_diy3>>>.el-dialog__footer {
  26007. background: #eee !important;
  26008. }
  26009. .dialog_diy3>>>.el-dialog__body {
  26010. padding: 20px 20px;
  26011. }
  26012. .dialog_diyStage>>>.el-dialog__body {
  26013. padding: 10px;
  26014. }
  26015. .source_diy>>>.el-dialog {
  26016. height: 100% !important;
  26017. margin: 0 auto !important;
  26018. }
  26019. .source_diy>>>.el-dialog__body {
  26020. height: calc(100% - 185px);
  26021. overflow: auto;
  26022. background: #e6eaf0;
  26023. }
  26024. .source_diy>>>.el-dialog__footer {
  26025. background: #e6eaf0 !important;
  26026. }
  26027. .left {
  26028. border-right: 1px solid rgb(60, 94, 143);
  26029. display: flex;
  26030. flex-direction: column;
  26031. align-items: center;
  26032. min-height: 600px;
  26033. width: 385px;
  26034. height: 80%;
  26035. }
  26036. .tips {
  26037. color: rgb(128, 128, 128);
  26038. font-size: 12px;
  26039. width: 270px;
  26040. margin: 40px;
  26041. }
  26042. .pb_content {
  26043. height: 100% !important;
  26044. /* margin: 0 20px 0 20px; */
  26045. }
  26046. .pb_content_body {
  26047. width: 100% !important;
  26048. height: 100%;
  26049. display: flex;
  26050. }
  26051. .info_solid {
  26052. width: 270px;
  26053. height: 30px;
  26054. border-left: 1px solid #bdbdbd;
  26055. margin: 10px 0px 10px 30px;
  26056. }
  26057. .info_steps {
  26058. width: 270px;
  26059. font-size: 0.875rem;
  26060. display: flex;
  26061. align-items: center;
  26062. }
  26063. .info_steps span:nth-child(1) {
  26064. width: 30px;
  26065. height: 30px;
  26066. background: rgba(0, 0, 0, 0.38);
  26067. display: block;
  26068. color: #fff;
  26069. border-radius: 40px;
  26070. text-align: center;
  26071. line-height: 30px;
  26072. }
  26073. .steps_active {
  26074. background: #3d67bc !important;
  26075. }
  26076. .info_steps span:nth-child(2) {
  26077. margin-left: 5px;
  26078. }
  26079. .right {
  26080. height: 100%;
  26081. width: 100%;
  26082. display: flex;
  26083. overflow: hidden;
  26084. flex-direction: column;
  26085. }
  26086. .leftBar{
  26087. width: 290px;
  26088. height: calc(100% - 50px);
  26089. overflow: auto;
  26090. border-radius: 5px;
  26091. margin: 25px auto;
  26092. box-sizing: border-box;
  26093. margin-right: 10px;
  26094. }
  26095. .leftBar2{
  26096. width: 400px;
  26097. min-width: 400px;
  26098. height: calc(100% - 50px);
  26099. overflow: auto;
  26100. border-radius: 5px;
  26101. margin: 25px auto;
  26102. box-sizing: border-box;
  26103. margin-right: 10px;
  26104. background: #fff;
  26105. padding: 5px;
  26106. border-radius: 5px;
  26107. }
  26108. .basic_box {
  26109. margin: 0 auto;
  26110. position: relative;
  26111. padding: 0 20px 0 20px;
  26112. }
  26113. .basic_box_success {
  26114. width: 100%;
  26115. min-height: 455px;
  26116. padding: 50px 0;
  26117. position: relative;
  26118. text-align: center;
  26119. border-bottom: 1px solid #bfbfbf;
  26120. box-sizing: border-box;
  26121. display: flex;
  26122. align-items: center;
  26123. flex-direction: column;
  26124. justify-content: center;
  26125. }
  26126. .info_title {
  26127. font-size: 1.5em;
  26128. margin-right: 25px;
  26129. /* margin: 20px 30px 20px 30px; */
  26130. }
  26131. .bInfo_title {
  26132. text-align: left;
  26133. margin: 10px 0;
  26134. }
  26135. .small_title {
  26136. font-size: 14px;
  26137. line-height: 40px;
  26138. }
  26139. .chapter_beizhu {
  26140. font-size: 12px;
  26141. font-weight: bold;
  26142. float: right;
  26143. color: rgb(128, 128, 128);
  26144. margin-top: 5px;
  26145. }
  26146. .chapter_uploadBox1 {
  26147. text-align: left;
  26148. background-color: rgb(242, 242, 242);
  26149. width: 100%;
  26150. height: 67px;
  26151. padding: 0px 15px;
  26152. border-radius: 8px;
  26153. overflow: hidden;
  26154. font-size: 16px;
  26155. box-sizing: border-box;
  26156. position: relative;
  26157. }
  26158. .chapter_add {
  26159. width: 100%;
  26160. height: 32px;
  26161. margin-top: 15px;
  26162. cursor: pointer;
  26163. }
  26164. .chapter_add_l {
  26165. margin-left: 5px;
  26166. width: 30px;
  26167. height: 30px;
  26168. float: left;
  26169. border: 1px solid #aaa;
  26170. color: #aaa;
  26171. border-radius: 50%;
  26172. font-size: 25px;
  26173. text-align: center;
  26174. }
  26175. .chapter_add_r {
  26176. font-size: 18px;
  26177. height: 40px;
  26178. line-height: 30px;
  26179. text-indent: 10px;
  26180. color: #aaa;
  26181. }
  26182. .chapter_add_r span {
  26183. font-size: 12px;
  26184. color: rgb(204, 204, 204);
  26185. }
  26186. .chapter_add_input {
  26187. display: none;
  26188. }
  26189. .line {
  26190. width: 85%;
  26191. margin: 0 auto;
  26192. border-top: 1px solid #e5e5e5;
  26193. margin-top: 20px;
  26194. }
  26195. .info_btnBox {
  26196. width: calc(100%);
  26197. display: flex;
  26198. justify-content: center;
  26199. height: 80px;
  26200. align-items: center;
  26201. background: #fff;
  26202. margin: 0 auto;
  26203. border-top: 2px solid rgb(228, 232, 237);
  26204. box-sizing: border-box;
  26205. }
  26206. .info_btnBox2 {
  26207. width: calc(100%);
  26208. display: flex;
  26209. justify-content: center;
  26210. height: 20px;
  26211. align-items: center;
  26212. background: #fff;
  26213. margin: 0 auto;
  26214. border-top: 2px solid rgb(228, 232, 237);
  26215. box-sizing: border-box;
  26216. overflow: hidden;
  26217. cursor: pointer;
  26218. }
  26219. .info_btnBox3 {
  26220. width: calc(100%);
  26221. display: flex;
  26222. justify-content: flex-end;
  26223. padding: 0 20px;
  26224. height: 60px;
  26225. align-items: center;
  26226. background: unset;
  26227. margin: 0 auto;
  26228. /* border-top: 1px solid rgb(228, 232, 237); */
  26229. box-sizing: border-box;
  26230. overflow: hidden;
  26231. cursor: pointer;
  26232. background: #fff;
  26233. border-radius: 10px;
  26234. }
  26235. .info_btn+.info_btn {
  26236. margin-left: 15px;
  26237. }
  26238. .info_btn,
  26239. .teacherWord {
  26240. color: #fff;
  26241. background-color: #0f7eff;
  26242. padding: 8px 24px;
  26243. font-size: 0.9375rem;
  26244. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  26245. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  26246. min-width: 64px;
  26247. font-weight: 500;
  26248. border-radius: 4px;
  26249. box-sizing: border-box;
  26250. border: none;
  26251. cursor: pointer;
  26252. }
  26253. .teacherWord {
  26254. width: 105px !important;
  26255. text-align: center !important;
  26256. line-height: 36px !important;
  26257. padding: 0 !important;
  26258. font-size: 14px !important;
  26259. margin: 10px 0 !important;
  26260. }
  26261. .template_box {
  26262. display: flex;
  26263. flex-wrap: wrap;
  26264. }
  26265. .wordTeacher {
  26266. display: flex;
  26267. flex-direction: column;
  26268. width: 100px;
  26269. height: 100px;
  26270. text-align: center;
  26271. font-size: 13px;
  26272. margin: 0 20px 20px 0;
  26273. background: #f0f4fa;
  26274. position: relative;
  26275. border-radius: 5px;
  26276. align-items: center;
  26277. justify-content: center;
  26278. border: 1px solid #cad1dc;
  26279. color: #0e1e33;
  26280. /* padding: 25px 0px; */
  26281. cursor: pointer;
  26282. }
  26283. .wordTeacher::after {
  26284. content: "";
  26285. display: block;
  26286. position: absolute;
  26287. width: 15px;
  26288. height: 15px;
  26289. right: 10px;
  26290. top: 10px;
  26291. background-image: url(../../../assets/icon/new/choose_a.png);
  26292. background-size: 100% 100%;
  26293. }
  26294. .wordTeacherA::after {
  26295. background-image: url(../../../assets/icon/new/choose_b.png);
  26296. }
  26297. .wordTeacher:nth-child(5n) {
  26298. margin-right: 0px;
  26299. }
  26300. .wordPic {
  26301. margin: 0 auto;
  26302. width: 30px;
  26303. height: 30px;
  26304. cursor: pointer;
  26305. }
  26306. .deleteWord {
  26307. width: 22px;
  26308. height: 22px;
  26309. position: absolute;
  26310. right: 5px;
  26311. top: -15px;
  26312. cursor: pointer;
  26313. display: none;
  26314. z-index: 999;
  26315. }
  26316. .wordPic>img,
  26317. .deleteWord>img,
  26318. .addToolImg>img {
  26319. width: 100%;
  26320. height: 100%;
  26321. }
  26322. .info_btn:hover {
  26323. background-color: #4f7cd5 !important;
  26324. }
  26325. .cru_selectBox {
  26326. display: flex;
  26327. margin: 15px 0;
  26328. flex-wrap: nowrap;
  26329. white-space: nowrap;
  26330. overflow: auto;
  26331. position: relative;
  26332. height: 40px;
  26333. max-width: calc(100% - 175px);
  26334. }
  26335. .cru_selectBox::-webkit-scrollbar {
  26336. /*滚动条整体样式*/
  26337. width: 6px;
  26338. /*高宽分别对应横竖滚动条的尺寸*/
  26339. height: 6px;
  26340. }
  26341. /*定义滚动条轨道 内阴影+圆角*/
  26342. .cru_selectBox::-webkit-scrollbar-track {
  26343. border-radius: 10px;
  26344. background-color: #eee;
  26345. }
  26346. /*定义滑块 内阴影+圆角*/
  26347. .cru_selectBox::-webkit-scrollbar-thumb {
  26348. border-radius: 10px;
  26349. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  26350. background-color: rgba(0, 0, 0, 0.1);
  26351. }
  26352. .cru_line {
  26353. position: absolute;
  26354. bottom: 0px;
  26355. transition: all 0.5s;
  26356. left: 0px;
  26357. width: 50px;
  26358. height: 4px;
  26359. left: 10px;
  26360. border-radius: 2px;
  26361. background: #3681fc;
  26362. }
  26363. .cru_select {
  26364. font-size: 18px;
  26365. margin-right: 20px;
  26366. margin-left: 5px;
  26367. cursor: pointer;
  26368. color: #0e1e33;
  26369. }
  26370. .cru_select:hover {
  26371. color: #3681fc !important;
  26372. }
  26373. .cru_selected {
  26374. color: #3681fc !important;
  26375. font-weight: bold;
  26376. }
  26377. .chapter_box {
  26378. margin-top: 10px;
  26379. width: 100%;
  26380. padding: 10px 20px;
  26381. background: #fff;
  26382. border-radius: 8px;
  26383. box-sizing: border-box;
  26384. }
  26385. .chapter_contentbox {
  26386. display: flex;
  26387. align-items: center;
  26388. /* margin-top: 15px; */
  26389. }
  26390. .chapter_contentbox .cc_title {
  26391. margin: 0px;
  26392. color: black;
  26393. display: block;
  26394. white-space: nowrap;
  26395. overflow: hidden;
  26396. text-overflow: ellipsis;
  26397. margin-right: 20px;
  26398. font-size: 18px;
  26399. height: 20px;
  26400. line-height: 22px;
  26401. min-width: fit-content;
  26402. display: flex;
  26403. }
  26404. .chapter_contentbox .cc_title::before {
  26405. content: "";
  26406. height: 100%;
  26407. width: 3px;
  26408. background: #3681fc;
  26409. border-radius: 3px;
  26410. opacity: 1;
  26411. display: block;
  26412. margin-right: 10px;
  26413. }
  26414. .chapter_contentbox .cc_input {
  26415. width: 100%;
  26416. display: flex;
  26417. }
  26418. .show_taskD {
  26419. min-width: fit-content;
  26420. margin-left: 10px;
  26421. display: flex;
  26422. align-items: center;
  26423. font-size: 14px;
  26424. cursor: pointer;
  26425. color: #717c8d;
  26426. }
  26427. .show_taskD>img {
  26428. width: 15px;
  26429. margin-right: 5px;
  26430. transition: 0.2s all;
  26431. transform: rotate(-90deg);
  26432. }
  26433. .show_taskD.show>img {
  26434. transform: rotate(0deg);
  26435. }
  26436. .show_toolD {
  26437. min-width: fit-content;
  26438. margin-left: 10px;
  26439. display: flex;
  26440. align-items: center;
  26441. font-size: 14px;
  26442. cursor: pointer;
  26443. color: #717c8d;
  26444. /* position: absolute;
  26445. right: 45px;
  26446. top: 5px; */
  26447. }
  26448. .show_toolD>img {
  26449. width: 15px;
  26450. margin-right: 5px;
  26451. transition: 0.2s all;
  26452. transform: rotate(-90deg);
  26453. }
  26454. .show_toolD.show>img {
  26455. transform: rotate(0deg);
  26456. }
  26457. .remove {
  26458. background-image: url("../../../assets/icon/new/delete_u.png");
  26459. cursor: pointer;
  26460. opacity: 0.5;
  26461. width: 30px;
  26462. min-width: 30px;
  26463. height: 30px;
  26464. background-size: 100% 100%;
  26465. background-repeat: no-repeat;
  26466. margin-left: 10px;
  26467. }
  26468. .remove1 {
  26469. background-image: url("../../../assets/remove1.png");
  26470. background-repeat: no-repeat;
  26471. background-position: 5px 10px;
  26472. width: 40px;
  26473. height: 50px;
  26474. cursor: pointer;
  26475. margin-left: 10px;
  26476. }
  26477. .binfo_input {
  26478. width: 100%;
  26479. margin: 0;
  26480. padding: 12px 14px;
  26481. display: block;
  26482. min-width: 0;
  26483. outline: none;
  26484. box-sizing: border-box;
  26485. background: none;
  26486. border: none;
  26487. border-radius: 4px;
  26488. background: #fff;
  26489. font-size: 16px;
  26490. resize: none;
  26491. font-family: "Microsoft YaHei";
  26492. min-height: 48px;
  26493. /* border: 1px solid #3682fc00; */
  26494. border: 1.5px solid #cad1dc;
  26495. }
  26496. .binfo_textarea {
  26497. border: 1.5px solid #cad1dc;
  26498. font-size: 16px;
  26499. resize: none;
  26500. /* background: #f6f6f6; */
  26501. font-family: "Microsoft YaHei";
  26502. }
  26503. .binfo_input:focus-visible {
  26504. border: 1.5px solid #3681fc !important;
  26505. }
  26506. .time {
  26507. display: flex;
  26508. margin: 35px 0 80px 0;
  26509. }
  26510. .chapter_btnbox {
  26511. width: 160px;
  26512. border-radius: 5px;
  26513. border: 2px dashed gray;
  26514. display: flex;
  26515. padding: 8px 50px;
  26516. align-items: center;
  26517. justify-content: center;
  26518. margin: 30px auto 0;
  26519. cursor: pointer;
  26520. }
  26521. .icon_add {
  26522. position: relative;
  26523. width: 24px;
  26524. padding-top: 20px;
  26525. border-radius: 100%;
  26526. border-width: 2px;
  26527. border-style: solid;
  26528. border-color: gray;
  26529. }
  26530. .icon_add i:nth-child(1) {
  26531. position: absolute;
  26532. left: 50%;
  26533. top: 50%;
  26534. height: 60%;
  26535. transform: translate(-50%, -50%);
  26536. border-width: 1px;
  26537. border-style: solid;
  26538. border-color: inherit;
  26539. }
  26540. .icon_add i:nth-child(2) {
  26541. position: absolute;
  26542. top: 50%;
  26543. left: 50%;
  26544. width: 60%;
  26545. transform: translate(-50%, -50%);
  26546. border-width: 1px;
  26547. border-style: solid;
  26548. border-color: inherit;
  26549. }
  26550. .chapter_btn_w {
  26551. font-size: 0.9375rem;
  26552. font-weight: bold;
  26553. color: gray;
  26554. margin-left: 20px;
  26555. }
  26556. .disUoloadSty>>>.el-icon-plus {
  26557. display: none !important;
  26558. /* 上传按钮隐藏 */
  26559. }
  26560. .imgLeft {
  26561. margin: 15px 0;
  26562. }
  26563. .add_info_box {
  26564. margin: 0 0 0 auto;
  26565. display: flex;
  26566. flex-wrap: wrap;
  26567. }
  26568. .add_info_box button {
  26569. margin: 0 5px 10px 0;
  26570. }
  26571. .add_info_box2 {
  26572. display: flex;
  26573. align-items: center;
  26574. flex-wrap: wrap;
  26575. }
  26576. .add_info_box2::after {
  26577. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  26578. color: red;
  26579. font-size: 14px;
  26580. margin-bottom: 10px;
  26581. }
  26582. .add_chapters_box {
  26583. text-align: left;
  26584. background-color: #fff;
  26585. width: 100%;
  26586. border-radius: 4px;
  26587. font-size: 16px;
  26588. box-sizing: border-box;
  26589. position: relative;
  26590. padding: 0 15px;
  26591. height: auto;
  26592. overflow-y: auto;
  26593. overflow-x: hidden;
  26594. border: 1px solid #cad1dc;
  26595. }
  26596. .add_chapters_box.add_c_none {
  26597. display: flex;
  26598. justify-content: center;
  26599. align-items: center;
  26600. padding: 15px;
  26601. }
  26602. .add_c_none>img {
  26603. width: 25px;
  26604. }
  26605. .add_chapters_box.add_c_none>span {
  26606. font-size: 14px;
  26607. font-weight: 400;
  26608. margin: 0 0 5px 5px;
  26609. }
  26610. .homework_box {
  26611. display: flex;
  26612. align-items: flex-start;
  26613. flex-wrap: wrap;
  26614. margin: 15px 0 0 0;
  26615. flex-direction: column;
  26616. align-content: flex-start;
  26617. }
  26618. .course_homework {
  26619. display: flex;
  26620. justify-content: center;
  26621. flex-direction: row;
  26622. align-items: center;
  26623. margin: 0 10px 0 0;
  26624. }
  26625. .course_homework>>>.el-input__inner {
  26626. width: 140px;
  26627. margin-left: 15px;
  26628. }
  26629. .chapter_upload_move {
  26630. position: relative;
  26631. background-color: #fff;
  26632. position: absolute;
  26633. width: 100%;
  26634. top: 0px;
  26635. left: 0px;
  26636. border: 1px solid #eee;
  26637. border-radius: 5px;
  26638. transition: width 2s;
  26639. -moz-transition: width 2s;
  26640. -webkit-transition: width 2s;
  26641. -o-transition: width 2s;
  26642. }
  26643. .chapter_upload_l_i {
  26644. background-image: url("../../../assets/icon.png");
  26645. background-position: 3px -165px;
  26646. width: 30px;
  26647. height: 30px;
  26648. margin: 10px auto 0 auto;
  26649. }
  26650. .course_input_box {
  26651. display: flex;
  26652. margin-right: 20px;
  26653. min-width: 400px;
  26654. width: calc(100% - 350px);
  26655. align-items: center;
  26656. position: relative;
  26657. margin-bottom: 15px;
  26658. }
  26659. .course_input_box2 {
  26660. display: flex;
  26661. width: 100%;
  26662. align-items: center;
  26663. position: relative;
  26664. flex-wrap: wrap;
  26665. }
  26666. .course_input_box>.binfo_input {
  26667. width: calc(100%);
  26668. margin: 0;
  26669. border: 1.5px solid rgb(202, 209, 220);
  26670. border-radius: 5px;
  26671. font-weight: 600;
  26672. padding: 12px 14px 12px 71px;
  26673. }
  26674. .bb_courseIcon {
  26675. width: 57px;
  26676. height: 45px;
  26677. background: #f0f4fa;
  26678. border-radius: 5px 0px 0px 5px;
  26679. display: flex;
  26680. align-items: center;
  26681. justify-content: center;
  26682. border-right: 1.5px solid rgb(202, 209, 220);
  26683. box-sizing: border-box;
  26684. position: absolute;
  26685. left: 1.5px;
  26686. }
  26687. .bb_courseIcon>img {
  26688. width: 25px;
  26689. height: auto;
  26690. }
  26691. .big_box {
  26692. /* margin-top: 20px; */
  26693. display: flex;
  26694. justify-content: space-between;
  26695. /* border-bottom: 1px solid #E0E2ED; */
  26696. }
  26697. .left_first {
  26698. display: flex;
  26699. flex-direction: column;
  26700. flex-wrap: nowrap;
  26701. width: calc(100% - 310px);
  26702. padding: 20px;
  26703. box-sizing: border-box;
  26704. background: #fff;
  26705. border-radius: 5px;
  26706. }
  26707. .right_first {
  26708. width: 300px;
  26709. display: flex;
  26710. align-items: center;
  26711. justify-content: center;
  26712. /* border-left: 1px solid #E0E2ED; */
  26713. box-sizing: border-box;
  26714. padding: 20px;
  26715. flex-direction: column;
  26716. background: #fff;
  26717. border-radius: 5px;
  26718. }
  26719. .ai_box {
  26720. width: 204px;
  26721. display: flex;
  26722. justify-content: flex-end;
  26723. margin-bottom: 15px;
  26724. }
  26725. .ai_content {
  26726. display: flex;
  26727. align-items: center;
  26728. font-size: 14px;
  26729. padding: 7px 20px;
  26730. box-sizing: border-box;
  26731. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  26732. border-radius: 12px;
  26733. font-weight: 700;
  26734. cursor: pointer;
  26735. }
  26736. .ai_content>img {
  26737. width: 40px;
  26738. margin-right: 5px;
  26739. }
  26740. .c_info_title {
  26741. padding: 15px 0 15px 0;
  26742. font-size: 16px;
  26743. font-weight: bold;
  26744. margin: 0 0 0 20px;
  26745. box-sizing: border-box;
  26746. display: flex;
  26747. align-items: center;
  26748. line-height: 20px;
  26749. }
  26750. .c_info_title::before {
  26751. content: "";
  26752. display: block;
  26753. width: 3px;
  26754. height: 20px;
  26755. background: #0061ff;
  26756. border-radius: 3px;
  26757. margin: 0 5px 0 0;
  26758. }
  26759. .right_title {
  26760. height: 30px;
  26761. padding: 15px 0 15px 20px;
  26762. border-bottom: 1px solid #f2f2f2;
  26763. font-size: 1.5em;
  26764. font-weight: bold;
  26765. color: #0f7eff;
  26766. margin: 0 auto;
  26767. }
  26768. .people {
  26769. border: 1px solid rgb(229 229 229);
  26770. /* height: 495px; */
  26771. height: 350px;
  26772. border-radius: 5px;
  26773. width: 100%;
  26774. overflow: auto;
  26775. }
  26776. .people_top {
  26777. display: flex;
  26778. width: 100%;
  26779. /* justify-content: space-between; */
  26780. /* align-items: center; */
  26781. flex-direction: column;
  26782. padding: 10px 10px 0;
  26783. box-sizing: border-box;
  26784. }
  26785. .people_nav,
  26786. .people_top_right {
  26787. /* padding: 20px 0 0 20px; */
  26788. }
  26789. .people_top_right {
  26790. height: 40px;
  26791. margin-bottom: 10px;
  26792. }
  26793. .people_search {
  26794. display: flex;
  26795. position: relative;
  26796. }
  26797. .people_search>>>.el-input__inner {
  26798. /* height: 25px; */
  26799. width: 100%;
  26800. }
  26801. .search_img {
  26802. width: 20px;
  26803. height: 20px;
  26804. position: absolute;
  26805. right: 10px;
  26806. top: 50%;
  26807. transform: translateY(-50%);
  26808. }
  26809. .search_img>img {
  26810. width: 100%;
  26811. height: 100%;
  26812. }
  26813. .people_name {
  26814. display: flex;
  26815. justify-content: flex-start;
  26816. padding: 20px 10px;
  26817. flex-direction: column;
  26818. flex-wrap: wrap;
  26819. }
  26820. .p_box {
  26821. position: relative;
  26822. }
  26823. .people_name>>>.el-checkbox {
  26824. width: 100%;
  26825. display: flex;
  26826. align-items: center;
  26827. margin-bottom: 10px;
  26828. }
  26829. .people_name>>>.el-checkbox__label {
  26830. text-overflow: ellipsis;
  26831. overflow: hidden;
  26832. width: calc(100%);
  26833. }
  26834. .people_name2>>>.el-checkbox__label {
  26835. width: calc(100% - 130px);
  26836. }
  26837. .inviteCode {
  26838. position: absolute;
  26839. right: 30px;
  26840. color: #237ade;
  26841. top: 0;
  26842. cursor: pointer;
  26843. font-size: 13px;
  26844. }
  26845. .noneInvite {
  26846. color: #a8a8a8;
  26847. }
  26848. .inviteImg {
  26849. position: absolute;
  26850. right: 5px;
  26851. top: 0;
  26852. width: 20px;
  26853. }
  26854. .right_img {
  26855. width: 150px;
  26856. height: 150px;
  26857. margin: 0 auto;
  26858. }
  26859. .right_img>img {
  26860. width: 100%;
  26861. height: 100%;
  26862. }
  26863. .number {
  26864. margin-top: 20px;
  26865. color: #4aa6ff;
  26866. text-decoration: underline;
  26867. }
  26868. .success_button {
  26869. display: flex;
  26870. text-align: center;
  26871. margin: 5% 0 auto;
  26872. flex-direction: row;
  26873. justify-content: center;
  26874. }
  26875. .look_course {
  26876. margin-right: 40px;
  26877. background: #3d67bc;
  26878. width: 200px;
  26879. height: 35px;
  26880. line-height: 35px;
  26881. color: #fff;
  26882. text-align: center;
  26883. font-size: 14px;
  26884. border-radius: 5px;
  26885. cursor: pointer;
  26886. }
  26887. .attend_others {
  26888. width: 250px;
  26889. background: #4fb13c;
  26890. height: 35px;
  26891. line-height: 35px;
  26892. color: #fff;
  26893. text-align: center;
  26894. font-size: 14px;
  26895. border-radius: 5px;
  26896. cursor: pointer;
  26897. }
  26898. .dialog_diy2>>>.el-dialog__body {
  26899. text-align: center;
  26900. }
  26901. .write_togother {
  26902. position: absolute;
  26903. right: 45px;
  26904. display: flex;
  26905. top: 5%;
  26906. }
  26907. .write_people {
  26908. font-size: 14px;
  26909. line-height: 50px;
  26910. padding-right: 10px;
  26911. }
  26912. .end_write {
  26913. background: #3d67bc;
  26914. color: #fff;
  26915. width: 100px;
  26916. height: 35px;
  26917. line-height: 35px;
  26918. text-align: center;
  26919. font-size: 14px;
  26920. border-radius: 5px;
  26921. cursor: pointer;
  26922. }
  26923. .chapter_upload+.chapter_upload {
  26924. /* margin-top: 15px; */
  26925. border-top: 1px solid #e7ebf1;
  26926. }
  26927. .chapter_upload {
  26928. height: 45px;
  26929. position: relative;
  26930. display: flex;
  26931. align-items: center;
  26932. width: 100%;
  26933. min-height: 45px;
  26934. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  26935. /* border-radius: 4px; */
  26936. /* overflow: hidden; */
  26937. box-sizing: border-box;
  26938. }
  26939. .chapter_upload_drag {
  26940. position: absolute;
  26941. cursor: pointer;
  26942. width: 16px;
  26943. height: 16px;
  26944. left: -9px;
  26945. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  26946. background-size: 100% 100%;
  26947. z-index: 10;
  26948. display: none;
  26949. }
  26950. .isNavStage>.chapter_upload_drag {
  26951. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  26952. }
  26953. .chapter_upload_t {
  26954. background-color: #fff;
  26955. position: absolute;
  26956. height: 100%;
  26957. top: 0px;
  26958. left: 0px;
  26959. box-sizing: border-box;
  26960. }
  26961. .chapter_upload_o {
  26962. width: 100%;
  26963. height: 100%;
  26964. position: relative;
  26965. z-index: 1;
  26966. }
  26967. .chapter_upload_ic {
  26968. margin: 0 15px 0px auto;
  26969. display: flex;
  26970. align-items: center;
  26971. }
  26972. .chapter_upload_type{
  26973. width: 80px;
  26974. min-width: 80px;
  26975. text-align: center;
  26976. font-size: 14px;
  26977. }
  26978. .chapter_upload_box_file{
  26979. height: calc(100% - 45px);
  26980. overflow: auto;
  26981. border-top: 1px solid #e7ebf1;
  26982. box-sizing: border-box;
  26983. }
  26984. .chapter_upload_ic_l {
  26985. width: 50px;
  26986. height: 50px;
  26987. float: left;
  26988. }
  26989. .chapter_upload_ic_l div {
  26990. width: 30px;
  26991. height: 35px;
  26992. background: url("../../../assets/icon/icon.png");
  26993. }
  26994. .chapter_upload_ic_edit {
  26995. height: 100%;
  26996. display: flex;
  26997. align-items: center;
  26998. cursor: pointer;
  26999. margin: 0 10px 0 0;
  27000. }
  27001. .chapter_upload_ic_edit div {
  27002. width: 18px;
  27003. height: 18px;
  27004. background-image: url("../../../assets/icon/new/edit_u.png");
  27005. background-size: 100% 100%;
  27006. }
  27007. .chapter_upload_ic_download {
  27008. height: 100%;
  27009. display: flex;
  27010. align-items: center;
  27011. cursor: pointer;
  27012. margin: 0;
  27013. }
  27014. .chapter_upload_ic_download div {
  27015. width: 18px;
  27016. height: 18px;
  27017. background-image: url("../../../assets/icon/course/download.svg");
  27018. background-size: 100% 100%;
  27019. }
  27020. .chapter_upload_ic_check {
  27021. height: 100%;
  27022. display: flex;
  27023. align-items: center;
  27024. cursor: pointer;
  27025. margin: 0 10px 0 0;
  27026. }
  27027. .chapter_upload_ic_check div {
  27028. width: 18px;
  27029. height: 18px;
  27030. background-image: url("../../../assets/icon/course/lookeye.svg");
  27031. background-size: 100% 100%;
  27032. }
  27033. .chapter_upload_ic_r {
  27034. height: 100%;
  27035. display: flex;
  27036. align-items: center;
  27037. cursor: pointer;
  27038. }
  27039. .chapter_upload_ic_r div {
  27040. width: 18px;
  27041. height: 18px;
  27042. background-image: url("../../../assets/icon/new/delete_u.png");
  27043. background-size: 100% 100%;
  27044. }
  27045. .chapter_upload_n {
  27046. display: flex;
  27047. text-indent: 10px;
  27048. text-decoration: none;
  27049. text-overflow: ellipsis;
  27050. white-space: nowrap;
  27051. overflow: hidden;
  27052. width: 55%;
  27053. margin-left: 10px;
  27054. cursor: pointer;
  27055. margin-top: 2px;
  27056. align-items: center;
  27057. }
  27058. .chapter_upload_n > .chapter_upload_box{
  27059. border: none;
  27060. outline: none;
  27061. max-width: 100%;
  27062. z-index: 99;
  27063. font-size: 14px;
  27064. white-space: nowrap;
  27065. overflow: hidden;
  27066. text-overflow: ellipsis;
  27067. color: #757575;
  27068. }
  27069. .chapter_upload_l_i2,
  27070. .chapter_upload_l_i3,
  27071. .chapter_upload_l_i8,
  27072. .chapter_upload_l_i6,
  27073. .chapter_upload_l_i12,
  27074. .chapter_upload_l_i14,
  27075. .chapter_upload_l_i15 {
  27076. width: 15px;
  27077. height: 15px;
  27078. background-size: 100% 100%;
  27079. }
  27080. .chapter_upload_l_i2 {
  27081. background-image: url("../../../assets/icon/new/u_word.png");
  27082. }
  27083. .chapter_upload_l_i3 {
  27084. background-image: url("../../../assets/icon/new/u_video.png");
  27085. }
  27086. .chapter_upload_l_i8 {
  27087. background-image: url("../../../assets/icon/new/u_url.png");
  27088. }
  27089. .chapter_upload_l_i14 {
  27090. background-image: url("../../../assets/icon/new/u_source.png");
  27091. }
  27092. .chapter_upload_l_i15 {
  27093. background-image: url("../../../assets/icon/new/appStore.png");
  27094. }
  27095. .chapter_upload_l_i6 {
  27096. background-image: url("../../../assets/icon/new/u_picture.png");
  27097. }
  27098. .chapter_upload_l_i12 {
  27099. background-image: url("../../../assets/icon/new/u_word.png");
  27100. }
  27101. .chapter_upload_l_i13 {
  27102. background-image: url("../../../assets/icon/new/u_img.png");
  27103. }
  27104. .chapter_upload_noSee {
  27105. background-image: url("../../../assets/icon/new/u_noUpload.png");
  27106. width: 18px;
  27107. height: 18px;
  27108. background-size: 100% 100%;
  27109. display: block;
  27110. margin-right: 10px;
  27111. }
  27112. .chapter_upload_ud {
  27113. display: flex;
  27114. flex-direction: row;
  27115. justify-content: center;
  27116. margin: 0 10px 0 0;
  27117. }
  27118. .chapter_upload_ud>.chapter_upload_up {
  27119. margin-bottom: 0;
  27120. margin-right: 10px;
  27121. }
  27122. .chapter_upload_down,
  27123. .chapter_upload_up {
  27124. width: 20px;
  27125. height: 20px;
  27126. background: #e4eaf2;
  27127. cursor: pointer;
  27128. margin: 0 auto;
  27129. border-radius: 5px;
  27130. display: flex;
  27131. justify-content: center;
  27132. align-items: center;
  27133. }
  27134. .chapter_upload_up::after,
  27135. .chapter_upload_down::after {
  27136. content: "";
  27137. background-image: url("../../../assets/icon/new/downBtn.png");
  27138. width: 13px;
  27139. height: 13px;
  27140. background-size: 100% 100%;
  27141. display: block;
  27142. }
  27143. .chapter_upload_up::after {
  27144. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  27145. }
  27146. .chapter_upload_up {
  27147. margin-bottom: 5px;
  27148. }
  27149. .chapter_upload_ud2 {
  27150. display: flex;
  27151. flex-direction: row;
  27152. justify-content: center;
  27153. margin: 0 10px 0 0;
  27154. }
  27155. .chapter_upload_ud2>.chapter_upload_up2 {
  27156. margin-bottom: 0;
  27157. margin-right: 10px;
  27158. }
  27159. .chapter_upload_down2,
  27160. .chapter_upload_up2 {
  27161. cursor: pointer;
  27162. margin: 0 auto;
  27163. border-radius: 5px;
  27164. display: flex;
  27165. justify-content: center;
  27166. align-items: center;
  27167. color: #717c8d;
  27168. font-size: 14px;
  27169. }
  27170. .chapter_upload_up2 {
  27171. margin-right: 10px;
  27172. }
  27173. .chapter_upload_up2::before,
  27174. .chapter_upload_down2::before {
  27175. content: "";
  27176. background-image: url("../../../assets/icon/new/c_down.png");
  27177. width: 14px;
  27178. height: 14px;
  27179. background-size: 100% 100%;
  27180. display: block;
  27181. margin-right: 5px;
  27182. }
  27183. .chapter_upload_up2::before {
  27184. background-image: url("../../../assets/icon/new/c_up.png") !important;
  27185. }
  27186. .addWordStyle {
  27187. display: flex;
  27188. flex-direction: row;
  27189. justify-content: flex-start;
  27190. overflow-x: auto;
  27191. white-space: nowrap;
  27192. flex-wrap: wrap;
  27193. }
  27194. /* table 样式 */
  27195. .cont>>>table {
  27196. border-top: 1px solid #ccc;
  27197. border-left: 1px solid #ccc;
  27198. }
  27199. .cont>>>table td,
  27200. .cont>>>table th {
  27201. border-bottom: 1px solid #ccc;
  27202. border-right: 1px solid #ccc;
  27203. /* padding: 20px 5px; */
  27204. padding: 5px 10px;
  27205. max-width: 0px;
  27206. height: 30px;
  27207. vertical-align: baseline;
  27208. }
  27209. .cont>>>table th {
  27210. border-bottom: 2px solid #ccc;
  27211. text-align: center;
  27212. }
  27213. /* blockquote 样式 */
  27214. .cont>>>blockquote {
  27215. display: block;
  27216. border-left: 8px solid #d0e5f2;
  27217. padding: 5px 10px;
  27218. margin: 10px 0;
  27219. line-height: 1.4;
  27220. font-size: 100%;
  27221. background-color: #f1f1f1;
  27222. }
  27223. /* code 样式 */
  27224. .cont>>>code {
  27225. display: inline-block;
  27226. /* *display: inline; */
  27227. zoom: 1;
  27228. background-color: #f1f1f1;
  27229. border-radius: 3px;
  27230. padding: 3px 5px;
  27231. margin: 0 3px;
  27232. }
  27233. .cont>>>pre code {
  27234. display: block;
  27235. }
  27236. /* ul ol 样式 */
  27237. .cont>>>ul,
  27238. ol {
  27239. margin: 10px 0 10px 20px;
  27240. }
  27241. .wordbox {
  27242. display: flex;
  27243. flex-wrap: wrap;
  27244. cursor: pointer;
  27245. width: 100%;
  27246. }
  27247. .checkword {
  27248. width: 22px;
  27249. height: 22px;
  27250. margin: 10px auto 0;
  27251. cursor: pointer;
  27252. }
  27253. .checkword img {
  27254. width: 100%;
  27255. }
  27256. .stepBg {
  27257. display: flex;
  27258. justify-content: space-between;
  27259. align-items: center;
  27260. background: #fff;
  27261. width: calc(100%);
  27262. margin: 0 auto;
  27263. }
  27264. .stepBorder {
  27265. height: 3px !important;
  27266. background: #cad1dc;
  27267. width: 100px !important;
  27268. margin: 0 15px !important;
  27269. position: relative;
  27270. }
  27271. .border-active {
  27272. background: #3681fc !important;
  27273. }
  27274. .border-active::before,
  27275. .border-active::after {
  27276. border-color: #3681fc !important;
  27277. }
  27278. .stepBorder::before,
  27279. .stepBorder::after {
  27280. content: "";
  27281. width: 9px;
  27282. height: 9px;
  27283. background: #ffffff;
  27284. opacity: 1;
  27285. border: 2px solid #acb4bf;
  27286. display: block;
  27287. box-sizing: border-box;
  27288. border-radius: 50%;
  27289. position: absolute;
  27290. top: 50%;
  27291. transform: translateY(-50%);
  27292. }
  27293. .stepBorder::after {
  27294. right: -9px;
  27295. }
  27296. .stepTop {
  27297. width: 100%;
  27298. /* border-radius: 10px; */
  27299. display: flex;
  27300. justify-content: center;
  27301. align-items: center;
  27302. flex-wrap: nowrap;
  27303. background: #fff;
  27304. /* top: 18%; */
  27305. height: 80px;
  27306. border-bottom: 2px solid rgb(228, 232, 237);
  27307. box-sizing: border-box;
  27308. }
  27309. .stepTop2 {
  27310. width: 100%;
  27311. /* border-radius: 10px; */
  27312. display: flex;
  27313. justify-content: center;
  27314. align-items: center;
  27315. flex-wrap: nowrap;
  27316. background: #fff;
  27317. /* top: 18%; */
  27318. height: 20px;
  27319. border-bottom: 2px solid rgb(228, 232, 237);
  27320. box-sizing: border-box;
  27321. overflow: hidden;
  27322. cursor: pointer;
  27323. }
  27324. .stepTop>div img {
  27325. width: 100%;
  27326. }
  27327. .stepTop>div {
  27328. height: 50px;
  27329. width: 180px;
  27330. cursor: pointer;
  27331. margin: 10px 0;
  27332. border-radius: 10px;
  27333. }
  27334. .first,
  27335. .second,
  27336. .third,
  27337. .four {
  27338. background: #3681fc;
  27339. height: 90px;
  27340. color: #fff;
  27341. display: flex;
  27342. flex-direction: row;
  27343. align-items: center;
  27344. justify-content: center;
  27345. }
  27346. .first>div:nth-child(1),
  27347. .second>div:nth-child(1),
  27348. .third>div:nth-child(1),
  27349. .four>div:nth-child(1) {
  27350. margin: 5px 10px 0 0;
  27351. width: 2rem;
  27352. }
  27353. .firstNo,
  27354. .secondNo,
  27355. .thirdNo,
  27356. .fourNo {
  27357. background: #e7e7e7;
  27358. color: #adadad;
  27359. display: flex;
  27360. flex-direction: row;
  27361. align-items: center;
  27362. justify-content: center;
  27363. }
  27364. .firstNo>div:nth-child(1),
  27365. .secondNo>div:nth-child(1),
  27366. .thirdNo>div:nth-child(1),
  27367. .fourNo>div:nth-child(1) {
  27368. margin: 5px 10px 0 0;
  27369. width: 2rem;
  27370. }
  27371. .uploadWidth>>>.el-upload {
  27372. width: 60px;
  27373. height: 60px;
  27374. position: relative;
  27375. }
  27376. .addPeople {
  27377. background: #fa6060;
  27378. width: 150px;
  27379. height: 40px;
  27380. color: #fff;
  27381. border-radius: 5px;
  27382. text-align: center;
  27383. line-height: 40px;
  27384. font-size: 14px;
  27385. cursor: pointer;
  27386. }
  27387. .kcImg {
  27388. width: 60px;
  27389. margin-left: 10px;
  27390. }
  27391. .zyImg {
  27392. width: 55px;
  27393. margin: 0 10px;
  27394. }
  27395. .deleteZy {
  27396. width: 20px;
  27397. position: absolute;
  27398. top: 5px;
  27399. right: 5px;
  27400. cursor: pointer;
  27401. }
  27402. .kcImg>img,
  27403. .zyImg>img,
  27404. .deleteZy>img {
  27405. width: 100%;
  27406. height: 100%;
  27407. }
  27408. .zyBox {
  27409. display: flex;
  27410. flex-direction: row;
  27411. align-items: center;
  27412. background: #67d37d;
  27413. color: #fff;
  27414. width: 210px;
  27415. margin: 20px 20px 0 0;
  27416. border-radius: 10px;
  27417. height: 70px;
  27418. position: relative;
  27419. }
  27420. .upCss {
  27421. display: flex;
  27422. flex-direction: row;
  27423. justify-content: flex-start;
  27424. }
  27425. .upCss>>>.el-icon-plus {
  27426. position: none !important;
  27427. width: 200px;
  27428. height: 100px;
  27429. display: flex;
  27430. flex-wrap: nowrap;
  27431. flex-direction: column;
  27432. align-items: center;
  27433. justify-content: center;
  27434. border: 1px dashed #ccc;
  27435. min-width: 78px;
  27436. min-height: 100px;
  27437. z-index: 999;
  27438. }
  27439. .upCss>>>.el-upload-list__item-name {
  27440. width: 100px;
  27441. white-space: nowrap;
  27442. overflow: hidden;
  27443. text-overflow: ellipsis;
  27444. }
  27445. .upCss>>>.el-upload-list__item .el-icon-close {
  27446. font-size: 20px;
  27447. z-index: 9999;
  27448. }
  27449. .addStageImg {
  27450. min-width: 20px;
  27451. min-height: 20px;
  27452. width: 20px;
  27453. height: 20px;
  27454. cursor: pointer;
  27455. }
  27456. .addHW {
  27457. width: 28px;
  27458. height: 28px;
  27459. cursor: pointer;
  27460. }
  27461. .addStageImg>img,
  27462. .addHW>img {
  27463. width: 100%;
  27464. height: 100%;
  27465. }
  27466. .addNewPP>>>.el-dialog__body {
  27467. padding: 5px 20px;
  27468. }
  27469. .addNewPP>>>.el-dialog {
  27470. margin-top: 5vh !important;
  27471. }
  27472. .addNewPP2>>>.el-dialog__body {
  27473. padding: 5px 0;
  27474. }
  27475. .addNewPP2>>>.el-dialog {
  27476. margin-top: 5vh !important;
  27477. }
  27478. .isHeight {
  27479. height: 680px;
  27480. }
  27481. .toolChoose {
  27482. display: flex;
  27483. /* width: 100%; */
  27484. flex-direction: row;
  27485. flex-wrap: wrap;
  27486. }
  27487. .tool,
  27488. .isToolChoose {
  27489. display: flex;
  27490. flex-direction: column;
  27491. flex-wrap: nowrap;
  27492. width: fit-content;
  27493. margin: 10px 0 10px 0;
  27494. align-items: center;
  27495. border: 2px solid #dbdbdb00;
  27496. padding: 10px 20px;
  27497. border-radius: 5px;
  27498. cursor: pointer;
  27499. /* box-shadow: 0 0 2px 0px #dedede; */
  27500. position: relative;
  27501. box-sizing: border-box;
  27502. }
  27503. .tool:hover {
  27504. border: 2px solid #a5c7ff;
  27505. }
  27506. .tool:hover>.noCTool {
  27507. display: block;
  27508. opacity: 0.5;
  27509. }
  27510. .isToolChoose {
  27511. border: 2px solid #438aff !important;
  27512. box-shadow: 0 0 2px 0px #438aff;
  27513. opacity: 1 !important;
  27514. }
  27515. .isCTool,
  27516. .noCTool {
  27517. width: 30px;
  27518. height: 30px;
  27519. position: absolute;
  27520. top: -4px;
  27521. right: -4px;
  27522. }
  27523. .noCTool {
  27524. display: none;
  27525. }
  27526. .isCTool>img,
  27527. .noCTool>img {
  27528. width: 100%;
  27529. height: 100%;
  27530. }
  27531. .tool+.tool {
  27532. margin-right: 10px;
  27533. }
  27534. .whiteBIcon {
  27535. width: 60px;
  27536. cursor: pointer;
  27537. display: flex;
  27538. flex-direction: column;
  27539. flex-wrap: nowrap;
  27540. align-items: center;
  27541. font-size: 14px;
  27542. }
  27543. .whiteBIcon>img,
  27544. .toolIcon>img,
  27545. .arrow>img {
  27546. width: 100%;
  27547. height: 100%;
  27548. }
  27549. .check img {
  27550. width: 20px;
  27551. height: 20px;
  27552. }
  27553. .whiteBIcon>img {
  27554. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  27555. border-radius: 15px;
  27556. }
  27557. .whiteBIcon>div:nth-child(2) {
  27558. height: 20px;
  27559. line-height: 20px;
  27560. text-align: center;
  27561. }
  27562. .check {
  27563. /* width: 20px;
  27564. height: 20px; */
  27565. cursor: pointer;
  27566. margin: 10px 0 0;
  27567. }
  27568. .checkDiv {
  27569. display: flex;
  27570. align-items: center;
  27571. }
  27572. .checkDiv span {
  27573. margin-left: 5px;
  27574. color: #858585;
  27575. }
  27576. .customWidth>>>.el-dialog {
  27577. min-width: 600px !important;
  27578. }
  27579. .CollaborativeCss {
  27580. width: 100%;
  27581. display: flex;
  27582. justify-content: center;
  27583. align-items: center;
  27584. box-sizing: border-box;
  27585. padding: 10px 0;
  27586. cursor: pointer;
  27587. }
  27588. .CollaborativeCss >>> .el-tooltip {
  27589. overflow: hidden;
  27590. white-space: nowrap;
  27591. text-overflow: ellipsis;
  27592. }
  27593. .CollaborativeCss2 {
  27594. background: #e0eafb;
  27595. color: #3681fc;
  27596. font-weight: 700;
  27597. border-radius: 5px;
  27598. }
  27599. .a_addBox {
  27600. margin: 10px 0;
  27601. background: #fff;
  27602. padding: 15px;
  27603. /* max-height: 600px; */
  27604. overflow: auto;
  27605. }
  27606. .a_add_box {
  27607. border-bottom: 2px solid #eee;
  27608. padding-bottom: 25px;
  27609. }
  27610. .a_add_head {
  27611. display: flex;
  27612. align-items: center;
  27613. justify-content: space-between;
  27614. margin: 10px 0 0 0;
  27615. font-size: 18px;
  27616. }
  27617. .a_add_checkType {
  27618. margin-top: 10px;
  27619. display: flex;
  27620. font-size: 14px;
  27621. align-items: center;
  27622. }
  27623. .a_add_checkType span {
  27624. box-sizing: border-box;
  27625. padding: 0 0 5px 0;
  27626. cursor: pointer;
  27627. }
  27628. .a_add_checkType span+span {
  27629. margin-left: 10px;
  27630. }
  27631. .a_add_checkType .active {
  27632. border-bottom: 2px solid #409eff;
  27633. color: #409eff;
  27634. }
  27635. .a_add_head .a_add_head_input {
  27636. /* width: 540px; */
  27637. width: 100%;
  27638. }
  27639. .a_add_head .a_add_head_div {
  27640. display: flex;
  27641. align-items: center;
  27642. justify-content: space-between;
  27643. }
  27644. .a_add_body {
  27645. display: flex;
  27646. /* align-items: center; */
  27647. align-items: flex-end;
  27648. }
  27649. .a_add_input {
  27650. display: flex;
  27651. align-items: center;
  27652. flex-wrap: wrap;
  27653. }
  27654. .a_add_input_choice {
  27655. flex-direction: column;
  27656. margin-right: 10px;
  27657. }
  27658. .a_add_input_choice>>>.el-radio {
  27659. display: flex;
  27660. align-items: center;
  27661. flex-direction: row-reverse;
  27662. margin: 30px 0 0 0;
  27663. position: relative;
  27664. }
  27665. .a_add_input_choice>>>.el-checkbox {
  27666. display: flex;
  27667. align-items: center;
  27668. flex-direction: row-reverse;
  27669. margin: 30px 0 0 0;
  27670. position: relative;
  27671. }
  27672. .width100 {
  27673. width: 100%;
  27674. }
  27675. .a_add_input .a_add_persent {
  27676. width: 100%;
  27677. }
  27678. .a_add_persent_div {
  27679. width: 100%;
  27680. display: flex;
  27681. align-items: center;
  27682. }
  27683. .a_add_persent_div span {
  27684. margin: 5px 0;
  27685. }
  27686. .a_add_persent_div span:nth-child(1) {
  27687. width: 30%;
  27688. }
  27689. .a_add_persent_div span:nth-child(2) {
  27690. width: 7%;
  27691. }
  27692. .a_add_persent_div span:nth-child(3) {
  27693. width: 40%;
  27694. }
  27695. .a_add_body_div {
  27696. display: flex;
  27697. align-items: center;
  27698. justify-content: center;
  27699. /* flex-direction: column; */
  27700. position: absolute;
  27701. right: -20px;
  27702. transform: translateX(100%);
  27703. }
  27704. .a_add_body_div>>>.el-button--primary {
  27705. background: #466b99;
  27706. border: none;
  27707. }
  27708. .all_choose {
  27709. display: flex;
  27710. flex-direction: row;
  27711. align-items: flex-start;
  27712. width: 100%;
  27713. }
  27714. .all_choose+.all_choose {
  27715. /* margin-top: 10px */
  27716. }
  27717. .all_choose>span {
  27718. min-width: fit-content;
  27719. display: block;
  27720. white-space: nowrap;
  27721. overflow: hidden;
  27722. text-overflow: ellipsis;
  27723. margin-right: 20px;
  27724. font-weight: bold;
  27725. font-size: 14px;
  27726. }
  27727. .all_choose>>>.el-checkbox-group {
  27728. display: flex;
  27729. flex-direction: row;
  27730. width: 100%;
  27731. flex-wrap: wrap;
  27732. align-content: center;
  27733. justify-content: flex-start;
  27734. align-items: center;
  27735. margin-top: 3px;
  27736. }
  27737. .all_choose>.el-checkbox-group>>>.el-checkbox {
  27738. margin-bottom: 10px;
  27739. display: flex;
  27740. flex-direction: row;
  27741. align-items: center;
  27742. margin-right: 10px;
  27743. }
  27744. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  27745. min-width: 80px;
  27746. overflow: hidden;
  27747. width: 80px;
  27748. text-overflow: ellipsis;
  27749. white-space: nowrap;
  27750. }
  27751. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  27752. width: auto;
  27753. }
  27754. .choose>div:nth-child(3)>span {
  27755. /* letter-spacing: 0 !important; */
  27756. }
  27757. .choose {
  27758. display: flex;
  27759. flex-direction: column;
  27760. flex-wrap: nowrap;
  27761. height: 100%;
  27762. justify-content: space-evenly;
  27763. align-items: flex-start;
  27764. }
  27765. .both {
  27766. display: flex;
  27767. flex-direction: row;
  27768. flex-wrap: wrap;
  27769. width: 100%;
  27770. align-items: center;
  27771. justify-content: flex-start;
  27772. margin: 0 0 15px;
  27773. }
  27774. .notice>>>.el-dialog {
  27775. width: 500px !important;
  27776. text-align: center;
  27777. }
  27778. .notice>>>.el-button {
  27779. margin-top: 20px;
  27780. }
  27781. .whiteBg {
  27782. /* background: #fff; */
  27783. border-radius: 10px;
  27784. }
  27785. .wb_j_box {
  27786. display: flex;
  27787. width: 100%;
  27788. padding: 0 20px 0;
  27789. box-sizing: border-box;
  27790. }
  27791. .wb_j_box_content {
  27792. width: calc(100% - 55% - 100px);
  27793. display: flex;
  27794. align-items: center;
  27795. }
  27796. .wb_j_box_p_box {
  27797. max-width: calc(100% - 200px);
  27798. word-break: break-all;
  27799. overflow: hidden;
  27800. margin: 0 0 0 10px;
  27801. font-size: 14px;
  27802. color: #6e6e6e;
  27803. z-index: 999;
  27804. }
  27805. .chooseWho {
  27806. display: flex;
  27807. width: 410px;
  27808. flex-direction: row;
  27809. flex-wrap: nowrap;
  27810. justify-content: space-between;
  27811. padding-bottom: 10px;
  27812. }
  27813. .chooseWho>div {
  27814. cursor: pointer;
  27815. padding-bottom: 10px;
  27816. font-weight: bold;
  27817. }
  27818. .isChooseActive {
  27819. color: #3e88f4;
  27820. border-bottom: 2px solid #2f80f3;
  27821. }
  27822. .toolSort {
  27823. display: flex;
  27824. flex-direction: row;
  27825. flex-wrap: wrap;
  27826. justify-content: flex-start;
  27827. align-items: flex-start;
  27828. }
  27829. .toolSort>div {
  27830. margin-right: 10px;
  27831. }
  27832. .tools {
  27833. width: 100%;
  27834. display: flex;
  27835. flex-direction: column;
  27836. flex-wrap: nowrap;
  27837. align-items: flex-start;
  27838. }
  27839. .leftTools,
  27840. .rightTools {
  27841. width: 50%;
  27842. }
  27843. .leftTools+.leftTools {
  27844. border-top: 1px solid #dbdbdb;
  27845. padding-top: 30px;
  27846. }
  27847. .rightTools {
  27848. display: flex;
  27849. flex-direction: row;
  27850. flex-wrap: nowrap;
  27851. justify-content: space-around;
  27852. }
  27853. .firstToolList {
  27854. display: flex;
  27855. flex-direction: column;
  27856. flex-wrap: nowrap;
  27857. align-items: center;
  27858. }
  27859. .iconList {
  27860. display: flex;
  27861. flex-direction: row;
  27862. flex-wrap: wrap;
  27863. justify-content: flex-start;
  27864. align-items: center;
  27865. margin: 20px 0 5px 0;
  27866. width: 240px;
  27867. min-width: 240px;
  27868. }
  27869. .iconTool {
  27870. display: flex;
  27871. flex-direction: column;
  27872. flex-wrap: nowrap;
  27873. align-items: center;
  27874. justify-content: flex-start;
  27875. margin: 15px 10px;
  27876. }
  27877. .toolIcon {
  27878. width: 50px;
  27879. }
  27880. .taskBorder {
  27881. /* border: 1px solid #CAD1DC; */
  27882. border-radius: 10px;
  27883. margin-top: 10px;
  27884. min-height: 670px;
  27885. position: relative;
  27886. background: #fff;
  27887. padding: 20px;
  27888. overflow: hidden;
  27889. box-sizing: border-box;
  27890. }
  27891. .smallTaskBorder {
  27892. height: 405px;
  27893. min-height: 405px !important;
  27894. overflow: hidden;
  27895. }
  27896. /* .taskBorder>div {
  27897. padding: 30px 30px 10px;
  27898. } */
  27899. .addTaskBorder {
  27900. /* border: 2px solid #5E9AFC; */
  27901. border-radius: 8px;
  27902. margin-top: 10px;
  27903. cursor: pointer;
  27904. /* height: 50px;
  27905. line-height: 50px; */
  27906. background: #fff;
  27907. padding: 15px 0;
  27908. display: flex;
  27909. align-items: center;
  27910. justify-content: center;
  27911. }
  27912. /* .addTaskBorder>div {
  27913. margin: 0 auto;
  27914. display: flex;
  27915. align-items: center;
  27916. justify-content: center;
  27917. }
  27918. .addTaskBorder>div>img {
  27919. width: 20px;
  27920. }
  27921. .addTaskBorder>div>span {
  27922. font-size: 16px;
  27923. margin-left: 10px;
  27924. color: #5E9AFC;
  27925. } */
  27926. .funBlock {
  27927. display: flex;
  27928. padding: 15px 0;
  27929. flex-direction: row;
  27930. justify-content: center;
  27931. align-items: center;
  27932. position: absolute;
  27933. right: 0;
  27934. bottom: 0;
  27935. background: #fff;
  27936. width: 100%;
  27937. height: 60px;
  27938. z-index: 9;
  27939. }
  27940. .fold {
  27941. display: flex;
  27942. margin: 0 20px;
  27943. flex-direction: row;
  27944. align-items: center;
  27945. cursor: pointer;
  27946. color: #2b7bff;
  27947. }
  27948. .arrow {
  27949. margin-right: 8px;
  27950. width: 16px;
  27951. height: 16px;
  27952. min-width: 16px;
  27953. min-height: 16px;
  27954. background-size: 100% 100%;
  27955. display: block;
  27956. background-image: url(../../../assets/icon/new/u_up.png);
  27957. /* border-left: 7px solid transparent;
  27958. border-bottom: 7px solid #717C8D;
  27959. border-top: 0px solid transparent;
  27960. border-right: 7px solid transparent; */
  27961. /* box-sizing: border-box; */
  27962. transition: all 0.3s;
  27963. }
  27964. .arrowZ {
  27965. transform: rotate(180deg);
  27966. }
  27967. .addToolFun {
  27968. display: flex;
  27969. width: 150px;
  27970. flex-direction: row;
  27971. align-items: center;
  27972. justify-content: center;
  27973. border: 2px dashed #cad1dc;
  27974. border-radius: 5px;
  27975. height: 50px;
  27976. margin: 35px auto 0;
  27977. cursor: pointer;
  27978. }
  27979. .addToolFun2 {
  27980. display: flex;
  27981. width: 150px;
  27982. border: 2px dashed #cad1dc;
  27983. flex-direction: row;
  27984. align-items: center;
  27985. justify-content: center;
  27986. border-radius: 5px;
  27987. height: 50px;
  27988. margin: 0 auto 0;
  27989. cursor: pointer;
  27990. }
  27991. .addToolFun2>div,
  27992. .addToolFun>div {
  27993. display: flex;
  27994. line-height: 50px;
  27995. }
  27996. .addToolImg {
  27997. width: 20px;
  27998. height: 20px;
  27999. margin-right: 10px;
  28000. }
  28001. .addToolsDia>>>.el-dialog__body {
  28002. padding: 20px;
  28003. }
  28004. .addToolsDia>>>.el-dialog__body>.toolChoose {
  28005. padding: 0;
  28006. }
  28007. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  28008. padding: 0;
  28009. border-bottom: none;
  28010. margin-bottom: 0;
  28011. }
  28012. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  28013. width: 100%;
  28014. }
  28015. .lineCss>>>.el-form-item__label {
  28016. width: auto !important;
  28017. }
  28018. .lineCss>>>.el-form-item__content {
  28019. margin-left: 50px !important;
  28020. }
  28021. .newSteps {
  28022. display: flex;
  28023. width: 100% !important;
  28024. /* height: 80px; */
  28025. cursor: pointer;
  28026. margin: 10px 0;
  28027. border-radius: 10px;
  28028. flex-direction: row;
  28029. align-content: center;
  28030. justify-content: center;
  28031. align-items: center;
  28032. margin: 0 !important;
  28033. }
  28034. /* 评价样式 */
  28035. .elist_css {
  28036. padding-bottom: 75px !important;
  28037. }
  28038. .elist_title {
  28039. margin-bottom: 10px;
  28040. }
  28041. .elist_input {
  28042. width: 100%;
  28043. }
  28044. .elist_input_box {
  28045. display: flex;
  28046. align-items: center;
  28047. flex-wrap: wrap;
  28048. }
  28049. .elist_input_box+.elist_input_box {
  28050. margin-top: 30px;
  28051. }
  28052. .elist_input .elist_input_box input {
  28053. font: inherit;
  28054. color: currentColor;
  28055. width: 100%;
  28056. /* max-width: calc(100% - 385px); */
  28057. max-width: calc(100% - 150px);
  28058. padding: 8px 14px;
  28059. display: block;
  28060. min-width: 0;
  28061. outline: none;
  28062. border: 1px solid rgba(0, 0, 0, 0.23);
  28063. border-radius: 4px;
  28064. box-sizing: border-box;
  28065. background: #fff;
  28066. margin: 0 20px 0 0;
  28067. }
  28068. .elist_input .elist_input_box span {
  28069. height: 36px;
  28070. line-height: 36px;
  28071. color: rgb(82, 82, 82);
  28072. min-width: 80px;
  28073. }
  28074. .elist_input .elist_input_box .remove {
  28075. height: 20px;
  28076. width: 20px;
  28077. min-height: 20px;
  28078. min-width: 20px;
  28079. background-size: 100% 100%;
  28080. background-position: unset;
  28081. margin-left: 5px;
  28082. }
  28083. .elist_input_box>>>.el-rate {
  28084. display: flex;
  28085. height: 36px;
  28086. align-items: center;
  28087. }
  28088. .elist_input_box .elist_inptu_text {
  28089. width: 100%;
  28090. display: flex;
  28091. align-items: center;
  28092. margin-top: 10px;
  28093. }
  28094. .elist_input_box .elist_inptu_text input {
  28095. /* width: 500px; */
  28096. width: 100%;
  28097. max-width: unset;
  28098. }
  28099. .elist_input_box>>>.el-rate__icon {
  28100. font-size: 24px;
  28101. }
  28102. .elist_btn {
  28103. margin-top: 10px;
  28104. }
  28105. .lineTitle {
  28106. /* margin-top: 15px; */
  28107. width: 110px;
  28108. font-size: 16px;
  28109. display: flex;
  28110. align-items: center;
  28111. line-height: 20px;
  28112. }
  28113. .lineTitle::before {
  28114. content: "";
  28115. display: block;
  28116. width: 3px;
  28117. height: 20px;
  28118. background: #0061ff;
  28119. border-radius: 3px;
  28120. margin: 0 5px 0 0;
  28121. }
  28122. .clineTitle::before {
  28123. content: "";
  28124. display: block;
  28125. min-width: 10px;
  28126. width: 10px;
  28127. height: 10px;
  28128. background: #0061ff;
  28129. border-radius: 50%;
  28130. margin: 0 5px 0 0;
  28131. }
  28132. .courseTop {
  28133. display: flex;
  28134. flex-direction: row;
  28135. justify-content: space-between;
  28136. align-items: center;
  28137. width: calc(100%);
  28138. margin: 0 auto;
  28139. padding: 10px 20px;
  28140. box-sizing: border-box;
  28141. position: absolute;
  28142. top: 0;
  28143. }
  28144. .stepsNav {
  28145. display: flex;
  28146. flex-direction: row;
  28147. justify-content: flex-start;
  28148. align-items: center;
  28149. }
  28150. .stepsWord {
  28151. font-size: 18px;
  28152. color: #fff;
  28153. font-weight: bold;
  28154. margin-left: auto;
  28155. background: rgb(15, 126, 255);
  28156. border-radius: 5px;
  28157. padding: 3px 25px;
  28158. box-sizing: border-box;
  28159. }
  28160. .stepBox {
  28161. width: calc(100% - 40px);
  28162. height: calc(100%);
  28163. overflow: hidden;
  28164. border-radius: 5px;
  28165. margin: 0 auto;
  28166. }
  28167. .rightBox {
  28168. width: calc(100%);
  28169. background: #f0f2f5;
  28170. /* border-radius: 10px; */
  28171. overflow: auto;
  28172. height: calc(100% - 150px);
  28173. margin: 0 auto;
  28174. position: relative;
  28175. box-sizing: border-box;
  28176. }
  28177. .e_add_top {
  28178. display: flex;
  28179. justify-content: space-between;
  28180. background: #fff;
  28181. position: absolute;
  28182. right: 20px;
  28183. height: 50px;
  28184. align-items: center;
  28185. }
  28186. .e_add_title2 {
  28187. display: flex;
  28188. align-items: center;
  28189. }
  28190. .e_add_title2 span {
  28191. width: 40px;
  28192. }
  28193. .e_add_title {
  28194. display: flex;
  28195. align-items: center;
  28196. color: #b8b8b8;
  28197. font-size: 18px;
  28198. position: relative;
  28199. height: 40px;
  28200. }
  28201. .e_add_title span {
  28202. margin-right: 10px;
  28203. }
  28204. .e_add_title .el_input {
  28205. width: 300px;
  28206. }
  28207. .e_add_title>>>.el-input__inner {
  28208. width: 400px;
  28209. }
  28210. .e_add_btn {}
  28211. .e_add_content {
  28212. display: flex;
  28213. width: 100%;
  28214. }
  28215. .e_add_list {
  28216. background: #fff;
  28217. height: 500px;
  28218. width: 210px;
  28219. position: relative;
  28220. margin: 15px 5px 0 0;
  28221. flex-shrink: 0;
  28222. display: flex;
  28223. flex-direction: column;
  28224. }
  28225. .e_add_list_title {
  28226. font-size: 20px;
  28227. width: 100%;
  28228. box-sizing: border-box;
  28229. padding: 15px 40px;
  28230. text-align: center;
  28231. border-bottom: 1px solid #eaeaea;
  28232. position: relative;
  28233. display: flex;
  28234. align-items: center;
  28235. justify-content: center;
  28236. height: 57px;
  28237. background: #f6f6f6;
  28238. }
  28239. .e_add_list_title span {
  28240. overflow: hidden;
  28241. white-space: nowrap;
  28242. text-overflow: ellipsis;
  28243. }
  28244. .e_add_list_title img {
  28245. position: absolute;
  28246. right: 15px;
  28247. width: 25px;
  28248. cursor: pointer;
  28249. top: 50%;
  28250. transform: translateY(-50%);
  28251. }
  28252. .e_add_list_body {
  28253. height: calc(100% - 187px);
  28254. overflow: auto;
  28255. }
  28256. .e_add_list_child {
  28257. width: 100%;
  28258. display: flex;
  28259. align-items: center;
  28260. justify-content: center;
  28261. position: relative;
  28262. box-sizing: border-box;
  28263. padding: 15px 40px;
  28264. text-align: center;
  28265. }
  28266. .e_add_list_child span {
  28267. overflow: hidden;
  28268. white-space: nowrap;
  28269. text-overflow: ellipsis;
  28270. cursor: pointer;
  28271. }
  28272. .e_add_list_child img {
  28273. position: absolute;
  28274. right: 10px;
  28275. width: 21px;
  28276. cursor: pointer;
  28277. top: 50%;
  28278. transform: translateY(-50%);
  28279. }
  28280. .e_add_list_child+.e_add_list_child {
  28281. border-top: 1px solid #eaeaea;
  28282. }
  28283. .e_add_list_child .active {
  28284. color: #409eff;
  28285. }
  28286. .e_add_list_btn {
  28287. position: absolute;
  28288. bottom: 0;
  28289. height: 50px;
  28290. background: rgb(120, 120, 254);
  28291. width: 100%;
  28292. color: #fff;
  28293. font-size: 16px;
  28294. text-align: center;
  28295. line-height: 50px;
  28296. cursor: pointer;
  28297. }
  28298. .e_add_list_detail {
  28299. position: absolute;
  28300. bottom: 0;
  28301. height: 130px;
  28302. background: rgb(120, 120, 254);
  28303. width: 100%;
  28304. color: #fff;
  28305. font-size: 16px;
  28306. display: flex;
  28307. align-items: center;
  28308. justify-content: center;
  28309. }
  28310. .e_add_list_detail textarea {
  28311. height: 90%;
  28312. width: 95%;
  28313. border: none;
  28314. resize: none;
  28315. outline: none;
  28316. padding: 5px;
  28317. box-sizing: border-box;
  28318. }
  28319. .e_add_list_pbox {
  28320. width: 100%;
  28321. }
  28322. .e_add_list_pbox_title {
  28323. height: 50px;
  28324. background: #fff;
  28325. display: flex;
  28326. align-items: center;
  28327. width: 100%;
  28328. box-sizing: border-box;
  28329. padding: 0 20px;
  28330. flex-direction: row;
  28331. flex-wrap: wrap;
  28332. }
  28333. .type_title {
  28334. font-size: 18px;
  28335. font-weight: 700;
  28336. }
  28337. .type_content {
  28338. font-size: 16px;
  28339. margin-left: 30px;
  28340. }
  28341. .type_content span+span {
  28342. margin-left: 20px;
  28343. }
  28344. .type_content span {
  28345. cursor: pointer;
  28346. padding-bottom: 5px;
  28347. box-sizing: border-box;
  28348. }
  28349. .type_content .active {
  28350. color: #409eff;
  28351. border-bottom: 2px solid #409eff;
  28352. }
  28353. .e_add_list_pbox_content {
  28354. height: calc(100% - 50px);
  28355. display: flex;
  28356. align-items: center;
  28357. width: 100%;
  28358. background: #fff;
  28359. }
  28360. .mbCss {
  28361. width: 100%;
  28362. display: flex;
  28363. flex-direction: row;
  28364. flex-wrap: nowrap;
  28365. align-content: center;
  28366. align-items: flex-start;
  28367. justify-content: flex-start;
  28368. }
  28369. .pjCss {
  28370. /* width: 42%; */
  28371. width: calc(100% - 55%);
  28372. display: flex;
  28373. flex-direction: column;
  28374. flex-wrap: nowrap;
  28375. align-items: flex-start;
  28376. }
  28377. .e_box {
  28378. /* display: flex; */
  28379. flex-wrap: wrap;
  28380. max-height: 500px;
  28381. align-items: flex-start;
  28382. overflow: auto;
  28383. width: 100%;
  28384. }
  28385. .e_card {
  28386. border: 1px solid #ccc;
  28387. background: #fff;
  28388. margin-right: 20px;
  28389. width: 270px;
  28390. display: flex;
  28391. flex-direction: column;
  28392. align-items: center;
  28393. border-radius: 5px;
  28394. margin-top: 10px;
  28395. text-align: center;
  28396. }
  28397. .e_card_picture {
  28398. margin: 10px 0;
  28399. }
  28400. .e_card_picture>img {
  28401. width: 50px;
  28402. }
  28403. .e_card_name {
  28404. width: 100%;
  28405. padding: 0 10px;
  28406. box-sizing: border-box;
  28407. margin-bottom: 10px;
  28408. overflow: hidden;
  28409. text-overflow: ellipsis;
  28410. white-space: nowrap;
  28411. }
  28412. .e_card_time {
  28413. width: 100%;
  28414. padding: 0 10px;
  28415. box-sizing: border-box;
  28416. font-size: 15px;
  28417. color: #c3c3c3;
  28418. margin-bottom: 10px;
  28419. }
  28420. .e_card_btn {
  28421. height: 40px;
  28422. display: flex;
  28423. align-items: center;
  28424. width: 100%;
  28425. background: rgb(244, 244, 244);
  28426. }
  28427. .e_card_btn:hover {
  28428. background: rgb(221 221 221);
  28429. }
  28430. .e_card_btn span {
  28431. flex: 1 1 auto;
  28432. text-align: center;
  28433. cursor: pointer;
  28434. }
  28435. .addEva {
  28436. border: 1px solid #ccc;
  28437. background: #fff;
  28438. margin-right: 20px;
  28439. width: 270px;
  28440. height: 149px;
  28441. display: flex;
  28442. flex-direction: column;
  28443. align-items: center;
  28444. border-radius: 5px;
  28445. margin-top: 10px;
  28446. text-align: center;
  28447. cursor: pointer;
  28448. justify-content: center;
  28449. }
  28450. .addEva>img {
  28451. width: 50px;
  28452. object-fit: cover;
  28453. }
  28454. .uploadFm {
  28455. border: 1px dashed #ccc;
  28456. width: 100%;
  28457. height: 140px;
  28458. position: relative;
  28459. cursor: pointer;
  28460. display: flex;
  28461. flex-direction: column;
  28462. justify-content: center;
  28463. align-items: center;
  28464. font-size: 14px;
  28465. color: #6e6e6e;
  28466. position: relative;
  28467. }
  28468. .cover_p {
  28469. width: 100% !important;
  28470. height: 100%;
  28471. object-fit: cover;
  28472. }
  28473. .uploadFm2:hover .cover_mask {
  28474. display: flex !important;
  28475. }
  28476. .cover_mask {
  28477. display: none;
  28478. width: 100%;
  28479. height: 100%;
  28480. position: absolute;
  28481. background: #00000054;
  28482. align-items: center;
  28483. justify-content: center;
  28484. flex-direction: column;
  28485. }
  28486. .cover_mask>img {
  28487. width: 30px;
  28488. }
  28489. .cover_mask>span {
  28490. color: #fff;
  28491. font-size: 12px;
  28492. }
  28493. .uploadFm>img {
  28494. width: 50px;
  28495. }
  28496. .fileCss {
  28497. width: 100%;
  28498. display: flex;
  28499. flex-direction: row;
  28500. flex-wrap: nowrap;
  28501. justify-content: space-around;
  28502. align-items: center;
  28503. padding-top: 15px;
  28504. }
  28505. .fileCss>div {
  28506. display: flex;
  28507. flex-direction: column;
  28508. align-items: center;
  28509. }
  28510. .fileCss .spanName {
  28511. margin-top: 10px;
  28512. }
  28513. .sysPicBox {
  28514. display: flex;
  28515. flex-direction: row;
  28516. flex-wrap: wrap;
  28517. align-content: flex-start;
  28518. height: 435px;
  28519. overflow: auto;
  28520. position: relative;
  28521. }
  28522. .picNone {
  28523. position: absolute;
  28524. left: 50%;
  28525. top: 45%;
  28526. transform: translate(-50%, -50%);
  28527. width: fit-content;
  28528. color: #9c9c9c;
  28529. }
  28530. .sysPic {
  28531. width: 200px;
  28532. height: 115px;
  28533. margin: 0 20px 20px 0;
  28534. cursor: pointer;
  28535. }
  28536. .sysPic>img,
  28537. .isSysPic>img,
  28538. .deletePic>img {
  28539. width: 100%;
  28540. height: 100%;
  28541. object-fit: cover;
  28542. }
  28543. .isSysPic {
  28544. width: 200px;
  28545. height: 115px;
  28546. position: relative;
  28547. }
  28548. .deletePic {
  28549. width: 20px;
  28550. height: 20px;
  28551. position: absolute;
  28552. top: 0;
  28553. right: 0;
  28554. cursor: pointer;
  28555. }
  28556. .select_box1 {
  28557. height: 100%;
  28558. }
  28559. .select_box1_img {
  28560. background: #fff;
  28561. border-radius: 5px;
  28562. padding: 15px;
  28563. box-sizing: border-box;
  28564. margin-bottom: 20px;
  28565. }
  28566. .select_box1_title {
  28567. padding: 0 0 15px 0;
  28568. border-bottom: 1px solid #eee;
  28569. margin-bottom: 15px;
  28570. }
  28571. .select_box1_title span:nth-child(1) {
  28572. font-size: 16px;
  28573. margin-right: 20px;
  28574. color: #000;
  28575. }
  28576. .select_box1_title span:nth-child(2) {
  28577. font-size: 14px;
  28578. color: rgb(112, 112, 112);
  28579. }
  28580. .select_box1_add_img {}
  28581. .select_box1_select {
  28582. background: #fff;
  28583. border-radius: 5px;
  28584. padding: 15px;
  28585. box-sizing: border-box;
  28586. height: calc(100% - 200px);
  28587. overflow: auto;
  28588. }
  28589. .select_box2 {
  28590. height: 100%;
  28591. }
  28592. .select_box2_title {
  28593. background: #fff;
  28594. border-radius: 5px;
  28595. padding: 5px 10px;
  28596. box-sizing: border-box;
  28597. margin-bottom: 10px;
  28598. }
  28599. .select_box2_box {
  28600. display: flex;
  28601. height: calc(100% - 30px);
  28602. }
  28603. .select_box2_img {
  28604. width: calc(100% - 310px);
  28605. height: 100%;
  28606. overflow: auto;
  28607. background: #fff;
  28608. border-radius: 5px;
  28609. }
  28610. .select_box2_img img {
  28611. width: 100%;
  28612. }
  28613. .select_box2_answer {
  28614. background: #fff;
  28615. margin-left: 10px;
  28616. border-radius: 5px;
  28617. width: 300px;
  28618. overflow: auto;
  28619. height: 100%;
  28620. display: flex;
  28621. flex-direction: column;
  28622. align-items: center;
  28623. padding-top: 10px;
  28624. box-sizing: border-box;
  28625. }
  28626. .select_box2_answer_box {
  28627. margin: 0 0 10px 0;
  28628. width: 85%;
  28629. }
  28630. .rate_textarea {
  28631. font: inherit;
  28632. color: currentColor;
  28633. width: 100%;
  28634. padding: 8px 14px;
  28635. display: block;
  28636. min-width: 0;
  28637. outline: none;
  28638. border: 1px solid rgba(0, 0, 0, 0.23);
  28639. border-radius: 4px;
  28640. box-sizing: border-box;
  28641. background: #fff;
  28642. margin: 0 20px 0 0;
  28643. resize: none;
  28644. }
  28645. .select_answer_title {
  28646. text-align: left;
  28647. width: 85%;
  28648. margin-bottom: 10px;
  28649. font-size: 18px;
  28650. color: #8e8e8e;
  28651. }
  28652. .mask {
  28653. background-color: rgb(0 0 0 / 30%);
  28654. /* position: fixed; */
  28655. position: absolute;
  28656. top: 0;
  28657. left: 0;
  28658. width: 100%;
  28659. height: 100%;
  28660. z-index: 90;
  28661. display: flex;
  28662. align-items: center;
  28663. justify-content: center;
  28664. }
  28665. .progressBox {
  28666. width: 300px;
  28667. height: 150px;
  28668. background: #fff;
  28669. border-radius: 10px;
  28670. box-shadow: 0 0 6px 1px #bfbfbf;
  28671. display: flex;
  28672. align-items: center;
  28673. justify-content: center;
  28674. flex-direction: column;
  28675. position: relative;
  28676. color: #6c6c6c;
  28677. }
  28678. .progressBox>>>.el-progress-bar__outer {
  28679. background-color: #d1dfff !important;
  28680. }
  28681. .progressBox .lbox {
  28682. height: 50px;
  28683. font-size: 19px;
  28684. display: flex;
  28685. align-items: center;
  28686. color: #747474;
  28687. }
  28688. .progressBox .lbox img {
  28689. width: 40px;
  28690. margin-right: 20px;
  28691. }
  28692. .closeCss {
  28693. position: absolute;
  28694. top: 8px;
  28695. right: 8px;
  28696. cursor: pointer;
  28697. width: 20px;
  28698. height: 20px;
  28699. }
  28700. .closeCss>img {
  28701. width: 100%;
  28702. height: 100%;
  28703. }
  28704. .updateTips::before {
  28705. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  28706. font-size: 14px;
  28707. margin-left: 20px;
  28708. font-weight: 400;
  28709. color: #ff3a3a;
  28710. margin-bottom: 10px;
  28711. display: block;
  28712. }
  28713. .updateMask {
  28714. width: 100%;
  28715. z-index: 3;
  28716. top: 0;
  28717. position: absolute;
  28718. /* background-color: rgba(0,0,0,.3); */
  28719. }
  28720. .t_j_box {
  28721. display: flex;
  28722. }
  28723. .t_j_box span:nth-child(1) {
  28724. width: 15%;
  28725. overflow: hidden;
  28726. margin-right: 10px;
  28727. text-overflow: ellipsis;
  28728. white-space: nowrap;
  28729. }
  28730. .t_j_box span:nth-child(2) {
  28731. width: 30%;
  28732. overflow: hidden;
  28733. text-overflow: ellipsis;
  28734. margin-right: 10px;
  28735. }
  28736. .t_j_box span:nth-child(3) {
  28737. max-width: calc(55% - 20px);
  28738. overflow: hidden;
  28739. text-overflow: ellipsis;
  28740. }
  28741. .sentenBox {
  28742. background: #fff;
  28743. height: 600px;
  28744. overflow: auto;
  28745. background-image: url("../../../assets/icon/conSentences/csBg.png");
  28746. background-position: 102%;
  28747. background-repeat: no-repeat;
  28748. background-size: 60%;
  28749. }
  28750. .sentenBox>.sentenContent {
  28751. padding-bottom: 10px;
  28752. width: 97%;
  28753. margin: 0 auto;
  28754. }
  28755. .sentenBox>.sentenContent+.sentenContent {
  28756. border-top: 1px solid #cbcbcb;
  28757. }
  28758. .addSen {
  28759. background: #409efe;
  28760. width: 90px;
  28761. color: #fff;
  28762. height: 35px;
  28763. text-align: center;
  28764. line-height: 35px;
  28765. border-radius: 5px;
  28766. float: right;
  28767. margin: 10px 20px 0 0;
  28768. cursor: pointer;
  28769. }
  28770. .sentenTop {
  28771. display: flex;
  28772. flex-direction: row;
  28773. flex-wrap: nowrap;
  28774. align-items: center;
  28775. }
  28776. .sentenTop::before {
  28777. content: attr(index);
  28778. background: #3681fc;
  28779. border-radius: 50%;
  28780. color: #fff;
  28781. width: 25px;
  28782. height: 25px;
  28783. min-width: 25px;
  28784. min-height: 25px;
  28785. text-align: center;
  28786. line-height: 25px;
  28787. margin-right: 5px;
  28788. }
  28789. .sentenTop>div:nth-child(2) {
  28790. width: 300px;
  28791. margin: 0 15px;
  28792. }
  28793. .sentenTop>div:nth-child(3) {
  28794. background: #409efe;
  28795. color: #fff;
  28796. width: 65px;
  28797. height: 35px;
  28798. text-align: center;
  28799. line-height: 35px;
  28800. border-radius: 5px;
  28801. cursor: pointer;
  28802. }
  28803. .cardList {
  28804. padding: 30px 0 20px 0;
  28805. display: flex;
  28806. flex-direction: row;
  28807. flex-wrap: wrap;
  28808. align-items: center;
  28809. box-sizing: border-box;
  28810. border-bottom: 1px solid #f4f4f4;
  28811. width: 98%;
  28812. margin: 0 auto;
  28813. }
  28814. .rightCardList {
  28815. display: flex;
  28816. flex-wrap: wrap;
  28817. }
  28818. .cardBox {
  28819. display: flex;
  28820. flex-direction: row;
  28821. flex-wrap: wrap;
  28822. align-items: center;
  28823. align-content: center;
  28824. }
  28825. .isCard,
  28826. .isCard1 {
  28827. width: auto;
  28828. padding: 0 20px;
  28829. height: 65px;
  28830. text-align: center;
  28831. line-height: 65px;
  28832. font-size: 14px;
  28833. cursor: pointer;
  28834. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  28835. background-size: 100% 100%;
  28836. position: relative;
  28837. z-index: 99;
  28838. }
  28839. .isCard1 {
  28840. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  28841. }
  28842. .isCard:hover .deleteWord {
  28843. display: block;
  28844. }
  28845. .isCard>div:nth-child(1),
  28846. .isCard1>div:nth-child(1) {
  28847. white-space: nowrap;
  28848. overflow: hidden;
  28849. text-overflow: ellipsis;
  28850. width: 100%;
  28851. margin: 0 auto;
  28852. }
  28853. .card {
  28854. width: 140px;
  28855. height: 65px;
  28856. }
  28857. .card>img {
  28858. width: 100%;
  28859. height: 100%;
  28860. }
  28861. .rightCardBox {
  28862. width: 98%;
  28863. margin: 10px auto 0;
  28864. }
  28865. .rightCardBox>div:nth-child(1) {
  28866. margin-bottom: 10px;
  28867. }
  28868. .cardCss {
  28869. display: flex;
  28870. flex-direction: column;
  28871. flex-wrap: nowrap;
  28872. align-items: center;
  28873. border-bottom: 3px solid #b4c3d3;
  28874. padding: 0 0 5px 0;
  28875. /* margin-right: 10px; */
  28876. }
  28877. .cardCss>div:nth-child(2) {
  28878. background: #5b7b9d;
  28879. color: #fff;
  28880. width: 20px;
  28881. height: 20px;
  28882. border-radius: 50%;
  28883. text-align: center;
  28884. line-height: 20px;
  28885. }
  28886. .sentenTopBox {
  28887. display: flex;
  28888. flex-direction: row;
  28889. flex-wrap: nowrap;
  28890. align-items: center;
  28891. justify-content: space-between;
  28892. padding: 55px 0 0 20px;
  28893. box-sizing: border-box;
  28894. width: 85%;
  28895. }
  28896. .rb_c_ai_box,
  28897. .stepsBottom {
  28898. width: 100%;
  28899. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  28900. /* background: #f7f7f7; */
  28901. border-radius: 10px;
  28902. overflow: hidden;
  28903. /* height: 100%; */
  28904. height: calc(100% - 55px);
  28905. }
  28906. .navTop {
  28907. background: #53749b;
  28908. color: #fff;
  28909. height: 40px;
  28910. line-height: 40px;
  28911. padding-left: 15px;
  28912. font-size: 18px;
  28913. }
  28914. .navBottom {
  28915. /* background: #6b91b7; */
  28916. height: 100%;
  28917. overflow: auto;
  28918. padding: 10px 0;
  28919. }
  28920. .navStage {
  28921. display: flex;
  28922. flex-direction: row;
  28923. flex-wrap: nowrap;
  28924. align-items: center;
  28925. padding: 10px 10px 10px 0;
  28926. cursor: pointer;
  28927. background: #ffffff;
  28928. width: 95%;
  28929. margin: 5px auto 5px;
  28930. box-sizing: border-box;
  28931. border-radius: 5px;
  28932. flex-wrap: wrap;
  28933. position: relative;
  28934. }
  28935. .navStage:hover>.chapter_upload_drag {
  28936. display: block;
  28937. }
  28938. .navTask:hover>.chapter_upload_drag {
  28939. display: block;
  28940. }
  28941. .chapter_upload:hover>.chapter_upload_drag {
  28942. display: block;
  28943. }
  28944. .navStage::before {
  28945. content: "";
  28946. display: block;
  28947. width: 16px;
  28948. height: 16px;
  28949. background-image: url(../../../assets/icon/new/icon_stage.png);
  28950. background-size: 100%;
  28951. margin-left: 25px;
  28952. }
  28953. .navStage .chapter_unit_open {
  28954. content: "";
  28955. display: block;
  28956. width: 16px;
  28957. height: 16px;
  28958. background-image: url(../../../assets/icon/new/down.png);
  28959. transform: rotate(-90deg);
  28960. background-size: 100%;
  28961. margin-left: 10px;
  28962. transition: all 0.5s;
  28963. }
  28964. .isNavStageOpen .chapter_unit_open {
  28965. transform: rotate(0deg);
  28966. }
  28967. .isNavStage {
  28968. background: #0061ff;
  28969. }
  28970. .isNavStage::before {
  28971. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  28972. }
  28973. .isNavStage .chapter_unit_open {
  28974. background-image: url(../../../assets/icon/new/downC.png);
  28975. }
  28976. .isNavStage .nt_taskName {
  28977. font-weight: bold !important;
  28978. color: #ffffff !important;
  28979. }
  28980. .isNavStage .nt_taskTitle {
  28981. font-weight: bold !important;
  28982. color: #fff !important;
  28983. }
  28984. .navStage .nt_taskBox {
  28985. width: calc(100% - 68px);
  28986. padding: 0 0 0 5px;
  28987. box-sizing: border-box;
  28988. box-sizing: border-box;
  28989. display: flex;
  28990. flex-direction: row;
  28991. flex-wrap: nowrap;
  28992. align-items: baseline;
  28993. }
  28994. .navStage .nt_taskTitle {
  28995. color: #060e17;
  28996. line-height: 25px;
  28997. font-size: 16px;
  28998. }
  28999. .navStage .nt_taskName {
  29000. max-width: calc(100% - 82px);
  29001. white-space: nowrap;
  29002. overflow: hidden;
  29003. text-overflow: ellipsis;
  29004. font-size: 16px;
  29005. color: #060e17;
  29006. }
  29007. .navTask {
  29008. display: flex;
  29009. flex-direction: row;
  29010. flex-wrap: nowrap;
  29011. align-items: center;
  29012. padding: 10px 10px 10px 0;
  29013. cursor: pointer;
  29014. background: #ffffff;
  29015. width: 95%;
  29016. margin: 5px auto 5px;
  29017. box-sizing: border-box;
  29018. border-radius: 5px;
  29019. flex-wrap: wrap;
  29020. position: relative;
  29021. }
  29022. .navTask .chapter_upload_open {
  29023. content: "";
  29024. display: block;
  29025. width: 16px;
  29026. height: 16px;
  29027. background-image: url(../../../assets/icon/new/icon_arrow.png);
  29028. background-size: 100%;
  29029. margin-left: 23px;
  29030. }
  29031. .noImage .chapter_upload_open {
  29032. display: none;
  29033. background-image: unset !important;
  29034. }
  29035. .isNavOpen .chapter_upload_open {
  29036. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  29037. transform: rotate(90deg);
  29038. }
  29039. .isNavTask .chapter_upload_open {
  29040. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  29041. transform: rotate(-90deg);
  29042. }
  29043. .isNavTask.isNavOpen .chapter_upload_open {
  29044. transform: rotate(0deg);
  29045. }
  29046. .dragOverTop {
  29047. border-top: 2px solid #0061ff !important;
  29048. border-radius: 0 !important;
  29049. margin-top: 10px;
  29050. }
  29051. .dragOverBottom {
  29052. border-bottom: 2px solid #0061ff !important;
  29053. border-radius: 0 !important;
  29054. margin-top: 10px;
  29055. }
  29056. .dragOverTop2 {
  29057. border-top: 2px solid #0061ff !important;
  29058. border-radius: 0 !important;
  29059. }
  29060. .dragOverBottom2 {
  29061. border-bottom: 2px solid #0061ff !important;
  29062. border-radius: 0 !important;
  29063. }
  29064. .isNavTask {
  29065. /* background: #3681FC; */
  29066. background: #eef3fb;
  29067. }
  29068. .isNavTask>.chapter_upload_drag {
  29069. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  29070. }
  29071. .isNavTask .nt_taskName {
  29072. /* color: #fff !important; */
  29073. font-weight: bold !important;
  29074. color: #0061ff !important;
  29075. }
  29076. .isNavTask .nt_taskTitle {
  29077. /* color: #AECCFE !important; */
  29078. font-weight: bold !important;
  29079. color: #0061ff !important;
  29080. }
  29081. .navTask .nt_taskBox {
  29082. width: calc(100% - 40px);
  29083. padding: 0 0 0 5px;
  29084. box-sizing: border-box;
  29085. box-sizing: border-box;
  29086. display: flex;
  29087. flex-direction: row;
  29088. flex-wrap: nowrap;
  29089. align-items: baseline;
  29090. }
  29091. .navTask .nt_taskTitle {
  29092. /* color: #717C8D; */
  29093. color: #060e17;
  29094. line-height: 25px;
  29095. font-size: 16px;
  29096. /* min-width: 66px; */
  29097. }
  29098. .navTask .nt_taskName {
  29099. /* color: #fff; */
  29100. /* max-width: 130px; */
  29101. /* width: 100%; */
  29102. max-width: calc(100% - 66px);
  29103. font-size: 16px;
  29104. color: #060e17;
  29105. /* color: #0E1E33; */
  29106. }
  29107. .navTask .nt_taskName span {
  29108. width: 100%;
  29109. white-space: nowrap;
  29110. overflow: hidden;
  29111. text-overflow: ellipsis;
  29112. display: block;
  29113. }
  29114. .gjBox {
  29115. width: calc(100% - 25px);
  29116. padding: 0 0 0 0;
  29117. box-sizing: border-box;
  29118. border-left: 1px solid #cad1dc;
  29119. margin-left: 25px;
  29120. }
  29121. .gjBox>div {
  29122. display: flex;
  29123. align-items: center;
  29124. }
  29125. .gjBox>div::before {
  29126. content: "";
  29127. height: 1px;
  29128. width: 10px;
  29129. background: #cad1dc;
  29130. display: block;
  29131. margin-right: 5px;
  29132. }
  29133. .gjCss {
  29134. display: flex;
  29135. flex-direction: row;
  29136. flex-wrap: nowrap;
  29137. align-items: center;
  29138. padding: 15px 0;
  29139. box-sizing: border-box;
  29140. font-size: 14px;
  29141. cursor: pointer;
  29142. }
  29143. .isGjCss {
  29144. color: #0061ff;
  29145. }
  29146. .groupBox {}
  29147. .groupContent+.groupContent {
  29148. margin-top: 30px;
  29149. }
  29150. .groupTitle {
  29151. font-size: 24px;
  29152. color: rgb(80, 80, 80);
  29153. margin-bottom: 20px;
  29154. }
  29155. .groupName {
  29156. display: flex;
  29157. align-items: center;
  29158. }
  29159. .groupn {
  29160. font-size: 15px;
  29161. margin-right: 10px;
  29162. }
  29163. .groupName+.groupName {
  29164. margin-top: 15px;
  29165. }
  29166. .groupBtn {
  29167. margin-left: 10px;
  29168. }
  29169. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  29170. text-align: left;
  29171. }
  29172. .radioBox>div {
  29173. margin: 10px 0 0 10px;
  29174. }
  29175. .radioBox>>>.el-radio__input,
  29176. .radioBox>>>.el-checkbox__inner {
  29177. margin-left: 10px;
  29178. }
  29179. .radioBox>>>.el-radio__label,
  29180. .radioBox>>>.el-checkbox__label {
  29181. display: flex;
  29182. align-items: center;
  29183. }
  29184. .inImg {
  29185. width: 50px;
  29186. }
  29187. .inImg>img {
  29188. width: 100%;
  29189. height: 100%;
  29190. object-fit: cover;
  29191. }
  29192. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  29193. height: auto;
  29194. padding: 10px;
  29195. margin: 0;
  29196. }
  29197. .upCss>>>.el-upload-list {
  29198. width: 100%;
  29199. }
  29200. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  29201. width: 100%;
  29202. height: 120px;
  29203. object-fit: contain;
  29204. background: unset;
  29205. margin-left: 0;
  29206. }
  29207. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  29208. display: none;
  29209. }
  29210. .tcMember+.tcMember::before {
  29211. content: "、";
  29212. }
  29213. .xzUpImg {
  29214. width: 25px;
  29215. height: 25px;
  29216. min-width: 25px;
  29217. min-height: 25px;
  29218. cursor: pointer;
  29219. margin: 0 10px;
  29220. }
  29221. .xzUpImg>img {
  29222. width: 100%;
  29223. height: 100%;
  29224. }
  29225. .closeCss {
  29226. position: absolute;
  29227. top: 8px;
  29228. right: 8px;
  29229. cursor: pointer;
  29230. width: 20px;
  29231. height: 20px;
  29232. }
  29233. .closeCss>img {
  29234. width: 100%;
  29235. height: 100%;
  29236. }
  29237. .moveBtn {
  29238. display: flex;
  29239. flex-direction: row;
  29240. flex-wrap: nowrap;
  29241. align-items: center;
  29242. width: 55px;
  29243. }
  29244. .timuUpImg {
  29245. display: flex;
  29246. flex-direction: row;
  29247. align-items: center;
  29248. width: 100%;
  29249. margin-right: 10px;
  29250. }
  29251. .timuUpImg>div:nth-child(1) {
  29252. margin-right: 10px;
  29253. display: flex;
  29254. align-items: center;
  29255. width: 100%;
  29256. }
  29257. .timuImgBox {
  29258. margin: 10px 0;
  29259. display: flex;
  29260. flex-direction: column;
  29261. flex-wrap: wrap;
  29262. align-items: flex-start;
  29263. }
  29264. .timuImg {
  29265. width: 100px;
  29266. margin: 5px 0;
  29267. cursor: pointer;
  29268. position: relative;
  29269. }
  29270. .timuImg:hover .deleteWord {
  29271. display: block;
  29272. }
  29273. .deleteWord {
  29274. width: 25px;
  29275. height: 25px;
  29276. position: absolute;
  29277. right: -5px;
  29278. top: -5px;
  29279. cursor: pointer;
  29280. display: none;
  29281. }
  29282. .timuImg>img,
  29283. .deleteWord>img {
  29284. width: 100%;
  29285. height: 100%;
  29286. object-fit: cover;
  29287. }
  29288. .e_add_delete {
  29289. cursor: pointer;
  29290. margin-left: 10px;
  29291. }
  29292. .pType_box {
  29293. margin: 15px 0;
  29294. align-items: flex-end;
  29295. }
  29296. .noneBox {
  29297. height: 200px;
  29298. width: 100%;
  29299. display: flex;
  29300. align-items: center;
  29301. justify-content: center;
  29302. flex-direction: column;
  29303. /* margin-top: 150px; */
  29304. }
  29305. .noneBox>img {
  29306. width: 95px;
  29307. }
  29308. .noneBox>span {
  29309. margin-top: 10px;
  29310. color: #717c8d;
  29311. }
  29312. .rb_c_box {
  29313. width: 100%;
  29314. height: 100%;
  29315. display: flex;
  29316. /* padding: 20px; */
  29317. box-sizing: border-box;
  29318. justify-content: space-between;
  29319. }
  29320. .rb_c_box_left {
  29321. height: 100%;
  29322. background: #fff;
  29323. width: 270px;
  29324. min-width: 270px;
  29325. border-radius: 8px;
  29326. margin-right: 10px;
  29327. }
  29328. .rb_c_box_right {
  29329. height: 100%;
  29330. width: calc(100%);
  29331. overflow: hidden;
  29332. }
  29333. .rb_c_box_btn {
  29334. display: flex;
  29335. justify-content: flex-start;
  29336. height: 50px;
  29337. align-items: center;
  29338. background: #fff;
  29339. padding: 0 20px;
  29340. border-radius: 10px 10px 0px 0px;
  29341. border-bottom: 1px solid #cad1dc;
  29342. }
  29343. .rb_c_box_btn > .title{
  29344. font-size: 24px;
  29345. font-weight: bold;
  29346. display: flex;
  29347. align-items: center;
  29348. }
  29349. .rb_c_box_btn > .title:before{
  29350. content: '';
  29351. background-image: url(../../../assets/icon/course/courseName.png);
  29352. width: 24px;
  29353. height: 24px;
  29354. background-size: 100% 100%;
  29355. margin-right: 10px;
  29356. }
  29357. .rb_c_box_right>.basic_box {
  29358. /* background: #fff; */
  29359. border-radius: 0;
  29360. height: calc(100% - 50px);
  29361. overflow: auto;
  29362. padding: 0;
  29363. }
  29364. .textarea_css {
  29365. display: block;
  29366. resize: none;
  29367. padding: 10px 15px;
  29368. line-height: 1.5;
  29369. box-sizing: border-box;
  29370. width: 100%;
  29371. font-size: 14px;
  29372. color: #606266;
  29373. background-color: #fff;
  29374. background-image: none;
  29375. border: 1px solid #dcdfe6;
  29376. border-radius: 4px;
  29377. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  29378. outline: none;
  29379. overflow: hidden;
  29380. height: 46px;
  29381. font-family: "Microsoft YaHei";
  29382. }
  29383. .textarea_css::-webkit-input-placeholder {
  29384. color: #c0c4cc;
  29385. }
  29386. .textarea_css:focus {
  29387. border-color: #409eff;
  29388. outline: 0;
  29389. }
  29390. .addEditor>>>.text {
  29391. height: auto;
  29392. min-height: 100px;
  29393. }
  29394. .addEditor>>>.w-e-text-container {
  29395. min-height: 100px;
  29396. }
  29397. .moveBtn2 {
  29398. flex-direction: column;
  29399. width: fit-content;
  29400. margin: 0 10px 0 10px;
  29401. }
  29402. .moveBtn2 .chapter_upload_down,
  29403. .moveBtn2 .chapter_upload_up {
  29404. width: 16px;
  29405. height: 16px;
  29406. }
  29407. .moveBtn2 .chapter_upload_up::after,
  29408. .moveBtn2 .chapter_upload_down::after {
  29409. width: 10px;
  29410. height: 10px;
  29411. }
  29412. .fullStyle>>>.el-dialog__body {
  29413. height: calc(100% - 125px) !important;
  29414. box-sizing: border-box;
  29415. }
  29416. .fullStyle1>>>.el-dialog__body {
  29417. height: auto !important;
  29418. }
  29419. .fullStyle>>>.el-dialog {
  29420. width: 100% !important;
  29421. max-width: 100% !important;
  29422. height: 100% !important;
  29423. margin: 0 !important;
  29424. }
  29425. .fullStyle {
  29426. width: 100% !important;
  29427. max-width: 100% !important;
  29428. height: 100% !important;
  29429. margin: 0 auto !important;
  29430. }
  29431. .wb_j_box_btn {
  29432. width: calc(100% - 30px);
  29433. display: flex;
  29434. height: 40px;
  29435. border: 1.5px solid #cad1dc;
  29436. border-radius: 4px;
  29437. box-sizing: border-box;
  29438. align-items: center;
  29439. font-size: 14px;
  29440. cursor: pointer;
  29441. overflow: hidden;
  29442. }
  29443. .wb_j_box_btn:hover {
  29444. border: 1.5px solid #0061ff;
  29445. }
  29446. .wb_j_box_title {
  29447. background: #f0f4fa;
  29448. height: 100%;
  29449. line-height: 40px;
  29450. width: 90px;
  29451. text-align: center;
  29452. color: #060e17;
  29453. border-right: 1.5px solid #cad1dc;
  29454. box-sizing: border-box;
  29455. }
  29456. .wb_j_box_btn_c {
  29457. width: calc(100% - 90px);
  29458. padding: 0 35px 0 10px;
  29459. box-sizing: border-box;
  29460. position: relative;
  29461. }
  29462. .wb_j_box_span {
  29463. width: 100%;
  29464. overflow: hidden;
  29465. white-space: nowrap;
  29466. text-overflow: ellipsis;
  29467. word-wrap: break-word;
  29468. color: #717c8d;
  29469. }
  29470. .wb_j_box_arrow {
  29471. content: "";
  29472. width: 14px;
  29473. height: 14px;
  29474. background: url(../../../assets/icon/new/u_arrow.png);
  29475. background-size: 100% 100%;
  29476. position: absolute;
  29477. right: 12px;
  29478. top: 50%;
  29479. transform: translateY(-50%);
  29480. }
  29481. .check_classBox {
  29482. height: 400px;
  29483. display: flex;
  29484. border-top: 1.5px solid #e7ebf1;
  29485. border-bottom: 1.5px solid #e7ebf1;
  29486. }
  29487. .check_class_right {
  29488. width: 130px;
  29489. border-right: 1px solid #e7ebf1;
  29490. display: flex;
  29491. align-items: center;
  29492. flex-direction: column;
  29493. height: 100%;
  29494. overflow: auto;
  29495. padding: 15px 0;
  29496. box-sizing: border-box;
  29497. }
  29498. .check_class {
  29499. width: 85%;
  29500. border-radius: 5px;
  29501. height: 30px;
  29502. min-height: 30px;
  29503. line-height: 30px;
  29504. text-align: center;
  29505. padding: 0 10px;
  29506. box-sizing: border-box;
  29507. cursor: pointer;
  29508. white-space: nowrap;
  29509. overflow: hidden;
  29510. text-overflow: ellipsis;
  29511. }
  29512. .check_class.activeX {
  29513. background: #e0eafb;
  29514. color: #3681fc;
  29515. font-weight: 700;
  29516. }
  29517. .check_class+.check_class {
  29518. margin-top: 15px;
  29519. }
  29520. .check_class_left {
  29521. background: #fafafa;
  29522. width: calc(100% - 130px);
  29523. padding: 15px;
  29524. box-sizing: border-box;
  29525. }
  29526. .check_class_all_box {
  29527. display: flex;
  29528. margin-bottom: 10px;
  29529. }
  29530. .all_check {
  29531. display: flex;
  29532. align-items: center;
  29533. padding: 2px 0 0;
  29534. margin-left: 10px;
  29535. }
  29536. .all_check>>>.el-checkbox__label {
  29537. line-height: 18px;
  29538. }
  29539. .check_class_left_title {
  29540. font-size: 16px;
  29541. font-weight: 700;
  29542. }
  29543. .check_class_item {
  29544. display: flex;
  29545. flex-wrap: wrap;
  29546. height: calc(100% - 45px);
  29547. overflow: auto;
  29548. justify-content: flex-start;
  29549. align-items: flex-start;
  29550. align-content: flex-start;
  29551. }
  29552. .class_item:first-child {
  29553. /* margin: 0 15px 15px 67px; */
  29554. }
  29555. .class_item {
  29556. margin: 0 15px 15px 0;
  29557. }
  29558. .class_item:hover>>>.el-checkbox__label {
  29559. color: #409eff;
  29560. }
  29561. .class_item>>>.el-checkbox__label {
  29562. color: #0e1e33;
  29563. }
  29564. .class_item:hover>>>.el-checkbox__inner {
  29565. border-color: #409eff;
  29566. }
  29567. .class_item>>>.el-checkbox,
  29568. .class_item>>>.el-checkbox__input {
  29569. display: flex;
  29570. align-items: center;
  29571. }
  29572. .taskTitle {
  29573. font-size: 20px;
  29574. font-weight: bold;
  29575. margin-bottom: 35px;
  29576. }
  29577. .taskTitle:after {
  29578. content: "";
  29579. width: 100%;
  29580. display: block;
  29581. height: 1px;
  29582. background: #cad1dc;
  29583. position: absolute;
  29584. left: 0;
  29585. margin: 15px 0 0;
  29586. }
  29587. .eva_btn_box {
  29588. margin: 20px 0px 0 0;
  29589. display: flex;
  29590. flex-direction: row;
  29591. flex-wrap: nowrap;
  29592. align-items: center;
  29593. justify-content: space-between;
  29594. width: 100%;
  29595. }
  29596. .eva_btn_left_box {
  29597. display: flex;
  29598. flex-direction: row;
  29599. flex-wrap: nowrap;
  29600. align-items: center;
  29601. }
  29602. .addTypeChoose {
  29603. display: flex;
  29604. flex-direction: row;
  29605. flex-wrap: nowrap;
  29606. align-items: center;
  29607. margin: 15px 0;
  29608. }
  29609. .addTypeBox {
  29610. display: flex;
  29611. flex-direction: column;
  29612. flex-wrap: nowrap;
  29613. align-items: center;
  29614. }
  29615. .addTypeChoose {
  29616. display: flex;
  29617. flex-direction: row;
  29618. flex-wrap: nowrap;
  29619. align-items: center;
  29620. margin: 15px 0;
  29621. }
  29622. .buchong_box {
  29623. background: #E0EAFB66;
  29624. width: calc(100% - 20px);
  29625. min-height: 50px;
  29626. display: flex;
  29627. align-items: center;
  29628. justify-content: center;
  29629. margin: 0 auto;
  29630. }
  29631. .outline {
  29632. width: calc(100% - 40px);
  29633. margin: 0 auto;
  29634. }
  29635. .task_outline {
  29636. width: calc(100% - 40px);
  29637. margin: 0 auto;
  29638. }
  29639. .outline_box+.outline_box {
  29640. margin: 30px 0 0px;
  29641. }
  29642. .outline_task {
  29643. display: flex;
  29644. align-items: center;
  29645. margin-bottom: 10px;
  29646. }
  29647. .outline_btn{
  29648. display: flex;
  29649. align-items: center;
  29650. min-width: fit-content;
  29651. margin-left: 10px;
  29652. }
  29653. .outline_task .title {
  29654. font-size: 18px;
  29655. font-weight: bold;
  29656. min-width: 80px;
  29657. }
  29658. .op_task_box,
  29659. .op_tool_box,
  29660. .outline_detail {
  29661. position: relative;
  29662. }
  29663. .op_task_box:hover .op_box,
  29664. .op_tool_box:hover .op_box,
  29665. .outline_detail:hover .op_box {
  29666. display: flex
  29667. }
  29668. .op_box {
  29669. position: absolute;
  29670. bottom: 10px;
  29671. display: none;
  29672. align-items: center;
  29673. justify-content: space-between;
  29674. width: calc(100% - 20px);
  29675. left: 50%;
  29676. transform: translateX(-50%);
  29677. }
  29678. .op_box .op_remark {
  29679. color: #8E8E8E;
  29680. font-size: 14px;
  29681. }
  29682. .op_box_right{
  29683. display: flex;
  29684. }
  29685. .op_box_isquote{
  29686. display: flex;
  29687. }
  29688. .op_box_isquote *{
  29689. display: none;
  29690. }
  29691. .op_box_isquote .op_box_right,
  29692. .op_box_isquote .custom-switch{
  29693. display: flex;
  29694. margin-left: auto;
  29695. }
  29696. .op_task_box:hover .op_box_isquote *{
  29697. display: flex;
  29698. }
  29699. .op_task_box:hover .op_box_isquote .op_box_right,
  29700. .op_task_box:hover .op_box_isquote .custom-switch{
  29701. display: flex;
  29702. margin-left: unset;
  29703. }
  29704. .rb_c_nav {
  29705. width: calc(100% - 20px);
  29706. margin: 15px auto 0;
  29707. font-size: 18px;
  29708. display: flex;
  29709. align-items: center;
  29710. }
  29711. .rb_c_nav span {
  29712. cursor: pointer;
  29713. }
  29714. .rb_c_nav span+span {
  29715. margin-left: 10px;
  29716. }
  29717. .rb_c_nav span.active {
  29718. color: #0061FF
  29719. }
  29720. .text_panel>>>.text {
  29721. height: 400px;
  29722. }
  29723. .markBox{
  29724. padding: 20px 14px;
  29725. line-height: 29px;
  29726. font-size: 16px;
  29727. background: #f4f4f4;
  29728. border-radius: 5px;
  29729. word-break: break-word;
  29730. }
  29731. .info_box_t {
  29732. display: flex;
  29733. align-items: center;
  29734. flex-wrap: wrap;
  29735. }
  29736. .info_box_t + .info_box_t {
  29737. margin-top: 10px;
  29738. }
  29739. .info_box_t_box {
  29740. display: flex;
  29741. align-items: center;
  29742. flex-wrap: wrap;
  29743. margin-bottom: 5px;
  29744. }
  29745. .info_box_t_box + .info_box_t_box{
  29746. margin-left: 10px;
  29747. }
  29748. .info_box_t_box > span{
  29749. width: fit-content;
  29750. font-weight: bold;
  29751. font-size: 14px;
  29752. }
  29753. .info_box_t_box > input{
  29754. width: 150px !important;
  29755. margin: 0 5px 0 0;
  29756. }
  29757. .info_radio >>> .el-radio, .el-radio__input{
  29758. line-height: 18px;
  29759. height: 18px;
  29760. }
  29761. .mode_box{
  29762. display: flex;
  29763. align-items: center;
  29764. }
  29765. .mode_box > span{
  29766. padding: 0px 5px;
  29767. cursor: pointer;
  29768. }
  29769. .mode_box > span.active{
  29770. color: #409eff;
  29771. }
  29772. .chapter_upload_check {
  29773. width: 15px;
  29774. height: 15px;
  29775. min-width: 15px;
  29776. min-height: 15px;
  29777. cursor: pointer;
  29778. background-image: url('../../../assets/icon/check.png');
  29779. background-size: 100% 100%;
  29780. }
  29781. .chapter_upload_check.checked{
  29782. background-image: url('../../../assets/icon/checked.png');
  29783. }
  29784. .ruleBtn {
  29785. width: fit-content;
  29786. height: 36px;
  29787. line-height: 36px;
  29788. cursor: pointer;
  29789. color: #0061FF;
  29790. }
  29791. .stopBtn{
  29792. z-index: 999999;
  29793. position: absolute;
  29794. left: 50%;
  29795. top: calc(50% + 70px);
  29796. transform: translateX(-50%);
  29797. }
  29798. .rateSwitch >>> .el-switch__label.is-active {
  29799. color: #0061FF;
  29800. }
  29801. .rateSwitch >>> .el-switch__label--right{
  29802. display: flex;
  29803. align-items: center;
  29804. }
  29805. .rateSwitch >>> .el-switch__label--right::before{
  29806. content: "";
  29807. width: 14px;
  29808. height: 14px;
  29809. min-width: 14px;
  29810. min-height: 14px;
  29811. background-size: 100% 100%;
  29812. display: block;
  29813. margin-right: 7px;
  29814. background-image: url(../../../assets/icon/new/u_op2.png);
  29815. }
  29816. .rateSwitch >>> .el-switch__label--right.is-active::before{
  29817. background-image: url(../../../assets/icon/new/u_op.png);
  29818. }
  29819. .inter_box{
  29820. min-width: calc(50%);
  29821. min-height: 500px;
  29822. margin-right: 10px;
  29823. border: 1px solid #c7c7c7;
  29824. border-radius: 0px 5px 5px 5px;
  29825. overflow: hidden;
  29826. position: relative;
  29827. box-sizing: border-box;
  29828. }
  29829. .inter_box::before{
  29830. content:'对话区';
  29831. position: absolute;
  29832. left: 0;
  29833. top: 0;
  29834. display: block;
  29835. padding: 8px 10px;
  29836. background: #e0eafb;
  29837. color: #98a0ac;
  29838. font-size: 14px;
  29839. border-radius: 0 15px 15px 0;
  29840. }
  29841. .inter_voiceBox,
  29842. .inter_Detailbox{
  29843. border: 1px solid #c7c7c7;
  29844. border-radius: 0px 5px 5px 5px;
  29845. overflow: hidden;
  29846. position: relative;
  29847. box-sizing: border-box;
  29848. }
  29849. .inter_Detailbox::before{
  29850. content:'编辑区';
  29851. position: absolute;
  29852. left: 0;
  29853. top: 0;
  29854. display: block;
  29855. padding: 8px 10px;
  29856. background: #e0eafb;
  29857. color: #98a0ac;
  29858. font-size: 14px;
  29859. border-radius: 0 15px 15px 0;
  29860. }
  29861. .inter_voiceBox::before{
  29862. content:'录音区';
  29863. position: absolute;
  29864. left: 0;
  29865. top: 0;
  29866. display: block;
  29867. padding: 8px 10px;
  29868. background: #e0eafb;
  29869. color: #98a0ac;
  29870. font-size: 14px;
  29871. border-radius: 0 15px 15px 0;
  29872. z-index: 999;
  29873. }
  29874. .inter_box > iframe{
  29875. width: 100%;
  29876. height: 100%;
  29877. border: none;
  29878. }
  29879. .inter_setting{
  29880. display: block;
  29881. background-image: url(../../../assets/icon/course/setting.svg);
  29882. background-size: 100% 100%;
  29883. width: 20px;
  29884. height: 20px;
  29885. cursor: pointer;
  29886. margin-left: 10px;
  29887. }
  29888. .inter_setting_panel{
  29889. position: absolute;
  29890. left: 110px;
  29891. top: 30px;
  29892. background: #fff;
  29893. border-radius: 5px;
  29894. box-shadow: 0px 0px 2px 1px #00000017;
  29895. padding: 10px;
  29896. z-index: 999;
  29897. }
  29898. .panel_title{
  29899. text-align: center;
  29900. font-size: 18px;
  29901. margin-bottom: 10px;
  29902. }
  29903. .panel_tips{
  29904. font-weight: 500;
  29905. font-size: 14px;
  29906. text-align: center;
  29907. margin-bottom: 10px;
  29908. color: #6d6d6d;
  29909. }
  29910. .panel_input{
  29911. margin-bottom: 10px;
  29912. }
  29913. .panel_button{
  29914. display: flex;
  29915. justify-content: space-between;
  29916. }
  29917. .panel_input_record {
  29918. margin-top: 10px;
  29919. }
  29920. .panel_input_record > span{
  29921. margin-bottom: 5px;
  29922. display: block;
  29923. }
  29924. .custom-switch >>> .el-switch__label.is-active {
  29925. color: #0061FF;
  29926. }
  29927. .close_btn{
  29928. position: absolute;
  29929. top: 40px;
  29930. right: 10px;
  29931. box-shadow: 0 0 4px 2px #00000033;
  29932. border-radius: 70px 0 0 70px;
  29933. display: flex;
  29934. align-items: center;
  29935. padding-left: 5px;
  29936. padding: 10px 7px 10px 12px;
  29937. background: #fff;
  29938. cursor: pointer;
  29939. }
  29940. .close_btn > img {
  29941. width: 15px;
  29942. transition: 0.3s;
  29943. transform: rotate(0deg);
  29944. }
  29945. .close_btn_voice > img{
  29946. transform: rotate(180deg);
  29947. }
  29948. .resizable {
  29949. position: relative;
  29950. min-width: 350px; /* 最小宽度 */
  29951. max-width: 50%; /* 最大宽度 */
  29952. }
  29953. .resizer {
  29954. width: 12.8px;
  29955. height: 28.8px;
  29956. /* background: #ccc; */
  29957. position: absolute;
  29958. top: 50%;
  29959. left: 0;
  29960. cursor: ew-resize;
  29961. transform: translateY(-50%);
  29962. /* border-radius: 43px; */
  29963. background-image: url(../../../assets/icon/course/course_slide.png);
  29964. background-size: 100% 100%;
  29965. }
  29966. .pptBox{
  29967. position: fixed;
  29968. bottom: 10px;
  29969. left: 20px;
  29970. padding: 10px;
  29971. }
  29972. .pptBox > .box > div + div{
  29973. margin-top: 10px;
  29974. }
  29975. .ppClass{
  29976. background: #fff;
  29977. border-radius: 5px;
  29978. box-shadow: 0 0 6px 3px #00000030;
  29979. overflow: hidden;
  29980. }
  29981. .file-loading-class >>> .el-loading-spinner{
  29982. margin-top: -10px;
  29983. }
  29984. .file-loading-class >>> .el-loading-spinner .circular{
  29985. height: 20px;
  29986. width: 20px;
  29987. }
  29988. .button-toggle {
  29989. color: #007bff; /* 文本颜色 */
  29990. cursor: pointer; /* 鼠标悬停时显示手型 */
  29991. transition: color 0.2s; /* 文字颜色过渡效果 */
  29992. font-size: 14px;
  29993. }
  29994. .button-toggle:hover {
  29995. color: #0056b3; /* 悬停时的文字颜色 */
  29996. }
  29997. .button-toggle:focus {
  29998. outline: none; /* 去掉聚焦时的边框 */
  29999. }
  30000. .right_icon{
  30001. width: 12px;
  30002. height: 12px;
  30003. margin-left: 5px;
  30004. }
  30005. .buttonBoxB{
  30006. position: relative;
  30007. margin: 0 0 0 10px;
  30008. }
  30009. .buttonBoxB::after{
  30010. content: '';
  30011. display: block;
  30012. background-image: url(../../../assets/icon/course/downArrow.svg);
  30013. background-size: 100% 100%;
  30014. width: 15px;
  30015. height: 15px;
  30016. cursor: pointer;
  30017. margin-left: 5px;
  30018. }
  30019. .buttonBoxB:hover .buttonBox{
  30020. display: block;
  30021. }
  30022. .buttonBox {
  30023. position: absolute;
  30024. bottom: -0;
  30025. left: 0;
  30026. transform: translateY(100%);
  30027. background: #fff;
  30028. border-radius: 5px;
  30029. box-shadow: 0 0 3px 1px #e3e3e3;
  30030. width: 155px;
  30031. display: none;
  30032. z-index: 99999;
  30033. }
  30034. .buttonBox>div {
  30035. height: 40px;
  30036. line-height: 40px;
  30037. width: 100%;
  30038. text-align: center;
  30039. color: #000;
  30040. box-sizing: border-box;
  30041. }
  30042. .buttonBox>div+div {
  30043. border-top: 1px solid #e0e0e0;
  30044. }
  30045. .buttonBox>div:hover {
  30046. background: #f6f8ff;
  30047. }
  30048. .appendix_info_title {
  30049. padding: 15px 0 15px 0;
  30050. font-size: 20px;
  30051. font-weight: bold;
  30052. margin: 0 0 0 20px;
  30053. box-sizing: border-box;
  30054. display: flex;
  30055. align-items: center;
  30056. line-height: 20px;
  30057. }
  30058. .appendix_file_box{
  30059. width: 100%
  30060. }
  30061. .appendix_check_box{}
  30062. .appendix_check_box > div + div{
  30063. margin-top: 10px;
  30064. }
  30065. .appendix_check_task{
  30066. display: flex;
  30067. align-items: center;
  30068. }
  30069. .appendix_check_type{
  30070. display: flex;
  30071. align-items: center;
  30072. }
  30073. .appendix_check_task > span,
  30074. .appendix_check_type > span{
  30075. width: 100px;
  30076. }
  30077. .appendix_check_task > .checkButton,
  30078. .appendix_check_type > .checkButton{
  30079. border: 1px solid #1684fc;
  30080. color: #1684fc;
  30081. padding: 5px 10px;
  30082. border-radius: 5px;
  30083. margin-right: 10px;
  30084. cursor: pointer;
  30085. }
  30086. .appendix_check_task > .checkButton.checked,
  30087. .appendix_check_type > .checkButton.checked{
  30088. background: #1684fc;
  30089. color: #fff;
  30090. }
  30091. .appendix_check_all_box{
  30092. display: flex;
  30093. align-items: center;
  30094. margin-bottom: 5px;
  30095. }
  30096. .appendix_check_all{
  30097. display: flex;
  30098. align-items: center;
  30099. cursor: pointer;
  30100. }
  30101. .appendix_check_all_text{
  30102. margin-left: 5px;
  30103. }
  30104. .know_serach_box{
  30105. margin-bottom: 20px;
  30106. display: flex;
  30107. align-items: center;
  30108. }
  30109. .know_serach_box > span{
  30110. min-width: 100px;
  30111. }
  30112. .know_serach_box > .c_pub_button_add{
  30113. min-width: fit-content;
  30114. }
  30115. .add_chapters_check_box{
  30116. display: flex;
  30117. align-items: center;
  30118. height: 50px;
  30119. }
  30120. .add_chapters_check{
  30121. display: flex;
  30122. align-items: center;
  30123. cursor: pointer;
  30124. }
  30125. .Ovh{
  30126. width: 4em;
  30127. -webkit-line-clamp: 2;
  30128. text-align: center;
  30129. display: -webkit-box;
  30130. -webkit-box-orient: vertical;
  30131. overflow: hidden;
  30132. text-overflow: ellipsis;
  30133. }
  30134. </style>