addCourse.vue 1.2 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止</div>
  4. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken" @click="cancelAjax('teacherTask')">停止</div>
  5. <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
  6. <div class="courseTop">
  7. <!-- <div class="stepsNav">
  8. <el-breadcrumb separator-class="el-icon-arrow-right">
  9. <el-breadcrumb-item :to="{
  10. path:
  11. '/course?userid=' +
  12. userid +
  13. '&oid=' +
  14. oid +
  15. '&org=' +
  16. org +
  17. '&role=' +
  18. role,
  19. }">课程管理</el-breadcrumb-item>
  20. <el-breadcrumb-item>
  21. <span style="color: rgb(15, 126, 255)">添加课程</span>
  22. </el-breadcrumb-item>
  23. </el-breadcrumb>
  24. </div> -->
  25. <div class="r_pub_button_retrun" style="margin-left: auto" @click="retrunCourse">返回</div>
  26. </div>
  27. <div class="right" style="height: calc(100% - 36px); margin-top: 36px;" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  28. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  29. <!-- @mouseenter="stepDisplay(true)"
  30. @mouseleave="stepDisplay(false)" -->
  31. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  32. <div class="stepBg" v-if="false">
  33. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  34. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  35. <div>
  36. <img src="../../../assets/icon/first.png" alt />
  37. </div>
  38. <div>填写基本信息</div>
  39. </div>
  40. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  41. <div>
  42. <img src="../../../assets/icon/firstNo.png" alt />
  43. </div>
  44. <div>填写基本信息</div>
  45. </div>
  46. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  47. </div>
  48. <!-- <div
  49. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  50. class="second"
  51. @click="navSteps(2)"
  52. >
  53. <div style="margin: 5px 10px 0 0; width: 2rem">
  54. <img src="../../../assets/icon/second.png" alt />
  55. </div>
  56. <div>选择课程模板</div>
  57. </div>
  58. <div
  59. v-else-if="cidType === 0 && isStepDisplay"
  60. class="secondNo"
  61. @click="navSteps(2)"
  62. >
  63. <div>
  64. <img src="../../../assets/icon/secondNo.png" alt />
  65. </div>
  66. <div>选择课程模板</div>
  67. </div> -->
  68. <!-- <div
  69. v-if="isStepDisplay"
  70. class="stepBorder"
  71. :class="{ 'border-active': steps > 2 }"
  72. ></div> -->
  73. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  74. <div>
  75. <img src="../../../assets/icon/third.png" alt />
  76. </div>
  77. <div>上传课程内容</div>
  78. </div>
  79. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  80. <div>
  81. <img src="../../../assets/icon/thirdNo.png" alt />
  82. </div>
  83. <div>上传课程内容</div>
  84. </div>
  85. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  86. <div v-if="steps > 3 && isStepDisplay" class="four">
  87. <div>
  88. <img src="../../../assets/icon/four.png" alt />
  89. </div>
  90. <div>上传完成</div>
  91. </div>
  92. <div v-else-if="isStepDisplay" class="fourNo">
  93. <div>
  94. <img src="../../../assets/icon/fourNo.png" alt />
  95. </div>
  96. <div>上传完成</div>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  101. style="padding: 0" :style="{
  102. height:
  103. !isStepDisplay && !isBtnDisplay
  104. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  105. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  106. }">
  107. <!-- <div class="updateMask" :style="{
  108. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  109. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  110. <div class="whiteBg" style="background: unset; padding: 0">
  111. <div>
  112. <div class="basic_box" style="padding: 0">
  113. <div class="big_box">
  114. <div class="left_first">
  115. <div :class="{
  116. updateTips:
  117. cid && userid != courseUserid && role != '1',
  118. }">
  119. <div style="width: 100%">
  120. <div class="course_input_box2">
  121. <div class="course_input_box">
  122. <div class="bb_courseIcon">
  123. <img src="../../../assets/icon/new/course.png" />
  124. </div>
  125. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" @change="setCover" />
  126. </div>
  127. <div style=" margin-bottom: 15px; display:flex;">
  128. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  129. style="justify-content: center; min-width: 150px;"></el-switch>
  130. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  131. style="justify-content: center; min-width: 175px"></el-switch>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  137. <span>类型</span>
  138. <!-- 学科+ 主题+ 未来+ -->
  139. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  140. style="display: flex; align-items: center">
  141. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  142. :key="index">
  143. <el-radio :label="item.name">{{
  144. item.name
  145. }}</el-radio>
  146. </div>
  147. </el-radio-group>
  148. </div>
  149. <div class="both">
  150. <div class="choose">
  151. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  152. <span v-if="
  153. CourseTypeJson[item.id].length > 0 &&
  154. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  155. ? pTypeCheck.indexOf(item.id) != -1
  156. : true)
  157. ">{{ item.name }}:</span>
  158. <el-checkbox-group v-model="courseTypeId" @change="typeChange" v-if="
  159. CourseTypeJson[item.id].length > 0 &&
  160. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  161. ? pTypeCheck.indexOf(item.id) != -1
  162. : true)
  163. ">
  164. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  165. item1.name }}</el-checkbox>
  166. </el-checkbox-group>
  167. <!-- <div
  168. v-else
  169. style="font-size: 14px; margin-left: -8px"
  170. >
  171. 暂无
  172. </div> -->
  173. </div>
  174. </div>
  175. </div>
  176. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  177. <div class="info_box_t_box">
  178. <span>输出语言:</span>
  179. <el-radio-group v-model="languageSetting" style="display: flex; align-items: center" @change="changeLang">
  180. <div class="all_choose info_radio">
  181. <el-radio :label="0">简体中文</el-radio>
  182. </div>
  183. <div class="all_choose info_radio" style="margin-left: 10px">
  184. <el-radio :label="1">繁体中文</el-radio>
  185. </div>
  186. <div class="all_choose info_radio" style="margin-left: 10px">
  187. <el-radio :label="2">English</el-radio>
  188. </div>
  189. </el-radio-group>
  190. </div>
  191. </div>
  192. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  193. <div class="info_box_t_box">
  194. <!-- <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  195. style="justify-content: center; min-width: 175px"></el-switch> -->
  196. <span>生成模式:</span>
  197. <el-radio-group v-model="isuseT" style="display: flex; align-items: center" @change="changeIsuseT">
  198. <div class="all_choose info_radio">
  199. <el-radio :label="false">从零开始生成</el-radio>
  200. </div>
  201. <div class="all_choose info_radio" style="margin-left: 10px">
  202. <el-radio :label="true">从已有教案生成</el-radio>
  203. </div>
  204. <div class="all_choose info_radio" style="margin-left: 10px">
  205. <el-radio :label="1">对话模式生成</el-radio>
  206. </div>
  207. <div class="all_choose info_radio" style="margin-left: 10px">
  208. <el-radio :label="2">头脑风暴模式生成</el-radio>
  209. </div>
  210. </el-radio-group>
  211. </div>
  212. </div>
  213. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  214. <div class="info_box_t_box">
  215. <span>生成风格:</span>
  216. <div class="mode_box">
  217. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  218. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  219. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  220. </div>
  221. </div>
  222. </div>
  223. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  224. <div class="info_box_t_box">
  225. <span>课程节数:</span>
  226. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  227. <span>节</span>
  228. </div>
  229. <div class="info_box_t_box">
  230. <span>课程时长:</span>
  231. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  232. <span>min</span>
  233. </div>
  234. </div> -->
  235. </div>
  236. <div class="right_first" v-loading="imageloading2">
  237. <!-- <div class="ai_box">
  238. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  239. </div> -->
  240. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  241. 上传封面
  242. </div>
  243. <div style="width: 100%">
  244. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  245. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  246. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  247. <div v-if="cover.length == 0">点击添加封面</div>
  248. <div class="cover_mask">
  249. <img src="../../../assets/icon/new/cover_update.png" /><span
  250. style="margin-top: 5px">修改封面</span>
  251. </div>
  252. </div>
  253. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  254. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  255. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  256. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  257. <i class="el-icon-plus"></i>
  258. </el-upload> -->
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. </div>
  264. </div>
  265. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  266. <div class="whiteBg" style="border-radius: 0">
  267. <div class="c_info_title">
  268. 课程权限设置
  269. </div>
  270. <div class="wb_j_box">
  271. <div class="wb_j_box_content">
  272. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  273. (dialogVisibleClass = true),
  274. (classSearch = ''),
  275. (gradeId = ''),
  276. getClass()
  277. ">添加班级</button>
  278. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  279. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  280. getClassC(tc) }}</span>
  281. </div> -->
  282. <div class="wb_j_box_btn" @click="
  283. (dialogVisibleClass = true),
  284. (classSearch = ''),
  285. (gradeId = ''),
  286. getClass()
  287. ">
  288. <div class="wb_j_box_title">授课班级</div>
  289. <div class="wb_j_box_btn_c">
  290. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  291. v-if="checkboxList2.length" popper-class="text_tooltip2">
  292. <div class="wb_j_box_span">
  293. {{ getListClassC(checkboxList2) }}
  294. </div>
  295. </el-tooltip>
  296. <div v-else class="wb_j_box_span">请选择授课班级</div>
  297. <div class="wb_j_box_arrow"></div>
  298. </div>
  299. </div>
  300. </div>
  301. <div class="wb_j_box_content">
  302. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  303. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  304. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  305. checkBoolean
  306. ? checkboxList3
  307. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  308. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  309. </div> -->
  310. <div class="wb_j_box_btn" @click="openMember">
  311. <div class="wb_j_box_title">协同人员</div>
  312. <div class="wb_j_box_btn_c">
  313. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  314. v-if="checkboxList3.length" popper-class="text_tooltip2">
  315. <div class="wb_j_box_span">
  316. {{ getListMan2(checkboxList3) }}
  317. </div>
  318. </el-tooltip>
  319. <div v-else class="wb_j_box_span">请选择协同人员</div>
  320. <div class="wb_j_box_arrow"></div>
  321. </div>
  322. </div>
  323. </div>
  324. </div>
  325. </div>
  326. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  327. <div class="c_info_title">目标管理</div>
  328. <div style="margin: 0 auto; padding: 0 20px">
  329. <div style="
  330. width: 95%;
  331. min-height: 200px;
  332. border: 1px solid #cad1dc;
  333. border-radius: 4px;
  334. position: relative;
  335. ">
  336. <div class="e_add_top">
  337. <div class="e_add_title">
  338. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  339. 清除
  340. </button>
  341. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  342. 添加
  343. </button>
  344. <!-- <span>当前使用目标管理</span>
  345. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  346. <img
  347. src="../../../assets/line.png"
  348. class="cru_line"
  349. style="
  350. width: 125px;
  351. height: 20px;
  352. bottom: -10px;
  353. left: 155px;
  354. "
  355. /> -->
  356. </div>
  357. <div style="
  358. display: flex;
  359. flex-direction: row;
  360. align-items: center;
  361. ">
  362. <!-- <el-button
  363. type="primary"
  364. size="small"
  365. @click="dialogVisiblemb = true"
  366. >添加目标管理</el-button
  367. >
  368. <el-button
  369. type="primary"
  370. size="small"
  371. @click="deleteEva()"
  372. >清除内容</el-button
  373. > -->
  374. <!-- <div class="e_add_delete" @click="deleteEva()">
  375. <img src="../../../assets/icon/delete.png" alt="" />
  376. </div> -->
  377. </div>
  378. </div>
  379. <div v-if="evalua == ''">
  380. <div class="noneBox">
  381. <img src="../../../assets/icon/new/eva_none.png" />
  382. <span>请添加目标管理</span>
  383. </div>
  384. </div>
  385. <div class="e_add_content" v-else>
  386. <div class="e_add_list_pbox">
  387. <div class="e_add_list_pbox_title">
  388. <span class="type_title">切换模式</span>
  389. <div class="type_content">
  390. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  391. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  392. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  393. </div>
  394. </div>
  395. <div class="e_add_list_pbox_content">
  396. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  397. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  398. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  399. v-if="typeMode == 3">
  400. </SeeBoard>
  401. </div>
  402. </div>
  403. </div>
  404. </div>
  405. </div>
  406. </div>
  407. </div>
  408. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  409. <div style="position: relative;
  410. background: #fff;
  411. box-sizing: border-box;
  412. padding: 1px 20px 10px;
  413. width: 100%;
  414. border-radius: 10px;">
  415. <div style="
  416. display: flex;
  417. flex-direction: row;
  418. justify-content: space-between;
  419. align-items: center;
  420. " :style="{
  421. margin: true
  422. ? '20px 0 10px'
  423. : '20px 0 0',
  424. }">
  425. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  426. 已有教案
  427. <div class="add_info_box" style="margin: 0 0 0 auto">
  428. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  429. 上传已有教案
  430. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  431. beforeUploadInfo2(
  432. $event,
  433. 14
  434. )
  435. " />
  436. </button>
  437. <button class="c_pub_button_add" @click="clickGenTT" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  438. 一键智能总结生成
  439. </button>
  440. </div>
  441. </div>
  442. </div>
  443. <div>
  444. <div class="add_chapters_box add_c_none" v-if="
  445. teacherInfoData &&
  446. teacherInfoData.length == 0
  447. ">
  448. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  449. <span>暂时还没有内容,快去添加吧</span>
  450. </div>
  451. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  452. <div @dragstart="
  453. dragStart(item1, index1, 0)
  454. " @dragover.prevent="
  455. dragOver(index1, 0)
  456. " @dragend="dragEnd()" :draggable="isdrag ==
  457. 'chapter-' + 0 + '-' + index1
  458. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  459. getChapterData(
  460. $event,
  461. index1,
  462. item1.type
  463. )
  464. " :class="{
  465. dragOverTop2:
  466. newIndex === index1 &&
  467. typeIndex ==
  468. 'chapter-' +
  469. 0 +
  470. '-' +
  471. index1 &&
  472. oldIndex > index1 &&
  473. dragType == 'drag',
  474. dragOverBottom2:
  475. newIndex === index1 &&
  476. typeIndex ==
  477. 'chapter-' +
  478. 0 +
  479. '-' +
  480. index1 &&
  481. oldIndex < index1 &&
  482. dragType == 'drag',
  483. }">
  484. <div class="chapter_upload_o" style="
  485. position: relative;
  486. display: flex;
  487. align-items: center;
  488. ">
  489. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  490. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  491. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  492. </div>
  493. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  494. </div>
  495. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  496. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  497. </div>
  498. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  499. </div>
  500. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  501. </div>
  502. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  503. </div>
  504. </div>
  505. <div class="chapter_upload_n">
  506. <input readonly="true" v-if="
  507. item1.type == 2 ||
  508. item1.type == 3 ||
  509. item1.type == 12 ||
  510. item1.type == 13 ||
  511. item1.type == 7
  512. " :placeholder="item1.name" style="
  513. border: none;
  514. outline: none;
  515. width: 80%;
  516. minwidth: 215px;
  517. z-index: 99;
  518. font-size: 14px;
  519. white-space: nowrap;
  520. overflow: hidden;
  521. text-overflow: ellipsis;
  522. " />
  523. </div>
  524. <div class="chapter_upload_ic">
  525. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  526. <div class="chapter_upload_ic_r" @click.stop="
  527. deleteTeacherInfoData(
  528. $event,
  529. index1
  530. )
  531. ">
  532. <div></div>
  533. </div>
  534. </div>
  535. </div>
  536. </div>
  537. </div>
  538. </div>
  539. <div v-if="
  540. teacherinfoproVisible
  541. " class="mask">
  542. <div class="progressBox">
  543. <div class="lbox">
  544. <img src="../../../assets/loading.gif" />上传中,请稍后
  545. </div>
  546. <div style="margin-bottom: 10px">
  547. <span>{{
  548. teacherinfoisFinishSize
  549. }}</span>
  550. /
  551. <span>{{
  552. teacherinfoisAllSize
  553. }}</span>
  554. </div>
  555. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  556. ? teacherinfoprogress
  557. : 0
  558. " style="width: 80%"></el-progress> -->
  559. </div>
  560. </div>
  561. </div>
  562. </div>
  563. <div class="whiteBg" :style="{ minHeight: teacherTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;position: relative" v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  564. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken" @click="cancelAjax('teacherText')">停止</div>
  565. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  566. <div class="c_info_title">
  567. 已有教案摘要
  568. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  569. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  570. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '右键已有教案摘要-提取摘要按钮')"
  571. @click="openAiDialog(2, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '点击已有教案摘要-提取摘要按钮')">提取摘要</button>
  572. </el-tooltip>
  573. </div>
  574. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  575. <div style="width: calc(100%);" class='op_task_box'>
  576. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  577. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  578. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  579. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  580. <div class="op_box" :class="{op_box_isquote: isQuote['aiteacherTextDetail']}">
  581. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  582. <div class="op_box_right">
  583. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  584. <div class="r_pub_button_op"
  585. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '右键已有教案摘要-智能优化按钮')"
  586. @click="openAiDialog(2, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '点击已有教案摘要-智能优化按钮')">智能优化</div>
  587. </el-tooltip>
  588. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击已有教案摘要-确定/编辑按钮')">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  589. <el-switch style="margin-left: 10px" v-model="isQuote['aiteacherTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiteacherTextDetail'), addCourseBehavior('courseBehavior', '点击已有教案摘要-引用按钮')"></el-switch>
  590. </div>
  591. </div>
  592. </div>
  593. </div>
  594. </div>
  595. </div>
  596. <div class="whiteBg" :style="{ minHeight: targetTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  597. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1" @click="cancelAjax('target1')">停止</div>
  598. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  599. <div class="c_info_title">
  600. 课程目标
  601. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  602. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  603. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '右键课程目标-提取目标按钮')"
  604. @click="openAiDialog(2, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '点击课程目标-提取目标按钮')">提取目标</button>
  605.                   </el-tooltip>
  606. </div>
  607. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  608. <div style="width: calc(100%);" class='op_task_box'>
  609. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  610. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  611. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  612. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  613. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail']}">
  614. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  615. <div class="op_box_right">
  616. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  617. <div class="r_pub_button_op"
  618. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  619. @click="openAiDialog(2, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">智能优化</div>
  620. </el-tooltip>
  621. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  622. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aitargetTextDetail'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  623. </div>
  624. </div>
  625. </div>
  626. </div>
  627. </div>
  628. </div>
  629. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  630. <div style="position: relative;
  631. background: #fff;
  632. box-sizing: border-box;
  633. padding: 1px 20px 10px;
  634. width: 100%;
  635. border-radius: 10px;">
  636. <div style="
  637. display: flex;
  638. flex-direction: row;
  639. justify-content: space-between;
  640. align-items: center;
  641. " :style="{
  642. margin: true
  643. ? '20px 0 10px'
  644. : '20px 0 0',
  645. }">
  646. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  647. 系统推荐参考资料
  648. <div class="add_info_box" style="margin: 0 0 0 auto">
  649. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  650. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  651. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  652. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  653.  </el-tooltip>
  654. </div>
  655. </div>
  656. </div>
  657. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  658. <div class="add_chapters_box add_c_none" v-if="
  659. cankaoInfoData &&
  660. cankaoInfoData.length == 0
  661. ">
  662. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  663. <span>暂时还没有内容,快去添加吧</span>
  664. </div>
  665. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  666. <div @dragstart="
  667. dragStart(item1, index1, 0)
  668. " @dragover.prevent="
  669. dragOver(index1, 0)
  670. " @dragend="dragEnd()" :draggable="isdrag ==
  671. 'chapter-' + 0 + '-' + index1
  672. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  673. getChapterData(
  674. $event,
  675. index1,
  676. item1.type
  677. )
  678. " :class="{
  679. dragOverTop2:
  680. newIndex === index1 &&
  681. typeIndex ==
  682. 'chapter-' +
  683. 0 +
  684. '-' +
  685. index1 &&
  686. oldIndex > index1 &&
  687. dragType == 'drag',
  688. dragOverBottom2:
  689. newIndex === index1 &&
  690. typeIndex ==
  691. 'chapter-' +
  692. 0 +
  693. '-' +
  694. index1 &&
  695. oldIndex < index1 &&
  696. dragType == 'drag',
  697. }">
  698. <div class="chapter_upload_o" style="
  699. position: relative;
  700. display: flex;
  701. align-items: center;
  702. ">
  703. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  704. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  705. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  706. </div>
  707. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  708. </div>
  709. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  710. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  711. </div>
  712. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  713. </div>
  714. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  715. </div>
  716. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  717. </div>
  718. </div>
  719. <div class="chapter_upload_n">
  720. <input readonly="true" v-if="
  721. item1.type == 2 ||
  722. item1.type == 3 ||
  723. item1.type == 12 ||
  724. item1.type == 13 ||
  725. item1.type == 7
  726. " :placeholder="item1.name" style="
  727. border: none;
  728. outline: none;
  729. width: 80%;
  730. minwidth: 215px;
  731. z-index: 99;
  732. font-size: 14px;
  733. white-space: nowrap;
  734. overflow: hidden;
  735. text-overflow: ellipsis;
  736. " />
  737. </div>
  738. <div class="chapter_upload_ic">
  739. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  740. <div class="chapter_upload_ic_r" @click.stop="
  741. deleteCankaoInfoData(
  742. $event,
  743. index1
  744. )
  745. ">
  746. <div></div>
  747. </div>
  748. </div>
  749. </div>
  750. </div>
  751. </div>
  752. </div>
  753. </div>
  754. </div>
  755. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  756. <div style="position: relative;
  757. background: #fff;
  758. box-sizing: border-box;
  759. padding: 1px 20px 10px;
  760. width: 100%;
  761. border-radius: 10px;">
  762. <div style="
  763. display: flex;
  764. flex-direction: row;
  765. justify-content: space-between;
  766. align-items: center;
  767. " :style="{
  768. margin: true
  769. ? '20px 0 10px'
  770. : '20px 0 0',
  771. }">
  772. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  773. 参考标准
  774. <div class="add_info_box" style="margin: 0 0 0 auto">
  775. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  776. 上传参考标准
  777. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  778. beforeUploadInfo2(
  779. $event,
  780. 19
  781. )
  782. " />
  783. </button>
  784. </div>
  785. </div>
  786. </div>
  787. <div>
  788. <div class="add_chapters_box add_c_none" v-if="
  789. knowInfoData &&
  790. knowInfoData.length == 0
  791. ">
  792. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  793. <span>暂时还没有内容,快去添加吧</span>
  794. </div>
  795. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  796. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
  797. getChapterData(
  798. $event,
  799. index1,
  800. item1.type
  801. )
  802. " >
  803. <div class="chapter_upload_o" style="
  804. position: relative;
  805. display: flex;
  806. align-items: center;
  807. ">
  808. <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData(item1.fileid)"></div>
  809. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  810. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  811. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  812. </div>
  813. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  814. </div>
  815. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  816. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  817. </div>
  818. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  819. </div>
  820. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  821. </div>
  822. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  823. </div>
  824. </div>
  825. <div class="chapter_upload_n">
  826. <input readonly="true" v-if="
  827. item1.type == 2 ||
  828. item1.type == 3 ||
  829. item1.type == 12 ||
  830. item1.type == 13 ||
  831. item1.type == 7
  832. " :placeholder="item1.name" @click.stop="
  833. checkChpater3($event, index1, item1)
  834. " style="
  835. border: none;
  836. outline: none;
  837. width: 80%;
  838. minwidth: 215px;
  839. z-index: 99;
  840. font-size: 14px;
  841. white-space: nowrap;
  842. overflow: hidden;
  843. text-overflow: ellipsis;
  844. " />
  845. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  846. border: none;
  847. outline: none;
  848. width: 80%;
  849. white-space: nowrap;
  850. overflow: hidden;
  851. text-overflow: ellipsis;
  852. " readonly="true" @click="
  853. selectAttText(index1)
  854. " />
  855. <input :placeholder="item1.title ? item1.title : '链接'
  856. " v-if="item1.type == 8" style="
  857. border: none;
  858. outline: none;
  859. width: 80%;
  860. white-space: nowrap;
  861. overflow: hidden;
  862. text-overflow: ellipsis;
  863. " readonly="true" @click="selectLine(index1)" />
  864. <input :placeholder="item1.title ? item1.title : '链接'
  865. " v-if="item1.type == 14" style="
  866. border: none;
  867. outline: none;
  868. width: 80%;
  869. white-space: nowrap;
  870. overflow: hidden;
  871. text-overflow: ellipsis;
  872. " readonly="true" @click="
  873. openUpdateSource(index1)
  874. " />
  875. </div>
  876. <div class="chapter_upload_ic">
  877. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  878. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  879. checkChpater3($event, index1, item1)
  880. ">
  881. <div></div>
  882. </div>
  883. <div class="chapter_upload_ic_r" @click.stop="
  884. deleteKnowInfoData(
  885. $event,
  886. index1
  887. )
  888. ">
  889. <div></div>
  890. </div>
  891. </div>
  892. </div>
  893. </div>
  894. </div>
  895. </div>
  896. <div v-if="
  897. knowinfoproVisible
  898. " class="mask">
  899. <div class="progressBox">
  900. <div class="lbox">
  901. <img src="../../../assets/loading.gif" />上传中,请稍后
  902. </div>
  903. <div style="margin-bottom: 10px">
  904. <span>{{
  905. knowinfoisFinishSize
  906. }}</span>
  907. /
  908. <span>{{
  909. knowinfoisAllSize
  910. }}</span>
  911. </div>
  912. </div>
  913. </div>
  914. </div>
  915. </div>
  916. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  917. <div style="position: relative;
  918. background: #fff;
  919. box-sizing: border-box;
  920. padding: 1px 20px 10px;
  921. width: 100%;
  922. border-radius: 10px;">
  923. <div style="
  924. display: flex;
  925. flex-direction: row;
  926. justify-content: space-between;
  927. align-items: center;
  928. " :style="{
  929. margin: true
  930. ? '20px 0 10px'
  931. : '20px 0 0',
  932. }">
  933. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  934. 检索资料
  935. <div class="add_info_box" style="margin: 0 0 0 auto;align-items:center">
  936. <input type="text" placeholder="请输入检索关键词" class="binfo_input" v-model="searchFileName" style="width: 200px;margin: 0 5px 10px 0;min-height: 36px;box-sizing: border-box;height: 36px;"/>
  937. <button class="c_pub_button_add" @click="startFindMatchingContents">
  938. 点击检索资料
  939. <!-- <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  940. beforeUploadInfo2(
  941. $event,
  942. 20
  943. )
  944. " /> -->
  945. </button>
  946. </div>
  947. </div>
  948. </div>
  949. <div style="display: flex; align-items: center;">
  950. <div v-loading="knowInfoDataLoading" element-loading-text="小可正在努力生成中,请稍等..." style="height: 200px; width:100%;">
  951. <div class="c_pub_button_confirm stopBtn" v-if="knowInfoDataLoading && isfindMatchingContents" @click="cancelAjax('findMatchingContents')">停止</div>
  952. <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
  953. knowInfoData3 &&
  954. knowInfoData3.length == 0
  955. ">
  956. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  957. <span>暂时还没有内容,快去检索吧</span>
  958. </div>
  959. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:100%;overflow: auto;" @scroll="panFind">
  960. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData3" :key="item1.id" @click="
  961. getChapterData(
  962. $event,
  963. index1,
  964. item1.type
  965. )
  966. " >
  967. <div class="chapter_upload_o" style="
  968. position: relative;
  969. display: flex;
  970. align-items: center;
  971. ">
  972. <div class="chapter_upload_check file-loading-class" :class="{ checked: knowFileids3.indexOf(item1.url) != -1 }" @click="checkKnowInfoData3(item1.url)"></div>
  973. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  974. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  975. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  976. </div>
  977. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  978. </div>
  979. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  980. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  981. </div>
  982. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  983. </div>
  984. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  985. </div>
  986. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  987. </div>
  988. </div>
  989. <div class="chapter_upload_n">
  990. <el-tooltip :content="item1.name" placement="top" effect="dark">
  991. <!-- content to trigger tooltip here -->
  992. <input readonly="true" v-if="
  993. item1.type == 2 ||
  994. item1.type == 3 ||
  995. item1.type == 12 ||
  996. item1.type == 13 ||
  997. item1.type == 7
  998. " :placeholder="item1.name" @click.stop="
  999. checkChpater3($event, index1, item1)
  1000. " style="
  1001. border: none;
  1002. outline: none;
  1003. width: 80%;
  1004. minwidth: 215px;
  1005. z-index: 99;
  1006. font-size: 14px;
  1007. white-space: nowrap;
  1008. overflow: hidden;
  1009. text-overflow: ellipsis;
  1010. " />
  1011. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1012. border: none;
  1013. outline: none;
  1014. width: 80%;
  1015. white-space: nowrap;
  1016. overflow: hidden;
  1017. text-overflow: ellipsis;
  1018. " readonly="true" @click="
  1019. selectAttText(index1)
  1020. " />
  1021. <input :placeholder="item1.title ? item1.title : '链接'
  1022. " v-if="item1.type == 8" style="
  1023. border: none;
  1024. outline: none;
  1025. width: 80%;
  1026. white-space: nowrap;
  1027. overflow: hidden;
  1028. text-overflow: ellipsis;
  1029. " readonly="true" @click="selectLine(index1)" />
  1030. <input :placeholder="item1.title ? item1.title : '链接'
  1031. " v-if="item1.type == 14" style="
  1032. border: none;
  1033. outline: none;
  1034. width: 80%;
  1035. white-space: nowrap;
  1036. overflow: hidden;
  1037. text-overflow: ellipsis;
  1038. " readonly="true" @click="
  1039. openUpdateSource(index1)
  1040. " />
  1041. </el-tooltip>
  1042. </div>
  1043. <div class="chapter_upload_ic">
  1044. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1045. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1046. checkChpater3($event, index1, item1)
  1047. ">
  1048. <div></div>
  1049. </div>
  1050. <!-- <div class="chapter_upload_ic_r" @click.stop="
  1051. deleteKnowInfoData3(
  1052. $event,
  1053. index1
  1054. )
  1055. ">
  1056. <div></div>
  1057. </div> -->
  1058. </div>
  1059. </div>
  1060. </div>
  1061. </div>
  1062. </div>
  1063. <div style="margin: 0 5px; min-width: fit-content">
  1064. <button class="c_pub_button_confirm" @click="useUrl">
  1065. 使用
  1066. <svg t="1730970226429" class="right_icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1465" width="128" height="128"><path 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" p-id="1466" fill="#ffffff"></path></svg>
  1067. </button>
  1068. </div>
  1069. <div style="height: 200px; width:100%;">
  1070. <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
  1071. knowInfoData2 &&
  1072. knowInfoData2.length == 0
  1073. ">
  1074. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1075. <span>暂时还没有内容,快去添加吧</span>
  1076. </div>
  1077. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:100%;overflow: auto;" ref="rightKnow">
  1078. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData2" :key="item1.id" @click="
  1079. getChapterData(
  1080. $event,
  1081. index1,
  1082. item1.type
  1083. )
  1084. " >
  1085. <div class="chapter_upload_o" style="
  1086. position: relative;
  1087. display: flex;
  1088. align-items: center;
  1089. ">
  1090. <div class="chapter_upload_check file-loading-class" :class="{ checked: knowFileids2.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData2(item1.fileid)" v-loading="!item1.fileid"></div>
  1091. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1092. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1093. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1094. </div>
  1095. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1096. </div>
  1097. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1098. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1099. </div>
  1100. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1101. </div>
  1102. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1103. </div>
  1104. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1105. </div>
  1106. </div>
  1107. <div class="chapter_upload_n">
  1108. <el-tooltip :content="item1.name" placement="top" effect="dark">
  1109. <!-- content to trigger tooltip here -->
  1110. <input readonly="true" v-if="
  1111. item1.type == 2 ||
  1112. item1.type == 3 ||
  1113. item1.type == 12 ||
  1114. item1.type == 13 ||
  1115. item1.type == 7
  1116. " :placeholder="item1.name" @click.stop="
  1117. checkChpater3($event, index1, item1)
  1118. " style="
  1119. border: none;
  1120. outline: none;
  1121. width: 80%;
  1122. minwidth: 215px;
  1123. z-index: 99;
  1124. font-size: 14px;
  1125. white-space: nowrap;
  1126. overflow: hidden;
  1127. text-overflow: ellipsis;
  1128. " />
  1129. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1130. border: none;
  1131. outline: none;
  1132. width: 80%;
  1133. white-space: nowrap;
  1134. overflow: hidden;
  1135. text-overflow: ellipsis;
  1136. " readonly="true" @click="
  1137. selectAttText(index1)
  1138. " />
  1139. <input :placeholder="item1.title ? item1.title : '链接'
  1140. " v-if="item1.type == 8" style="
  1141. border: none;
  1142. outline: none;
  1143. width: 80%;
  1144. white-space: nowrap;
  1145. overflow: hidden;
  1146. text-overflow: ellipsis;
  1147. " readonly="true" @click="selectLine(index1)" />
  1148. <input :placeholder="item1.title ? item1.title : '链接'
  1149. " v-if="item1.type == 14" style="
  1150. border: none;
  1151. outline: none;
  1152. width: 80%;
  1153. white-space: nowrap;
  1154. overflow: hidden;
  1155. text-overflow: ellipsis;
  1156. " readonly="true" @click="
  1157. openUpdateSource(index1)
  1158. " />
  1159. </el-tooltip>
  1160. </div>
  1161. <div class="chapter_upload_ic">
  1162. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1163. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1164. checkChpater3($event, index1, item1)
  1165. ">
  1166. <div></div>
  1167. </div>
  1168. <div class="chapter_upload_ic_r" @click.stop="
  1169. deleteKnowInfoData2(
  1170. $event,
  1171. index1
  1172. )
  1173. ">
  1174. <div></div>
  1175. </div>
  1176. </div>
  1177. </div>
  1178. </div>
  1179. </div>
  1180. </div>
  1181. </div>
  1182. <div v-if="
  1183. knowinfoproVisible2
  1184. " class="mask">
  1185. <div class="progressBox">
  1186. <div class="lbox">
  1187. <img src="../../../assets/loading.gif" />上传中,请稍后
  1188. </div>
  1189. <div style="margin-bottom: 10px">
  1190. <span>{{
  1191. knowinfoisFinishSize2
  1192. }}</span>
  1193. /
  1194. <span>{{
  1195. knowinfoisAllSize2
  1196. }}</span>
  1197. </div>
  1198. </div>
  1199. </div>
  1200. </div>
  1201. </div>
  1202. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && infoData2.length">
  1203. <div style="position: relative;
  1204. background: #fff;
  1205. box-sizing: border-box;
  1206. padding: 1px 20px 10px;
  1207. width: 100%;
  1208. border-radius: 10px;">
  1209. <div style="
  1210. display: flex;
  1211. flex-direction: row;
  1212. justify-content: space-between;
  1213. align-items: center;
  1214. " :style="{
  1215. margin: true
  1216. ? '20px 0 10px'
  1217. : '20px 0 0',
  1218. }">
  1219. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1220. 知识库
  1221. <div class="add_info_box" style="margin: 0 0 0 auto">
  1222. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1223. 上传补充资料
  1224. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1225. beforeUploadInfo2(
  1226. $event,
  1227. 15
  1228. )
  1229. " />
  1230. </button>
  1231. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="knowFileids.length">
  1232. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1233. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  1234. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  1235.  </el-tooltip> -->
  1236. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1237. @click="openAiDialog(2, 'aiSearchFile2')" v-if="knowFileids.length">智能检索资料</button>
  1238. </div>
  1239. </div>
  1240. </div>
  1241. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等..." :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  1242. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken" @click="cancelAjax('file')">停止</div>
  1243. <div class="add_chapters_box add_c_none" v-if="
  1244. infoData2 &&
  1245. infoData2.length == 0
  1246. ">
  1247. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1248. <span>暂时还没有内容,快去添加吧</span>
  1249. </div>
  1250. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1251. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  1252. getChapterData(
  1253. $event,
  1254. index1,
  1255. item1.type
  1256. )
  1257. " >
  1258. <div class="chapter_upload_o" style="
  1259. position: relative;
  1260. display: flex;
  1261. align-items: center;
  1262. ">
  1263. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  1264. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1265. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1266. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1267. </div>
  1268. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1269. </div>
  1270. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1271. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1272. </div>
  1273. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1274. </div>
  1275. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1276. </div>
  1277. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1278. </div>
  1279. </div>
  1280. <div class="chapter_upload_n">
  1281. <input readonly="true" v-if="
  1282. item1.type == 2 ||
  1283. item1.type == 3 ||
  1284. item1.type == 12 ||
  1285. item1.type == 13 ||
  1286. item1.type == 7
  1287. " :placeholder="item1.name" @click.stop="
  1288. checkChpater2($event, index1 )
  1289. " style="
  1290. border: none;
  1291. outline: none;
  1292. width: 80%;
  1293. minwidth: 215px;
  1294. z-index: 99;
  1295. font-size: 14px;
  1296. white-space: nowrap;
  1297. overflow: hidden;
  1298. text-overflow: ellipsis;
  1299. " />
  1300. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1301. border: none;
  1302. outline: none;
  1303. width: 80%;
  1304. white-space: nowrap;
  1305. overflow: hidden;
  1306. text-overflow: ellipsis;
  1307. " readonly="true" @click="
  1308. selectAttText(index1)
  1309. " />
  1310. <input :placeholder="item1.title ? item1.title : '链接'
  1311. " v-if="item1.type == 8" style="
  1312. border: none;
  1313. outline: none;
  1314. width: 80%;
  1315. white-space: nowrap;
  1316. overflow: hidden;
  1317. text-overflow: ellipsis;
  1318. " readonly="true" @click="selectLine(index1)" />
  1319. <input :placeholder="item1.title ? item1.title : '链接'
  1320. " v-if="item1.type == 14" style="
  1321. border: none;
  1322. outline: none;
  1323. width: 80%;
  1324. white-space: nowrap;
  1325. overflow: hidden;
  1326. text-overflow: ellipsis;
  1327. " readonly="true" @click="
  1328. openUpdateSource(index1)
  1329. " />
  1330. </div>
  1331. <div class="chapter_upload_ic">
  1332. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1333. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1334. checkChpater2($event, index1 )
  1335. ">
  1336. <div></div>
  1337. </div>
  1338. <div class="chapter_upload_ic_r" @click.stop="
  1339. deleteInfoData2(
  1340. $event,
  1341. index1
  1342. )
  1343. ">
  1344. <div></div>
  1345. </div>
  1346. </div>
  1347. </div>
  1348. </div>
  1349. </div>
  1350. </div>
  1351. <div v-if="
  1352. infoproVisible
  1353. " class="mask">
  1354. <div class="progressBox">
  1355. <div class="lbox">
  1356. <img src="../../../assets/loading.gif" />上传中,请稍后
  1357. </div>
  1358. <div style="margin-bottom: 10px">
  1359. <span>{{
  1360. infoisFinishSize
  1361. }}</span>
  1362. /
  1363. <span>{{
  1364. infoisAllSize
  1365. }}</span>
  1366. </div>
  1367. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1368. ? infoprogress
  1369. : 0
  1370. " style="width: 80%"></el-progress> -->
  1371. </div>
  1372. </div>
  1373. </div>
  1374. </div>
  1375. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="(isuseT === 2)">
  1376. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1377. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1378. 课程概况<span class="inter_setting" @click="openInterPanSetting2" v-if="istemplate == 1"></span>
  1379. <div class="inter_setting_panel" v-show="interSetting">
  1380. <div class="panel_title">配置工作流</div>
  1381. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1382. <div class="panel_input">
  1383. <input type="text" :placeholder="'请输入agentid'" class="binfo_input" v-model="r_agentid"/>
  1384. <div class="panel_input_record">
  1385. <span>议程和问题引导</span>
  1386. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordstart" placeholder="议程和问题引导"></textarea>
  1387. </div>
  1388. <div class="panel_input_record">
  1389. <span>查看进度</span>
  1390. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordCheckJindu" placeholder="查看进度"></textarea>
  1391. </div>
  1392. <div class="panel_input_record">
  1393. <span>总结并生成课程概况</span>
  1394. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordCourseD" placeholder="总结并生成课程概况"></textarea>
  1395. </div>
  1396. </div>
  1397. <div class="panel_button" style="justify-content: flex-end;">
  1398. <button class="c_pub_button_confirm" @click="setAgentid2" style="margin-right: 10px;">确认</button>
  1399. <button class="c_pub_button_return" @click="cancelInterSetting2">取消</button>
  1400. </div>
  1401. </div>
  1402. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1403. </div>
  1404. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1405. <div style="width: calc(100%);height: 100%" class='op_task_box inter_voiceBox'>
  1406. <recordV
  1407. :videoText2.sync="recordVideoText"
  1408. :audioUrl2.sync="recordAudioUrl"></recordV>
  1409. </div>
  1410. <div class="inter_box" v-show="interPan" style="margin: 0 0 0 10px;max-width: 50%;max-height:500px;">
  1411. <aiBoxCourseDetail
  1412. v-if="aiJson.recordAgentid && chatid"
  1413. :languageSetting="languageSetting"
  1414. :courseId="chatid"
  1415. :courseText2.sync="courseText"
  1416. :viedoText="recordVideoText"
  1417. :agentid="aiJson.recordAgentid"
  1418. :recordstart="aiJson.recordstart"
  1419. :recordCheckJindu="aiJson.recordCheckJindu"
  1420. :recordCourseD="aiJson.recordCourseD"
  1421. :courseInfo="course_info"
  1422. :fileids='[...knowFileids, ...knowFileids2]'></aiBoxCourseDetail>
  1423. </div>
  1424. </div>
  1425. </div>
  1426. </div>
  1427. <div class="whiteBg" :style="{ minHeight: textLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!(isuseT === true) && !(isuseT === 1) && !(isuseT === 2) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid)) || (isuseT === 2 && courseText)">
  1428. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken" @click="cancelAjax('text')">停止</div>
  1429. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1430. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  1431. 课程简要描述
  1432. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1433. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1434. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1), addCourseBehavior('courseBehavior', '右键课程简要描述-AI优化按钮')"
  1435. @click="openAiDialog(2, 'aiDetail',1), addCourseBehavior('courseBehavior', '点击课程简要描述-AI优化按钮')">AI优化</button>
  1436. </el-tooltip>
  1437. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">生成概况和目标</button>
  1438. </div>
  1439. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1440. <div style="width: calc(100%);" class='op_task_box'>
  1441. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1442. placeholder="请输入课程简要描述" v-if="courseTextB" @change="textAreaChange('courseText')"></textarea>
  1443. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  1444. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  1445. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1446. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1447. <div class="op_box_right">
  1448. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1449. <div class="r_pub_button_op"
  1450. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2), addCourseBehavior('courseBehavior', '右键课程简要描述-智能优化按钮')"
  1451. @click="openAiDialog(2, 'aiDetail', 2), addCourseBehavior('courseBehavior', '点击课程简要描述-智能优化按钮')">智能优化</div>
  1452. </el-tooltip>
  1453. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程简要描述-确定/编辑按钮')">{{ courseTextB ? '确定' : '编辑'}}</div>
  1454. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程简要描述-引用按钮')"></el-switch>
  1455. </div>
  1456. </div>
  1457. </div>
  1458. </div>
  1459. </div>
  1460. </div>
  1461. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(isuseT === 1)">
  1462. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1463. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1464. 课程概况<span class="inter_setting" @click="openInterPanSetting"></span>
  1465. <div class="inter_setting_panel" v-show="interSetting">
  1466. <div class="panel_title">配置工作流</div>
  1467. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1468. <div class="panel_input">
  1469. <input type="text" :placeholder="this.aiJson.agentid ? this.aiJson.agentid : '请输入agentid'" class="binfo_input" v-model="agentid"/>
  1470. </div>
  1471. <div class="panel_button">
  1472. <button class="c_pub_button_confirm" @click="setAgentid">确认</button>
  1473. <button class="c_pub_button_confirm" @click="rebuildAgentid" v-if="istemplate != 1">复原</button>
  1474. <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
  1475. </div>
  1476. </div>
  1477. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1478. </div>
  1479. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1480. <div class="inter_box" v-show="interPan">
  1481. <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl" frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
  1482. </div>
  1483. <div style="width: calc(100%);height: 100%" class='op_task_box' :class="{inter_Detailbox: !courseTextB && interPan}">
  1484. <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
  1485. placeholder="请输入课程简要描述" v-if="courseTextB && interPan" @change="textAreaChange('courseText')"></textarea>
  1486. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1487. placeholder="请输入课程简要描述" v-else-if="courseTextB && !interPan" @change="textAreaChange('courseText')"></textarea>
  1488. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-else-if="textLoading"></div>
  1489. <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-html="MarkdownT(courseText)" v-else></div>
  1490. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1491. <div class="op_remark"></div>
  1492. <div class="op_box_right">
  1493. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1494. <div class="r_pub_button_op"
  1495. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1496. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1497. </el-tooltip> -->
  1498. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程概况-确定/编辑按钮')">{{ courseTextB ? '确定' : '编辑'}}</div>
  1499. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程概况-引用按钮')"></el-switch>
  1500. </div>
  1501. </div>
  1502. </div>
  1503. </div>
  1504. </div>
  1505. </div>
  1506. <div class="whiteBg" :style="{ minHeight: targetTextLoading2 ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2" element-loading-text="小可正在努力生成中,请稍等..." v-if="((!(isuseT === true) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1507. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2" @click="cancelAjax('target2')">停止</div>
  1508. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1509. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  1510. 课程目标
  1511. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  1512. 上传补充资料
  1513. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1514. beforeUploadInfo2(
  1515. $event,
  1516. 16
  1517. )
  1518. " />
  1519. </button>
  1520. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  1521. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1522. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  1523. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  1524. </el-tooltip>
  1525. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1526. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1527. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '右键课程目标-生成目标按钮')"
  1528. @click="openAiDialog(2, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '点击课程目标-生成目标按钮')" ref="aitargetTextDetail3">生成目标</button>
  1529. </el-tooltip>
  1530. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  1531. <div class="add_chapters_box add_c_none" v-if="
  1532. mubiaoInfoData &&
  1533. mubiaoInfoData.length == 0
  1534. ">
  1535. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1536. <span>暂时还没有内容,快去添加吧</span>
  1537. </div>
  1538. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1539. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  1540. getChapterData(
  1541. $event,
  1542. index1,
  1543. item1.type
  1544. )
  1545. " >
  1546. <div class="chapter_upload_o" style="
  1547. position: relative;
  1548. display: flex;
  1549. align-items: center;
  1550. ">
  1551. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1552. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1553. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1554. </div>
  1555. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1556. </div>
  1557. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1558. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1559. </div>
  1560. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1561. </div>
  1562. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1563. </div>
  1564. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1565. </div>
  1566. </div>
  1567. <div class="chapter_upload_n">
  1568. <input readonly="true" v-if="
  1569. item1.type == 2 ||
  1570. item1.type == 3 ||
  1571. item1.type == 12 ||
  1572. item1.type == 13 ||
  1573. item1.type == 7
  1574. " :placeholder="item1.name" @click.stop="
  1575. checkChpater3($event, index1, item1)
  1576. " style="
  1577. border: none;
  1578. outline: none;
  1579. width: 80%;
  1580. minwidth: 215px;
  1581. z-index: 99;
  1582. font-size: 14px;
  1583. white-space: nowrap;
  1584. overflow: hidden;
  1585. text-overflow: ellipsis;
  1586. " />
  1587. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1588. border: none;
  1589. outline: none;
  1590. width: 80%;
  1591. white-space: nowrap;
  1592. overflow: hidden;
  1593. text-overflow: ellipsis;
  1594. " readonly="true" @click="
  1595. selectAttText(index1)
  1596. " />
  1597. <input :placeholder="item1.title ? item1.title : '链接'
  1598. " v-if="item1.type == 8" style="
  1599. border: none;
  1600. outline: none;
  1601. width: 80%;
  1602. white-space: nowrap;
  1603. overflow: hidden;
  1604. text-overflow: ellipsis;
  1605. " readonly="true" @click="selectLine(index1)" />
  1606. <input :placeholder="item1.title ? item1.title : '链接'
  1607. " v-if="item1.type == 14" style="
  1608. border: none;
  1609. outline: none;
  1610. width: 80%;
  1611. white-space: nowrap;
  1612. overflow: hidden;
  1613. text-overflow: ellipsis;
  1614. " readonly="true" @click="
  1615. openUpdateSource(index1)
  1616. " />
  1617. </div>
  1618. <div class="chapter_upload_ic">
  1619. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1620. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1621. checkChpater3($event, index1, item1)
  1622. ">
  1623. <div></div>
  1624. </div>
  1625. <div class="chapter_upload_ic_r" @click.stop="
  1626. deletemubiaoInfoData(
  1627. $event,
  1628. index1
  1629. )
  1630. ">
  1631. <div></div>
  1632. </div>
  1633. </div>
  1634. </div>
  1635. </div>
  1636. </div>
  1637. </div>
  1638. <div v-if="
  1639. mubiaoinfoproVisible
  1640. " class="mask">
  1641. <div class="progressBox">
  1642. <div class="lbox">
  1643. <img src="../../../assets/loading.gif" />上传中,请稍后
  1644. </div>
  1645. <div style="margin-bottom: 10px">
  1646. <span>{{
  1647. mubiaoinfoisFinishSize
  1648. }}</span>
  1649. /
  1650. <span>{{
  1651. mubiaoinfoisAllSize
  1652. }}</span>
  1653. </div>
  1654. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1655. ? mubiaoinfoprogress
  1656. : 0
  1657. " style="width: 80%"></el-progress> -->
  1658. </div>
  1659. </div>
  1660. </div>
  1661. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1662. <div style="width: calc(100%);" class='op_task_box'>
  1663. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  1664. placeholder="请输入课程目标" v-if="targetCourseText2B" @change="textAreaChange('targetCourseText2')"></textarea>
  1665. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  1666. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1667. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail2']}">
  1668. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1669. <div class="op_box_right">
  1670. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1671. <div class="r_pub_button_op"
  1672. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  1673. @click="openAiDialog(2, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">智能优化</div>
  1674. </el-tooltip>
  1675. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1676. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aitargetTextDetail2'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  1677. </div>
  1678. </div>
  1679. </div>
  1680. </div>
  1681. </div>
  1682. </div>
  1683. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  1684. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1685. <div class="c_info_title">
  1686. 补充资料
  1687. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1688. </div>
  1689. <div class="buchong_box">
  1690. <span>暂时还没有内容,快去添加吧~</span>
  1691. </div>
  1692. </div> -->
  1693. <div style="position: relative;
  1694. background: #fff;
  1695. box-sizing: border-box;
  1696. padding: 1px 20px 10px;
  1697. width: 100%;
  1698. border-radius: 10px;">
  1699. <div style="
  1700. display: flex;
  1701. flex-direction: row;
  1702. justify-content: space-between;
  1703. align-items: center;
  1704. " :style="{
  1705. margin: true
  1706. ? '20px 0 10px'
  1707. : '20px 0 0',
  1708. }">
  1709. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1710. 补充资料
  1711. <div class="add_info_box" style="margin: 0 0 0 auto">
  1712. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1713. 上传补充资料
  1714. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1715. beforeUploadInfo2(
  1716. $event,
  1717. 13
  1718. )
  1719. " />
  1720. </button>
  1721. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1722. 图文
  1723. </button>
  1724. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1725. 链接
  1726. </button>
  1727. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1728. 代码
  1729. </button>
  1730. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1731. 资源
  1732. </button> -->
  1733. </div>
  1734. </div>
  1735. </div>
  1736. <div>
  1737. <div class="add_chapters_box add_c_none" v-if="
  1738. infoData &&
  1739. infoData.length == 0
  1740. ">
  1741. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1742. <span>暂时还没有内容,快去添加吧</span>
  1743. </div>
  1744. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1745. <div @dragstart="
  1746. dragStart(item1, index1, 0)
  1747. " @dragover.prevent="
  1748. dragOver(index1, 0)
  1749. " @dragend="dragEnd()" :draggable="isdrag ==
  1750. 'chapter-' + 0 + '-' + index1
  1751. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1752. getChapterData(
  1753. $event,
  1754. index1,
  1755. item1.type
  1756. )
  1757. " :class="{
  1758. dragOverTop2:
  1759. newIndex === index1 &&
  1760. typeIndex ==
  1761. 'chapter-' +
  1762. 0 +
  1763. '-' +
  1764. index1 &&
  1765. oldIndex > index1 &&
  1766. dragType == 'drag',
  1767. dragOverBottom2:
  1768. newIndex === index1 &&
  1769. typeIndex ==
  1770. 'chapter-' +
  1771. 0 +
  1772. '-' +
  1773. index1 &&
  1774. oldIndex < index1 &&
  1775. dragType == 'drag',
  1776. }">
  1777. <!-- <div @mousedown="
  1778. isdrag =
  1779. 'chapter-' + 0 + '-' + index1
  1780. " @mouseup="isdrag = ''" @touchstart="
  1781. isdrag =
  1782. 'chapter-' + 0 + '-' + index1
  1783. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1784. <div class="chapter_upload_o" style="
  1785. position: relative;
  1786. display: flex;
  1787. align-items: center;
  1788. ">
  1789. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1790. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1791. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1792. </div>
  1793. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1794. </div>
  1795. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1796. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1797. </div>
  1798. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1799. </div>
  1800. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1801. </div>
  1802. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1803. </div>
  1804. </div>
  1805. <div class="chapter_upload_n">
  1806. <input readonly="true" v-if="
  1807. item1.type == 2 ||
  1808. item1.type == 3 ||
  1809. item1.type == 12 ||
  1810. item1.type == 13 ||
  1811. item1.type == 7
  1812. " :placeholder="item1.name" @click="
  1813. updataVideoT(
  1814. $event,
  1815. index1
  1816. )
  1817. " style="
  1818. border: none;
  1819. outline: none;
  1820. width: 80%;
  1821. minwidth: 215px;
  1822. z-index: 99;
  1823. font-size: 14px;
  1824. white-space: nowrap;
  1825. overflow: hidden;
  1826. text-overflow: ellipsis;
  1827. " />
  1828. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1829. border: none;
  1830. outline: none;
  1831. width: 80%;
  1832. white-space: nowrap;
  1833. overflow: hidden;
  1834. text-overflow: ellipsis;
  1835. " readonly="true" @click="
  1836. selectAttText(index1)
  1837. " />
  1838. <input :placeholder="item1.title ? item1.title : '链接'
  1839. " v-if="item1.type == 8" style="
  1840. border: none;
  1841. outline: none;
  1842. width: 80%;
  1843. white-space: nowrap;
  1844. overflow: hidden;
  1845. text-overflow: ellipsis;
  1846. " readonly="true" @click="selectLine(index1)" />
  1847. <input :placeholder="item1.title ? item1.title : '链接'
  1848. " v-if="item1.type == 14" style="
  1849. border: none;
  1850. outline: none;
  1851. width: 80%;
  1852. white-space: nowrap;
  1853. overflow: hidden;
  1854. text-overflow: ellipsis;
  1855. " readonly="true" @click="
  1856. openUpdateSource(index1)
  1857. " />
  1858. </div>
  1859. <div class="chapter_upload_ic">
  1860. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1861. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1862. <div class="chapter_upload_up" @click="
  1863. upCd(
  1864. $event,
  1865. index1
  1866. )
  1867. "></div>
  1868. <div class="chapter_upload_down" @click="
  1869. downCd(
  1870. $event,
  1871. index1
  1872. )
  1873. "></div>
  1874. </div>
  1875. <div class="chapter_upload_ic_edit" v-if="
  1876. item1.type == 2 ||
  1877. item1.type == 3 ||
  1878. item1.type == 12 ||
  1879. item1.type == 13 ||
  1880. item1.type == 7
  1881. " @click.stop="
  1882. updataVideoT(
  1883. $event,
  1884. index1
  1885. )
  1886. ">
  1887. <div></div>
  1888. </div>
  1889. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1890. selectAttText(index1)
  1891. ">
  1892. <div></div>
  1893. </div>
  1894. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1895. @click="selectLine(index1)">
  1896. <div></div>
  1897. </div>
  1898. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1899. openUpdateSource(index1)
  1900. ">
  1901. <div></div>
  1902. </div> -->
  1903. <div class="chapter_upload_ic_r" @click.stop="
  1904. deleteInfoData(
  1905. $event,
  1906. index1
  1907. )
  1908. ">
  1909. <div></div>
  1910. </div>
  1911. </div>
  1912. </div>
  1913. </div>
  1914. </div>
  1915. </div>
  1916. <div v-if="
  1917. infoproVisible
  1918. " class="mask">
  1919. <div class="progressBox">
  1920. <!-- <div id="closePro" class="closeCss">
  1921. <img src="../../../../assets/icon/close.png" alt />
  1922. </div> -->
  1923. <div class="lbox">
  1924. <img src="../../../assets/loading.gif" />上传中,请稍后
  1925. </div>
  1926. <div style="margin-bottom: 10px">
  1927. <span>{{
  1928. infoisFinishSize
  1929. }}M</span>
  1930. /
  1931. <span>{{
  1932. infoisAllSize
  1933. }}M</span>
  1934. </div>
  1935. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1936. ? infoprogress
  1937. : 0
  1938. " style="width: 80%"></el-progress>
  1939. </div>
  1940. </div>
  1941. </div>
  1942. </div>
  1943. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1944. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1945. <div class="c_info_title">
  1946. 补充描述
  1947. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1948. </div>
  1949. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1950. <div style="width: calc(100%)">
  1951. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1952. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1953. </div>
  1954. </div>
  1955. </div>
  1956. </div>
  1957. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3' && isOutline">
  1958. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1959. <div class="c_info_title">
  1960. 课程大纲
  1961. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1962. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1963. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1964. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1965. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1966. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1967. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1968. </el-tooltip>
  1969. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1970. @click="openAiDialog2(2, 'aiOutline'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1971. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1972. @click="openAiDialog2(2, 'aiOutline2'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1973. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1974. </div>
  1975. <div class="task_outline">
  1976. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1977. <div class="outline_task">
  1978. <div class="title">任务{{ index + 1 }}</div>
  1979. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1980. v-model="item.task" />
  1981. <div class="outline_btn">
  1982. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1983. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)" @click="openAiDialog(2, 'aiOutlineDetail2', index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-${item.taskDetail2 ? '重新生成任务' : '生成任务'}按钮`)">{{ item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  1984. </el-tooltip>
  1985. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在上面加入一个任务按钮`)">在上面加入一个任务</button>
  1986. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在下面加入一个任务按钮`)">在下面加入一个任务</button>
  1987. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="deleteTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-删除按钮`)" v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  1988. </div>
  1989. </div>
  1990. <div class="outline_detail" :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1991. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]" @click="cancelAjax('outlineTask', index)">停止</div>
  1992. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1993. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2" @change="textAreaChange('taskDetail2', index)"></textarea>
  1994. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1995. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1996. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail1-'+index]}">
  1997. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1998. <div class="op_box_right">
  1999. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2000. <div class="r_pub_button_op"
  2001. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `右键课程大纲-任务${index + 1}-智能优化按钮`)"
  2002. @click="openAiDialog(2, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-智能优化按钮`)">智能优化</div>
  2003. </el-tooltip>
  2004. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-确定/编辑按钮`)">{{
  2005. item.isTask2 ? '确定' : '编辑'}}</div>
  2006. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail1-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail1-'+index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-引用按钮`)"></el-switch>
  2007. </div>
  2008. </div>
  2009. </div>
  2010. </div>
  2011. </div>
  2012. </div>
  2013. </div>
  2014. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 0 || istemplate == 1)">
  2015. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2016. <div class="c_info_title">
  2017. 概念群
  2018. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2019. @click="openAiDialog2(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-重新生成概念群按钮`)">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  2020. </div>
  2021. <div class="task_outline">
  2022. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  2023. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  2024. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  2025. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  2026. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  2027. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote1']}">
  2028. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2029. <div class="op_box_right">
  2030. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2031. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1'), addCourseBehavior('courseBehavior', `右键概念群-智能优化按钮`)"
  2032. @click="openAiDialog(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-智能优化按钮`)">智能优化</div>
  2033. </el-tooltip>
  2034. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s'), addCourseBehavior('courseBehavior', `点击概念群-确定/编辑按钮`)">{{
  2035. cpote.cpote1s ? '确定' : '编辑'}}</div>
  2036. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote1']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-引用按钮`)"></el-switch>
  2037. </div>
  2038. </div>
  2039. </div>
  2040. </div>
  2041. </div>
  2042. </div>
  2043. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 1 || istemplate == 1)">
  2044. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2045. <div class="c_info_title">
  2046. 问题链
  2047. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2048. @click="openAiDialog2(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-重新生成问题链按钮`)">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  2049. </div>
  2050. <div class="task_outline">
  2051. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  2052. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  2053. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  2054. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  2055. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  2056. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote2']}">
  2057. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2058. <div class="op_box_right">
  2059. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2060. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2'), addCourseBehavior('courseBehavior', `右键问题链-智能优化按钮`)"
  2061. @click="openAiDialog(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-智能优化按钮`)">智能优化</div>
  2062. </el-tooltip>
  2063. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s'), addCourseBehavior('courseBehavior', `点击问题链-确定/编辑按钮`)">{{
  2064. cpote.cpote2s ? '确定' : '编辑'}}</div>
  2065. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-引用按钮`)"></el-switch>
  2066. </div>
  2067. </div>
  2068. </div>
  2069. </div>
  2070. </div>
  2071. </div>
  2072. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 2 || istemplate == 1)">
  2073. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2074. <div class="c_info_title">
  2075. 目标层
  2076. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2077. @click="openAiDialog2(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-重新生成目标层按钮`)">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  2078. </div>
  2079. <div class="task_outline">
  2080. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  2081. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  2082. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  2083. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  2084. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  2085. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote3']}">
  2086. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2087. <div class="op_box_right">
  2088. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2089. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3'), addCourseBehavior('courseBehavior', `右键目标层-智能优化按钮`)"
  2090. @click="openAiDialog(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-智能优化按钮`)">智能优化</div>
  2091. </el-tooltip>
  2092. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s'), addCourseBehavior('courseBehavior', `点击目标层-确定/编辑按钮`)">{{
  2093. cpote.cpote3s ? '确定' : '编辑'}}</div>
  2094. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote3']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-引用按钮`)"></el-switch>
  2095. </div>
  2096. </div>
  2097. </div>
  2098. </div>
  2099. </div>
  2100. </div>
  2101. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 3 || istemplate == 1)">
  2102. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2103. <div class="c_info_title">
  2104. 任务簇
  2105. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2106. @click="openAiDialog2(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-重新生成任务簇按钮`)">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  2107. </div>
  2108. <div class="task_outline">
  2109. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  2110. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  2111. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  2112. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  2113. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  2114. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote4']}">
  2115. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2116. <div class="op_box_right">
  2117. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2118. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4'), addCourseBehavior('courseBehavior', `右键任务簇-智能优化按钮`)"
  2119. @click="openAiDialog(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-智能优化按钮`)">智能优化</div>
  2120. </el-tooltip>
  2121. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s'), addCourseBehavior('courseBehavior', `点击任务簇-确定/编辑按钮`)">{{
  2122. cpote.cpote4s ? '确定' : '编辑'}}</div>
  2123. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote4']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-引用按钮`)"></el-switch>
  2124. </div>
  2125. </div>
  2126. </div>
  2127. </div>
  2128. </div>
  2129. </div>
  2130. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  2131. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2132. <div class="c_info_title">
  2133. 教案
  2134. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  2135. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2136. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  2137. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  2138. </el-tooltip>
  2139. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2140. @click="openAiDialog2(2, 'aiTeacher2'), addCourseBehavior('courseBehavior', `点击教案-重新生成教案按钮`)" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  2141. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="panTeacher() == 0 && istemplate == 1 && (templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3')">
  2142. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2143. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  2144. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  2145. </el-tooltip>
  2146. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2147. </div>
  2148. <div class="task_outline">
  2149. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  2150. <div class="outline_task">
  2151. <div class="title">任务{{ index + 1 }}</div>
  2152. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2153. v-model="item.task" />
  2154. </div>
  2155. <div class="outline_detail" :style="{ minHeight: taskDetailLoading5.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2156. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading5.indexOf('task-' + index) !== -1" @click="cancelAjax('teacherDetail2', index)">停止</div>
  2157. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  2158. v-model="item.taskDetail3" v-if="item.isTask3" @change="textAreaChange('taskDetail3', index)"></textarea>
  2159. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  2160. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  2161. <div class="op_box" :class="{op_box_isquote: isQuote['teacherDetail2-'+index]}">
  2162. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2163. <div class="op_box_right">
  2164. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2165. <div class="r_pub_button_op"
  2166. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `右键教案-任务${index + 1}-智能优化按钮`)"
  2167. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-智能优化按钮`)">智能优化</div>
  2168. </el-tooltip>
  2169. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  2170. item.isTask3 ? '确定' : '编辑'}}</div>
  2171. <el-switch style="margin-left: 10px" v-model="isQuote['teacherDetail2-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('teacherDetail2-'+index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-引用按钮`)"></el-switch>
  2172. </div>
  2173. </div>
  2174. </div>
  2175. </div>
  2176. </div>
  2177. </div>
  2178. </div>
  2179. <div class="info_btnBox3" v-if="istemplate != 1">
  2180. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2181. goTo(
  2182. '/course?userid=' +
  2183. userid +
  2184. '&oid=' +
  2185. oid +
  2186. '&org=' +
  2187. org +
  2188. '&role=' +
  2189. role
  2190. )
  2191. ">
  2192. 返回课程
  2193. </button>
  2194. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2195. {{ steps == 4 ? "返回课程" : "上一步" }}
  2196. </button>
  2197. <button class="c_pub_button_confirm" v-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" @click="clickGenTT2">
  2198. {{isuseT === true ? "重新生成概况和目标" : "生成概况和目标"}}
  2199. </button>
  2200. <button class="c_pub_button_confirm" v-else-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  2201. {{isuseT === true ? "重新生成概况" : "生成概况"}}
  2202. </button>
  2203. <button class="c_pub_button_confirm" v-if="isOutline2" @click="exportTeachPlan">
  2204. {{ "导出教案" }}
  2205. </button>
  2206. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  2207. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  2208. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  2209. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  2210. pub_btn_next_img: steps != 3,
  2211. pub_btn_finish_img: steps == 3,
  2212. }">
  2213. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  2214. </button>
  2215. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  2216. @contextmenu.prevent="nextSteps(1)" :class="{
  2217. pub_btn_next_img: steps != 3,
  2218. pub_btn_finish_img: steps == 3,
  2219. }">
  2220. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  2221. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  2222. : "下一步" }}
  2223. </button>
  2224. </el-tooltip>
  2225. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  2226. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  2227. pub_btn_next_img: steps != 3,
  2228. pub_btn_finish_img: steps == 3,
  2229. }">下一步2</button>
  2230. </el-tooltip> -->
  2231. </div>
  2232. </div>
  2233. <div class="rightBox" v-if="steps == 2" :style="{
  2234. height:
  2235. !isStepDisplay && !isBtnDisplay
  2236. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  2237. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2238. }">
  2239. <div class="basic_box" style="
  2240. padding: 20px 30px 0px !important;
  2241. box-sizing: border-box;
  2242. height: calc(100% - 80px);
  2243. overflow: auto;
  2244. background: #fff;
  2245. ">
  2246. <!-- <div
  2247. style="
  2248. color: #b8b8b8;
  2249. background: #fff;
  2250. width: 26%;
  2251. height: 40px;
  2252. border-radius: 15px;
  2253. padding-left: 20px;
  2254. line-height: 40px;
  2255. font-size: 17px;
  2256. box-shadow: 0px 1px 2px 2px #e0e0e0;
  2257. "
  2258. >-->
  2259. <div class="right_title" style="border: none; margin: 0; padding: 0">
  2260. 请选择合适的课程模板
  2261. </div>
  2262. <div class="wordbox">
  2263. <div class="wordTeacher" @click="checkTemplate2()">
  2264. <div class="wordPic">
  2265. <img src="../../../assets/icon/new/template_none.png" alt />
  2266. </div>
  2267. <div style="
  2268. margin-top: 10px;
  2269. line-height: 19px;
  2270. overflow: hidden;
  2271. text-overflow: ellipsis;
  2272. white-space: nowrap;
  2273. padding: 0 20px;
  2274. ">
  2275. 空白模板
  2276. </div>
  2277. </div>
  2278. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  2279. <div class="wordPic">
  2280. <img src="../../../assets/icon/new/template.png" alt />
  2281. </div>
  2282. <div style="
  2283. margin-top: 10px;
  2284. line-height: 19px;
  2285. overflow: hidden;
  2286. text-overflow: ellipsis;
  2287. white-space: nowrap;
  2288. padding: 0 20px;
  2289. ">
  2290. {{ aa.title }}
  2291. </div>
  2292. </div>
  2293. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  2294. <div class="wordPic">
  2295. <img src="../../../assets/icon/new/template.png" alt />
  2296. </div>
  2297. <div style="
  2298. margin-top: 10px;
  2299. line-height: 19px;
  2300. overflow: hidden;
  2301. text-overflow: ellipsis;
  2302. white-space: nowrap;
  2303. padding: 0 20px;
  2304. ">
  2305. 简易模板
  2306. </div>
  2307. </div>
  2308. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  2309. <div class="wordPic">
  2310. <img src="../../../assets/icon/new/template.png" alt />
  2311. </div>
  2312. <div style="
  2313. margin-top: 10px;
  2314. line-height: 19px;
  2315. overflow: hidden;
  2316. text-overflow: ellipsis;
  2317. white-space: nowrap;
  2318. padding: 0 20px;
  2319. ">
  2320. 智能粘贴模式
  2321. </div>
  2322. </div>
  2323. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  2324. <div class="wordPic">
  2325. <img src="../../../assets/icon/wordMub.png" alt />
  2326. </div>
  2327. <div style="
  2328. margin-top: 10px;
  2329. line-height: 19px;
  2330. overflow: hidden;
  2331. text-overflow: ellipsis;
  2332. white-space: nowrap;
  2333. padding: 0 20px;
  2334. ">
  2335. 未来小学课程设计
  2336. </div>
  2337. </div> -->
  2338. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  2339. <div class="wordPic">
  2340. <img src="../../../assets/icon/wordMub.png" alt />
  2341. </div>
  2342. <div style="
  2343. margin-top: 10px;
  2344. line-height: 19px;
  2345. overflow: hidden;
  2346. text-overflow: ellipsis;
  2347. white-space: nowrap;
  2348. padding: 0 20px;
  2349. ">
  2350. 我的课程
  2351. </div>
  2352. </div> -->
  2353. </div>
  2354. </div>
  2355. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  2356. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2357. goTo(
  2358. '/course?userid=' +
  2359. userid +
  2360. '&oid=' +
  2361. oid +
  2362. '&org=' +
  2363. org +
  2364. '&role=' +
  2365. role
  2366. )
  2367. ">
  2368. 返回课程
  2369. </button>
  2370. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2371. {{ steps == 4 ? "返回课程" : "上一步" }}
  2372. </button>
  2373. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  2374. pub_btn_next_img: steps != 3,
  2375. pub_btn_finish_img: steps == 3,
  2376. }">
  2377. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  2378. </button>
  2379. </div>
  2380. </div>
  2381. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  2382. height:
  2383. !isStepDisplay && !isBtnDisplay
  2384. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  2385. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2386. }">
  2387. <div class="rb_c_box">
  2388. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1" :style="{width: stepShow ? '270px' : '0',minWidth: stepShow ? '270px' : '0',height: stepShow ? '100%' : '0',marginRight: stepShow ? '10px' : '0'}">
  2389. <div class="close_btn" @click="stepShow = !stepShow" :class="!stepShow ? 'close_btn_voice' : ''" style="left: 0;right: unset;top: 5px;transform: rotate(180deg);">
  2390. <img src="../../../assets/icon/course/arrow.svg" >
  2391. </div>
  2392. <div class="rb_c_nav">
  2393. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1" v-show="stepShow" style="margin-left: auto">目录</span>
  2394. <!-- <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span> -->
  2395. <!-- <span class="button-toggle" @click="stepShow = !stepShow">{{ stepShow ? '收缩' : '展开' }}</span> -->
  2396. </div>
  2397. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  2398. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  2399. position: istemplate == 1 ? 'sticky' : 'unset',
  2400. top: istemplate == 1 ? '0' : 'unset'
  2401. }">
  2402. <!-- <div class="navTop">辅助导航</div> -->
  2403. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  2404. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  2405. <div class="nt_taskBox" style="width: 100%;">
  2406. <div class="nt_taskTitle"
  2407. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  2408. unitIndex + 1 }}</div>
  2409. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  2410. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  2411. <span>{{ unitJson[unitIndex].dyName }}</span>
  2412. </el-tooltip>
  2413. </div>
  2414. </div>
  2415. </div> -->
  2416. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  2417. .taskJson" :key="tIndex" :class="{
  2418. dragOverTop:
  2419. newIndex === tIndex &&
  2420. typeIndex == 'task-' + tIndex &&
  2421. oldIndex > tIndex &&
  2422. dragType == 'task',
  2423. dragOverBottom:
  2424. newIndex === tIndex &&
  2425. typeIndex == 'task-' + tIndex &&
  2426. oldIndex < tIndex &&
  2427. dragType == 'task',
  2428. }">
  2429. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  2430. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  2431. class="navTask" :class="{
  2432. isNavTask:
  2433. isClickColor > 0 && isClickColor == tIndex + 1,
  2434. isNavOpen: t.toolOpen,
  2435. }">
  2436. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  2437. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  2438. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  2439. class="chapter_upload_drag"></div>
  2440. <div class="nt_taskBox">
  2441. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  2442. <div class="nt_taskName">
  2443. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2444. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  2445. </el-tooltip>
  2446. </div>
  2447. </div>
  2448. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  2449. 1
  2450. ">
  2451. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  2452. @click.stop="taskMove(1, tIndex)"></div>
  2453. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  2454. @click.stop="taskMove(2, tIndex)"></div>
  2455. </div> -->
  2456. </div>
  2457. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2458. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2459. @click="jumpGj(tIndex, toolIndex2)">
  2460. <div class="gjCss" :class="{
  2461. isGjCss:
  2462. toolIndexType == `gj${tIndex}${toolIndex2}`,
  2463. }">
  2464. <div>工具{{ toolIndex2 + 1 }}:</div>
  2465. <div>
  2466. {{
  2467. toolsData[tool.tool[0]] &&
  2468. toolsData[tool.tool[0]].name
  2469. }}
  2470. </div>
  2471. </div>
  2472. </div>
  2473. </div>
  2474. </div>
  2475. </div>
  2476. <div class="navBottom" v-if="courseState == 1">
  2477. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  2478. dragOverTop:
  2479. newIndex === stageIndex &&
  2480. typeIndex == 'Unit-' + stageIndex &&
  2481. oldIndex > stageIndex &&
  2482. dragType == 'Unit',
  2483. dragOverBottom:
  2484. newIndex === stageIndex &&
  2485. typeIndex == 'Unit-' + stageIndex &&
  2486. oldIndex < stageIndex &&
  2487. dragType == 'Unit',
  2488. }">
  2489. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  2490. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  2491. @click="unitSet2(stageIndex)" class="navStage" :class="{
  2492. isNavStage: stageIndex == unitIndex,
  2493. isNavStageOpen: stage.toolOpen,
  2494. }">
  2495. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  2496. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  2497. class="chapter_upload_drag"></div>
  2498. <div class="nt_taskBox">
  2499. <div class="nt_taskTitle">
  2500. 第{{ stageIndex + 1 }}阶段:
  2501. </div>
  2502. <div class="nt_taskName">
  2503. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  2504. " placement="top">
  2505. <span>{{
  2506. stage.dyName ? stage.dyName : "未命名阶段"
  2507. }}</span>
  2508. </el-tooltip>
  2509. </div>
  2510. </div>
  2511. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  2512. </div>
  2513. <div v-for="(t, tIndex) in unitJson[stageIndex]
  2514. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  2515. dragOverTop:
  2516. newIndex === tIndex &&
  2517. typeIndex == 'task-' + tIndex &&
  2518. ((oldIndex > tIndex &&
  2519. stageIndex == checkUnitIndex) ||
  2520. (oldIndex == tIndex &&
  2521. stageIndex == checkUnitIndex &&
  2522. checkUnitIndex != oldUnitIndex)) &&
  2523. dragType == 'task',
  2524. dragOverBottom:
  2525. newIndex === tIndex &&
  2526. typeIndex == 'task-' + tIndex &&
  2527. oldIndex < tIndex &&
  2528. stageIndex == checkUnitIndex &&
  2529. dragType == 'task',
  2530. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  2531. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  2532. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  2533. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  2534. isNavTask:
  2535. isClickColor > 0 &&
  2536. isClickColor == tIndex + 1 &&
  2537. stageIndex == unitIndex,
  2538. isNavOpen: t.toolOpen,
  2539. }">
  2540. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  2541. <div @mousedown="
  2542. isdrag = 'task-' + stageIndex + '-' + tIndex
  2543. " @mouseup="isdrag = ''" @touchstart="
  2544. isdrag = 'task-' + stageIndex + '-' + tIndex
  2545. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  2546. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  2547. <div class="nt_taskTitle">
  2548. 任务{{ tIndex + 1 }}:
  2549. </div>
  2550. <div class="nt_taskName">
  2551. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2552. <span>{{
  2553. t.task ? t.task : "未命名任务"
  2554. }}</span>
  2555. </el-tooltip>
  2556. </div>
  2557. </div>
  2558. </div>
  2559. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2560. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2561. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  2562. <div class="gjCss" :class="{
  2563. isGjCss:
  2564. toolIndexType ==
  2565. `gj${tIndex}${toolIndex2}${stageIndex}`,
  2566. }">
  2567. <div>工具{{ toolIndex2 + 1 }}:</div>
  2568. <div>
  2569. {{
  2570. toolsData[tool.tool[0]] &&
  2571. toolsData[tool.tool[0]].name
  2572. }}
  2573. </div>
  2574. </div>
  2575. </div>
  2576. </div>
  2577. </div>
  2578. </div>
  2579. </div>
  2580. </div>
  2581. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  2582. <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
  2583. </div>
  2584. </div>
  2585. <div class="rb_c_box_right">
  2586. <div class="rb_c_box_btn" style="justify-content: flex-end">
  2587. <span class="title">{{ courseName }}</span>
  2588. <!-- <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button> -->
  2589. <button class="c_pub_button_return"
  2590. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="margin-left: auto;border: none;">
  2591. {{ steps == 4 ? "返回课程" : "上一步" }}
  2592. </button>
  2593. <button class="c_pub_button_confirm3 buttonBoxB">
  2594. <span>一键生成</span>
  2595. <div class="buttonBox">
  2596. <div @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</div>
  2597. <div @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)" v-if="panTool() == 0">一键生成所有工具</div>
  2598. <div @click="openAiDialog2(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)" v-if="panTool() > 0">重新生成所有工具</div>
  2599. <div @click="allEvaCan(), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有评价按钮`)" v-if="panTool() > 0">{{panTaskElist() == 0 && panEvaCont() == 0 ? '一键生成所有评价' : '重新生成所有评价'}}</div>
  2600. <div @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案</div>
  2601. </div>
  2602. </button>
  2603. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</button> -->
  2604. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)" v-if="panTool() == 0">一键生成所有工具</button> -->
  2605. <!-- <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> -->
  2606. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案</button> -->
  2607. <button class="c_pub_button_confirm" style="margin: 0 0 0 10px;" v-if="steps < 4 && istemplate != 1" @click="nextSteps">
  2608. {{ steps == 3 ? "确认上传" : "下一步" }}
  2609. </button>
  2610. </div>
  2611. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  2612. <div v-if="false" style="
  2613. display: flex;
  2614. flex-direction: row;
  2615. align-items: center;
  2616. position: sticky;
  2617. top: 0;
  2618. z-index: 99;
  2619. width: 100%;
  2620. padding: 0 20px 0 20px;
  2621. box-sizing: border-box;
  2622. background: #fff;
  2623. border-radius: 8px;
  2624. ">
  2625. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2626. <div class="cru_selectBox" :style="{
  2627. maxWidth: isPasteTask
  2628. ? 'calc(100% - 335px)'
  2629. : 'calc(100% - 190px)',
  2630. }" v-if="courseState == 1">
  2631. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2632. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2633. <!-- item.dyName ? item.dyName : -->
  2634. <span v-if="
  2635. unitJson[unitJson.length - 1].easy == 4 ||
  2636. unitJson[unitJson.length - 1].easy == 6
  2637. ">{{
  2638. item.dyName
  2639. ? item.dyName
  2640. : "第" + (index + 1) + "阶段"
  2641. }}</span>
  2642. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2643. </div>
  2644. <div class="cru_line" :style="{
  2645. left: offsetLetfPx + 'px',
  2646. }"></div>
  2647. </div>
  2648. <div class="addStageImg" @click="addunit()" v-if="
  2649. !(unitJson[unitJson.length - 1].easy == 4) &&
  2650. !(unitJson[unitJson.length - 1].easy == 6) &&
  2651. courseState == 1
  2652. ">
  2653. <img src="../../../assets/icon/new/addStage.png" alt />
  2654. </div>
  2655. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2656. v-if="courseState == 2" style="margin: 15px 0">
  2657. 新建阶段
  2658. </button>
  2659. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2660. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2661. 阶段顺序
  2662. </button>
  2663. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2664. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2665. 智能粘贴
  2666. </button>
  2667. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2668. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2669. }" style="padding: 0 12px">
  2670. 选择课程模板
  2671. </button>
  2672. </div>
  2673. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2674. :key="index">
  2675. <div v-loading="anLoading[0]" v-if="courseState == 4" style="position: relative;
  2676. background: #fff;
  2677. box-sizing: border-box;
  2678. padding: 1px 20px 10px;
  2679. width: 100%;
  2680. border-radius: 10px;">
  2681. <div style="
  2682. display: flex;
  2683. flex-direction: row;
  2684. justify-content: space-between;
  2685. align-items: center;
  2686. " :style="{
  2687. margin: !item.taskJson[0].isFoldchapter
  2688. ? '20px 0 10px'
  2689. : '20px 0 0',
  2690. }">
  2691. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2692. 学习内容
  2693. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2694. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2695. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2696. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2697. </el-tooltip>
  2698. </div>
  2699. </div>
  2700. <div >
  2701. <div class="add_chapters_box add_c_none" v-if="
  2702. item.taskJson[0].chapterData &&
  2703. item.taskJson[0].chapterData.length == 0
  2704. ">
  2705. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  2706. <span>请添加学习内容</span>
  2707. </div>
  2708. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2709. <div @dragstart="
  2710. dragStart(item1, index1, 0)
  2711. " @dragover.prevent="
  2712. dragOver(index1, 0)
  2713. " @dragend="dragEnd()" :draggable="isdrag ==
  2714. 'chapter-' + 0 + '-' + index1
  2715. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2716. :key="item1.id" @click="
  2717. getChapterData(
  2718. $event,
  2719. unitIndex,
  2720. index,
  2721. index1,
  2722. item1.type
  2723. )
  2724. " :class="{
  2725. dragOverTop2:
  2726. newIndex === index1 &&
  2727. typeIndex ==
  2728. 'chapter-' +
  2729. 0 +
  2730. '-' +
  2731. index1 &&
  2732. oldIndex > index1 &&
  2733. dragType == 'drag',
  2734. dragOverBottom2:
  2735. newIndex === index1 &&
  2736. typeIndex ==
  2737. 'chapter-' +
  2738. 0 +
  2739. '-' +
  2740. index1 &&
  2741. oldIndex < index1 &&
  2742. dragType == 'drag',
  2743. }">
  2744. <div @mousedown="
  2745. isdrag =
  2746. 'chapter-' + 0 + '-' + index1
  2747. " @mouseup="isdrag = ''" @touchstart="
  2748. isdrag =
  2749. 'chapter-' + 0 + '-' + index1
  2750. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2751. <div class="chapter_upload_o" style="
  2752. position: relative;
  2753. display: flex;
  2754. align-items: center;
  2755. ">
  2756. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2757. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2758. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2759. </div>
  2760. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2761. </div>
  2762. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2763. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2764. </div>
  2765. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2766. </div>
  2767. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2768. </div>
  2769. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2770. </div>
  2771. </div>
  2772. <div class="chapter_upload_n">
  2773. <input readonly="true" v-if="
  2774. item1.type == 2 ||
  2775. item1.type == 3 ||
  2776. item1.type == 12 ||
  2777. item1.type == 13 ||
  2778. item1.type == 7
  2779. " :placeholder="item1.name" @click="
  2780. updataVideoT(
  2781. $event,
  2782. unitIndex,
  2783. 0,
  2784. index1
  2785. )
  2786. " style="
  2787. border: none;
  2788. outline: none;
  2789. width: 80%;
  2790. minwidth: 215px;
  2791. z-index: 99;
  2792. font-size: 14px;
  2793. white-space: nowrap;
  2794. overflow: hidden;
  2795. text-overflow: ellipsis;
  2796. " />
  2797. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2798. border: none;
  2799. outline: none;
  2800. width: 80%;
  2801. white-space: nowrap;
  2802. overflow: hidden;
  2803. text-overflow: ellipsis;
  2804. " readonly="true" @click="
  2805. selectAttText(0, index1)
  2806. " />
  2807. <input :placeholder="item1.title ? item1.title : '链接'
  2808. " v-if="item1.type == 8" style="
  2809. border: none;
  2810. outline: none;
  2811. width: 80%;
  2812. white-space: nowrap;
  2813. overflow: hidden;
  2814. text-overflow: ellipsis;
  2815. " readonly="true" @click="selectLine(0, index1)" />
  2816. <input :placeholder="item1.title ? item1.title : '链接'
  2817. " v-if="item1.type == 14" style="
  2818. border: none;
  2819. outline: none;
  2820. width: 80%;
  2821. white-space: nowrap;
  2822. overflow: hidden;
  2823. text-overflow: ellipsis;
  2824. " readonly="true" @click="
  2825. openUpdateSource(0, index1)
  2826. " />
  2827. </div>
  2828. <div class="chapter_upload_ic">
  2829. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2830. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2831. checkChpater( $event, unitIndex, 0, index1 )
  2832. ">
  2833. <div></div>
  2834. </div>
  2835. <div class="chapter_upload_ud" style="z-index: 99">
  2836. <div class="chapter_upload_up" @click="
  2837. upCd(
  2838. $event,
  2839. unitIndex,
  2840. index,
  2841. 0,
  2842. index1
  2843. )
  2844. "></div>
  2845. <div class="chapter_upload_down" @click="
  2846. downCd(
  2847. $event,
  2848. unitIndex,
  2849. index,
  2850. 0,
  2851. index1
  2852. )
  2853. "></div>
  2854. </div>
  2855. <div class="chapter_upload_ic_edit" v-if="
  2856. item1.type == 2 ||
  2857. item1.type == 3 ||
  2858. item1.type == 12 ||
  2859. item1.type == 13 ||
  2860. item1.type == 7
  2861. " @click.stop="
  2862. updataVideoT(
  2863. $event,
  2864. unitIndex,
  2865. 0,
  2866. index1
  2867. )
  2868. ">
  2869. <div></div>
  2870. </div>
  2871. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2872. selectAttText(0, index1)
  2873. ">
  2874. <div></div>
  2875. </div>
  2876. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2877. @click="selectLine(0, index1)">
  2878. <div></div>
  2879. </div>
  2880. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2881. openUpdateSource(0, index1)
  2882. ">
  2883. <div></div>
  2884. </div>
  2885. <div class="chapter_upload_ic_r" @click.stop="
  2886. deleteChapterData(
  2887. $event,
  2888. unitIndex,
  2889. index,
  2890. index1,
  2891. 0
  2892. )
  2893. ">
  2894. <div></div>
  2895. </div>
  2896. </div>
  2897. </div>
  2898. </div>
  2899. </div>
  2900. </div>
  2901. <div class="add_info_box" style="margin: 10px 0 0">
  2902. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2903. 文件
  2904. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple" @change="
  2905. beforeUpload2(
  2906. $event,
  2907. unitIndex,
  2908. 13,
  2909. 0
  2910. )
  2911. " />
  2912. </button>
  2913. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2914. 图文
  2915. </button>
  2916. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2917. 链接
  2918. </button>
  2919. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2920. 代码
  2921. </button>
  2922. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2923. 资源
  2924. </button>
  2925. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2926. AI生成PPT
  2927. </button>
  2928. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2929. AI生成教案
  2930. </button>
  2931. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2932. 智能检索视频
  2933. </button>
  2934. </div>
  2935. <div v-if="
  2936. unitJson[unitIndex].chapterInfo[0].taskJson[
  2937. 0
  2938. ].proVisible
  2939. " class="mask">
  2940. <div class="progressBox">
  2941. <!-- <div id="closePro" class="closeCss">
  2942. <img src="../../../../assets/icon/close.png" alt />
  2943. </div> -->
  2944. <div class="lbox">
  2945. <img src="../../../assets/loading.gif" />上传中,请稍后
  2946. </div>
  2947. <div style="margin-bottom: 10px">
  2948. <span>{{
  2949. unitJson[unitIndex].chapterInfo[0].taskJson[
  2950. 0
  2951. ].isFinishSize
  2952. }}</span>
  2953. /
  2954. <span>{{
  2955. unitJson[unitIndex].chapterInfo[0].taskJson[
  2956. 0
  2957. ].isAllSize
  2958. }}</span>
  2959. </div>
  2960. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2961. 0
  2962. ].progress
  2963. ? unitJson[unitIndex].chapterInfo[0]
  2964. .taskJson[0].progress
  2965. : 0
  2966. " style="width: 80%"></el-progress> -->
  2967. </div>
  2968. </div>
  2969. </div>
  2970. <div class="chapter_box" v-if="courseState == 1">
  2971. <div class="chapter_contentbox">
  2972. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2973. <div class="cc_input">
  2974. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2975. v-model="unitJson[unitIndex].dyName" />
  2976. </div>
  2977. <div class="remove" v-if="
  2978. (unitJson.length > 1 || courseState != 2) &&
  2979. !(unitJson[unitJson.length - 1].easy == 4) &&
  2980. !(unitJson[unitJson.length - 1].easy == 6)
  2981. " @click="deleteUnit(unitIndex)"></div>
  2982. </div>
  2983. </div>
  2984. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2985. margin: 50px 0px 10px;
  2986. font-size: 1.5em;
  2987. font-weight: 700;
  2988. color: #0f7eff;
  2989. ">
  2990. 添加任务
  2991. </div> -->
  2992. <div class="taskBorder" :style="{
  2993. minHeight: unitJson[unitIndex].easy && 'unset',
  2994. borderRadius: itemTaskIndex == 0 ? '0px 0px 10px 10px' : '10px',
  2995. marginTop: itemTaskIndex == 0 ? '0' : '10px',
  2996. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2997. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2998. <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
  2999. <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" @click="cancelAjax('aiTaskGL1', itemTaskIndex)">停止</div>
  3000. <div class="taskTitle">
  3001. <div style="display: flex;width: 100%;justify-content: space-between;">
  3002. <span>任务{{ itemTaskIndex + 1 }}</span>
  3003. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3004. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  3005. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  3006. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  3007. </el-tooltip> -->
  3008. <div style="display: flex">
  3009. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3010. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  3011. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)"
  3012. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)">重新生成任务</button>
  3013. </el-tooltip>
  3014. </div>
  3015. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3016. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  3017. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  3018. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  3019. </el-tooltip> -->
  3020. </div>
  3021. </div>
  3022. <!-- padding: 20px; -->
  3023. <div v-if="unitJson[unitIndex].easy != 1">
  3024. <div :style="{
  3025. marginBottom:
  3026. unitJson[unitIndex].easy == 3 ||
  3027. (unitJson[unitIndex].easy == 5 &&
  3028. itemTask.taskType == 1)
  3029. ? '75px'
  3030. : '0',
  3031. }">
  3032. <div style="
  3033. display: flex;
  3034. margin: 0px 0 20px;
  3035. flex-direction: row;
  3036. justify-content: flex-start;
  3037. align-items: center;
  3038. ">
  3039. <div class="lineTitle">任务概述</div>
  3040. </div>
  3041. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  3042. flex-direction: row;
  3043. justify-content: flex-start;
  3044. align-items: center;
  3045. margin: 0;
  3046. ">
  3047. <!-- <div class="cc_title">
  3048. 任务{{ itemTaskIndex + 1 }}
  3049. </div> -->
  3050. <div class="cc_input">
  3051. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  3052. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3053. itemTaskIndex
  3054. ].task
  3055. " />
  3056. </div>
  3057. <div class="remove" v-if="
  3058. item.taskJson.length > 1 &&
  3059. (!unitJson[unitIndex].easy ||
  3060. unitJson[unitIndex].easy == 6)
  3061. " @click="deleteTask(itemTaskIndex)"></div>
  3062. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  3063. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  3064. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  3065. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  3066. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  3067. </div> -->
  3068. </div>
  3069. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  3070. display: flex;
  3071. margin: 20px 0;
  3072. flex-direction: row;
  3073. justify-content: flex-start;
  3074. align-items: center;
  3075. ">
  3076. <div class="lineTitle">任务描述</div>
  3077. </div> && !itemTask.isFold2-->
  3078. <div v-if="
  3079. easyArray.indexOf(unitJson[unitIndex].easy) ==
  3080. -1
  3081. " style="margin-top: 20px" class="op_task_box"
  3082. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  3083. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3084. itemTaskIndex
  3085. ].taskDetail
  3086. " @change="change"></editor-bar> -->
  3087. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  3088. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3089. itemTaskIndex
  3090. ].taskDetail
  3091. "></textarea>
  3092. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  3093. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3094. itemTaskIndex
  3095. ].taskDetail
  3096. "></textarea> -->
  3097. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail2-'+itemTaskIndex]}">
  3098. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  3099. <div class="op_box_right">
  3100. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3101. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  3102. itemTaskIndex
  3103. ], itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  3104. itemTaskIndex
  3105. ], itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)">智能优化</div>
  3106. </el-tooltip>
  3107. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail2-'+itemTaskIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail2-'+itemTaskIndex)"></el-switch>
  3108. </div>
  3109. </div>
  3110. </div>
  3111. </div>
  3112. </div>
  3113. <div
  3114. v-loading="anLoading[itemTaskIndex]"
  3115. style="position: relative"
  3116. v-if="courseState == 5"
  3117. >
  3118. <div
  3119. style="
  3120. display: flex;
  3121. flex-direction: row;
  3122. justify-content: space-between;
  3123. align-items: center;
  3124. "
  3125. :style="{
  3126. margin: !itemTask.isFoldchapter
  3127. ? '20px 0 10px'
  3128. : '20px 0 0',
  3129. }"
  3130. >
  3131. <div
  3132. style="margin-bottom: 10px"
  3133. class="lineTitle clineTitle"
  3134. >
  3135. 学习内容
  3136. </div>
  3137. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  3138. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  3139. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  3140. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  3141. <!-- <div class="line"></div> -->
  3142. </div>
  3143. <!-- v-if="!itemTask.isFoldchapter" -->
  3144. <div>
  3145. <div
  3146. class="add_chapters_box add_c_none"
  3147. v-if="
  3148. itemTask.chapterData &&
  3149. itemTask.chapterData.length == 0
  3150. "
  3151. >
  3152. <!-- <img
  3153. src="../../../assets/icon/new/c_none.png"
  3154. alt
  3155. /> -->
  3156. <span>请添加学习内容</span>
  3157. </div>
  3158. <div
  3159. v-else
  3160. class="add_chapters_box"
  3161. style="display: flex; flex-direction: column"
  3162. >
  3163. <div
  3164. @dragstart="
  3165. dragStart(item1, index1, itemTaskIndex)
  3166. "
  3167. @dragover.prevent="
  3168. dragOver(index1, itemTaskIndex)
  3169. "
  3170. @dragend="dragEnd()"
  3171. :draggable="
  3172. isdrag ==
  3173. 'chapter-' + itemTaskIndex + '-' + index1
  3174. "
  3175. class="chapter_upload"
  3176. v-for="(item1, index1) in itemTask.chapterData"
  3177. :key="item1.id"
  3178. @click="
  3179. getChapterData(
  3180. $event,
  3181. unitIndex,
  3182. index,
  3183. index1,
  3184. item1.type
  3185. )
  3186. "
  3187. :class="{
  3188. dragOverTop2:
  3189. newIndex === index1 &&
  3190. typeIndex ==
  3191. 'chapter-' +
  3192. itemTaskIndex +
  3193. '-' +
  3194. index1 &&
  3195. oldIndex > index1 &&
  3196. dragType == 'drag',
  3197. dragOverBottom2:
  3198. newIndex === index1 &&
  3199. typeIndex ==
  3200. 'chapter-' +
  3201. itemTaskIndex +
  3202. '-' +
  3203. index1 &&
  3204. oldIndex < index1 &&
  3205. dragType == 'drag',
  3206. }"
  3207. >
  3208. <div
  3209. @mousedown="
  3210. isdrag =
  3211. 'chapter-' + itemTaskIndex + '-' + index1
  3212. "
  3213. @mouseup="isdrag = ''"
  3214. @touchstart="
  3215. isdrag =
  3216. 'chapter-' + itemTaskIndex + '-' + index1
  3217. "
  3218. @touchend="isdrag = ''"
  3219. class="chapter_upload_drag"
  3220. ></div>
  3221. <div
  3222. class="chapter_upload_o"
  3223. style="
  3224. position: relative;
  3225. display: flex;
  3226. align-items: center;
  3227. "
  3228. >
  3229. <div
  3230. class="chapter_upload_l"
  3231. style="padding: 1px 0 0 10px"
  3232. >
  3233. <div
  3234. v-if="item1.type == 2"
  3235. class="chapter_upload_l_i2"
  3236. ></div>
  3237. <div
  3238. v-if="item1.type == 3"
  3239. class="chapter_upload_l_i3"
  3240. style="margin-left: 1px"
  3241. ></div>
  3242. <div
  3243. v-if="item1.type == 6"
  3244. class="chapter_upload_l_i6"
  3245. style="margin-left: 1px"
  3246. ></div>
  3247. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3248. <div
  3249. v-if="item1.type == 8"
  3250. class="chapter_upload_l_i8"
  3251. style="margin-left: 1px"
  3252. ></div>
  3253. <div
  3254. v-if="item1.type == 14"
  3255. class="chapter_upload_l_i14"
  3256. style="margin-left: 1px"
  3257. ></div>
  3258. <div
  3259. v-if="item1.type == 12"
  3260. class="chapter_upload_l_i12"
  3261. style="margin-left: 1px"
  3262. ></div>
  3263. <div
  3264. v-if="item1.type == 13"
  3265. class="chapter_upload_l_i13"
  3266. style="margin-left: 1px"
  3267. ></div>
  3268. </div>
  3269. <div class="chapter_upload_n">
  3270. <input
  3271. readonly="true"
  3272. v-if="
  3273. item1.type == 2 ||
  3274. item1.type == 3 ||
  3275. item1.type == 12 ||
  3276. item1.type == 13 ||
  3277. item1.type == 7
  3278. "
  3279. :placeholder="item1.name"
  3280. @click="
  3281. updataVideoT(
  3282. $event,
  3283. unitIndex,
  3284. itemTaskIndex,
  3285. index1
  3286. )
  3287. "
  3288. style="
  3289. border: none;
  3290. outline: none;
  3291. width: 80%;
  3292. minwidth: 215px;
  3293. z-index: 99;
  3294. font-size: 14px;
  3295. white-space: nowrap;
  3296. overflow: hidden;
  3297. text-overflow: ellipsis;
  3298. "
  3299. />
  3300. <input
  3301. :placeholder="item1.name"
  3302. v-if="item1.type == 6"
  3303. style="
  3304. border: none;
  3305. outline: none;
  3306. width: 80%;
  3307. white-space: nowrap;
  3308. overflow: hidden;
  3309. text-overflow: ellipsis;
  3310. "
  3311. readonly="true"
  3312. @click="
  3313. selectAttText(itemTaskIndex, index1)
  3314. "
  3315. />
  3316. <input
  3317. :placeholder="
  3318. item1.title ? item1.title : '链接'
  3319. "
  3320. v-if="item1.type == 8"
  3321. style="
  3322. border: none;
  3323. outline: none;
  3324. width: 80%;
  3325. white-space: nowrap;
  3326. overflow: hidden;
  3327. text-overflow: ellipsis;
  3328. "
  3329. readonly="true"
  3330. @click="selectLine(itemTaskIndex, index1)"
  3331. />
  3332. <input
  3333. :placeholder="
  3334. item1.title ? item1.title : '链接'
  3335. "
  3336. v-if="item1.type == 14"
  3337. style="
  3338. border: none;
  3339. outline: none;
  3340. width: 80%;
  3341. white-space: nowrap;
  3342. overflow: hidden;
  3343. text-overflow: ellipsis;
  3344. "
  3345. readonly="true"
  3346. @click="
  3347. openUpdateSource(itemTaskIndex, index1)
  3348. "
  3349. />
  3350. </div>
  3351. <div class="chapter_upload_ic">
  3352. <div
  3353. class="chapter_upload_noSee"
  3354. v-if="item1.type == 12"
  3355. ></div>
  3356. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3357. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  3358. ">
  3359. <div></div>
  3360. </div>
  3361. <div
  3362. class="chapter_upload_ud"
  3363. style="z-index: 99"
  3364. >
  3365. <div
  3366. class="chapter_upload_up"
  3367. @click="
  3368. upCd(
  3369. $event,
  3370. unitIndex,
  3371. index,
  3372. itemTaskIndex,
  3373. index1
  3374. )
  3375. "
  3376. ></div>
  3377. <div
  3378. class="chapter_upload_down"
  3379. @click="
  3380. downCd(
  3381. $event,
  3382. unitIndex,
  3383. index,
  3384. itemTaskIndex,
  3385. index1
  3386. )
  3387. "
  3388. ></div>
  3389. </div>
  3390. <div
  3391. class="chapter_upload_ic_edit"
  3392. v-if="
  3393. item1.type == 2 ||
  3394. item1.type == 3 ||
  3395. item1.type == 12 ||
  3396. item1.type == 13 ||
  3397. item1.type == 7
  3398. "
  3399. @click.stop="
  3400. updataVideoT(
  3401. $event,
  3402. unitIndex,
  3403. itemTaskIndex,
  3404. index1
  3405. )
  3406. "
  3407. >
  3408. <div></div>
  3409. </div>
  3410. <div
  3411. class="chapter_upload_ic_edit"
  3412. v-if="item1.type == 6"
  3413. @click="
  3414. selectAttText(itemTaskIndex, index1)
  3415. "
  3416. >
  3417. <div></div>
  3418. </div>
  3419. <div
  3420. class="chapter_upload_ic_edit"
  3421. v-if="item1.type == 8"
  3422. @click="selectLine(itemTaskIndex, index1)"
  3423. >
  3424. <div></div>
  3425. </div>
  3426. <div
  3427. class="chapter_upload_ic_edit"
  3428. v-if="item1.type == 14"
  3429. @click="
  3430. openUpdateSource(itemTaskIndex, index1)
  3431. "
  3432. >
  3433. <div></div>
  3434. </div>
  3435. <div
  3436. class="chapter_upload_ic_r"
  3437. @click.stop="
  3438. deleteChapterData(
  3439. $event,
  3440. unitIndex,
  3441. index,
  3442. index1,
  3443. itemTaskIndex
  3444. )
  3445. "
  3446. >
  3447. <div></div>
  3448. </div>
  3449. </div>
  3450. </div>
  3451. </div>
  3452. </div>
  3453. </div>
  3454. <!-- v-if="!itemTask.isFoldchapter" -->
  3455. <div class="add_info_box" style="margin: 10px 0 0">
  3456. <button
  3457. class="c_pub_button_add pub_btn_add_img"
  3458. @click="addImg($event)"
  3459. >
  3460. 文件
  3461. <input
  3462. type="file"
  3463. accept="*"
  3464. style="display: none"
  3465. multiple="multiple"
  3466. v-if="inputShow"
  3467. @change="
  3468. beforeUpload2(
  3469. $event,
  3470. unitIndex,
  3471. 13,
  3472. itemTaskIndex
  3473. )
  3474. "
  3475. />
  3476. </button>
  3477. <button
  3478. class="c_pub_button_add pub_btn_add_img"
  3479. @click="addAttText(itemTaskIndex)"
  3480. >
  3481. 图文
  3482. </button>
  3483. <button
  3484. class="c_pub_button_add pub_btn_add_img"
  3485. @click="openLine(itemTaskIndex)"
  3486. >
  3487. 链接
  3488. </button>
  3489. <button
  3490. class="c_pub_button_add pub_btn_add_img"
  3491. @click="pasteLine(itemTaskIndex)"
  3492. >
  3493. 代码
  3494. </button>
  3495. <button
  3496. class="c_pub_button_add pub_btn_add_img"
  3497. @click="openSource(itemTaskIndex)"
  3498. >
  3499. 资源
  3500. </button>
  3501. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成PPT按钮`)">
  3502. AI生成PPT
  3503. </button>
  3504. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3505. AI生成教案
  3506. </button> -->
  3507. <button class="c_pub_button_add pub_btn_add_img" @click="createTaskAn(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成学历案按钮`)">
  3508. {{ taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex] == true ? '停止生成学历案' : 'AI生成学历案'}}
  3509. </button>
  3510. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-智能检索视频按钮`)">
  3511. 智能检索视频
  3512. </button>
  3513. </div>
  3514. <div
  3515. v-if="
  3516. unitJson[unitIndex].chapterInfo[0].taskJson[
  3517. itemTaskIndex
  3518. ].proVisible
  3519. "
  3520. class="mask"
  3521. >
  3522. <div class="progressBox">
  3523. <!-- <div id="closePro" class="closeCss">
  3524. <img src="../../../../assets/icon/close.png" alt />
  3525. </div> -->
  3526. <div class="lbox">
  3527. <img
  3528. src="../../../assets/loading.gif"
  3529. />上传中,请稍后
  3530. </div>
  3531. <div style="margin-bottom: 10px">
  3532. <span
  3533. >{{
  3534. unitJson[unitIndex].chapterInfo[0].taskJson[
  3535. itemTaskIndex
  3536. ].isFinishSize
  3537. }}</span
  3538. >
  3539. /
  3540. <span
  3541. >{{
  3542. unitJson[unitIndex].chapterInfo[0].taskJson[
  3543. itemTaskIndex
  3544. ].isAllSize
  3545. }}</span
  3546. >
  3547. </div>
  3548. <!-- <el-progress
  3549. :text-inside="true"
  3550. :stroke-width="20"
  3551. :percentage="
  3552. unitJson[unitIndex].chapterInfo[0].taskJson[
  3553. itemTaskIndex
  3554. ].progress
  3555. ? unitJson[unitIndex].chapterInfo[0]
  3556. .taskJson[itemTaskIndex].progress
  3557. : 0
  3558. "
  3559. style="width: 80%"
  3560. ></el-progress> -->
  3561. </div>
  3562. </div>
  3563. </div>
  3564. <div v-if="
  3565. unitJson[unitIndex].easy == 1 ||
  3566. (unitJson[unitIndex].easy == 5 &&
  3567. itemTask.taskType == 2)
  3568. ">
  3569. <div>
  3570. <div class="add_chapters_box add_c_none" v-if="
  3571. itemTask.chapterData &&
  3572. itemTask.chapterData.length == 0
  3573. ">
  3574. <img src="../../../assets/icon/new/c_none.png" alt />
  3575. </div>
  3576. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3577. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3578. dragOver(index1, itemTaskIndex)
  3579. " @dragend="dragEnd()" :draggable="isdrag ==
  3580. 'chapter-' + itemTaskIndex + '-' + index1
  3581. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3582. :key="item1.id" @click="
  3583. getChapterData(
  3584. $event,
  3585. unitIndex,
  3586. index,
  3587. index1,
  3588. item1.type
  3589. )
  3590. " :class="{
  3591. dragOverTop2:
  3592. newIndex === index1 &&
  3593. typeIndex ==
  3594. 'chapter-' +
  3595. itemTaskIndex +
  3596. '-' +
  3597. index1 &&
  3598. oldIndex > index1,
  3599. dragOverBottom2:
  3600. newIndex === index1 &&
  3601. typeIndex ==
  3602. 'chapter-' +
  3603. itemTaskIndex +
  3604. '-' +
  3605. index1 &&
  3606. oldIndex < index1,
  3607. }">
  3608. <div @mousedown="
  3609. isdrag =
  3610. 'chapter-' + itemTaskIndex + '-' + index1
  3611. " @mouseup="isdrag = ''" @touchstart="
  3612. isdrag =
  3613. 'chapter-' + itemTaskIndex + '-' + index1
  3614. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3615. <div class="chapter_upload_t" style="width: 100%"></div>
  3616. <div class="chapter_upload_o" style="
  3617. position: relative;
  3618. display: flex;
  3619. align-items: center;
  3620. ">
  3621. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3622. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3623. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3624. </div>
  3625. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3626. </div>
  3627. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3628. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3629. </div>
  3630. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3631. </div>
  3632. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3633. </div>
  3634. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3635. </div>
  3636. </div>
  3637. <div class="chapter_upload_n">
  3638. <span style="
  3639. font-size: 14px;
  3640. color: rgb(109, 109, 109);
  3641. height: 14px;
  3642. line-height: 14px;
  3643. " v-if="
  3644. item1.type == 2 ||
  3645. item1.type == 3 ||
  3646. item1.type == 7
  3647. ">{{ item1.text }}-</span>
  3648. <input readonly="true" v-if="
  3649. item1.type == 2 ||
  3650. item1.type == 3 ||
  3651. item1.type == 7
  3652. " :placeholder="item1.name" @click="
  3653. updataVideoT(
  3654. $event,
  3655. unitIndex,
  3656. itemTaskIndex,
  3657. index1
  3658. )
  3659. " style="
  3660. border: none;
  3661. outline: none;
  3662. width: 80%;
  3663. minwidth: 215px;
  3664. z-index: 99;
  3665. font-size: 14px;
  3666. white-space: nowrap;
  3667. overflow: hidden;
  3668. text-overflow: ellipsis;
  3669. " />
  3670. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3671. border: none;
  3672. outline: none;
  3673. width: 80%;
  3674. white-space: nowrap;
  3675. overflow: hidden;
  3676. text-overflow: ellipsis;
  3677. " readonly="true" @click="
  3678. selectAttText(itemTaskIndex, index1)
  3679. " />
  3680. <input :placeholder="item1.title ? item1.title : '链接'
  3681. " v-if="item1.type == 8 || item1.type == 14" style="
  3682. border: none;
  3683. outline: none;
  3684. width: 80%;
  3685. white-space: nowrap;
  3686. overflow: hidden;
  3687. text-overflow: ellipsis;
  3688. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3689. </div>
  3690. <div class="chapter_upload_ic">
  3691. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3692. <div class="chapter_upload_ud" style="z-index: 99">
  3693. <div class="chapter_upload_up" @click="
  3694. upCd(
  3695. $event,
  3696. unitIndex,
  3697. index,
  3698. itemTaskIndex,
  3699. index1
  3700. )
  3701. "></div>
  3702. <div class="chapter_upload_down" @click="
  3703. downCd(
  3704. $event,
  3705. unitIndex,
  3706. index,
  3707. itemTaskIndex,
  3708. index1
  3709. )
  3710. "></div>
  3711. </div>
  3712. <div class="chapter_upload_ic_edit" v-if="
  3713. item1.type == 2 ||
  3714. item1.type == 3 ||
  3715. item1.type == 12 ||
  3716. item1.type == 13 ||
  3717. item1.type == 7
  3718. " @click.stop="
  3719. updataVideoT(
  3720. $event,
  3721. unitIndex,
  3722. itemTaskIndex,
  3723. index1
  3724. )
  3725. ">
  3726. <div></div>
  3727. </div>
  3728. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3729. selectAttText(itemTaskIndex, index1)
  3730. ">
  3731. <div></div>
  3732. </div>
  3733. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3734. @click="selectLine(itemTaskIndex, index1)">
  3735. <div></div>
  3736. </div>
  3737. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3738. openUpdateSource(itemTaskIndex, index1)
  3739. ">
  3740. <div></div>
  3741. </div>
  3742. <div class="chapter_upload_ic_r" @click.stop="
  3743. deleteChapterData(
  3744. $event,
  3745. unitIndex,
  3746. index,
  3747. index1,
  3748. itemTaskIndex
  3749. )
  3750. ">
  3751. <div></div>
  3752. </div>
  3753. </div>
  3754. </div>
  3755. </div>
  3756. </div>
  3757. </div>
  3758. <div class="add_info_box" style="margin: 10px 0 0">
  3759. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3760. <span style="color: red">*</span>
  3761. 教学设计
  3762. <input type="file"
  3763. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3764. style="display: none" v-if="inputShow" @change="
  3765. beforeUpload3(
  3766. $event,
  3767. unitIndex,
  3768. 3,
  3769. itemTaskIndex,
  3770. '教学设计'
  3771. )
  3772. " />
  3773. </button>
  3774. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3775. <span style="color: red">*</span>
  3776. 教学课件
  3777. <input type="file"
  3778. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3779. style="display: none" v-if="inputShow" @change="
  3780. beforeUpload3(
  3781. $event,
  3782. unitIndex,
  3783. 3,
  3784. itemTaskIndex,
  3785. '教学课件'
  3786. )
  3787. " />
  3788. </button>
  3789. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3790. 教学视频
  3791. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3792. style="display: none" v-if="inputShow" @change="
  3793. beforeUpload3(
  3794. $event,
  3795. unitIndex,
  3796. 2,
  3797. itemTaskIndex,
  3798. '教学视频'
  3799. )
  3800. " />
  3801. </button>
  3802. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3803. 教学音频
  3804. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3805. beforeUpload3(
  3806. $event,
  3807. unitIndex,
  3808. 2,
  3809. itemTaskIndex,
  3810. '教学音频'
  3811. )
  3812. " />
  3813. </button>
  3814. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3815. 学习单
  3816. <input type="file"
  3817. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3818. style="display: none" v-if="inputShow" @change="
  3819. beforeUpload3(
  3820. $event,
  3821. unitIndex,
  3822. 3,
  3823. itemTaskIndex,
  3824. '学习单'
  3825. )
  3826. " />
  3827. </button>
  3828. </div>
  3829. <div v-if="
  3830. unitJson[unitIndex].chapterInfo[0].taskJson[
  3831. itemTaskIndex
  3832. ].proVisible
  3833. " class="mask">
  3834. <div class="progressBox">
  3835. <!-- <div id="closePro" class="closeCss">
  3836. <img src="../../../../assets/icon/close.png" alt />
  3837. </div> -->
  3838. <div class="lbox">
  3839. <img src="../../../assets/loading.gif" />上传中,请稍后
  3840. </div>
  3841. <div style="margin-bottom: 10px">
  3842. <span>{{
  3843. unitJson[unitIndex].chapterInfo[0].taskJson[
  3844. itemTaskIndex
  3845. ].isFinishSize
  3846. }}M</span>
  3847. /
  3848. <span>{{
  3849. unitJson[unitIndex].chapterInfo[0].taskJson[
  3850. itemTaskIndex
  3851. ].isAllSize
  3852. }}M</span>
  3853. </div>
  3854. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3855. itemTaskIndex
  3856. ].progress
  3857. ? unitJson[unitIndex].chapterInfo[0]
  3858. .taskJson[itemTaskIndex].progress
  3859. : 0
  3860. " style="width: 80%"></el-progress>
  3861. </div>
  3862. </div>
  3863. </div>
  3864. </div>
  3865. <!-- padding: 20px; -->
  3866. <div style="
  3867. background: #fff;
  3868. border-radius: 5px;
  3869. margin-top: 15px;
  3870. " :style="{paddingBottom: panTaskElist() == 0?'75px':''}">
  3871. <div v-if="
  3872. unitJson[unitIndex].easy == 6 ||
  3873. !unitJson[unitIndex].easy
  3874. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" element-loading-text="小可正在努力生成中,请稍等...">
  3875. <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" @click="cancelAjax('aiTaskGL2', itemTaskIndex)">停止</div>
  3876. <div style="width: 100%">
  3877. <div style="
  3878. display: flex;
  3879. flex-direction: row;
  3880. align-items: center;
  3881. margin: 5px 0 20px;
  3882. width: 100%
  3883. ">
  3884. <div class="lineTitle clineTitle" style="width: 100%">
  3885. <span>练习内容</span>
  3886. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3887. <div class="r_pub_button_op" style="margin-left:auto;"
  3888. @contextmenu.prevent="openAiDialog(1, 'aiTaskG2', itemTaskIndex)"
  3889. @click="openAiDialog(2, 'aiTaskG2', itemTaskIndex)">{{ panDanTool(itemTask) > 0 ? '重新生成工具' : '生成工具' }}</div>
  3890. </el-tooltip>
  3891. </div>
  3892. <!-- <div class="line" style="width: 90%"></div> -->
  3893. </div>
  3894. </div>
  3895. <div class="tools">
  3896. <div class="leftTools" style="width: 100%" v-for="(
  3897. itemTool, toolIndex
  3898. ) in itemTask.toolChoose" :key="toolIndex">
  3899. <div style="
  3900. display: flex;
  3901. flex-direction: row;
  3902. align-items: baseline;
  3903. flex-wrap: nowrap;
  3904. justify-content: flex-start;
  3905. position: relative;
  3906. ">
  3907. <div style="margin-right: 20px; font-weight: bold"
  3908. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3909. 工具 {{ toolIndex + 1 }} :
  3910. </div>
  3911. <div class="chooseWho">
  3912. <div :class="itemTool.toolType == 0
  3913. ? 'isChooseActive'
  3914. : ''
  3915. " @click="
  3916. (itemTool.toolType = 0),
  3917. (itemTool.isFold3 = false),
  3918. $forceUpdate()
  3919. ">
  3920. 互动类
  3921. </div>
  3922. <div :class="itemTool.toolType == 1
  3923. ? 'isChooseActive'
  3924. : ''
  3925. " @click="
  3926. (itemTool.toolType = 1),
  3927. (itemTool.isFold3 = false),
  3928. $forceUpdate()
  3929. ">
  3930. 思维类
  3931. </div>
  3932. <div :class="itemTool.toolType == 6
  3933. ? 'isChooseActive'
  3934. : ''
  3935. " @click="
  3936. (itemTool.toolType = 6),
  3937. (itemTool.isFold3 = false),
  3938. $forceUpdate()
  3939. ">
  3940. 协作类
  3941. </div>
  3942. <div :class="itemTool.toolType == 2
  3943. ? 'isChooseActive'
  3944. : ''
  3945. " @click="
  3946. (itemTool.toolType = 2),
  3947. (itemTool.isFold3 = false),
  3948. $forceUpdate()
  3949. ">
  3950. 测评类
  3951. </div>
  3952. <div :class="itemTool.toolType == 7
  3953. ? 'isChooseActive'
  3954. : ''
  3955. " @click="
  3956. (itemTool.toolType = 7),
  3957. (itemTool.isFold3 = false),
  3958. $forceUpdate()
  3959. ">
  3960. 评价类
  3961. </div>
  3962. <div :class="itemTool.toolType == 3
  3963. ? 'isChooseActive'
  3964. : ''
  3965. " @click="
  3966. (itemTool.toolType = 3),
  3967. (itemTool.isFold3 = false),
  3968. $forceUpdate()
  3969. ">
  3970. 编程类
  3971. </div>
  3972. <div :class="itemTool.toolType == 5
  3973. ? 'isChooseActive'
  3974. : ''
  3975. " @click="
  3976. (itemTool.toolType = 5),
  3977. (itemTool.isFold3 = false),
  3978. $forceUpdate()
  3979. ">
  3980. 学科类
  3981. </div>
  3982. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3983. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3984. 其他
  3985. </div> -->
  3986. </div>
  3987. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3988. margin:
  3989. itemTask.toolChoose.length > 1
  3990. ? '0px 35px 0px auto'
  3991. : '0 0 0 auto',
  3992. }" v-if="itemTask.toolChoose.length > 1">
  3993. <div class="chapter_upload_up2" @click.stop="
  3994. upTool(
  3995. $event,
  3996. unitIndex,
  3997. itemTaskIndex,
  3998. toolIndex
  3999. )
  4000. ">
  4001. 上移
  4002. </div>
  4003. <div class="chapter_upload_down2" @click.stop="
  4004. downTool(
  4005. $event,
  4006. unitIndex,
  4007. itemTaskIndex,
  4008. toolIndex
  4009. )
  4010. ">
  4011. 下移
  4012. </div>
  4013. </div>
  4014. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  4015. @click="fold3(itemTaskIndex, toolIndex)"
  4016. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4017. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  4018. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  4019. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4020. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  4021. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4022. v-if="itemTask.toolChoose.length > 1" style="
  4023. position: absolute;
  4024. right: 0;
  4025. top: -5px;
  4026. "></div>
  4027. </div>
  4028. <!-- v-show="!itemTool.isFold3" -->
  4029. <div style="min-height: 163px">
  4030. <div class="toolSort" v-if="itemTool.toolType == 0">
  4031. <!-- <div class="tool">
  4032. <div
  4033. class="whiteBIcon"
  4034. @click="addTools(8, itemTaskIndex, toolIndex)"
  4035. >
  4036. <img src="../../../assets/icon/secondToolList/library.png" alt />
  4037. <div style="margin: 5px 0">素材库</div>
  4038. </div>
  4039. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  4040. <img
  4041. src="../../../assets/icon/checkNo.png"
  4042. alt
  4043. v-if="itemTool.tool.indexOf(8) == -1"
  4044. />
  4045. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  4046. alt /><span>已选择</span></div>
  4047. </div>
  4048. </div>-->
  4049. <!-- <div class="tool">
  4050. <div
  4051. class="whiteBIcon"
  4052. @click="addTools(17, itemTaskIndex, toolIndex)"
  4053. >
  4054. <img
  4055. src="../../../assets/icon/secondToolList/library.png"
  4056. alt
  4057. />
  4058. <div style="margin: 5px 0">学习资料</div>
  4059. </div>
  4060. <div
  4061. class="check"
  4062. @click="addTools(17, itemTaskIndex, toolIndex)"
  4063. >
  4064. <img
  4065. src="../../../assets/icon/checkNo.png"
  4066. alt
  4067. v-if="itemTool.tool.indexOf(17) == -1"
  4068. />
  4069. <img
  4070. src="../../../assets/icon/checkedIs.png"
  4071. alt
  4072. v-else
  4073. />
  4074. </div>10
  4075. </div> -->
  4076. <div class="tool" :class="{
  4077. isToolChoose:
  4078. itemTool.tool.indexOf(10) != -1,
  4079. }" @click="
  4080. addTools(10, itemTaskIndex, toolIndex)
  4081. ">
  4082. <div class="whiteBIcon" @click.stop="
  4083. openTools(itemTaskIndex, 10, toolIndex)
  4084. ">
  4085. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  4086. <div style="margin: 5px 0">倒计时</div>
  4087. </div>
  4088. <div class="noCTool">
  4089. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4090. </div>
  4091. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  4092. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4093. </div>
  4094. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  4095. <img src="../../../assets/icon/checkNo.png" alt
  4096. v-if="itemTool.tool.indexOf(10) == -1" />
  4097. <div class="checkDiv" v-else>
  4098. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4099. </div>
  4100. </div> -->
  4101. </div>
  4102. <div class="tool" :class="{
  4103. isToolChoose:
  4104. itemTool.tool.indexOf(65) != -1,
  4105. }" @click="
  4106. addTools(65, itemTaskIndex, toolIndex)
  4107. ">
  4108. <div class="whiteBIcon" @click.stop="
  4109. addTools(65, itemTaskIndex, toolIndex)
  4110. ">
  4111. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  4112. <div style="margin: 5px 0">挑人</div>
  4113. </div>
  4114. <div class="noCTool">
  4115. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4116. </div>
  4117. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  4118. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4119. </div>
  4120. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  4121. <img src="../../../assets/icon/checkNo.png" alt
  4122. v-if="itemTool.tool.indexOf(65) == -1" />
  4123. <div class="checkDiv" v-else>
  4124. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4125. </div>
  4126. </div> -->
  4127. </div>
  4128. <!-- <div class="tool">
  4129. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  4130. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4131. <div style="margin: 5px 0">学生分组</div>
  4132. </div>
  4133. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4134. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  4135. <div class="checkDiv" v-else>
  4136. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4137. </div>
  4138. </div>
  4139. </div> -->
  4140. <!-- <div class="tool">
  4141. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  4142. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  4143. <div style="margin: 5px 0">交互视频</div>
  4144. </div>
  4145. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  4146. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  4147. <div class="checkDiv" v-else>
  4148. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4149. </div>
  4150. </div>
  4151. </div> -->
  4152. </div>
  4153. <div class="toolSort" v-if="itemTool.toolType == 1">
  4154. <div class="tool" :class="{
  4155. isToolChoose:
  4156. itemTool.tool.indexOf(7) != -1,
  4157. }" @click="
  4158. addTools(7, itemTaskIndex, toolIndex)
  4159. ">
  4160. <div class="whiteBIcon" @click.stop="
  4161. addTools(7, itemTaskIndex, toolIndex)
  4162. ">
  4163. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  4164. <div style="margin: 5px 0">思维网格</div>
  4165. </div>
  4166. <div class="noCTool">
  4167. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4168. </div>
  4169. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  4170. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4171. </div>
  4172. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  4173. <img src="../../../assets/icon/checkNo.png" alt
  4174. v-if="itemTool.tool.indexOf(7) == -1" />
  4175. <div class="checkDiv" v-else>
  4176. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4177. </div>
  4178. </div> -->
  4179. </div>
  4180. <div class="tool" :class="{
  4181. isToolChoose:
  4182. itemTool.tool.indexOf(1) != -1,
  4183. }" @click="
  4184. addTools(1, itemTaskIndex, toolIndex)
  4185. ">
  4186. <div class="whiteBIcon" @click.stop="
  4187. openTools(itemTaskIndex, 1, toolIndex)
  4188. ">
  4189. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4190. <div style="margin: 5px 0">电子白板</div>
  4191. </div>
  4192. <div class="noCTool">
  4193. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4194. </div>
  4195. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  4196. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4197. </div>
  4198. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  4199. <img src="../../../assets/icon/checkNo.png" alt
  4200. v-if="itemTool.tool.indexOf(1) == -1" />
  4201. <div class="checkDiv" v-else>
  4202. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4203. </div>
  4204. </div> -->
  4205. </div>
  4206. <!-- <div class="tool">
  4207. <div
  4208. class="whiteBIcon"
  4209. @click="addTools(2, itemTaskIndex, toolIndex)"
  4210. >
  4211. <img
  4212. src="../../../assets/icon/secondToolList/note.png"
  4213. alt
  4214. />
  4215. <div style="margin: 5px 0">便签</div>
  4216. </div>
  4217. <div
  4218. class="check"
  4219. @click="addTools(2, itemTaskIndex, toolIndex)"
  4220. >
  4221. <img
  4222. src="../../../assets/icon/checkNo.png"
  4223. alt
  4224. v-if="itemTool.tool.indexOf(2) == -1"
  4225. />
  4226. <div class="checkDiv" v-else>
  4227. <img
  4228. src="../../../assets/icon/checkedIs.png"
  4229. alt
  4230. /><span>已选择</span>
  4231. </div>
  4232. </div>
  4233. </div> -->
  4234. <!-- <div class="tool">
  4235. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  4236. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4237. <div style="margin: 5px 0">协同文档</div>
  4238. </div>
  4239. <div
  4240. class="check"
  4241. @click="addTools(6, itemTaskIndex, toolIndex)"
  4242. >
  4243. <img
  4244. src="../../../assets/icon/checkNo.png"
  4245. alt
  4246. v-if="itemTool.tool.indexOf(6) == -1"
  4247. />
  4248. <div class="checkDiv" v-else>
  4249. <img
  4250. src="../../../assets/icon/checkedIs.png"
  4251. alt
  4252. /><span>已选择</span>
  4253. </div>
  4254. </div>
  4255. </div> -->
  4256. <div class="tool" :class="{
  4257. isToolChoose:
  4258. itemTool.tool.indexOf(52) != -1,
  4259. }" @click="
  4260. addTools(52, itemTaskIndex, toolIndex)
  4261. ">
  4262. <div class="whiteBIcon" @click.stop="
  4263. openTools(itemTaskIndex, 52, toolIndex)
  4264. ">
  4265. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4266. <div style="margin: 5px 0">文档</div>
  4267. </div>
  4268. <div class="noCTool">
  4269. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4270. </div>
  4271. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  4272. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4273. </div>
  4274. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  4275. <img src="../../../assets/icon/checkNo.png" alt
  4276. v-if="itemTool.tool.indexOf(52) == -1" />
  4277. <div class="checkDiv" v-else>
  4278. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4279. </div>
  4280. </div> -->
  4281. </div>
  4282. <div class="tool" :class="{
  4283. isToolChoose:
  4284. itemTool.tool.indexOf(3) != -1,
  4285. }" @click="
  4286. addTools(3, itemTaskIndex, toolIndex)
  4287. ">
  4288. <div class="whiteBIcon" @click.stop="
  4289. openTools(itemTaskIndex, 3, toolIndex)
  4290. ">
  4291. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4292. <div style="margin: 5px 0">思维导图</div>
  4293. </div>
  4294. <div class="noCTool">
  4295. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4296. </div>
  4297. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  4298. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4299. </div>
  4300. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  4301. <img src="../../../assets/icon/checkNo.png" alt
  4302. v-if="itemTool.tool.indexOf(3) == -1" />
  4303. <div class="checkDiv" v-else>
  4304. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4305. </div>
  4306. </div> -->
  4307. </div>
  4308. <div class="tool" :class="{
  4309. isToolChoose:
  4310. itemTool.tool.indexOf(48) != -1,
  4311. }" @click="
  4312. addTools(48, itemTaskIndex, toolIndex)
  4313. ">
  4314. <div class="whiteBIcon" @click.stop="
  4315. openTools(itemTaskIndex, 48, toolIndex)
  4316. ">
  4317. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4318. <div style="margin: 5px 0">表格</div>
  4319. </div>
  4320. <div class="noCTool">
  4321. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4322. </div>
  4323. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  4324. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4325. </div>
  4326. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  4327. <img src="../../../assets/icon/checkNo.png" alt
  4328. v-if="itemTool.tool.indexOf(48) == -1" />
  4329. <div class="checkDiv" v-else>
  4330. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4331. </div>
  4332. </div> -->
  4333. </div>
  4334. </div>
  4335. <div class="toolSort" v-if="itemTool.toolType == 6">
  4336. <div class="tool" :class="{
  4337. isToolChoose:
  4338. itemTool.tool.indexOf(49) != -1,
  4339. }" @click="
  4340. addTools(49, itemTaskIndex, toolIndex)
  4341. ">
  4342. <div class="whiteBIcon" @click.stop="
  4343. openTools(itemTaskIndex, 49, toolIndex)
  4344. ">
  4345. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4346. <div style="margin: 5px 0">学生分组</div>
  4347. </div>
  4348. <div class="noCTool">
  4349. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4350. </div>
  4351. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  4352. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4353. </div>
  4354. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4355. <img src="../../../assets/icon/checkNo.png" alt
  4356. v-if="itemTool.tool.indexOf(49) == -1" />
  4357. <div class="checkDiv" v-else>
  4358. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4359. </div>
  4360. </div> -->
  4361. </div>
  4362. </div>
  4363. <div class="toolSort" v-if="itemTool.toolType == 2">
  4364. <!-- <div class="tool">
  4365. <div
  4366. class="whiteBIcon"
  4367. @click="addTools(5, itemTaskIndex, toolIndex)"
  4368. >
  4369. <img
  4370. src="../../../assets/icon/thirdToolList/score.png"
  4371. alt
  4372. />
  4373. <div style="margin: 5px 0">量规评分</div>
  4374. </div>
  4375. <div
  4376. class="check"
  4377. @click="addTools(5, itemTaskIndex, toolIndex)"
  4378. >
  4379. <img
  4380. src="../../../assets/icon/checkNo.png"
  4381. alt
  4382. v-if="itemTool.tool.indexOf(5) == -1"
  4383. />
  4384. <img
  4385. src="../../../assets/icon/checkedIs.png"
  4386. alt
  4387. v-else
  4388. />
  4389. </div>
  4390. </div>-->
  4391. <div class="tool" :class="{
  4392. isToolChoose:
  4393. itemTool.tool.indexOf(4) != -1,
  4394. }" @click="
  4395. addTools(4, itemTaskIndex, toolIndex)
  4396. ">
  4397. <div class="whiteBIcon" @click.stop="
  4398. openTools(itemTaskIndex, 4, toolIndex)
  4399. ">
  4400. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4401. <div style="margin: 5px 0">问卷调查</div>
  4402. </div>
  4403. <div class="noCTool">
  4404. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4405. </div>
  4406. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4407. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4408. </div>
  4409. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4410. <img src="../../../assets/icon/checkNo.png" alt
  4411. v-if="itemTool.tool.indexOf(4) == -1" />
  4412. <div class="checkDiv" v-else>
  4413. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4414. </div>
  4415. </div> -->
  4416. </div>
  4417. <div class="tool" :class="{
  4418. isToolChoose:
  4419. itemTool.tool.indexOf(45) != -1,
  4420. }" @click="
  4421. addTools(45, itemTaskIndex, toolIndex)
  4422. ">
  4423. <div class="whiteBIcon" @click="
  4424. openTools(itemTaskIndex, 45, toolIndex)
  4425. ">
  4426. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4427. <div style="margin: 5px 0">选择题</div>
  4428. </div>
  4429. <div class="noCTool">
  4430. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4431. </div>
  4432. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4433. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4434. </div>
  4435. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4436. <img src="../../../assets/icon/checkNo.png" alt
  4437. v-if="itemTool.tool.indexOf(45) == -1" />
  4438. <div class="checkDiv" v-else>
  4439. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4440. </div>
  4441. </div> -->
  4442. </div>
  4443. <div class="tool" :class="{
  4444. isToolChoose:
  4445. itemTool.tool.indexOf(15) != -1,
  4446. }" @click="
  4447. addTools(15, itemTaskIndex, toolIndex)
  4448. ">
  4449. <div class="whiteBIcon" @click.stop="
  4450. openTools(itemTaskIndex, 15, toolIndex)
  4451. ">
  4452. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4453. <div style="margin: 5px 0">问答</div>
  4454. </div>
  4455. <div class="noCTool">
  4456. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4457. </div>
  4458. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4459. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4460. </div>
  4461. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4462. <img src="../../../assets/icon/checkNo.png" alt
  4463. v-if="itemTool.tool.indexOf(15) == -1" />
  4464. <div class="checkDiv" v-else>
  4465. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4466. </div>
  4467. </div> -->
  4468. </div>
  4469. <div class="tool" :class="{
  4470. isToolChoose:
  4471. itemTool.tool.indexOf(16) != -1,
  4472. }" @click="
  4473. addTools(16, itemTaskIndex, toolIndex)
  4474. ">
  4475. <div class="whiteBIcon" @click.stop="
  4476. addTools(16, itemTaskIndex, toolIndex)
  4477. ">
  4478. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4479. <div style="margin: 5px 0">作业提交</div>
  4480. </div>
  4481. <div class="noCTool">
  4482. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4483. </div>
  4484. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4485. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4486. </div>
  4487. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4488. <img src="../../../assets/icon/checkNo.png" alt
  4489. v-if="itemTool.tool.indexOf(16) == -1" />
  4490. <div class="checkDiv" v-else>
  4491. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4492. </div>
  4493. </div> -->
  4494. </div>
  4495. <div class="tool" :class="{
  4496. isToolChoose:
  4497. itemTool.tool.indexOf(50) != -1,
  4498. }" @click="
  4499. addTools(50, itemTaskIndex, toolIndex)
  4500. ">
  4501. <div class="whiteBIcon" @click.stop="
  4502. addTools(50, itemTaskIndex, toolIndex)
  4503. ">
  4504. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4505. <div style="margin: 5px 0">批量上传</div>
  4506. </div>
  4507. <div class="noCTool">
  4508. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4509. </div>
  4510. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4511. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4512. </div>
  4513. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4514. <img src="../../../assets/icon/checkNo.png" alt
  4515. v-if="itemTool.tool.indexOf(50) == -1" />
  4516. <div class="checkDiv" v-else>
  4517. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4518. </div>
  4519. </div> -->
  4520. </div>
  4521. <!-- <div class="tool">
  4522. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4523. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4524. <div style="margin: 5px 0">个人评价</div>
  4525. </div>
  4526. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4527. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4528. <div class="checkDiv" v-else>
  4529. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4530. </div>
  4531. </div>
  4532. </div> -->
  4533. <div class="tool" :class="{
  4534. isToolChoose:
  4535. itemTool.tool.indexOf(41) != -1,
  4536. }" @click="
  4537. addTools(41, itemTaskIndex, toolIndex)
  4538. ">
  4539. <div class="whiteBIcon" @click.stop="
  4540. openTools(itemTaskIndex, 41, toolIndex)
  4541. ">
  4542. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4543. <div style="margin: 5px 0">选择匹配</div>
  4544. </div>
  4545. <div class="noCTool">
  4546. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4547. </div>
  4548. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4549. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4550. </div>
  4551. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4552. <img src="../../../assets/icon/checkNo.png" alt
  4553. v-if="itemTool.tool.indexOf(41) == -1" />
  4554. <div class="checkDiv" v-else>
  4555. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4556. </div>
  4557. </div> -->
  4558. </div>
  4559. <div class="tool" :class="{
  4560. isToolChoose:
  4561. itemTool.tool.indexOf(47) != -1,
  4562. }" @click="
  4563. addTools(47, itemTaskIndex, toolIndex)
  4564. ">
  4565. <div class="whiteBIcon" @click.stop="
  4566. openTools(itemTaskIndex, 47, toolIndex)
  4567. ">
  4568. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4569. <div style="margin: 5px 0">排序</div>
  4570. </div>
  4571. <div class="noCTool">
  4572. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4573. </div>
  4574. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4575. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4576. </div>
  4577. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4578. <img src="../../../assets/icon/checkNo.png" alt
  4579. v-if="itemTool.tool.indexOf(47) == -1" />
  4580. <div class="checkDiv" v-else>
  4581. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4582. </div>
  4583. </div> -->
  4584. </div>
  4585. <!-- <div class="tool">
  4586. <div
  4587. class="whiteBIcon"
  4588. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4589. >
  4590. <img
  4591. src="../../../assets/icon/thirdToolList/mp3.png"
  4592. alt
  4593. />
  4594. <div style="margin: 5px 0">上传音频</div>
  4595. </div>
  4596. <div
  4597. class="check"
  4598. @click="addTools(42, itemTaskIndex, toolIndex)"
  4599. >
  4600. <img
  4601. src="../../../assets/icon/checkNo.png"
  4602. alt
  4603. v-if="itemTool.tool.indexOf(42) == -1"
  4604. />
  4605. <img
  4606. src="../../../assets/icon/checkedIs.png"
  4607. alt
  4608. v-else
  4609. />
  4610. </div>
  4611. </div> -->
  4612. </div>
  4613. <div class="toolSort" v-if="itemTool.toolType == 3">
  4614. <div class="tool" :class="{
  4615. isToolChoose:
  4616. itemTool.tool.indexOf(18) != -1,
  4617. }" @click="
  4618. addTools(18, itemTaskIndex, toolIndex)
  4619. ">
  4620. <div class="whiteBIcon" @click.stop="
  4621. addTools(18, itemTaskIndex, toolIndex)
  4622. ">
  4623. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4624. <div style="margin: 5px 0">训练平台</div>
  4625. </div>
  4626. <div class="noCTool">
  4627. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4628. </div>
  4629. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4630. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4631. </div>
  4632. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4633. <img src="../../../assets/icon/checkNo.png" alt
  4634. v-if="itemTool.tool.indexOf(18) == -1" />
  4635. <div class="checkDiv" v-else>
  4636. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4637. </div>
  4638. </div> -->
  4639. </div>
  4640. <div class="tool" :class="{
  4641. isToolChoose:
  4642. itemTool.tool.indexOf(21) != -1,
  4643. }" @click="
  4644. addTools(21, itemTaskIndex, toolIndex)
  4645. ">
  4646. <div class="whiteBIcon" @click.stop="
  4647. addTools(21, itemTaskIndex, toolIndex)
  4648. ">
  4649. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4650. <div style="margin: 5px 0">
  4651. AIoT Blockly
  4652. </div>
  4653. </div>
  4654. <div class="noCTool">
  4655. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4656. </div>
  4657. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4658. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4659. </div>
  4660. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4661. <img src="../../../assets/icon/checkNo.png" alt
  4662. v-if="itemTool.tool.indexOf(21) == -1" />
  4663. <div class="checkDiv" v-else>
  4664. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4665. </div>
  4666. </div> -->
  4667. </div>
  4668. <!-- <div class="tool">
  4669. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4670. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4671. <div style="margin: 5px 0">AI体验</div>
  4672. </div>
  4673. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4674. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4675. <div class="checkDiv" v-else>
  4676. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4677. </div>
  4678. </div>
  4679. </div> -->
  4680. <div class="tool" :class="{
  4681. isToolChoose:
  4682. itemTool.tool.indexOf(23) != -1,
  4683. }" @click="
  4684. addTools(23, itemTaskIndex, toolIndex)
  4685. ">
  4686. <div class="whiteBIcon" @click.stop="
  4687. addTools(23, itemTaskIndex, toolIndex)
  4688. ">
  4689. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4690. <div style="margin: 5px 0">AI Python</div>
  4691. </div>
  4692. <div class="noCTool">
  4693. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4694. </div>
  4695. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4696. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4697. </div>
  4698. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4699. <img src="../../../assets/icon/checkNo.png" alt
  4700. v-if="itemTool.tool.indexOf(23) == -1" />
  4701. <div class="checkDiv" v-else>
  4702. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4703. </div>
  4704. </div> -->
  4705. </div>
  4706. <div class="tool" :class="{
  4707. isToolChoose:
  4708. itemTool.tool.indexOf(24) != -1,
  4709. }" @click="
  4710. addTools(24, itemTaskIndex, toolIndex)
  4711. ">
  4712. <div class="whiteBIcon" @click.stop="
  4713. addTools(24, itemTaskIndex, toolIndex)
  4714. ">
  4715. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4716. <div style="margin: 5px 0">
  4717. AI Blockly
  4718. </div>
  4719. </div>
  4720. <div class="noCTool">
  4721. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4722. </div>
  4723. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4724. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4725. </div>
  4726. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4727. <img src="../../../assets/icon/checkNo.png" alt
  4728. v-if="itemTool.tool.indexOf(24) == -1" />
  4729. <div class="checkDiv" v-else>
  4730. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4731. </div>
  4732. </div> -->
  4733. </div>
  4734. <div class="tool" :class="{
  4735. isToolChoose:
  4736. itemTool.tool.indexOf(32) != -1,
  4737. }" @click="
  4738. addTools(32, itemTaskIndex, toolIndex)
  4739. ">
  4740. <div class="whiteBIcon" @click.stop="
  4741. addTools(32, itemTaskIndex, toolIndex)
  4742. ">
  4743. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4744. <div style="margin: 5px 0">源码编辑</div>
  4745. </div>
  4746. <div class="noCTool">
  4747. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4748. </div>
  4749. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4750. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4751. </div>
  4752. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4753. <img src="../../../assets/icon/checkNo.png" alt
  4754. v-if="itemTool.tool.indexOf(32) == -1" />
  4755. <div class="checkDiv" v-else>
  4756. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4757. </div>
  4758. </div> -->
  4759. </div>
  4760. <div class="tool" :class="{
  4761. isToolChoose:
  4762. itemTool.tool.indexOf(57) != -1,
  4763. }" @click="
  4764. addTools(57, itemTaskIndex, toolIndex)
  4765. ">
  4766. <div class="whiteBIcon" @click.stop="
  4767. openTools(itemTaskIndex, 57, toolIndex)
  4768. ">
  4769. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4770. <div style="margin: 5px 0">CocoPi</div>
  4771. </div>
  4772. <div class="noCTool">
  4773. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4774. </div>
  4775. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4776. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4777. </div>
  4778. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4779. <img src="../../../assets/icon/checkNo.png" alt
  4780. v-if="itemTool.tool.indexOf(57) == -1" />
  4781. <div class="checkDiv" v-else>
  4782. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4783. </div>
  4784. </div> -->
  4785. </div>
  4786. <div class="tool" :class="{
  4787. isToolChoose:
  4788. itemTool.tool.indexOf(63) != -1,
  4789. }" @click="
  4790. addTools(63, itemTaskIndex, toolIndex)
  4791. ">
  4792. <div class="whiteBIcon" @click.stop="
  4793. addTools(63, itemTaskIndex, toolIndex)
  4794. ">
  4795. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4796. <div style="margin: 5px 0">海龟编程</div>
  4797. </div>
  4798. <div class="noCTool">
  4799. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4800. </div>
  4801. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4802. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4803. </div>
  4804. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4805. <img src="../../../assets/icon/checkNo.png" alt
  4806. v-if="itemTool.tool.indexOf(63) == -1" />
  4807. <div class="checkDiv" v-else>
  4808. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4809. </div>
  4810. </div> -->
  4811. </div>
  4812. <div class="tool" :class="{
  4813. isToolChoose:
  4814. itemTool.tool.indexOf(71) != -1,
  4815. }" @click="
  4816. addTools(71, itemTaskIndex, toolIndex)
  4817. ">
  4818. <div class="whiteBIcon" @click.stop="
  4819. addTools(71, itemTaskIndex, toolIndex)
  4820. ">
  4821. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4822. <div style="margin: 5px 0">AI智能体</div>
  4823. </div>
  4824. <div class="noCTool">
  4825. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4826. </div>
  4827. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4828. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4829. </div>
  4830. </div>
  4831. </div>
  4832. <div class="toolSort" v-if="itemTool.toolType == 7">
  4833. <div class="tool" :class="{
  4834. isToolChoose:
  4835. itemTool.tool.indexOf(40) != -1,
  4836. }" @click.stop="
  4837. addTools(40, itemTaskIndex, toolIndex)
  4838. ">
  4839. <div class="whiteBIcon" @click.stop="
  4840. openTools(itemTaskIndex, 40, toolIndex)
  4841. ">
  4842. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4843. <div style="margin: 5px 0">个人评价</div>
  4844. </div>
  4845. <div class="noCTool">
  4846. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4847. </div>
  4848. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4849. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4850. </div>
  4851. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4852. <img src="../../../assets/icon/checkNo.png" alt
  4853. v-if="itemTool.tool.indexOf(40) == -1" />
  4854. <div class="checkDiv" v-else>
  4855. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4856. </div>
  4857. </div> -->
  4858. </div>
  4859. </div>
  4860. <div class="toolSort" v-if="itemTool.toolType == 5">
  4861. <div class="tool" :class="{
  4862. isToolChoose:
  4863. itemTool.tool.indexOf(28) != -1,
  4864. }" @click="
  4865. addTools(28, itemTaskIndex, toolIndex)
  4866. ">
  4867. <div class="whiteBIcon" @click.stop="
  4868. addTools(28, itemTaskIndex, toolIndex)
  4869. ">
  4870. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4871. <div style="margin: 5px 0">翻译</div>
  4872. </div>
  4873. <div class="noCTool">
  4874. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4875. </div>
  4876. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4877. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4878. </div>
  4879. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4880. <img src="../../../assets/icon/checkNo.png" alt
  4881. v-if="itemTool.tool.indexOf(28) == -1" />
  4882. <div class="checkDiv" v-else>
  4883. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4884. </div>
  4885. </div> -->
  4886. </div>
  4887. <div class="tool" :class="{
  4888. isToolChoose:
  4889. itemTool.tool.indexOf(31) != -1,
  4890. }" @click="
  4891. addTools(31, itemTaskIndex, toolIndex)
  4892. ">
  4893. <div class="whiteBIcon" @click.stop="
  4894. addTools(31, itemTaskIndex, toolIndex)
  4895. ">
  4896. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4897. <div style="margin: 5px 0">数字画板</div>
  4898. </div>
  4899. <div class="noCTool">
  4900. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4901. </div>
  4902. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4903. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4904. </div>
  4905. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4906. <img src="../../../assets/icon/checkNo.png" alt
  4907. v-if="itemTool.tool.indexOf(31) == -1" />
  4908. <div class="checkDiv" v-else>
  4909. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4910. </div>
  4911. </div> -->
  4912. </div>
  4913. <div class="tool" :class="{
  4914. isToolChoose:
  4915. itemTool.tool.indexOf(39) != -1,
  4916. }" @click="
  4917. addTools(39, itemTaskIndex, toolIndex)
  4918. ">
  4919. <div class="whiteBIcon" @click.stop="
  4920. addTools(39, itemTaskIndex, toolIndex)
  4921. ">
  4922. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4923. <div style="margin: 5px 0">GeoGebra</div>
  4924. </div>
  4925. <div class="noCTool">
  4926. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4927. </div>
  4928. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4929. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4930. </div>
  4931. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4932. <img src="../../../assets/icon/checkNo.png" alt
  4933. v-if="itemTool.tool.indexOf(39) == -1" />
  4934. <div class="checkDiv" v-else>
  4935. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4936. </div>
  4937. </div> -->
  4938. </div>
  4939. <div class="tool" :class="{
  4940. isToolChoose:
  4941. itemTool.tool.indexOf(66) != -1,
  4942. }" @click="
  4943. addTools(66, itemTaskIndex, toolIndex)
  4944. ">
  4945. <div class="whiteBIcon" @click.stop="
  4946. addTools(66, itemTaskIndex, toolIndex)
  4947. ">
  4948. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4949. <div style="margin: 5px 0">公式编辑</div>
  4950. </div>
  4951. <div class="noCTool">
  4952. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4953. </div>
  4954. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4955. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4956. </div>
  4957. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4958. <img src="../../../assets/icon/checkNo.png" alt
  4959. v-if="itemTool.tool.indexOf(66) == -1" />
  4960. <div class="checkDiv" v-else>
  4961. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4962. </div>
  4963. </div> -->
  4964. </div>
  4965. <!-- <div class="tool">
  4966. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4967. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4968. <div style="margin: 5px 0">分子结构</div>
  4969. </div>
  4970. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4971. <img src="../../../assets/icon/checkNo.png" alt
  4972. v-if="itemTool.tool.indexOf(67) == -1" />
  4973. <div class="checkDiv" v-else>
  4974. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4975. </div>
  4976. </div>
  4977. </div> -->
  4978. <div class="tool" :class="{
  4979. isToolChoose:
  4980. itemTool.tool.indexOf(68) != -1,
  4981. }" @click="
  4982. addTools(68, itemTaskIndex, toolIndex)
  4983. ">
  4984. <div class="whiteBIcon" @click.stop="
  4985. addTools(68, itemTaskIndex, toolIndex)
  4986. ">
  4987. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4988. <div style="margin: 5px 0">时间轴</div>
  4989. </div>
  4990. <div class="noCTool">
  4991. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4992. </div>
  4993. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4994. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4995. </div>
  4996. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4997. <img src="../../../assets/icon/checkNo.png" alt
  4998. v-if="itemTool.tool.indexOf(68) == -1" />
  4999. <div class="checkDiv" v-else>
  5000. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5001. </div>
  5002. </div> -->
  5003. </div>
  5004. <div class="tool" :class="{
  5005. isToolChoose:
  5006. itemTool.tool.indexOf(69) != -1,
  5007. }" @click="
  5008. addTools(69, itemTaskIndex, toolIndex)
  5009. ">
  5010. <div class="whiteBIcon" @click.stop="
  5011. openTools(itemTaskIndex, 69, toolIndex)
  5012. ">
  5013. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  5014. <div style="margin: 5px 0">英语写作</div>
  5015. </div>
  5016. <div class="noCTool">
  5017. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5018. </div>
  5019. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  5020. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5021. </div>
  5022. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  5023. <img src="../../../assets/icon/checkNo.png" alt
  5024. v-if="itemTool.tool.indexOf(4) == -1" />
  5025. <div class="checkDiv" v-else>
  5026. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5027. </div>
  5028. </div> -->
  5029. </div>
  5030. <div class="tool" :class="{
  5031. isToolChoose:
  5032. itemTool.tool.indexOf(70) != -1,
  5033. }" @click="
  5034. addTools(70, itemTaskIndex, toolIndex)
  5035. ">
  5036. <div class="whiteBIcon" @click.stop="
  5037. openTools(itemTaskIndex, 70, toolIndex)
  5038. ">
  5039. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  5040. <div style="margin: 5px 0">英语口语</div>
  5041. </div>
  5042. <div class="noCTool">
  5043. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5044. </div>
  5045. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  5046. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5047. </div>
  5048. </div>
  5049. <!-- <div class="tool">
  5050. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  5051. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  5052. <div style="margin: 5px 0">翻译</div>
  5053. </div>
  5054. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5055. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  5056. <div class="checkDiv" v-else>
  5057. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5058. </div>
  5059. </div>
  5060. </div>
  5061. <div class="tool">
  5062. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  5063. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  5064. <div style="margin: 5px 0">魔盒识字</div>
  5065. </div>
  5066. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  5067. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  5068. <div class="checkDiv" v-else>
  5069. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5070. </div>
  5071. </div>
  5072. </div>
  5073. <div class="tool">
  5074. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  5075. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  5076. <div style="margin: 5px 0">24点</div>
  5077. </div>
  5078. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  5079. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  5080. <div class="checkDiv" v-else>
  5081. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5082. </div>
  5083. </div>
  5084. </div>
  5085. <div class="tool">
  5086. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  5087. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5088. <div style="margin: 5px 0">数学画板</div>
  5089. </div>
  5090. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5091. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  5092. <div class="checkDiv" v-else>
  5093. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5094. </div>
  5095. </div>
  5096. </div>
  5097. <div class="tool">
  5098. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  5099. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5100. <div style="margin: 5px 0">GeoGebra</div>
  5101. </div>
  5102. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5103. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  5104. <div class="checkDiv" v-else>
  5105. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5106. </div>
  5107. </div>
  5108. </div>
  5109. <div class="tool">
  5110. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  5111. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  5112. <div style="margin: 5px 0">模拟驾驶</div>
  5113. </div>
  5114. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  5115. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  5116. <div class="checkDiv" v-else>
  5117. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5118. </div>
  5119. </div>
  5120. </div>
  5121. <div class="tool">
  5122. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  5123. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  5124. <div style="margin: 5px 0">路径搜索</div>
  5125. </div>
  5126. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  5127. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  5128. <div class="checkDiv" v-else>
  5129. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5130. </div>
  5131. </div>
  5132. </div>
  5133. <div class="tool">
  5134. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  5135. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  5136. <div style="margin: 5px 0">深度学习</div>
  5137. </div>
  5138. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  5139. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  5140. <div class="checkDiv" v-else>
  5141. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5142. </div>
  5143. </div>
  5144. </div>
  5145. <div class="tool">
  5146. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  5147. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  5148. <div style="margin: 5px 0">全历史</div>
  5149. </div>
  5150. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  5151. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  5152. <div class="checkDiv" v-else>
  5153. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5154. </div>
  5155. </div>
  5156. </div>
  5157. </div>
  5158. <div class="toolSort" v-if="itemTool.toolType == 4">
  5159. <div class="tool">
  5160. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  5161. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  5162. <div style="margin: 5px 0">课程设计</div>
  5163. </div>
  5164. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  5165. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  5166. <div class="checkDiv" v-else>
  5167. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5168. </div>
  5169. </div>
  5170. </div>
  5171. <div class="tool">
  5172. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  5173. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  5174. <div style="margin: 5px 0">目标管理</div>
  5175. </div>
  5176. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  5177. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  5178. <div class="checkDiv" v-else>
  5179. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5180. </div>
  5181. </div>
  5182. </div> -->
  5183. <!-- <div class="tool">
  5184. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  5185. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  5186. <div style="margin: 5px 0">汉字宫</div>
  5187. </div>
  5188. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  5189. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  5190. <div class="checkDiv" v-else>
  5191. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5192. </div>
  5193. </div>
  5194. </div> -->
  5195. </div>
  5196. </div>
  5197. <!-- v-show="!itemTool.isFold3" -->
  5198. <div class="op_tool_box"
  5199. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  5200. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  5201. class="binfo_input" style="
  5202. margin: 0 0 20px 0;
  5203. width: 100% !important;
  5204. " v-model="itemTool.toolDetail"></textarea>
  5205. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]}">
  5206. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  5207. <div class="op_box_right">
  5208. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5209. <div class="r_pub_button_op"
  5210. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)"
  5211. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)">
  5212. 智能优化</div>
  5213. </el-tooltip>
  5214. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  5215. </div>
  5216. </div>
  5217. </div>
  5218. <evaList
  5219. :toolsData="toolsData"
  5220. :unitJson="unitJson"
  5221. :itemTaskIndex="itemTaskIndex"
  5222. :toolIndex="toolIndex"
  5223. :knowFileids="knowFileids"
  5224. :languageSetting="languageSetting"
  5225. :userid="userid"
  5226. :aiJson="aiJson"
  5227. @setEvaList="setEvaList"
  5228. @addCourseBehavior="addCourseBehavior"
  5229. v-if="panTaskElist() == 0 && pjIndex.indexOf(itemTool.tool[0]) != -1"
  5230. :ref="'evalist'+itemTaskIndex+toolIndex"></evaList>
  5231. </div>
  5232. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具描述-添加按钮`)" style="
  5233. margin: 0 auto;
  5234. padding: 0 30px;
  5235. height: 45px;
  5236. ">
  5237. 添加工具
  5238. </button>
  5239. </div>
  5240. </div>
  5241. <div class="elist_css" v-if="panElist(itemTask) > 0">
  5242. <div class="elist_title">
  5243. <div style=" display: flex; flex-direction: row; align-items: center; margin: 20px 0; ">
  5244. <div class="lineTitle clineTitle" style="width: auto">任务评价体系</div>
  5245. </div>
  5246. <div>
  5247. <MindTask :showBar="false" :mindData="itemTask" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' " :ref="unitIndex + '-' + itemTaskIndex + 'mindTask'"></MindTask>
  5248. </div>
  5249. </div>
  5250. </div>
  5251. <div class="elist_css" v-if="panTaskElist() > 0"
  5252. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])" element-loading-text="小可正在努力生成中,请稍等...">
  5253. <div class="elist_title">
  5254. <div style="
  5255. display: flex;
  5256. flex-direction: row;
  5257. align-items: center;
  5258. margin: 20px 0;
  5259. ">
  5260. <div class="lineTitle clineTitle">评价设置</div>
  5261. <div style="margin-left:auto;display: flex;">
  5262. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  5263. <div class="r_pub_button_op"
  5264. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  5265. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  5266. </el-tooltip>
  5267. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  5268. <div class="r_pub_button_op" style="margin-left:10px;"
  5269. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  5270. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  5271. </el-tooltip>
  5272. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5273. <div class="r_pub_button_op" style="margin-left:10px;"
  5274. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  5275. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList && itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
  5276. </el-tooltip>
  5277. </div>
  5278. <!-- <div class="line" style="width: 90%"></div> -->
  5279. </div>
  5280. </div>
  5281. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5282. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5283. 上传补充资料
  5284. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5285. beforeUploadInfo2(
  5286. $event,
  5287. 18,
  5288. itemTaskIndex
  5289. )
  5290. " />
  5291. </button>
  5292. <div style="margin-top: 10px;width:100%" v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  5293. <div class="add_chapters_box add_c_none" v-if="
  5294. pingjiaInfoData[itemTaskIndex] &&
  5295. pingjiaInfoData[itemTaskIndex].length == 0
  5296. ">
  5297. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5298. <span>暂时还没有内容,快去添加吧</span>
  5299. </div>
  5300. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5301. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]" :key="item1.id" @click="
  5302. getChapterData(
  5303. $event,
  5304. index1,
  5305. item1.type
  5306. )
  5307. " >
  5308. <div class="chapter_upload_o" style="
  5309. position: relative;
  5310. display: flex;
  5311. align-items: center;
  5312. ">
  5313. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5314. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5315. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5316. </div>
  5317. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5318. </div>
  5319. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5320. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5321. </div>
  5322. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5323. </div>
  5324. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5325. </div>
  5326. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5327. </div>
  5328. </div>
  5329. <div class="chapter_upload_n">
  5330. <input readonly="true" v-if="
  5331. item1.type == 2 ||
  5332. item1.type == 3 ||
  5333. item1.type == 12 ||
  5334. item1.type == 13 ||
  5335. item1.type == 7
  5336. " :placeholder="item1.name" @click.stop="
  5337. checkChpater3($event, index1, item1)
  5338. " style="
  5339. border: none;
  5340. outline: none;
  5341. width: 80%;
  5342. minwidth: 215px;
  5343. z-index: 99;
  5344. font-size: 14px;
  5345. white-space: nowrap;
  5346. overflow: hidden;
  5347. text-overflow: ellipsis;
  5348. " />
  5349. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5350. border: none;
  5351. outline: none;
  5352. width: 80%;
  5353. white-space: nowrap;
  5354. overflow: hidden;
  5355. text-overflow: ellipsis;
  5356. " readonly="true" @click="
  5357. selectAttText(index1)
  5358. " />
  5359. <input :placeholder="item1.title ? item1.title : '链接'
  5360. " v-if="item1.type == 8" style="
  5361. border: none;
  5362. outline: none;
  5363. width: 80%;
  5364. white-space: nowrap;
  5365. overflow: hidden;
  5366. text-overflow: ellipsis;
  5367. " readonly="true" @click="selectLine(index1)" />
  5368. <input :placeholder="item1.title ? item1.title : '链接'
  5369. " v-if="item1.type == 14" style="
  5370. border: none;
  5371. outline: none;
  5372. width: 80%;
  5373. white-space: nowrap;
  5374. overflow: hidden;
  5375. text-overflow: ellipsis;
  5376. " readonly="true" @click="
  5377. openUpdateSource(index1)
  5378. " />
  5379. </div>
  5380. <div class="chapter_upload_ic">
  5381. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5382. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5383. checkChpater3($event, index1, item1)
  5384. ">
  5385. <div></div>
  5386. </div>
  5387. <div class="chapter_upload_ic_r" @click.stop="
  5388. deletepingjiaInfoData(
  5389. $event,
  5390. index1,
  5391. itemTaskIndex
  5392. )
  5393. ">
  5394. <div></div>
  5395. </div>
  5396. </div>
  5397. </div>
  5398. </div>
  5399. </div>
  5400. </div>
  5401. <div v-if="
  5402. pingjiainfoproVisible[itemTaskIndex]
  5403. " class="mask">
  5404. <div class="progressBox">
  5405. <div class="lbox">
  5406. <img src="../../../assets/loading.gif" />上传中,请稍后
  5407. </div>
  5408. <div style="margin-bottom: 10px">
  5409. <span>{{
  5410. pingjiainfoisFinishSize[itemTaskIndex]
  5411. }}</span>
  5412. /
  5413. <span>{{
  5414. pingjiainfoisAllSize[itemTaskIndex]
  5415. }}</span>
  5416. </div>
  5417. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5418. ? pingjiainfoprogress[itemTaskIndex]
  5419. : 0
  5420. " style="width: 80%"></el-progress> -->
  5421. </div>
  5422. </div>
  5423. </div>
  5424. <div class="mbCss">
  5425. <div class="pjCss" :style="{
  5426. width: itemTask.isEvaFold
  5427. ? 'calc(100% - 55%)'
  5428. : 'calc(100% - 120px)',
  5429. }">
  5430. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5431. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5432. <div class="elist_inptu_text">
  5433. <span>目标:</span>
  5434. <!-- <span>核心素养:</span> -->
  5435. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: calc(100% - 280px);"/>
  5436. <el-switch
  5437. @change="forceUpdate"
  5438. class="rateSwitch"
  5439. style="margin-left: auto;"
  5440. v-model="itemTask.eList[eIndex].isai"
  5441. active-color="#0061FF"
  5442. active-text="AI评分"
  5443. inactive-text=""
  5444. active-value="1"
  5445. inactive-value="2">
  5446. </el-switch>
  5447. </div>
  5448. <div class="elist_inptu_text" v-show="false">
  5449. <!-- <span>评价维度:</span> -->
  5450. <span>能力:</span>
  5451. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5452. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5453. <!-- </el-tooltip> -->
  5454. <!-- <span>评星等级:</span>
  5455. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5456. disabled></el-rate> -->
  5457. <div class="remove" @click="
  5458. deletEList(
  5459. unitIndex,
  5460. itemTaskIndex,
  5461. eIndex
  5462. )
  5463. "></div>
  5464. </div>
  5465. <div class="elist_inptu_text">
  5466. <!-- <span>维度描述:</span> -->
  5467. <span>评价标准:</span>
  5468. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5469. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5470. <div class="remove" @click="
  5471. deletEList(
  5472. unitIndex,
  5473. itemTaskIndex,
  5474. eIndex
  5475. )
  5476. "></div>
  5477. <!-- </el-tooltip> -->
  5478. </div>
  5479. <div class="elist_inptu_text" v-if="evalua">
  5480. <span>目标:</span>
  5481. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5482. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5483. @change="forceUpdate()">
  5484. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5485. :value="e.name">
  5486. </el-option>
  5487. </el-select> -->
  5488. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5489. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5490. </div>
  5491. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  5492. <span>评价细则:</span>
  5493. <div style="width: calc(100%);">
  5494. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  5495. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5496. <div class="ruleBtn"
  5497. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5498. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5499. </el-tooltip>
  5500. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  5501. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5502. <div class="op_box">
  5503. <div class="op_remark"></div>
  5504. <div class="op_box_right">
  5505. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5506. <div class="r_pub_button_op"
  5507. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5508. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5509. </el-tooltip>
  5510. </div>
  5511. </div>
  5512. </div>
  5513. </div>
  5514. </div>
  5515. </div>
  5516. </div>
  5517. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5518. style="margin: 35px 35px 0 0">
  5519. <div class="addToolImg">
  5520. <img src="../../../assets/icon/add.png" alt />
  5521. </div>
  5522. <div>添加</div>
  5523. </div> -->
  5524. <div class="eva_btn_box">
  5525. <div class="eva_btn_left_box">
  5526. <button class="c_pub_button_add pub_btn_eval_img"
  5527. @click="addEList(unitIndex, itemTaskIndex)">
  5528. 添加
  5529. </button>
  5530. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5531. @click="openEList(unitIndex, itemTaskIndex)">
  5532. 资源
  5533. </button> -->
  5534. </div>
  5535. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5536. v-if="itemTask.eList && itemTask.eList.length">
  5537. 添加资源模板
  5538. </button>
  5539. </div>
  5540. </div>
  5541. <div v-if="evalua" style="
  5542. border: 1px solid #e5e5e5;
  5543. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5544. " :style="{
  5545. width: itemTask.isEvaFold ? '55%' : '116px',
  5546. }" class="evaCss">
  5547. <!-- <div class="e_add_top">
  5548. <div class="e_add_title">
  5549. <span>当前使用目标管理</span>
  5550. <span>{{ eTitle }}</span>
  5551. <img src="../../../assets/line.png" class="cru_line" style="
  5552. width: 125px;
  5553. height: 20px;
  5554. bottom: -10px;
  5555. left: 155px;
  5556. " />
  5557. </div>
  5558. </div> -->
  5559. <div class="e_add_content" style="width: 100%">
  5560. <div class="e_add_list_pbox" style="width: 100%">
  5561. <div class="e_add_list_pbox_title">
  5562. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5563. <div class="type_content" v-if="itemTask.isEvaFold">
  5564. <span :class="{ active: typeMode == 1 }"
  5565. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5566. <span :class="{ active: typeMode == 2 }"
  5567. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5568. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5569. </div>
  5570. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5571. @click="foldEva(itemTaskIndex)">
  5572. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5573. </div>
  5574. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5575. @click="foldEva(itemTaskIndex)">
  5576. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5577. </div>
  5578. </div>
  5579. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5580. style="min-height: 200px">
  5581. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5582. " v-if="typeMode == 1"></Mind>
  5583. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5584. </Sunburst>
  5585. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5586. v-if="typeMode == 3"></SeeBoard>
  5587. </div>
  5588. </div>
  5589. </div>
  5590. </div>
  5591. </div>
  5592. </div>
  5593. <div class="funBlock" style="padding: 0">
  5594. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5595. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5596. <div>
  5597. {{
  5598. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5599. }}
  5600. </div>
  5601. </div>
  5602. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5603. <div>展开</div>
  5604. <div class="arrow">
  5605. <img src="../../../assets/icon/expand.png" alt />
  5606. </div>
  5607. </div> -->
  5608. </div>
  5609. </div>
  5610. </div>
  5611. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5612. <!-- <div>
  5613. <img src="../../../../assets/icon/new/addStage.png" alt />
  5614. <span>添加任务</span>
  5615. </div> -->
  5616. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5617. 添加任务
  5618. </button>
  5619. </div>
  5620. </div>
  5621. <div class="info_btnBox3" v-show="istemplate == 1">
  5622. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5623. goTo(
  5624. '/course?userid=' +
  5625. userid +
  5626. '&oid=' +
  5627. oid +
  5628. '&org=' +
  5629. org +
  5630. '&role=' +
  5631. role
  5632. )
  5633. ">
  5634. 返回课程
  5635. </button>
  5636. <button class="c_pub_button_return pub_btn_last_img"
  5637. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5638. {{ steps == 4 ? "返回课程" : "上一步" }}
  5639. </button>
  5640. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5641. pub_btn_next_img: steps != 3,
  5642. pub_btn_finish_img: steps == 3,
  5643. }">
  5644. {{ steps == 3 ? "确认上传" : "下一步" }}
  5645. </button>
  5646. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5647. '修改模板' : '保存模板'}}</button>
  5648. </div>
  5649. </div>
  5650. </div>
  5651. </div>
  5652. </div>
  5653. <div style="
  5654. width: calc(100% - 20px);
  5655. background: rgb(255, 255, 255);
  5656. border-radius: 10px;
  5657. " v-if="steps == 4">
  5658. <div class="basic_box_success">
  5659. <div class="right_img">
  5660. <img src="../../../assets/icon/right.png" alt />
  5661. </div>
  5662. <div style="font-weight: bold">成功</div>
  5663. <!-- <div>您的课程编号</div>
  5664. <div class="number">{{ number }}</div>-->
  5665. <!-- <div class="success_button">
  5666. <div class="look_course" @click="isNoFinsh">
  5667. 邀请老师协同编辑
  5668. </div>
  5669. <div class="attend_others" @click="goCourse">预览课程</div>
  5670. </div> -->
  5671. </div>
  5672. </div>
  5673. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5674. @mouseleave="btnDisplay(false)" v-if="false">
  5675. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5676. goTo(
  5677. '/course?userid=' +
  5678. userid +
  5679. '&oid=' +
  5680. oid +
  5681. '&org=' +
  5682. org +
  5683. '&role=' +
  5684. role
  5685. )
  5686. ">
  5687. 返回课程
  5688. </button>
  5689. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5690. @click="lastSteps">
  5691. {{ steps == 4 ? "返回课程" : "上一步" }}
  5692. </button>
  5693. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5694. pub_btn_next_img: steps != 3,
  5695. pub_btn_finish_img: steps == 3,
  5696. }">
  5697. {{ steps == 3 ? "确认上传" : "下一步" }}
  5698. </button>
  5699. </div>
  5700. </div>
  5701. </div>
  5702. <div class="leftBar" style="height: calc(100% - 36px - 20px);margin-top: 36px;" v-if="istemplate == 1">
  5703. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5704. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5705. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5706. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5707. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5708. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5709. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5710. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5711. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5712. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5713. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5714. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5715. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5716. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5717. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5718. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5719. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5720. @setAiJson="setAiJson" /> -->
  5721. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5722. @setAiJson="setAiJson" />
  5723. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5724. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5725. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5726. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5727. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5728. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5729. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5730. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5731. </div>
  5732. <div class="leftBar2 resizable" style="height: calc(100% - 36px - 20px);margin-top: 36px;" v-show="istemplate != 1 && isDialog == 1 && chatid && isDisplay">
  5733. <div class="resizer"></div>
  5734. <aiBoxRight
  5735. :languageSetting="languageSetting"
  5736. :courseId="chatid"
  5737. :unitJson="unitJson"
  5738. :quoteArray="isQuote"
  5739. :teacherCourseText="teacherCourseText"
  5740. :targetCourseText="targetCourseText"
  5741. :courseText2="courseText"
  5742. :targetCourseText2="targetCourseText2"
  5743. :cpote="cpote"
  5744. @addCourseBehavior="addCourseBehavior"
  5745. :fileids='[...knowFileids, ...knowFileids2]'
  5746. @setIsQuote="setIsQuote"></aiBoxRight>
  5747. </div>
  5748. <div class="close_btn" @click="closeRight" :class="!isDisplay ? 'close_btn_voice' : ''" v-show="istemplate != 1 && isDialog == 1 && chatid">
  5749. <img src="../../../assets/icon/course/arrow.svg" >
  5750. </div>
  5751. </div>
  5752. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5753. class="dialog_diy2 customWidth">
  5754. <div>请复制该链接邀请协同编辑</div>
  5755. <div>http://www.boomyon.com/index-zhang.com</div>
  5756. <span slot="footer" class="dialog-footer">
  5757. <el-button type="primary">复制链接分享</el-button>
  5758. <el-button @click="dialogVisible = false">取消</el-button>
  5759. </span>
  5760. </el-dialog>
  5761. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5762. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5763. <el-form>
  5764. <el-form-item label="文档标题">
  5765. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5766. </el-form-item>
  5767. <div>文档简介</div>
  5768. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5769. </el-form>
  5770. <span slot="footer" class="dialog-footer">
  5771. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5772. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5773. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5774. </span>
  5775. </el-dialog>
  5776. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5777. :before-close="handleClose" class="dialog_diy">
  5778. <el-form>
  5779. <el-form-item label="文档标题">
  5780. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5781. </el-form-item>
  5782. <div>文档内容</div>
  5783. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5784. </el-form>
  5785. <span slot="footer" class="dialog-footer">
  5786. <el-button @click="clearChoose">取 消</el-button>
  5787. <el-button type="primary" @click="wordNext()">确定</el-button>
  5788. </span>
  5789. </el-dialog>
  5790. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5791. :before-close="handleClose" class="dialog_diy">
  5792. <el-form>
  5793. <el-form-item label="文本标题">
  5794. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5795. placeholder="请输入文本标题..."></el-input>
  5796. </el-form-item>
  5797. <!-- <div>富文本内容</div> -->
  5798. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5799. </el-form>
  5800. <span slot="footer" class="dialog-footer">
  5801. <el-button @click="clearAttText">取 消</el-button>
  5802. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5803. </span>
  5804. </el-dialog>
  5805. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5806. :before-close="handleClose" class="dialog_diy lineCss">
  5807. <el-form>
  5808. <el-form-item label="标题" :label-width="formLabelWidth">
  5809. <span>
  5810. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5811. </span>
  5812. </el-form-item>
  5813. <el-form-item label="链接" :label-width="formLabelWidth">
  5814. <span>
  5815. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5816. </span>
  5817. </el-form-item>
  5818. </el-form>
  5819. <span slot="footer" class="dialog-footer">
  5820. <el-button @click="clearLine">取 消</el-button>
  5821. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5822. </span>
  5823. </el-dialog>
  5824. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5825. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5826. <div>
  5827. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5828. </div>
  5829. <span slot="footer" class="dialog-footer">
  5830. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5831. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5832. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5833. </span>
  5834. </el-dialog>
  5835. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5836. :before-close="handleClose" class="addNewPP customWidth">
  5837. <div class="people">
  5838. <div class="people_top">
  5839. <div class="people_nav">选择成员</div>
  5840. <div class="people_top_right">
  5841. <div class="people_search">
  5842. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5843. <div class="search_img" @click="searchStudent">
  5844. <img src="../../../assets/icon/search.png" alt />
  5845. </div>
  5846. </div>
  5847. </div>
  5848. </div>
  5849. <el-checkbox-group v-model="checkboxList" class="people_name">
  5850. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5851. "暂无学生可选" }}</el-checkbox>
  5852. </el-checkbox-group>
  5853. </div>
  5854. <span slot="footer" class="dialog-footer">
  5855. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5856. <el-button type="primary" @click="isAddPP">确定</el-button>
  5857. </span>
  5858. </el-dialog>
  5859. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5860. :before-close="handleClose" class="addNewPP2">
  5861. <div class="check_classBox">
  5862. <div class="check_class_right">
  5863. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5864. 全部
  5865. </div>
  5866. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5867. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5868. {{ item.name }}
  5869. </div>
  5870. </el-tooltip>
  5871. </div>
  5872. <div class="check_class_left">
  5873. <div class="check_class_all_box">
  5874. <div class="check_class_left_title">选择班级</div>
  5875. <div style="display: flex; align-items: center; margin-left: auto">
  5876. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5877. </div>
  5878. </div>
  5879. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5880. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5881. </div> -->
  5882. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5883. v-if="grade2.length">
  5884. <div v-for="item in grade2" :key="item.id" class="class_item">
  5885. <el-checkbox :label="item.id">
  5886. {{ item.name }}
  5887. </el-checkbox>
  5888. </div>
  5889. </el-checkbox-group>
  5890. <div v-if="!grade2.length">暂无数据</div>
  5891. </div>
  5892. </div>
  5893. <span slot="footer" class="dialog-footer">
  5894. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5895. <el-button type="primary" @click="isAddClass">确定</el-button>
  5896. </span>
  5897. </el-dialog>
  5898. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5899. :before-close="handleClose" class="addNewPP customWidth">
  5900. <div style="display: flex;justify-content: space-between;">
  5901. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5902. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5903. 全部
  5904. </div>
  5905. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5906. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5907. <el-tooltip placement="top" :content="i.name">
  5908. <span>{{i.name}}</span>
  5909. </el-tooltip>
  5910. </div>
  5911. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5912. 其他
  5913. </div>
  5914. </div>
  5915. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5916. <div class="people">
  5917. <div class="people_top">
  5918. <div class="people_top_right">
  5919. <div class="people_search">
  5920. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5921. <div class="search_img" @click="getTeacher(collid)">
  5922. <img src="../../../assets/icon/search.png" alt />
  5923. </div>
  5924. </div>
  5925. </div>
  5926. <div class="people_nav" style="display: flex; align-items: center">
  5927. <div class="check_class_left_title">选择成员</div>
  5928. <div style="display: flex; align-items: center; margin-left: auto">
  5929. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5930. </div>
  5931. </div>
  5932. </div>
  5933. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5934. @change="InviteChange2">
  5935. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5936. <div class="t_j_box">
  5937. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5938. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5939. </el-tooltip>
  5940. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5941. <span>{{ item.username.split('@')[0] }}</span>
  5942. </el-tooltip>
  5943. <el-tooltip placement="top" :content="item.school">
  5944. <span>{{ item.school }}</span>
  5945. </el-tooltip>
  5946. </div>
  5947. </el-checkbox>
  5948. </el-checkbox-group>
  5949. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5950. </div>
  5951. </div>
  5952. </div>
  5953. <span slot="footer" class="dialog-footer">
  5954. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5955. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5956. </span>
  5957. </el-dialog>
  5958. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5959. closePan(4);
  5960. }
  5961. " class="dialog_diy fullStyle">
  5962. <div style="height: 100%">
  5963. <div class="a_add_title" style="
  5964. display: flex;
  5965. flex-direction: row;
  5966. align-items: center;
  5967. justify-content: center;
  5968. ">
  5969. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5970. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5971. </div>
  5972. <div class="a_addBox" style="height: calc(100% - 50px)">
  5973. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5974. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5975. <div class="a_add_checkType">
  5976. <span :class="{
  5977. active:
  5978. askJson.askJson[index1].type == '1' ||
  5979. !askJson.askJson[index1].type,
  5980. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5981. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5982. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5983. </div>
  5984. <div class="a_add_head">
  5985. <div style="
  5986. display: flex;
  5987. align-items: center;
  5988. width: 100%;
  5989. margin-right: 20px;
  5990. ">
  5991. <span style="min-width: fit-content">{{
  5992. index1 + 1 + "、"
  5993. }}</span>
  5994. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5995. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5996. $forceUpdate();
  5997. }
  5998. "></textarea>
  5999. </div>
  6000. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  6001. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  6002. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  6003. </div>
  6004. <div class="a_add_head_div">
  6005. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  6006. </el-button>
  6007. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  6008. </div>
  6009. </div>
  6010. <div class="a_add_body">
  6011. <div class="a_add_input" style="flex-direction: column">
  6012. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  6013. margin: 20px 10px 0 0;
  6014. display: flex;
  6015. align-items: center;
  6016. position: relative;
  6017. ">
  6018. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  6019. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6020. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  6021. @change="() => {
  6022. $forceUpdate();
  6023. }
  6024. "></textarea>
  6025. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  6026. v-if="askJson.askJson[index1].askItem != 1">
  6027. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  6028. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  6029. </div>
  6030. <div class="a_add_body_div">
  6031. <el-button type="primary" size="small"
  6032. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  6033. <el-button type="primary" size="small" @click="
  6034. deletecheckList(askJson.askJson[index1], checkIndex)
  6035. " v-if="askJson.askJson[index1].askItem != 1">删除
  6036. </el-button>
  6037. </div>
  6038. </div>
  6039. </div>
  6040. <!-- <div class="a_add_body_div">
  6041. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  6042. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  6043. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  6044. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  6045. </el-button>
  6046. </div> -->
  6047. </div>
  6048. </div>
  6049. </div>
  6050. </div>
  6051. <span slot="footer" class="dialog-footer">
  6052. <el-button @click="closePan(4)">取 消</el-button>
  6053. <el-button type="primary" @click="addAsk">确 定</el-button>
  6054. </span>
  6055. </el-dialog>
  6056. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  6057. closePan(45);
  6058. }
  6059. " class="dialog_diy fullStyle">
  6060. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  6061. <!-- <div class="a_add_title" style="
  6062. display: flex;
  6063. flex-direction: row;
  6064. align-items: center;
  6065. justify-content: center;
  6066. ">
  6067. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  6068. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6069. </div> -->
  6070. <div class="a_addBox" style="height: 100%">
  6071. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  6072. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  6073. 上传补充资料
  6074. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  6075. beforeUploadInfo2(
  6076. $event,
  6077. 17
  6078. )
  6079. " />
  6080. </button>
  6081. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  6082. <div class="add_chapters_box add_c_none" v-if="
  6083. xuanzeInfoData &&
  6084. xuanzeInfoData.length == 0
  6085. ">
  6086. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  6087. <span>暂时还没有内容,快去添加吧</span>
  6088. </div>
  6089. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  6090. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  6091. getChapterData(
  6092. $event,
  6093. index1,
  6094. item1.type
  6095. )
  6096. " >
  6097. <div class="chapter_upload_o" style="
  6098. position: relative;
  6099. display: flex;
  6100. align-items: center;
  6101. ">
  6102. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  6103. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  6104. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  6105. </div>
  6106. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  6107. </div>
  6108. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  6109. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  6110. </div>
  6111. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  6112. </div>
  6113. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  6114. </div>
  6115. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  6116. </div>
  6117. </div>
  6118. <div class="chapter_upload_n">
  6119. <input readonly="true" v-if="
  6120. item1.type == 2 ||
  6121. item1.type == 3 ||
  6122. item1.type == 12 ||
  6123. item1.type == 13 ||
  6124. item1.type == 7
  6125. " :placeholder="item1.name" @click.stop="
  6126. checkChpater3($event, index1, item1)
  6127. " style="
  6128. border: none;
  6129. outline: none;
  6130. width: 80%;
  6131. minwidth: 215px;
  6132. z-index: 99;
  6133. font-size: 14px;
  6134. white-space: nowrap;
  6135. overflow: hidden;
  6136. text-overflow: ellipsis;
  6137. " />
  6138. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  6139. border: none;
  6140. outline: none;
  6141. width: 80%;
  6142. white-space: nowrap;
  6143. overflow: hidden;
  6144. text-overflow: ellipsis;
  6145. " readonly="true" @click="
  6146. selectAttText(index1)
  6147. " />
  6148. <input :placeholder="item1.title ? item1.title : '链接'
  6149. " v-if="item1.type == 8" style="
  6150. border: none;
  6151. outline: none;
  6152. width: 80%;
  6153. white-space: nowrap;
  6154. overflow: hidden;
  6155. text-overflow: ellipsis;
  6156. " readonly="true" @click="selectLine(index1)" />
  6157. <input :placeholder="item1.title ? item1.title : '链接'
  6158. " v-if="item1.type == 14" style="
  6159. border: none;
  6160. outline: none;
  6161. width: 80%;
  6162. white-space: nowrap;
  6163. overflow: hidden;
  6164. text-overflow: ellipsis;
  6165. " readonly="true" @click="
  6166. openUpdateSource(index1)
  6167. " />
  6168. </div>
  6169. <div class="chapter_upload_ic">
  6170. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  6171. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  6172. checkChpater3($event, index1, item1)
  6173. ">
  6174. <div></div>
  6175. </div>
  6176. <div class="chapter_upload_ic_r" @click.stop="
  6177. deletexuanzeInfoData(
  6178. $event,
  6179. index1
  6180. )
  6181. ">
  6182. <div></div>
  6183. </div>
  6184. </div>
  6185. </div>
  6186. </div>
  6187. </div>
  6188. </div>
  6189. <div v-if="
  6190. xuanzeinfoproVisible
  6191. " class="mask">
  6192. <div class="progressBox">
  6193. <div class="lbox">
  6194. <img src="../../../assets/loading.gif" />上传中,请稍后
  6195. </div>
  6196. <div style="margin-bottom: 10px">
  6197. <span>{{
  6198. xuanzeinfoisFinishSize
  6199. }}</span>
  6200. /
  6201. <span>{{
  6202. xuanzeinfoisAllSize
  6203. }}</span>
  6204. </div>
  6205. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  6206. ? xuanzeinfoprogress
  6207. : 0
  6208. " style="width: 80%"></el-progress> -->
  6209. </div>
  6210. </div>
  6211. </div>
  6212. <div style="
  6213. font-size: 16px;
  6214. color: #c7c7c7;
  6215. display: flex;
  6216. align-items: center;
  6217. justify-content: flex-end;
  6218. ">
  6219. <!-- 请输入题目内容 -->
  6220. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  6221. 智能生成
  6222. </button>
  6223. <!-- 请输入题目内容 -->
  6224. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  6225. v-if="isPasteChoice">
  6226. 智能粘贴
  6227. </button>
  6228. </div>
  6229. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  6230. <div class="a_add_checkType">
  6231. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  6232. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  6233. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  6234. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  6235. </div>
  6236. <div class="a_add_head">
  6237. <div class="timuUpImg">
  6238. <div style="display: flex; align-items: center">
  6239. <span style="min-width: fit-content">{{
  6240. index1 + 1 + "、"
  6241. }}</span>
  6242. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  6243. placeholder="请输入题目">
  6244. </el-input> -->
  6245. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6246. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  6247. $forceUpdate();
  6248. }
  6249. "></textarea>
  6250. </div>
  6251. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  6252. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  6253. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  6254. </div>
  6255. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  6256. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6257. <input type="file" accept="image/*" style="display: none"
  6258. @change="beforeUploadTiMu($event, index1)" />
  6259. </div>
  6260. </div>
  6261. <div class="a_add_head_div">
  6262. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  6263. </el-button>
  6264. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  6265. </div>
  6266. </div>
  6267. <div class="timuImgBox" v-if="
  6268. testJson.testJson[index1].timuList &&
  6269. testJson.testJson[index1].timuList.length
  6270. ">
  6271. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  6272. @click.stop="previewImg(timg.src)">
  6273. <img :src="timg.src" alt="" />
  6274. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  6275. <img src="../../../assets/icon/delete.png" alt="" />
  6276. </div>
  6277. </div>
  6278. </div>
  6279. <div class="a_add_body">
  6280. <div class="a_add_input a_add_input_choice">
  6281. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  6282. @change="() => {
  6283. $forceUpdate();
  6284. }
  6285. ">
  6286. <div class="radioBox">
  6287. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  6288. .testItem" :key="checkIndex" :label="checkIndex">
  6289. <div style="margin-right: 10px">
  6290. 选项{{ checkIndex + 1 }}
  6291. </div>
  6292. <div style="margin-right: 10px; width: 300px" v-if="
  6293. testJson.testJson[index1].checkList[checkIndex] &&
  6294. testJson.testJson[index1].checkList[checkIndex]
  6295. .imgType &&
  6296. testJson.testJson[index1].checkList[checkIndex]
  6297. .imgType == 1
  6298. ">
  6299. <div class="inImg" @click.stop="
  6300. previewImg(
  6301. testJson.testJson[index1].checkList[checkIndex]
  6302. .src
  6303. )
  6304. ">
  6305. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  6306. .src
  6307. " lazy />
  6308. <!-- <img :src="
  6309. testJson.testJson[index1].checkList[checkIndex]
  6310. .src
  6311. " alt="" /> -->
  6312. </div>
  6313. </div>
  6314. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  6315. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6316. $forceUpdate();
  6317. }
  6318. "></textarea>
  6319. <div class="xzUpImg" @click.stop="addImg($event)">
  6320. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6321. <input type="file" accept="image/*" style="display: none"
  6322. @change="beforeUploadTi($event, index1, checkIndex)" />
  6323. </div>
  6324. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6325. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  6326. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  6327. </div>
  6328. <div class="a_add_body_div">
  6329. <el-button type="primary" size="small" @click.stop="
  6330. addTcheckList(testJson.testJson[index1], checkIndex)
  6331. ">添加</el-button>
  6332. <el-button type="primary" size="small" @click.stop="
  6333. deleteTcheckList(
  6334. testJson.testJson[index1],
  6335. checkIndex
  6336. )
  6337. " v-if="testJson.testJson[index1].testItem != 1">删除
  6338. </el-button>
  6339. </div>
  6340. </el-radio>
  6341. </div>
  6342. </el-radio-group>
  6343. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6344. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6345. $forceUpdate();
  6346. }
  6347. ">
  6348. <div class="radioBox">
  6349. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6350. .testItem" :key="checkIndex1" :label="checkIndex1">
  6351. <div style="margin-right: 10px">
  6352. 选项{{ checkIndex1 + 1 }}
  6353. </div>
  6354. <div style="margin-right: 10px; width: 300px" v-if="
  6355. testJson.testJson[index1].checkList[checkIndex1] &&
  6356. testJson.testJson[index1].checkList[checkIndex1]
  6357. .imgType &&
  6358. testJson.testJson[index1].checkList[checkIndex1]
  6359. .imgType == 1
  6360. ">
  6361. <div class="inImg" @click.stop="
  6362. previewImg(
  6363. testJson.testJson[index1].checkList[checkIndex1]
  6364. .src
  6365. )
  6366. ">
  6367. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6368. .src
  6369. " lazy />
  6370. <!-- <img :src="
  6371. testJson.testJson[index1].checkList[checkIndex1]
  6372. .src
  6373. " alt="" /> -->
  6374. </div>
  6375. </div>
  6376. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6377. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6378. $forceUpdate();
  6379. }
  6380. "></textarea>
  6381. <div class="xzUpImg" @click.stop="addImg($event)">
  6382. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6383. <input type="file" accept="image/*" style="display: none"
  6384. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6385. </div>
  6386. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6387. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6388. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6389. </div>
  6390. <div class="a_add_body_div">
  6391. <el-button type="primary" size="small" @click.stop="
  6392. addTcheckList(
  6393. testJson.testJson[index1],
  6394. checkIndex1
  6395. )
  6396. ">添加</el-button>
  6397. <el-button type="primary" size="small" @click.stop="
  6398. deleteTcheckList(
  6399. testJson.testJson[index1],
  6400. checkIndex1
  6401. )
  6402. " v-if="testJson.testJson[index1].testItem != 1">删除
  6403. </el-button>
  6404. </div>
  6405. </el-checkbox>
  6406. </div>
  6407. </el-checkbox-group>
  6408. </div>
  6409. <!-- <div class="a_add_body_div">
  6410. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6411. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6412. v-if="testJson.testJson[index1].testItem != 1">删除
  6413. </el-button>
  6414. </div> -->
  6415. </div>
  6416. </div>
  6417. </div>
  6418. </div>
  6419. <span slot="footer" class="dialog-footer">
  6420. <el-button @click="closePan(45)">取 消</el-button>
  6421. <el-button type="primary" @click="addTest">确 定</el-button>
  6422. </span>
  6423. </el-dialog>
  6424. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6425. :before-close="handleClose" class="dialog_diy addToolsDia">
  6426. <div class="toolChoose">
  6427. <div class="tools">
  6428. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6429. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6430. <div style="
  6431. display: flex;
  6432. flex-direction: row;
  6433. align-items: baseline;
  6434. flex-wrap: nowrap;
  6435. justify-content: flex-start;
  6436. position: relative;
  6437. ">
  6438. <div class="chooseWho">
  6439. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6440. 互动类
  6441. </div>
  6442. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6443. 思维类
  6444. </div>
  6445. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6446. 评价类
  6447. </div>
  6448. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6449. 其他
  6450. </div>
  6451. </div>
  6452. </div>
  6453. <div style="min-height: 163px">
  6454. <div class="toolSort" v-if="chapToolsType == 0">
  6455. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6456. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6457. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6458. <div style="margin: 5px 0">素材库</div>
  6459. </div>
  6460. <div class="noCTool">
  6461. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6462. </div>
  6463. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6464. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6465. </div>
  6466. <!-- <div class="check" @click="chapAddTools(8)">
  6467. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6468. <div class="checkDiv" v-else>
  6469. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6470. </div>
  6471. </div> -->
  6472. </div>
  6473. </div>
  6474. <div class="toolSort" v-if="chapToolsType == 1">
  6475. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6476. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6477. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6478. <div style="margin: 5px 0">思维网格</div>
  6479. </div>
  6480. <div class="noCTool">
  6481. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6482. </div>
  6483. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6484. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6485. </div>
  6486. <!-- <div class="check" @click="chapAddTools(7)">
  6487. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6488. <div class="checkDiv" v-else>
  6489. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6490. </div>
  6491. </div> -->
  6492. </div>
  6493. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6494. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6495. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6496. <div style="margin: 5px 0">电子白板</div>
  6497. </div>
  6498. <div class="noCTool">
  6499. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6500. </div>
  6501. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6502. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6503. </div>
  6504. <!-- <div class="check" @click="chapAddTools(1)">
  6505. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6506. <div class="checkDiv" v-else>
  6507. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6508. </div>
  6509. </div> -->
  6510. </div>
  6511. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6512. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6513. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6514. <div style="margin: 5px 0">便签</div>
  6515. </div>
  6516. <div class="noCTool">
  6517. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6518. </div>
  6519. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6520. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6521. </div>
  6522. <!-- <div class="check" @click="chapAddTools(2)">
  6523. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6524. <div class="checkDiv" v-else>
  6525. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6526. </div>
  6527. </div> -->
  6528. </div>
  6529. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6530. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6531. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6532. <div style="margin: 5px 0">协同文档</div>
  6533. </div>
  6534. <div class="noCTool">
  6535. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6536. </div>
  6537. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6538. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6539. </div>
  6540. <!-- <div class="check" @click="chapAddTools(6)">
  6541. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6542. <div class="checkDiv" v-else>
  6543. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6544. </div>
  6545. </div> -->
  6546. </div>
  6547. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6548. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6549. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6550. <div style="margin: 5px 0">思维导图</div>
  6551. </div>
  6552. <div class="noCTool">
  6553. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6554. </div>
  6555. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6556. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6557. </div>
  6558. <!-- <div class="check" @click="chapAddTools(3)">
  6559. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6560. <div class="checkDiv" v-else>
  6561. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6562. </div>
  6563. </div> -->
  6564. </div>
  6565. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6566. @click="chapAddTools(31)">
  6567. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6568. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6569. <div style="margin: 5px 0">数学画板</div>
  6570. </div>
  6571. <div class="noCTool">
  6572. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6573. </div>
  6574. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6575. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6576. </div>
  6577. <!-- <div class="check" @click="chapAddTools(31)">
  6578. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6579. <div class="checkDiv" v-else>
  6580. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6581. </div>
  6582. </div> -->
  6583. </div>
  6584. </div>
  6585. <div class="toolSort" v-if="chapToolsType == 2">
  6586. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6587. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6588. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6589. <div style="margin: 5px 0">量规评分</div>
  6590. </div>
  6591. <div class="noCTool">
  6592. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6593. </div>
  6594. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6595. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6596. </div>
  6597. <!-- <div class="check" @click="chapAddTools(5)">
  6598. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6599. <div class="checkDiv" v-else>
  6600. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6601. </div>
  6602. </div> -->
  6603. </div>
  6604. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6605. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6606. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6607. <div style="margin: 5px 0">问卷调查</div>
  6608. </div>
  6609. <div class="noCTool">
  6610. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6611. </div>
  6612. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6613. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6614. </div>
  6615. <!-- <div class="check" @click="chapAddTools(4)">
  6616. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6617. <div class="checkDiv" v-else>
  6618. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6619. </div>
  6620. </div> -->
  6621. </div>
  6622. </div>
  6623. </div>
  6624. <div>
  6625. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6626. v-model="itemTools.toolDetail" />
  6627. </div>
  6628. </div>
  6629. </div>
  6630. </div>
  6631. <span slot="footer" class="dialog-footer">
  6632. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6633. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6634. </span>
  6635. </el-dialog>
  6636. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6637. closePan(15);
  6638. }
  6639. " class="dialog_diy">
  6640. <div>
  6641. <div class="a_add_title" style="
  6642. display: flex;
  6643. flex-direction: column;
  6644. align-items: flex-start;
  6645. justify-content: center;
  6646. ">
  6647. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6648. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6649. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6650. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6651. </div>
  6652. </div>
  6653. <span slot="footer" class="dialog-footer">
  6654. <el-button @click="closePan(15)">取 消</el-button>
  6655. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6656. </span>
  6657. </el-dialog>
  6658. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6659. :before-close="handleClose" class="dialog_diy">
  6660. <div>
  6661. <div class="a_add_title" style="
  6662. display: flex;
  6663. flex-direction: column;
  6664. align-items: flex-start;
  6665. justify-content: center;
  6666. ">
  6667. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6668. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6669. </div>
  6670. </div>
  6671. <span slot="footer" class="dialog-footer">
  6672. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6673. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6674. </span>
  6675. </el-dialog>
  6676. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6677. :before-close="handleClose" class="dialog_diy">
  6678. <div>
  6679. <div class="fileCss" style="padding-top: 20px">
  6680. <div>
  6681. <button class="info_btn" @click="addImg($event)">
  6682. 选择本地文件
  6683. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6684. </button>
  6685. <div class="spanName">选择本地文件</div>
  6686. </div>
  6687. <!-- <div>
  6688. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6689. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6690. <img :src="cover[0].url" alt="" />
  6691. <div class="deletePic" @click="deleteSysPic">
  6692. <img src="../../../assets/icon/delete.png" alt="" />
  6693. </div>
  6694. </div>
  6695. <div class="spanName">选择系统文件</div>
  6696. </div> -->
  6697. <div>
  6698. <el-button @click="(searchImageValue = courseName), resetImage()"
  6699. v-if="isSysPic2 == false">选择网络文件</el-button>
  6700. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6701. <img :src="cover[0].url" alt="" />
  6702. <div class="deletePic" @click="deleteSysPic">
  6703. <img src="../../../assets/icon/delete.png" alt="" />
  6704. </div>
  6705. </div>
  6706. <div class="spanName">选择网络文件</div>
  6707. </div>
  6708. </div>
  6709. <!-- <div class="fileCss">
  6710. </div> -->
  6711. </div>
  6712. <span slot="footer" class="dialog-footer">
  6713. <el-button @click="choosePicVisible = false">取 消</el-button>
  6714. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6715. </span>
  6716. </el-dialog>
  6717. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6718. :before-close="handleClose" class="dialog_diy">
  6719. <div class="cru_selectBox" style="margin: 0">
  6720. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6721. 绘画
  6722. </div>
  6723. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6724. 科技
  6725. </div>
  6726. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6727. 人文
  6728. </div>
  6729. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6730. 艺术
  6731. </div>
  6732. </div>
  6733. <div class="sysPicBox">
  6734. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6735. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6736. </div>
  6737. </div>
  6738. </el-dialog>
  6739. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6740. :before-close="handleClose" class="dialog_diy">
  6741. <div>
  6742. <div class="people_top_right" style="display: flex; align-items: center">
  6743. <div style="position: relative; width: 100%">
  6744. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6745. @keyup.enter.native="resetImage()"></el-input>
  6746. <div class="search_img" @click="resetImage" style="right: 10px">
  6747. <img src="../../../assets/icon/search.png" alt />
  6748. </div>
  6749. </div>
  6750. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6751. </div>
  6752. <div class="sysPicBox" v-loading="imageloading">
  6753. <div class="picNone" v-if="!imageList.length">
  6754. 请输入关键词搜索图片
  6755. </div>
  6756. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6757. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6758. </div>
  6759. </div>
  6760. </div>
  6761. </el-dialog>
  6762. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6763. closePan(41);
  6764. }
  6765. " class="dialog_diy dialog_diy3 fullStyle">
  6766. <div v-if="selectJson" style="height: 100%">
  6767. <div class="select_box1" v-if="selectSteps == 1">
  6768. <div class="select_box1_img">
  6769. <div class="select_box1_title">
  6770. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6771. </div>
  6772. <div class="select_box1_add_img">
  6773. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6774. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6775. <img src="../../../assets/icon/addPoster.png" alt="" />
  6776. </div>
  6777. <div class="isSysPic" v-else>
  6778. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6779. <div class="deletePic" @click="deleteSelectPic">
  6780. <img src="../../../assets/icon/delete.png" alt="" />
  6781. </div>
  6782. </div>
  6783. </div>
  6784. </div>
  6785. <div class="select_box1_select">
  6786. <div class="select_box1_title">
  6787. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  6788. </div>
  6789. <div class="select_box1_select_box">
  6790. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  6791. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  6792. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  6793. <div class="select_box1_select_box_add">
  6794. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  6795. 添加</el-button>
  6796. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  6797. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  6798. </div>
  6799. </div>
  6800. </div>
  6801. </div>
  6802. <div v-if="selectSteps == 2" style="height: 100%">
  6803. <div class="select_box2">
  6804. <div class="select_box2_title">设置每道题目的正确选项</div>
  6805. <div class="select_box2_box">
  6806. <div class="select_box2_img">
  6807. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6808. </div>
  6809. <div class="select_box2_answer">
  6810. <div class="select_answer_title">根据题目选择对应答案</div>
  6811. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  6812. <span>{{ checkIndex + 1 }}、</span>
  6813. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  6814. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  6815. </el-option>
  6816. </el-select>
  6817. </div>
  6818. </div>
  6819. </div>
  6820. </div>
  6821. </div>
  6822. </div>
  6823. <span slot="footer" class="dialog-footer">
  6824. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  6825. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  6826. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  6827. </span>
  6828. </el-dialog>
  6829. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  6830. :before-close="handleClose" class="dialog_diy">
  6831. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  6832. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  6833. <div class="pjCss" style="width: 100%">
  6834. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  6835. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  6836. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  6837. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  6838. <div class="remove" @click="deletRateList(eIndex)"></div>
  6839. <div style="width: 100%; display: flex">
  6840. <span style="min-width: 100px; text-align: right">评星等级:</span>
  6841. <el-rate v-model="eItem.score" disabled></el-rate>
  6842. </div>
  6843. <div class="elist_inptu_text" style="align-items: flex-start">
  6844. <span style="min-width: 100px; text-align: right">描述:</span>
  6845. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  6846. </div>
  6847. </div>
  6848. </div>
  6849. <div class="addToolFun" @click="addRateList()">
  6850. <div class="addToolImg">
  6851. <img src="../../../assets/icon/add.png" alt />
  6852. </div>
  6853. <div>添加</div>
  6854. </div>
  6855. </div>
  6856. </div>
  6857. <span slot="footer" class="dialog-footer">
  6858. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  6859. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  6860. </span>
  6861. </el-dialog>
  6862. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  6863. closePan(47);
  6864. }
  6865. " class="dialog_diy dialog_diy3 fullStyle">
  6866. <div style="height: 100%">
  6867. <div class="sentenBox" style="height: 100%">
  6868. <div class="addSen" @click="addSt">添加题目</div>
  6869. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6870. <div class="sentenTopBox">
  6871. <div class="sentenTop" :index="stIndex + 1">
  6872. <div>题目设置</div>
  6873. <div>
  6874. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6875. </div>
  6876. <div @click="addSen(stIndex)">添加</div>
  6877. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6878. </div>
  6879. </div>
  6880. <div class="cardList">
  6881. <div v-if="st.addSentence.length > 0" class="cardBox">
  6882. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6883. @click="setRightAnswer(s, stIndex, sIndex)">
  6884. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6885. <div>{{ s }}</div>
  6886. </el-tooltip>
  6887. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6888. <img src="../../../assets/icon/delete.png" alt="" />
  6889. </div>
  6890. </div>
  6891. </div>
  6892. <div class="card">
  6893. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6894. </div>
  6895. </div>
  6896. <div class="rightCardBox">
  6897. <div>正确顺序</div>
  6898. <div class="rightCardList">
  6899. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6900. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6901. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6902. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6903. <div>{{ r }}</div>
  6904. </el-tooltip>
  6905. </div>
  6906. <div>{{ rIndex + 1 }}</div>
  6907. </div>
  6908. </div>
  6909. <div class="card" v-if="st.rightAnswer.length == 0">
  6910. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6911. </div>
  6912. <div class="card" v-else>
  6913. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6914. </div>
  6915. </div>
  6916. </div>
  6917. </div>
  6918. </div>
  6919. </div>
  6920. <span slot="footer" class="dialog-footer">
  6921. <el-button @click="closePan(47)">取 消</el-button>
  6922. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6923. </span>
  6924. </el-dialog>
  6925. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6926. :before-close="handleClose" class="dialog_diy">
  6927. <el-form>
  6928. <!-- <el-form-item label="文本标题">
  6929. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6930. </el-form-item> -->
  6931. <div>表格内容</div>
  6932. <Table v-model="tableJson.text" @change="change"></Table>
  6933. </el-form>
  6934. <span slot="footer" class="dialog-footer">
  6935. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6936. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6937. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6938. </span>
  6939. </el-dialog>
  6940. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6941. :before-close="handleClose" class="dialog_diy">
  6942. <el-form>
  6943. <!-- <el-form-item label="文本标题">
  6944. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6945. </el-form-item> -->
  6946. <div>文档内容</div>
  6947. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6948. </el-form>
  6949. <span slot="footer" class="dialog-footer">
  6950. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6951. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6952. </span>
  6953. </el-dialog>
  6954. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6955. :before-close="handleClose" class="dialog_diy">
  6956. <div style="
  6957. width: 100%;
  6958. display: flex;
  6959. flex-direction: row;
  6960. flex-wrap: nowrap;
  6961. align-items: center;
  6962. justify-content: center;
  6963. ">
  6964. <div>班级:</div>
  6965. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6966. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6967. </el-option>
  6968. </el-select>
  6969. </div>
  6970. <span slot="footer" class="dialog-footer">
  6971. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6972. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6973. </span>
  6974. </el-dialog>
  6975. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6976. :before-close="handleClose" class="dialog_diy">
  6977. <div style="
  6978. width: 100%;
  6979. display: flex;
  6980. flex-direction: row;
  6981. flex-wrap: nowrap;
  6982. align-items: center;
  6983. justify-content: center;
  6984. ">
  6985. <div>随机码:</div>
  6986. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6987. </div>
  6988. <span slot="footer" class="dialog-footer">
  6989. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6990. <el-button type="primary" @click="addInvite">确定</el-button>
  6991. </span>
  6992. </el-dialog>
  6993. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6994. :before-close="handleClose" class="dialog_diy">
  6995. <div>
  6996. <div style="margin-bottom: 20px; color: #999">
  6997. 提示:点击“+”或“-”修改倒计时时长。
  6998. </div>
  6999. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  7000. </div>
  7001. <span slot="footer" class="dialog-footer">
  7002. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  7003. <el-button type="primary" @click="addPreTime">确定</el-button>
  7004. </span>
  7005. </el-dialog>
  7006. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  7007. :before-close="handleClose" class="dialog_diy">
  7008. <div>
  7009. <div style="
  7010. width: 100%;
  7011. display: flex;
  7012. flex-direction: row;
  7013. flex-wrap: nowrap;
  7014. align-content: center;
  7015. align-items: center;
  7016. justify-content: space-between;
  7017. ">
  7018. <div style="
  7019. display: flex;
  7020. flex-flow: row nowrap;
  7021. align-items: flex-start;
  7022. width: 100%;
  7023. flex-direction: column;
  7024. flex-wrap: nowrap;
  7025. position: relative;
  7026. ">
  7027. <div class="e_box">
  7028. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  7029. <div class="e_card_picture">
  7030. <img src="../../../assets/e_picture.png" />
  7031. </div>
  7032. <div class="e_card_name">
  7033. <span>{{ item.title }}</span>
  7034. </div>
  7035. <div class="e_card_btn">
  7036. <span @click="checkEva(item.id, 2)">导入</span>
  7037. </div>
  7038. </div> -->
  7039. <!-- <div class="addEva" @click="openT">
  7040. <img src="../../../assets/icon/addEva.png" alt="" />
  7041. </div> -->
  7042. <div style="
  7043. display: flex;
  7044. justify-content: flex-end;
  7045. margin-bottom: 10px;
  7046. ">
  7047. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  7048. </div>
  7049. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  7050. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  7051. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  7052. </el-table-column>
  7053. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  7054. </el-table-column>
  7055. <el-table-column label="操作" width="250px">
  7056. <template slot-scope="scope">
  7057. <div class="btnBox">
  7058. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  7059. </div>
  7060. </template>
  7061. </el-table-column>
  7062. </el-table>
  7063. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  7064. 暂无数据
  7065. </div>
  7066. </div>
  7067. </div>
  7068. </div>
  7069. </div>
  7070. <span slot="footer" class="dialog-footer">
  7071. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  7072. </span>
  7073. </el-dialog>
  7074. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  7075. :before-close="handleClose" class="dialog_diy">
  7076. <div class="groupBox">
  7077. <div v-if="groupJson.group" class="groupContent">
  7078. <div class="groupTitle">请设置小组数量及名称</div>
  7079. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  7080. <span class="groupn">第{{ index + 1 }}组名称:</span>
  7081. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  7082. <div class="groupBtn">
  7083. <el-button type="primary" size="small" @click="addGroup(index)"
  7084. v-if="groupJson.group.length - 1 == index">
  7085. 添加</el-button>
  7086. <el-button type="primary" size="small" @click="deleteGroup(index)"
  7087. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  7088. </div>
  7089. </div>
  7090. </div>
  7091. <div class="groupContent">
  7092. <div class="groupTitle">请设置每组人数</div>
  7093. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  7094. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  7095. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  7096. @change="numberPan"></el-input>
  7097. </div>
  7098. </div>
  7099. <span slot="footer" class="dialog-footer">
  7100. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  7101. <el-button type="primary" @click="addGroupJson">确定</el-button>
  7102. </span>
  7103. </el-dialog>
  7104. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  7105. :before-close="handleClose" class="dialog_diy">
  7106. <div style="
  7107. width: 100%;
  7108. display: flex;
  7109. flex-direction: row;
  7110. flex-wrap: nowrap;
  7111. align-items: center;
  7112. justify-content: center;
  7113. ">
  7114. <div style="min-width: fit-content">文件名称:</div>
  7115. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  7116. </div>
  7117. <span slot="footer" class="dialog-footer">
  7118. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  7119. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  7120. </span>
  7121. </el-dialog>
  7122. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  7123. closePan(69);
  7124. }
  7125. " class="dialog_diy fullStyle fullStyle1">
  7126. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  7127. <span slot="footer" class="dialog-footer">
  7128. <el-button @click="englishDialogVisible = false">取 消</el-button>
  7129. <el-button type="primary" @click="addEnglish">确 定</el-button>
  7130. </span>
  7131. </el-dialog>
  7132. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  7133. :before-close="handleClose" class="dialog_diy">
  7134. <div class="template_box">
  7135. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  7136. :class="{ wordTeacherA: ctJson.id == aa.id }">
  7137. <div class="wordPic">
  7138. <img src="../../../assets/icon/new/course_template.png" alt />
  7139. </div>
  7140. <el-tooltip effect="dark" :content="aa.title" placement="top">
  7141. <div style="
  7142. margin-top: 10px;
  7143. line-height: 19px;
  7144. overflow: hidden;
  7145. text-overflow: ellipsis;
  7146. white-space: nowrap;
  7147. padding: 0 10px;
  7148. box-sizing: border-box;
  7149. width: 100%;
  7150. ">
  7151. {{ aa.title }}
  7152. </div>
  7153. </el-tooltip>
  7154. </div>
  7155. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  7156. :class="{ wordTeacherA: ctJson.id == 1 }">
  7157. <div class="wordPic">
  7158. <img src="../../../assets/icon/new/course_template.png" alt />
  7159. </div>
  7160. <div style="
  7161. margin-top: 10px;
  7162. line-height: 19px;
  7163. overflow: hidden;
  7164. text-overflow: ellipsis;
  7165. white-space: nowrap;
  7166. padding: 0 20px;
  7167. ">
  7168. 简易模板
  7169. </div>
  7170. </div>
  7171. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  7172. :class="{ wordTeacherA: ctJson.id == 2 }">
  7173. <div class="wordPic">
  7174. <img src="../../../assets/icon/new/course_template.png" alt />
  7175. </div>
  7176. <div style="
  7177. margin-top: 10px;
  7178. line-height: 19px;
  7179. overflow: hidden;
  7180. text-overflow: ellipsis;
  7181. white-space: nowrap;
  7182. padding: 0 20px;
  7183. ">
  7184. 智能粘贴模式
  7185. </div>
  7186. </div>
  7187. </div>
  7188. <span slot="footer" class="dialog-footer">
  7189. <el-button @click="templateDialog = false">取 消</el-button>
  7190. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  7191. </span>
  7192. </el-dialog>
  7193. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  7194. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  7195. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  7196. <div class="change_stageBox">
  7197. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  7198. <div class="nt_taskBox">
  7199. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  7200. <div class="nt_taskName">
  7201. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7202. <span>{{ t.dyName }}</span>
  7203. </el-tooltip>
  7204. </div>
  7205. </div>
  7206. <div class="moveBtn" v-if="unitJson3.length > 1">
  7207. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7208. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7209. </div>
  7210. </div>
  7211. </div>
  7212. <span slot="footer" class="dialog-footer">
  7213. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  7214. <el-button type="primary" @click="updateChange">确定</el-button>
  7215. </span>
  7216. </el-dialog>
  7217. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7218. :before-close="handleClose" class="dialog_diy">
  7219. <div class="addTypeChoose" style="justify-content: center">
  7220. <div style="min-width: 100px">模板名称:</div>
  7221. <el-input v-model="templateName" style="width: 200px"></el-input>
  7222. </div>
  7223. <div class="addTypeBox">
  7224. <div class="addTypeChoose">
  7225. <div style="min-width: 100px">选择一级分类:</div>
  7226. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  7227. style="width: 200px">
  7228. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7229. </el-option>
  7230. </el-select>
  7231. </div>
  7232. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7233. <div style="min-width: 100px">选择二级分类:</div>
  7234. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  7235. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7236. </el-option>
  7237. </el-select>
  7238. </div>
  7239. </div>
  7240. <span slot="footer" class="dialog-footer">
  7241. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  7242. <el-button @click="close()">关 闭</el-button>
  7243. </span>
  7244. </el-dialog>
  7245. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7246. </evaBox>
  7247. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7248. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7249. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3" @aiConfirm="aiConfirm" :clickType="clickType">
  7250. </aiDialog>
  7251. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7252. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7253. <div class="pptBox" :class="{'ppClass': pptBoxDialog && panPptCount() > 0 && pptCount.length}">
  7254. <div class="box" v-show="pptBoxDialog">
  7255. <aiCreateDialog
  7256. v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson"
  7257. :key="index"
  7258. :languageSetting="languageSetting"
  7259. :dialogVisibleAiCreate="dialogVisibleAiCreate2.includes(index)"
  7260. :courseName="courseName"
  7261. @createAiPpt="createAiPpt"
  7262. @closeAiPpt="closeAiPpt"
  7263. :infoData="infoData"
  7264. :courseTypeId="courseTypeId"
  7265. :CourseTypeJson="CourseTypeJson"
  7266. :courseState="courseState"
  7267. :lineCount="index"
  7268. :unitJson="unitJson"
  7269. :ref="'ppt'+index"
  7270. v-show="dialogVisibleAiCreate2.includes(index) && pptCount.includes(index)"
  7271. ></aiCreateDialog>
  7272. </div>
  7273. <span v-show="panPptCount() > 0 && pptCount.length" class="r_pub_button_edit" :style="{marginTop: panPptCount() > 0 ? '10px' : '0'}" style="justify-content: flex-start;" @click="pptBoxDialog = !pptBoxDialog">{{ pptBoxDialog ? "收缩" : "展开" }}</span>
  7274. </div>
  7275. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  7276. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7277. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  7278. </div>
  7279. </template>
  7280. <script>
  7281. import "../../../common/aws-sdk-2.235.1.min.js";
  7282. import { tools as toolsData } from "../../../common/tools.js";
  7283. // import "../../../common/aws-sdk-2.99.0.min.js";
  7284. import $ from "jquery";
  7285. import EditorBar from "../../../components/tools/wangEnduit";
  7286. import Table from "../../../components/tools/table";
  7287. import Mind from "../../tools/jsmind2";
  7288. import Time from "../../tools/time.vue";
  7289. import Sunburst from "../../tools/sunburst";
  7290. import SeeBoard from "../../tools/seeBoard";
  7291. import weilaiData from "../components/weilai.js";
  7292. import sourceDialog from "../teacherSource/dialog.vue";
  7293. import interVideo from "../interVideo/index.vue";
  7294. import englishRight from "../components/englishRight.vue";
  7295. import evaBox from "../evaBox/index.vue";
  7296. import EnglishVoice from "../EnglishVoice/index.vue";
  7297. import aiBox from './aiBox.vue'
  7298. import aiBoxRight from './aiBoxRight.vue'
  7299. import aiBoxCourseDetail from './aiBoxCourseDetail.vue'
  7300. import recordV from './record.vue'
  7301. import aiDialog from './aiDialog'
  7302. import aiTips from './aiTips.vue'
  7303. import tipsDialog from './tipsDialog.vue'
  7304. import { v4 as uuidv4 } from "uuid";
  7305. import MarkdownIt from "markdown-it";
  7306. import aiCreateDialog from './aiCreateDialog.vue'
  7307. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7308. import wpdf from "../test/file/wPdf2.vue";
  7309. import wOffice from "../test/file/wOffice.vue";
  7310. import htmlDocx from "html-docx-js/dist/html-docx";
  7311. import TurndownService from 'turndown';
  7312. import JSZip from "jszip";
  7313. import evaList from "./evaList.vue";
  7314. import MindTask from "./jsmind2";
  7315. import ConvertApi from 'convertapi-js'
  7316. let convertApi = ConvertApi.auth('secret_U1EO5rhgMCnoBnBT')
  7317. var OpenCC = require("opencc-js");
  7318. let converter = OpenCC.Converter({
  7319. from:'hk',
  7320. to:'cn'
  7321. })
  7322. let converter2 = OpenCC.Converter({
  7323. from:'cn',
  7324. to:'hk'
  7325. })
  7326. const getFile = (url) => {
  7327. return new Promise((resolve, reject) => {
  7328. var credentials = {
  7329. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7330. secretAccessKey: "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",
  7331. }; //秘钥形式的登录上传
  7332. window.AWS.config.update(credentials);
  7333. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7334. let url2 = url;
  7335. let _url2 = "";
  7336. if (
  7337. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  7338. ) {
  7339. _url2 = url2.split(
  7340. "https://view.officeapps.live.com/op/view.aspx?src="
  7341. )[1];
  7342. } else {
  7343. _url2 = url2;
  7344. }
  7345. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  7346. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  7347. var params = {
  7348. Bucket: "ccrb",
  7349. Key: name
  7350. };
  7351. s3.getObject(params, function (err, data) {
  7352. if (err) {
  7353. console.log(err, err.stack)
  7354. resolve({ data: 1 });
  7355. }else {
  7356. resolve({ data: data.Body });
  7357. console.log(data);
  7358. } // sxuccessful response
  7359. });
  7360. });
  7361. };
  7362. export default {
  7363. components: {
  7364. EditorBar,
  7365. Mind,
  7366. Time,
  7367. Sunburst,
  7368. SeeBoard,
  7369. Table,
  7370. sourceDialog,
  7371. interVideo,
  7372. englishRight,
  7373. evaBox,
  7374. EnglishVoice,
  7375. aiBox,
  7376. aiBoxRight,
  7377. aiBoxCourseDetail,
  7378. aiDialog,
  7379. aiTips,
  7380. tipsDialog,
  7381. aiCreateDialog,
  7382. aiCreateVideoDialog,
  7383. wpdf,
  7384. wOffice,
  7385. evaList,
  7386. MindTask,
  7387. recordV
  7388. },
  7389. data() {
  7390. return {
  7391. checkAll: false,
  7392. checkAll2: false,
  7393. chooseType: 1,
  7394. checkedCities: [],
  7395. isIndeterminate: true,
  7396. isIndeterminate2: true,
  7397. isSysPic: false,
  7398. isSysPic2: false,
  7399. steps: 1,
  7400. stepsNav: 1,
  7401. nbOrder: 0,
  7402. courseId: "",
  7403. chapToolsType: 0,
  7404. chapTools: [
  7405. {
  7406. tools: [],
  7407. toolDetail: "",
  7408. },
  7409. ],
  7410. line: "",
  7411. lineTitle: "",
  7412. sysPic: [],
  7413. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7414. sentenceList2: [],
  7415. isPushTitleList: [],
  7416. lineCount: 0,
  7417. lineType: 0,
  7418. chapCount: 0,
  7419. courseName: "",
  7420. isTeacherSee: false,
  7421. courseText: "",
  7422. textLoading: false,
  7423. ttextLoading: false,
  7424. courseText2: "",
  7425. preTime: 0,
  7426. formLabelWidth: "100px",
  7427. choosePicVisible: false,
  7428. sysPicVisible: false,
  7429. sysPicVisible2: false,
  7430. uploadLoading1: false,
  7431. noneBtnImg: false,
  7432. updateBoolean2: false,
  7433. unitIndex: 0,
  7434. taskCount: 0,
  7435. dialogVisible: false,
  7436. dialogVisible1: false,
  7437. dialogVisible2: false,
  7438. dialogVisible3: false,
  7439. dialogVisible4: false,
  7440. dialogVisible5: false,
  7441. dialogVisible6: false,
  7442. dialogVisible7: false,
  7443. dialogVisible8: false,
  7444. dialogVisible9: false,
  7445. dialogVisibleClass: false,
  7446. dialogVisibleMember: false,
  7447. dialogVisibleMp3: false,
  7448. dialogVisibleSelect: false,
  7449. dialogVisibleSentence: false,
  7450. dialogVisibleRate: false,
  7451. dialogVisibleChoice: false,
  7452. dialogVisiblemb: false,
  7453. dialogVisibleInvite: false,
  7454. dialogVisibleSource: false,
  7455. dialogVisibleVideo: false,
  7456. dialogVisibleStageChange: false,
  7457. dialogVisibleupdataVideoT: false,
  7458. englishDialogVisible: false,
  7459. templateDialog: false,
  7460. ctJson: {},
  7461. isClickColor: 1,
  7462. toolIndexType: "",
  7463. publicTool: 0,
  7464. searchPeople: "",
  7465. searchTN: "",
  7466. collid: '',
  7467. CollLoading: false,
  7468. userid: this.$route.query.userid,
  7469. oid: this.$route.query.oid,
  7470. org: this.$route.query.org,
  7471. role: this.$route.query.role,
  7472. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7473. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7474. dialogVisibleTable: false,
  7475. dialogVisibleWord: false,
  7476. tableJson: { text: "" },
  7477. wordJson: { text: "" },
  7478. dialogVisibleMoreUpload: false,
  7479. dialogVisiblePreTime: false,
  7480. uploadJson: [],
  7481. classJuri: [],
  7482. gradeList: [],
  7483. cover: [], //课程封面
  7484. myWord: [],
  7485. evaJuri: [],
  7486. evalua: "",
  7487. targetArray: [],
  7488. eTitle: "",
  7489. eJson: {},
  7490. fid: "", //一级
  7491. sid: "", //二级
  7492. tid: "", //二级
  7493. typeMode: 3,
  7494. eJSONNum: 0,
  7495. data: {
  7496. meta: {
  7497. name: "example",
  7498. author: "dd@163.com",
  7499. version: "0.2",
  7500. },
  7501. format: "node_array",
  7502. data: [{ id: "root", isroot: true, topic: "" }],
  7503. },
  7504. askJson: {
  7505. askCount: 1,
  7506. askTitle: "",
  7507. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7508. },
  7509. askJson2: {},
  7510. testJson: {},
  7511. testJson2: {},
  7512. selectJson: {},
  7513. selectJson2: {},
  7514. rateJson: [],
  7515. unitJson2: [],
  7516. unitJson3: [],
  7517. unitJson: [
  7518. {
  7519. dyName: "", //单元标题
  7520. chapterInfo: [
  7521. {
  7522. isread: false,
  7523. chapterid: this.guid(),
  7524. title: "",
  7525. courseName: "",
  7526. taskJson: [
  7527. {
  7528. task: "",
  7529. taskDetail: "",
  7530. chapterData: [],
  7531. toolText: "",
  7532. toolChoose: [
  7533. {
  7534. tool: [],
  7535. toolDetail: "",
  7536. toolType: 0,
  7537. askCount: 1,
  7538. askTitle: "",
  7539. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7540. },
  7541. ],
  7542. isShowTools: false,
  7543. askCount: 1,
  7544. isFold: 1,
  7545. askTitle: "",
  7546. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7547. checkJson: [{ checkCount: [], checkPerent: [] }],
  7548. homeworkList: [],
  7549. },
  7550. ],
  7551. itemCount: 1,
  7552. fileList1: [],
  7553. video: [],
  7554. testData: [],
  7555. pData: [],
  7556. templateArray: [],
  7557. },
  7558. ],
  7559. },
  7560. ],
  7561. templateArray: [],
  7562. studentJuri: [],
  7563. teacherJuri: [],
  7564. CollaborativeTeaList: [],
  7565. checkboxList: [],
  7566. checkboxList2: [],
  7567. checkboxList3: [],
  7568. classSearch: "",
  7569. gradeId: "",
  7570. number: "",
  7571. tTitle: "",
  7572. tdetail: "",
  7573. templateC: {},
  7574. AttText: {},
  7575. AttTextType: 0,
  7576. AttTextIndex: 0,
  7577. cTemplate: "",
  7578. CourseType: [],
  7579. CourseType1: [],
  7580. CourseType2: [],
  7581. CourseTypeJson: {},
  7582. CourseTypeJson1: {},
  7583. courseTypeId: [],
  7584. courseTypeId1: [],
  7585. courseTypeSon: [],
  7586. clearArray: [],
  7587. pTypeCheck: [],
  7588. pTypeCheckName: [],
  7589. loading: false,
  7590. toolType: 0,
  7591. inputShow: true,
  7592. inputShow2: true,
  7593. toolIndex: 0,
  7594. cidType: 0,
  7595. answerQ: "",
  7596. answerQ2: "",
  7597. grade: [],
  7598. grade2: [],
  7599. courseUserid: "",
  7600. timer: null,
  7601. timer2: null,
  7602. pasteTimer: null,
  7603. checkId: "",
  7604. isDelete: 1,
  7605. addindex: 0,
  7606. selectSteps: 1,
  7607. groupJson: {},
  7608. dialogVisibleGroup: false,
  7609. rightBoxHeight: 0,
  7610. ManAarray: [],
  7611. checkBoolean: false,
  7612. inviteCode: [],
  7613. inviteId: "",
  7614. icode: "",
  7615. easyArray: [2, 4],
  7616. sourceData: {},
  7617. updateSourcePan: false,
  7618. videoJson: {},
  7619. isBtnDisplay: false,
  7620. isStepDisplay: false,
  7621. isPasteStage: false,
  7622. isPasteTask: false,
  7623. isPasteChoice: false,
  7624. imageList: [],
  7625. imageloading: false,
  7626. imageloading2: false,
  7627. searchImageValue: "",
  7628. ppage: 1,
  7629. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7630. oldIndex: 0,
  7631. dragType: "",
  7632. oldUnitIndex: 0,
  7633. oldData: null,
  7634. newIndex: "",
  7635. englishList: {},
  7636. typeIndex: "",
  7637. courseState: 5,
  7638. taskJSONa: [
  7639. {
  7640. task: "",
  7641. taskDetail: "",
  7642. chapterData: [],
  7643. toolText: "",
  7644. toolChoose: [
  7645. {
  7646. tool: [],
  7647. toolDetail: "",
  7648. toolType: 0,
  7649. askCount: 1,
  7650. askTitle: "",
  7651. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7652. },
  7653. ],
  7654. isShowTools: false,
  7655. askCount: 1,
  7656. isFold: 1,
  7657. askTitle: "",
  7658. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7659. checkJson: [{ checkCount: [], checkPerent: [] }],
  7660. homeworkList: [],
  7661. },
  7662. ],
  7663. checkUnitIndex: 0,
  7664. isdrag: "",
  7665. evaIndex: "",
  7666. evatIndex: "",
  7667. evaBoxDialog: false,
  7668. EnglishVoiceDialog: false,
  7669. englishVoiceJson: {},
  7670. cetIndex: "",
  7671. cettIndex: "",
  7672. cetBoxDialog: false,
  7673. templateName: "",
  7674. setTypeJson: {
  7675. one: "",
  7676. two: "",
  7677. },
  7678. twoJson: [],
  7679. oneJson: [],
  7680. updateKey: 1,
  7681. isOutline: false,
  7682. isOutline2: false,
  7683. infoData: [],
  7684. infoproVisible: false,
  7685. infoisFinishSize: 0,
  7686. infoisAllSize: 0,
  7687. infoprogress: 0,
  7688. taskDetailLoading: [],
  7689. ttaskDetailLoading: [],
  7690. taskDetailLoading2: [],
  7691. ttaskDetailLoading2: [],
  7692. taskDetailLoading3: [],
  7693. ttaskDetailLoading3: [],
  7694. taskDetailLoading4: [],
  7695. taskDetailLoading5: [],
  7696. ttaskDetailLoading5: [],
  7697. dArray: [],
  7698. dialogVisibleAiD: false,
  7699. aitype: "",
  7700. aiJson: {
  7701. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7702. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7703. "aiTask": "请根据<教学任务教案>。",
  7704. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7705. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7706. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7707. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7708. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7709. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7710. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7711. },
  7712. aiText: "",
  7713. aiText2: "",
  7714. aiText3: "",
  7715. aiCallBack: "",
  7716. aiIndex: "",
  7717. clickType: 1,
  7718. promptShow: false,
  7719. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7720. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7721. dialogVisibleTips: false,
  7722. tipsJson: {},
  7723. cpote:{
  7724. cpote1: '',
  7725. cpote2: '',
  7726. cpote3: '',
  7727. cpote4: '',
  7728. },
  7729. cpoteLoading:{
  7730. cpote1: false,
  7731. cpote2: false,
  7732. cpote3: false,
  7733. cpote4: false,
  7734. },
  7735. cpotetLoading:{
  7736. cpote1: false,
  7737. cpote2: false,
  7738. cpote3: false,
  7739. cpote4: false,
  7740. },
  7741. cpoteType: 0,
  7742. dialogVisibleAiCreate: false,
  7743. dialogVisibleAiCreate2: [],
  7744. pptBoxDialog: true,
  7745. pptCount: [],
  7746. dialogVisibleAiCreateVideo: false,
  7747. teacherText: [],
  7748. isFileSearch: true,
  7749. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  7750. 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'],
  7751. courseJie:1,
  7752. courseTime:45,
  7753. allTextArray: [],
  7754. dialogVisiblePdf: false,
  7755. dialogVisibleOffice: false,
  7756. wurl: "",
  7757. choiceLoading: false,
  7758. teacherInfoData: [],
  7759. teacherinfoproVisible: false,
  7760. teacherinfoisFinishSize: 0,
  7761. teacherinfoisAllSize: 0,
  7762. teacherinfoprogress: 0,
  7763. teacherCourseText: "",
  7764. teacherTextLoading: false,
  7765. tteacherTextLoading: false,
  7766. targetCourseText: "",
  7767. targetTextLoading: false,
  7768. ttargetTextLoading: false,
  7769. cankaoInfoData: [],
  7770. fileSLoading: false,
  7771. infoData2: [],
  7772. isuseT: false,
  7773. mode: 1,
  7774. targetCourseText2: "",
  7775. targetTextLoading2: false,
  7776. ttargetTextLoading2: false,
  7777. courseTextBool: false,
  7778. teacherCourseTextB: true,
  7779. targetCourseTextB: true,
  7780. courseTextB: true,
  7781. targetCourseText2B: true,
  7782. // 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'],
  7783. yiKeTemplateArray:[],
  7784. taskLoading: [],
  7785. ruleLoading: [],
  7786. mubiaoInfoData: [],
  7787. mubiaoinfoproVisible: false,
  7788. mubiaoinfoisFinishSize: 0,
  7789. mubiaoinfoisAllSize: 0,
  7790. mubiaoinfoprogress: 0,
  7791. xuanzeInfoData: [],
  7792. xuanzeinfoproVisible: false,
  7793. xuanzeinfoisFinishSize: 0,
  7794. xuanzeinfoisAllSize: 0,
  7795. xuanzeinfoprogress: 0,
  7796. pingjiaInfoData: [],
  7797. pingjiainfoproVisible: [],
  7798. pingjiainfoisFinishSize: [],
  7799. pingjiainfoisAllSize: [],
  7800. pingjiainfoprogress: [],
  7801. taskGLoading: [],
  7802. isOutlineCancelToken: null,
  7803. isFileCancelToken: null,
  7804. isTargetCancelToken1: null,
  7805. isTargetCancelToken2: null,
  7806. isTextCancelToken: null,
  7807. isTeacherTextCancelToken: null,
  7808. isTeacherTaskCancelToken: null,
  7809. isOutlineTaskCancelToken: [],
  7810. isTeacherTaskCancelToken2: [],
  7811. isTeacherTaskCancelSource: [],
  7812. isTextCancelSource: null,
  7813. isOutlineTaskCancelSource: [],
  7814. isTeacherTextCancelSource: null,
  7815. isTargetCancelSource1: null,
  7816. isTargetCancelSource2: null,
  7817. fileidArray: [],
  7818. interPan: true,
  7819. interFlash: true,
  7820. agentid: "",
  7821. interSetting: false,
  7822. chatid: "",
  7823. languageSetting: 0, //0中文 1繁体 2英文
  7824. isQuote: {},
  7825. knowFileArray: [],
  7826. knowInfoData: [],
  7827. knowinfoproVisible: false,
  7828. knowinfoisFinishSize: 0,
  7829. knowinfoisAllSize: 0,
  7830. knowinfoprogress: 0,
  7831. knowFileids: [],
  7832. searchFileName: "",
  7833. knowInfoDataLoading: false,
  7834. isfindMatchingContents: null,
  7835. findMatchingContentsPage: 1,
  7836. findMatchingContentsFinish: false,
  7837. knowInfoData2: [],
  7838. knowinfoproVisible2: false,
  7839. knowinfoisFinishSize2: 0,
  7840. knowinfoisAllSize2: 0,
  7841. knowinfoprogress2: 0,
  7842. knowFileids2: [],
  7843. knowInfoData3: [],
  7844. knowFileids3: [],
  7845. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  7846. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41],
  7847. taskAnLoading: [],
  7848. taskAnCancelToken: [],
  7849. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  7850. taskCancelToken1: [],
  7851. taskCancelToken2: [],
  7852. isDisplay: true,
  7853. isDialog: 0,
  7854. recordVideoText: "",
  7855. recordAudioUrl: "",
  7856. r_agentid: "",
  7857. course_info: "",
  7858. stepShow: true,
  7859. anLoading: [],
  7860. };
  7861. },
  7862. directives: {
  7863. autoHeight: {
  7864. update(el, binding) {
  7865. const { value } = binding;
  7866. if (value && typeof value === "number") {
  7867. el.style.height = `${value}px`;
  7868. } else {
  7869. el.style.height = "auto";
  7870. }
  7871. },
  7872. componentUpdated(el) {
  7873. el.style.height = `${el.scrollHeight + 25}px`;
  7874. },
  7875. },
  7876. },
  7877. computed: {
  7878. // rightBoxHeight: function () {
  7879. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  7880. // },
  7881. offsetLetfPx: function () {
  7882. //addnum可以直接在模板语法里面用,相当于data内的值
  7883. return (
  7884. $(".cru_select")[this.unitIndex] &&
  7885. $(".cru_select")[this.unitIndex].offsetLeft + 5
  7886. );
  7887. },
  7888. getMan2() {
  7889. return function (people) {
  7890. let _people = people;
  7891. let _people2 = "";
  7892. if (this.ManAarray.length) {
  7893. for (var i = 0; i < this.ManAarray.length; i++) {
  7894. if (this.ManAarray[i].userid == people) {
  7895. _people2 = this.ManAarray[i].name;
  7896. break;
  7897. }
  7898. }
  7899. }
  7900. if (people == this.courseUserid) {
  7901. return "";
  7902. }
  7903. return this.ManAarray.length ? _people2 : "";
  7904. };
  7905. },
  7906. getListMan2() {
  7907. return function (list) {
  7908. let _people2 = [];
  7909. if (this.ManAarray.length) {
  7910. for (var j = 0; j < list.length; j++) {
  7911. let people = list[j];
  7912. for (var i = 0; i < this.ManAarray.length; i++) {
  7913. if (
  7914. this.ManAarray[i].userid == people &&
  7915. people != this.courseUserid
  7916. ) {
  7917. _people2.push(this.ManAarray[i].name);
  7918. break;
  7919. }
  7920. }
  7921. }
  7922. }
  7923. return this.ManAarray.length ? _people2.join("、") : "";
  7924. };
  7925. },
  7926. isInvite() {
  7927. return function (cid) {
  7928. let array = [];
  7929. for (var i = 0; i < this.inviteCode.length; i++) {
  7930. array.push(this.inviteCode[i].cid);
  7931. }
  7932. return array.indexOf(cid) != -1;
  7933. };
  7934. },
  7935. getInviteCodeC() {
  7936. return function (cid) {
  7937. let array = [];
  7938. for (var i = 0; i < this.inviteCode.length; i++) {
  7939. array.push(this.inviteCode[i].cid);
  7940. }
  7941. return this.inviteCode[array.indexOf(cid)].ic;
  7942. };
  7943. },
  7944. getClassC() {
  7945. return function (c) {
  7946. let _c2 = "";
  7947. if (this.grade.length) {
  7948. for (var i = 0; i < this.grade.length; i++) {
  7949. if (this.grade[i].id == c) {
  7950. _c2 = this.grade[i].name;
  7951. break;
  7952. }
  7953. }
  7954. }
  7955. return this.grade.length ? _c2 : "";
  7956. };
  7957. },
  7958. getListClassC() {
  7959. return function (list) {
  7960. let _c2 = [];
  7961. if (this.grade.length) {
  7962. for (var j = 0; j < list.length; j++) {
  7963. let c = list[j];
  7964. for (var i = 0; i < this.grade.length; i++) {
  7965. if (this.grade[i].id == c) {
  7966. _c2.push(this.grade[i].name);
  7967. break;
  7968. }
  7969. }
  7970. }
  7971. }
  7972. return this.grade.length ? _c2.join("、") : "";
  7973. };
  7974. },
  7975. MarkdownT() {
  7976. return function (c) {
  7977. let md = new MarkdownIt();
  7978. return c
  7979. ? md.render(c) : "";
  7980. };
  7981. },
  7982. panOutline(){
  7983. return function () {
  7984. let count = 0;
  7985. for(var i = 0; i < this.unitJson.length; i++){
  7986. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7987. for(var j = 0; j < _task.length; j++){
  7988. if(_task[j].taskDetail2){
  7989. count++
  7990. }
  7991. }
  7992. }
  7993. return count;
  7994. };
  7995. },
  7996. panTeacher(){
  7997. return function () {
  7998. let count = 0;
  7999. for(var i = 0; i < this.unitJson.length; i++){
  8000. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8001. for(var j = 0; j < _task.length; j++){
  8002. if(_task[j].taskDetail3){
  8003. count++
  8004. }
  8005. }
  8006. }
  8007. return count;
  8008. };
  8009. },
  8010. panTask(){
  8011. return function () {
  8012. let count = 0;
  8013. for(var i = 0; i < this.unitJson.length; i++){
  8014. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8015. for(var j = 0; j < _task.length; j++){
  8016. if(_task[j].taskDetail){
  8017. count++
  8018. }
  8019. }
  8020. }
  8021. return count;
  8022. };
  8023. },
  8024. panElist(){
  8025. return function (array) {
  8026. let count = 0;
  8027. for(var i = 0; i < array.toolChoose.length; i++){
  8028. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  8029. count++
  8030. }
  8031. }
  8032. return count;
  8033. };
  8034. },
  8035. panTaskElist(){
  8036. return function () {
  8037. let count = 0;
  8038. for(var i = 0; i < this.unitJson.length; i++){
  8039. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8040. for(var j = 0; j < _task.length; j++){
  8041. if(_task[j].eList && _task[j].eList.length){
  8042. count++
  8043. }
  8044. }
  8045. }
  8046. return count;
  8047. };
  8048. },
  8049. panEvaCont(){
  8050. return function () {
  8051. let count = 0;
  8052. for(var i = 0; i < this.unitJson.length; i++){
  8053. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8054. for(var j = 0; j < _task.length; j++){
  8055. let tool = _task[j].toolChoose
  8056. for(var k = 0; k < tool.length; k++){
  8057. if(tool[k].eList && tool[k].eList.length){
  8058. count++
  8059. }
  8060. }
  8061. }
  8062. }
  8063. return count;
  8064. };
  8065. },
  8066. dataCheckPan(){
  8067. return function (fileid) {
  8068. for(let i = 0; i < this.infoData.length; i++){
  8069. if(this.infoData[i].fileid == fileid){
  8070. return true
  8071. }
  8072. }
  8073. return false;
  8074. };
  8075. },
  8076. interUrl: function () {
  8077. let agentid = this.aiJson.agentid
  8078. let sagentid = this.aiJson.sagentid
  8079. let url = ''
  8080. if(sagentid){
  8081. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${sagentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8082. }else{
  8083. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8084. }
  8085. return url;
  8086. },
  8087. panPptCount(){
  8088. return function () {
  8089. let ppts = 0
  8090. for(var i = 0; i < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; i++){
  8091. let ppt = this.$refs['ppt'+i]
  8092. if(ppt && ppt[0].tanDialog){
  8093. ppts++
  8094. }
  8095. }
  8096. if(!this.pptCount.length){
  8097. this.pptBoxDialog = false
  8098. }
  8099. return ppts;
  8100. };
  8101. },
  8102. panDanTool(){
  8103. return function (array) {
  8104. let count = 0;
  8105. for(var i = 0; i < array.toolChoose.length; i++){
  8106. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8107. count++
  8108. }
  8109. }
  8110. return count;
  8111. };
  8112. },
  8113. panTool(){
  8114. return function () {
  8115. let count = 0;
  8116. for(var j = 0; j < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; j++){
  8117. let array = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[j]
  8118. for(var i = 0; i < array.toolChoose.length; i++){
  8119. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8120. count++
  8121. }
  8122. }
  8123. }
  8124. return count;
  8125. };
  8126. }
  8127. },
  8128. watch: {
  8129. unitIndex(newValue, oldValue) {
  8130. // return;
  8131. if (this.isDelete == 2) {
  8132. this.isDelete = 1;
  8133. return;
  8134. }
  8135. if (this.cid != "") {
  8136. let _unitIndex = oldValue;
  8137. if (
  8138. JSON.stringify(this.unitJson2[_unitIndex]) ==
  8139. JSON.stringify(this.unitJson[_unitIndex])
  8140. ) {
  8141. this.$refs.rightboxR.scrollTop = 0;
  8142. return;
  8143. }
  8144. let cPan = 1;
  8145. for (
  8146. var j = 0;
  8147. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8148. j++
  8149. ) {
  8150. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8151. j
  8152. ].proVisible = false;
  8153. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8154. j
  8155. ].proVisible2 = false;
  8156. if (
  8157. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8158. .length > 1
  8159. ) {
  8160. for (
  8161. var z = 0;
  8162. z <
  8163. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8164. .length;
  8165. z++
  8166. ) {
  8167. if (
  8168. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  8169. .toolChoose[z].tool.length
  8170. ) {
  8171. this.$message.error("请把工具添加完整");
  8172. cPan = 2;
  8173. break;
  8174. }
  8175. }
  8176. }
  8177. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8178. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8179. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8180. (ele) => {
  8181. return ele.value != "" || ele.detail != "" || ele.target != "";
  8182. }
  8183. );
  8184. }
  8185. }
  8186. if (cPan == 2) {
  8187. this.unitIndex = oldValue;
  8188. return;
  8189. }
  8190. for (var i = 0; i < this.unitJson.length; i++) {
  8191. if (this.addindex != i) {
  8192. delete this.unitJson[i].isUpdate;
  8193. }
  8194. }
  8195. this.$refs.rightboxR.scrollTop = 0;
  8196. this.addindex = -1;
  8197. let params = [
  8198. {
  8199. cid: this.cid,
  8200. chapters: JSON.stringify(this.unitJson),
  8201. uid: this.userid,
  8202. unitIndex: _unitIndex,
  8203. },
  8204. ];
  8205. this.ajax
  8206. .post(this.$store.state.api + "updateWorkNew4", params)
  8207. .then((res) => {
  8208. // this.$message({
  8209. // message: "修改成功",
  8210. // type: "success",
  8211. // });
  8212. // this.courseId = this.cid;
  8213. this.addtips()
  8214. })
  8215. .catch((err) => {
  8216. this.$message.error("网络不佳");
  8217. console.error(err);
  8218. });
  8219. }
  8220. },
  8221. steps(newValue, old) {
  8222. if(newValue == 2){
  8223. this.steps = old
  8224. }
  8225. if (newValue == 4) {
  8226. let cPan = 1;
  8227. for (var i = 0; i < this.unitJson.length; i++) {
  8228. for (
  8229. var j = 0;
  8230. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8231. j++
  8232. ) {
  8233. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8234. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8235. if (
  8236. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8237. ) {
  8238. for (
  8239. var z = 0;
  8240. z <
  8241. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8242. z++
  8243. ) {
  8244. if (
  8245. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  8246. .tool.length
  8247. ) {
  8248. this.$message.error("请把工具添加完整");
  8249. cPan = 2;
  8250. break;
  8251. }
  8252. }
  8253. }
  8254. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8255. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8256. i
  8257. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8258. return ele.value != "" || ele.detail != "" || ele.target != "";
  8259. });
  8260. }
  8261. }
  8262. }
  8263. this.inputShow = true;
  8264. if (cPan == 2) {
  8265. this.steps = old;
  8266. return;
  8267. }
  8268. this.goTo(
  8269. "/course?userid=" +
  8270. this.userid +
  8271. "&oid=" +
  8272. this.oid +
  8273. "&org=" +
  8274. this.org +
  8275. "&role=" +
  8276. this.role
  8277. );
  8278. }
  8279. },
  8280. courseName(newVal, oldVal) {
  8281. this.setCourseInfo();
  8282. },
  8283. courseTypeId: {
  8284. immediate: true,
  8285. deep: true,
  8286. handler(newValue, oldValue) {
  8287. this.setCourseInfo();
  8288. }
  8289. },
  8290. knowFileids(newVal, oldVal) {
  8291. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8292. },
  8293. knowFileids2(newVal, oldVal) {
  8294. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8295. },
  8296. },
  8297. methods: {
  8298. tableRowClassName({ row, rowIndex }) {
  8299. if ((rowIndex + 1) % 2 === 0) {
  8300. return "even_row";
  8301. } else {
  8302. return "";
  8303. }
  8304. },
  8305. close() {
  8306. this.cetIndex = "";
  8307. this.cettIndex = "";
  8308. this.templateName = "";
  8309. this.cetBoxDialog = false;
  8310. },
  8311. openAI() {
  8312. top.postMessage({ tools: "64" }, "*");
  8313. },
  8314. setMan() {
  8315. // let teacherJuri = this.teacherJuri2;
  8316. this.ManAarray = [];
  8317. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  8318. if (_user.indexOf(this.userid) == -1) {
  8319. _user.push(this.userid);
  8320. }
  8321. if (_user.indexOf(this.courseUserid) == -1) {
  8322. _user.push(this.courseUserid);
  8323. }
  8324. let params = [{
  8325. uid: _user.join(","),
  8326. }];
  8327. this.ajax
  8328. .post(this.$store.state.api + "getAllUserByIdP", params)
  8329. .then((res) => {
  8330. let teacherJuri = res.data[0];
  8331. this.ManAarray = teacherJuri;
  8332. })
  8333. .catch((err) => {
  8334. console.error(err);
  8335. });
  8336. },
  8337. previewImg(url) {
  8338. this.$hevueImgPreview(url);
  8339. },
  8340. btnDisplay(bool) {
  8341. this.isBtnDisplay = bool;
  8342. },
  8343. stepDisplay(bool) {
  8344. this.isStepDisplay = bool;
  8345. },
  8346. scrollChange() {
  8347. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8348. },
  8349. addHw(e) {
  8350. var el = e.currentTarget;
  8351. el.getElementsByTagName("input")[0].click();
  8352. },
  8353. change(val) {
  8354. if (this.dialogVisible1) {
  8355. this.tdetail = val;
  8356. } else if (this.dialogVisible6) {
  8357. this.AttText.text = val;
  8358. } else if (this.dialogVisible2) {
  8359. this.cTemplate = val;
  8360. } else if (this.dialogVisibleTable) {
  8361. this.tableJson.text = val;
  8362. }
  8363. this.$forceUpdate();
  8364. console.log(val);
  8365. },
  8366. change2(val) {
  8367. console.log(val);
  8368. this.$forceUpdate();
  8369. },
  8370. handleClose(done) {
  8371. done();
  8372. },
  8373. closePan(tool) {
  8374. if (tool == 15) {
  8375. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8376. this.dialogVisible8 = false;
  8377. } else {
  8378. this.closeConfirm(tool);
  8379. }
  8380. } else if (tool == 4) {
  8381. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8382. this.dialogVisible5 = false;
  8383. } else {
  8384. this.closeConfirm(tool);
  8385. }
  8386. } else if (tool == 45) {
  8387. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8388. this.dialogVisibleChoice = false;
  8389. } else {
  8390. this.closeConfirm(tool);
  8391. }
  8392. } else if (tool == 41) {
  8393. if (
  8394. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8395. ) {
  8396. this.dialogVisibleSelect = false;
  8397. } else {
  8398. this.closeConfirm(tool);
  8399. }
  8400. } else if (tool == 47) {
  8401. if (
  8402. JSON.stringify(this.sentenceList) ==
  8403. JSON.stringify(this.sentenceList2)
  8404. ) {
  8405. this.dialogVisibleSentence = false;
  8406. } else {
  8407. this.closeConfirm(tool);
  8408. }
  8409. } else if (tool == 69) {
  8410. if (
  8411. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8412. ) {
  8413. this.englishDialogVisible = false;
  8414. } else {
  8415. this.closeConfirm(tool);
  8416. }
  8417. }
  8418. },
  8419. closeConfirm(tool) {
  8420. this.$confirm("是否保存已编辑内容?", "提示", {
  8421. confirmButtonText: "保存",
  8422. cancelButtonText: "不保存",
  8423. type: "warning",
  8424. })
  8425. .then(() => {
  8426. if (tool == 15) {
  8427. this.addAnswer();
  8428. } else if (tool == 4) {
  8429. this.addAsk();
  8430. } else if (tool == 45) {
  8431. this.addTest();
  8432. } else if (tool == 41) {
  8433. this.addSelectAnswer();
  8434. } else if (tool == 47) {
  8435. this.addSentenceTool();
  8436. } else if (tool == 69) {
  8437. this.addEnglish();
  8438. }
  8439. })
  8440. .catch(() => {
  8441. if (tool == 15) {
  8442. this.dialogVisible8 = false;
  8443. } else if (tool == 4) {
  8444. this.dialogVisible5 = false;
  8445. } else if (tool == 45) {
  8446. this.dialogVisibleChoice = false;
  8447. } else if (tool == 41) {
  8448. this.dialogVisibleSelect = false;
  8449. } else if (tool == 47) {
  8450. this.dialogVisibleSentence = false;
  8451. } else if (tool == 69) {
  8452. this.englishDialogVisible = false;
  8453. }
  8454. });
  8455. },
  8456. addEnglish(jsonType) {
  8457. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  8458. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  8459. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  8460. if (
  8461. this.englishList.engTitle == "" ||
  8462. this.englishList.englishText == ""
  8463. ) {
  8464. this.$message.error("请将内容填写完整!");
  8465. return;
  8466. }
  8467. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8468. this.taskCount
  8469. ].toolChoose[this.toolIndex].englishList = this.englishList;
  8470. this.englishList = {};
  8471. if (jsonType && jsonType == 1) {
  8472. this.englishDialogVisible = true;
  8473. } else {
  8474. this.englishDialogVisible = false;
  8475. }
  8476. if (
  8477. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  8478. .toolChoose[this.toolIndex].tool != 69
  8479. ) {
  8480. this.addTools(69, this.taskCount, this.toolIndex);
  8481. }
  8482. },
  8483. imgChange2(i, j) {
  8484. var _tmp = this.testJson.testJson[i].checkList[j];
  8485. this.noneBtnImg = _tmp.length >= 1;
  8486. },
  8487. imgChange3(i) {
  8488. var _tmp = this.testJson.testJson[i];
  8489. this.noneBtnImg = _tmp.length >= 1;
  8490. },
  8491. imgChange1(file, fileList, type, itemTaskIndex) {
  8492. if (type == 1) {
  8493. var _tmp = this.cover;
  8494. } else if (
  8495. type == 2 ||
  8496. type == 3 ||
  8497. type == 6 ||
  8498. type == 7 ||
  8499. type == 8
  8500. ) {
  8501. var _tmp =
  8502. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8503. .chapterData;
  8504. } else if (type == 4) {
  8505. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  8506. } else {
  8507. var _tmp =
  8508. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8509. .homeworkList;
  8510. }
  8511. this.noneBtnImg = _tmp.length >= 1;
  8512. },
  8513. goTo(path) {
  8514. this.$router.push(path);
  8515. },
  8516. guid() {
  8517. var _num,
  8518. i,
  8519. _guid = "";
  8520. for (i = 0; i < 32; i++) {
  8521. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  8522. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  8523. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  8524. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  8525. _guid += "-";
  8526. }
  8527. }
  8528. return _guid;
  8529. },
  8530. retrunCourse() {
  8531. if(this.istemplate == 1){
  8532. this.goTo(
  8533. "/course?userid=" +
  8534. this.userid +
  8535. "&oid=" +
  8536. this.oid +
  8537. "&org=" +
  8538. this.org +
  8539. "&role=" +
  8540. this.role
  8541. );
  8542. return
  8543. }
  8544. this.$confirm("是否保存已编辑内容?", "提示", {
  8545. confirmButtonText: "保存",
  8546. cancelButtonText: "不保存",
  8547. distinguishCancelAndClose: true,
  8548. type: "warning",
  8549. })
  8550. .then(() => {
  8551. if (this.taskLoading.length) {
  8552. let _pan = 1
  8553. for(var k = 0; k < this.taskLoading.length; k++){
  8554. if(this.taskLoading[k]){
  8555. this.$message({
  8556. message: `请等待任务${k+1}回答完毕后再保存`,
  8557. type: "warning"
  8558. });
  8559. _pan = 2
  8560. }
  8561. }
  8562. if(_pan == 2){
  8563. return
  8564. }
  8565. }
  8566. if(this.taskGLoading.length){
  8567. let _pan = 1
  8568. for(var k = 0; k < this.taskGLoading.length; k++){
  8569. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8570. this.$message({
  8571. message: `请等待任务${k+1}回答完毕后再保存`,
  8572. type: "warning"
  8573. });
  8574. _pan = 2
  8575. }
  8576. }
  8577. if(_pan == 2){
  8578. return
  8579. }
  8580. }
  8581. let pan2 = 1
  8582. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  8583. for(var index = 0; index < taskJson.length; index++){
  8584. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  8585. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  8586. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  8587. this.$message({
  8588. message: `请等待任务${index+1}回答完毕后再继续`,
  8589. type: "warning"
  8590. });
  8591. pan2 = 2
  8592. }
  8593. }
  8594. }
  8595. }
  8596. if(pan2 == 2){
  8597. return
  8598. }
  8599. if (this.cid == "" || this.cid == undefined) {
  8600. if (this.courseName == "") {
  8601. this.$message.error("请补充填写课程名称");
  8602. return;
  8603. } else {
  8604. this.addWork();
  8605. }
  8606. this.steps = 4;
  8607. } else {
  8608. if (this.courseName == "") {
  8609. this.$message.error("请补充填写课程名称");
  8610. return;
  8611. } else {
  8612. if (this.userid != this.courseUserid && this.role != "1") {
  8613. this.updateWork2();
  8614. } else {
  8615. this.updateWork();
  8616. }
  8617. this.steps = 4;
  8618. }
  8619. }
  8620. })
  8621. .catch((v) => {
  8622. console.log(v);
  8623. if (v == "cancel") {
  8624. this.goTo(
  8625. "/course?userid=" +
  8626. this.userid +
  8627. "&oid=" +
  8628. this.oid +
  8629. "&org=" +
  8630. this.org +
  8631. "&role=" +
  8632. this.role
  8633. );
  8634. }
  8635. });
  8636. },
  8637. lastSteps() {
  8638. if (this.steps == 4) {
  8639. this.goTo(
  8640. "/course?userid=" +
  8641. this.userid +
  8642. "&oid=" +
  8643. this.oid +
  8644. "&org=" +
  8645. this.org +
  8646. "&role=" +
  8647. this.role
  8648. );
  8649. } else {
  8650. // if (this.cidType == 0) {
  8651. // this.steps--;
  8652. // if (this.steps == 1) {
  8653. // setTimeout(() => {
  8654. // this.checkEva(this.checkId);
  8655. // setTimeout(() => {
  8656. // this.checkEva(this.checkId);
  8657. // }, 100);
  8658. // }, 100);
  8659. // }
  8660. // } else {
  8661. if (this.steps == 3) {
  8662. this.steps = 1;
  8663. setTimeout(() => {
  8664. this.checkEva(this.checkId);
  8665. setTimeout(() => {
  8666. this.checkEva(this.checkId);
  8667. }, 100);
  8668. }, 100);
  8669. }
  8670. // }
  8671. }
  8672. },
  8673. navSteps(s) {
  8674. if (this.courseName == "") {
  8675. this.$message.error("请补充填写课程名称");
  8676. return;
  8677. }
  8678. if (this.cidType == 0) {
  8679. if (this.steps == 1) {
  8680. if (this.cid == "" || this.cid == undefined) {
  8681. this.addWork();
  8682. } else {
  8683. if (this.userid != this.courseUserid && this.role != "1") {
  8684. this.updateWork2();
  8685. } else {
  8686. this.updateWork();
  8687. }
  8688. }
  8689. }
  8690. if (s == 1) {
  8691. this.steps = 1;
  8692. setTimeout(() => {
  8693. this.checkEva(this.checkId);
  8694. setTimeout(() => {
  8695. this.checkEva(this.checkId);
  8696. }, 100);
  8697. }, 100);
  8698. }
  8699. if (s == 2) {
  8700. this.steps = 2;
  8701. }
  8702. if (s == 3) {
  8703. this.cTemplate = this.templateC.content;
  8704. this.dialogVisible2 = false;
  8705. this.steps = 3;
  8706. this.isClickColor = 1;
  8707. this.unitJson[
  8708. this.unitIndex
  8709. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8710. this.$forceUpdate();
  8711. setTimeout(() => {
  8712. this.checkEva(this.checkId);
  8713. setTimeout(() => {
  8714. this.checkEva(this.checkId);
  8715. }, 100);
  8716. }, 1000);
  8717. }
  8718. } else {
  8719. if (this.steps == 1) {
  8720. if (this.cid == "" || this.cid == undefined) {
  8721. this.addWork();
  8722. } else {
  8723. if (this.userid != this.courseUserid && this.role != "1") {
  8724. this.updateWork2();
  8725. } else {
  8726. this.updateWork();
  8727. }
  8728. }
  8729. }
  8730. if (s == 1) {
  8731. this.steps = 1;
  8732. setTimeout(() => {
  8733. this.checkEva(this.checkId);
  8734. setTimeout(() => {
  8735. this.checkEva(this.checkId);
  8736. }, 100);
  8737. }, 100);
  8738. }
  8739. if (s == 3) {
  8740. this.cTemplate = this.templateC.content;
  8741. this.dialogVisible2 = false;
  8742. this.steps = 3;
  8743. this.isClickColor = 1;
  8744. this.unitJson[
  8745. this.unitIndex
  8746. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8747. this.$forceUpdate();
  8748. setTimeout(() => {
  8749. this.checkEva(this.checkId);
  8750. setTimeout(() => {
  8751. this.checkEva(this.checkId);
  8752. }, 100);
  8753. }, 1000);
  8754. }
  8755. }
  8756. this.$refs.stepBox.scrollTop = 0;
  8757. },
  8758. setTipsIndex(){
  8759. // 使用 setTimeout 确保对话框已经渲染完成
  8760. this.$nextTick(() => {
  8761. const dialog = document.querySelector('.custom-confirm-box');
  8762. if (dialog) {
  8763. const parent = dialog.parentElement;
  8764. if (parent) {
  8765. parent.style.zIndex = 9999999;
  8766. const adjacentElement = parent.nextElementSibling;
  8767. if (adjacentElement) {
  8768. adjacentElement.style.zIndex = 9999998;
  8769. }
  8770. }
  8771. }
  8772. });
  8773. },
  8774. nextSteps(clickType, ttype) {
  8775. if(!this.time()){
  8776. return
  8777. }
  8778. // if (this.cidType == 1) {
  8779. if (this.steps == 1) {
  8780. if (this.courseName != "") {
  8781. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  8782. // this.$message({
  8783. // message: "请回答完毕后再次发送",
  8784. // type: "warning"
  8785. // });
  8786. if(this.ttaskDetailLoading.length){
  8787. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  8788. this.$message({
  8789. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8790. type: "warning"
  8791. });
  8792. }
  8793. if(this.cpotetLoading.cpote1){
  8794. this.$message({
  8795. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  8796. type: "warning"
  8797. });
  8798. }
  8799. if(this.cpotetLoading.cpote2){
  8800. this.$message({
  8801. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  8802. type: "warning"
  8803. });
  8804. }
  8805. if(this.cpotetLoading.cpote3){
  8806. this.$message({
  8807. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  8808. type: "warning"
  8809. });
  8810. }
  8811. if(this.cpotetLoading.cpote4){
  8812. this.$message({
  8813. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  8814. type: "warning"
  8815. });
  8816. }
  8817. return;
  8818. }
  8819. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  8820. if(!this.courseText && !this.teacherCourseText){
  8821. this.$message.error("请生成简要描述后再生成大纲");
  8822. return;
  8823. }
  8824. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  8825. this.openAiDialog(clickType, 'aiOutline2')
  8826. if(clickType == 1){
  8827. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  8828. }else {
  8829. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  8830. }
  8831. }else {
  8832. this.openAiDialog(clickType, 'aiOutline')
  8833. if(clickType == 1){
  8834. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  8835. }else {
  8836. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  8837. }
  8838. }
  8839. return;
  8840. }
  8841. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  8842. let _type = ''
  8843. if(this.cpoteType == 0){
  8844. _type = 'aiCpote1'
  8845. if(clickType == 1){
  8846. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  8847. }else {
  8848. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  8849. }
  8850. }else if(this.cpoteType == 1){
  8851. _type = 'aiCpote2'
  8852. if(clickType == 1){
  8853. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  8854. }else {
  8855. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  8856. }
  8857. }else if(this.cpoteType == 2){
  8858. _type = 'aiCpote3'
  8859. if(clickType == 1){
  8860. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  8861. }else {
  8862. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  8863. }
  8864. }else if(this.cpoteType == 3){
  8865. _type = 'aiCpote4'
  8866. if(clickType == 1){
  8867. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  8868. }else {
  8869. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  8870. }
  8871. }
  8872. this.cpoteType++
  8873. this.openAiDialog(clickType, _type)
  8874. return;
  8875. }
  8876. // if (!this.isOutline2) {
  8877. // this.openAiDialog(clickType, 'aiTeacher')
  8878. // return;
  8879. // }
  8880. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  8881. this.openAiDialog(clickType, 'aiTeacher3')
  8882. if(clickType == 1){
  8883. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  8884. }else {
  8885. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  8886. }
  8887. return;
  8888. }
  8889. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  8890. this.openAiDialog(clickType, 'aiTeacher2')
  8891. if(clickType == 1){
  8892. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  8893. }else {
  8894. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  8895. }
  8896. return;
  8897. }
  8898. let _pan2 = 1
  8899. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  8900. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  8901. _pan2 = 2
  8902. this.$message.error(`请完善任务${k+1}的课程大纲`)
  8903. break;
  8904. }
  8905. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  8906. _pan2 = 2
  8907. this.$message.error(`请完善任务${k+1}的课程教案`)
  8908. break;
  8909. }
  8910. }
  8911. if(_pan2 == 2){
  8912. return;
  8913. }
  8914. const functionA = () => {
  8915. setTimeout(() => {
  8916. this.loading = false
  8917. this.steps = 3;
  8918. }, 0)
  8919. this.isClickColor = 1;
  8920. this.unitJson[
  8921. this.unitIndex
  8922. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8923. this.$forceUpdate();
  8924. setTimeout(() => {
  8925. this.checkEva(this.checkId);
  8926. setTimeout(() => {
  8927. this.checkEva(this.checkId);
  8928. }, 100);
  8929. }, 1000);
  8930. if (this.cid == "" || this.cid == undefined) {
  8931. this.addWork();
  8932. } else {
  8933. if (this.userid != this.courseUserid && this.role != "1") {
  8934. this.updateWork2();
  8935. } else {
  8936. this.updateWork();
  8937. }
  8938. }
  8939. }
  8940. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  8941. if(this.ttaskDetailLoading5.length){
  8942. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  8943. // this.$message({
  8944. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8945. // type: "warning"
  8946. // });
  8947. this.$confirm("还有教案描述未生成完毕,是否直接下一步?", "提示", {
  8948. confirmButtonText: "确定",
  8949. cancelButtonText: "取消",
  8950. distinguishCancelAndClose: true,
  8951. type: "warning",
  8952. customClass: 'custom-confirm-box'
  8953. })
  8954. .then(() => {
  8955. if(this.isTeacherTaskCancelToken2){
  8956. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  8957. if(this.isTeacherTaskCancelToken2[i]){
  8958. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  8959. this.isTeacherTaskCancelToken2[i] = null;
  8960. }
  8961. }
  8962. }
  8963. this.taskDetailLoading5 = []
  8964. this.ttaskDetailLoading5 = []
  8965. if(this.isTeacherTaskCancelSource){
  8966. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  8967. if(this.isTeacherTaskCancelSource[i]){
  8968. this.isTeacherTaskCancelSource[i].close()
  8969. this.isTeacherTaskCancelSource[i] = null
  8970. }
  8971. }
  8972. }
  8973. if (this.cid) {
  8974. this.loading = true
  8975. functionA()
  8976. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  8977. } else {
  8978. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8979. if(clickType == 1){
  8980. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  8981. }else {
  8982. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  8983. }
  8984. }
  8985. }).catch((v) => {
  8986. console.log(v);
  8987. })
  8988. setTimeout(() => {
  8989. this.setTipsIndex()
  8990. }, 500)
  8991. }
  8992. return;
  8993. }
  8994. if (this.cid && this.panTask() > 0) {
  8995. this.loading = true
  8996. functionA()
  8997. } else {
  8998. // if(ttype == 2){
  8999. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9000. // }else {
  9001. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  9002. // }
  9003. }
  9004. } else {
  9005. this.$message.error("请补充填写课程名称");
  9006. return;
  9007. }
  9008. } else if (this.steps == 3) {
  9009. if (this.taskLoading.length) {
  9010. let _pan = 1
  9011. for(var k = 0; k < this.taskLoading.length; k++){
  9012. if(this.taskLoading[k]){
  9013. this.$message({
  9014. message: `请等待任务${k+1}回答完毕后再上传`,
  9015. type: "warning"
  9016. });
  9017. _pan = 2
  9018. }
  9019. }
  9020. if(_pan == 2){
  9021. return
  9022. }
  9023. }
  9024. if(this.taskGLoading.length){
  9025. let _pan = 1
  9026. for(var k = 0; k < this.taskGLoading.length; k++){
  9027. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9028. this.$message({
  9029. message: `请等待任务${k+1}回答完毕后再保存`,
  9030. type: "warning"
  9031. });
  9032. _pan = 2
  9033. }
  9034. }
  9035. if(_pan == 2){
  9036. return
  9037. }
  9038. }
  9039. let pan2 = 1
  9040. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9041. for(var index = 0; index < taskJson.length; index++){
  9042. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9043. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9044. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9045. this.$message({
  9046. message: `请等待任务${index+1}回答完毕后再继续`,
  9047. type: "warning"
  9048. });
  9049. pan2 = 2
  9050. }
  9051. }
  9052. }
  9053. }
  9054. if(pan2 == 2){
  9055. return
  9056. }
  9057. if (this.cid == "" || this.cid == undefined) {
  9058. if (this.courseName == "") {
  9059. this.$message.error("请补充填写课程名称");
  9060. return;
  9061. } else {
  9062. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9063. this.addWork();
  9064. this.steps++;
  9065. }
  9066. } else {
  9067. if (this.courseName == "") {
  9068. this.$message.error("请补充填写课程名称");
  9069. return;
  9070. } else {
  9071. if (this.userid != this.courseUserid && this.role != "1") {
  9072. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9073. this.updateWork2();
  9074. } else {
  9075. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9076. this.updateWork();
  9077. }
  9078. this.steps++;
  9079. }
  9080. }
  9081. }
  9082. // } else {
  9083. // if (this.steps == 1) {
  9084. // if (this.courseName != "") {
  9085. // if (this.cid == "" || this.cid == undefined) {
  9086. // this.addWork();
  9087. // } else {
  9088. // if (this.userid != this.courseUserid && this.role != "1") {
  9089. // // this.updateWork2();
  9090. // } else {
  9091. // this.updateWork();
  9092. // }
  9093. // }
  9094. // this.steps++;
  9095. // } else {
  9096. // this.$message.error("请补充填写课程名称");
  9097. // return;
  9098. // }
  9099. // } else if (this.steps == 2) {
  9100. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  9101. // this.cTemplate = this.templateC.content;
  9102. // }
  9103. // this.dialogVisible2 = false;
  9104. // this.steps++;
  9105. // setTimeout(() => {
  9106. // this.checkEva(this.checkId);
  9107. // setTimeout(() => {
  9108. // this.checkEva(this.checkId);
  9109. // }, 100);
  9110. // }, 1000);
  9111. // } else if (this.steps == 3) {
  9112. // if (this.cid == "" || this.cid == undefined) {
  9113. // if (this.courseName == "") {
  9114. // this.$message.error("请补充填写课程名称");
  9115. // return;
  9116. // } else {
  9117. // this.addWork();
  9118. // this.steps++;
  9119. // }
  9120. // } else {
  9121. // if (this.courseName == "") {
  9122. // this.$message.error("请补充填写课程名称");
  9123. // return;
  9124. // } else {
  9125. // if (this.userid != this.courseUserid && this.role != "1") {
  9126. // this.updateWork2();
  9127. // } else {
  9128. // this.updateWork();
  9129. // }
  9130. // this.steps++;
  9131. // }
  9132. // }
  9133. // }
  9134. // }
  9135. this.$refs.stepBox.scrollTop = 0;
  9136. },
  9137. unitSet(i) {
  9138. if (this.unitIndex == i) {
  9139. return;
  9140. }
  9141. this.unitIndex = i;
  9142. this.isClickColor = 1;
  9143. // this.$refs.rightboxR.scrollTop = 0;
  9144. this.$refs.unitBox.scrollTop = 0;
  9145. },
  9146. panUnitJson() {
  9147. let _unitIndex = this.unitIndex;
  9148. let cPan = 1;
  9149. for (
  9150. var j = 0;
  9151. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9152. j++
  9153. ) {
  9154. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9155. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9156. j
  9157. ].proVisible2 = false;
  9158. if (
  9159. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9160. .length > 1
  9161. ) {
  9162. for (
  9163. var z = 0;
  9164. z <
  9165. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9166. .length;
  9167. z++
  9168. ) {
  9169. if (
  9170. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9171. z
  9172. ].tool.length
  9173. ) {
  9174. this.$message.error("请把工具添加完整");
  9175. cPan = 2;
  9176. break;
  9177. }
  9178. }
  9179. }
  9180. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9181. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9182. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9183. (ele) => {
  9184. return ele.value != "" || ele.detail != "" || ele.target != "";
  9185. }
  9186. );
  9187. }
  9188. }
  9189. return cPan;
  9190. },
  9191. unitOpen(i) {
  9192. if (this.unitJson[i].toolOpen) {
  9193. this.unitJson[i].toolOpen = false;
  9194. } else {
  9195. this.unitJson[i].toolOpen = true;
  9196. }
  9197. this.updateWork();
  9198. this.$forceUpdate();
  9199. },
  9200. unitSet2(i) {
  9201. if (this.panUnitJson() == 2) {
  9202. return;
  9203. }
  9204. // if(this.unitJson[i].toolOpen){
  9205. // this.unitJson[i].toolOpen = false
  9206. // this.updateWork()
  9207. // this.$forceUpdate()
  9208. // return
  9209. // }else {
  9210. this.unitJson[i].toolOpen = true;
  9211. // }
  9212. this.$forceUpdate();
  9213. if (this.unitIndex == i) {
  9214. return;
  9215. }
  9216. this.unitIndex = i;
  9217. this.isClickColor = 1;
  9218. // this.$refs.rightboxR.scrollTop = 0;
  9219. this.$refs.unitBox.scrollTop = 0;
  9220. },
  9221. updateCourseState(i) {
  9222. let params = [
  9223. {
  9224. cid: this.cid,
  9225. state: i,
  9226. },
  9227. ];
  9228. this.ajax
  9229. .post(this.$store.state.api + "updateCourseMode", params)
  9230. .then((res) => {
  9231. this.courseState = i;
  9232. })
  9233. .catch((err) => {
  9234. this.$message.error("网络不佳");
  9235. console.error(err);
  9236. });
  9237. },
  9238. addtips(){
  9239. let params = [
  9240. {
  9241. cid: this.cid,
  9242. tips: JSON.stringify(this.aiJson),
  9243. tid: this.templateid
  9244. },
  9245. ];
  9246. this.ajax
  9247. .post(this.$store.state.api + "addTips", params)
  9248. .then((res) => {
  9249. })
  9250. .catch((err) => {
  9251. this.$message.error("网络不佳");
  9252. console.error(err);
  9253. });
  9254. },
  9255. openSaveTips(){
  9256. this.dialogVisibleTips = true
  9257. },
  9258. time() {
  9259. if (!this.now) {
  9260. this.now = new Date().getTime();
  9261. return true;
  9262. } else {
  9263. let time = new Date().getTime();
  9264. if (time - this.now > 1000) {
  9265. this.now = time;
  9266. return true;
  9267. } else {
  9268. return false;
  9269. }
  9270. }
  9271. },
  9272. deleteUnit(i) {
  9273. var _this = this;
  9274. if (i == 0 && _this.unitJson.length == 1) {
  9275. _this
  9276. .$confirm("确定切换成任务模式吗?", "提示", {
  9277. confirmButtonText: "确定",
  9278. cancelButtonText: "取消",
  9279. type: "warning",
  9280. })
  9281. .then(() => {
  9282. _this.unitJson[i].dyName = "";
  9283. // _this.updateCourseState(2);
  9284. })
  9285. .catch(() => {
  9286. return;
  9287. });
  9288. } else {
  9289. _this
  9290. .$confirm("确定删除此阶段吗?", "提示", {
  9291. confirmButtonText: "确定",
  9292. cancelButtonText: "取消",
  9293. type: "warning",
  9294. })
  9295. .then(() => {
  9296. _this.isDelete = 2;
  9297. // _this.unitIndex = _this.unitIndex - 1;
  9298. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  9299. // _this.$message.success("删除成功");
  9300. })
  9301. .catch(() => {
  9302. return;
  9303. });
  9304. }
  9305. },
  9306. deleteWork(chapid) {
  9307. let params = [
  9308. {
  9309. cid: this.cid,
  9310. chapters: JSON.stringify(this.unitJson),
  9311. uid: this.userid,
  9312. chapid: chapid,
  9313. },
  9314. ];
  9315. this.ajax
  9316. .post(this.$store.state.api + "deleteWork", params)
  9317. .then((res) => {
  9318. this.$message({
  9319. message: "删除成功",
  9320. type: "success",
  9321. });
  9322. let task = JSON.parse(
  9323. JSON.stringify(
  9324. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  9325. )
  9326. );
  9327. this.unitJson.splice(this.unitIndex, 1);
  9328. if (this.unitIndex == 0) {
  9329. this.unitIndex = 0;
  9330. } else {
  9331. this.unitIndex = this.unitIndex - 1;
  9332. }
  9333. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  9334. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  9335. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  9336. ...task,
  9337. ];
  9338. }
  9339. })
  9340. .catch((err) => {
  9341. this.$message.error("网络不佳");
  9342. console.error(err);
  9343. });
  9344. },
  9345. deleteTool(itemTaskIndex, i) {
  9346. var _this = this;
  9347. if (_this.time()) {
  9348. _this
  9349. .$confirm("确定删除此工具吗?", "提示", {
  9350. confirmButtonText: "确定",
  9351. cancelButtonText: "取消",
  9352. type: "warning",
  9353. })
  9354. .then(() => {
  9355. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9356. itemTaskIndex
  9357. ].toolChoose.splice(i, 1);
  9358. _this.$message.success("删除成功");
  9359. })
  9360. .catch(() => {
  9361. return;
  9362. });
  9363. }
  9364. },
  9365. deleteSentence(i) {
  9366. var _this = this;
  9367. _this
  9368. .$confirm("确定删除此题目吗?", "提示", {
  9369. confirmButtonText: "确定",
  9370. cancelButtonText: "取消",
  9371. type: "warning",
  9372. })
  9373. .then(() => {
  9374. _this.sentenceList.splice(i, 1);
  9375. _this.$message.success("删除成功");
  9376. })
  9377. .catch(() => {
  9378. return;
  9379. });
  9380. },
  9381. deleteS(s, i, j) {
  9382. this.sentenceList[i].addSentence.splice(j, 1);
  9383. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9384. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9385. this.sentenceList[i].rightAnswer.splice(a, 1);
  9386. }
  9387. },
  9388. openT() {
  9389. top.postMessage({ tools: "25" }, "*");
  9390. },
  9391. deleteTask(i) {
  9392. var _this = this;
  9393. if (_this.time()) {
  9394. _this
  9395. .$confirm(
  9396. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9397. 1 ==
  9398. i
  9399. ? "确定删除此任务吗?"
  9400. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  9401. "提示",
  9402. {
  9403. confirmButtonText: "确定",
  9404. cancelButtonText: "取消",
  9405. type: "warning",
  9406. }
  9407. )
  9408. .then(() => {
  9409. if (i == 0 && _this.courseState == 4) {
  9410. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9411. i + 1
  9412. ].chapterData = JSON.parse(
  9413. JSON.stringify(
  9414. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9415. .chapterData
  9416. )
  9417. );
  9418. }
  9419. _this.$forceUpdate();
  9420. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9421. i,
  9422. 1
  9423. );
  9424. _this.$message.success("删除成功");
  9425. })
  9426. .catch(() => {
  9427. return;
  9428. });
  9429. }
  9430. },
  9431. deleteTask2(i) {
  9432. var _this = this;
  9433. if (_this.time()) {
  9434. _this
  9435. .$confirm(
  9436. "确定删除此任务吗?",
  9437. "提示",
  9438. {
  9439. confirmButtonText: "确定",
  9440. cancelButtonText: "取消",
  9441. type: "warning",
  9442. }
  9443. )
  9444. .then(() => {
  9445. if (i == 0 && _this.courseState == 4) {
  9446. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9447. i + 1
  9448. ].chapterData = JSON.parse(
  9449. JSON.stringify(
  9450. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9451. .chapterData
  9452. )
  9453. );
  9454. }
  9455. _this.$forceUpdate();
  9456. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9457. i,
  9458. 1
  9459. );
  9460. _this.$message.success("删除成功");
  9461. })
  9462. .catch(() => {
  9463. return;
  9464. });
  9465. }
  9466. },
  9467. handlePictureCardPreview(file) {
  9468. this.dialogImageUrl = file.url;
  9469. },
  9470. clean(i, c) {
  9471. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  9472. },
  9473. handle_remove1(file, fileList, type) {
  9474. var _tmp = this.cover;
  9475. // for (var i = 0, len = _tmp.length; i < len; i++) {
  9476. // if (_tmp[i].uid == file.uid) {
  9477. // _tmp.splice(i, 1);
  9478. // break;
  9479. // }
  9480. // this.cover = _tmp;
  9481. // }
  9482. this.cover = [];
  9483. this.noneBtnImg = this.cover.length >= 1;
  9484. this.isSysPic = false;
  9485. this.isSysPic2 = false;
  9486. this.$forceUpdate();
  9487. },
  9488. addImg(e) {
  9489. var el = e.currentTarget;
  9490. el.getElementsByTagName("input")[0].click();
  9491. e.target.value = "";
  9492. },
  9493. addChaptersTools(i) {
  9494. this.chapTools = [
  9495. {
  9496. tools: [],
  9497. toolDetail: "",
  9498. },
  9499. ];
  9500. this.chapCount = i;
  9501. this.dialogVisible4 = true;
  9502. },
  9503. isNoFinsh() {
  9504. this.$message.warning("功能正在开发中");
  9505. },
  9506. addAttText(i) {
  9507. this.AttText = {
  9508. title: "",
  9509. text: "",
  9510. };
  9511. this.taskCount = i;
  9512. this.AttTextType = 0;
  9513. this.$forceUpdate();
  9514. this.dialogVisible6 = true;
  9515. setTimeout(() => {
  9516. this.$refs["fuInput"].focus();
  9517. }, 100);
  9518. },
  9519. openLine(i) {
  9520. this.line = "";
  9521. this.lineCount = i;
  9522. this.lineType = 0;
  9523. this.$forceUpdate();
  9524. this.dialogVisible7 = true;
  9525. },
  9526. pasteLine(i) {
  9527. navigator.clipboard
  9528. .readText()
  9529. .then((v) => {
  9530. console.log("获取剪贴板成功:", v);
  9531. const html = v;
  9532. const regex = /src="(.*?)"/g;
  9533. const match = regex.exec(html);
  9534. if (match && match[1]) {
  9535. console.log(match[1]);
  9536. this.$message.success("粘贴成功");
  9537. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9538. i
  9539. ].chapterData.unshift({
  9540. name: "链接",
  9541. title: "嵌入代码",
  9542. url: match[1],
  9543. type: 8,
  9544. });
  9545. } else {
  9546. // console.log("未找到包含 src 属性的 iframe");
  9547. this.$message.error(
  9548. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  9549. );
  9550. }
  9551. })
  9552. .catch((v) => {
  9553. console.log("获取剪贴板失败: ", v);
  9554. });
  9555. },
  9556. openSource(i) {
  9557. this.lineCount = i;
  9558. this.sourceData = {};
  9559. this.dialogVisibleSource = true;
  9560. this.updateSourcePan = false;
  9561. },
  9562. openAiCreate(i){
  9563. // this.lineCount = i;
  9564. // this.dialogVisibleAiCreate = true;
  9565. if(!this.pptCount.includes(i)){
  9566. this.pptCount.push(i)
  9567. this.dialogVisibleAiCreate2.push(i);
  9568. }else{
  9569. this.$refs['ppt'+i][0].tanDialog = false
  9570. this.$refs['ppt'+i][0].dialogVisibleAiCreate2 = true
  9571. }
  9572. this.pptBoxDialog = true
  9573. },
  9574. createAiPpt(json, i){
  9575. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9576. // this.dialogVisibleAiCreate = false;
  9577. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  9578. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  9579. },
  9580. closeAiPpt(i){
  9581. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  9582. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  9583. },
  9584. openAiCreateVideo(i){
  9585. this.lineCount = i;
  9586. this.dialogVisibleAiCreateVideo = true;
  9587. },
  9588. createAiVideo(json){
  9589. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9590. // this.dialogVisibleAiCreateVideo = false;
  9591. },
  9592. async createTeacherAn(index){
  9593. // this.lineCount = index;
  9594. let md = new MarkdownIt();
  9595. if(this.courseState == 4){
  9596. this.anLoading[0] = true
  9597. // if(index == 0 || index){
  9598. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9599. // let name = _task.task+'-教案'
  9600. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9601. // await this.generate(name, _html, 0)
  9602. // }else {
  9603. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9604. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9605. let name = _task.task+'-教案'
  9606. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9607. await this.generate(name, _html, 0)
  9608. }
  9609. // }
  9610. }else if(this.courseState == 5){
  9611. this.anLoading[index] = true
  9612. if(index == 0 || index){
  9613. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9614. let name = _task.task+'-教案'
  9615. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9616. await this.generate(name, _html, index)
  9617. }else {
  9618. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9619. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9620. let name = _task.task+'-教案'
  9621. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9622. await this.generate(name, _html, i)
  9623. }
  9624. }
  9625. }
  9626. },
  9627. async createTaskAn(index){
  9628. // this.lineCount = index;
  9629. if(this.taskAnLoading[index]){
  9630. // this.$message.error('请等待当前学历案生成完成')
  9631. this.cancelAjax('taskAn', index)
  9632. return
  9633. }
  9634. this.taskAnLoading[index] = true
  9635. this.$forceUpdate()
  9636. let _this = this
  9637. let md = new MarkdownIt();
  9638. let messages = ""
  9639. messages = `NOTICE
  9640. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  9641. Language: ${this.getLang()}
  9642. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  9643. ## 任务教案
  9644. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  9645. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  9646. let parm = {
  9647. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  9648. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  9649. session_name: uuidv4(),
  9650. userId: this.userid,
  9651. file_ids: [],
  9652. model: 'gpt-4o-2024-08-06',
  9653. temperature: this.mode == 3 ? 0.5 : 0.1,
  9654. }
  9655. this.ajax
  9656. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  9657. .then(async (response) => {
  9658. console.log(response);
  9659. let data = response.data.FunctionResponse
  9660. if (data.message) {
  9661. console.log(data.message);
  9662. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  9663. let name = _task.task+'-学历案'
  9664. let _html = md.render(data.message)
  9665. await _this.generate(name, _html, index, ()=>{
  9666. _this.taskAnLoading[index] = false
  9667. _this.taskAnCancelToken[index] = null
  9668. })
  9669. }else{
  9670. _this.taskAnLoading[index] = false
  9671. _this.taskAnCancelToken[index] = null
  9672. }
  9673. }).catch((error) => {
  9674. console.log(error);
  9675. _this.taskAnLoading[index] = false
  9676. _this.taskAnCancelToken[index] = null
  9677. });
  9678. },
  9679. async generate(a, html, index, callback) {
  9680. // <html lang="en">
  9681. // 将html文件中需要用到的数据挂载到store上
  9682. const content = `<!DOCTYPE html>
  9683. <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'>
  9684. <head>
  9685. <!--[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]-->
  9686. <meta charset="UTF-8">
  9687. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9688. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9689. <title>${a}</title>
  9690. <style>
  9691. table {
  9692. border-collapse: collapse; /* 折叠边框 */
  9693. width: 100%;
  9694. }
  9695. th, td {
  9696. border: 1px solid black; /* 线条样式 */
  9697. padding: 8px;
  9698. text-align: left;
  9699. }
  9700. </style>
  9701. </head>
  9702. <body>
  9703. ${html}
  9704. </body>
  9705. </html>`;
  9706. // debugger
  9707. const blob = htmlDocx.asBlob(content)
  9708. // debugger
  9709. let dname = a + ".docx";
  9710. // 创建文件流
  9711. // 创建bolb实例时,内容一定要放在[]中
  9712. // const blob = new Blob([content], {
  9713. // type: "text/plain;charset='utf-8'",
  9714. // });
  9715. // const file = new File([blob], dname, { type: 'application/msword' });
  9716. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9717. // let params = convertApi.createParams()
  9718. // params.add('file', file)
  9719. // try {
  9720. // let result = await convertApi.convert('docx', 'docx', params)
  9721. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  9722. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  9723. // });
  9724. // await this.beforeUploadHtml(file, index, callback)
  9725. // } catch (error) {
  9726. // console.log('=================','报错')
  9727. // await this.beforeUploadHtml(file, index, callback)
  9728. // return
  9729. // }
  9730. await this.beforeUploadHtml(file, index, callback)
  9731. },
  9732. async generateExport(a, html, index) {
  9733. // <html lang="en">
  9734. // 将html文件中需要用到的数据挂载到store上
  9735. const content = `<!DOCTYPE html>
  9736. <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'>
  9737. <head>
  9738. <!--[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]-->
  9739. <meta charset="UTF-8">
  9740. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9741. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9742. <title>${a}</title>
  9743. <style>
  9744. table {
  9745. border-collapse: collapse; /* 折叠边框 */
  9746. width: 100%;
  9747. }
  9748. th, td {
  9749. border: 1px solid black; /* 线条样式 */
  9750. padding: 8px;
  9751. text-align: left;
  9752. }
  9753. </style>
  9754. </head>
  9755. <body>
  9756. ${html}
  9757. </body>
  9758. </html>`;
  9759. // debugger
  9760. const blob = htmlDocx.asBlob(content)
  9761. // debugger
  9762. const dname = `${a}.docx`;
  9763. // 创建文件流
  9764. // const file = new File([blob], dname, { type: 'application/msword' });
  9765. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9766. // let params = convertApi.createParams()
  9767. // params.add('file', file)
  9768. // try {
  9769. // let result = await convertApi.convert('docx', 'docx', params)
  9770. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  9771. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  9772. // });
  9773. // // 执行下载
  9774. // saveAs(file, dname);
  9775. // } catch (error) {
  9776. // saveAs(file, dname);
  9777. // // this.$message.error('导出失败')
  9778. // }
  9779. saveAs(file, dname);
  9780. // return file
  9781. },
  9782. async generateExport2(a, html, index) {
  9783. return new Promise(async (resolve) => {
  9784. // <html lang="en">
  9785. // 将html文件中需要用到的数据挂载到store上
  9786. const content = `<!DOCTYPE html>
  9787. <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'>
  9788. <head>
  9789. <!--[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]-->
  9790. <meta charset="UTF-8">
  9791. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9792. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9793. <title>${a}</title>
  9794. <style>
  9795. table {
  9796. border-collapse: collapse; /* 折叠边框 */
  9797. width: 100%;
  9798. }
  9799. th, td {
  9800. border: 1px solid black; /* 线条样式 */
  9801. padding: 8px;
  9802. text-align: left;
  9803. }
  9804. </style>
  9805. </head>
  9806. <body>
  9807. ${html}
  9808. </body>
  9809. </html>`;
  9810. // debugger
  9811. const blob = htmlDocx.asBlob(content)
  9812. // debugger
  9813. const dname = `${a}`;
  9814. // 创建文件流
  9815. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9816. let params = convertApi.createParams()
  9817. params.add('file', file)
  9818. resolve(file); // 通过 Promise 返回 File 对象
  9819. // try {
  9820. // let result = await convertApi.convert('docx', 'docx', params)
  9821. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  9822. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  9823. // });
  9824. // resolve(file); // 通过 Promise 返回 File 对象
  9825. // } catch (error) {
  9826. // resolve(''); // 通过 Promise 返回 File 对象
  9827. // }
  9828. });
  9829. },
  9830. beforeUploadHtml(event, index, callback) {
  9831. var file = event;
  9832. var credentials = {
  9833. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9834. secretAccessKey: "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",
  9835. }; //秘钥形式的登录上传
  9836. window.AWS.config.update(credentials);
  9837. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9838. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9839. var _this = this;
  9840. if (file) {
  9841. var params = {
  9842. Key:
  9843. file.name.split(".")[0] +
  9844. new Date().getTime() +
  9845. "." +
  9846. file.name.split(".")[file.name.split(".").length - 1],
  9847. ContentType: file.type,
  9848. Body: file,
  9849. "Access-Control-Allow-Credentials": "*",
  9850. ACL: "public-read",
  9851. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9852. var options = {
  9853. partSize: 2048 * 1024 * 1024,
  9854. queueSize: 2,
  9855. leavePartsOnError: true,
  9856. };
  9857. bucket
  9858. .upload(params, options)
  9859. .on("httpUploadProgress", function (evt) {
  9860. //这里可以写进度条
  9861. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9862. })
  9863. .send(function (err, data) {
  9864. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  9865. _this.anLoading[0] = false
  9866. }
  9867. if(_this.courseState == 5){
  9868. _this.anLoading[index] = false
  9869. }
  9870. callback ? callback() : ''
  9871. _this.$forceUpdate();
  9872. if (err) {
  9873. _this.$message.error("上传失败");
  9874. } else {
  9875. let _index = 0
  9876. // if(_this.lineCount == 0 || _this.lineCount){
  9877. // _index = _this.lineCount
  9878. // }else {
  9879. _index = index
  9880. // }
  9881. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  9882.                   name: file.name,
  9883.                   url: data.Location,
  9884.                   type: 3,
  9885.                 })
  9886. console.log(data.Location);
  9887. }
  9888. });
  9889. }
  9890. },
  9891. async generate2(a, html, index, callback) {
  9892. // 将html文件中需要用到的数据挂载到store上
  9893. const content = `<!DOCTYPE html>
  9894. <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'>
  9895. <head>
  9896. <!--[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]-->
  9897. <meta charset="UTF-8">
  9898. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9899. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9900. <title>${a}</title>
  9901. <style>
  9902. table {
  9903. border-collapse: collapse; /* 折叠边框 */
  9904. width: 100%;
  9905. }
  9906. th, td {
  9907. border: 1px solid black; /* 线条样式 */
  9908. padding: 8px;
  9909. text-align: left;
  9910. }
  9911. </style>
  9912. </head>
  9913. <body>
  9914. ${html}
  9915. </body>
  9916. </html>`;
  9917. const blob = htmlDocx.asBlob(content)
  9918. // debugger
  9919. let dname = a + ".docx";
  9920. // 创建文件流
  9921. // 创建bolb实例时,内容一定要放在[]中
  9922. // const blob = new Blob([content], {
  9923. // type: "text/plain;charset='utf-8'",
  9924. // });
  9925. // const file = new File([blob], dname, { type: 'application/msword' });
  9926. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9927. // let params = convertApi.createParams()
  9928. // params.add('file', file)
  9929. // try {
  9930. // let result = await convertApi.convert('docx', 'docx', params)
  9931. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  9932. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  9933. // });
  9934. // await this.beforeUploadHtml2(file, index, callback)
  9935. // } catch (error) {
  9936. // await this.beforeUploadHtml2(file, index, callback)
  9937. // return;
  9938. // }
  9939. await this.beforeUploadHtml2(file, index, callback)
  9940. },
  9941. beforeUploadHtml2(event, index, callback) {
  9942. var file = event;
  9943. var credentials = {
  9944. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9945. secretAccessKey: "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",
  9946. }; //秘钥形式的登录上传
  9947. window.AWS.config.update(credentials);
  9948. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9949. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9950. var _this = this;
  9951. if (file) {
  9952. var params = {
  9953. Key:
  9954. file.name.split(".")[0] +
  9955. new Date().getTime() +
  9956. "." +
  9957. file.name.split(".")[file.name.split(".").length - 1],
  9958. ContentType: file.type,
  9959. Body: file,
  9960. "Access-Control-Allow-Credentials": "*",
  9961. ACL: "public-read",
  9962. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9963. var options = {
  9964. partSize: 2048 * 1024 * 1024,
  9965. queueSize: 2,
  9966. leavePartsOnError: true,
  9967. };
  9968. bucket
  9969. .upload(params, options)
  9970. .on("httpUploadProgress", function (evt) {
  9971. //这里可以写进度条
  9972. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9973. })
  9974. .send(async function (err, data) {
  9975. if(_this.courseState == 5){
  9976. _this.loading = false
  9977. }
  9978. if (err) {
  9979. callback ? callback() : ''
  9980. _this.$message.error("上传失败");
  9981. } else {
  9982. let fileid = await _this.createFileid(data.Location)
  9983. // _this.cankaoInfoData.push({
  9984. //                   name: file.name,
  9985. //                   url: data.Location,
  9986. //                   type: 3,
  9987. // fileid: fileid,
  9988. //   })
  9989. _this.infoData2.push({
  9990.                   name: file.name,
  9991.                   url: data.Location,
  9992.                   type: 3,
  9993. fileid: fileid == 1 ? '' : fileid,
  9994.   })
  9995. _this.infoData.push({
  9996. name: file.name,
  9997. url: data.Location,
  9998. type: 3,
  9999. fileid: fileid == 1 ? '' : fileid,
  10000. });
  10001. console.log(data.Location);
  10002. callback ? callback() : ''
  10003. }
  10004. });
  10005. }
  10006. },
  10007. addSource() {
  10008. if (!Object.keys(this.sourceData).length) {
  10009. this.$message.error("请选择要上传的资源");
  10010. return;
  10011. }
  10012. let keys = Object.keys(this.sourceData);
  10013. for (var i = 0; i < keys.length; i++) {
  10014. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10015. this.lineCount
  10016. ].chapterData.unshift({
  10017. name: "链接",
  10018. title: this.sourceData[keys[i]].name,
  10019. url: this.sourceData[keys[i]].url,
  10020. type: 14,
  10021. id: keys[i],
  10022. });
  10023. }
  10024. this.$forceUpdate();
  10025. this.dialogVisibleSource = false;
  10026. },
  10027. updateSource() {
  10028. if (!Object.keys(this.sourceData).length) {
  10029. this.$message.error("请选择要上传的资源");
  10030. return;
  10031. }
  10032. let keys = Object.keys(this.sourceData);
  10033. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10034. this.taskCount
  10035. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  10036. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10037. this.taskCount
  10038. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  10039. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10040. this.taskCount
  10041. ].chapterData[this.lineCount].id = keys[0];
  10042. this.updateSourcePan = false;
  10043. this.$forceUpdate();
  10044. this.dialogVisibleSource = false;
  10045. },
  10046. deleteM(i, j) {
  10047. this.testJson.testJson[i].timuList.splice(j, 1);
  10048. },
  10049. beforeUploadTiMu(event, i) {
  10050. const loading = this.openLoading();
  10051. var file = event.target.files[0];
  10052. var credentials = {
  10053. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10054. secretAccessKey: "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",
  10055. }; //秘钥形式的登录上传
  10056. window.AWS.config.update(credentials);
  10057. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10058. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10059. var _this = this;
  10060. if (file) {
  10061. var params = {
  10062. Key:
  10063. file.name.split(".")[0] +
  10064. new Date().getTime() +
  10065. "." +
  10066. file.name.split(".")[file.name.split(".").length - 1],
  10067. ContentType: file.type,
  10068. Body: file,
  10069. "Access-Control-Allow-Credentials": "*",
  10070. ACL: "public-read",
  10071. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10072. var options = {
  10073. partSize: 2048 * 1024 * 1024,
  10074. queueSize: 2,
  10075. leavePartsOnError: true,
  10076. };
  10077. bucket
  10078. .upload(params, options)
  10079. .on("httpUploadProgress", function (evt) {
  10080. //这里可以写进度条
  10081. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10082. })
  10083. .send(function (err, data) {
  10084. loading.close();
  10085. if (err) {
  10086. _this.$message.error("上传失败");
  10087. } else {
  10088. if (_this.testJson.testJson[i].timuList) {
  10089. _this.testJson.testJson[i].timuList.push({
  10090. src: data.Location,
  10091. });
  10092. } else {
  10093. _this.testJson.testJson[i].timuList = [];
  10094. _this.testJson.testJson[i].timuList.push({
  10095. src: data.Location,
  10096. });
  10097. }
  10098. _this.imgChange3(i);
  10099. _this.$forceUpdate();
  10100. }
  10101. });
  10102. }
  10103. },
  10104. beforeUploadTi(event, i, j) {
  10105. const loading = this.openLoading();
  10106. var file = event.target.files[0];
  10107. var credentials = {
  10108. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10109. secretAccessKey: "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",
  10110. }; //秘钥形式的登录上传
  10111. window.AWS.config.update(credentials);
  10112. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10113. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10114. var _this = this;
  10115. if (file) {
  10116. var params = {
  10117. Key:
  10118. file.name.split(".")[0] +
  10119. new Date().getTime() +
  10120. "." +
  10121. file.name.split(".")[file.name.split(".").length - 1],
  10122. ContentType: file.type,
  10123. Body: file,
  10124. "Access-Control-Allow-Credentials": "*",
  10125. ACL: "public-read",
  10126. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10127. var options = {
  10128. partSize: 2048 * 1024 * 1024,
  10129. queueSize: 2,
  10130. leavePartsOnError: true,
  10131. };
  10132. bucket
  10133. .upload(params, options)
  10134. .on("httpUploadProgress", function (evt) {
  10135. //这里可以写进度条
  10136. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10137. })
  10138. .send(function (err, data) {
  10139. loading.close();
  10140. if (err) {
  10141. _this.$message.error("上传失败");
  10142. } else {
  10143. _this.testJson.testJson[i].checkList[j] = {};
  10144. _this.testJson.testJson[i].checkList[j].src = data.Location;
  10145. _this.testJson.testJson[i].checkList[j].imgType = 1;
  10146. _this.imgChange2(i, j);
  10147. _this.$forceUpdate();
  10148. }
  10149. });
  10150. }
  10151. },
  10152. beforeUpload1(event, type) {
  10153. // const loading = this.openLoading();
  10154. var file = event.target.files[0];
  10155. var credentials = {
  10156. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10157. secretAccessKey: "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",
  10158. }; //秘钥形式的登录上传
  10159. window.AWS.config.update(credentials);
  10160. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10161. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10162. var _this = this;
  10163. if (file) {
  10164. var params = {
  10165. Key:
  10166. file.name.split(".")[0] +
  10167. new Date().getTime() +
  10168. "." +
  10169. file.name.split(".")[file.name.split(".").length - 1],
  10170. ContentType: file.type,
  10171. Body: file,
  10172. "Access-Control-Allow-Credentials": "*",
  10173. ACL: "public-read",
  10174. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10175. var options = {
  10176. partSize: 2048 * 1024 * 1024,
  10177. queueSize: 2,
  10178. leavePartsOnError: true,
  10179. };
  10180. bucket
  10181. .upload(params, options)
  10182. .on("httpUploadProgress", function (evt) {
  10183. //这里可以写进度条
  10184. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10185. })
  10186. .send(function (err, data) {
  10187. // loading.close();
  10188. if (err) {
  10189. // var a = _this.$refs.upload1.uploadFiles;
  10190. // a.splice(a.length - 1, a.length);
  10191. _this.$message.error("上传失败");
  10192. } else {
  10193. // _this.cover.push({
  10194. // name: file.name,
  10195. // url: data.Location,
  10196. // uid: file.uid,
  10197. // });
  10198. _this.cover = [
  10199. {
  10200. name: file.name,
  10201. url: data.Location,
  10202. uid: file.uid,
  10203. },
  10204. ];
  10205. _this.imgChange1(null, null, 1, null);
  10206. _this.choosePicVisible = false;
  10207. console.log(data.Location);
  10208. }
  10209. });
  10210. }
  10211. },
  10212. beforeUploadSelect(event, type) {
  10213. // const loading = this.openLoading();
  10214. var file = event.target.files[0];
  10215. var credentials = {
  10216. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10217. secretAccessKey: "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",
  10218. }; //秘钥形式的登录上传
  10219. window.AWS.config.update(credentials);
  10220. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10221. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10222. var _this = this;
  10223. if (file) {
  10224. var params = {
  10225. Key:
  10226. file.name.split(".")[0] +
  10227. new Date().getTime() +
  10228. "." +
  10229. file.name.split(".")[file.name.split(".").length - 1],
  10230. ContentType: file.type,
  10231. Body: file,
  10232. "Access-Control-Allow-Credentials": "*",
  10233. ACL: "public-read",
  10234. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10235. var options = {
  10236. partSize: 2048 * 1024 * 1024,
  10237. queueSize: 2,
  10238. leavePartsOnError: true,
  10239. };
  10240. bucket
  10241. .upload(params, options)
  10242. .on("httpUploadProgress", function (evt) {
  10243. //这里可以写进度条
  10244. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10245. })
  10246. .send(function (err, data) {
  10247. // loading.close();
  10248. if (err) {
  10249. _this.$message.error("上传失败");
  10250. } else {
  10251. _this.selectJson.url = data.Location;
  10252. console.log(data.Location);
  10253. }
  10254. });
  10255. }
  10256. },
  10257. chooseSysPic(p) {
  10258. this.cover = [];
  10259. setTimeout(() => {
  10260. this.cover[0] = {
  10261. name: "系统图片.png",
  10262. url: p,
  10263. };
  10264. this.imgChange1(null, null, 1, null);
  10265. this.$forceUpdate();
  10266. }, 0);
  10267. this.isSysPic = true;
  10268. this.isSysPic2 = false;
  10269. this.sysPicVisible = false;
  10270. this.$forceUpdate();
  10271. },
  10272. chooseSysPic2(p) {
  10273. this.cover = [];
  10274. setTimeout(() => {
  10275. this.cover[0] = {
  10276. name: "网络图片.png",
  10277. url: p,
  10278. };
  10279. this.imgChange1(null, null, 1, null);
  10280. this.$forceUpdate();
  10281. }, 0);
  10282. this.isSysPic2 = true;
  10283. this.isSysPic = false;
  10284. this.sysPicVisible2 = false;
  10285. this.$forceUpdate();
  10286. },
  10287. beforeUpload(data) {
  10288. this.$refs.upload1.uploadFiles;
  10289. this.uploadLoading1 = true;
  10290. var file = data.file;
  10291. var credentials = {
  10292. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10293. secretAccessKey: "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",
  10294. }; //秘钥形式的登录上传
  10295. window.AWS.config.update(credentials);
  10296. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10297. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10298. var _this = this;
  10299. if (file) {
  10300. var params = {
  10301. Key:
  10302. file.name.split(".")[0] +
  10303. new Date().getTime() +
  10304. "." +
  10305. file.name.split(".")[file.name.split(".").length - 1],
  10306. ContentType: file.type,
  10307. Body: file,
  10308. "Access-Control-Allow-Credentials": "*",
  10309. ACL: "public-read",
  10310. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10311. var options = {
  10312. partSize: 2048 * 1024 * 1024,
  10313. queueSize: 2,
  10314. leavePartsOnError: true,
  10315. };
  10316. bucket
  10317. .upload(params, options)
  10318. .on("httpUploadProgress", function (evt) {
  10319. //这里可以写进度条
  10320. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10321. })
  10322. .send(function (err, data) {
  10323. _this.uploadLoading1 = false;
  10324. if (err) {
  10325. // var a = _this.$refs.upload1.uploadFiles;
  10326. // a.splice(a.length - 1, a.length);
  10327. _this.$message.error("上传失败");
  10328. } else {
  10329. //上传成功处理
  10330. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  10331. name: file.name,
  10332. url: data.Location,
  10333. uid: file.uid,
  10334. });
  10335. _this.imgChange();
  10336. console.log(data.Location);
  10337. }
  10338. });
  10339. }
  10340. },
  10341. onExceed() {
  10342. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  10343. },
  10344. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  10345. let file = "";
  10346. let cfindex2 = 0;
  10347. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10348. // var file = event.target.files[0];
  10349. file = event.target.files[cfindex];
  10350. let fileName = file.name
  10351. let fileUid = file.uid
  10352. // const loading = this.openLoading();
  10353. // var file = event.target.files[0];
  10354. var credentials = {
  10355. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10356. secretAccessKey: "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",
  10357. }; //秘钥形式的登录上传
  10358. window.AWS.config.update(credentials);
  10359. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10360. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10361. var _this = this;
  10362. if (type == 3) {
  10363. var b = [
  10364. "DOC",
  10365. "DOCX",
  10366. "DOCM",
  10367. "DOTM",
  10368. "DOTX",
  10369. "PPTX",
  10370. "PPSX",
  10371. "PPT",
  10372. "PPS",
  10373. "PPTM",
  10374. "POTM",
  10375. "PPAM",
  10376. "POTX",
  10377. "PPSM",
  10378. ];
  10379. if (
  10380. b.indexOf(
  10381. file.name
  10382. .split(".")
  10383. [file.name.split(".").length - 1].toLocaleUpperCase()
  10384. ) != -1
  10385. ) {
  10386. if (file.size / 1024 / 1024 > 80) {
  10387. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10388. this.inputShow = true;
  10389. // var a = _this.$refs.upload1.uploadFiles;
  10390. // a.splice(a.length - 1, a.length);
  10391. // loading.close();
  10392. return;
  10393. }
  10394. } else if (
  10395. file.name
  10396. .split(".")
  10397. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10398. ) {
  10399. if (file.size / 1024 / 1024 > 80) {
  10400. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10401. this.inputShow = true;
  10402. // var a = _this.$refs.upload1.uploadFiles;
  10403. // a.splice(a.length - 1, a.length);
  10404. // loading.close();
  10405. return;
  10406. }
  10407. }
  10408. }
  10409. this.inputShow = false;
  10410. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10411. // itemTaskIndex
  10412. // ].progress = 0;
  10413. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10414. itemTaskIndex
  10415. ].proVisible = true;
  10416. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10417. itemTaskIndex
  10418. ].isFinishSize = 0;
  10419. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10420. itemTaskIndex
  10421. ].isAllSize = event.target.files.length;
  10422. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10423. // itemTaskIndex
  10424. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10425. _this.$forceUpdate();
  10426. if (file) {
  10427. var params = {
  10428. Key:
  10429. file.name.split(".")[0] +
  10430. new Date().getTime() +
  10431. "." +
  10432. file.name.split(".")[file.name.split(".").length - 1],
  10433. ContentType: file.type,
  10434. Body: file,
  10435. "Access-Control-Allow-Credentials": "*",
  10436. ACL: "public-read",
  10437. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10438. var options = {
  10439. partSize: 2048 * 1024 * 1024,
  10440. queueSize: 2,
  10441. leavePartsOnError: true,
  10442. };
  10443. bucket
  10444. .upload(params, options)
  10445. .on("httpUploadProgress", function (evt) {
  10446. //这里可以写进度条
  10447. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10448. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10449. // itemTaskIndex
  10450. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  10451. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10452. // itemTaskIndex
  10453. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10454. // _this.$forceUpdate();
  10455. })
  10456. .send(function (err, data) {
  10457. cfindex2++
  10458. // loading.close();
  10459. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10460. // itemTaskIndex
  10461. // ].progress = 100;
  10462. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10463. itemTaskIndex
  10464. ].isFinishSize = cfindex2
  10465. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10466. // itemTaskIndex
  10467. // ].isAllSize;
  10468. _this.$forceUpdate();
  10469. setTimeout(() => {
  10470. if (
  10471. cfindex2 == event.target.files.length ||
  10472. cfindex2 > event.target.files.length
  10473. ) {
  10474. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10475. itemTaskIndex
  10476. ].proVisible = false;
  10477. }
  10478. _this.$forceUpdate();
  10479. }, 1000);
  10480. _this.inputShow = true;
  10481. if (err) {
  10482. // var a = _this.$refs.upload1.uploadFiles;
  10483. // a.splice(a.length - 1, a.length);
  10484. _this.$message.error("上传失败");
  10485. } else {
  10486. if (type == 13) {
  10487. let _type = 2;
  10488. var imgA = [
  10489. "png",
  10490. "jpg",
  10491. "jpeg",
  10492. "bmp",
  10493. "gif",
  10494. "webp",
  10495. "psd",
  10496. "svg",
  10497. "tiff",
  10498. ];
  10499. var fileA = [
  10500. "PDF",
  10501. "DOC",
  10502. "DOCX",
  10503. "DOCM",
  10504. "DOTM",
  10505. "DOTX",
  10506. "PPTX",
  10507. "PPSX",
  10508. "PPT",
  10509. "PPS",
  10510. "PPTM",
  10511. "POTM",
  10512. "PPAM",
  10513. "POTX",
  10514. "PPSM",
  10515. "XLSX",
  10516. "XLS",
  10517. ];
  10518. var videoA = [
  10519. "AVI",
  10520. "NAVI",
  10521. "MPEG",
  10522. "ASF",
  10523. "MOV",
  10524. "WMV",
  10525. "3GP",
  10526. "RM",
  10527. "RMVB",
  10528. "FLV",
  10529. "F4V",
  10530. "H.264",
  10531. "H.265",
  10532. "REAL VIDEO",
  10533. "MKV",
  10534. "WebM",
  10535. "HDDVD",
  10536. "MP4",
  10537. "MPG",
  10538. "M4V",
  10539. "MGV",
  10540. "OGV",
  10541. "QTM",
  10542. "STR",
  10543. "AMC",
  10544. "DVX",
  10545. "EVO",
  10546. "DAT",
  10547. "OGG",
  10548. "OGM",
  10549. ];
  10550. if (
  10551. fileA.indexOf(
  10552. data.Location.split(".")[
  10553. data.Location.split(".").length - 1
  10554. ].toLocaleUpperCase()
  10555. ) != -1
  10556. ) {
  10557. _type = 3;
  10558. } else if (
  10559. videoA.indexOf(
  10560. data.Location.split(".")[
  10561. data.Location.split(".").length - 1
  10562. ].toLocaleUpperCase()
  10563. ) != -1
  10564. ) {
  10565. _type = 2;
  10566. } else if (
  10567. imgA.indexOf(
  10568. data.Location.split(".")[
  10569. data.Location.split(".").length - 1
  10570. ].toLocaleLowerCase()
  10571. ) != -1
  10572. ) {
  10573. _type = 13;
  10574. } else {
  10575. _type = 12;
  10576. }
  10577. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10578. itemTaskIndex
  10579. ].chapterData.unshift({
  10580. name: fileName,
  10581. url: data.Location,
  10582. uid: fileUid,
  10583. type: _type,
  10584. });
  10585. _this.imgChange1(null, null, _type, itemTaskIndex);
  10586. } else if (type == 2 || type == 3 || type == 12) {
  10587. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10588. itemTaskIndex
  10589. ].chapterData.unshift({
  10590. name: fileName,
  10591. url: data.Location,
  10592. uid: fileUid,
  10593. type: type,
  10594. });
  10595. _this.imgChange1(null, null, type, itemTaskIndex);
  10596. } else if (type == 4) {
  10597. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10598. itemTaskIndex
  10599. ].fileList1.push({
  10600. name: fileName,
  10601. url: data.Location,
  10602. uid: fileUid,
  10603. });
  10604. _this.imgChange1(null, null, type, itemTaskIndex);
  10605. } else if (type == 5) {
  10606. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10607. itemTaskIndex
  10608. ].homeworkList.push({
  10609. name: fileName,
  10610. url: data.Location,
  10611. uid: fileUid,
  10612. });
  10613. _this.imgChange1(null, null, type, itemTaskIndex);
  10614. }
  10615. console.log(data.Location);
  10616. }
  10617. });
  10618. }
  10619. }
  10620. },
  10621. async beforeUploadInfo2(event, type, tindex) {
  10622. // const loading = this.openLoading();
  10623. let file = "";
  10624. let cfindex2 = 0;
  10625. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10626. // var file = event.target.files[0];
  10627. file = event.target.files[cfindex];
  10628. let fileName = file.name
  10629. let fileUid = file.uid
  10630. var credentials = {
  10631. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10632. secretAccessKey: "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",
  10633. }; //秘钥形式的登录上传
  10634. window.AWS.config.update(credentials);
  10635. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10636. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10637. var _this = this;
  10638. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  10639. if (
  10640. xianObj.indexOf(
  10641. file.name
  10642. .split(".")
  10643. [file.name.split(".").length - 1].toLocaleUpperCase()
  10644. ) == -1
  10645. ) {
  10646. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  10647. this.inputShow = true;
  10648. // var a = _this.$refs.upload1.uploadFiles;
  10649. // a.splice(a.length - 1, a.length);
  10650. // loading.close();
  10651. return;
  10652. }
  10653. if (
  10654. ['DOC'].indexOf(
  10655. file.name
  10656. .split(".")
  10657. [file.name.split(".").length - 1].toLocaleUpperCase()
  10658. ) !== -1
  10659. ) {
  10660. this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  10661. this.inputShow = true;
  10662. return;
  10663. }
  10664. if (type == 3) {
  10665. var b = [
  10666. "DOC",
  10667. "DOCX",
  10668. "DOCM",
  10669. "DOTM",
  10670. "DOTX",
  10671. "PPTX",
  10672. "PPSX",
  10673. "PPT",
  10674. "PPS",
  10675. "PPTM",
  10676. "POTM",
  10677. "PPAM",
  10678. "POTX",
  10679. "PPSM",
  10680. ];
  10681. if (
  10682. b.indexOf(
  10683. file.name
  10684. .split(".")
  10685. [file.name.split(".").length - 1].toLocaleUpperCase()
  10686. ) != -1
  10687. ) {
  10688. if (file.size / 1024 / 1024 > 80) {
  10689. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10690. this.inputShow = true;
  10691. // var a = _this.$refs.upload1.uploadFiles;
  10692. // a.splice(a.length - 1, a.length);
  10693. // loading.close();
  10694. return;
  10695. }
  10696. } else if (
  10697. file.name
  10698. .split(".")
  10699. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10700. ) {
  10701. if (file.size / 1024 / 1024 > 80) {
  10702. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10703. this.inputShow = true;
  10704. // var a = _this.$refs.upload1.uploadFiles;
  10705. // a.splice(a.length - 1, a.length);
  10706. // loading.close();
  10707. return;
  10708. }
  10709. }
  10710. }
  10711. this.inputShow = false;
  10712. if(type == 14){
  10713. // _this.teacherinfoprogress = 0;
  10714. _this.teacherinfoproVisible = true;
  10715. _this.teacherinfoisFinishSize = 0;
  10716. _this.teacherinfoisAllSize = event.target.files.length;
  10717. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  10718. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10719. }else if(type == 16){
  10720. _this.mubiaoinfoprogress = 0;
  10721. _this.mubiaoinfoproVisible = true;
  10722. _this.mubiaoinfoisFinishSize = 0;
  10723. _this.mubiaoinfoisAllSize = event.target.files.length;
  10724. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  10725. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10726. }else if(type == 17){
  10727. _this.xuanzeinfoprogress = 0;
  10728. _this.xuanzeinfoproVisible = true;
  10729. _this.xuanzeinfoisFinishSize = 0;
  10730. _this.xuanzeinfoisAllSize = event.target.files.length;
  10731. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10732. }else if(type == 18){
  10733. _this.pingjiainfoprogress[tindex] = 0;
  10734. _this.pingjiainfoproVisible[tindex] = true;
  10735. _this.pingjiainfoisFinishSize[tindex] = 0;
  10736. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  10737. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  10738. }else if(type == 19){
  10739. _this.knowinfoprogress = 0;
  10740. _this.knowinfoproVisible = true;
  10741. _this.knowinfoisFinishSize = 0;
  10742. _this.knowinfoisAllSize = event.target.files.length;
  10743. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  10744. }else if(type == 20){
  10745. _this.knowinfoprogress2 = 0;
  10746. _this.knowinfoproVisible2 = true;
  10747. _this.knowinfoisFinishSize2 = 0;
  10748. _this.knowinfoisAllSize2 = event.target.files.length;
  10749. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  10750. }else{
  10751. _this.infoprogress = 0;
  10752. _this.infoproVisible = true;
  10753. _this.infoisFinishSize = 0;
  10754. _this.infoisAllSize = event.target.files.length;
  10755. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10756. }
  10757. if (
  10758. ['DOC'].indexOf(
  10759. file.name
  10760. .split(".")
  10761. [file.name.split(".").length - 1].toLocaleUpperCase()
  10762. ) !== -1
  10763. ) {
  10764. // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  10765. // this.inputShow = true;
  10766. let params = convertApi.createParams()
  10767. params.add('file', file)
  10768. try {
  10769. let result = await convertApi.convert('doc', 'docx', params);
  10770. // Get result file URL
  10771. file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10772. return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10773. });
  10774. console.log(result)
  10775. console.log(file)
  10776. } catch (error) {
  10777. cfindex2++;
  10778. if(type == 14){
  10779. _this.teacherinfoisFinishSize = cfindex2;
  10780. }else if(type == 16){
  10781. _this.mubiaoinfoisFinishSize = cfindex2;
  10782. }else if(type == 17){
  10783. _this.xuanzeinfoisFinishSize = cfindex2;
  10784. }else if(type == 18){
  10785. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10786. }else if(type == 19){
  10787. _this.knowinfoisFinishSize = cfindex2;
  10788. }else if(type == 20){
  10789. _this.knowinfoisFinishSize2 = cfindex2;
  10790. }else {
  10791. _this.infoisFinishSize = cfindex2;
  10792. }
  10793. setTimeout(() => {
  10794. if (
  10795. cfindex2 == event.target.files.length ||
  10796. cfindex2 > event.target.files.length
  10797. ) {
  10798. if(type == 14){
  10799. _this.teacherinfoproVisible = false;
  10800. }else if(type == 16){
  10801. _this.mubiaoinfoproVisible = false;
  10802. }else if(type == 17){
  10803. _this.xuanzeinfoproVisible = false;
  10804. }else if(type == 18){
  10805. _this.pingjiainfoproVisible[tindex] = false;
  10806. }else if(type == 19){
  10807. _this.knowinfoproVisible = false;
  10808. }else if(type == 20){
  10809. _this.knowinfoproVisible2 = false;
  10810. }else{
  10811. _this.infoproVisible = false;
  10812. }
  10813. }
  10814. _this.$forceUpdate();
  10815. }, 1000);
  10816. _this.inputShow = true;
  10817. _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  10818. // 捕捉到这个convertApi.convert报错就不要往下走了
  10819. return; // 直接返回,不继续执行后续代码
  10820. }
  10821. // return;
  10822. }
  10823. _this.$forceUpdate();
  10824. if (file) {
  10825. var params = {
  10826. Key:
  10827. file.name.split(".")[0] +
  10828. new Date().getTime() +
  10829. "." +
  10830. file.name.split(".")[file.name.split(".").length - 1],
  10831. ContentType: file.type,
  10832. Body: file,
  10833. "Access-Control-Allow-Credentials": "*",
  10834. ACL: "public-read",
  10835. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10836. var options = {
  10837. partSize: 2048 * 1024 * 1024,
  10838. queueSize: 2,
  10839. leavePartsOnError: true,
  10840. };
  10841. bucket
  10842. .upload(params, options)
  10843. .on("httpUploadProgress", function (evt) {
  10844. //这里可以写进度条
  10845. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10846. // if(type == 14){
  10847. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10848. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10849. // }else if(type == 16){
  10850. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10851. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10852. // }else if(type == 17){
  10853. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10854. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10855. // }else if(type == 18){
  10856. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  10857. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  10858. // }else {
  10859. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  10860. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10861. // }
  10862. _this.$forceUpdate();
  10863. })
  10864. .send(async function (err, data) {
  10865. // loading.close();
  10866. // if(type == 14){
  10867. // _this.teacherinfoprogress = 100;
  10868. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  10869. // }else if(type == 16){
  10870. // _this.mubiaoinfoprogress = 100;
  10871. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  10872. // }else if(type == 17){
  10873. // _this.xuanzeinfoprogress = 100;
  10874. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  10875. // }else if(type == 18){
  10876. // _this.pingjiainfoprogress[tindex] = 100;
  10877. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  10878. // }else {
  10879. // _this.infoprogress = 100;
  10880. // _this.infoisFinishSize = _this.infoisAllSize;
  10881. // }
  10882. _this.$forceUpdate();
  10883. _this.inputShow = true;
  10884. if (err) {
  10885. cfindex2++;
  10886. if(type == 14){
  10887. _this.teacherinfoisFinishSize = cfindex2;
  10888. }else if(type == 16){
  10889. _this.mubiaoinfoisFinishSize = cfindex2;
  10890. }else if(type == 17){
  10891. _this.xuanzeinfoisFinishSize = cfindex2;
  10892. }else if(type == 18){
  10893. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10894. }else if(type == 19){
  10895. _this.knowinfoisFinishSize = cfindex2;
  10896. }else if(type == 20){
  10897. _this.knowinfoisFinishSize2 = cfindex2;
  10898. }else {
  10899. _this.infoisFinishSize = cfindex2;
  10900. }
  10901. setTimeout(() => {
  10902. if (
  10903. cfindex2 == event.target.files.length ||
  10904. cfindex2 > event.target.files.length
  10905. ) {
  10906. if(type == 14){
  10907. _this.teacherinfoproVisible = false;
  10908. }else if(type == 16){
  10909. _this.mubiaoinfoproVisible = false;
  10910. }else if(type == 17){
  10911. _this.xuanzeinfoproVisible = false;
  10912. }else if(type == 18){
  10913. _this.pingjiainfoproVisible[tindex] = false;
  10914. }else if(type == 19){
  10915. _this.knowinfoproVisible = false;
  10916. }else if(type == 20){
  10917. _this.knowinfoproVisible2 = false;
  10918. }else{
  10919. _this.infoproVisible = false;
  10920. }
  10921. }
  10922. _this.$forceUpdate();
  10923. }, 1000);
  10924. // var a = _this.$refs.upload1.uploadFiles;
  10925. // a.splice(a.length - 1, a.length);
  10926. _this.$message.error("上传失败");
  10927. } else {
  10928. let fileid = await _this.createFileid(data.Location)
  10929. if(fileid){
  10930. cfindex2++;
  10931. if(type == 14){
  10932. _this.teacherinfoisFinishSize = cfindex2;
  10933. }else if(type == 16){
  10934. _this.mubiaoinfoisFinishSize = cfindex2;
  10935. }else if(type == 17){
  10936. _this.xuanzeinfoisFinishSize = cfindex2;
  10937. }else if(type == 18){
  10938. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10939. }else if(type == 19){
  10940. _this.knowinfoisFinishSize = cfindex2;
  10941. }else if(type == 20){
  10942. _this.knowinfoisFinishSize2 = cfindex2;
  10943. }else {
  10944. _this.infoisFinishSize = cfindex2;
  10945. }
  10946. if (
  10947. cfindex2 == event.target.files.length ||
  10948. cfindex2 > event.target.files.length
  10949. ) {
  10950. if(type == 14){
  10951. _this.teacherinfoproVisible = false;
  10952. }else if(type == 16){
  10953. _this.mubiaoinfoproVisible = false;
  10954. }else if(type == 17){
  10955. _this.xuanzeinfoproVisible = false;
  10956. }else if(type == 18){
  10957. _this.pingjiainfoproVisible[tindex] = false;
  10958. }else if(type == 19){
  10959. _this.knowinfoproVisible = false;
  10960. }else if(type == 20){
  10961. _this.knowinfoproVisible2 = false;
  10962. }else{
  10963. _this.infoproVisible = false;
  10964. }
  10965. }
  10966. _this.$forceUpdate();
  10967. }
  10968. if(fileid == 1){
  10969. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  10970. return;
  10971. }
  10972. var imgA = [
  10973. "png",
  10974. "jpg",
  10975. "jpeg",
  10976. "bmp",
  10977. "gif",
  10978. "webp",
  10979. "psd",
  10980. "svg",
  10981. "tiff",
  10982. ];
  10983. var fileA = [
  10984. "PDF",
  10985. "DOC",
  10986. "DOCX",
  10987. "DOCM",
  10988. "DOTM",
  10989. "DOTX",
  10990. "PPTX",
  10991. "PPSX",
  10992. "PPT",
  10993. "PPS",
  10994. "PPTM",
  10995. "POTM",
  10996. "PPAM",
  10997. "POTX",
  10998. "PPSM",
  10999. "XLSX",
  11000. "XLS",
  11001. ];
  11002. var videoA = [
  11003. "AVI",
  11004. "NAVI",
  11005. "MPEG",
  11006. "ASF",
  11007. "MOV",
  11008. "WMV",
  11009. "3GP",
  11010. "RM",
  11011. "RMVB",
  11012. "FLV",
  11013. "F4V",
  11014. "H.264",
  11015. "H.265",
  11016. "REAL VIDEO",
  11017. "MKV",
  11018. "WebM",
  11019. "HDDVD",
  11020. "MP4",
  11021. "MPG",
  11022. "M4V",
  11023. "MGV",
  11024. "OGV",
  11025. "QTM",
  11026. "STR",
  11027. "AMC",
  11028. "DVX",
  11029. "EVO",
  11030. "DAT",
  11031. "OGG",
  11032. "OGM",
  11033. ];
  11034. let _type = 2;
  11035. if (
  11036. fileA.indexOf(
  11037. data.Location.split(".")[
  11038. data.Location.split(".").length - 1
  11039. ].toLocaleUpperCase()
  11040. ) != -1
  11041. ) {
  11042. _type = 3;
  11043. } else if (
  11044. videoA.indexOf(
  11045. data.Location.split(".")[
  11046. data.Location.split(".").length - 1
  11047. ].toLocaleUpperCase()
  11048. ) != -1
  11049. ) {
  11050. _type = 2;
  11051. } else if (
  11052. imgA.indexOf(
  11053. data.Location.split(".")[
  11054. data.Location.split(".").length - 1
  11055. ].toLocaleLowerCase()
  11056. ) != -1
  11057. ) {
  11058. _type = 13;
  11059. } else {
  11060. _type = 12;
  11061. }
  11062. if (type == 13) {
  11063. _this.infoData.push({
  11064. name: fileName,
  11065. url: data.Location,
  11066. uid: fileUid,
  11067. type: _type,
  11068. fileid: fileid == 1 ? '' : fileid,
  11069. });
  11070. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11071. name: fileName,
  11072. url: data.Location,
  11073. uid: fileUid,
  11074. type: _type,
  11075. fileid: fileid == 1 ? '' : fileid,
  11076. })
  11077. }else if (type == 14) {
  11078. _this.teacherInfoData.push({
  11079. name: fileName,
  11080. url: data.Location,
  11081. uid: fileUid,
  11082. type: _type,
  11083. fileid: fileid == 1 ? '' : fileid,
  11084. });
  11085. _this.infoData2.push({
  11086. name: fileName,
  11087. url: data.Location,
  11088. uid: fileUid,
  11089. type: _type,
  11090. fileid: fileid == 1 ? '' : fileid,
  11091. });
  11092. _this.infoData.push({
  11093. name: fileName,
  11094. url: data.Location,
  11095. uid: fileUid,
  11096. type: _type,
  11097. fileid: fileid == 1 ? '' : fileid,
  11098. });
  11099. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11100. name: fileName,
  11101. url: data.Location,
  11102. uid: fileUid,
  11103. type: _type,
  11104. fileid: fileid == 1 ? '' : fileid,
  11105. })
  11106. }else if (type == 15) {
  11107. _this.infoData2.push({
  11108. name: fileName,
  11109. url: data.Location,
  11110. uid: fileUid,
  11111. type: _type,
  11112. fileid: fileid == 1 ? '' : fileid,
  11113. });
  11114. _this.infoData.push({
  11115. name: fileName,
  11116. url: data.Location,
  11117. uid: fileUid,
  11118. type: _type,
  11119. fileid: fileid == 1 ? '' : fileid,
  11120. });
  11121. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11122. name: fileName,
  11123. url: data.Location,
  11124. uid: fileUid,
  11125. type: _type,
  11126. fileid: fileid == 1 ? '' : fileid,
  11127. })
  11128. }else if (type == 16) {
  11129. _this.mubiaoInfoData.push({
  11130. name: fileName,
  11131. url: data.Location,
  11132. uid: fileUid,
  11133. type: _type,
  11134. fileid: fileid == 1 ? '' : fileid,
  11135. });
  11136. }else if (type == 17) {
  11137. _this.xuanzeInfoData.push({
  11138. name: fileName,
  11139. url: data.Location,
  11140. uid: fileUid,
  11141. type: _type,
  11142. fileid: fileid == 1 ? '' : fileid,
  11143. });
  11144. }else if (type == 18) {
  11145. if(!_this.pingjiaInfoData[tindex]){
  11146. _this.pingjiaInfoData[tindex] = []
  11147. }
  11148. _this.pingjiaInfoData[tindex].push({
  11149. name: fileName,
  11150. url: data.Location,
  11151. uid: fileUid,
  11152. type: _type,
  11153. fileid: fileid == 1 ? '' : fileid,
  11154. });
  11155. }else if (type == 19) {
  11156. _this.knowInfoData.push({
  11157. name: fileName,
  11158. url: data.Location,
  11159. uid: fileUid,
  11160. type: _type,
  11161. fileid: fileid == 1 ? '' : fileid,
  11162. });
  11163. if(fileid != 1){
  11164. _this.knowFileids.push(fileid)
  11165. }
  11166. }else if (type == 20) {
  11167. _this.knowInfoData2.push({
  11168. name: fileName,
  11169. url: data.Location,
  11170. uid: fileUid,
  11171. type: _type,
  11172. fileid: fileid == 1 ? '' : fileid,
  11173. });
  11174. if(fileid != 1){
  11175. _this.knowFileids2.push(fileid)
  11176. }
  11177. }
  11178. console.log(data.Location);
  11179. console.log(fileName,'----------',fileid);
  11180. }
  11181. });
  11182. }
  11183. }
  11184. },
  11185. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  11186. // const loading = this.openLoading();
  11187. var file = event.target.files[0];
  11188. var credentials = {
  11189. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11190. secretAccessKey: "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",
  11191. }; //秘钥形式的登录上传
  11192. window.AWS.config.update(credentials);
  11193. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11194. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11195. var _this = this;
  11196. if (type == 3) {
  11197. var b = [
  11198. "DOC",
  11199. "DOCX",
  11200. "DOCM",
  11201. "DOTM",
  11202. "DOTX",
  11203. "PPTX",
  11204. "PPSX",
  11205. "PPT",
  11206. "PPS",
  11207. "PPTM",
  11208. "POTM",
  11209. "PPAM",
  11210. "POTX",
  11211. "PPSM",
  11212. ];
  11213. if (
  11214. b.indexOf(
  11215. file.name
  11216. .split(".")
  11217. [file.name.split(".").length - 1].toLocaleUpperCase()
  11218. ) != -1
  11219. ) {
  11220. if (file.size / 1024 / 1024 > 80) {
  11221. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11222. this.inputShow = true;
  11223. // var a = _this.$refs.upload1.uploadFiles;
  11224. // a.splice(a.length - 1, a.length);
  11225. // loading.close();
  11226. return;
  11227. }
  11228. } else if (
  11229. file.name
  11230. .split(".")
  11231. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11232. ) {
  11233. if (file.size / 1024 / 1024 > 80) {
  11234. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11235. this.inputShow = true;
  11236. // var a = _this.$refs.upload1.uploadFiles;
  11237. // a.splice(a.length - 1, a.length);
  11238. // loading.close();
  11239. return;
  11240. }
  11241. }
  11242. }
  11243. this.inputShow = false;
  11244. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11245. itemTaskIndex
  11246. ].progress = 0;
  11247. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11248. itemTaskIndex
  11249. ].proVisible = true;
  11250. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11251. itemTaskIndex
  11252. ].isFinishSize = 0;
  11253. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11254. itemTaskIndex
  11255. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11256. _this.$forceUpdate();
  11257. if (file) {
  11258. var params = {
  11259. Key:
  11260. file.name.split(".")[0] +
  11261. new Date().getTime() +
  11262. "." +
  11263. file.name.split(".")[file.name.split(".").length - 1],
  11264. ContentType: file.type,
  11265. Body: file,
  11266. "Access-Control-Allow-Credentials": "*",
  11267. ACL: "public-read",
  11268. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11269. var options = {
  11270. partSize: 2048 * 1024 * 1024,
  11271. queueSize: 2,
  11272. leavePartsOnError: true,
  11273. };
  11274. bucket
  11275. .upload(params, options)
  11276. .on("httpUploadProgress", function (evt) {
  11277. //这里可以写进度条
  11278. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11279. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11280. itemTaskIndex
  11281. ].progress = parseInt((evt.loaded / evt.total) * 100);
  11282. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11283. itemTaskIndex
  11284. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11285. _this.$forceUpdate();
  11286. })
  11287. .send(function (err, data) {
  11288. // loading.close();
  11289. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11290. itemTaskIndex
  11291. ].progress = 100;
  11292. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11293. itemTaskIndex
  11294. ].isFinishSize =
  11295. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11296. itemTaskIndex
  11297. ].isAllSize;
  11298. _this.$forceUpdate();
  11299. setTimeout(() => {
  11300. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11301. itemTaskIndex
  11302. ].proVisible = false;
  11303. _this.$forceUpdate();
  11304. }, 1000);
  11305. _this.inputShow = true;
  11306. if (err) {
  11307. // var a = _this.$refs.upload1.uploadFiles;
  11308. // a.splice(a.length - 1, a.length);
  11309. _this.$message.error("上传失败");
  11310. } else {
  11311. if (type == 2 || type == 3) {
  11312. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11313. itemTaskIndex
  11314. ].chapterData.unshift({
  11315. name: file.name,
  11316. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11317. // itemTaskIndex
  11318. // ].chapterData.length+1),
  11319. url: data.Location,
  11320. uid: file.uid,
  11321. type: type,
  11322. text: string,
  11323. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11324. // itemTaskIndex
  11325. // ].chapterData.length + 1),
  11326. });
  11327. _this.imgChange1(null, null, type, itemTaskIndex);
  11328. } else if (type == 4) {
  11329. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11330. itemTaskIndex
  11331. ].fileList1.push({
  11332. name: file.name,
  11333. url: data.Location,
  11334. uid: file.uid,
  11335. });
  11336. _this.imgChange1(null, null, type, itemTaskIndex);
  11337. } else if (type == 5) {
  11338. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11339. itemTaskIndex
  11340. ].homeworkList.push({
  11341. name: file.name,
  11342. url: data.Location,
  11343. uid: file.uid,
  11344. });
  11345. _this.imgChange1(null, null, type, itemTaskIndex);
  11346. }
  11347. console.log(data.Location);
  11348. }
  11349. });
  11350. }
  11351. },
  11352. addunit() {
  11353. this.unitJson.push({
  11354. dyName: "", //单元标题
  11355. isUpdate: 1,
  11356. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  11357. chapterInfo: [
  11358. {
  11359. isread: false,
  11360. chapterid: this.guid(),
  11361. title: "",
  11362. courseName: "",
  11363. taskJson: [
  11364. {
  11365. task: "",
  11366. taskDetail: "",
  11367. chapterData: [],
  11368. toolText: "",
  11369. toolChoose: [
  11370. {
  11371. tool: [],
  11372. toolDetail: "",
  11373. toolType: 0,
  11374. askCount: 1,
  11375. askTitle: "",
  11376. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11377. },
  11378. ],
  11379. isShowTools: false,
  11380. askCount: 1,
  11381. isFold: 1,
  11382. askTitle: "",
  11383. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11384. checkJson: [{ checkCount: [], checkPerent: [] }],
  11385. homeworkList: [],
  11386. },
  11387. ],
  11388. itemCount: 1,
  11389. fileList1: [],
  11390. video: [],
  11391. testData: [],
  11392. pData: [],
  11393. templateArray: [],
  11394. },
  11395. ],
  11396. });
  11397. this.addindex = this.unitJson.length - 1;
  11398. setTimeout(() => {
  11399. this.unitIndex = this.unitJson.length - 1;
  11400. setTimeout(() => {
  11401. console.log(this.$refs.dyInput);
  11402. this.$refs.dyInput[0].focus();
  11403. }, 100);
  11404. this.unitSet(this.unitIndex);
  11405. }, 0);
  11406. },
  11407. addToolFun(itemTaskIndex) {
  11408. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11409. itemTaskIndex
  11410. ].toolChoose.push({
  11411. tool: [],
  11412. toolDetail: "",
  11413. toolType: 0,
  11414. askCount: 1,
  11415. askTitle: "",
  11416. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11417. });
  11418. },
  11419. addTaskBorder() {
  11420. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  11421. task: "",
  11422. taskDetail: "",
  11423. chapterData: [],
  11424. toolText: "",
  11425. toolChoose: [
  11426. {
  11427. tool: [],
  11428. toolDetail: "",
  11429. toolType: 0,
  11430. askCount: 1,
  11431. askTitle: "",
  11432. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11433. },
  11434. ],
  11435. isShowTools: false,
  11436. askCount: 1,
  11437. isFold: 1, //任务收起状态
  11438. askTitle: "",
  11439. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11440. checkJson: [{ checkCount: [], checkPerent: [] }],
  11441. homeworkList: [],
  11442. });
  11443. setTimeout(() => {
  11444. this.checkEva(this.checkId);
  11445. setTimeout(() => {
  11446. this.checkEva(this.checkId);
  11447. }, 100);
  11448. }, 100);
  11449. },
  11450. addTaskBorder2(type, index) {
  11451. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  11452. this.$message({
  11453. message: "有大纲在生成请生成完之后才能使用此功能",
  11454. type: "warning"
  11455. });
  11456. return;
  11457. }
  11458. if(type == 1){
  11459. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  11460. task: "",
  11461. isTask2: true,
  11462. isTask3: true,
  11463. taskDetail: "",
  11464. chapterData: [],
  11465. toolText: "",
  11466. toolChoose: [
  11467. {
  11468. tool: [],
  11469. toolDetail: "",
  11470. toolType: 0,
  11471. askCount: 1,
  11472. askTitle: "",
  11473. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11474. },
  11475. ],
  11476. isShowTools: false,
  11477. askCount: 1,
  11478. isFold: 0, //任务收起状态
  11479. askTitle: "",
  11480. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11481. checkJson: [{ checkCount: [], checkPerent: [] }],
  11482. homeworkList: [],
  11483. })
  11484. }else if(type == 2){
  11485. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  11486. task: "",
  11487. isTask2: true,
  11488. isTask3: true,
  11489. taskDetail: "",
  11490. chapterData: [],
  11491. toolText: "",
  11492. toolChoose: [
  11493. {
  11494. tool: [],
  11495. toolDetail: "",
  11496. toolType: 0,
  11497. askCount: 1,
  11498. askTitle: "",
  11499. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11500. },
  11501. ],
  11502. isShowTools: false,
  11503. askCount: 1,
  11504. isFold: 0, //任务收起状态
  11505. askTitle: "",
  11506. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11507. checkJson: [{ checkCount: [], checkPerent: [] }],
  11508. homeworkList: [],
  11509. })
  11510. }
  11511. setTimeout(() => {
  11512. this.checkEva(this.checkId);
  11513. setTimeout(() => {
  11514. this.checkEva(this.checkId);
  11515. }, 100);
  11516. }, 100);
  11517. },
  11518. add(e, i) {
  11519. var el = e.currentTarget;
  11520. el.getElementsByTagName("input")[0].click();
  11521. },
  11522. fold(i, e) {
  11523. if (
  11524. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  11525. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  11526. ) {
  11527. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  11528. } else {
  11529. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  11530. }
  11531. },
  11532. fold2(i) {
  11533. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  11534. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11535. i
  11536. ].isFold2 = false;
  11537. } else {
  11538. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  11539. }
  11540. this.$forceUpdate();
  11541. },
  11542. foldEva(i) {
  11543. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  11544. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11545. i
  11546. ].isEvaFold = false;
  11547. } else {
  11548. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11549. i
  11550. ].isEvaFold = true;
  11551. setTimeout(() => {
  11552. this.checkEva(this.checkId);
  11553. setTimeout(() => {
  11554. this.checkEva(this.checkId);
  11555. }, 500);
  11556. }, 0);
  11557. }
  11558. this.$forceUpdate();
  11559. },
  11560. foldC(i) {
  11561. if (
  11562. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  11563. ) {
  11564. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11565. i
  11566. ].isFoldchapter = false;
  11567. } else {
  11568. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11569. i
  11570. ].isFoldchapter = true;
  11571. }
  11572. this.$forceUpdate();
  11573. },
  11574. fold3(i, ti) {
  11575. if (
  11576. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  11577. .isFold3
  11578. ) {
  11579. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  11580. ti
  11581. ].isFold3 = false;
  11582. } else {
  11583. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  11584. ti
  11585. ].isFold3 = true;
  11586. }
  11587. this.$forceUpdate();
  11588. },
  11589. deleteHomeworkBox(unitIndex, index, i) {
  11590. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  11591. this.taskCount
  11592. ].homeworkList.splice(i, 1);
  11593. },
  11594. getStudent() {
  11595. let params = {
  11596. oid: this.oid,
  11597. cu: "",
  11598. cn: this.searchPeople,
  11599. };
  11600. this.ajax
  11601. .get(this.$store.state.api + "selectStudentAdd", params)
  11602. .then((res) => {
  11603. this.studentJuri = res.data[0];
  11604. })
  11605. .catch((err) => {
  11606. this.isLoading = false;
  11607. console.error(err);
  11608. });
  11609. },
  11610. // 添加协同成员其他选项按钮
  11611. getTeacherCopy(){
  11612. this.CollLoading=true
  11613. this.collid = ''
  11614. this.collid = '1xpz'
  11615. let params = {
  11616. oid:
  11617. this.org && this.org != "undefined" && this.org != "null"
  11618. ? this.org
  11619. : this.oid,
  11620. cu: "",
  11621. cn: this.searchTN,
  11622. coll: ''
  11623. };
  11624. this.ajax
  11625. .get(
  11626. this.$store.state.api +
  11627. (this.org && this.org != "undefined" && this.org != "null"
  11628. ? "selectCollaborativeMembersOrg"
  11629. : "selectCollaborativeMembers"),
  11630. params
  11631. )
  11632. .then((res) => {
  11633. let teacherJuri = res.data[0];
  11634. this.CollaborativeTeaList = res.data[1];
  11635. for (var i = 0; i < teacherJuri.length; i++) {
  11636. if (teacherJuri[i].userid == this.userid) {
  11637. teacherJuri.splice(i, 1);
  11638. break;
  11639. }
  11640. }
  11641. this.teacherJuri = teacherJuri.filter((i,index)=>{
  11642. return (i.cclassid == '' || i.cclassid == null)
  11643. })
  11644. console.log(' this.teacherJuri', this.teacherJuri);
  11645. let _check = [];
  11646. let _check2 = [];
  11647. for (var i = 0; i < this.teacherJuri.length; i++) {
  11648. var gid = this.teacherJuri[i].userid;
  11649. _check.push(gid);
  11650. }
  11651. for (var i = 0; i < this.checkboxList3.length; i++) {
  11652. var _id = this.checkboxList3[i];
  11653. if (_check.indexOf(_id) !== -1) {
  11654. _check2.push(_id);
  11655. }
  11656. }
  11657. if (_check2.length==0 && _check.length==0) {
  11658. }else{
  11659. this.checkAll2 = _check2.length === _check.length;
  11660. }
  11661. this.CollLoading=false
  11662. })
  11663. .catch((err) => {
  11664. console.error(err);
  11665. this.CollLoading=false
  11666. });
  11667. },
  11668. getTeacher(val) {
  11669. this.CollLoading=true
  11670. this.collid = ''
  11671. this.collid = !val ? '' : val
  11672. let params = {
  11673. oid:
  11674. this.org && this.org != "undefined" && this.org != "null"
  11675. ? this.org
  11676. : this.oid,
  11677. cu: "",
  11678. cn: this.searchTN,
  11679. coll: this.collid
  11680. };
  11681. this.ajax
  11682. .get(
  11683. this.$store.state.api +
  11684. (this.org && this.org != "undefined" && this.org != "null"
  11685. ? "selectCollaborativeMembersOrg"
  11686. : "selectCollaborativeMembers"),
  11687. params
  11688. )
  11689. .then((res) => {
  11690. let teacherJuri = res.data[0];
  11691. this.CollaborativeTeaList = res.data[1];
  11692. for (var i = 0; i < teacherJuri.length; i++) {
  11693. if (teacherJuri[i].userid == this.userid) {
  11694. teacherJuri.splice(i, 1);
  11695. break;
  11696. }
  11697. }
  11698. this.teacherJuri = teacherJuri;
  11699. let _check = [];
  11700. let _check2 = [];
  11701. for (var i = 0; i < this.teacherJuri.length; i++) {
  11702. var gid = this.teacherJuri[i].userid;
  11703. _check.push(gid);
  11704. }
  11705. for (var i = 0; i < this.checkboxList3.length; i++) {
  11706. var _id = this.checkboxList3[i];
  11707. if (_check.indexOf(_id) !== -1) {
  11708. _check2.push(_id);
  11709. }
  11710. }
  11711. if (_check2.length==0 && _check.length==0) {
  11712. }else{
  11713. this.checkAll2 = _check2.length === _check.length;
  11714. }
  11715. this.CollLoading=false
  11716. })
  11717. .catch((err) => {
  11718. console.error(err);
  11719. this.CollLoading=false
  11720. });
  11721. },
  11722. searchStudent() {
  11723. this.getStudent();
  11724. },
  11725. selectGrage() {
  11726. let params = {
  11727. oid: this.oid,
  11728. };
  11729. this.ajax
  11730. .get(this.$store.state.api + "selectGrageBySchool", params)
  11731. .then((res) => {
  11732. this.gradeList = res.data[0];
  11733. })
  11734. .catch((err) => {
  11735. this.isLoading = false;
  11736. console.error(err);
  11737. });
  11738. },
  11739. //获取班级列表
  11740. getClass() {
  11741. let params = {
  11742. oid: this.oid,
  11743. gid: this.gradeId,
  11744. cn: this.classSearch,
  11745. };
  11746. this.ajax
  11747. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  11748. .then((res) => {
  11749. if (!this.grade.length) {
  11750. this.grade = res.data[0];
  11751. }
  11752. this.grade2 = res.data[0];
  11753. this.classJuri = res.data[0];
  11754. let _check = [];
  11755. let _check2 = [];
  11756. for (var i = 0; i < this.grade2.length; i++) {
  11757. var gid = this.grade2[i].id;
  11758. _check.push(gid);
  11759. }
  11760. for (var i = 0; i < this.checkboxList2.length; i++) {
  11761. var _id = this.checkboxList2[i];
  11762. if (_check.indexOf(_id) !== -1) {
  11763. _check2.push(_id);
  11764. }
  11765. }
  11766. this.checkAll = _check2.length === _check.length;
  11767. })
  11768. .catch((err) => {
  11769. this.isLoading = false;
  11770. console.error(err);
  11771. });
  11772. },
  11773. CourseType2Change(val) {
  11774. this.pTypeCheck = [];
  11775. for (var i = 0; i < this.CourseType2.length; i++) {
  11776. let typeA = this.CourseType2[i];
  11777. if (val.indexOf(typeA.name) != -1) {
  11778. this.pTypeCheck.push(...typeA.id);
  11779. }
  11780. }
  11781. },
  11782. arrayToArray(arrayo, arrayt) {
  11783. let array1 = arrayo;
  11784. let array2 = arrayt;
  11785. let commonElements = [];
  11786. for (let i = 0; i < array1.length; i++) {
  11787. for (let j = 0; j < array2.length; j++) {
  11788. if (array1[i] === array2[j]) {
  11789. commonElements.push(array1[i]);
  11790. }
  11791. }
  11792. }
  11793. return commonElements;
  11794. },
  11795. typeChange(){
  11796. let courseInfo = ``
  11797. let sub = []
  11798. let mclass = []
  11799. let theme = []
  11800. if (this.courseTypeId.length) {
  11801. for (var i = 0; i < this.courseTypeId.length; i++) {
  11802. let _sid = this.courseTypeId[i]
  11803. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11804. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  11805. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  11806. }
  11807. }
  11808. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11809. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  11810. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  11811. }
  11812. }
  11813. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11814. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  11815. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  11816. }
  11817. }
  11818. }
  11819. }
  11820. sub = JSON.parse(converter(JSON.stringify(sub)))
  11821. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  11822. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  11823. let _file = this.knowFileArray[fi]
  11824. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  11825. let fileS = _file.name ? converter(_file.name).split('/') : 1
  11826. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  11827. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  11828. let fileids = this.knowInfoData.map((item) => item.fileid)
  11829. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11830. this.knowInfoData.push({
  11831. name: _file.filename,
  11832. url: _file.url,
  11833. uid: '',
  11834. type: 3,
  11835. fileid: _file.fileid,
  11836. });
  11837. this.knowFileids.push(_file.fileid)
  11838. }
  11839. fileids = this.knowInfoData.map((item) => item.fileid)
  11840. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11841. this.knowInfoData.push({
  11842. name: _file.filename,
  11843. url: _file.url,
  11844. uid: '',
  11845. type: 3,
  11846. fileid: _file.fileid,
  11847. });
  11848. this.knowFileids.push(_file.fileid)
  11849. }
  11850. fileids = this.knowInfoData.map((item) => item.fileid)
  11851. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11852. this.knowInfoData.push({
  11853. name: _file.filename,
  11854. url: _file.url,
  11855. uid: '',
  11856. type: 3,
  11857. fileid: _file.fileid,
  11858. });
  11859. this.knowFileids.push(_file.fileid)
  11860. }
  11861. fileids = this.knowInfoData.map((item) => item.fileid)
  11862. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11863. this.knowInfoData.push({
  11864. name: _file.filename,
  11865. url: _file.url,
  11866. uid: '',
  11867. type: 3,
  11868. fileid: _file.fileid,
  11869. });
  11870. this.knowFileids.push(_file.fileid)
  11871. }
  11872. fileids = this.knowInfoData.map((item) => item.fileid)
  11873. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  11874. this.knowInfoData.push({
  11875. name: _file.filename,
  11876. url: _file.url,
  11877. uid: '',
  11878. type: 3,
  11879. fileid: _file.fileid,
  11880. });
  11881. this.knowFileids.push(_file.fileid)
  11882. }
  11883. }
  11884. if(mclass.length){
  11885. courseInfo += `年级:${mclass.join(',')} `
  11886. }
  11887. if(sub.length){
  11888. courseInfo += `学科:${sub.join(',')} `
  11889. }
  11890. if(theme.length){
  11891. courseInfo += `主题:${theme.join(',')} `
  11892. }
  11893. this.addCourseBehavior('courseBehavior', `点击选择分类-${courseInfo}`)
  11894. },
  11895. getChapterData(e, i, j, ic, type) {
  11896. e.stopPropagation();
  11897. this.updataC = true;
  11898. this.icc = ic;
  11899. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  11900. console.log("还不能下载图片喔");
  11901. }
  11902. },
  11903. deleteChapterData(e, i, j, ic, taskI) {
  11904. e.stopPropagation();
  11905. let _this = this;
  11906. _this
  11907. .$confirm("确定删除此项?", "提示", {
  11908. confirmButtonText: "确定",
  11909. cancelButtonText: "取消",
  11910. type: "warning",
  11911. })
  11912. .then(() => {
  11913. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  11914. ic,
  11915. 1
  11916. );
  11917. })
  11918. .catch(() => {
  11919. return;
  11920. });
  11921. },
  11922. checkInfoData(fileid, file){
  11923. let type = 1
  11924. let index = 0
  11925. for(let i = 0; i < this.infoData.length; i++){
  11926. if(this.infoData[i].fileid == fileid){
  11927. type = 2
  11928. index = i
  11929. }
  11930. }
  11931. if(type == 2){
  11932. this.infoData.splice(index, 1)
  11933. }else {
  11934. this.infoData.push({...file})
  11935. }
  11936. },
  11937. checkKnowInfoData(fileid){
  11938. if(this.knowFileids.indexOf(fileid) == -1){
  11939. this.knowFileids.push(fileid)
  11940. }else {
  11941. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  11942. }
  11943. },
  11944. checkKnowInfoData2(fileid){
  11945. if(!fileid){
  11946. return
  11947. }
  11948. if(this.knowFileids2.indexOf(fileid) == -1){
  11949. this.knowFileids2.push(fileid)
  11950. }else {
  11951. this.knowFileids2.splice(this.knowFileids2.indexOf(fileid), 1)
  11952. }
  11953. },
  11954. checkKnowInfoData3(fileid){
  11955. if(this.knowFileids3.indexOf(fileid) == -1){
  11956. this.knowFileids3.push(fileid)
  11957. }else {
  11958. this.knowFileids3.splice(this.knowFileids3.indexOf(fileid), 1)
  11959. }
  11960. },
  11961. deleteInfoData(e, ic) {
  11962. e.stopPropagation();
  11963. let _this = this;
  11964. _this
  11965. .$confirm("确定删除此项?", "提示", {
  11966. confirmButtonText: "确定",
  11967. cancelButtonText: "取消",
  11968. type: "warning",
  11969. })
  11970. .then(() => {
  11971. _this.infoData.splice(
  11972. ic,
  11973. 1
  11974. );
  11975. })
  11976. .catch(() => {
  11977. return;
  11978. });
  11979. },
  11980. deleteInfoData2(e, ic) {
  11981. e.stopPropagation();
  11982. let _this = this;
  11983. _this
  11984. .$confirm("确定删除此项?", "提示", {
  11985. confirmButtonText: "确定",
  11986. cancelButtonText: "取消",
  11987. type: "warning",
  11988. })
  11989. .then(() => {
  11990. let fileid = _this.infoData2[ic].fileid;
  11991. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  11992. _this.infoData2.splice(
  11993. ic,
  11994. 1
  11995. );
  11996. })
  11997. .catch(() => {
  11998. return;
  11999. });
  12000. },
  12001. deleteKnowInfoData(e, ic) {
  12002. e.stopPropagation();
  12003. let _this = this;
  12004. _this
  12005. .$confirm("确定删除此项?", "提示", {
  12006. confirmButtonText: "确定",
  12007. cancelButtonText: "取消",
  12008. type: "warning",
  12009. })
  12010. .then(() => {
  12011. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12012. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  12013. }
  12014. _this.knowInfoData.splice(
  12015. ic,
  12016. 1
  12017. );
  12018. })
  12019. .catch(() => {
  12020. return;
  12021. });
  12022. },
  12023. deleteKnowInfoData2(e, ic) {
  12024. e.stopPropagation();
  12025. let _this = this;
  12026. _this
  12027. .$confirm("确定删除此项?", "提示", {
  12028. confirmButtonText: "确定",
  12029. cancelButtonText: "取消",
  12030. type: "warning",
  12031. })
  12032. .then(() => {
  12033. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12034. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  12035. }
  12036. _this.knowInfoData2.splice(
  12037. ic,
  12038. 1
  12039. );
  12040. })
  12041. .catch(() => {
  12042. return;
  12043. });
  12044. },
  12045. deletemubiaoInfoData(e, ic) {
  12046. e.stopPropagation();
  12047. let _this = this;
  12048. _this
  12049. .$confirm("确定删除此项?", "提示", {
  12050. confirmButtonText: "确定",
  12051. cancelButtonText: "取消",
  12052. type: "warning",
  12053. })
  12054. .then(() => {
  12055. _this.mubiaoInfoData.splice(
  12056. ic,
  12057. 1
  12058. );
  12059. })
  12060. .catch(() => {
  12061. return;
  12062. });
  12063. },
  12064. deletexuanzeInfoData(e, ic) {
  12065. e.stopPropagation();
  12066. let _this = this;
  12067. _this
  12068. .$confirm("确定删除此项?", "提示", {
  12069. confirmButtonText: "确定",
  12070. cancelButtonText: "取消",
  12071. type: "warning",
  12072. })
  12073. .then(() => {
  12074. _this.xuanzeInfoData.splice(
  12075. ic,
  12076. 1
  12077. );
  12078. })
  12079. .catch(() => {
  12080. return;
  12081. });
  12082. },
  12083. deletepingjiaInfoData(e, ic, tindex) {
  12084. e.stopPropagation();
  12085. let _this = this;
  12086. _this
  12087. .$confirm("确定删除此项?", "提示", {
  12088. confirmButtonText: "确定",
  12089. cancelButtonText: "取消",
  12090. type: "warning",
  12091. })
  12092. .then(() => {
  12093. _this.pingjiaInfoData[tindex].splice(
  12094. ic,
  12095. 1
  12096. );
  12097. })
  12098. .catch(() => {
  12099. return;
  12100. });
  12101. },
  12102. deleteCankaoInfoData(e, ic) {
  12103. e.stopPropagation();
  12104. let _this = this;
  12105. _this
  12106. .$confirm("确定删除此项?", "提示", {
  12107. confirmButtonText: "确定",
  12108. cancelButtonText: "取消",
  12109. type: "warning",
  12110. })
  12111. .then(() => {
  12112. _this.cankaoInfoData.splice(
  12113. ic,
  12114. 1
  12115. );
  12116. })
  12117. .catch(() => {
  12118. return;
  12119. });
  12120. },
  12121. deleteTeacherInfoData(e, ic) {
  12122. e.stopPropagation();
  12123. let _this = this;
  12124. _this
  12125. .$confirm("确定删除此项?", "提示", {
  12126. confirmButtonText: "确定",
  12127. cancelButtonText: "取消",
  12128. type: "warning",
  12129. })
  12130. .then(() => {
  12131. _this.teacherInfoData.splice(
  12132. ic,
  12133. 1
  12134. );
  12135. })
  12136. .catch(() => {
  12137. return;
  12138. });
  12139. },
  12140. updataVideoT(e, i, j, ic) {
  12141. // e.stopPropagation();
  12142. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  12143. // ic
  12144. // ].name = JSON.parse(JSON.stringify(e.target.value));
  12145. this.line =
  12146. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  12147. this.taskCount = j;
  12148. this.lineCount = ic;
  12149. this.dialogVisibleupdataVideoT = true;
  12150. this.$forceUpdate();
  12151. },
  12152. checkChpater(e, i, j, ic){
  12153. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  12154. if(type == 3){
  12155. var fileA = [
  12156. "DOC",
  12157. "DOCX",
  12158. "DOCM",
  12159. "DOTM",
  12160. "DOTX",
  12161. "PPTX",
  12162. "PPSX",
  12163. "PPT",
  12164. "PPS",
  12165. "PPTM",
  12166. "POTM",
  12167. "PPAM",
  12168. "POTX",
  12169. "PPSM",
  12170. "XLSX",
  12171. "XLS"
  12172. ];
  12173. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  12174. if (
  12175. fileA.indexOf(
  12176. url.split(".")[
  12177. url.split(".").length - 1
  12178. ].toLocaleUpperCase()
  12179. ) != -1
  12180. ) {
  12181. this.dialogVisibleOffice = true
  12182. this.wurl = url
  12183. } else if (
  12184. "pdf".indexOf(
  12185. url.split(".")[
  12186. url.split(".").length - 1
  12187. ].toLocaleLowerCase()
  12188. ) != -1
  12189. ) {
  12190. this.dialogVisiblePdf = true
  12191. this.wurl = url
  12192. }
  12193. }
  12194. },
  12195. checkChpater2(e, ic){
  12196. let type = this.infoData2[ic].type
  12197. if(type == 3){
  12198. var fileA = [
  12199. "DOC",
  12200. "DOCX",
  12201. "DOCM",
  12202. "DOTM",
  12203. "DOTX",
  12204. "PPTX",
  12205. "PPSX",
  12206. "PPT",
  12207. "PPS",
  12208. "PPTM",
  12209. "POTM",
  12210. "PPAM",
  12211. "POTX",
  12212. "PPSM",
  12213. "XLSX",
  12214. "XLS"
  12215. ];
  12216. let url = this.infoData2[ic].url
  12217. if (
  12218. fileA.indexOf(
  12219. url.split(".")[
  12220. url.split(".").length - 1
  12221. ].toLocaleUpperCase()
  12222. ) != -1
  12223. ) {
  12224. this.dialogVisibleOffice = true
  12225. this.wurl = url
  12226. } else if (
  12227. "pdf".indexOf(
  12228. url.split(".")[
  12229. url.split(".").length - 1
  12230. ].toLocaleLowerCase()
  12231. ) != -1
  12232. ) {
  12233. this.dialogVisiblePdf = true
  12234. this.wurl = url
  12235. }
  12236. }
  12237. },
  12238. checkChpater3(e, ic, item){
  12239. let type = item.type
  12240. if(type == 3){
  12241. var fileA = [
  12242. "DOC",
  12243. "DOCX",
  12244. "DOCM",
  12245. "DOTM",
  12246. "DOTX",
  12247. "PPTX",
  12248. "PPSX",
  12249. "PPT",
  12250. "PPS",
  12251. "PPTM",
  12252. "POTM",
  12253. "PPAM",
  12254. "POTX",
  12255. "PPSM",
  12256. "XLSX",
  12257. "XLS"
  12258. ];
  12259. let url = item.url
  12260. if (
  12261. fileA.indexOf(
  12262. url.split(".")[
  12263. url.split(".").length - 1
  12264. ].toLocaleUpperCase()
  12265. ) != -1
  12266. ) {
  12267. this.dialogVisibleOffice = true
  12268. this.wurl = url
  12269. } else if (
  12270. "pdf".indexOf(
  12271. url.split(".")[
  12272. url.split(".").length - 1
  12273. ].toLocaleLowerCase()
  12274. ) != -1
  12275. ) {
  12276. this.dialogVisiblePdf = true
  12277. this.wurl = url
  12278. }
  12279. }
  12280. },
  12281. updataVideoC() {
  12282. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12283. this.taskCount
  12284. ].chapterData[this.lineCount].name = JSON.parse(
  12285. JSON.stringify(this.line)
  12286. );
  12287. this.dialogVisibleupdataVideoT = false;
  12288. this.$forceUpdate();
  12289. },
  12290. upCd(e, i, j, taskCount, ic) {
  12291. e.stopPropagation();
  12292. if (ic == 0) {
  12293. return;
  12294. }
  12295. var a = JSON.parse(
  12296. JSON.stringify(
  12297. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  12298. ic - 1
  12299. ]
  12300. )
  12301. );
  12302. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  12303. JSON.parse(
  12304. JSON.stringify(
  12305. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  12306. )
  12307. );
  12308. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  12309. this.$forceUpdate();
  12310. },
  12311. downCd(e, i, j, taskCount, ic) {
  12312. e.stopPropagation();
  12313. if (
  12314. ic ==
  12315. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  12316. 1
  12317. ) {
  12318. return;
  12319. }
  12320. var a = JSON.parse(
  12321. JSON.stringify(
  12322. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  12323. ic + 1
  12324. ]
  12325. )
  12326. );
  12327. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  12328. JSON.parse(
  12329. JSON.stringify(
  12330. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  12331. )
  12332. );
  12333. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  12334. this.$forceUpdate();
  12335. },
  12336. async upTool(e, i, j, tooli) {
  12337. e.stopPropagation();
  12338. if (tooli == 0) {
  12339. return;
  12340. }
  12341. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  12342. let count2 = await this.getWorksCount(3, i, j, tooli);
  12343. if (count1 > 0 || count2 > 0) {
  12344. this.$confirm(
  12345. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  12346. "提示",
  12347. {
  12348. confirmButtonText: "确定",
  12349. cancelButtonText: "取消",
  12350. type: "warning",
  12351. }
  12352. )
  12353. .then(() => {
  12354. var a = JSON.parse(
  12355. JSON.stringify(
  12356. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  12357. tooli - 1
  12358. ]
  12359. )
  12360. );
  12361. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  12362. JSON.parse(
  12363. JSON.stringify(
  12364. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12365. )
  12366. );
  12367. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12368. this.$forceUpdate();
  12369. })
  12370. .catch(() => {
  12371. return;
  12372. });
  12373. } else {
  12374. var a = JSON.parse(
  12375. JSON.stringify(
  12376. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  12377. )
  12378. );
  12379. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  12380. JSON.parse(
  12381. JSON.stringify(
  12382. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12383. )
  12384. );
  12385. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12386. this.$forceUpdate();
  12387. }
  12388. },
  12389. async downTool(e, i, j, tooli) {
  12390. e.stopPropagation();
  12391. if (
  12392. tooli ==
  12393. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  12394. ) {
  12395. return;
  12396. }
  12397. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  12398. let count2 = await this.getWorksCount(3, i, j, tooli);
  12399. if (count1 > 0 || count2 > 0) {
  12400. this.$confirm(
  12401. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  12402. "提示",
  12403. {
  12404. confirmButtonText: "确定",
  12405. cancelButtonText: "取消",
  12406. type: "warning",
  12407. }
  12408. )
  12409. .then(() => {
  12410. var a = JSON.parse(
  12411. JSON.stringify(
  12412. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  12413. tooli + 1
  12414. ]
  12415. )
  12416. );
  12417. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  12418. JSON.parse(
  12419. JSON.stringify(
  12420. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12421. )
  12422. );
  12423. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12424. this.$forceUpdate();
  12425. })
  12426. .catch(() => {
  12427. return;
  12428. });
  12429. } else {
  12430. var a = JSON.parse(
  12431. JSON.stringify(
  12432. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  12433. )
  12434. );
  12435. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  12436. JSON.parse(
  12437. JSON.stringify(
  12438. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12439. )
  12440. );
  12441. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12442. this.$forceUpdate();
  12443. }
  12444. },
  12445. addWork(type) {
  12446. if(type == 2 && this.courseName == "") {
  12447. this.$message.error("请补充填写课程名称");
  12448. return;
  12449. }
  12450. let cPan = 1;
  12451. for (var i = 0; i < this.unitJson.length; i++) {
  12452. for (
  12453. var j = 0;
  12454. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  12455. j++
  12456. ) {
  12457. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  12458. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  12459. if (
  12460. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  12461. ) {
  12462. for (
  12463. var z = 0;
  12464. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  12465. z++
  12466. ) {
  12467. if (
  12468. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  12469. .length
  12470. ) {
  12471. this.$message.error("请把工具添加完整");
  12472. cPan = 2;
  12473. break;
  12474. }
  12475. }
  12476. }
  12477. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  12478. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  12479. i
  12480. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  12481. return ele.value != "" || ele.detail != "" || ele.target != "";
  12482. });
  12483. }
  12484. }
  12485. }
  12486. this.inputShow = true;
  12487. if (cPan == 2) {
  12488. this.steps--;
  12489. return;
  12490. }
  12491. for (var i = 0; i < this.unitJson.length; i++) {
  12492. delete this.unitJson[i].isUpdate;
  12493. }
  12494. if(!this.targetCourseText2){
  12495. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  12496. }
  12497. let params = [
  12498. {
  12499. uid: this.userid,
  12500. title: this.courseName,
  12501. brief: this.courseText,
  12502. cover:
  12503. this.cover.length > 0
  12504. ? JSON.stringify(this.cover)
  12505. : JSON.stringify([
  12506. {
  12507. name: "noBanner.jpg",
  12508. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  12509. uid: 1656409780264,
  12510. status: "success",
  12511. },
  12512. ]),
  12513. evaId: this.evalua,
  12514. astudent:
  12515. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  12516. see: this.isTeacherSee == true ? 1 : 0,
  12517. chapters: JSON.stringify(this.unitJson),
  12518. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  12519. courseType: JSON.stringify(this.courseTypeId),
  12520. ateacher:
  12521. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  12522. inviteCode: JSON.stringify(this.inviteCode),
  12523. refile: JSON.stringify(this.infoData),
  12524. reBrief: this.courseText2,
  12525. cpote: JSON.stringify(this.cpote),
  12526. setting: JSON.stringify({
  12527. courseJie: this.courseJie,
  12528. courseTime: this.courseTime,
  12529. teacherInfoData: this.teacherInfoData,
  12530. teacherCourseText: this.teacherCourseText,
  12531. targetCourseText: this.targetCourseText,
  12532. cankaoInfoData: this.cankaoInfoData,
  12533. mubiaoInfoData: this.mubiaoInfoData,
  12534. xuanzeInfoData: this.xuanzeInfoData,
  12535. pingjiaInfoData: this.pingjiaInfoData,
  12536. infoData2: this.infoData2,
  12537. isuseT: this.isuseT,
  12538. mode: this.mode,
  12539. targetCourseText2: this.targetCourseText2,
  12540. chatid: this.chatid,
  12541. languageSetting: this.languageSetting,
  12542. knowInfoData: this.knowInfoData,
  12543. knowFileids: this.knowFileids,
  12544. knowInfoData2: this.knowInfoData2,
  12545. knowFileids2: this.knowFileids2,
  12546. recordVideoText: this.recordVideoText,
  12547. recordAudioUrl: this.recordAudioUrl,
  12548. }),
  12549. iresearch: this.isFileSearch ? 1 : 2,
  12550. },
  12551. ];
  12552. this.ajax
  12553. .post(this.$store.state.api + "addWorkNew2AI3", params)
  12554. .then((res) => {
  12555. console.log(this.steps);
  12556. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  12557. this.$message({
  12558. message: "新增成功",
  12559. type: "success",
  12560. });
  12561. }
  12562. this.number = res.data.ordernumber;
  12563. this.courseId = res.data.courseId;
  12564. this.cid = res.data.courseId;
  12565. this.courseUserid = this.userid;
  12566. this.islogin = true;
  12567. // this.updateCourseState(4);
  12568. this.updateCourseState(5);
  12569. this.addtips()
  12570. if(type == 2){
  12571. this.retrunCourse()
  12572. }
  12573. if(type == 3){
  12574. this.steps = 4
  12575. }
  12576. })
  12577. .catch((err) => {
  12578. this.$message.error("网络不佳");
  12579. console.error(err);
  12580. });
  12581. },
  12582. goCourse() {
  12583. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  12584. },
  12585. updateWork2() {
  12586. let _unitIndex = this.unitIndex;
  12587. let cPan = 1;
  12588. for (
  12589. var j = 0;
  12590. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  12591. j++
  12592. ) {
  12593. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  12594. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  12595. j
  12596. ].proVisible2 = false;
  12597. if (
  12598. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12599. .length > 1
  12600. ) {
  12601. for (
  12602. var z = 0;
  12603. z <
  12604. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12605. .length;
  12606. z++
  12607. ) {
  12608. if (
  12609. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  12610. z
  12611. ].tool.length
  12612. ) {
  12613. this.$message.error("请把工具添加完整");
  12614. cPan = 2;
  12615. break;
  12616. }
  12617. }
  12618. }
  12619. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  12620. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  12621. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  12622. (ele) => {
  12623. return ele.value != "" || ele.detail != "" || ele.target != "";
  12624. }
  12625. );
  12626. }
  12627. }
  12628. this.inputShow = true;
  12629. if (cPan == 2) {
  12630. this.steps--;
  12631. return;
  12632. }
  12633. let params = [
  12634. {
  12635. cid: this.cid,
  12636. chapters: JSON.stringify(this.unitJson),
  12637. uid: this.userid,
  12638. unitIndex: _unitIndex,
  12639. },
  12640. ];
  12641. this.ajax
  12642. .post(this.$store.state.api + "updateWorkNew4", params)
  12643. .then((res) => {
  12644. this.$message({
  12645. message: "修改成功",
  12646. type: "success",
  12647. });
  12648. this.courseId = this.cid;
  12649. this.addtips();
  12650. })
  12651. .catch((err) => {
  12652. this.$message.error("网络不佳");
  12653. console.error(err);
  12654. });
  12655. },
  12656. updateWork3(unitIndex) {
  12657. let _unitIndex = unitIndex;
  12658. let cPan = 1;
  12659. for (
  12660. var j = 0;
  12661. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  12662. j++
  12663. ) {
  12664. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  12665. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  12666. j
  12667. ].proVisible2 = false;
  12668. if (
  12669. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12670. .length > 1
  12671. ) {
  12672. for (
  12673. var z = 0;
  12674. z <
  12675. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12676. .length;
  12677. z++
  12678. ) {
  12679. if (
  12680. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  12681. z
  12682. ].tool.length
  12683. ) {
  12684. this.$message.error("请把工具添加完整");
  12685. cPan = 2;
  12686. break;
  12687. }
  12688. }
  12689. }
  12690. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  12691. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  12692. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  12693. (ele) => {
  12694. return ele.value != "" || ele.detail != "" || ele.target != "";
  12695. }
  12696. );
  12697. }
  12698. }
  12699. this.inputShow = true;
  12700. if (cPan == 2) {
  12701. this.steps--;
  12702. return;
  12703. }
  12704. let params = [
  12705. {
  12706. cid: this.cid,
  12707. chapters: JSON.stringify(this.unitJson),
  12708. uid: this.userid,
  12709. unitIndex: _unitIndex,
  12710. },
  12711. ];
  12712. this.ajax
  12713. .post(this.$store.state.api + "updateWorkNew4", params)
  12714. .then((res) => {
  12715. // this.$message({
  12716. // message: "修改成功",
  12717. // type: "success",
  12718. // });
  12719. this.courseId = this.cid;
  12720. this.addtips()
  12721. })
  12722. .catch((err) => {
  12723. this.$message.error("网络不佳");
  12724. console.error(err);
  12725. });
  12726. },
  12727. updateWork() {
  12728. let cPan = 1;
  12729. for (var i = 0; i < this.unitJson.length; i++) {
  12730. for (
  12731. var j = 0;
  12732. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  12733. j++
  12734. ) {
  12735. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  12736. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  12737. if (
  12738. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  12739. ) {
  12740. for (
  12741. var z = 0;
  12742. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  12743. z++
  12744. ) {
  12745. if (
  12746. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  12747. .length
  12748. ) {
  12749. this.$message.error("请把工具添加完整");
  12750. cPan = 2;
  12751. break;
  12752. }
  12753. }
  12754. }
  12755. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  12756. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  12757. i
  12758. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  12759. return ele.value != "" || ele.detail != "" || ele.target != "";
  12760. });
  12761. }
  12762. }
  12763. }
  12764. this.inputShow = true;
  12765. if (cPan == 2) {
  12766. this.steps--;
  12767. return;
  12768. }
  12769. for (var i = 0; i < this.unitJson.length; i++) {
  12770. delete this.unitJson[i].isUpdate;
  12771. }
  12772. if(!this.targetCourseText2){
  12773. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  12774. }
  12775. let params = [
  12776. {
  12777. cid: this.cid,
  12778. title: this.courseName,
  12779. brief: this.courseText,
  12780. cover:
  12781. this.cover.length > 0
  12782. ? JSON.stringify(this.cover)
  12783. : JSON.stringify([
  12784. {
  12785. name: "noBanner.jpg",
  12786. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  12787. uid: 1656409780264,
  12788. status: "success",
  12789. },
  12790. ]),
  12791. evaId: this.evalua,
  12792. astudent:
  12793. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  12794. see: this.isTeacherSee == true ? 1 : 0,
  12795. chapters: JSON.stringify(this.unitJson),
  12796. template: this.myWord != "undefined" ? this.myWord : [],
  12797. uid: this.userid,
  12798. courseType: JSON.stringify(this.courseTypeId),
  12799. ateacher:
  12800. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  12801. inviteCode: JSON.stringify(this.inviteCode),
  12802. refile: JSON.stringify(this.infoData),
  12803. reBrief: this.courseText2,
  12804. cpote: JSON.stringify(this.cpote),
  12805. setting: JSON.stringify({
  12806. courseJie: this.courseJie,
  12807. courseTime: this.courseTime,
  12808. teacherInfoData: this.teacherInfoData,
  12809. teacherCourseText: this.teacherCourseText,
  12810. targetCourseText: this.targetCourseText,
  12811. cankaoInfoData: this.cankaoInfoData,
  12812. mubiaoInfoData: this.mubiaoInfoData,
  12813. xuanzeInfoData: this.xuanzeInfoData,
  12814. pingjiaInfoData: this.pingjiaInfoData,
  12815. infoData2: this.infoData2,
  12816. isuseT: this.isuseT,
  12817. mode: this.mode,
  12818. targetCourseText2: this.targetCourseText2,
  12819. chatid: this.chatid,
  12820. languageSetting: this.languageSetting,
  12821. knowInfoData: this.knowInfoData,
  12822. knowFileids: this.knowFileids,
  12823. knowInfoData2: this.knowInfoData2,
  12824. knowFileids2: this.knowFileids2,
  12825. recordVideoText: this.recordVideoText,
  12826. recordAudioUrl: this.recordAudioUrl,
  12827. }),
  12828. iresearch: this.isFileSearch ? 1 : 2,
  12829. },
  12830. ];
  12831. this.ajax
  12832. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  12833. .then((res) => {
  12834. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  12835. if (this.cidType == 1) {
  12836. this.$message({
  12837. message: "修改成功",
  12838. type: "success",
  12839. });
  12840. } else {
  12841. this.$message({
  12842. message: "新增成功",
  12843. type: "success",
  12844. });
  12845. }
  12846. }
  12847. this.number = this.nbOrder;
  12848. this.courseId = this.cid;
  12849. this.addtips()
  12850. })
  12851. .catch((err) => {
  12852. this.$message.error("网络不佳");
  12853. console.error(err);
  12854. });
  12855. },
  12856. insertWord() {
  12857. this.dialogVisible1 = true;
  12858. this.updateBoolean2 = false;
  12859. this.tTitle = "";
  12860. this.tdetail = "";
  12861. },
  12862. addWord() {
  12863. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  12864. name: this.tTitle,
  12865. content: this.tdetail,
  12866. uid: this.guid(),
  12867. });
  12868. this.dialogVisible1 = false;
  12869. },
  12870. upWord() { },
  12871. selectWord(uid, i, c) {
  12872. this.dialogVisible1 = true;
  12873. this.updateBoolean2 = true;
  12874. if (
  12875. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  12876. ) {
  12877. this.tTitle =
  12878. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  12879. this.tdetail =
  12880. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  12881. }
  12882. },
  12883. isAddPP() {
  12884. if (this.checkboxList.length > 0) {
  12885. this.$message({
  12886. message: "添加成功",
  12887. type: "success",
  12888. });
  12889. this.dialogVisible3 = false;
  12890. } else {
  12891. this.$message({
  12892. message: "请添加课程成员",
  12893. type: "error",
  12894. });
  12895. }
  12896. },
  12897. isAddClass() {
  12898. this.dialogVisibleClass = false;
  12899. },
  12900. isAddPPTeacher() {
  12901. this.dialogVisibleMember = false;
  12902. this.setMan();
  12903. },
  12904. getTipsTemplate(){
  12905. if(this.templateid){
  12906. let params = {
  12907. id: this.templateid
  12908. }
  12909. this.ajax
  12910. .get(this.$store.state.api + "selectTipsTemplateById", params)
  12911. .then((res) => {
  12912. if(res.data[0].length){
  12913. this.tipsJson = res.data[0][0]
  12914. this.aiJson = JSON.parse(res.data[0][0].tips)
  12915. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12916. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12917. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12918. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12919. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12920. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12921. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12922. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12923. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12924. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12925. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12926. }
  12927. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  12928. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  12929. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  12930. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  12931. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  12932. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  12933. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  12934. - 我们的课程主题可以如何与学生的实际生活联系起来?
  12935. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  12936. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  12937. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  12938. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  12939. - 学生个人最终要完成什么?学生小组最终要完成什么?
  12940. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  12941. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  12942. 问题:<议程和问题引导>中的问题
  12943. 讨论:<转文本内容>`
  12944. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下<讨论>,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  12945. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  12946. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  12947. // }
  12948. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  12949. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12950. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12951. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12952. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  12953. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12954. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  12955. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12956. // }
  12957. this.$forceUpdate();
  12958. this.isDialog = res.data[0][0].isDialog
  12959. }
  12960. })
  12961. .catch((err) => { });
  12962. }
  12963. },
  12964. getTipsTemplateIsDialog(){
  12965. if(this.templateid){
  12966. let params = {
  12967. id: this.templateid
  12968. }
  12969. this.ajax
  12970. .get(this.$store.state.api + "selectTipsTemplateById", params)
  12971. .then((res) => {
  12972. if(res.data[0].length){
  12973. this.isDialog = res.data[0][0].isDialog
  12974. }
  12975. })
  12976. .catch((err) => { });
  12977. }
  12978. },
  12979. getTemplate() {
  12980. this.ajax
  12981. .get(this.$store.state.api + "getCourseTemplateT", "")
  12982. .then((res) => {
  12983. this.templateArray = res.data[0];
  12984. this.getTemplateOid();
  12985. this.$forceUpdate();
  12986. })
  12987. .catch((err) => { });
  12988. },
  12989. getTemplateOid() {
  12990. let params = {
  12991. oid: this.oid,
  12992. };
  12993. this.ajax
  12994. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  12995. .then((res) => {
  12996. if (res.data[0].length) {
  12997. this.templateArray = [...res.data[0], ...this.templateArray];
  12998. }
  12999. this.getTemplateOrg();
  13000. this.$forceUpdate();
  13001. })
  13002. .catch((err) => { });
  13003. },
  13004. getTemplateOrg() {
  13005. let params = {
  13006. oid: this.org,
  13007. };
  13008. this.ajax
  13009. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13010. .then((res) => {
  13011. if (res.data[0].length) {
  13012. this.templateArray = [...res.data[0], ...this.templateArray];
  13013. }
  13014. this.$forceUpdate();
  13015. })
  13016. .catch((err) => { });
  13017. },
  13018. clearChoose() {
  13019. this.clearArray.splice(this.templateC.id, 1);
  13020. this.dialogVisible2 = false;
  13021. },
  13022. clearAttText() {
  13023. this.AttText = {
  13024. title: "",
  13025. text: "",
  13026. };
  13027. this.dialogVisible6 = false;
  13028. },
  13029. clearLine() {
  13030. this.line = "";
  13031. this.dialogVisible7 = false;
  13032. },
  13033. openTemplate() {
  13034. this.ctJson = {};
  13035. this.templateDialog = true;
  13036. },
  13037. checkctJson(json) {
  13038. if (this.ctJson.id == json.id) {
  13039. this.ctJson = {};
  13040. } else {
  13041. this.ctJson = json;
  13042. }
  13043. },
  13044. addTemplate(res) {
  13045. let _this = this;
  13046. let _res = [];
  13047. if (res.id == 1) {
  13048. _res = [
  13049. {
  13050. dyName: "", //单元标题
  13051. easy: 1,
  13052. chapterInfo: [
  13053. {
  13054. isread: false,
  13055. chapterid: this.guid(),
  13056. title: "",
  13057. courseName: "",
  13058. taskJson: [
  13059. {
  13060. task: "",
  13061. taskDetail: "",
  13062. chapterData: [],
  13063. toolText: "",
  13064. toolChoose: [
  13065. {
  13066. tool: [],
  13067. toolDetail: "",
  13068. toolType: 0,
  13069. askCount: 1,
  13070. askTitle: "",
  13071. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13072. },
  13073. ],
  13074. isShowTools: false,
  13075. askCount: 1,
  13076. isFold: 1,
  13077. askTitle: "",
  13078. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13079. checkJson: [{ checkCount: [], checkPerent: [] }],
  13080. homeworkList: [],
  13081. },
  13082. ],
  13083. itemCount: 1,
  13084. fileList1: [],
  13085. video: [],
  13086. testData: [],
  13087. pData: [],
  13088. templateArray: [],
  13089. },
  13090. ],
  13091. },
  13092. ];
  13093. this.updateCourseState(1);
  13094. } else if (res.id == 2) {
  13095. let stageData = [];
  13096. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13097. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13098. if (!iframe && !iframe2) {
  13099. this.$message.error("请使用AI共创生成");
  13100. return;
  13101. }
  13102. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13103. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13104. if (
  13105. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13106. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13107. ) {
  13108. this.$message.error("请使用AI共创生成");
  13109. return;
  13110. }
  13111. stageData = copyData
  13112. ? copyData.stageData
  13113. : copyData2
  13114. ? copyData2.stageData
  13115. : [""];
  13116. for (var i = 0; i < stageData.length; i++) {
  13117. _res.push({
  13118. dyName: stageData[i], //单元标题
  13119. chapterInfo: [
  13120. {
  13121. isread: false,
  13122. chapterid: this.guid(),
  13123. title: "",
  13124. courseName: "",
  13125. taskJson: [
  13126. {
  13127. task: "",
  13128. taskDetail: "",
  13129. chapterData: [],
  13130. toolText: "",
  13131. toolChoose: [
  13132. {
  13133. tool: [],
  13134. toolDetail: "",
  13135. toolType: 0,
  13136. askCount: 1,
  13137. askTitle: "",
  13138. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13139. },
  13140. ],
  13141. isShowTools: false,
  13142. askCount: 1,
  13143. isFold: 1,
  13144. askTitle: "",
  13145. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13146. checkJson: [{ checkCount: [], checkPerent: [] }],
  13147. homeworkList: [],
  13148. },
  13149. ],
  13150. itemCount: 1,
  13151. fileList1: [],
  13152. video: [],
  13153. testData: [],
  13154. pData: [],
  13155. templateArray: [],
  13156. },
  13157. ],
  13158. });
  13159. }
  13160. this.updateCourseState(1);
  13161. } else if (!Object.keys(res).length) {
  13162. this.$message.error("请选择模板");
  13163. retrun;
  13164. } else {
  13165. _res = JSON.parse(res.chapters);
  13166. this.updateCourseState(parseInt(res.state));
  13167. }
  13168. _this
  13169. .$confirm(
  13170. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13171. "提示",
  13172. {
  13173. confirmButtonText: "确定",
  13174. cancelButtonText: "取消",
  13175. type: "warning",
  13176. }
  13177. )
  13178. .then(() => {
  13179. _this.unitJson = _res;
  13180. _this.updateWork();
  13181. // _this.steps++;
  13182. _this.templateDialog = false;
  13183. setTimeout(() => {
  13184. this.checkEva(this.checkId);
  13185. setTimeout(() => {
  13186. this.checkEva(this.checkId);
  13187. }, 100);
  13188. }, 1000);
  13189. })
  13190. .catch(() => {
  13191. return;
  13192. });
  13193. },
  13194. checkTemplate(res) {
  13195. let _this = this;
  13196. _this
  13197. .$confirm(
  13198. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13199. "提示",
  13200. {
  13201. confirmButtonText: "确定",
  13202. cancelButtonText: "取消",
  13203. type: "warning",
  13204. }
  13205. )
  13206. .then(() => {
  13207. _this.unitJson = JSON.parse(res.chapters);
  13208. _this.steps++;
  13209. setTimeout(() => {
  13210. this.checkEva(this.checkId);
  13211. setTimeout(() => {
  13212. this.checkEva(this.checkId);
  13213. }, 100);
  13214. }, 1000);
  13215. })
  13216. .catch(() => {
  13217. return;
  13218. });
  13219. },
  13220. checkTemplate1(w) {
  13221. this.steps++;
  13222. },
  13223. checkTemplate2() {
  13224. let _this = this;
  13225. _this
  13226. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  13227. confirmButtonText: "确定",
  13228. cancelButtonText: "取消",
  13229. type: "warning",
  13230. })
  13231. .then(() => {
  13232. _this.unitIndex = 0;
  13233. _this.unitJson = [
  13234. {
  13235. dyName: "", //单元标题
  13236. chapterInfo: [
  13237. {
  13238. isread: false,
  13239. chapterid: this.guid(),
  13240. title: "",
  13241. courseName: "",
  13242. taskJson: [
  13243. {
  13244. task: "",
  13245. taskDetail: "",
  13246. chapterData: [],
  13247. toolText: "",
  13248. toolChoose: [
  13249. {
  13250. tool: [],
  13251. toolDetail: "",
  13252. toolType: 0,
  13253. askCount: 1,
  13254. askTitle: "",
  13255. askJson: [
  13256. { askstitle: "", askItem: 1, checkList: [] },
  13257. ],
  13258. },
  13259. ],
  13260. isShowTools: false,
  13261. askCount: 1,
  13262. isFold: 1,
  13263. askTitle: "",
  13264. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13265. checkJson: [{ checkCount: [], checkPerent: [] }],
  13266. homeworkList: [],
  13267. },
  13268. ],
  13269. itemCount: 1,
  13270. fileList1: [],
  13271. video: [],
  13272. testData: [],
  13273. pData: [],
  13274. templateArray: [],
  13275. },
  13276. ],
  13277. },
  13278. ];
  13279. this.steps++;
  13280. setTimeout(() => {
  13281. this.checkEva(this.checkId);
  13282. setTimeout(() => {
  13283. this.checkEva(this.checkId);
  13284. }, 100);
  13285. }, 1000);
  13286. this.updateWork();
  13287. })
  13288. .catch(() => {
  13289. return;
  13290. });
  13291. },
  13292. checkTemplate3() {
  13293. let _this = this;
  13294. _this
  13295. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  13296. confirmButtonText: "确定",
  13297. cancelButtonText: "取消",
  13298. type: "warning",
  13299. })
  13300. .then(() => {
  13301. _this.unitIndex = 0;
  13302. _this.unitJson = [
  13303. {
  13304. dyName: "", //单元标题
  13305. easy: 1,
  13306. chapterInfo: [
  13307. {
  13308. isread: false,
  13309. chapterid: this.guid(),
  13310. title: "",
  13311. courseName: "",
  13312. taskJson: [
  13313. {
  13314. task: "",
  13315. taskDetail: "",
  13316. chapterData: [],
  13317. toolText: "",
  13318. toolChoose: [
  13319. {
  13320. tool: [],
  13321. toolDetail: "",
  13322. toolType: 0,
  13323. askCount: 1,
  13324. askTitle: "",
  13325. askJson: [
  13326. { askstitle: "", askItem: 1, checkList: [] },
  13327. ],
  13328. },
  13329. ],
  13330. isShowTools: false,
  13331. askCount: 1,
  13332. isFold: 1,
  13333. askTitle: "",
  13334. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13335. checkJson: [{ checkCount: [], checkPerent: [] }],
  13336. homeworkList: [],
  13337. },
  13338. ],
  13339. itemCount: 1,
  13340. fileList1: [],
  13341. video: [],
  13342. testData: [],
  13343. pData: [],
  13344. templateArray: [],
  13345. },
  13346. ],
  13347. },
  13348. ];
  13349. // this.steps++;
  13350. this.updateWork();
  13351. })
  13352. .catch(() => {
  13353. return;
  13354. });
  13355. },
  13356. checkTemplate4() {
  13357. let _this = this;
  13358. _this
  13359. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  13360. confirmButtonText: "确定",
  13361. cancelButtonText: "取消",
  13362. type: "warning",
  13363. })
  13364. .then(() => {
  13365. _this.unitIndex = 0;
  13366. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  13367. this.steps++;
  13368. this.updateWork();
  13369. })
  13370. .catch(() => {
  13371. return;
  13372. });
  13373. },
  13374. wordNext() {
  13375. this.dialogVisible2 = false;
  13376. },
  13377. isAddOrUpdateAttText() {
  13378. if (this.AttTextType == 0) {
  13379. this.addAttTextMessage();
  13380. } else {
  13381. this.updateAttText();
  13382. }
  13383. },
  13384. isAddOrUpdateLine() {
  13385. if (!this.lineTitle) {
  13386. this.$message.error("请填写链接标题");
  13387. return;
  13388. }
  13389. if (this.lineType == 0) {
  13390. this.addLine();
  13391. } else {
  13392. this.updateLine();
  13393. }
  13394. },
  13395. addAttTextMessage() {
  13396. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13397. this.taskCount
  13398. ].chapterData.unshift({
  13399. name: this.AttText.title,
  13400. url: this.AttText.text,
  13401. type: 6,
  13402. });
  13403. this.imgChange1(null, null, 6, this.taskCount);
  13404. this.dialogVisible6 = false;
  13405. },
  13406. selectAttText(itemTaskIndex, i) {
  13407. this.AttText.title =
  13408. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13409. itemTaskIndex
  13410. ].chapterData[i].name;
  13411. this.AttText.text =
  13412. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13413. itemTaskIndex
  13414. ].chapterData[i].url;
  13415. this.taskCount = itemTaskIndex;
  13416. this.AttTextIndex = i;
  13417. this.AttTextType = 1;
  13418. this.dialogVisible6 = true;
  13419. },
  13420. updateAttText() {
  13421. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13422. this.taskCount
  13423. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  13424. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13425. this.taskCount
  13426. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  13427. this.dialogVisible6 = false;
  13428. },
  13429. addLine() {
  13430. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13431. this.lineCount
  13432. ].chapterData.unshift({
  13433. name: "链接",
  13434. title: this.lineTitle,
  13435. url: this.line,
  13436. type: 8,
  13437. });
  13438. this.imgChange1(null, null, 8, this.lineCount);
  13439. this.dialogVisible7 = false;
  13440. },
  13441. selectLine(itemTaskIndex, i) {
  13442. this.line =
  13443. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13444. itemTaskIndex
  13445. ].chapterData[i].url;
  13446. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13447. itemTaskIndex
  13448. ].chapterData[i].title
  13449. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13450. .chapterData[i].title
  13451. : "";
  13452. this.taskCount = itemTaskIndex;
  13453. this.lineCount = i;
  13454. this.lineType = 1;
  13455. this.dialogVisible7 = true;
  13456. },
  13457. openUpdateSource(itemTaskIndex, i) {
  13458. this.sourceData = {};
  13459. let source =
  13460. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13461. .chapterData[i];
  13462. this.sourceData[source.id] = {};
  13463. this.sourceData[source.id].name = source.title;
  13464. this.sourceData[source.id].url = source.url;
  13465. this.dialogVisibleSource = true;
  13466. this.updateSourcePan = true;
  13467. this.taskCount = itemTaskIndex;
  13468. this.lineCount = i;
  13469. },
  13470. updateLine() {
  13471. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13472. this.taskCount
  13473. ].chapterData[this.lineCount].url = this.line;
  13474. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13475. this.taskCount
  13476. ].chapterData[this.lineCount].title = this.lineTitle;
  13477. this.dialogVisible7 = false;
  13478. },
  13479. addPP() {
  13480. this.dialogVisible3 = true;
  13481. },
  13482. goTo(path) {
  13483. this.$router.push(path);
  13484. },
  13485. openTools(itemTaskIndex, i, toolIndex) {
  13486. this.toolIndex = toolIndex;
  13487. this.taskCount = itemTaskIndex;
  13488. if (i == 4) {
  13489. if (toolIndex == null) {
  13490. var a =
  13491. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13492. .chapterData;
  13493. for (var i = 0; i < a.length; i++) {
  13494. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  13495. this.askJson =
  13496. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13497. itemTaskIndex
  13498. ].chapterData[i].askJson;
  13499. }
  13500. }
  13501. } else {
  13502. this.askJson = JSON.parse(
  13503. JSON.stringify(
  13504. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13505. itemTaskIndex
  13506. ].toolChoose[toolIndex]
  13507. )
  13508. );
  13509. }
  13510. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  13511. this.dialogVisible5 = true;
  13512. } else if (i == 45) {
  13513. if (
  13514. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13515. .toolChoose[toolIndex].testJson
  13516. ) {
  13517. this.testJson = JSON.parse(
  13518. JSON.stringify(
  13519. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13520. itemTaskIndex
  13521. ].toolChoose[toolIndex].testJson
  13522. )
  13523. );
  13524. } else {
  13525. var testJson = {
  13526. testCount: 1,
  13527. testTitle: "",
  13528. testJson: [
  13529. {
  13530. teststitle: "",
  13531. testItem: 1,
  13532. checkList: [],
  13533. timuList: [],
  13534. answer: [],
  13535. type: "1",
  13536. },
  13537. ],
  13538. };
  13539. this.testJson = testJson;
  13540. }
  13541. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  13542. this.dialogVisibleChoice = true;
  13543. } else if (i == 47) {
  13544. if (
  13545. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13546. .toolChoose[toolIndex].sentenceList
  13547. ) {
  13548. this.sentenceList = JSON.parse(
  13549. JSON.stringify(
  13550. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13551. itemTaskIndex
  13552. ].toolChoose[toolIndex].sentenceList
  13553. )
  13554. );
  13555. } else {
  13556. var sentenceList = [
  13557. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  13558. ];
  13559. this.sentenceList = sentenceList;
  13560. }
  13561. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  13562. this.dialogVisibleSentence = true;
  13563. } else if (i == 48) {
  13564. if (
  13565. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13566. .toolChoose[toolIndex].tableJson
  13567. ) {
  13568. this.tableJson = JSON.parse(
  13569. JSON.stringify(
  13570. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13571. itemTaskIndex
  13572. ].toolChoose[toolIndex].tableJson
  13573. )
  13574. );
  13575. } else {
  13576. var tableJson = { text: "" };
  13577. this.tableJson = tableJson;
  13578. }
  13579. this.dialogVisibleTable = true;
  13580. } else if (i == 52) {
  13581. if (
  13582. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13583. .toolChoose[toolIndex].wordJson
  13584. ) {
  13585. this.wordJson = JSON.parse(
  13586. JSON.stringify(
  13587. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13588. itemTaskIndex
  13589. ].toolChoose[toolIndex].wordJson
  13590. )
  13591. );
  13592. } else {
  13593. var wordJson = { text: "" };
  13594. this.wordJson = wordJson;
  13595. }
  13596. this.dialogVisibleWord = true;
  13597. // else if (i == 50) {
  13598. // if (
  13599. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13600. // .toolChoose[toolIndex].uploadJson
  13601. // ) {
  13602. // this.uploadJson = JSON.parse(
  13603. // JSON.stringify(
  13604. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13605. // itemTaskIndex
  13606. // ].toolChoose[toolIndex].uploadJson
  13607. // )
  13608. // );
  13609. // } else {
  13610. // var uploadJson = [];
  13611. // this.uploadJson = uploadJson;
  13612. // }
  13613. // this.dialogVisibleMoreUpload = true;
  13614. // }
  13615. } else if (i == 10) {
  13616. if (
  13617. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13618. .toolChoose[toolIndex].preTime
  13619. ) {
  13620. this.preTime = JSON.parse(
  13621. JSON.stringify(
  13622. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13623. itemTaskIndex
  13624. ].toolChoose[toolIndex].preTime
  13625. )
  13626. );
  13627. } else {
  13628. var preTime = 0;
  13629. this.preTime = preTime;
  13630. }
  13631. this.dialogVisiblePreTime = true;
  13632. } else if (i == 49) {
  13633. if (
  13634. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13635. .toolChoose[toolIndex].groupJson
  13636. ) {
  13637. this.groupJson = JSON.parse(
  13638. JSON.stringify(
  13639. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13640. itemTaskIndex
  13641. ].toolChoose[toolIndex].groupJson
  13642. )
  13643. );
  13644. } else {
  13645. var groupJson = {
  13646. group: [{ name: "第1组" }],
  13647. number: undefined,
  13648. islock: 1,
  13649. };
  13650. this.groupJson = groupJson;
  13651. }
  13652. this.dialogVisibleGroup = true;
  13653. } else if (i == 62) {
  13654. if (
  13655. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13656. .toolChoose[toolIndex].videoJson
  13657. ) {
  13658. this.videoJson = JSON.parse(
  13659. JSON.stringify(
  13660. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13661. itemTaskIndex
  13662. ].toolChoose[toolIndex].videoJson
  13663. )
  13664. );
  13665. } else {
  13666. var videoJson = {
  13667. video: "",
  13668. setting: [],
  13669. };
  13670. this.videoJson = videoJson;
  13671. }
  13672. this.dialogVisibleVideo = true;
  13673. } else if (i == 15) {
  13674. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13675. itemTaskIndex
  13676. ].toolChoose[toolIndex].answerQ
  13677. ? JSON.parse(
  13678. JSON.stringify(
  13679. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13680. itemTaskIndex
  13681. ].toolChoose[toolIndex].answerQ
  13682. )
  13683. )
  13684. : "";
  13685. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  13686. this.dialogVisible8 = true;
  13687. } else if (i == 40) {
  13688. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13689. itemTaskIndex
  13690. ].toolChoose[toolIndex].rateJson
  13691. ? JSON.parse(
  13692. JSON.stringify(
  13693. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13694. itemTaskIndex
  13695. ].toolChoose[toolIndex].rateJson
  13696. )
  13697. )
  13698. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  13699. this.selectSteps = 1;
  13700. this.dialogVisibleRate = true;
  13701. } else if (i == 42) {
  13702. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13703. itemTaskIndex
  13704. ].toolChoose[toolIndex].answerQ
  13705. ? JSON.parse(
  13706. JSON.stringify(
  13707. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13708. itemTaskIndex
  13709. ].toolChoose[toolIndex].answerQ
  13710. )
  13711. )
  13712. : "";
  13713. this.dialogVisibleMp3 = true;
  13714. } else if (i == 41) {
  13715. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13716. itemTaskIndex
  13717. ].toolChoose[toolIndex].selectJson
  13718. ? JSON.parse(
  13719. JSON.stringify(
  13720. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13721. itemTaskIndex
  13722. ].toolChoose[toolIndex].selectJson
  13723. )
  13724. )
  13725. : { url: "", select: [], answer: [] };
  13726. this.selectSteps = 1;
  13727. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  13728. this.dialogVisibleSelect = true;
  13729. } else if (i == 3) {
  13730. top.postMessage(
  13731. {
  13732. tools: "3y",
  13733. cid: this.cid,
  13734. stage: this.unitIndex,
  13735. task: itemTaskIndex,
  13736. tool: toolIndex,
  13737. },
  13738. "*"
  13739. );
  13740. } else if (i == 1) {
  13741. top.postMessage(
  13742. {
  13743. tools: "1y",
  13744. cid: this.cid,
  13745. stage: this.unitIndex,
  13746. task: itemTaskIndex,
  13747. tool: toolIndex,
  13748. },
  13749. "*"
  13750. );
  13751. } else if (i == 57) {
  13752. top.postMessage(
  13753. {
  13754. tools: "57y",
  13755. cid: this.cid,
  13756. stage: this.unitIndex,
  13757. task: itemTaskIndex,
  13758. tool: toolIndex,
  13759. },
  13760. "*"
  13761. );
  13762. } else if (i == 69) {
  13763. this.englishList = {};
  13764. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  13765. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  13766. ? JSON.parse(
  13767. JSON.stringify(
  13768. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13769. itemTaskIndex
  13770. ].toolChoose[toolIndex].englishList
  13771. )
  13772. )
  13773. : {};
  13774. this.$forceUpdate();
  13775. this.englishDialogVisible = true;
  13776. } else if (i == 70) {
  13777. this.englishVoiceJson = {};
  13778. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  13779. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  13780. ? JSON.parse(
  13781. JSON.stringify(
  13782. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13783. itemTaskIndex
  13784. ].toolChoose[toolIndex].englishVoiceJson
  13785. )
  13786. )
  13787. : {
  13788. title: '',
  13789. detail: '',
  13790. array: []
  13791. };
  13792. // {
  13793. // time: "",
  13794. // class: "",
  13795. // difficulty: 0,
  13796. // topic: "",
  13797. // isShow: false,
  13798. // eva: 0,
  13799. // aiEva: {
  13800. // isAiEva: false,
  13801. // aiEvaChoose: [],
  13802. // },
  13803. // allfType: [],
  13804. // englishJson: {},
  13805. // };
  13806. this.$forceUpdate();
  13807. this.EnglishVoiceDialog = true;
  13808. }
  13809. },
  13810. setEnglishVoiceJson(val) {
  13811. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13812. this.taskCount
  13813. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  13814. JSON.stringify(val)
  13815. );
  13816. this.$forceUpdate();
  13817. if (
  13818. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13819. .toolChoose[this.toolIndex].tool != 70
  13820. ) {
  13821. this.addTools(70, this.taskCount, this.toolIndex);
  13822. }
  13823. },
  13824. chapAddTools(i) {
  13825. if (this.chapTools[0].tools.length == 0) {
  13826. this.chapTools[0].tools.push(i);
  13827. } else {
  13828. if (this.chapTools[0].tools.indexOf(i) != -1) {
  13829. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  13830. } else {
  13831. this.chapTools[0].tools.push(i);
  13832. }
  13833. }
  13834. this.$forceUpdate();
  13835. },
  13836. addChaptersDataTools() {
  13837. if (this.chapTools[0].tools.indexOf(4) != -1) {
  13838. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13839. this.chapCount
  13840. ].chapterData.unshift({
  13841. name: this.chapTools[0].toolDetail,
  13842. url: this.chapTools[0].tools,
  13843. type: 7,
  13844. askJson: this.askJson,
  13845. });
  13846. } else {
  13847. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13848. this.chapCount
  13849. ].chapterData.unshift({
  13850. name: this.chapTools[0].toolDetail,
  13851. url: this.chapTools[0].tools,
  13852. type: 7,
  13853. });
  13854. }
  13855. this.imgChange1(null, null, 7, this.chapCount);
  13856. this.dialogVisible4 = false;
  13857. },
  13858. addTools(i, itemTaskIndex, toolIndex) {
  13859. // if (
  13860. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13861. // .toolChoose[toolIndex].tool.length == 0
  13862. // ) {
  13863. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13864. // itemTaskIndex
  13865. // ].toolChoose[toolIndex].tool.push(i);
  13866. // } else {
  13867. // if (
  13868. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13869. // itemTaskIndex
  13870. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  13871. // ) {
  13872. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13873. // itemTaskIndex
  13874. // ].toolChoose[toolIndex].tool.splice(
  13875. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13876. // itemTaskIndex
  13877. // ].toolChoose[toolIndex].tool.indexOf(i),
  13878. // 1
  13879. // );
  13880. // } else {
  13881. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13882. // itemTaskIndex
  13883. // ].toolChoose[toolIndex].tool.push(i);
  13884. // }
  13885. // console.log(
  13886. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13887. // .toolChoose[toolIndex].tool
  13888. // );
  13889. // }
  13890. if (i == 4) {
  13891. if (
  13892. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13893. .toolChoose[toolIndex].askJson.askTitle == "" ||
  13894. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13895. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  13896. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13897. .toolChoose[toolIndex].askJson[0].checkList < 2
  13898. ) {
  13899. this.openTools(itemTaskIndex, 4, toolIndex);
  13900. // this.$message({
  13901. // message: "请填写完整问卷内容",
  13902. // type: "error",
  13903. // });
  13904. return;
  13905. }
  13906. }
  13907. if (i == 45) {
  13908. if (
  13909. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13910. .toolChoose[toolIndex].testJson ||
  13911. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13912. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  13913. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13914. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  13915. ) {
  13916. this.openTools(itemTaskIndex, 45, toolIndex);
  13917. // this.$message({
  13918. // message: "请填写完整问卷内容",
  13919. // type: "error",
  13920. // });
  13921. return;
  13922. }
  13923. }
  13924. if (i == 47) {
  13925. if (
  13926. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13927. .toolChoose[toolIndex].sentenceList ||
  13928. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13929. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  13930. ) {
  13931. this.openTools(itemTaskIndex, 47, toolIndex);
  13932. return;
  13933. }
  13934. }
  13935. if (i == 69) {
  13936. if (
  13937. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13938. .toolChoose[toolIndex].englishList
  13939. ) {
  13940. this.openTools(itemTaskIndex, 69, toolIndex);
  13941. return;
  13942. }
  13943. }
  13944. if (i == 70) {
  13945. if (
  13946. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13947. .toolChoose[toolIndex].englishVoiceJson
  13948. ) {
  13949. this.openTools(itemTaskIndex, 70, toolIndex);
  13950. return;
  13951. }
  13952. }
  13953. // if (i == 48) {
  13954. // if (
  13955. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13956. // .toolChoose[toolIndex].tableJson
  13957. // ) {
  13958. // this.openTools(itemTaskIndex, 48, toolIndex);
  13959. // return;
  13960. // }
  13961. // }
  13962. // if (i == 50) {
  13963. // if (
  13964. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13965. // .toolChoose[toolIndex].uploadJson
  13966. // ) {
  13967. // this.openTools(itemTaskIndex, 50, toolIndex);
  13968. // return;
  13969. // }
  13970. // }
  13971. if (i == 49) {
  13972. if (
  13973. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13974. .toolChoose[toolIndex].groupJson
  13975. ) {
  13976. this.openTools(itemTaskIndex, 49, toolIndex);
  13977. return;
  13978. }
  13979. }
  13980. if (i == 62) {
  13981. if (
  13982. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13983. .toolChoose[toolIndex].videoJson
  13984. ) {
  13985. this.openTools(itemTaskIndex, 62, toolIndex);
  13986. return;
  13987. }
  13988. }
  13989. if (i == 15) {
  13990. if (
  13991. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13992. .toolChoose[toolIndex].answerQ ||
  13993. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13994. .toolChoose[toolIndex].answerQ == ""
  13995. ) {
  13996. this.openTools(itemTaskIndex, 15, toolIndex);
  13997. // this.$message({
  13998. // message: "请填写问答内容",
  13999. // type: "error",
  14000. // });
  14001. return;
  14002. }
  14003. }
  14004. if (i == 40) {
  14005. if (
  14006. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14007. .toolChoose[toolIndex].rateJson ||
  14008. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14009. .toolChoose[toolIndex].rateJson.length
  14010. ) {
  14011. this.openTools(itemTaskIndex, 40, toolIndex);
  14012. return;
  14013. }
  14014. }
  14015. if (i == 41) {
  14016. if (
  14017. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14018. .toolChoose[toolIndex].selectJson ||
  14019. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14020. .toolChoose[toolIndex].selectJson.url == "" ||
  14021. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14022. .toolChoose[toolIndex].selectJson.select.length ||
  14023. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14024. .toolChoose[toolIndex].selectJson.answer.length
  14025. ) {
  14026. this.openTools(itemTaskIndex, 41, toolIndex);
  14027. return;
  14028. }
  14029. }
  14030. if (i == 42) {
  14031. if (
  14032. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14033. .toolChoose[toolIndex].answerQ ||
  14034. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14035. .toolChoose[toolIndex].answerQ == ""
  14036. ) {
  14037. this.openTools(itemTaskIndex, 42, toolIndex);
  14038. return;
  14039. }
  14040. }
  14041. if (
  14042. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14043. .toolChoose[toolIndex].tool.length > 0
  14044. ) {
  14045. if (
  14046. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14047. itemTaskIndex
  14048. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14049. ) {
  14050. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14051. itemTaskIndex
  14052. ].toolChoose[toolIndex].tool.splice(
  14053. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14054. itemTaskIndex
  14055. ].toolChoose[toolIndex].tool.indexOf(i),
  14056. 1
  14057. );
  14058. } else {
  14059. // this.$message({
  14060. // message: "每个工具只能添加一个",
  14061. // type: "error",
  14062. // });
  14063. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14064. itemTaskIndex
  14065. ].toolChoose[toolIndex].tool = [];
  14066. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14067. itemTaskIndex
  14068. ].toolChoose[toolIndex].tool.push(i);
  14069. }
  14070. } else {
  14071. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14072. itemTaskIndex
  14073. ].toolChoose[toolIndex].tool.push(i);
  14074. }
  14075. this.$forceUpdate();
  14076. },
  14077. addAskList(index) {
  14078. this.askJson.askJson.splice(index + 1, 0, {
  14079. askstitle: "",
  14080. askItem: 1,
  14081. checkList: [],
  14082. });
  14083. this.askJson.askCount++;
  14084. },
  14085. addTestList(index) {
  14086. this.testJson.testJson.splice(index + 1, 0, {
  14087. teststitle: "",
  14088. testItem: 1,
  14089. checkList: [],
  14090. timuList: [],
  14091. answer: [],
  14092. type: "1",
  14093. });
  14094. this.testJson.testCount++;
  14095. },
  14096. deleteAskList(index) {
  14097. if (
  14098. !this.askJson.askJson[index].askstitle &&
  14099. this.askJson.askJson[index].askItem == 1 &&
  14100. !this.askJson.askJson[index].checkList[0]
  14101. ) {
  14102. this.askJson.askJson.splice(index, 1);
  14103. this.askJson.askCount--;
  14104. } else {
  14105. let _this = this;
  14106. _this
  14107. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14108. confirmButtonText: "确定",
  14109. cancelButtonText: "取消",
  14110. type: "warning",
  14111. })
  14112. .then(() => {
  14113. _this.askJson.askJson.splice(index, 1);
  14114. _this.askJson.askCount--;
  14115. })
  14116. .catch(() => {
  14117. return;
  14118. });
  14119. }
  14120. },
  14121. deleteTestList(index) {
  14122. if (
  14123. !this.testJson.testJson[index].teststitle &&
  14124. this.testJson.testJson[index].testItem == 1 &&
  14125. !this.testJson.testJson[index].checkList[0]
  14126. ) {
  14127. this.testJson.testJson.splice(index, 1);
  14128. this.testJson.testCount--;
  14129. } else {
  14130. let _this = this;
  14131. _this
  14132. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14133. confirmButtonText: "确定",
  14134. cancelButtonText: "取消",
  14135. type: "warning",
  14136. })
  14137. .then(() => {
  14138. _this.testJson.testJson.splice(index, 1);
  14139. _this.testJson.testCount--;
  14140. })
  14141. .catch(() => {
  14142. return;
  14143. });
  14144. }
  14145. },
  14146. askMove(type, index) {
  14147. if (type == 1) {
  14148. if (index > 0) {
  14149. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  14150. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14151. this.askJson.askJson[index - 1] = b;
  14152. this.askJson.askJson[index] = a;
  14153. }
  14154. } else {
  14155. if (index < this.askJson.askJson.length - 1) {
  14156. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  14157. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14158. this.askJson.askJson[index + 1] = b;
  14159. this.askJson.askJson[index] = a;
  14160. }
  14161. }
  14162. this.$forceUpdate();
  14163. },
  14164. checkMove(type, index, checkIndex) {
  14165. if (type == 1) {
  14166. if (checkIndex > 0) {
  14167. let a = JSON.parse(
  14168. JSON.stringify(
  14169. this.askJson.askJson[index].checkList[checkIndex - 1]
  14170. )
  14171. );
  14172. let b = JSON.parse(
  14173. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14174. );
  14175. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  14176. this.askJson.askJson[index].checkList[checkIndex] = a;
  14177. }
  14178. } else {
  14179. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  14180. let a = JSON.parse(
  14181. JSON.stringify(
  14182. this.askJson.askJson[index].checkList[checkIndex + 1]
  14183. )
  14184. );
  14185. let b = JSON.parse(
  14186. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14187. );
  14188. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  14189. this.askJson.askJson[index].checkList[checkIndex] = a;
  14190. }
  14191. }
  14192. this.$forceUpdate();
  14193. },
  14194. testMove(type, index) {
  14195. if (type == 1) {
  14196. if (index > 0) {
  14197. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  14198. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14199. this.testJson.testJson[index - 1] = b;
  14200. this.testJson.testJson[index] = a;
  14201. }
  14202. } else {
  14203. if (index < this.testJson.testJson.length - 1) {
  14204. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  14205. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14206. this.testJson.testJson[index + 1] = b;
  14207. this.testJson.testJson[index] = a;
  14208. }
  14209. }
  14210. this.$forceUpdate();
  14211. },
  14212. tcheckMove(type, index, checkIndex) {
  14213. if (type == 1) {
  14214. if (checkIndex > 0) {
  14215. let a = JSON.parse(
  14216. JSON.stringify(
  14217. this.testJson.testJson[index].checkList[checkIndex - 1]
  14218. )
  14219. );
  14220. let b = JSON.parse(
  14221. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14222. );
  14223. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  14224. this.testJson.testJson[index].checkList[checkIndex] = a;
  14225. }
  14226. } else {
  14227. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  14228. let a = JSON.parse(
  14229. JSON.stringify(
  14230. this.testJson.testJson[index].checkList[checkIndex + 1]
  14231. )
  14232. );
  14233. let b = JSON.parse(
  14234. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14235. );
  14236. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  14237. this.testJson.testJson[index].checkList[checkIndex] = a;
  14238. }
  14239. }
  14240. this.$forceUpdate();
  14241. },
  14242. addcheckList(json, index) {
  14243. // json.checkList.length++;
  14244. json.checkList.splice(index + 1, 0, "");
  14245. json.askItem++;
  14246. this.$forceUpdate();
  14247. },
  14248. deletecheckList(json, index) {
  14249. // json.checkList.length--;
  14250. json.checkList.splice(index, 1);
  14251. json.askItem--;
  14252. this.$forceUpdate();
  14253. },
  14254. addTcheckList(json, index) {
  14255. // json.checkList.length++;
  14256. json.checkList.splice(index + 1, 0, "");
  14257. json.testItem++;
  14258. this.$forceUpdate();
  14259. },
  14260. deleteTcheckList(json, index) {
  14261. // json.checkList.length--;
  14262. json.checkList.splice(index, 1);
  14263. json.testItem--;
  14264. this.$forceUpdate();
  14265. },
  14266. checkTestType(type, json) {
  14267. json.type = type;
  14268. setTimeout(() => {
  14269. json.answer = [];
  14270. }, 100);
  14271. },
  14272. checkAskType(type, json) {
  14273. json.type = type;
  14274. // json.checkList = [];
  14275. this.$forceUpdate();
  14276. },
  14277. addSelectList(json) {
  14278. json.select.push("");
  14279. json.answer.push("");
  14280. },
  14281. deleteSelectList(json) {
  14282. // json.select.length--;
  14283. // json.answer.length--;
  14284. json.select.splice(json.select.length - 1, 1);
  14285. json.answer.splice(json.answer.length - 1, 1);
  14286. },
  14287. addAsk() {
  14288. if (this.askJson.askTitle === "") {
  14289. this.$message.error("标题不能为空!");
  14290. return;
  14291. }
  14292. var aj = this.askJson.askJson;
  14293. var b = 1;
  14294. for (var i = 0; i < aj.length; i++) {
  14295. if (aj[i].askstitle === "") {
  14296. var a = 1;
  14297. for (let index = 0; index < aj[i].askItem; index++) {
  14298. const element = aj[i].checkList[index]
  14299. ? aj[i].checkList[index]
  14300. : "";
  14301. if (element != "") {
  14302. b++;
  14303. this.$message.error(`请将题目${i + 1}填写完整。`);
  14304. return;
  14305. } else {
  14306. a++;
  14307. }
  14308. }
  14309. if (b == 1) {
  14310. this.$message.error("至少填写一个问题");
  14311. return;
  14312. }
  14313. } else if (aj[i].askstitle != "") {
  14314. for (let index = 0; index < aj[i].askItem; index++) {
  14315. const element = aj[i].checkList[index]
  14316. ? aj[i].checkList[index]
  14317. : "";
  14318. var index = 0;
  14319. for (var z = 0; z < aj[i].checkList.length; z++) {
  14320. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  14321. if (checkC != "") {
  14322. index++;
  14323. } else {
  14324. this.$message.error(`题目${i + 1}选项不能为空!`);
  14325. return;
  14326. }
  14327. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  14328. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  14329. if (checkC == checkC2) {
  14330. this.$message.error(
  14331. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  14332. );
  14333. return;
  14334. }
  14335. }
  14336. }
  14337. b++;
  14338. if (index < 2) {
  14339. this.$message.error("每道题目至少需要设置2个选项。");
  14340. return;
  14341. }
  14342. }
  14343. }
  14344. }
  14345. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  14346. var elc = el.checkList.filter((element) => {
  14347. return element != "";
  14348. });
  14349. return el.askstitle != "" && elc.length != 0;
  14350. });
  14351. if (!this.dialogVisible4) {
  14352. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14353. this.taskCount
  14354. ].toolChoose[this.toolIndex] = this.askJson;
  14355. }
  14356. this.dialogVisible5 = false;
  14357. if (
  14358. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14359. .toolChoose[this.toolIndex].tool != 4
  14360. ) {
  14361. this.addTools(4, this.taskCount, this.toolIndex);
  14362. }
  14363. },
  14364. addTest() {
  14365. // if (this.testJson.testTitle === "") {
  14366. // this.$message.error("标题不能为空!");
  14367. // return;
  14368. // }
  14369. var aj = this.testJson.testJson;
  14370. var b = 1;
  14371. for (var i = 0; i < aj.length; i++) {
  14372. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  14373. var a = 1;
  14374. for (let index = 0; index < aj[i].testItem; index++) {
  14375. const element = aj[i].checkList[index]
  14376. ? aj[i].checkList[index]
  14377. : "";
  14378. if (element != "") {
  14379. b++;
  14380. this.$message.error(`请将题目${i + 1}填写完整。`);
  14381. return;
  14382. } else {
  14383. a++;
  14384. }
  14385. }
  14386. if (b == 1) {
  14387. this.$message.error("至少填写一个问题");
  14388. return;
  14389. }
  14390. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  14391. for (let index = 0; index < aj[i].testItem; index++) {
  14392. const element = aj[i].checkList[index]
  14393. ? aj[i].checkList[index]
  14394. : "";
  14395. var index = 0;
  14396. for (var z = 0; z < aj[i].checkList.length; z++) {
  14397. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  14398. if (checkC != "") {
  14399. index++;
  14400. } else {
  14401. this.$message.error(`题目${i + 1}选项不能为空!`);
  14402. return;
  14403. }
  14404. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  14405. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  14406. if (checkC == checkC2) {
  14407. this.$message.error(
  14408. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  14409. );
  14410. return;
  14411. }
  14412. }
  14413. }
  14414. b++;
  14415. if (index < 2) {
  14416. this.$message.error("每道题目至少需要设置2个选项。");
  14417. return;
  14418. }
  14419. if (
  14420. (aj[i].type == "2" && !aj[i].answer.length) ||
  14421. (aj[i].type == "1" &&
  14422. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  14423. (aj[i].answer !== 0 && !aj[i].answer)))
  14424. ) {
  14425. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  14426. return;
  14427. }
  14428. }
  14429. }
  14430. }
  14431. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  14432. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  14433. var elc = el.checkList.filter((element) => {
  14434. return element != "";
  14435. });
  14436. return (
  14437. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  14438. );
  14439. });
  14440. isTestJson.testCount = isTestJson.testJson.length;
  14441. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14442. this.taskCount
  14443. ].toolChoose[this.toolIndex].testJson = isTestJson;
  14444. this.dialogVisibleChoice = false;
  14445. if (
  14446. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14447. .toolChoose[this.toolIndex].tool != 45
  14448. ) {
  14449. this.addTools(45, this.taskCount, this.toolIndex);
  14450. }
  14451. },
  14452. addVideoJson(videoJson) {
  14453. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14454. this.taskCount
  14455. ].toolChoose[this.toolIndex].videoJson = videoJson;
  14456. this.dialogVisibleVideo = false;
  14457. if (
  14458. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14459. .toolChoose[this.toolIndex].tool != 62
  14460. ) {
  14461. this.addTools(62, this.taskCount, this.toolIndex);
  14462. }
  14463. },
  14464. //自动获取剪贴板
  14465. pasteOption() {
  14466. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14467. if (!iframe) {
  14468. this.$message.error("请使用AI共创生成题目");
  14469. return;
  14470. }
  14471. let copyData = iframe.contentWindow.copyData;
  14472. if (!copyData || !copyData.selectData.length) {
  14473. this.$message.error("请使用AI共创生成题目");
  14474. return;
  14475. }
  14476. let selectData = copyData.selectData;
  14477. for (var i = 0; i < selectData.length; i++) {
  14478. let answer = 0;
  14479. switch (selectData[i].answer[0]) {
  14480. case "A":
  14481. answer = 0;
  14482. break;
  14483. case "B":
  14484. answer = 1;
  14485. break;
  14486. case "C":
  14487. answer = 2;
  14488. break;
  14489. case "D":
  14490. answer = 3;
  14491. break;
  14492. case "E":
  14493. answer = 4;
  14494. break;
  14495. default:
  14496. break;
  14497. }
  14498. this.testJson.testJson.push({
  14499. teststitle: selectData[i].subject,
  14500. testItem: selectData[i].options.length,
  14501. checkList: selectData[i].options,
  14502. timuList: [],
  14503. answer: answer,
  14504. type: "1",
  14505. });
  14506. this.testJson.testCount++;
  14507. }
  14508. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  14509. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  14510. var elc = el.checkList.filter((element) => {
  14511. return element != "";
  14512. });
  14513. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  14514. });
  14515. isTestJson.testCount = isTestJson.testJson.length;
  14516. if (!isTestJson.testCount) {
  14517. return;
  14518. }
  14519. this.testJson = isTestJson;
  14520. this.$forceUpdate();
  14521. },
  14522. pasteTask(taskJson) {
  14523. let stageTasksData = [];
  14524. if (taskJson) {
  14525. stageTasksData = taskJson;
  14526. } else {
  14527. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14528. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  14529. if (!iframe && !iframe2) {
  14530. this.$message.error("请使用AI共创生成");
  14531. return;
  14532. }
  14533. let copyData = iframe ? iframe.contentWindow.copyData : false;
  14534. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  14535. if (
  14536. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  14537. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  14538. ) {
  14539. this.$message.error("请使用AI共创生成");
  14540. return;
  14541. }
  14542. stageTasksData = copyData
  14543. ? copyData.tasksData
  14544. : copyData2
  14545. ? copyData2.tasksData
  14546. : [{ taskName: "", taskDecs: "" }];
  14547. }
  14548. let taskA = [];
  14549. let tasks = stageTasksData;
  14550. for (var j = 0; j < tasks.length; j++) {
  14551. taskA.push({
  14552. task: tasks[j].taskName,
  14553. taskDetail: tasks[j].taskDecs,
  14554. chapterData: [],
  14555. toolText: "",
  14556. toolChoose: [
  14557. {
  14558. tool: [],
  14559. toolDetail: "",
  14560. toolType: 0,
  14561. askCount: 1,
  14562. askTitle: "",
  14563. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14564. },
  14565. ],
  14566. isShowTools: false,
  14567. askCount: 1,
  14568. isFold: 1,
  14569. askTitle: "",
  14570. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14571. checkJson: [{ checkCount: [], checkPerent: [] }],
  14572. homeworkList: [],
  14573. });
  14574. }
  14575. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  14576. this.$forceUpdate();
  14577. },
  14578. pasteStage(stageJson) {
  14579. let stageData = [];
  14580. if (stageJson) {
  14581. stageData = stageJson;
  14582. } else {
  14583. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14584. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  14585. if (!iframe && !iframe2) {
  14586. this.$message.error("请使用AI共创生成");
  14587. return;
  14588. }
  14589. let copyData = iframe ? iframe.contentWindow.copyData : false;
  14590. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  14591. if (
  14592. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  14593. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  14594. ) {
  14595. this.$message.error("请使用AI共创生成");
  14596. return;
  14597. }
  14598. stageData = copyData
  14599. ? copyData.stageData
  14600. : copyData2
  14601. ? copyData2.stageData
  14602. : [""];
  14603. }
  14604. let stage = [];
  14605. for (var i = 0; i < stageData.length; i++) {
  14606. stage.push({
  14607. dyName: stageData[i], //单元标题
  14608. chapterInfo: [
  14609. {
  14610. isread: false,
  14611. chapterid: this.guid(),
  14612. title: "",
  14613. courseName: "",
  14614. taskJson: [
  14615. {
  14616. task: "",
  14617. taskDetail: "",
  14618. chapterData: [],
  14619. toolText: "",
  14620. toolChoose: [
  14621. {
  14622. tool: [],
  14623. toolDetail: "",
  14624. toolType: 0,
  14625. askCount: 1,
  14626. askTitle: "",
  14627. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14628. },
  14629. ],
  14630. isShowTools: false,
  14631. askCount: 1,
  14632. isFold: 1,
  14633. askTitle: "",
  14634. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14635. checkJson: [{ checkCount: [], checkPerent: [] }],
  14636. homeworkList: [],
  14637. },
  14638. ],
  14639. itemCount: 1,
  14640. fileList1: [],
  14641. video: [],
  14642. testData: [],
  14643. pData: [],
  14644. templateArray: [],
  14645. },
  14646. ],
  14647. });
  14648. }
  14649. let _this = this;
  14650. if (stageJson) {
  14651. if (!_this.cid) {
  14652. _this.unitJson = stage;
  14653. } else {
  14654. _this.unitIndex = 0;
  14655. _this.unitJson = stage;
  14656. _this.updateWork();
  14657. }
  14658. } else {
  14659. _this
  14660. .$confirm(
  14661. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  14662. "提示",
  14663. {
  14664. confirmButtonText: "确定",
  14665. cancelButtonText: "取消",
  14666. type: "warning",
  14667. }
  14668. )
  14669. .then(() => {
  14670. _this.unitIndex = 0;
  14671. _this.unitJson = stage;
  14672. // _this.steps++;
  14673. _this.updateWork();
  14674. })
  14675. .catch(() => {
  14676. return;
  14677. });
  14678. }
  14679. },
  14680. openStageBox() {
  14681. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  14682. this.dialogVisibleStageChange = true;
  14683. },
  14684. updateChange() {
  14685. this.$confirm(
  14686. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  14687. "提示",
  14688. {
  14689. confirmButtonText: "确定",
  14690. cancelButtonText: "取消",
  14691. type: "warning",
  14692. }
  14693. )
  14694. .then(() => {
  14695. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  14696. this.updateWork();
  14697. this.dialogVisibleStageChange = false;
  14698. })
  14699. .catch(() => {
  14700. return;
  14701. });
  14702. },
  14703. addAnswer() {
  14704. if (this.answerQ == "") {
  14705. this.$message.error("请输入您想要问的问题");
  14706. return;
  14707. }
  14708. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14709. this.taskCount
  14710. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  14711. this.dialogVisible8 = false;
  14712. if (
  14713. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14714. .toolChoose[this.toolIndex].tool != 15
  14715. ) {
  14716. this.addTools(15, this.taskCount, this.toolIndex);
  14717. }
  14718. },
  14719. addMp3Answer() {
  14720. if (this.answerQ == "") {
  14721. this.$message.error("请输入您想要回答的问题");
  14722. return;
  14723. }
  14724. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14725. this.taskCount
  14726. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  14727. this.dialogVisibleMp3 = false;
  14728. },
  14729. addRateAnswer() {
  14730. var a = 1;
  14731. for (var i = 0; i < this.rateJson.length; i++) {
  14732. if (this.rateJson[i].value == "") {
  14733. a = 2;
  14734. break;
  14735. }
  14736. }
  14737. if (a == 2) {
  14738. this.$message.error("请把评价信息填写完整");
  14739. return;
  14740. }
  14741. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14742. this.taskCount
  14743. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  14744. this.dialogVisibleRate = false;
  14745. if (
  14746. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14747. .toolChoose[this.toolIndex].tool != 40
  14748. ) {
  14749. this.addTools(40, this.taskCount, this.toolIndex);
  14750. }
  14751. },
  14752. addSelectAnswer() {
  14753. if (this.selectJson.url == "") {
  14754. this.$message.error("请上传题目");
  14755. return;
  14756. }
  14757. if (!this.selectJson.select.length) {
  14758. this.$message.error("请添加选项");
  14759. return;
  14760. }
  14761. if (!this.selectJson.answer.length) {
  14762. this.$message.error("请设置答案");
  14763. return;
  14764. }
  14765. var a = 1;
  14766. for (var i = 0; i < this.selectJson.answer.length; i++) {
  14767. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  14768. a = 2;
  14769. }
  14770. }
  14771. if (a == 2) {
  14772. this.$message.error("请设置答案");
  14773. return;
  14774. }
  14775. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14776. this.taskCount
  14777. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  14778. this.dialogVisibleSelect = false;
  14779. if (
  14780. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14781. .toolChoose[this.toolIndex].tool != 41
  14782. ) {
  14783. this.addTools(41, this.taskCount, this.toolIndex);
  14784. }
  14785. },
  14786. nextSelectSteps() {
  14787. if (this.selectJson.url == "") {
  14788. this.$message.error("请上传题目");
  14789. return;
  14790. }
  14791. if (!this.selectJson.select.length) {
  14792. this.$message.error("请添加选项");
  14793. return;
  14794. } else {
  14795. for (var z = 0; z < this.selectJson.select.length; z++) {
  14796. let checkC = this.selectJson.select[z];
  14797. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  14798. let checkC2 = this.selectJson.select[z2];
  14799. if (checkC == checkC2) {
  14800. this.$message.error(
  14801. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  14802. );
  14803. return;
  14804. }
  14805. }
  14806. }
  14807. }
  14808. var a = 1;
  14809. for (var i = 0; i < this.selectJson.select.length; i++) {
  14810. if (!this.selectJson.select[i]) {
  14811. a = 2;
  14812. }
  14813. }
  14814. if (a == 2) {
  14815. this.$message.error("添加的选项不能为空");
  14816. return;
  14817. }
  14818. this.selectSteps++;
  14819. },
  14820. selectCourseDetail() {
  14821. if (this.cid == "" || this.cid == undefined) {
  14822. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  14823. this.isTeacherSee = true;
  14824. }
  14825. console.log("这是新增课程");
  14826. this.selectAllType();
  14827. this.chatid = uuidv4();
  14828. // this.courseTextB = false
  14829. } else {
  14830. this.isOutline = true
  14831. this.isOutline2 = true
  14832. this.cpoteType = 4
  14833. this.cidType = 1;
  14834. let params = {
  14835. cid: this.cid,
  14836. };
  14837. this.ajax
  14838. .get(this.$store.state.api + "select_course_detail", params)
  14839. .then((res) => {
  14840. this.unitJson = JSON.parse(res.data[0][0].chapters);
  14841. this.courseState = res.data[0][0].state;
  14842. for (var j = 0; j < this.unitJson.length; j++) {
  14843. for (
  14844. var k = 0;
  14845. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  14846. k++
  14847. ) {
  14848. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  14849. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  14850. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  14851. : [];
  14852. let _chapterData = [];
  14853. for (
  14854. var c = 0;
  14855. c <
  14856. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  14857. .length;
  14858. c++
  14859. ) {
  14860. if (
  14861. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  14862. ) {
  14863. _chapterData.push(
  14864. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  14865. );
  14866. }
  14867. }
  14868. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  14869. _chapterData;
  14870. }
  14871. }
  14872. this.$forceUpdate();
  14873. this.courseName = res.data[0][0].title;
  14874. this.courseText = res.data[0][0].brief;
  14875. this.courseText2 = res.data[0][0].reBrief;
  14876. this.evalua = res.data[0][0].evaId;
  14877. this.cover = JSON.parse(res.data[0][0].cover);
  14878. this.noneBtnImg = this.cover.length >= 1;
  14879. if (res.data[0][0].refile) {
  14880. this.infoData = JSON.parse(res.data[0][0].refile)
  14881. }
  14882. // this.checkboxList =
  14883. // res.data[0][0].course_student.length > 0
  14884. // ? JSON.parse(res.data[0][0].course_student)
  14885. // : [];
  14886. this.checkboxList2 = res.data[0][0].juri
  14887. ? res.data[0][0].juri.split(",")
  14888. : [];
  14889. this.inviteCode = [];
  14890. for (var i = 0; i < res.data[2].length; i++) {
  14891. this.inviteCode.push({
  14892. cid: res.data[2][i].classid,
  14893. ic: res.data[2][i].code,
  14894. });
  14895. }
  14896. this.checkboxList3 = res.data[0][0].course_teacher
  14897. ? res.data[0][0].course_teacher.split(",")
  14898. : [];
  14899. // this.isTeacherSee =
  14900. // res.data[0][0].is_teacher_look == 0 ? true : false;
  14901. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  14902. this.myWord = res.data[0][0].template;
  14903. this.templateC.id = "123";
  14904. this.courseUserid = res.data[0][0].userid;
  14905. // if(this.courseUserid == this.userid){
  14906. // this.InviteChange(this.checkboxList2)
  14907. // }
  14908. this.nbOrder = res.data[0][0].ordernumber;
  14909. this.courseTypeId = [];
  14910. for (var i = 0; i < res.data[1].length; i++) {
  14911. this.courseTypeId.push(res.data[1][i].typeid);
  14912. }
  14913. console.log(this.courseTypeId);
  14914. // if (this.timer) clearInterval(this.timer);
  14915. if (this.timer) clearTimeout(this.timer);
  14916. this.timer = null;
  14917. // this.timer = setInterval(() => {
  14918. if(res.data[3].length){
  14919. try {
  14920. this.aiJson = JSON.parse(res.data[3][0].tips);
  14921. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  14922. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  14923. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14924. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  14925. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  14926. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14927. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  14928. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  14929. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  14930. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  14931. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  14932. }
  14933. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  14934. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  14935. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  14936. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  14937. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  14938. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  14939. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  14940. - 我们的课程主题可以如何与学生的实际生活联系起来?
  14941. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  14942. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  14943. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  14944. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  14945. - 学生个人最终要完成什么?学生小组最终要完成什么?
  14946. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  14947. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  14948. 讨论:<转文本内容>`
  14949. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  14950. this.templateid = res.data[3][0].template;
  14951. this.getTipsTemplateIsDialog()
  14952. }catch(error){
  14953. console.error(error)
  14954. }
  14955. }
  14956. if(res.data[0][0].cpote){
  14957. try {
  14958. this.cpote = JSON.parse(res.data[0][0].cpote);
  14959. }catch(error){
  14960. console.error(error)
  14961. }
  14962. }
  14963. if(res.data[0][0].setting){
  14964. try {
  14965. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  14966. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  14967. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  14968. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  14969. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  14970. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  14971. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  14972. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  14973. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  14974. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  14975. 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;
  14976. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  14977. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  14978. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  14979. 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;
  14980. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  14981. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  14982. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  14983. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  14984. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  14985. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  14986. if(this.targetCourseText2 || (!this.teacherCourseText)){
  14987. this.courseTextBool = true
  14988. }
  14989. // if(!this.teacherCourseText && !this.targetCourseText2){
  14990. // this.isuseT = 1
  14991. // }
  14992. }catch(error){
  14993. console.error(error)
  14994. }
  14995. }
  14996. if(this.courseText){
  14997. this.courseTextB = false
  14998. }
  14999. if(this.teacherCourseText){
  15000. this.teacherCourseTextB = false
  15001. }
  15002. if(this.targetCourseText){
  15003. this.targetCourseTextB = false
  15004. }
  15005. if(this.targetCourseText2){
  15006. this.targetCourseText2B = false
  15007. }
  15008. this.isFileSearch = res.data[0][0].iresearch == 1
  15009. // this.seleteCourseUpdate();
  15010. this.setMan();
  15011. this.selectAllType();
  15012. this.unitJson[
  15013. this.unitIndex
  15014. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15015. // }, 5000);
  15016. this.$forceUpdate();
  15017. setTimeout(() => {
  15018. this.checkEva(this.evalua);
  15019. setTimeout(() => {
  15020. this.checkEva(this.evalua);
  15021. }, 100);
  15022. }, 100);
  15023. })
  15024. .catch((err) => {
  15025. console.error(err);
  15026. });
  15027. }
  15028. if(this.aiId){
  15029. let params = {
  15030. cid: this.aiId,
  15031. };
  15032. this.ajax
  15033. .get(this.$store.state.api + "select_course_detail", params)
  15034. .then((res) => {
  15035. let _unitJson = JSON.parse(res.data[0][0].chapters);
  15036. let fileInfo = []
  15037. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  15038. for(var i = 0; i < _unitJson.length; i++){
  15039. let tasks = _unitJson[i].chapterInfo[0].taskJson
  15040. for(var j = 0; j < tasks.length; j++){
  15041. let _infoData = tasks[j].chapterData.filter(el => {
  15042. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  15043. })
  15044. if(_infoData.length){
  15045. fileInfo = [...fileInfo, ..._infoData]
  15046. }
  15047. }
  15048. }
  15049. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  15050. this.$forceUpdate();
  15051. this.courseName = res.data[0][0].title;
  15052. this.courseText = res.data[0][0].brief;
  15053. this.courseText2 = res.data[0][0].reBrief;
  15054. this.cover = JSON.parse(res.data[0][0].cover);
  15055. this.noneBtnImg = this.cover.length >= 1;
  15056. this.checkboxList2 = res.data[0][0].juri
  15057. ? res.data[0][0].juri.split(",")
  15058. : [];
  15059. this.inviteCode = [];
  15060. for (var i = 0; i < res.data[2].length; i++) {
  15061. this.inviteCode.push({
  15062. cid: res.data[2][i].classid,
  15063. ic: res.data[2][i].code,
  15064. });
  15065. }
  15066. this.checkboxList3 = res.data[0][0].course_teacher
  15067. ? res.data[0][0].course_teacher.split(",")
  15068. : [];
  15069. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15070. this.myWord = res.data[0][0].template;
  15071. this.templateC.id = "123";
  15072. this.courseTypeId = [];
  15073. for (var i = 0; i < res.data[1].length; i++) {
  15074. this.courseTypeId.push(res.data[1][i].typeid);
  15075. }
  15076. console.log(this.courseTypeId);
  15077. if(res.data[3].length){
  15078. try {
  15079. this.aiJson = JSON.parse(res.data[3][0].tips);
  15080. this.templateid = res.data[3][0].template;
  15081. this.getTipsTemplateIsDialog()
  15082. }catch(error){
  15083. console.error(error)
  15084. }
  15085. }
  15086. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15087. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15088. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15089. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15090. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15091. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15092. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15093. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15094. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15095. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15096. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15097. }
  15098. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15099. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15100. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15101. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15102. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15103. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15104. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15105. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15106. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15107. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15108. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15109. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15110. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15111. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15112. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15113. 讨论:<转文本内容>`
  15114. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15115. if(res.data[0][0].cpote){
  15116. try {
  15117. this.cpote = JSON.parse(res.data[0][0].cpote);
  15118. }catch(error){
  15119. console.error(error)
  15120. }
  15121. }
  15122. if(res.data[0][0].setting){
  15123. try {
  15124. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15125. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15126. 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];
  15127. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15128. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15129. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15130. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15131. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15132. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15133. 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];
  15134. 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;
  15135. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15136. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15137. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15138. 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;
  15139. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15140. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15141. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15142. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15143. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15144. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15145. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15146. this.courseTextBool = true
  15147. }
  15148. // if(!this.teacherCourseText && !this.targetCourseText2){
  15149. // this.isuseT = 1
  15150. // }
  15151. }catch(error){
  15152. console.error(error)
  15153. }
  15154. }
  15155. if(this.teacherInfoData.length){
  15156. this.isuseT = true
  15157. }
  15158. if(this.courseText){
  15159. this.courseTextB = false
  15160. }
  15161. if(this.teacherCourseText){
  15162. this.teacherCourseTextB = false
  15163. }
  15164. if(this.targetCourseText){
  15165. this.targetCourseTextB = false
  15166. }
  15167. if(this.targetCourseText2){
  15168. this.targetCourseText2B = false
  15169. }
  15170. this.setMan();
  15171. this.unitJson[
  15172. this.unitIndex
  15173. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15174. this.$forceUpdate();
  15175. setTimeout(() => {
  15176. this.checkEva(this.evalua);
  15177. setTimeout(() => {
  15178. this.checkEva(this.evalua);
  15179. }, 100);
  15180. }, 100);
  15181. })
  15182. .catch((err) => {
  15183. console.error(err);
  15184. });
  15185. }
  15186. // if(this.cidType != 1 && this.templateid == ''){
  15187. // this.promptShow = true
  15188. // }
  15189. },
  15190. seleteCourseUpdate() {
  15191. let params = {
  15192. cid: this.cid,
  15193. };
  15194. this.ajax
  15195. .get(this.$store.state.api + "select_course_detail", params)
  15196. .then((res) => {
  15197. // console.log(this.unitJson);
  15198. let unitJson = JSON.parse(res.data[0][0].chapters);
  15199. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  15200. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  15201. let _unitJson = [];
  15202. let _chapAarry = [];
  15203. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  15204. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  15205. let index = 1;
  15206. let chapindex;
  15207. if (_unitJson2.length > unitJson.length) {
  15208. for (let c = 0; c < _unitJson2.length; c++) {
  15209. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  15210. }
  15211. for (let j = 0; j < unitJson.length; j++) {
  15212. let count = 0;
  15213. for (let k = 0; k < _unitJson2.length; k++) {
  15214. if (
  15215. unitJson[j].chapterInfo[0].chapterid ==
  15216. _unitJson2[k].chapterInfo[0].chapterid
  15217. ) {
  15218. count++;
  15219. _chapAarry.splice(
  15220. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15221. 1
  15222. );
  15223. _unitJson.push(unitJson[j]);
  15224. break;
  15225. }
  15226. }
  15227. // if(count === 0){
  15228. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  15229. // }
  15230. }
  15231. for (let k = 0; k < _unitJson2.length; k++) {
  15232. if (_unitJson2[k].isUpdate == 1) {
  15233. _chapAarry.splice(
  15234. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15235. 1
  15236. );
  15237. _unitJson.push(_unitJson2[k]);
  15238. }
  15239. }
  15240. console.log(_chapAarry);
  15241. for (let d = 0; d < _unitJson2.length; d++) {
  15242. if (
  15243. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  15244. ) {
  15245. if (_unitIndex == d) {
  15246. index = 2;
  15247. }
  15248. chapindex = d;
  15249. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  15250. }
  15251. }
  15252. } else {
  15253. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  15254. }
  15255. for (let i = 0; i < unitJson.length; i++) {
  15256. if (
  15257. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  15258. _unitJson[i].chapterInfo[0].chapterid !=
  15259. unitJson[i].chapterInfo[0].chapterid
  15260. ) {
  15261. if (i == _unitJson.length - 1) {
  15262. // this.unitIndex++
  15263. _unitIndex2++;
  15264. }
  15265. _unitJson.splice(i, 0, unitJson[i]);
  15266. } else if (i > _unitJson.length - 1) {
  15267. _unitJson.push(unitJson[i]);
  15268. } else if (
  15269. _unitJson[i].chapterInfo[0].chapterid ==
  15270. unitJson[i].chapterInfo[0].chapterid
  15271. ) {
  15272. _unitJson[i] = unitJson[i];
  15273. }
  15274. // if (i == _unitIndex) {
  15275. // continue;
  15276. // } else
  15277. }
  15278. if (_chapAarry.length && index != 2) {
  15279. if (chapindex < _unitIndex) {
  15280. this.isDelete = 2;
  15281. // this.unitIndex--;
  15282. _unitIndex2--;
  15283. } else if (
  15284. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  15285. _unitJson[_unitIndex].chapterInfo[0].chapterid
  15286. ) {
  15287. this.isDelete = 2;
  15288. for (let n = 0; n < _unitJson.length; n++) {
  15289. if (
  15290. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  15291. _unitJson[n].chapterInfo[0].chapterid
  15292. ) {
  15293. // this.unitIndex = n;
  15294. _unitIndex2 = n;
  15295. _unitJson[n] = _unitJson2[_unitIndex];
  15296. break;
  15297. }
  15298. }
  15299. }
  15300. } else if (index != 2) {
  15301. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  15302. _unitJson2[_unitIndex];
  15303. for (
  15304. var ci = 0;
  15305. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  15306. ci++
  15307. ) {
  15308. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  15309. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  15310. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15311. .toolChoose
  15312. : [];
  15313. let _chapterData = [];
  15314. for (
  15315. var c = 0;
  15316. c <
  15317. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  15318. .length;
  15319. c++
  15320. ) {
  15321. if (
  15322. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15323. .chapterData[c]
  15324. ) {
  15325. _chapterData.push(
  15326. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15327. .chapterData[c]
  15328. );
  15329. }
  15330. }
  15331. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  15332. _chapterData;
  15333. }
  15334. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  15335. }
  15336. if (index == 1) {
  15337. this.unitJson = _unitJson;
  15338. this.$forceUpdate();
  15339. setTimeout(() => {
  15340. if (this.unitIndex != _unitIndex2) {
  15341. this.isDelete = 2;
  15342. this.unitIndex = _unitIndex2;
  15343. }
  15344. }, 0);
  15345. this.timer = setTimeout(() => {
  15346. this.seleteCourseUpdate();
  15347. }, 1000);
  15348. } else if (index == 2) {
  15349. let _this = this;
  15350. _this
  15351. .$confirm(
  15352. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  15353. "提示",
  15354. {
  15355. confirmButtonText: "需要",
  15356. cancelButtonText: "取消",
  15357. type: "warning",
  15358. }
  15359. )
  15360. .then(() => {
  15361. if (_this.time()) {
  15362. _this.restoreWork(
  15363. _chapAarry[0],
  15364. _unitJson,
  15365. chapindex,
  15366. _unitJson2,
  15367. _unitIndex2
  15368. );
  15369. }
  15370. })
  15371. .catch(() => {
  15372. _this.unitJson = _unitJson;
  15373. _this.$forceUpdate();
  15374. setTimeout(() => {
  15375. if (this.unitIndex != _unitIndex2) {
  15376. this.isDelete = 2;
  15377. this.unitIndex = _unitIndex2;
  15378. }
  15379. }, 0);
  15380. _this.timer = setTimeout(() => {
  15381. _this.seleteCourseUpdate();
  15382. }, 1000);
  15383. });
  15384. }
  15385. // 在复制操作之前记录滚动位置
  15386. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  15387. // 执行复制操作
  15388. // 复制操作完成后恢复滚动位置
  15389. this.$nextTick(() => {
  15390. if (this.$refs.scrollContainer) {
  15391. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  15392. }
  15393. });
  15394. })
  15395. .catch((err) => {
  15396. console.error(err);
  15397. });
  15398. },
  15399. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  15400. let params = [
  15401. {
  15402. cid: this.cid,
  15403. chapters: JSON.stringify(this.unitJson),
  15404. uid: this.userid,
  15405. chapid: chapid,
  15406. },
  15407. ];
  15408. this.ajax
  15409. .post(this.$store.state.api + "restoreWork", params)
  15410. .then((res) => {
  15411. this.$message({
  15412. message: "恢复成功",
  15413. type: "success",
  15414. });
  15415. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  15416. this.unitJson = unitJson;
  15417. this.$forceUpdate();
  15418. setTimeout(() => {
  15419. if (this.unitIndex != unitIndex2) {
  15420. this.isDelete = 2;
  15421. this.unitIndex = unitIndex2;
  15422. }
  15423. }, 0);
  15424. this.timer = setTimeout(() => {
  15425. this.seleteCourseUpdate();
  15426. }, 1000);
  15427. })
  15428. .catch((err) => {
  15429. this.$message.error("网络不佳");
  15430. console.error(err);
  15431. });
  15432. },
  15433. getTypeName() {
  15434. console.log(this.courseTypeId);
  15435. this.$forceUpdate();
  15436. },
  15437. selectAllType() {
  15438. let params = {
  15439. org: this.org && this.org != "" ? this.org : "",
  15440. oid: this.oid && this.oid != "" ? this.oid : "",
  15441. stand: "cn"
  15442. };
  15443. this.ajax
  15444. .get(this.$store.state.api + "selectAllTypeStand", params)
  15445. .then((res) => {
  15446. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  15447. res.data[0] = [...res.data[0], ...res.data[4]];
  15448. }
  15449. this.CourseType = res.data;
  15450. this.CourseType2 = [
  15451. { name: "智见课程", id: [] },
  15452. { name: "智行课程", id: [] },
  15453. { name: "智创课程", id: [] },
  15454. ];
  15455. for (var cti = 0; cti < res.data[0].length; cti++) {
  15456. if (
  15457. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  15458. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  15459. ) {
  15460. this.CourseType2[0].id.push(res.data[0][cti].id);
  15461. } else if (
  15462. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  15463. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  15464. ) {
  15465. this.CourseType2[1].id.push(res.data[0][cti].id);
  15466. } else if (
  15467. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  15468. ) {
  15469. this.CourseType2[2].id.push(res.data[0][cti].id);
  15470. }
  15471. if (
  15472. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  15473. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  15474. ) {
  15475. res.data[0][cti].name = "年级";
  15476. } else if (
  15477. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  15478. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  15479. ) {
  15480. res.data[0][cti].name = "学科";
  15481. } else if (
  15482. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  15483. ) {
  15484. res.data[0][cti].name = "主题";
  15485. }
  15486. }
  15487. let _courseTypeId = [];
  15488. for (var i = 0; i < res.data[0].length; i++) {
  15489. if (!this.cid) {
  15490. this.courseTypeId[res.data[0][i].id] = [];
  15491. }
  15492. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  15493. // }
  15494. this.CourseTypeJson[res.data[0][i].id] = [];
  15495. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  15496. if (res.data[0][i].name == "栏目") {
  15497. this.CourseType[0][i].name = "主题";
  15498. }
  15499. }
  15500. if (res.data[2].length == 0 && res.data[3].length == 0) {
  15501. for (var j = 0; j < res.data[1].length; j++) {
  15502. if (
  15503. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  15504. _courseTypeId.indexOf(res.data[1][j].id) == -1
  15505. ) {
  15506. _courseTypeId.push(res.data[1][j].id);
  15507. }
  15508. if (res.data[0][i].id == res.data[1][j].pid) {
  15509. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  15510. }
  15511. }
  15512. } else {
  15513. if (res.data[2].length > 0) {
  15514. for (var j = 0; j < res.data[2].length; j++) {
  15515. if (
  15516. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  15517. _courseTypeId.indexOf(res.data[2][j].id) == -1
  15518. ) {
  15519. _courseTypeId.push(res.data[2][j].id);
  15520. }
  15521. if (res.data[0][i].id == res.data[2][j].pid) {
  15522. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  15523. }
  15524. }
  15525. }
  15526. if (res.data[3].length > 0) {
  15527. for (var j = 0; j < res.data[3].length; j++) {
  15528. if (
  15529. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  15530. _courseTypeId.indexOf(res.data[3][j].id) == -1
  15531. ) {
  15532. _courseTypeId.push(res.data[3][j].id);
  15533. }
  15534. if (res.data[0][i].id == res.data[3][j].pid) {
  15535. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  15536. }
  15537. }
  15538. }
  15539. }
  15540. }
  15541. this.courseTypeId = _courseTypeId;
  15542. })
  15543. .catch((err) => {
  15544. console.error(err);
  15545. });
  15546. },
  15547. selectType() {
  15548. this.ajax
  15549. .get(this.$store.state.api + "selectType")
  15550. .then((res) => {
  15551. this.CourseType = res.data;
  15552. for (var i = 0; i < res.data[0].length; i++) {
  15553. if (!this.cid) {
  15554. this.courseTypeId[res.data[0][i].id] = "";
  15555. }
  15556. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  15557. if (res.data[0][i].name == "栏目") {
  15558. this.CourseType[0][i].name = "主题";
  15559. }
  15560. }
  15561. for (var j = 0; j < res.data[1].length; j++) {
  15562. if (res.data[0][i].id == res.data[1][j].pid) {
  15563. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15564. this.CourseTypeJson[res.data[0][i].id] = [];
  15565. }
  15566. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  15567. }
  15568. }
  15569. }
  15570. this.selectTypeByOid();
  15571. this.selectTypeByOrg();
  15572. })
  15573. .catch((err) => {
  15574. console.error(err);
  15575. });
  15576. },
  15577. selectTypeByOid() {
  15578. let params = {
  15579. oid: this.oid,
  15580. };
  15581. this.ajax
  15582. .get(this.$store.state.api + "selectTypeByOid", params)
  15583. .then((res) => {
  15584. for (var i = 0; i < res.data[0].length; i++) {
  15585. for (var j = 0; j < res.data[1].length; j++) {
  15586. if (res.data[0][i].id == res.data[1][j].pid) {
  15587. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15588. this.CourseTypeJson[res.data[0][i].id] = [];
  15589. }
  15590. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  15591. }
  15592. }
  15593. }
  15594. })
  15595. .catch((err) => {
  15596. console.error(err);
  15597. });
  15598. },
  15599. selectTypeByOrg() {
  15600. let params = {
  15601. oid: this.org,
  15602. };
  15603. this.ajax
  15604. .get(this.$store.state.api + "selectTypeByOrg", params)
  15605. .then((res) => {
  15606. for (var i = 0; i < res.data[0].length; i++) {
  15607. for (var j = 0; j < res.data[1].length; j++) {
  15608. if (res.data[0][i].id == res.data[1][j].pid) {
  15609. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15610. this.CourseTypeJson[res.data[0][i].id] = [];
  15611. }
  15612. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  15613. }
  15614. }
  15615. }
  15616. this.$forceUpdate();
  15617. })
  15618. .catch((err) => {
  15619. console.error(err);
  15620. });
  15621. },
  15622. OtherMb(type, task) {
  15623. if (task === 0 || task) {
  15624. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15625. task
  15626. ].isEvaFold = true;
  15627. }
  15628. this.typeMode = type;
  15629. setTimeout(() => {
  15630. this.checkEva(this.checkId);
  15631. setTimeout(() => {
  15632. this.checkEva(this.checkId);
  15633. }, 100);
  15634. }, 100);
  15635. },
  15636. openMember() {
  15637. this.searchTN = "";
  15638. this.getTeacher();
  15639. this.dialogVisibleMember = true;
  15640. },
  15641. checkEva(id, type) {
  15642. this.dialogVisiblemb = false;
  15643. this.selectEva();
  15644. if (this.evalua != id && type == 2) {
  15645. this.$message.success("导入成功");
  15646. setTimeout(() => {
  15647. this.checkEva(id);
  15648. }, 100);
  15649. }
  15650. this.evalua = id;
  15651. this.checkId = id;
  15652. if (this.evalua != "") {
  15653. for (var i = 0; i < this.evaJuri.length; i++) {
  15654. if (this.evalua == this.evaJuri[i].id) {
  15655. this.eTitle = this.evaJuri[i].title;
  15656. this.eJson = JSON.parse(this.evaJuri[i].content);
  15657. }
  15658. }
  15659. this.data.data = [];
  15660. this.$forceUpdate();
  15661. setTimeout(() => {
  15662. this.setMindData();
  15663. }, 1000);
  15664. }
  15665. },
  15666. deleteEva() {
  15667. let _this = this;
  15668. if (_this.evalua == "") {
  15669. this.$message.warning("内容已经清空了,请勿重复清空");
  15670. return;
  15671. }
  15672. _this
  15673. .$confirm("确定删除此目标吗?", "提示", {
  15674. confirmButtonText: "确定",
  15675. cancelButtonText: "取消",
  15676. type: "warning",
  15677. })
  15678. .then(() => {
  15679. _this.evalua = "";
  15680. _this.checkId = "";
  15681. _this.eTitle = "";
  15682. let _unitJson = _this.unitJson;
  15683. for (var i = 0; i < _unitJson.length; i++) {
  15684. let _task = _unitJson[i].chapterInfo[0].taskJson;
  15685. for (var j = 0; j < _task.length; j++) {
  15686. let _eList = _task[j].eList;
  15687. for (var k = 0; k < _eList.length; k++) {
  15688. delete _eList[k].target;
  15689. }
  15690. }
  15691. }
  15692. _this.$forceUpdate();
  15693. if (_this.cid) {
  15694. _this.updateWork();
  15695. }
  15696. })
  15697. .catch(() => {
  15698. return;
  15699. });
  15700. },
  15701. selectEva() {
  15702. let params = {
  15703. oid: this.oid,
  15704. };
  15705. this.ajax
  15706. .get(this.$store.state.api + "selectAllEvaluation", params)
  15707. .then((res) => {
  15708. this.evaJuri = res.data[0];
  15709. // 在复制操作之前记录滚动位置
  15710. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  15711. // 执行复制操作
  15712. // 复制操作完成后恢复滚动位置
  15713. this.$nextTick(() => {
  15714. if (this.$refs.scrollContainer) {
  15715. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  15716. }
  15717. });
  15718. })
  15719. .catch((err) => {
  15720. console.error(err);
  15721. });
  15722. },
  15723. setMindData() {
  15724. let targetArray = [];
  15725. this.data.data = [];
  15726. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  15727. let _eJson = Object.keys(this.eJson);
  15728. let _e = this.eJson;
  15729. for (let i = 0; i < _eJson.length; i++) {
  15730. let element = _e[_eJson[i]];
  15731. this.data.data.push({
  15732. id: element.id,
  15733. parentid: "root",
  15734. topic: element.name,
  15735. });
  15736. // targetArray.push({
  15737. // id: element.id,
  15738. // parentid: "root",
  15739. // name: element.name,
  15740. // });
  15741. targetArray.push({
  15742. value: element.name,
  15743. label: element.name,
  15744. children: [],
  15745. });
  15746. let _eJsonc = Object.keys(element.child);
  15747. let _e2 = element.child;
  15748. for (let j = 0; j < _eJsonc.length; j++) {
  15749. let _ec = _e2[_eJsonc[j]];
  15750. this.data.data.push({
  15751. id: _ec.id,
  15752. parentid: element.id,
  15753. topic: _ec.name,
  15754. });
  15755. // targetArray.push({
  15756. // id: _ec.id,
  15757. // parentid: element.id,
  15758. // name: _ec.name,
  15759. // });
  15760. targetArray[i].children.push({
  15761. value: _ec.name,
  15762. label: _ec.name,
  15763. children: [],
  15764. });
  15765. let _eJsonz = Object.keys(_ec.child);
  15766. let _e3 = _ec.child;
  15767. for (let z = 0; z < _eJsonz.length; z++) {
  15768. let _ez = _e3[_eJsonz[z]];
  15769. this.data.data.push({
  15770. id: _ez.id,
  15771. parentid: _ec.id,
  15772. topic: _ez.name,
  15773. });
  15774. // targetArray.push({
  15775. // id: _ez.id,
  15776. // parentid: _ec.id,
  15777. // name: _ez.name,
  15778. // });
  15779. targetArray[i].children[j].children.push({
  15780. value: _ez.name,
  15781. label: _ez.name,
  15782. });
  15783. }
  15784. }
  15785. }
  15786. this.targetArray = targetArray;
  15787. this.$forceUpdate();
  15788. },
  15789. /*添加评价 */
  15790. addEList(index, tIndex) {
  15791. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  15792. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  15793. value: "",
  15794. detail: "",
  15795. score: 5,
  15796. isai: "1",
  15797. })
  15798. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  15799. { value: "", detail: "", score: 5,isai: "1", },
  15800. ]);
  15801. this.$forceUpdate();
  15802. },
  15803. openEList(index, tIndex) {
  15804. this.evaIndex = index;
  15805. this.evatIndex = tIndex;
  15806. this.evaBoxDialog = true;
  15807. },
  15808. addCET(index, tIndex) {
  15809. this.cetIndex = index;
  15810. this.cettIndex = tIndex;
  15811. this.selectAllType1();
  15812. },
  15813. addCETemplate() {
  15814. var array =
  15815. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  15816. .eList;
  15817. let params = [
  15818. {
  15819. uid: this.userid,
  15820. n: this.templateName,
  15821. json: JSON.stringify(array),
  15822. t: 1,
  15823. oid: this.oid,
  15824. },
  15825. ];
  15826. this.ajax
  15827. .post(this.$store.state.api + "addCETShare", params)
  15828. .then((res) => {
  15829. this.addTypeByCET(res.data[0][0].id);
  15830. })
  15831. .catch((err) => {
  15832. this.$message.error("网络不佳");
  15833. console.error(err);
  15834. });
  15835. },
  15836. addTypeByCET(id) {
  15837. if (this.setTypeJson.two == "") {
  15838. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  15839. return;
  15840. }
  15841. let params = {
  15842. cid: id,
  15843. };
  15844. this.ajax
  15845. .get(this.$store.state.api + "deleteCETLabel", params)
  15846. .then((res) => {
  15847. for (var i = 0; i < 2; i++) {
  15848. let tid = "";
  15849. if (i == 0) {
  15850. tid = this.setTypeJson.one;
  15851. } else {
  15852. tid = this.setTypeJson.two;
  15853. }
  15854. let params = [
  15855. {
  15856. cid: id,
  15857. tid: tid,
  15858. uid: this.userid,
  15859. },
  15860. ];
  15861. this.ajax
  15862. .post(this.$store.state.api + "addCETLabel", params)
  15863. .then((res) => {
  15864. this.$message({
  15865. message: "添加成功",
  15866. type: "success",
  15867. });
  15868. this.close();
  15869. })
  15870. .catch((err) => {
  15871. this.$message.error("网络不佳");
  15872. console.error(err);
  15873. });
  15874. }
  15875. })
  15876. .catch((err) => {
  15877. this.$message.error("网络不佳");
  15878. console.error(err);
  15879. });
  15880. },
  15881. updateEvaJson(array) {
  15882. array = array.filter((item) => {
  15883. item.isai = "1"
  15884. return item;
  15885. });
  15886. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  15887. this.evatIndex
  15888. ].eList = array;
  15889. },
  15890. forceUpdate() {
  15891. this.$forceUpdate();
  15892. },
  15893. forceUpdate2() {
  15894. setTimeout(() => {
  15895. this.courseText += "*0*%*";
  15896. setTimeout(() => {
  15897. this.courseText = this.courseText.replaceAll("*0*%*", "");
  15898. }, 0);
  15899. }, 100);
  15900. this.$forceUpdate();
  15901. },
  15902. deletEList(index, tIndex, eIndex) {
  15903. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  15904. eIndex,
  15905. 1
  15906. );
  15907. this.$forceUpdate();
  15908. },
  15909. getChoosePic(t) {
  15910. this.chooseType = t;
  15911. this.getAllBanner();
  15912. },
  15913. getAllBanner() {
  15914. this.sysPicVisible = true;
  15915. let params = {
  15916. t: this.chooseType,
  15917. };
  15918. this.ajax
  15919. .get(this.$store.state.api + "selectAllBanner", params)
  15920. .then((res) => {
  15921. this.sysPic = res.data[0];
  15922. })
  15923. .catch((err) => {
  15924. console.error(err);
  15925. });
  15926. },
  15927. // getClass() {
  15928. // let params = {
  15929. // oid: this.oid,
  15930. // };
  15931. // this.ajax
  15932. // .get(this.$store.state.api + "selectClassBySchool", params)
  15933. // .then((res) => {
  15934. // this.classJuri = res.data[0];
  15935. // })
  15936. // .catch((err) => {
  15937. // console.error(err);
  15938. // });
  15939. // },
  15940. deleteSysPic() {
  15941. this.cover = [];
  15942. this.isSysPic = false;
  15943. this.isSysPic2 = false;
  15944. },
  15945. deleteSelectPic() {
  15946. this.selectJson.url = "";
  15947. },
  15948. setEListStar() {
  15949. this.$forceUpdate();
  15950. },
  15951. deletRateList(i) {
  15952. this.rateJson.splice(i, 1);
  15953. },
  15954. addRateList() {
  15955. this.rateJson.push({ detail: "", score: 5, value: "" });
  15956. },
  15957. addSt() {
  15958. this.sentenceList.push({
  15959. sentenceTitle: "",
  15960. addSentence: [],
  15961. rightAnswer: [],
  15962. });
  15963. },
  15964. addSen(i) {
  15965. if (!this.sentenceList[i].sentenceTitle) {
  15966. this.$message.error("请填写卡片内容!");
  15967. return;
  15968. }
  15969. if (this.sentenceList[i].sentenceTitle.length > 10) {
  15970. this.$message.error("卡片内容字数不能超过10位");
  15971. return;
  15972. }
  15973. if (
  15974. this.sentenceList[i].addSentence.indexOf(
  15975. this.sentenceList[i].sentenceTitle
  15976. ) !== -1
  15977. ) {
  15978. this.$message.error("不能添加重复的卡片内容!");
  15979. return;
  15980. }
  15981. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  15982. // this.isPushTitleList.push(this.sentenceTitle);
  15983. this.sentenceList[i].sentenceTitle = "";
  15984. },
  15985. setRightAnswer(s, i, j) {
  15986. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  15987. this.sentenceList[i].rightAnswer.push(s);
  15988. }
  15989. },
  15990. returnCard(r, i, j) {
  15991. this.sentenceList[i].rightAnswer.splice(j, 1);
  15992. },
  15993. addSentenceTool() {
  15994. for (var i = 0; i < this.sentenceList.length; i++) {
  15995. if (this.sentenceList[i].rightAnswer.length == 0) {
  15996. this.$message.error(`请将题目${i + 1}设置完整。`);
  15997. return;
  15998. }
  15999. if (
  16000. this.sentenceList[i].addSentence.length !=
  16001. this.sentenceList[i].rightAnswer.length
  16002. ) {
  16003. this.$message.error(`请将题目${i + 1}设置完整。`);
  16004. return;
  16005. }
  16006. }
  16007. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16008. this.taskCount
  16009. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  16010. this.sentenceList = [
  16011. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  16012. ];
  16013. this.dialogVisibleSentence = false;
  16014. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16015. // itemTaskIndex
  16016. // ].toolChoose[toolIndex].tool = [];
  16017. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16018. // itemTaskIndex
  16019. // ].toolChoose[toolIndex].tool.push(i);
  16020. if (
  16021. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16022. .toolChoose[this.toolIndex].tool != 47
  16023. ) {
  16024. this.addTools(47, this.taskCount, this.toolIndex);
  16025. }
  16026. },
  16027. addTableJson() {
  16028. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  16029. // this.$message.error("请将信息填写完整!");
  16030. // return;
  16031. // }
  16032. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16033. this.taskCount
  16034. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  16035. // this.tableJson = [{ text: "" }];
  16036. // this.dialogVisibleTable = false;
  16037. this.$message.success("上传成功");
  16038. if (
  16039. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16040. .toolChoose[this.toolIndex].tool != 48
  16041. ) {
  16042. this.addTools(48, this.taskCount, this.toolIndex);
  16043. }
  16044. },
  16045. addWordJson() {
  16046. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16047. this.taskCount
  16048. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  16049. // this.wordJson = [{ text: "" }];
  16050. // this.dialogVisibleWord = false;
  16051. this.$message.success("上传成功");
  16052. if (
  16053. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16054. .toolChoose[this.toolIndex].tool != 52
  16055. ) {
  16056. this.addTools(52, this.taskCount, this.toolIndex);
  16057. }
  16058. },
  16059. addMoreUpload() {
  16060. if (this.uploadJson.length == 0) {
  16061. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16062. this.taskCount
  16063. ].toolChoose[this.toolIndex].uploadJson = [];
  16064. } else {
  16065. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16066. this.taskCount
  16067. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  16068. }
  16069. this.uploadJson = [];
  16070. this.dialogVisibleMoreUpload = false;
  16071. if (
  16072. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16073. .toolChoose[this.toolIndex].tool != 50
  16074. ) {
  16075. this.addTools(50, this.taskCount, this.toolIndex);
  16076. }
  16077. },
  16078. addPreTime() {
  16079. if (this.preTime == 0) {
  16080. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16081. this.taskCount
  16082. ].toolChoose[this.toolIndex].preTime = 0;
  16083. } else {
  16084. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16085. this.taskCount
  16086. ].toolChoose[this.toolIndex].preTime = this.preTime;
  16087. }
  16088. this.preTime = 0;
  16089. this.dialogVisiblePreTime = false;
  16090. if (
  16091. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16092. .toolChoose[this.toolIndex].tool != 10
  16093. ) {
  16094. this.addTools(10, this.taskCount, this.toolIndex);
  16095. }
  16096. },
  16097. goToTask(i) {
  16098. this.toolIndexType = "";
  16099. if (this.isClickColor == i + 1) {
  16100. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16101. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16102. // } else {
  16103. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16104. i
  16105. ].toolOpen = true;
  16106. // }
  16107. this.$forceUpdate();
  16108. return;
  16109. }
  16110. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16111. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16112. // } else {
  16113. document.querySelectorAll(".basic_box")[0].scrollTop =
  16114. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16115. this.isClickColor = i + 1;
  16116. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16117. // }
  16118. this.$forceUpdate();
  16119. },
  16120. taskScroll(){
  16121. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  16122. const sections = document.querySelectorAll('.taskBorder');
  16123. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  16124. sections.forEach((section, index) => {
  16125. const offsetTop = section.offsetTop;
  16126. const offsetHeight = section.offsetHeight;
  16127. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  16128. this.isClickColor = index +1;
  16129. }
  16130. });
  16131. },
  16132. taskOpen(i, stageIndex) {
  16133. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16134. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  16135. } else {
  16136. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16137. }
  16138. this.updateWork3(stageIndex);
  16139. this.$forceUpdate();
  16140. },
  16141. goToTask2(i, stage) {
  16142. this.toolIndexType = "";
  16143. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  16144. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16145. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16146. // } else {
  16147. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16148. i
  16149. ].toolOpen = true;
  16150. // }
  16151. this.$forceUpdate();
  16152. return;
  16153. }
  16154. if (this.unitIndex != stage) {
  16155. if (this.panUnitJson() == 2) {
  16156. return;
  16157. }
  16158. this.unitSet(stage);
  16159. }
  16160. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16161. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16162. // } else {
  16163. document.querySelectorAll(".basic_box")[0].scrollTop =
  16164. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16165. this.isClickColor = i + 1;
  16166. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16167. // }
  16168. this.$forceUpdate();
  16169. },
  16170. taskMove(type, index) {
  16171. this.$confirm(
  16172. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  16173. "提示",
  16174. {
  16175. confirmButtonText: "确定",
  16176. cancelButtonText: "取消",
  16177. type: "warning",
  16178. }
  16179. )
  16180. .then(() => {
  16181. if (type == 1) {
  16182. if (index > 0) {
  16183. let a = JSON.parse(
  16184. JSON.stringify(
  16185. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16186. index - 1
  16187. ]
  16188. )
  16189. );
  16190. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  16191. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16192. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16193. }
  16194. } else {
  16195. if (
  16196. index <
  16197. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  16198. ) {
  16199. let a = JSON.parse(
  16200. JSON.stringify(
  16201. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16202. index + 1
  16203. ]
  16204. )
  16205. );
  16206. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  16207. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16208. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16209. }
  16210. }
  16211. this.$forceUpdate();
  16212. })
  16213. .catch(() => {
  16214. return;
  16215. });
  16216. },
  16217. stageMove(type, index) {
  16218. if (type == 1) {
  16219. if (index > 0) {
  16220. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  16221. let acid = JSON.parse(
  16222. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  16223. );
  16224. let bcid = JSON.parse(
  16225. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  16226. );
  16227. this.unitJson3[index - 1] = this.unitJson3[index];
  16228. this.unitJson3[index] = a;
  16229. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  16230. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  16231. }
  16232. } else {
  16233. if (index < this.unitJson3.length - 1) {
  16234. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  16235. let acid = JSON.parse(
  16236. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  16237. );
  16238. let bcid = JSON.parse(
  16239. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  16240. );
  16241. this.unitJson3[index + 1] = this.unitJson3[index];
  16242. this.unitJson3[index] = a;
  16243. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  16244. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  16245. }
  16246. }
  16247. this.$forceUpdate();
  16248. },
  16249. addGroup(i) {
  16250. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  16251. this.groupJson.group.push({
  16252. name: "第" + (this.groupJson.group.length + 1) + "组",
  16253. });
  16254. },
  16255. deleteGroup(i) {
  16256. this.groupJson.group.splice(i, 1);
  16257. },
  16258. numberPan() {
  16259. if (
  16260. /[^\d]/.test(this.groupJson.number) ||
  16261. this.groupJson.number < 2 ||
  16262. this.groupJson.number > 10
  16263. ) {
  16264. this.$message.error("请输入2-10的数字");
  16265. this.groupJson.number = "";
  16266. }
  16267. },
  16268. numberPanJie() {
  16269. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  16270. this.$message.error('请输入大于1的数字')
  16271. this.courseJie = 1
  16272. }
  16273. },
  16274. numberPanTime() {
  16275. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  16276. this.$message.error('请输入大于1的数字')
  16277. this.courseTime = 1
  16278. }
  16279. },
  16280. addGroupJson() {
  16281. for (var i = 0; i < this.groupJson.group.length; i++) {
  16282. if (!this.groupJson.group[i].name) {
  16283. this.$message.error("请将信息填写完整!");
  16284. return;
  16285. }
  16286. }
  16287. if (!this.groupJson.number) {
  16288. this.$message.error("请将信息填写完整!");
  16289. return;
  16290. }
  16291. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16292. this.taskCount
  16293. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  16294. JSON.stringify(this.groupJson)
  16295. );
  16296. this.dialogVisibleGroup = false;
  16297. this.groupJson = {};
  16298. if (
  16299. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16300. .toolChoose[this.toolIndex].tool != 49
  16301. ) {
  16302. this.addTools(49, this.taskCount, this.toolIndex);
  16303. }
  16304. },
  16305. updateTime(preTime) {
  16306. this.preTime = preTime;
  16307. },
  16308. InviteChange(val) {
  16309. console.log(val);
  16310. let _check = [];
  16311. let _check2 = [];
  16312. for (var i = 0; i < this.grade2.length; i++) {
  16313. var gid = this.grade2[i].id;
  16314. _check.push(gid);
  16315. }
  16316. for (var i = 0; i < this.checkboxList2.length; i++) {
  16317. var _id = this.checkboxList2[i];
  16318. if (_check.indexOf(_id) !== -1) {
  16319. _check2.push(_id);
  16320. }
  16321. }
  16322. this.checkAll = _check2.length === _check.length;
  16323. return;
  16324. let array = JSON.parse(JSON.stringify(val));
  16325. this.inviteCode = this.inviteCode.filter((el) => {
  16326. if (val.indexOf(el.cid) != -1) {
  16327. array.splice(array.indexOf(el.cid), 1);
  16328. return el;
  16329. }
  16330. });
  16331. for (var i = 0; i < array.length; i++) {
  16332. this.getInviteCode(array[i]);
  16333. }
  16334. },
  16335. InviteChange2(val) {
  16336. console.log(val);
  16337. let _check = [];
  16338. let _check2 = [];
  16339. for (var i = 0; i < this.teacherJuri.length; i++) {
  16340. var gid = this.teacherJuri[i].userid;
  16341. _check.push(gid);
  16342. }
  16343. for (var i = 0; i < this.checkboxList3.length; i++) {
  16344. var _id = this.checkboxList3[i];
  16345. if (_check.indexOf(_id) !== -1) {
  16346. _check2.push(_id);
  16347. }
  16348. }
  16349. this.checkAll2 = _check2.length === _check.length;
  16350. this.setMan();
  16351. return;
  16352. let array = JSON.parse(JSON.stringify(val));
  16353. this.inviteCode = this.inviteCode.filter((el) => {
  16354. if (val.indexOf(el.cid) != -1) {
  16355. array.splice(array.indexOf(el.cid), 1);
  16356. return el;
  16357. }
  16358. });
  16359. for (var i = 0; i < array.length; i++) {
  16360. this.getInviteCode(array[i]);
  16361. }
  16362. },
  16363. handleCheckAllChange(val) {
  16364. if (val) {
  16365. for (var i = 0; i < this.grade2.length; i++) {
  16366. var gid = this.grade2[i].id;
  16367. if (this.checkboxList2.indexOf(gid) === -1) {
  16368. this.checkboxList2.push(gid);
  16369. }
  16370. }
  16371. } else {
  16372. let _check = [];
  16373. let _check2 = [];
  16374. for (var i = 0; i < this.grade2.length; i++) {
  16375. var gid = this.grade2[i].id;
  16376. _check.push(gid);
  16377. }
  16378. for (var i = 0; i < this.checkboxList2.length; i++) {
  16379. var _id = this.checkboxList2[i];
  16380. if (_check.indexOf(_id) === -1) {
  16381. _check2.push(_id);
  16382. }
  16383. }
  16384. this.checkboxList2 = _check2;
  16385. }
  16386. this.isIndeterminate = false;
  16387. },
  16388. handleCheckAllChange2(val) {
  16389. if (val) {
  16390. for (var i = 0; i < this.teacherJuri.length; i++) {
  16391. var gid = this.teacherJuri[i].userid;
  16392. if (this.checkboxList3.indexOf(gid) === -1) {
  16393. this.checkboxList3.push(gid);
  16394. }
  16395. }
  16396. } else {
  16397. let _check = [];
  16398. let _check2 = [];
  16399. for (var i = 0; i < this.teacherJuri.length; i++) {
  16400. var gid = this.teacherJuri[i].userid;
  16401. _check.push(gid);
  16402. }
  16403. for (var i = 0; i < this.checkboxList3.length; i++) {
  16404. var _id = this.checkboxList3[i];
  16405. if (_check.indexOf(_id) === -1) {
  16406. _check2.push(_id);
  16407. }
  16408. }
  16409. this.checkboxList3 = _check2;
  16410. }
  16411. this.isIndeterminate2 = false;
  16412. },
  16413. async getInviteCode(cid) {
  16414. let code = this.randomNumber();
  16415. let params = {
  16416. code: code,
  16417. oid: this.oid,
  16418. };
  16419. let type = 1;
  16420. for (var i = 0; i < this.inviteCode.length; i++) {
  16421. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  16422. type = 2;
  16423. }
  16424. }
  16425. if (type == 2) {
  16426. this.getInviteCode(cid);
  16427. return;
  16428. }
  16429. const res = await this.ajax.get(
  16430. this.$store.state.api + "selectInviteCode2",
  16431. params
  16432. );
  16433. if (
  16434. res.data.length &&
  16435. res.data[0].length &&
  16436. res.data[0][0].courseId != this.cid
  16437. ) {
  16438. this.getInviteCode(cid);
  16439. return;
  16440. }
  16441. let array = [];
  16442. for (var i = 0; i < this.inviteCode.length; i++) {
  16443. array.push(this.inviteCode[i].cid);
  16444. }
  16445. if (array.indexOf(cid) != -1) {
  16446. this.inviteCode[array.indexOf(cid)].ic = code;
  16447. } else {
  16448. this.inviteCode.push({ cid: cid, ic: code });
  16449. }
  16450. },
  16451. OpenInviteD(cid) {
  16452. let array = [];
  16453. this.icode = "";
  16454. for (var i = 0; i < this.inviteCode.length; i++) {
  16455. array.push(this.inviteCode[i].cid);
  16456. }
  16457. if (array.indexOf(cid) != -1) {
  16458. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  16459. }
  16460. this.inviteId = cid;
  16461. this.dialogVisibleInvite = true;
  16462. },
  16463. addInvite() {
  16464. let reg = /^[A-Za-z0-9]{4,}$/;
  16465. if (!reg.test(this.icode)) {
  16466. this.$message.error("请输入至少四位数字或英文组合的随机码");
  16467. return;
  16468. }
  16469. let type = 1;
  16470. for (var i = 0; i < this.inviteCode.length; i++) {
  16471. if (
  16472. this.inviteCode[i].cid != this.inviteId &&
  16473. this.icode == this.inviteCode[i].ic
  16474. ) {
  16475. type = 2;
  16476. }
  16477. }
  16478. if (type == 2) {
  16479. this.$message.error("已有此随机码,不能重复");
  16480. return;
  16481. }
  16482. let params = {
  16483. code: this.icode,
  16484. oid: this.oid,
  16485. };
  16486. this.ajax
  16487. .get(this.$store.state.api + "selectInviteCode", params)
  16488. .then((res) => {
  16489. if (
  16490. res.data.length &&
  16491. res.data[0].length &&
  16492. res.data[0][0].courseId != this.cid
  16493. ) {
  16494. this.$message.error("已有此随机码,不能重复");
  16495. return;
  16496. }
  16497. let array = [];
  16498. for (var i = 0; i < this.inviteCode.length; i++) {
  16499. array.push(this.inviteCode[i].cid);
  16500. }
  16501. if (array.indexOf(this.inviteId) != -1) {
  16502. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  16503. } else {
  16504. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  16505. }
  16506. this.icode = "";
  16507. this.dialogVisibleInvite = false;
  16508. })
  16509. .catch((err) => {
  16510. console.error(err);
  16511. });
  16512. },
  16513. randomNumber() {
  16514. // 随机生成两位数
  16515. // let num = Math.floor(Math.random() * 900) + 100;
  16516. // 生成 0 到 99 之间的随机整数
  16517. const randomNumber = Math.floor(Math.random() * 100);
  16518. // 如果随机数小于 10,补上前导零
  16519. const num =
  16520. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  16521. // 随机生成两个大写字母
  16522. let letters = "";
  16523. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  16524. for (let i = 0; i < 3; i++) {
  16525. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  16526. }
  16527. // 随机生成两位数字和字母的组合
  16528. let mix = "";
  16529. let chars =
  16530. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  16531. for (let i = 0; i < 3; i++) {
  16532. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  16533. mix += char;
  16534. }
  16535. // 随机选择一种类型
  16536. let type = Math.floor(Math.random() * 3);
  16537. return num;
  16538. // 根据类型输出结果
  16539. switch (type) {
  16540. case 0:
  16541. console.log(num); // 输出两位数
  16542. return num;
  16543. case 1:
  16544. console.log(letters); // 输出两个大写字母
  16545. return letters;
  16546. case 2:
  16547. console.log(mix); // 输出两位数字和字母的组合
  16548. return mix;
  16549. }
  16550. },
  16551. getPaste() {
  16552. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  16553. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  16554. if (!iframe && !iframe2) {
  16555. return;
  16556. }
  16557. let copyData = iframe ? iframe.contentWindow.copyData : false;
  16558. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  16559. if (copyData && copyData.stageData && copyData.stageData.length) {
  16560. this.isPasteStage = true;
  16561. }
  16562. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  16563. this.isPasteStage = true;
  16564. }
  16565. if (copyData && copyData.selectData.length) {
  16566. this.isPasteChoice = true;
  16567. }
  16568. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  16569. this.isPasteTask = true;
  16570. }
  16571. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  16572. this.isPasteTask = true;
  16573. }
  16574. },
  16575. getPaste2() {
  16576. let iframe = document.querySelectorAll(".interIframe")[0];
  16577. const turndownService = new TurndownService();
  16578. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  16579. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  16580. if(confirm_next_step){
  16581. this.courseText += turndownService.turndown(confirm_next_step)
  16582. iframe.contentWindow.confirm_next_step = ''
  16583. }
  16584. if(work_area_text && work_area_text.aiContent){
  16585. this.courseText += turndownService.turndown(work_area_text.aiContent)
  16586. iframe.contentWindow.work_area_text = ''
  16587. }
  16588. },
  16589. textAreaChange(type, index){
  16590. if(type == 'courseText'){
  16591. this.addCourseBehavior('courseBehavior', `手动修改课程概况信息-${this.courseText}`)
  16592. }
  16593. if(type == 'targetCourseText2'){
  16594. this.addCourseBehavior('courseBehavior', `手动修改课程目标信息-${this.targetCourseText2}`)
  16595. }
  16596. if(type == 'taskDetail2'){
  16597. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程大纲信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2}`)
  16598. }
  16599. if(type == 'taskDetail3'){
  16600. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程教案信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3}`)
  16601. }
  16602. },
  16603. setCourseInfo(type){
  16604. let courseInfo = ''
  16605. let sub = []
  16606. let mclass = []
  16607. if (this.courseTypeId.length) {
  16608. for (var i = 0; i < this.courseTypeId.length; i++) {
  16609. let _sid = this.courseTypeId[i]
  16610. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16611. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16612. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16613. }
  16614. }
  16615. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16616. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16617. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16618. }
  16619. }
  16620. }
  16621. }
  16622. if(this.courseName){
  16623. courseInfo = `课程名称:${this.courseName} `
  16624. }
  16625. if(mclass.length){
  16626. courseInfo += `年级:${mclass.join(',')} `
  16627. }
  16628. if(sub.length){
  16629. courseInfo += `学科:${sub.join(',')} `
  16630. }
  16631. console.log(courseInfo)
  16632. window.course_info = courseInfo
  16633. this.course_info = courseInfo
  16634. window.course_lang = this.languageSetting
  16635. },
  16636. saveCourse(){
  16637. if (this.cid == "" || this.cid == undefined) {
  16638. this.addWork();
  16639. } else {
  16640. if (this.userid != this.courseUserid && this.role != "1") {
  16641. this.updateWork2();
  16642. } else {
  16643. this.updateWork();
  16644. }
  16645. }
  16646. },
  16647. setCover($event, attempts = 0) {
  16648. var _this = this;
  16649. this.addCourseBehavior('courseBehavior', `修改课程名称-${this.courseName}`)
  16650. if (_this.cover.length || attempts >= 3) {
  16651. return;
  16652. }
  16653. _this.searchFileName = JSON.parse(JSON.stringify(_this.courseName))
  16654. _this.findMatchingContents()
  16655. _this.imageloading2 = true;
  16656. _this.ajax
  16657. .post("https://gpt.cocorobo.cn/search_image", {
  16658. page: _this.ppage,
  16659. pagesize: 9,
  16660. query: _this.courseName,
  16661. })
  16662. .then(function (response) {
  16663. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  16664. if(data){
  16665. _this.cover = [];
  16666. setTimeout(() => {
  16667. _this.cover[0] = {
  16668. name: "网络图片.png",
  16669. url: data[0].thumbnail,
  16670. };
  16671. _this.imgChange1(null, null, 1, null);
  16672. _this.$forceUpdate();
  16673. _this.saveCourse()
  16674. }, 0);
  16675. _this.imageloading2 = false;
  16676. }else {
  16677. _this.imageloading2 = false;
  16678. _this.setCover($event, attempts + 1);
  16679. }
  16680. })
  16681. .catch(function (error) {
  16682. _this.imageloading2 = false;
  16683. _this.setCover($event, attempts + 1);
  16684. console.log(error);
  16685. });
  16686. },
  16687. searchImage() {
  16688. var _this = this;
  16689. _this.imageList = [];
  16690. if (!_this.searchImageValue) {
  16691. _this.sysPicVisible2 = true;
  16692. return;
  16693. }
  16694. _this.imageloading = true;
  16695. _this.ajax
  16696. .post("https://gpt.cocorobo.cn/search_image", {
  16697. page: _this.ppage,
  16698. pagesize: 9,
  16699. query: _this.searchImageValue,
  16700. })
  16701. .then(function (response) {
  16702. // console.log(response.data.data);
  16703. var data = response.data.FunctionResponse.result;
  16704. for (var i = 0; i < data.length; i++) {
  16705. _this.imageList.push({ url: data[i].thumbnail });
  16706. }
  16707. _this.imageloading = false;
  16708. })
  16709. .catch(function (error) {
  16710. console.log(error);
  16711. });
  16712. _this.sysPicVisible2 = true;
  16713. },
  16714. changePicture() {
  16715. this.ppage++;
  16716. this.searchImage();
  16717. },
  16718. resetImage() {
  16719. this.ppage = 1;
  16720. this.searchImage();
  16721. },
  16722. jumpGj(i, j) {
  16723. if (i + 1 != this.isClickColor) {
  16724. this.isClickColor = i + 1;
  16725. }
  16726. var a = document.scrollingElement;
  16727. this.toolIndexType = `gj${i}${j}`;
  16728. let target = document.querySelector(`#gj${i}${j}`);
  16729. if (target) {
  16730. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  16731. setTimeout(() => {
  16732. target.scrollIntoView(true);
  16733. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  16734. j
  16735. ].isFold3 = false;
  16736. setTimeout(() => {
  16737. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  16738. }, 0);
  16739. }, 0);
  16740. }
  16741. },
  16742. jumpGj2(i, j, k) {
  16743. if (this.unitIndex != k) {
  16744. if (this.panUnitJson() == 2) {
  16745. return;
  16746. }
  16747. this.unitSet(k);
  16748. }
  16749. setTimeout(() => {
  16750. if (i + 1 != this.isClickColor) {
  16751. this.isClickColor = i + 1;
  16752. }
  16753. var a = document.scrollingElement;
  16754. this.toolIndexType = `gj${i}${j}${k}`;
  16755. let target = document.querySelector(`#gj${i}${j}`);
  16756. if (target) {
  16757. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  16758. setTimeout(() => {
  16759. target.scrollIntoView(true);
  16760. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  16761. j
  16762. ].isFold3 = false;
  16763. setTimeout(() => {
  16764. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  16765. }, 0);
  16766. }, 0);
  16767. }
  16768. }, 0);
  16769. },
  16770. dragStart(val, i, j) {
  16771. console.log(this.taskCount);
  16772. this.dragType = "drag";
  16773. this.taskCount = j;
  16774. this.oldIndex = i;
  16775. this.oldData = val;
  16776. },
  16777. dragOver(i, j) {
  16778. this.typeIndex = "chapter-" + j + "-" + i;
  16779. this.newIndex = i;
  16780. },
  16781. dragEnd() {
  16782. if (this.dragType != "drag") {
  16783. this.typeIndex = "";
  16784. this.newIndex = "";
  16785. this.dragType = "";
  16786. this.isdrag = "";
  16787. return;
  16788. }
  16789. console.log(this.taskCount);
  16790. let newItems = [
  16791. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16792. .chapterData,
  16793. ];
  16794. // 删除老的节点
  16795. newItems.splice(this.oldIndex, 1);
  16796. // 在列表中目标位置增加新的节点
  16797. newItems.splice(this.newIndex, 0, this.oldData);
  16798. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16799. this.taskCount
  16800. ].chapterData = [...newItems];
  16801. this.typeIndex = "";
  16802. this.newIndex = "";
  16803. this.dragType = "";
  16804. this.isdrag = "";
  16805. this.$forceUpdate();
  16806. },
  16807. dragTaskStart(val, i, j) {
  16808. this.dragType = "task";
  16809. this.oldIndex = i;
  16810. this.oldData = val;
  16811. this.oldUnitIndex = j;
  16812. },
  16813. dragTaskOver(i, j) {
  16814. this.typeIndex = "task-" + i;
  16815. this.newIndex = i;
  16816. this.checkUnitIndex = j;
  16817. },
  16818. async dragTaskEnd() {
  16819. if (this.dragType != "task") {
  16820. this.newIndex = "";
  16821. this.dragType = "";
  16822. this.typeIndex = "";
  16823. this.checkUnitIndex = "";
  16824. this.isdrag = "";
  16825. return;
  16826. }
  16827. if (
  16828. this.newIndex == this.oldIndex &&
  16829. this.oldUnitIndex == this.checkUnitIndex
  16830. ) {
  16831. this.newIndex = "";
  16832. this.dragType = "";
  16833. this.typeIndex = "";
  16834. this.checkUnitIndex = "";
  16835. this.isdrag = "";
  16836. return;
  16837. }
  16838. let count1 = await this.getWorksCount(
  16839. 2,
  16840. this.checkUnitIndex,
  16841. this.newIndex,
  16842. 0
  16843. );
  16844. let count2 = await this.getWorksCount(
  16845. 2,
  16846. this.oldUnitIndex,
  16847. this.oldIndex,
  16848. 0
  16849. );
  16850. if (count1 > 0 || count2 > 0) {
  16851. this.$confirm(
  16852. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  16853. "提示",
  16854. {
  16855. confirmButtonText: "确定",
  16856. cancelButtonText: "取消",
  16857. type: "warning",
  16858. }
  16859. )
  16860. .then(() => {
  16861. if (this.oldUnitIndex != this.checkUnitIndex) {
  16862. let newItems = [
  16863. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16864. ];
  16865. // 删除老的节点
  16866. newItems.splice(this.oldIndex, 1);
  16867. // 在列表中目标位置增加新的节点
  16868. let newItems2 = [
  16869. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  16870. ];
  16871. newItems2.splice(this.newIndex, 0, this.oldData);
  16872. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16873. ...newItems,
  16874. ];
  16875. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  16876. ...newItems2,
  16877. ];
  16878. } else {
  16879. let newItems = [
  16880. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16881. ];
  16882. let chapterData = []
  16883. if (this.oldIndex == 0) {
  16884. chapterData = newItems[this.oldIndex].chapterData
  16885. newItems[this.oldIndex].chapterData = []
  16886. } else if (this.newIndex == 0) {
  16887. chapterData = newItems[this.newIndex].chapterData
  16888. newItems[this.oldIndex].chapterData = []
  16889. }
  16890. // 删除老的节点
  16891. newItems.splice(this.oldIndex, 1);
  16892. // 在列表中目标位置增加新的节点
  16893. newItems.splice(this.newIndex, 0, this.oldData);
  16894. if (this.oldIndex == 0 || this.newIndex == 0) {
  16895. newItems[0].chapterData = chapterData
  16896. }
  16897. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16898. ...newItems,
  16899. ];
  16900. }
  16901. this.typeIndex = "";
  16902. this.newIndex = "";
  16903. this.dragType = "";
  16904. this.checkUnitIndex = "";
  16905. this.isdrag = "";
  16906. this.updateWork();
  16907. this.$forceUpdate();
  16908. })
  16909. .catch(() => {
  16910. this.newIndex = "";
  16911. this.dragType = "";
  16912. this.typeIndex = "";
  16913. this.checkUnitIndex = "";
  16914. this.isdrag = "";
  16915. return;
  16916. });
  16917. } else {
  16918. if (this.oldUnitIndex != this.checkUnitIndex) {
  16919. let newItems = [
  16920. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16921. ];
  16922. // 删除老的节点
  16923. newItems.splice(this.oldIndex, 1);
  16924. // 在列表中目标位置增加新的节点
  16925. let newItems2 = [
  16926. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  16927. ];
  16928. newItems2.splice(this.newIndex, 0, this.oldData);
  16929. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16930. ...newItems,
  16931. ];
  16932. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  16933. ...newItems2,
  16934. ];
  16935. } else {
  16936. let newItems = [
  16937. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16938. ];
  16939. let chapterData = []
  16940. if (this.oldIndex == 0) {
  16941. chapterData = newItems[this.oldIndex].chapterData
  16942. newItems[this.oldIndex].chapterData = []
  16943. } else if (this.newIndex == 0) {
  16944. chapterData = newItems[this.newIndex].chapterData
  16945. newItems[this.oldIndex].chapterData = []
  16946. }
  16947. // 删除老的节点
  16948. newItems.splice(this.oldIndex, 1);
  16949. // 在列表中目标位置增加新的节点
  16950. newItems.splice(this.newIndex, 0, this.oldData);
  16951. if (this.oldIndex == 0 || this.newIndex == 0) {
  16952. newItems[0].chapterData = chapterData
  16953. }
  16954. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16955. ...newItems,
  16956. ];
  16957. }
  16958. this.typeIndex = "";
  16959. this.newIndex = "";
  16960. this.dragType = "";
  16961. this.checkUnitIndex = "";
  16962. this.isdrag = "";
  16963. this.updateWork();
  16964. this.$forceUpdate();
  16965. }
  16966. },
  16967. dragUnitStart(val, i) {
  16968. this.dragType = "Unit";
  16969. this.oldIndex = i;
  16970. this.oldData = val;
  16971. },
  16972. dragUnitOver(i) {
  16973. this.typeIndex = "Unit-" + i;
  16974. this.newIndex = i;
  16975. console.log(i, this.unitJson[i].toolOpen);
  16976. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  16977. this.unitJson[i].toolOpen = true;
  16978. this.updateWork();
  16979. this.$forceUpdate();
  16980. }
  16981. },
  16982. async dragUnitEnd() {
  16983. if (this.dragType != "Unit") {
  16984. this.newIndex = "";
  16985. this.dragType = "";
  16986. this.typeIndex = "";
  16987. this.isdrag = "";
  16988. return;
  16989. }
  16990. if (this.newIndex == this.oldIndex) {
  16991. this.newIndex = "";
  16992. this.dragType = "";
  16993. this.typeIndex = "";
  16994. this.isdrag = "";
  16995. return;
  16996. }
  16997. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  16998. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  16999. console.log(count1, count2);
  17000. if (count1 > 0 || count2 > 0) {
  17001. this.$confirm(
  17002. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  17003. "提示",
  17004. {
  17005. confirmButtonText: "确定",
  17006. cancelButtonText: "取消",
  17007. type: "warning",
  17008. }
  17009. )
  17010. .then(() => {
  17011. let newItems = [...this.unitJson];
  17012. // 删除老的节点
  17013. newItems.splice(this.oldIndex, 1);
  17014. // 在列表中目标位置增加新的节点
  17015. newItems.splice(this.newIndex, 0, this.oldData);
  17016. this.unitJson = [...newItems];
  17017. this.typeIndex = "";
  17018. this.newIndex = "";
  17019. this.dragType = "";
  17020. this.isdrag = "";
  17021. this.updateWork();
  17022. this.$forceUpdate();
  17023. })
  17024. .catch(() => {
  17025. this.newIndex = "";
  17026. this.dragType = "";
  17027. this.typeIndex = "";
  17028. this.isdrag = "";
  17029. return;
  17030. });
  17031. } else {
  17032. let newItems = [...this.unitJson];
  17033. // 删除老的节点
  17034. newItems.splice(this.oldIndex, 1);
  17035. // 在列表中目标位置增加新的节点
  17036. newItems.splice(this.newIndex, 0, this.oldData);
  17037. this.unitJson = [...newItems];
  17038. this.typeIndex = "";
  17039. this.newIndex = "";
  17040. this.dragType = "";
  17041. this.isdrag = "";
  17042. this.updateWork();
  17043. this.$forceUpdate();
  17044. }
  17045. },
  17046. getWorksCount(type, stage, task, tool) {
  17047. return new Promise((resolve, reject) => {
  17048. let params = [
  17049. {
  17050. cid: this.cid,
  17051. stage: stage,
  17052. task: task,
  17053. tool: tool,
  17054. type: type,
  17055. },
  17056. ];
  17057. this.ajax
  17058. .post(this.$store.state.api + "getCourseWorkCount", params)
  17059. .then((res) => {
  17060. let count = res.data[0][0].count;
  17061. resolve(count);
  17062. })
  17063. .catch((err) => {
  17064. resolve(0);
  17065. this.$message.error("网络不佳");
  17066. console.error(err);
  17067. });
  17068. });
  17069. },
  17070. getTwoType(id) {
  17071. this.twoJson = [];
  17072. var array = this.CourseTypeJson1[
  17073. "3f8eed32-aba9-11ee-b534-005056b86db5"
  17074. ].filter((e) => {
  17075. return e.ppid == id;
  17076. });
  17077. this.twoJson = array;
  17078. this.$forceUpdate();
  17079. },
  17080. ctype() {
  17081. this.oneJson =
  17082. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  17083. },
  17084. selectAllType1() {
  17085. this.CourseType1 = [];
  17086. this.CourseTypeJson1 = {};
  17087. this.courseTypeId1 = {};
  17088. this.$forceUpdate();
  17089. let params = {
  17090. org: this.org && this.org != "" ? this.org : "",
  17091. oid: this.oid && this.oid != "" ? this.oid : "",
  17092. };
  17093. this.ajax
  17094. .get(this.$store.state.api + "selectAllEvaType", params)
  17095. .then((res) => {
  17096. this.CourseType1 = res.data;
  17097. for (var i = 0; i < res.data[0].length; i++) {
  17098. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  17099. res.data[0][i].name = "一级分类";
  17100. } else if (
  17101. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  17102. ) {
  17103. res.data[0][i].name = "二级分类";
  17104. }
  17105. if (!this.cid) {
  17106. this.courseTypeId1[res.data[0][i].id] = [];
  17107. }
  17108. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  17109. this.CourseTypeJson1[res.data[0][i].id] = [];
  17110. }
  17111. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  17112. for (var j = 0; j < res.data[1].length; j++) {
  17113. if (res.data[0][i].id == res.data[1][j].pid) {
  17114. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  17115. }
  17116. }
  17117. // } else {
  17118. if (res.data[2].length > 0) {
  17119. for (var j = 0; j < res.data[2].length; j++) {
  17120. if (res.data[0][i].id == res.data[2][j].pid) {
  17121. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  17122. }
  17123. }
  17124. }
  17125. if (res.data[3].length > 0) {
  17126. for (var j = 0; j < res.data[3].length; j++) {
  17127. if (res.data[0][i].id == res.data[3][j].pid) {
  17128. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  17129. }
  17130. }
  17131. }
  17132. // }
  17133. }
  17134. this.ctype();
  17135. this.cetBoxDialog = true;
  17136. })
  17137. .catch((err) => {
  17138. console.error(err);
  17139. });
  17140. },
  17141. allEvaCan() {
  17142. if (this.taskLoading.length) {
  17143. let _pan = 1
  17144. for (var k = 0; k < this.taskLoading.length; k++) {
  17145. if (this.taskLoading[k]) {
  17146. this.$message({
  17147. message: `请等待任务${k + 1}回答完毕后再继续`,
  17148. type: "warning"
  17149. });
  17150. _pan = 2
  17151. }
  17152. }
  17153. if (_pan == 2) {
  17154. return
  17155. }
  17156. }
  17157. if (this.taskGLoading.length) {
  17158. let _pan = 1
  17159. for (var k = 0; k < this.taskGLoading.length; k++) {
  17160. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  17161. this.$message({
  17162. message: `请等待任务${k + 1}回答完毕后再继续`,
  17163. type: "warning"
  17164. });
  17165. _pan = 2
  17166. }
  17167. }
  17168. if (_pan == 2) {
  17169. return
  17170. }
  17171. }
  17172. this.$confirm("是否一键生成所有工具的评价设置?会占用您一些时间。", "提示", {
  17173. confirmButtonText: "确定",
  17174. cancelButtonText: "取消",
  17175. type: "warning",
  17176. customClass: 'custom-confirm-box'
  17177. })
  17178. .then(() => {
  17179. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17180. for (var index = 0; index < taskJson.length; index++) {
  17181. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  17182. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  17183. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  17184. }
  17185. }
  17186. }
  17187. })
  17188. .catch(() => {
  17189. });
  17190. setTimeout(() => {
  17191. this.setTipsIndex()
  17192. }, 500)
  17193. },
  17194. setAiJson(pan,string,string2,string3){
  17195. if(pan == 'aiTeacher2'){
  17196. this.aiJson['teacherDetail2'] = string
  17197. }else if(pan == 'aiRateRuleA'){
  17198. this.aiJson['aiRateRule'] = string
  17199. }else if(pan == 'aiOutline2'){
  17200. this.aiJson['aiOutlineTask'] = string
  17201. this.aiJson['aiOutlineDetail'] = string2
  17202. }else if(pan == 'aiTeacher3'){
  17203. this.aiJson['aiCpoteTask'] = string
  17204. this.aiJson['teacherDetail2'] = string2
  17205. }else if(pan == 'aiTask2'){
  17206. this.aiJson['aiTask'] = string
  17207. }else if(pan == 'aiTask3'){
  17208. this.aiJson['aiTaskG1'] = string
  17209. this.aiJson['aiTaskG2'] = string2
  17210. this.aiJson['aiTaskG3'] = string3
  17211. }else if(pan == 'aiteacherTextDetail'){
  17212. this.aiJson['aiAbstract'] = string
  17213. }else if(pan == 'aitargetTextDetail'){
  17214. this.aiJson['aiTarget'] = string
  17215. }else if(pan == 'aitargetTextDetail2'){
  17216. this.aiJson['aiTarget2'] = string
  17217. }else if(pan == 'aitargetTextDetail3'){
  17218. this.aiJson['aiTargetGet'] = string
  17219. this.aiJson['aiTarget2'] = string2
  17220. }else {
  17221. this.aiJson[pan] = string
  17222. }
  17223. this.aiText2 = ''
  17224. this.aiText3 = ''
  17225. this.$forceUpdate();
  17226. },
  17227. editTask3(index){
  17228. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  17229. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  17230. }else {
  17231. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  17232. }
  17233. setTimeout(() => {
  17234. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  17235. setTimeout(() => {
  17236. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  17237. }, 0);
  17238. }, 100);
  17239. this.$forceUpdate();
  17240. },
  17241. editTask2(index){
  17242. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  17243. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  17244. }else {
  17245. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  17246. }
  17247. setTimeout(() => {
  17248. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  17249. setTimeout(() => {
  17250. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  17251. }, 0);
  17252. }, 100);
  17253. this.$forceUpdate();
  17254. },
  17255. openRule(i, k){
  17256. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  17257. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  17258. }else {
  17259. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  17260. }
  17261. setTimeout(() => {
  17262. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  17263. setTimeout(() => {
  17264. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  17265. }, 0);
  17266. }, 200);
  17267. this.$forceUpdate();
  17268. },
  17269. editCpote(index){
  17270. if(this.cpote[index]){
  17271. this.cpote[index] = false
  17272. }else {
  17273. this.cpote[index] = true
  17274. }
  17275. setTimeout(() => {
  17276. this.cpote[index.replace('s','')] += "*0*%*";
  17277. setTimeout(() => {
  17278. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  17279. }, 0);
  17280. }, 100);
  17281. this.$forceUpdate();
  17282. },
  17283. clickGenTT(){
  17284. if(!this.teacherInfoData.length){
  17285. this.$message.error("请上传教案");
  17286. return;
  17287. }
  17288. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  17289. this.openAiDialog(2, 'aiteacherTextDetail',1)
  17290. setTimeout(() => {
  17291. this.openAiDialog(2, 'aitargetTextDetail',1)
  17292. }, 500);
  17293. },
  17294. async getUserName() {
  17295. let params = { uid: this.userid };
  17296. try {
  17297. let res = await this.ajax.get(
  17298. this.$store.state.api + "getUser",
  17299. params
  17300. );
  17301. return res.data[0][0].name;
  17302. } catch (err) {
  17303. console.error(err);
  17304. }
  17305. },
  17306. getCGN(type){
  17307. let sub = [] //学科
  17308. let mclass = [] //年纪
  17309. let theme = []
  17310. if (this.courseTypeId.length) {
  17311. for (var i = 0; i < this.courseTypeId.length; i++) {
  17312. let _sid = this.courseTypeId[i]
  17313. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17314. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17315. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17316. }
  17317. }
  17318. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17319. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17320. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17321. }
  17322. }
  17323. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17324. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  17325. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  17326. }
  17327. }
  17328. }
  17329. if(type == 1){
  17330. return sub.join(",")
  17331. }else if(type == 2){
  17332. return mclass.join(",")
  17333. }else if(type == 3){
  17334. return theme.join(",")
  17335. }
  17336. }
  17337. },
  17338. async exportTeachPlan(){
  17339. this.loading = true
  17340. const zip = new JSZip();
  17341. let md = new MarkdownIt();
  17342. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  17343. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17344. let String = ''
  17345. String += `<h1 style="text-align: center;">${this.courseName}</h1>`
  17346. String += `<h2>课程基本信息</h2>`
  17347. String += `<div><strong>设计者:</strong><span>${await this.getUserName()}</span></div>`
  17348. String += `<div><strong>年级:</strong><span></span>${this.getCGN(2)}</div>`
  17349. String += `<div><strong>主题:</strong><span></span>${this.getCGN(3)}</div>`
  17350. String += `<div><strong>学科:</strong><span></span>${this.getCGN(1)}</div>`
  17351. if(courseText){
  17352. String += `<h2>课程概况</h2>`
  17353. String += md.render(courseText)
  17354. }
  17355. if(target){
  17356. String += `<h2>课程目标</h2>`
  17357. String += md.render(target)
  17358. }
  17359. String += `<h2>课程教案</h2>`
  17360. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17361. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  17362. // let name = _task.task+'-教案'
  17363. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  17364. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  17365. await this.generate(name, _html, i)
  17366. }
  17367. String += `<h3>任务${i+1}</h3>`
  17368. String += `<h4>${_task.task}</h4>`
  17369. String += _html
  17370. // let file = await this.generateExport(name, _html, i)
  17371. // zip.file(`${name}.docx`, file, { binary: true })
  17372. }
  17373. await this.generateExport(this.courseName, String, i)
  17374. setTimeout(() => {
  17375. this.loading = false
  17376. }, 2000);
  17377. // zip.generateAsync({ type: "blob" }).then((content) => {
  17378. // // 生成二进制流
  17379. // saveAs(
  17380. // content,
  17381. // this.courseName + "-" + "教案.zip"
  17382. // ); // 利用file-saver保存文件 自定义文件名
  17383. // setTimeout(() => {
  17384. // this.loading = false
  17385. // // if(!this.cid){
  17386. // // this.addWork(3)
  17387. // // }else{
  17388. // // this.updateWork();
  17389. // // this.steps = 4;
  17390. // // }
  17391. // }, 2000);
  17392. // });
  17393. },
  17394. async exportTaskEA(){
  17395. this.loading = true
  17396. const zip = new JSZip();
  17397. let md = new MarkdownIt();
  17398. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17399. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  17400. for(var j = 0; j < _task.chapterData.length; j++){
  17401. if(_task.chapterData[j].type == 3 && _task.chapterData[j].name.includes('学历案')){
  17402. let file = await getFile(_task.chapterData[j].url)
  17403. if (file.data != 1) {
  17404. // 下载文件, 并存成ArrayBuffer对象
  17405. const file_name = _task.chapterData[j].name; // 获取文件名
  17406. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  17407. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  17408. // 判断是否有重复的文件名字
  17409. if (!zip.file(file_name)) {
  17410. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  17411. } else {
  17412. // 如果有重复的文件名,则在文件名后添加序号
  17413. let count = 1;
  17414. let newFileName = fileNameWithoutExt;
  17415. while (zip.file(`${newFileName}.${fileExt}`)) {
  17416. newFileName = `${fileNameWithoutExt}(${count})`;
  17417. count++;
  17418. }
  17419. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  17420. }
  17421. }
  17422. }
  17423. }
  17424. for(var j = 0; j < _task.toolChoose.length; j++){
  17425. let tool = _task.toolChoose[j]
  17426. if(tool.eList && tool.eList.length){
  17427. let tableContent = '| 素养 | 评价标准 | 评价细则 |\n| --- | --- | --- |\n';
  17428. tool.eList.forEach(item => {
  17429. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  17430. });
  17431. let html = md.render(tableContent);
  17432. let name = `任务${i+1}工具${j+1}的评价`
  17433. let file = await this.generateExport2(name, html, i)
  17434. zip.file(`${name}.docx`, file, { binary: true })
  17435. }
  17436. }
  17437. // let file = await this.generateExport(name, _html, i)
  17438. // zip.file(`${name}.docx`, file, { binary: true })
  17439. }
  17440. zip.generateAsync({ type: "blob" }).then((content) => {
  17441. // 生成二进制流
  17442. saveAs(
  17443. content,
  17444. this.courseName + "-" + "评价和学历案.zip"
  17445. ); // 利用file-saver保存文件 自定义文件名
  17446. setTimeout(() => {
  17447. this.loading = false
  17448. }, 2000);
  17449. });
  17450. },
  17451. clickGenTT2(){
  17452. if (this.courseName == "") {
  17453. this.$message.error("请补充填写课程名称");
  17454. return;
  17455. }
  17456. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  17457. let functionA = ''
  17458. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  17459. // setTimeout(() => {
  17460. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  17461. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  17462. // }, 500);
  17463. functionA = ()=>{
  17464. this.openAiDialog(2, 'aitargetTextDetail3',1)
  17465. }
  17466. }
  17467. this.openAiDialog(2, 'aiDetail',1, functionA)
  17468. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  17469. // setTimeout(() => {
  17470. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  17471. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  17472. // }, 500);
  17473. }
  17474. this.courseTextBool = true
  17475. },
  17476. changeIsuseT(){
  17477. if(this.isuseT == 1){
  17478. this.courseTextB = false
  17479. }else if(this.isuseT == 2){
  17480. navigator.mediaDevices.getUserMedia({ audio: true })
  17481. .then(stream => {
  17482. console.log('获取录音权限成功');
  17483. })
  17484. .catch(err => {
  17485. this.$message.error('获取录音权限失败')
  17486. console.error('获取录音权限失败:', err);
  17487. });
  17488. }else{
  17489. if(this.courseText){
  17490. this.courseTextB = false
  17491. }else{
  17492. this.courseTextB = true
  17493. }
  17494. }
  17495. this.interSetting = false
  17496. this.interPan = true
  17497. },
  17498. changeLang(){
  17499. window.course_lang = this.languageSetting
  17500. },
  17501. openInterPanSetting(){
  17502. this.interSetting = !this.interSetting
  17503. if(this.interSetting){
  17504. if(this.istemplate == 1){
  17505. this.agentid = this.aiJson.agentid
  17506. }else {
  17507. this.agentid = this.aiJson.sagentid
  17508. }
  17509. }else {
  17510. this.agentid = ''
  17511. }
  17512. },
  17513. openInterPanSetting2(){
  17514. this.interSetting = !this.interSetting
  17515. if(this.interSetting){
  17516. this.r_agentid = this.aiJson.recordAgentid
  17517. }else {
  17518. this.r_agentid = ''
  17519. }
  17520. },
  17521. setAgentid(){
  17522. if(!this.agentid.trim()){
  17523. this.$message.error('请输入工作流链接')
  17524. return;
  17525. }
  17526. if(this.istemplate == 1){
  17527. this.aiJson.agentid = this.agentid.trim()
  17528. }else {
  17529. this.aiJson.sagentid = this.agentid.trim()
  17530. }
  17531. this.interFlash = false
  17532. setTimeout(() => {
  17533. this.interFlash = true
  17534. }, 100);
  17535. this.interSetting = false
  17536. },
  17537. setAgentid2(){
  17538. if(!this.r_agentid.trim()){
  17539. this.$message.error('请输入工作流链接')
  17540. return;
  17541. }
  17542. this.aiJson.recordAgentid = this.r_agentid.trim()
  17543. this.interSetting = false
  17544. },
  17545. rebuildAgentid(){
  17546. this.aiJson.sagentid = ''
  17547. this.interFlash = false
  17548. setTimeout(() => {
  17549. this.interFlash = true
  17550. }, 100);
  17551. this.interSetting = false
  17552. },
  17553. cancelInterSetting(){
  17554. this.agentid = ''
  17555. this.interSetting = false
  17556. },
  17557. cancelInterSetting2(){
  17558. this.r_agentid = ''
  17559. this.interSetting = false
  17560. },
  17561. openAiDialog2(clickType, type, callback, index, tindex){
  17562. if (this.taskLoading.length) {
  17563. let _pan = 1
  17564. for(var k = 0; k < this.taskLoading.length; k++){
  17565. if(this.taskLoading[k]){
  17566. this.$message({
  17567. message: `请等待任务${k+1}回答完毕后再继续`,
  17568. type: "warning"
  17569. });
  17570. _pan = 2
  17571. }
  17572. }
  17573. if(_pan == 2){
  17574. return
  17575. }
  17576. }
  17577. if(this.taskGLoading.length){
  17578. let _pan = 1
  17579. for(var k = 0; k < this.taskGLoading.length; k++){
  17580. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  17581. this.$message({
  17582. message: `请等待任务${k+1}回答完毕后再继续`,
  17583. type: "warning"
  17584. });
  17585. _pan = 2
  17586. }
  17587. }
  17588. if(_pan == 2){
  17589. return
  17590. }
  17591. }
  17592. let pan2 = 1
  17593. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17594. for(var _index = 0; _index < taskJson.length; _index++){
  17595. for (var j = 0; j < taskJson[_index].toolChoose.length; j++) {
  17596. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[_index].toolChoose[j].tool[0]) != -1){
  17597. if(this.$refs['evalist'+_index+j] && this.$refs['evalist'+_index+j][0].loading){
  17598. this.$message({
  17599. message: `请等待任务${_index+1}回答完毕后再继续`,
  17600. type: "warning"
  17601. });
  17602. pan2 = 2
  17603. }
  17604. }
  17605. }
  17606. }
  17607. if(pan2 == 2){
  17608. return
  17609. }
  17610. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  17611. confirmButtonText: "确定",
  17612. cancelButtonText: "取消",
  17613. type: "warning",
  17614. customClass: 'custom-confirm-box'
  17615. })
  17616. .then(() => {
  17617. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  17618. // this.openAiDialog(clickType, 'aiTeacher')
  17619. // }else {
  17620. this.openAiDialog(clickType, type, callback, index, tindex)
  17621. // }
  17622. })
  17623. .catch(() => {
  17624. });
  17625. setTimeout(() => {
  17626. this.setTipsIndex()
  17627. }, 500)
  17628. },
  17629. async openAiDialog(clickType, type, callback, index, tindex) {
  17630. let fileid = this.isFileSearch ? [...this.fileIds] : []
  17631. fileid = [...fileid]
  17632. if (this.infoData.length) {
  17633. for (var i = 0; i < this.infoData.length; i++) {
  17634. if(this.infoData[i].fileid){
  17635. fileid.push(this.infoData[i].fileid)
  17636. }else {
  17637. let _fileid = await this.createFileid(this.infoData[i].url)
  17638. if(_fileid){
  17639. this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17640. _this.$forceUpdate();
  17641. if(_fileid != 1){
  17642. fileid.push(_fileid)
  17643. }
  17644. }
  17645. }
  17646. }
  17647. }
  17648. fileid = [...fileid, ...this.knowFileids, ...this.knowFileids2]
  17649. if(fileid.length > 30){
  17650. this.$message.error('目前检索文件不能超过30个噢,请减少一些')
  17651. return;
  17652. }
  17653. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  17654. this.$message.error("您没有权限修改/查看提示词");
  17655. return;
  17656. }
  17657. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  17658. this.$message.error("请上传教案");
  17659. return;
  17660. }
  17661. if (this.courseName == "") {
  17662. this.$message.error("请补充填写课程名称");
  17663. return;
  17664. }
  17665. this.aiText2 = ''
  17666. this.clickType = clickType
  17667. let sub = []
  17668. if (this.courseTypeId.length) {
  17669. for (var i = 0; i < this.courseTypeId.length; i++) {
  17670. let _sid = this.courseTypeId[i]
  17671. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17672. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17673. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17674. }
  17675. }
  17676. }
  17677. }
  17678. let mclass = []
  17679. if (this.courseTypeId.length) {
  17680. for (var i = 0; i < this.courseTypeId.length; i++) {
  17681. let _sid = this.courseTypeId[i]
  17682. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17683. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17684. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17685. }
  17686. }
  17687. }
  17688. }
  17689. if (type == "aiDetail") {
  17690. if (this.ttextLoading) {
  17691. this.$message({
  17692. message: "请回答完毕后再次发送",
  17693. type: "warning"
  17694. });
  17695. return;
  17696. }
  17697. this.aitype = "aiDetail"
  17698. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  17699. this.aiText = this.aiJson.aiDetail
  17700. this.aiCallBack = [callback, index]
  17701. } else if (type == "aiOutline") {
  17702. this.aitype = "aiOutline"
  17703. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  17704. this.aiText = this.aiJson.aiOutline
  17705. } else if (type == "aiOutline2") {
  17706. this.aitype = "aiOutline2"
  17707. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  17708. this.aiText = this.aiJson.aiOutlineTask
  17709. this.aiText2 = this.aiJson.aiOutlineDetail
  17710. } else if (type == "aiOutlineDetail2") {
  17711. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  17712. this.$message({
  17713. message: "请回答完毕后再次发送",
  17714. type: "warning"
  17715. });
  17716. return;
  17717. }
  17718. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  17719. this.$message.error('请输入任务名称')
  17720. return;
  17721. }
  17722. this.aitype = type
  17723. this.aiCallBack = callback
  17724. this.aiText = this.aiJson.aiOutlineDetail2
  17725. } else if (type == "aiTask") {
  17726. this.aitype = "aiTask"
  17727. var _text = ""
  17728. for (var i = 0; i < this.teacherText.length; i++) {
  17729. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  17730. }
  17731. // this.aiText = `请根据${_text}。`
  17732. this.aiText = this.aiJson.aiTask
  17733. this.aiCallBack = callback
  17734. } else if (type == "aiTask2") {
  17735. if (this.taskLoading[callback]) {
  17736. this.$message({
  17737. message: "请回答完毕后再次发送",
  17738. type: "warning"
  17739. });
  17740. return;
  17741. }
  17742. this.aitype = "aiTask2"
  17743. this.aiText = this.aiJson.aiTask
  17744. this.aiCallBack = [callback, index]
  17745. } else if (type == "aiTask3") {
  17746. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  17747. this.$message({
  17748. message: "请回答完毕后再次发送",
  17749. type: "warning"
  17750. });
  17751. return;
  17752. }
  17753. this.aitype = type
  17754. this.aiText = this.aiJson.aiTaskG1
  17755. this.aiText2 = this.aiJson.aiTaskG2
  17756. this.aiText3 = this.aiJson.aiTaskG3
  17757. this.aiCallBack = [callback, index]
  17758. } else if (type == "aiTaskG3") {
  17759. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][2])) {
  17760. this.$message({
  17761. message: "请回答完毕后再次发送",
  17762. type: "warning"
  17763. });
  17764. return;
  17765. }
  17766. this.aitype = type
  17767. this.aiText = this.aiJson.aiTaskG3
  17768. this.aiCallBack = callback
  17769. } else if (type == "aiTaskG2") {
  17770. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][1])) {
  17771. this.$message({
  17772. message: "请回答完毕后再次发送",
  17773. type: "warning"
  17774. });
  17775. return;
  17776. }
  17777. if(callback != 'all' && !this.unitJson[0].chapterInfo[0].taskJson[callback].taskDetail3){
  17778. this.$message({
  17779. message: `请先生成任务${callback}的教案在执行此操作`,
  17780. type: "warning"
  17781. });
  17782. return;
  17783. }
  17784. this.aitype = type
  17785. this.aiText = this.aiJson.aiTaskG2
  17786. this.aiCallBack = callback
  17787. } else if (type == "aiDetail1") {
  17788. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  17789. this.$message({
  17790. message: "请回答完毕后再次发送",
  17791. type: "warning"
  17792. });
  17793. return;
  17794. }
  17795. this.aitype = "aiDetail1"
  17796. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  17797. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  17798. this.aiText = this.aiJson.aiDetail1
  17799. this.aiCallBack = callback
  17800. this.aiIndex = index
  17801. } else if (type == "aiDetail2") {
  17802. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  17803. this.$message({
  17804. message: "请回答完毕后再次发送",
  17805. type: "warning"
  17806. });
  17807. return;
  17808. }
  17809. this.aitype = "aiDetail2"
  17810. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  17811. this.aiText = this.aiJson.aiDetail2
  17812. this.aiCallBack = callback
  17813. this.aiIndex = index
  17814. } else if (type == "aiDetail3") {
  17815. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  17816. this.$message({
  17817. message: "请回答完毕后再次发送",
  17818. type: "warning"
  17819. });
  17820. return;
  17821. }
  17822. this.aitype = "aiDetail3"
  17823. this.aiText = this.aiJson.aiDetail3
  17824. this.aiIndex = index + '-' + tindex
  17825. } else if (type == "aiDetail4") {
  17826. var _text = ""
  17827. if(callback && callback.length){
  17828. for (var i = 0; i < callback.length; i++) {
  17829. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  17830. }
  17831. }
  17832. this.aitype = "aiDetail4"
  17833. this.aiText = this.aiJson.aiDetail4
  17834. this.aiIndex = index
  17835. } else if (type == "aiTeacher") {
  17836. this.aitype = "aiTeacher"
  17837. var _text = ""
  17838. for (var i = 0; i < this.dArray.length; i++) {
  17839. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  17840. }
  17841. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17842. this.aiText = this.aiJson.aiTeacher
  17843. this.aiCallBack = callback
  17844. } else if (type == "aiTeacher2") {
  17845. if(this.ttaskDetailLoading5.length){
  17846. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  17847. this.$message({
  17848. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  17849. type: "warning"
  17850. });
  17851. return
  17852. }
  17853. this.aitype = "aiTeacher2"
  17854. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  17855. } else if (type == "aiTeacher3") {
  17856. this.aitype = type
  17857. this.aiText = this.aiJson.aiCpoteTask
  17858. this.aiText2 = this.aiJson.teacherDetail2
  17859. } else if (type == "teacherDetail") {
  17860. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  17861. this.$message({
  17862. message: "请回答完毕后再次发送",
  17863. type: "warning"
  17864. });
  17865. return;
  17866. }
  17867. this.aitype = "teacherDetail"
  17868. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17869. this.aiText = this.aiJson.teacherDetail
  17870. this.aiCallBack = callback
  17871. this.aiIndex = index
  17872. } else if (type == "teacherDetail2") {
  17873. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  17874. this.$message.error('请输入任务名称')
  17875. return;
  17876. }
  17877. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  17878. // this.$message({
  17879. // message: "请回答完毕后再次发送",
  17880. // type: "warning"
  17881. // });
  17882. // return;
  17883. this.$confirm("还未生成完毕,是否直接重新生成?", "提示", {
  17884. confirmButtonText: "确定重新生成",
  17885. cancelButtonText: "取消",
  17886. distinguishCancelAndClose: true,
  17887. type: "warning",
  17888. customClass: 'custom-confirm-box'
  17889. })
  17890. .then(() => {
  17891. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  17892. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  17893. this.isTeacherTaskCancelToken2[index] = null;
  17894. }
  17895. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  17896. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  17897. if(this.isTeacherTaskCancelSource[index]){
  17898. this.isTeacherTaskCancelSource[index].close()
  17899. this.isTeacherTaskCancelSource[index] = null
  17900. }
  17901. this.aitype = "teacherDetail2"
  17902. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17903. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  17904. this.aiCallBack = callback
  17905. this.aiIndex = index
  17906. this.dialogVisibleAiD = true
  17907. }).catch((v) => {
  17908. console.log(v);
  17909. })
  17910. setTimeout(() => {
  17911. this.setTipsIndex()
  17912. }, 500)
  17913. return;
  17914. }else {
  17915. this.aitype = "teacherDetail2"
  17916. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17917. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  17918. this.aiCallBack = callback
  17919. this.aiIndex = index
  17920. this.dialogVisibleAiD = true
  17921. }
  17922. } else if (type == "aiCpote1") {
  17923. if (this.cpotetLoading.cpote1) {
  17924. this.$message({
  17925. message: "请回答完毕后再次发送",
  17926. type: "warning"
  17927. });
  17928. return;
  17929. }
  17930. this.aitype = "aiCpote1"
  17931. this.aiText = this.aiJson.cpote1
  17932. this.aiCallBack = callback
  17933. } else if (type == "aiCpote2") {
  17934. if (this.cpotetLoading.cpote2) {
  17935. this.$message({
  17936. message: "请回答完毕后再次发送",
  17937. type: "warning"
  17938. });
  17939. return;
  17940. }
  17941. this.aitype = "aiCpote2"
  17942. this.aiText = this.aiJson.cpote2
  17943. this.aiCallBack = callback
  17944. } else if (type == "aiCpote3") {
  17945. if (this.cpotetLoading.cpote3) {
  17946. this.$message({
  17947. message: "请回答完毕后再次发送",
  17948. type: "warning"
  17949. });
  17950. return;
  17951. }
  17952. this.aitype = "aiCpote3"
  17953. this.aiText = this.aiJson.cpote3
  17954. this.aiCallBack = callback
  17955. } else if (type == "aiCpote4") {
  17956. if (this.cpotetLoading.cpote4) {
  17957. this.$message({
  17958. message: "请回答完毕后再次发送",
  17959. type: "warning"
  17960. });
  17961. return;
  17962. }
  17963. this.aitype = "aiCpote4"
  17964. this.aiText = this.aiJson.cpote4
  17965. this.aiCallBack = callback
  17966. } else if (type == 'aiteacherTextDetail'){
  17967. if (this.tteacherTextLoading) {
  17968. this.$message({
  17969. message: "请回答完毕后再次发送",
  17970. type: "warning"
  17971. });
  17972. return;
  17973. }
  17974. this.aitype = type
  17975. this.aiText = this.aiJson.aiAbstract
  17976. this.aiCallBack = callback
  17977. } else if (type == 'aitargetTextDetail'){
  17978. if (this.ttargetTextLoading) {
  17979. this.$message({
  17980. message: "请回答完毕后再次发送",
  17981. type: "warning"
  17982. });
  17983. return;
  17984. }
  17985. this.aitype = type
  17986. this.aiText = this.aiJson.aiTarget
  17987. this.aiCallBack = callback
  17988. } else if (type == 'aitargetTextDetail2'){
  17989. if (this.ttargetTextLoading2) {
  17990. this.$message({
  17991. message: "请回答完毕后再次发送",
  17992. type: "warning"
  17993. });
  17994. return;
  17995. }
  17996. this.aitype = type
  17997. this.aiText = this.aiJson.aiTarget2
  17998. this.aiCallBack = callback
  17999. } else if (type == 'aitargetTextDetail3'){
  18000. if (this.ttargetTextLoading2) {
  18001. this.$message({
  18002. message: "请回答完毕后再次发送",
  18003. type: "warning"
  18004. });
  18005. return;
  18006. }
  18007. if(!this.courseText){
  18008. this.$message.error("请生成简要描述后再生成目标");
  18009. return;
  18010. }
  18011. this.$nextTick(() => {
  18012. const targetDiv = this.$refs.aitargetTextDetail3;
  18013. if (targetDiv) {
  18014. targetDiv.scrollIntoView();
  18015. }
  18016. });
  18017. this.aitype = type
  18018. this.aiText = this.aiJson.aiTargetGet
  18019. this.aiText2 = this.aiJson.aiTarget2
  18020. this.aiCallBack= callback
  18021. } else if (type == 'aiSearchFile'){
  18022. if(this.fileSLoading) {
  18023. this.$message({
  18024. message: "请回答完毕后再次发送",
  18025. type: "warning"
  18026. });
  18027. return;
  18028. }
  18029. this.aitype = type
  18030. this.aiText = this.aiJson.aiSearchFile
  18031. } else if (type == 'aiSearchFile2'){
  18032. if(this.fileSLoading) {
  18033. this.$message({
  18034. message: "请回答完毕后再次发送",
  18035. type: "warning"
  18036. });
  18037. return;
  18038. }
  18039. this.aitype = type
  18040. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  18041. #输出样例
  18042. <学科1>:关键词
  18043. - 匹配到的内容1
  18044. - 匹配到的内容2
  18045. - 匹配到的内容3
  18046. - 匹配到的内容4
  18047. - 匹配到的内容5
  18048. <学科2>:关键词
  18049. - 匹配到的内容1
  18050. - 匹配到的内容2
  18051. - 匹配到的内容3
  18052. - 匹配到的内容4
  18053. - 匹配到的内容5
  18054. ...
  18055. <学科n>:关键词
  18056. - 匹配到的内容1
  18057. - 匹配到的内容2
  18058. - 匹配到的内容3
  18059. - 匹配到的内容4
  18060. - 匹配到的内容5
  18061. `
  18062. } else if (type == 'aiRateRule'){
  18063. this.aitype = type
  18064. this.aiText = this.aiJson.aiRateRule
  18065. this.aiCallBack = [callback, index]
  18066. } else if (type == 'aiRateRuleA'){
  18067. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  18068. confirmButtonText: "生成所有",
  18069. cancelButtonText: "仅生成该任务",
  18070. distinguishCancelAndClose: true,
  18071. type: "warning",
  18072. })
  18073. .then(() => {
  18074. this.aitype = type
  18075. this.aiText = this.aiJson.aiRateRule
  18076. this.aiCallBack = [1,callback]
  18077. this.dialogVisibleAiD = true
  18078. }).catch((v) => {
  18079. console.log(v);
  18080. if (v == "cancel") {
  18081. this.aitype = type
  18082. this.aiText = this.aiJson.aiRateRule
  18083. this.aiCallBack = [2,callback]
  18084. this.dialogVisibleAiD = true
  18085. }
  18086. })
  18087. }
  18088. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  18089. this.dialogVisibleAiD = true
  18090. }
  18091. },
  18092. async aiConfirm(msg,msg2,msg3) {
  18093. let sub = []
  18094. if (this.courseTypeId.length) {
  18095. for (var i = 0; i < this.courseTypeId.length; i++) {
  18096. let _sid = this.courseTypeId[i]
  18097. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18098. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18099. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18100. }
  18101. }
  18102. }
  18103. }
  18104. let mclass = []
  18105. if (this.courseTypeId.length) {
  18106. for (var i = 0; i < this.courseTypeId.length; i++) {
  18107. let _sid = this.courseTypeId[i]
  18108. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18109. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18110. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18111. }
  18112. }
  18113. }
  18114. }
  18115. let url = []
  18116. if (this.infoData.length) {
  18117. for (var i = 0; i < this.infoData.length; i++) {
  18118. url.push(this.infoData[i].url)
  18119. }
  18120. }
  18121. if (this.aitype == "aiDetail") {
  18122. this.detailYou(msg)
  18123. } else if (this.aitype == "aiOutline") {
  18124. this.loading = true
  18125. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18126. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  18127. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  18128. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18129. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18130. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18131. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18132. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18133. if(this.languageSetting == 2){
  18134. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18135. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18136. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18137. }
  18138. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18139. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18140. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18141. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18142. let message = `NOTICE
  18143. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18144. Output: Provide your output in json format.
  18145. Language: ${this.getLang()}
  18146. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18147. Instruction: Based on the context, follow "Format example", write content.
  18148. # Context
  18149. ## 要求
  18150. ${msg} 以及##参考资料
  18151. ## 参考资料
  18152. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18153. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18154. detail至少输出300tokens,markdown格式输出。
  18155. detail包含子教学目标、过程性成果、子评价标准
  18156. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18157. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18158. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  18159. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  18160. # Format example`
  18161. message = message.replaceAll('\n', ' ')
  18162. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  18163. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  18164. // detail输出不要输出成json,文本或者markdown都可以
  18165. this.aiGet2(message, () => {
  18166. this.loading = false
  18167. this.isOutline = true
  18168. })
  18169. } else if (this.aitype == "aiOutline2") {
  18170. this.loading = true
  18171. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18172. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18173. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18174. let message = `NOTICE
  18175. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18176. Language: ${this.getLang()}
  18177. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18178. Instruction: Based on the context, follow "Format example", write content.
  18179. # Context
  18180. ## 要求
  18181. ${msg} 以及##参考资料
  18182. ## 参考资料
  18183. 课程名字:${this.courseName}
  18184. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  18185. ${sub.length ? '学科:' + sub.join(",") : ''}
  18186. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18187. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18188. # Format example
  18189. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  18190. this.aiGetTask2(message, () => {
  18191. this.loading = false
  18192. this.isOutline = true
  18193. })
  18194. } else if (this.aitype == "aiOutlineDetail2") {
  18195. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  18196. } else if (this.aitype == "aiTask") {
  18197. var _text = ""
  18198. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18199. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18200. }
  18201. let message = `NOTICE
  18202. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18203. Language: ${this.getLang()}
  18204. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18205. Instruction: Based on the context, follow "Format example", write content.
  18206. # Context
  18207. ## 要求
  18208. ${msg} 为**每个教学任务分别输出**以下内容。
  18209.  
  18210. ${(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','') : ''}
  18211. ## 参考资料
  18212. 教学任务教案:${_text}
  18213. ## 格式要求
  18214. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  18215. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18216. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  18217. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18218. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18219. 出现选择题和问答题的概率提高
  18220. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  18221.  
  18222. # Format example
  18223. [{"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":"工具描述"}]}]`
  18224. this.loading = true
  18225. this.aiGet3(message, this.aiCallBack)
  18226. } else if (this.aitype == "aiTask2") {
  18227. if(this.aiCallBack[0] == 'all'){
  18228. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18229. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18230. let message = `NOTICE
  18231. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18232. Language: ${this.getLang()}
  18233. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18234. Instruction: Based on the context, follow "Format example", write content.
  18235. # Context
  18236. ## 要求
  18237. ${msg} 为教学任务分别输出以下内容。
  18238.  
  18239. ${(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','') : ''}
  18240. ## 参考资料
  18241. 教学任务教案:${_text}
  18242. ## 格式要求
  18243. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18244. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  18245. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18246. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18247. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  18248.  
  18249. # Format example
  18250. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18251. this.taskLoading[_task] = true
  18252. this.aiGet32(message, _task)
  18253. }
  18254. }else{
  18255. 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`
  18256. let message = `NOTICE
  18257. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18258. Language: ${this.getLang()}
  18259. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18260. Instruction: Based on the context, follow "Format example", write content.
  18261. # Context
  18262. ## 要求
  18263. ${msg} 为教学任务分别输出以下内容。
  18264.  
  18265. ${(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','') : ''}
  18266. ## 参考资料
  18267. 教学任务教案:${_text}
  18268. ## 格式要求
  18269. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18270. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  18271. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18272. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18273. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  18274.  
  18275. # Format example
  18276. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18277. this.taskLoading[this.aiCallBack[0]] = true
  18278. this.aiGet32(message, this.aiCallBack[0])
  18279. }
  18280. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  18281. } else if (this.aitype == "aiTask3") {
  18282. if(this.aiCallBack[0] == 'all'){
  18283. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18284. if(!this.taskGLoading[_task]){
  18285. this.taskGLoading[_task] = []
  18286. }
  18287. this.taskGLoading[_task][0] = true
  18288. // this.taskGLoading[_task][1] = true
  18289. // this.taskGLoading[_task][2] = true
  18290. // this.aiGetG323(message3, _task)
  18291. }
  18292. let ij = 0;
  18293. let _this = this
  18294. function processNext() {
  18295. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18296. if(!_this.taskGLoading[ij][0]){
  18297. ij++;
  18298. processNext();
  18299. return;
  18300. }
  18301. let message1 = `NOTICE
  18302. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18303. Language: ${_this.getLang()}
  18304. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18305. Instruction: Based on the context, follow "Format example", write content.
  18306. # Context
  18307. ## 要求
  18308. ${msg}
  18309.  
  18310. ## 参考资料
  18311. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18312. # 输出格式与要求
  18313. 任务描述(告诉学生他们需要做什么):
  18314. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  18315. # 范例
  18316. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  18317. # Format example
  18318. { "detail":"任务描述" }`
  18319. let message2 = `NOTICE
  18320. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18321. Language: ${_this.getLang()}
  18322. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18323. Instruction: Based on the context, follow "Format example", write content.
  18324. # Context
  18325. ## 要求
  18326. ${msg2}
  18327.  
  18328. ## 参考资料
  18329. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18330. # 输出格式与要求
  18331. 互动工具列表
  18332. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  18333. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  18334. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  18335. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  18336. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  18337. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  18338. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  18339. # Format example
  18340. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18341. let message3 = `NOTICE
  18342. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18343. Language: ${_this.getLang()}
  18344. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18345. Instruction: Based on the context, follow "Format example", write content.
  18346. # Context
  18347. ## 要求
  18348. ${msg3}
  18349.  
  18350. ## 参考资料
  18351. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18352. # 输出格式与要求
  18353. 核心素养:从教案中提取
  18354. 目标:从教案中提取
  18355. 评价标准:从教案中提取评价标准
  18356. # Format example
  18357. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  18358. _this.aiGetG321(message1, ij, (callback2) => {
  18359. // _this.aiGetG322(message2, ij, callback2);
  18360. callback2 ? callback2() : ''
  18361. }, () => {
  18362. // 回调函数,当前任务完成后执行
  18363. ij++;
  18364. processNext(); // 处理下一个任务
  18365. });
  18366. }
  18367. }
  18368. processNext(); // 启动处理
  18369. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  18370. }else{
  18371. let message1 = `NOTICE
  18372. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18373. Language: ${this.getLang()}
  18374. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18375. Instruction: Based on the context, follow "Format example", write content.
  18376. # Context
  18377. ## 要求
  18378. ${msg}
  18379.  
  18380. ## 参考资料
  18381. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18382. # 输出格式与要求
  18383. 任务描述(告诉学生他们需要做什么):
  18384. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  18385. # 范例
  18386. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  18387. # Format example
  18388. { "detail":"任务描述" }`
  18389. let message2 = `NOTICE
  18390. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18391. Language: ${this.getLang()}
  18392. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18393. Instruction: Based on the context, follow "Format example", write content.
  18394. # Context
  18395. ## 要求
  18396. ${msg2}
  18397.  
  18398. ## 参考资料
  18399. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18400. # 输出格式与要求
  18401. 互动工具列表
  18402. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  18403. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  18404. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  18405. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  18406. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  18407. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  18408. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  18409. # Format example
  18410. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18411. let message3 = `NOTICE
  18412. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18413. Language: ${this.getLang()}
  18414. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18415. Instruction: Based on the context, follow "Format example", write content.
  18416. # Context
  18417. ## 要求
  18418. ${msg3}
  18419.  
  18420. ## 参考资料
  18421. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18422. # 输出格式与要求
  18423. 核心素养:从教案中提取
  18424. 目标:从教案中提取
  18425. 评价标准:从教案中提取评价标准
  18426. # Format example
  18427. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  18428. if(!this.taskGLoading[this.aiCallBack[0]]){
  18429. this.taskGLoading[this.aiCallBack[0]] = []
  18430. }
  18431. this.taskGLoading[this.aiCallBack[0]][0] = true
  18432. // this.taskGLoading[this.aiCallBack[0]][1] = true
  18433. // this.taskGLoading[this.aiCallBack[0]][2] = true
  18434. this.aiGetG321(message1, this.aiCallBack[0], () => {
  18435. // this.aiGetG322(message2, this.aiCallBack[0])
  18436. // this.aiCallBack[0] ? this.aiCallBack[0]() : ''
  18437. })
  18438. // this.aiGetG323(message3, this.aiCallBack[0])
  18439. }
  18440. } else if (this.aitype == "aiTaskG3") {
  18441. let message3 = `NOTICE
  18442. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18443. Language: ${this.getLang()}
  18444. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18445. Instruction: Based on the context, follow "Format example", write content.
  18446. # Context
  18447. ## 要求
  18448. ${msg3}
  18449.  
  18450. ## 参考资料
  18451. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18452. # 输出格式与要求
  18453. 核心素养:从教案中提取
  18454. 目标:从教案中提取
  18455. 评价标准:从教案中提取评价标准
  18456. # Format example
  18457. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  18458. if(!this.taskGLoading[this.aiCallBack]){
  18459. this.taskGLoading[this.aiCallBack] = []
  18460. }
  18461. this.taskGLoading[this.aiCallBack][2] = true
  18462. this.aiGetG323(message3, this.aiCallBack)
  18463. } else if (this.aitype == "aiTaskG2") {
  18464. if(this.aiCallBack == 'all'){
  18465. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18466. if(!this.taskGLoading[_task]){
  18467. this.taskGLoading[_task] = []
  18468. }
  18469. this.taskGLoading[_task][1] = true
  18470. }
  18471. let ij = 0;
  18472. let _this = this
  18473. function processNext() {
  18474. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18475. if(!_this.taskGLoading[ij][1] || !_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3){
  18476. _this.taskGLoading[ij][1] = false
  18477. ij++;
  18478. processNext();
  18479. return;
  18480. }
  18481. let message2 = `NOTICE
  18482. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18483. Language: ${_this.getLang()}
  18484. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18485. Instruction: Based on the context, follow "Format example", write content.
  18486. # Context
  18487. ## 要求
  18488. ${msg2}
  18489.  
  18490. ## 参考资料
  18491. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18492. # 输出格式与要求
  18493. 互动工具列表
  18494. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  18495. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  18496. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  18497. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  18498. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  18499. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  18500. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  18501. # Format example
  18502. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18503. _this.aiGetG322(message2, ij, () => {
  18504. // 回调函数,当前任务完成后执行
  18505. ij++;
  18506. processNext(); // 处理下一个任务
  18507. });
  18508. }
  18509. }
  18510. processNext(); // 启动处理
  18511. }else{
  18512. let message2 = `NOTICE
  18513. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18514. Language: ${this.getLang()}
  18515. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18516. Instruction: Based on the context, follow "Format example", write content.
  18517. # Context
  18518. ## 要求
  18519. ${msg2}
  18520.  
  18521. ## 参考资料
  18522. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18523. # 输出格式与要求
  18524. 互动工具列表
  18525. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  18526. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  18527. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  18528. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  18529. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  18530. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  18531. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  18532. # Format example
  18533. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18534. if(!this.taskGLoading[this.aiCallBack]){
  18535. this.taskGLoading[this.aiCallBack] = []
  18536. }
  18537. // this.taskGLoading[this.aiCallBack[0]][0] = true
  18538. // this.taskGLoading[this.aiCallBack[0]][1] = true
  18539. this.taskGLoading[this.aiCallBack][1] = true
  18540. this.aiGetG322(message2, this.aiCallBack)
  18541. }
  18542. } else if (this.aitype == "aiDetail1") {
  18543. this.aiDetail(msg, this.aiIndex)
  18544. } else if (this.aitype == "aiDetail2") {
  18545. this.aiDetail2(msg, this.aiIndex)
  18546. } else if (this.aitype == "aiDetail3") {
  18547. let _index = this.aiIndex.split('-')
  18548. this.aiDetail3(msg, _index[0], _index[1])
  18549. } else if (this.aitype == "aiDetail4") {
  18550. this.aiDetail4(msg, this.aiIndex)
  18551. } else if (this.aitype == "teacherDetail") {
  18552. this.aiDetail5(msg, this.aiIndex)
  18553. } else if (this.aitype == "teacherDetail2") {
  18554. this.aiDetail52(msg, this.aiIndex)
  18555. } else if (this.aitype == "aiCpote1") {
  18556. this.aiCpote(msg, this.aiCallBack)
  18557. } else if (this.aitype == "aiCpote2") {
  18558. this.aiCpote(msg, this.aiCallBack)
  18559. } else if (this.aitype == "aiCpote3") {
  18560. this.aiCpote(msg, this.aiCallBack)
  18561. } else if (this.aitype == "aiCpote4") {
  18562. this.aiCpote(msg, this.aiCallBack)
  18563. } else if (this.aitype == "aiTeacher") {
  18564. this.loading = true
  18565. var _text = ""
  18566. for (var i = 0; i < this.dArray.length; i++) {
  18567. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  18568. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  18569. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18570. let message = ` NOTICE
  18571. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18572. Language: ${this.getLang()}
  18573. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18574. Instruction: Based on the context, follow "Format example", write content.
  18575. # Context
  18576. ## 要求
  18577. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  18578. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  18579. ${(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','') : ''}
  18580. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18581. ## Format example
  18582. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  18583. this.aiGet4(message, () => {
  18584. this.loading = false
  18585. this.isOutline2 = true
  18586. })
  18587. } else if (this.aitype == "aiTeacher2"){
  18588. this.isOutline2 = true
  18589. let _this = this
  18590. setTimeout(()=>{
  18591. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18592. const _tindex = 'task-' + i;
  18593. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  18594. _this.taskDetailLoading5.push(_tindex)
  18595. }
  18596. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  18597. _this.ttaskDetailLoading5.push(_tindex)
  18598. }
  18599. // this.aiDetail52(msg, i)
  18600. }
  18601. let ij = 0;
  18602. function processNext() {
  18603. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18604. const _tindex = 'task-' + ij;
  18605. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  18606. ij++;
  18607. processNext();
  18608. return;
  18609. }
  18610. // 处理当前任务
  18611. _this.aiDetail52(msg, ij, function () {
  18612. // 回调函数,当前任务完成后执行
  18613. ij++;
  18614. processNext(); // 处理下一个任务
  18615. });
  18616. }
  18617. }
  18618. processNext(); // 启动处理
  18619. }, 0)
  18620. } else if (this.aitype == "aiTeacher3"){
  18621. this.loading = true
  18622. let message = `NOTICE
  18623. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18624. Language: ${this.getLang()}
  18625. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18626. Instruction: Based on the context, follow "Format example", write content.
  18627. # Context
  18628. ## 要求
  18629. ${msg} 以及##参考资料
  18630. ## 参考资料
  18631. 任务簇:${this.cpote.cpote4}
  18632. # Format example
  18633. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  18634. this.aiGetTask3(message, () => {
  18635. this.loading = false
  18636. this.isOutline2 = true
  18637. })
  18638. } else if (this.aitype == "aiteacherTextDetail") {
  18639. this.aiteacherTextDetail(msg)
  18640. } else if (this.aitype == "aitargetTextDetail") {
  18641. this.aitargetTextDetail(msg)
  18642. } else if (this.aitype == "aitargetTextDetail2") {
  18643. this.aitargetTextDetail2(msg)
  18644. } else if (this.aitype == "aitargetTextDetail3") {
  18645. this.aitargetTextDetail3(msg)
  18646. } else if (this.aitype == 'aiSearchFile'){
  18647. let messages = `NOTICE
  18648. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18649. Language: ${this.getLang()}
  18650. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18651. Instruction: Based on the context, follow "Format example", write content.
  18652. ## 参考资料
  18653. 关键词:${this.courseName}
  18654. # Context
  18655. ## 要求
  18656. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  18657. # Format example
  18658. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  18659. this.fileSLoading = true
  18660. this.aiSearchFile(messages,()=>{
  18661. this.fileSLoading = false
  18662. })
  18663. } else if (this.aitype == 'aiSearchFile2'){
  18664. let messages = `${msg}
  18665. 课程名字:${this.courseName}
  18666. ${sub.length ? '学科:' + sub.join(",") : ''}
  18667. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  18668. this.fileSLoading = true
  18669. this.aiSearchFile2(messages,()=>{
  18670. this.fileSLoading = false
  18671. })
  18672. } else if (this.aitype == 'aiRateRule'){
  18673. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  18674. } else if (this.aitype == 'aiRateRuleA'){
  18675. if(this.aiCallBack[0] == 1){
  18676. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18677. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18678. for(var k = 0; k < task.eList.length; k++){
  18679. if(!task.eList[k].rule){
  18680. this.againEva(msg, i, k)
  18681. }
  18682. }
  18683. }
  18684. }else if(this.aiCallBack[0] == 2){
  18685. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  18686. for(var k = 0; k < task.eList.length; k++){
  18687. if(!task.eList[k].rule){
  18688. this.againEva(msg, this.aiCallBack[1], k)
  18689. }
  18690. }
  18691. }
  18692. }
  18693. this.setAiJson(this.aitype, msg, msg2, msg3)
  18694. },
  18695. getLang(){
  18696. let lang = ''
  18697. if(this.languageSetting == 0){
  18698. lang = 'Chinese.'
  18699. }else if(this.languageSetting == 1){
  18700. lang = 'Traditional Chinese.'
  18701. }else if(this.languageSetting == 2){
  18702. lang = 'English.'
  18703. }
  18704. return lang
  18705. },
  18706. detailYou(message) {
  18707. this.textLoading = true
  18708. this.ttextLoading = true
  18709. let sub = []
  18710. if (this.courseTypeId.length) {
  18711. for (var i = 0; i < this.courseTypeId.length; i++) {
  18712. let _sid = this.courseTypeId[i]
  18713. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18714. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18715. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18716. }
  18717. }
  18718. }
  18719. }
  18720. let mclass = []
  18721. if (this.courseTypeId.length) {
  18722. for (var i = 0; i < this.courseTypeId.length; i++) {
  18723. let _sid = this.courseTypeId[i]
  18724. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18725. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18726. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18727. }
  18728. }
  18729. }
  18730. }
  18731. let url = []
  18732. if (this.infoData.length) {
  18733. for (var i = 0; i < this.infoData.length; i++) {
  18734. url.push(this.infoData[i].url)
  18735. }
  18736. }
  18737. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18738. // --------
  18739. // ## 补充参考资料
  18740. // 补充资料:${url.join(",")}
  18741. // 补充描述:${this.courseText2} ##补充参考资料和
  18742. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18743. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18744. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18745. let msg = `NOTICE
  18746. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  18747. Language: ${this.getLang()}
  18748. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18749. Instruction: Based on the context, follow "Format example", write content.
  18750. #Context
  18751. ## 参考资料
  18752. 课程名字:${this.courseName}
  18753. ${sub.length ? '学科:' + sub.join(",") : ''}
  18754. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18755. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  18756. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  18757. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  18758. ## 要求
  18759. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  18760. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  18761. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  18762. this.aiGet(msg)
  18763. },
  18764. setUnitJson() {
  18765. 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 }] }
  18766. this.$forceUpdate()
  18767. },
  18768. async aiGet(messages) {
  18769. let _this = this
  18770. let fileid = []
  18771. if(!this.yiKeTemplateArray.includes(this.templateid)){
  18772. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  18773. if(_this.cankaoInfoData[i].fileid){
  18774. fileid.push(_this.cankaoInfoData[i].fileid)
  18775. }else {
  18776. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  18777. if(_fileid){
  18778. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  18779. _this.$forceUpdate();
  18780. if(_fileid != 1){
  18781. fileid.push(_fileid)
  18782. }
  18783. }
  18784. }
  18785. }
  18786. if(this.mode == 1){
  18787. for (var i = 0; i < _this.infoData.length; i++) {
  18788. if(_this.infoData[i].fileid){
  18789. fileid.push(_this.infoData[i].fileid)
  18790. }else {
  18791. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18792. if(_fileid){
  18793. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18794. _this.$forceUpdate();
  18795. if(_fileid != 1){
  18796. fileid.push(_fileid)
  18797. }
  18798. }
  18799. }
  18800. }
  18801. }
  18802. } else {
  18803. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18804. fileid = [...fileid]
  18805. if (_this.infoData.length) {
  18806. for (var i = 0; i < _this.infoData.length; i++) {
  18807. if(_this.infoData[i].fileid){
  18808. fileid.push(_this.infoData[i].fileid)
  18809. }else {
  18810. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18811. if(_fileid){
  18812. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18813. _this.$forceUpdate();
  18814. if(_fileid != 1){
  18815. fileid.push(_fileid)
  18816. }
  18817. }
  18818. }
  18819. }
  18820. }
  18821. }
  18822. _this.isTextCancelToken = _this.ajax.setCancelSource();
  18823. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  18824. let _uuid = uuidv4();
  18825. // let params = JSON.stringify({
  18826. // // "model": "Chat",
  18827. // model: 'gpt-3.5-turbo',
  18828. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18829. // max_tokens: 4096,
  18830. // top_p: 1,
  18831. // frequency_penalty: 0,
  18832. // presence_penalty: 0,
  18833. // messages: [{
  18834. // content: messages,
  18835. // role: 'user'
  18836. // }],
  18837. // uid: _uuid,
  18838. // mind_map_question: "",
  18839. // })
  18840. let params = {
  18841. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18842. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18843. session_name: _uuid,
  18844. userId: _this.userid,
  18845. uid: _uuid,
  18846. file_ids: fileid.length ? [...fileid] : '',
  18847. model: 'gpt-4o-2024-08-06',
  18848. temperature: this.mode == 3 ? 0.5 : 0.1,
  18849. }
  18850. // let params = JSON.stringify({
  18851. // message: {
  18852. // anthropic_version: "bedrock-2023-05-31",
  18853. // max_tokens: 4096,
  18854. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18855. // top_p: 1,
  18856. // messages: [{
  18857. // "role": "user",
  18858. // "content": messages
  18859. // }] ,
  18860. // },
  18861. // uid: _uuid,
  18862. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18863. // });
  18864. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18865. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  18866. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18867. console.log(response);
  18868. // let data = response.data.FunctionResponse
  18869. // if (data.choices && data.choices.length && data.choices[0].message) {
  18870. // _this.courseText = data.choices[0].message.content
  18871. // }
  18872. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18873. } else {
  18874. _this.$message.warning(response.data.FunctionResponse.result);
  18875. }
  18876. _this.isTextCancelToken = null
  18877. }).catch(function (error) {
  18878. _this.textLoading = false
  18879. _this.ttextLoading = false
  18880. _this.isTextCancelToken = null
  18881. if(error && error.message != 'Request canceled by the user.'){
  18882. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  18883. }
  18884. console.log(error);
  18885. });
  18886. await _this.aiGetgetAiContent(_uuid)
  18887. },
  18888. aiGetgetAiContent(_uid) {
  18889. try {
  18890. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18891. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18892. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18893. } catch(error){
  18894. console.log('EventSource error:', error);
  18895. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  18896. this.textLoading = false
  18897. this.ttextLoading = false
  18898. this.isTextCancelToken = null
  18899. return;
  18900. }
  18901. let _allText = "";
  18902. let _mdText = "";
  18903. let _iindex = 0
  18904. this.isTextCancelSource.onmessage = _e => {
  18905. let _eData = JSON.parse(_e.data).content;
  18906. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18907. //对话已经完成
  18908. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  18909. this.isTextCancelSource.close();
  18910. this.isTextCancelSource = null;
  18911. this.courseText = _mdText;
  18912. this.textLoading = false
  18913. this.ttextLoading = false
  18914. this.courseTextB = false
  18915. this.isTextCancelToken = null
  18916. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  18917. this.saveCourse()
  18918. return;
  18919. } else {
  18920. _iindex++
  18921. //对话还在继续
  18922. let _text = "";
  18923. _text = _eData.replaceAll("'", "");
  18924. if (_allText == "") {
  18925. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18926. } else {
  18927. _allText += _text;
  18928. }
  18929. _mdText = _allText + "_";
  18930. _mdText = _mdText.replace(/\\n/g, "\n");
  18931. _mdText = _mdText.replace(/\\/g, "");
  18932. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18933. //转化返回的回复流数据
  18934. if(_iindex == 10){
  18935. this.courseText = _mdText;
  18936. _iindex = 0
  18937. }
  18938. this.textLoading = false
  18939. // 处理流数据
  18940. }
  18941. // this.$forceUpdate();
  18942. };
  18943. let _this = this
  18944. this.isTextCancelSource.onerror = function(event) {
  18945. // 处理错误,可以尝试重新连接
  18946. console.log('EventSource error:', event);
  18947. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  18948. _this.textLoading = false
  18949. _this.ttextLoading = false
  18950. _this.isTextCancelToken = null
  18951. _this.isTextCancelSource.close();
  18952. _this.isTextCancelSource = null;
  18953. };
  18954. },
  18955. numberToChinese(number) {
  18956. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  18957. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  18958. let result = '';
  18959. let num = parseInt(number, 10);
  18960. let i = 0;
  18961. while (num > 0) {
  18962. result = chineseNum[num % 10] + chineseUnit[i] + result;
  18963. num = Math.floor(num / 10);
  18964. i++;
  18965. }
  18966. // 去除连续的零,保留一个零
  18967. result = result.replace(/零+/g, '零');
  18968. return result;
  18969. },
  18970. async aiGet2(messages, callback) {
  18971. let _this = this
  18972. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18973. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  18974. if (_this.infoData.length) {
  18975. for (var i = 0; i < _this.infoData.length; i++) {
  18976. if(_this.infoData[i].fileid){
  18977. fileid.push(_this.infoData[i].fileid)
  18978. }else {
  18979. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18980. if(_fileid){
  18981. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18982. _this.$forceUpdate();
  18983. if(_fileid != 1){
  18984. fileid.push(_fileid)
  18985. }
  18986. }
  18987. }
  18988. }
  18989. }
  18990. console.log('fileid=========',fileid)
  18991. // let params = JSON.stringify({
  18992. // // "model": "Chat",
  18993. // model: 'gpt-3.5-turbo',
  18994. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18995. // max_tokens: 4096,
  18996. // top_p: 1,
  18997. // frequency_penalty: 0,
  18998. // presence_penalty: 0,
  18999. // messages: [{
  19000. // content: messages,
  19001. // role: 'user'
  19002. // }],
  19003. // stream: false,
  19004. // uid: this.userid,
  19005. // mind_map_question: "",
  19006. // })
  19007. // // let params = JSON.stringify({
  19008. // // message: {
  19009. // // anthropic_version: "bedrock-2023-05-31",
  19010. // // max_tokens: 4096,
  19011. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19012. // // top_p: 1,
  19013. // // messages: [{
  19014. // // content: messages,
  19015. // // role: 'user'
  19016. // // }], //
  19017. // // },
  19018. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19019. // // });
  19020. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19021. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19022. // console.log(response);
  19023. // let data = response.data.FunctionResponse
  19024. // if (data.choices && data.choices.length && data.choices[0].message) {
  19025. // console.log(data.choices[0].message.content);
  19026. // let dArray = JSON.parse(data.choices[0].message.content)
  19027. // _this.dArray = dArray
  19028. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19029. // for (var i = 0; i < dArray.length; i++) {
  19030. // let _task = dArray[i]
  19031. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19032. // task: _task.task,
  19033. // taskDetail: "",
  19034. // taskDetail2: _task.detail,
  19035. // taskDetail3: "",
  19036. // chapterData: [],
  19037. // toolText: "",
  19038. // toolChoose: [
  19039. // {
  19040. // tool: [],
  19041. // toolDetail: "",
  19042. // toolType: 0,
  19043. // askCount: 1,
  19044. // askTitle: "",
  19045. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19046. // },
  19047. // ],
  19048. // isShowTools: false,
  19049. // askCount: 1,
  19050. // isFold: 0,
  19051. // askTitle: "",
  19052. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19053. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19054. // homeworkList: [],
  19055. // })
  19056. // }
  19057. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19058. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19059. // _this.$forceUpdate();
  19060. // }
  19061. // // if (data.result) {
  19062. // // console.log(data.result);
  19063. // // let dArray = JSON.parse(data.result)
  19064. // // _this.dArray = dArray
  19065. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19066. // // for (var i = 0; i < dArray.length; i++) {
  19067. // // let _task = dArray[i]
  19068. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19069. // // task: _task.task,
  19070. // // taskDetail: "",
  19071. // // taskDetail2: _task.detail,
  19072. // // taskDetail3: "",
  19073. // // chapterData: [],
  19074. // // toolText: "",
  19075. // // toolChoose: [
  19076. // // {
  19077. // // tool: [],
  19078. // // toolDetail: "",
  19079. // // toolType: 0,
  19080. // // askCount: 1,
  19081. // // askTitle: "",
  19082. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19083. // // },
  19084. // // ],
  19085. // // isShowTools: false,
  19086. // // askCount: 1,
  19087. // // isFold: 1,
  19088. // // askTitle: "",
  19089. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19090. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19091. // // homeworkList: [],
  19092. // // })
  19093. // // }
  19094. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19095. // // _this.$forceUpdate();
  19096. // // }
  19097. // callback ? callback() : ''
  19098. // }).catch(function (error) {
  19099. // _this.loading = false
  19100. // console.log(error);
  19101. // });
  19102. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19103. let parm = {
  19104. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  19105. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  19106. session_name: uuidv4(),
  19107. userId: this.userid,
  19108. file_ids: fileid.length ? [...fileid] : '',
  19109. model: 'gpt-4o-2024-08-06',
  19110. temperature: this.mode == 3 ? 0.5 : 0.1,
  19111. }
  19112. this.ajax
  19113. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19114. .then((response) => {
  19115. console.log(response);
  19116. let data = response.data.FunctionResponse
  19117. if (data.message) {
  19118. console.log(data.message);
  19119. let dArray = {}
  19120. try {
  19121. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19122. } catch (error) {
  19123. console.log("error_________________" + error);
  19124. try {
  19125. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19126. let match = data.message.match(regex);
  19127. dArray = JSON.parse(match[0]);
  19128. // var message = data.message;
  19129. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19130. // var jsonEnd = message.indexOf("```", jsonStart);
  19131. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19132. // dArray = JSON.parse(jsonString);
  19133. } catch (error) {
  19134. try {
  19135. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19136. let match = data.message.match(regex);
  19137. // eval("var aaa = " + match[0])
  19138. if(match && match[0]){
  19139. dArray = JSON.parse(match[0].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19140. }else {
  19141. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19142. }
  19143. } catch (error) {
  19144. _this.$message.error('返回json格式不正确',data.message)
  19145. // _this.aiGet2(messages, callback);
  19146. console.log("error_________________" + error);
  19147. }
  19148. console.log("error_________________" + error);
  19149. }
  19150. }
  19151. _this.dArray = dArray
  19152. console.log(dArray)
  19153. if(_this.panOutline() > 0){
  19154. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19155. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19156. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19157. }
  19158. for (var i = 0; i < dArray.length; i++) {
  19159. let _task = dArray[i]
  19160. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19161. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  19162. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  19163. }else {
  19164. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19165. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19166. taskDetail: "",
  19167. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19168. taskDetail3: "",
  19169. chapterData: [],
  19170. toolText: "",
  19171. toolChoose: [
  19172. {
  19173. tool: [],
  19174. toolDetail: "",
  19175. toolType: 0,
  19176. askCount: 1,
  19177. askTitle: "",
  19178. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19179. },
  19180. ],
  19181. isShowTools: false,
  19182. askCount: 1,
  19183. isFold: 0,
  19184. askTitle: "",
  19185. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19186. checkJson: [{ checkCount: [], checkPerent: [] }],
  19187. homeworkList: [],
  19188. })
  19189. }
  19190. }
  19191. }else {
  19192. _this.unitJson[0].chapterInfo[0].taskJson = []
  19193. for (var i = 0; i < dArray.length; i++) {
  19194. let _task = dArray[i]
  19195. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19196. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19197. taskDetail: "",
  19198. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19199. taskDetail3: "",
  19200. chapterData: [],
  19201. toolText: "",
  19202. toolChoose: [
  19203. {
  19204. tool: [],
  19205. toolDetail: "",
  19206. toolType: 0,
  19207. askCount: 1,
  19208. askTitle: "",
  19209. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19210. },
  19211. ],
  19212. isShowTools: false,
  19213. askCount: 1,
  19214. isFold: 0,
  19215. askTitle: "",
  19216. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19217. checkJson: [{ checkCount: [], checkPerent: [] }],
  19218. homeworkList: [],
  19219. })
  19220. }
  19221. }
  19222. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19223. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19224. _this.$forceUpdate();
  19225. _this.saveCourse()
  19226. }
  19227. callback ? callback() : ''
  19228. _this.isOutlineCancelToken = null
  19229. })
  19230. .catch((error) => {
  19231. _this.loading = false
  19232. _this.isOutlineCancelToken = null
  19233. console.log(error);
  19234. });
  19235. },
  19236. cancelAjax(type, index){
  19237. if (this.isOutlineCancelToken && type == 'outline') {
  19238. this.$message.success("已经成功停止生成课程大纲")
  19239. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  19240. this.isOutlineCancelToken = null;
  19241. this.loading = false
  19242. }
  19243. if (this.isFileCancelToken && type == 'file') {
  19244. this.$message.success("已经成功停止智能生成检索资料")
  19245. this.isFileCancelToken.cancel('Request canceled by the user.');
  19246. this.isFileCancelToken = null;
  19247. this.fileSLoading = false
  19248. }
  19249. if(this.isTextCancelToken && type == 'text'){
  19250. this.$message.success("已经成功停止AI优化")
  19251. this.isTextCancelToken.cancel('Request canceled by the user.');
  19252. this.isTextCancelToken = null;
  19253. this.textLoading = false
  19254. this.ttextLoading = true
  19255. if(this.isTextCancelSource){
  19256. this.isTextCancelSource.close()
  19257. this.isTextCancelSource = null
  19258. }
  19259. }
  19260. if(this.isTargetCancelToken2 && type == 'target2'){
  19261. this.$message.success("已经成功停止生成目标")
  19262. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  19263. this.isTargetCancelToken2 = null;
  19264. this.targetTextLoading2 = false
  19265. this.ttargetTextLoading2 = false
  19266. if(this.isTargetCancelSource2){
  19267. this.isTargetCancelSource2.close()
  19268. this.isTargetCancelSource2 = null
  19269. }
  19270. this.$nextTick(() => {
  19271. const targetDiv = this.$refs.aitargetTextDetail3;
  19272. if (targetDiv) {
  19273. targetDiv.scrollIntoView();
  19274. }
  19275. });
  19276. }
  19277. if(this.isTargetCancelToken1 && type == 'target1'){
  19278. this.$message.success("已经成功停止生成目标")
  19279. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  19280. this.isTargetCancelToken1 = null;
  19281. this.targetTextLoading = false
  19282. this.ttargetTextLoading = false
  19283. if(this.isTargetCancelSource1){
  19284. this.isTargetCancelSource1.close()
  19285. this.isTargetCancelSource1 = null
  19286. }
  19287. }
  19288. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  19289. this.$message.success("已经成功停止提取摘要")
  19290. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  19291. this.isTeacherTextCancelToken = null;
  19292. this.teacherTextLoading = false
  19293. this.tteacherTextLoading = false
  19294. if(this.isTeacherTextCancelSource){
  19295. this.isTeacherTextCancelSource.close()
  19296. this.isTeacherTextCancelSource = null
  19297. }
  19298. }
  19299. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  19300. this.$message.success("已经成功停止生成教案")
  19301. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  19302. this.isTeacherTaskCancelToken = null;
  19303. this.loading = false
  19304. }
  19305. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  19306. this.$message.success("已经成功停止生成大纲")
  19307. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  19308. this.isOutlineTaskCancelToken[index] = null;
  19309. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  19310. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  19311. if(this.isOutlineTaskCancelSource[index]){
  19312. this.isOutlineTaskCancelSource[index].close()
  19313. this.isOutlineTaskCancelSource[index] = null
  19314. }
  19315. }
  19316. if(type == 'teacherDetail2'){
  19317. this.$message.success("已经成功停止生成教案")
  19318. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  19319. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  19320. this.isTeacherTaskCancelToken2[index] = null;
  19321. }
  19322. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  19323. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  19324. }
  19325. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  19326. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  19327. }
  19328. if(this.isTeacherTaskCancelSource[index]){
  19329. this.isTeacherTaskCancelSource[index].close()
  19330. this.isTeacherTaskCancelSource[index] = null
  19331. }
  19332. }
  19333. if(type == 'aiTaskGL1'){
  19334. this.$message.success("已经成功停止生成任务概述")
  19335. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  19336. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  19337. this.taskCancelToken1[index] = null;
  19338. }
  19339. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  19340. this.taskGLoading[index][0] = false
  19341. }
  19342. setTimeout(() => {
  19343. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  19344. this.cancelAjax('aiTaskGL2', index)
  19345. }
  19346. }, 1000)
  19347. this.$forceUpdate()
  19348. }
  19349. if(type == 'aiTaskGL2'){
  19350. this.$message.success("已经成功停止生成任务工具")
  19351. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  19352. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  19353. this.taskCancelToken2[index] = null;
  19354. }
  19355. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  19356. this.taskGLoading[index][1] = false
  19357. }
  19358. this.$forceUpdate()
  19359. }
  19360. if(type == 'taskAn'){
  19361. this.$message.success("已经成功停止生成任务概述")
  19362. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  19363. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  19364. this.taskAnCancelToken[index] = null;
  19365. }
  19366. if(this.taskAnLoading[index]){
  19367. this.taskAnLoading[index] = false
  19368. }
  19369. this.$forceUpdate()
  19370. }
  19371. if(type == 'findMatchingContents'){
  19372. this.$message.success("已经成功停止检索资料")
  19373. if(this.isfindMatchingContents){
  19374. this.isfindMatchingContents.cancel('Request canceled by the user.');
  19375. this.isfindMatchingContents = null;
  19376. }
  19377. if(this.knowInfoDataLoading){
  19378. this.knowInfoDataLoading = false
  19379. }
  19380. if(this.findMatchingContentsPage > 1){
  19381. this.findMatchingContentsPage --
  19382. }
  19383. this.$forceUpdate()
  19384. }
  19385. },
  19386. async aiGetTask2(messages, callback) {
  19387. let _this = this
  19388. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19389. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19390. if (_this.infoData.length) {
  19391. for (var i = 0; i < _this.infoData.length; i++) {
  19392. if(_this.infoData[i].fileid){
  19393. fileid.push(_this.infoData[i].fileid)
  19394. }else {
  19395. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19396. if(_fileid){
  19397. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19398. _this.$forceUpdate();
  19399. if(_fileid != 1){
  19400. fileid.push(_fileid)
  19401. }
  19402. }
  19403. }
  19404. }
  19405. }
  19406. console.log('fileid=========',fileid)
  19407. // let params = JSON.stringify({
  19408. // // "model": "Chat",
  19409. // model: 'gpt-3.5-turbo',
  19410. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19411. // max_tokens: 4096,
  19412. // top_p: 1,
  19413. // frequency_penalty: 0,
  19414. // presence_penalty: 0,
  19415. // messages: [{
  19416. // content: messages,
  19417. // role: 'user'
  19418. // }],
  19419. // stream: false,
  19420. // uid: this.userid,
  19421. // mind_map_question: "",
  19422. // })
  19423. // // let params = JSON.stringify({
  19424. // // message: {
  19425. // // anthropic_version: "bedrock-2023-05-31",
  19426. // // max_tokens: 4096,
  19427. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19428. // // top_p: 1,
  19429. // // messages: [{
  19430. // // content: messages,
  19431. // // role: 'user'
  19432. // // }], //
  19433. // // },
  19434. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19435. // // });
  19436. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19437. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19438. // console.log(response);
  19439. // let data = response.data.FunctionResponse
  19440. // if (data.choices && data.choices.length && data.choices[0].message) {
  19441. // console.log(data.choices[0].message.content);
  19442. // let dArray = JSON.parse(data.choices[0].message.content)
  19443. // _this.dArray = dArray
  19444. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19445. // for (var i = 0; i < dArray.length; i++) {
  19446. // let _task = dArray[i]
  19447. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19448. // task: _task.task,
  19449. // taskDetail: "",
  19450. // taskDetail2: _task.detail,
  19451. // taskDetail3: "",
  19452. // chapterData: [],
  19453. // toolText: "",
  19454. // toolChoose: [
  19455. // {
  19456. // tool: [],
  19457. // toolDetail: "",
  19458. // toolType: 0,
  19459. // askCount: 1,
  19460. // askTitle: "",
  19461. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19462. // },
  19463. // ],
  19464. // isShowTools: false,
  19465. // askCount: 1,
  19466. // isFold: 0,
  19467. // askTitle: "",
  19468. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19469. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19470. // homeworkList: [],
  19471. // })
  19472. // }
  19473. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19474. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19475. // _this.$forceUpdate();
  19476. // }
  19477. // // if (data.result) {
  19478. // // console.log(data.result);
  19479. // // let dArray = JSON.parse(data.result)
  19480. // // _this.dArray = dArray
  19481. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19482. // // for (var i = 0; i < dArray.length; i++) {
  19483. // // let _task = dArray[i]
  19484. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19485. // // task: _task.task,
  19486. // // taskDetail: "",
  19487. // // taskDetail2: _task.detail,
  19488. // // taskDetail3: "",
  19489. // // chapterData: [],
  19490. // // toolText: "",
  19491. // // toolChoose: [
  19492. // // {
  19493. // // tool: [],
  19494. // // toolDetail: "",
  19495. // // toolType: 0,
  19496. // // askCount: 1,
  19497. // // askTitle: "",
  19498. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19499. // // },
  19500. // // ],
  19501. // // isShowTools: false,
  19502. // // askCount: 1,
  19503. // // isFold: 1,
  19504. // // askTitle: "",
  19505. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19506. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19507. // // homeworkList: [],
  19508. // // })
  19509. // // }
  19510. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19511. // // _this.$forceUpdate();
  19512. // // }
  19513. // callback ? callback() : ''
  19514. // }).catch(function (error) {
  19515. // _this.loading = false
  19516. // console.log(error);
  19517. // });
  19518. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19519. let parm = {
  19520. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19521. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19522. session_name: uuidv4(),
  19523. userId: this.userid,
  19524. file_ids: fileid.length ? [...fileid] : '',
  19525. model: 'gpt-4o-2024-08-06',
  19526. temperature: this.mode == 3 ? 0.5 : 0.1,
  19527. }
  19528. this.ajax
  19529. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19530. .then((response) => {
  19531. console.log(response);
  19532. let data = response.data.FunctionResponse
  19533. if (data.message) {
  19534. console.log(data.message);
  19535. let dArray = {}
  19536. try {
  19537. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19538. } catch (error) {
  19539. console.log("error_________________" + error);
  19540. try {
  19541. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19542. let match = data.message.match(regex);
  19543. dArray = JSON.parse(match[0]);
  19544. // var message = data.message;
  19545. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19546. // var jsonEnd = message.indexOf("```", jsonStart);
  19547. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19548. // dArray = JSON.parse(jsonString);
  19549. } catch (error) {
  19550. try {
  19551. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19552. let match = data.message.match(regex);
  19553. // eval("var aaa = " + match[0])
  19554. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19555. } catch (error) {
  19556. console.log("error_________________" + error);
  19557. }
  19558. console.log("error_________________" + error);
  19559. }
  19560. }
  19561. _this.dArray = dArray
  19562. if(_this.panOutline() > 0){
  19563. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19564. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19565. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19566. }
  19567. for (var i = 0; i < dArray.length; i++) {
  19568. let _task = dArray[i]
  19569. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19570. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  19571. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  19572. }else {
  19573. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19574. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19575. taskDetail: "",
  19576. taskDetail2: "",
  19577. taskDetail3: "",
  19578. chapterData: [],
  19579. toolText: "",
  19580. toolChoose: [
  19581. {
  19582. tool: [],
  19583. toolDetail: "",
  19584. toolType: 0,
  19585. askCount: 1,
  19586. askTitle: "",
  19587. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19588. },
  19589. ],
  19590. isShowTools: false,
  19591. askCount: 1,
  19592. isFold: 0,
  19593. askTitle: "",
  19594. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19595. checkJson: [{ checkCount: [], checkPerent: [] }],
  19596. homeworkList: [],
  19597. })
  19598. }
  19599. }
  19600. }else {
  19601. _this.unitJson[0].chapterInfo[0].taskJson = []
  19602. for (var i = 0; i < dArray.length; i++) {
  19603. let _task = dArray[i]
  19604. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19605. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19606. taskDetail: "",
  19607. taskDetail2: "",
  19608. taskDetail3: "",
  19609. chapterData: [],
  19610. toolText: "",
  19611. toolChoose: [
  19612. {
  19613. tool: [],
  19614. toolDetail: "",
  19615. toolType: 0,
  19616. askCount: 1,
  19617. askTitle: "",
  19618. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19619. },
  19620. ],
  19621. isShowTools: false,
  19622. askCount: 1,
  19623. isFold: 0,
  19624. askTitle: "",
  19625. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19626. checkJson: [{ checkCount: [], checkPerent: [] }],
  19627. homeworkList: [],
  19628. })
  19629. }
  19630. }
  19631. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19632. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19633. _this.$forceUpdate();
  19634. _this.saveCourse()
  19635. setTimeout(()=>{
  19636. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19637. this.aiOutlineDetail('', i)
  19638. }
  19639. }, 0)
  19640. }
  19641. callback ? callback() : ''
  19642. _this.isOutlineCancelToken = null
  19643. })
  19644. .catch((error) => {
  19645. _this.loading = false
  19646. _this.isOutlineCancelToken = null
  19647. console.log(error);
  19648. });
  19649. },
  19650. async aiGetTask3(messages, callback) {
  19651. let _this = this
  19652. // let params = JSON.stringify({
  19653. // // "model": "Chat",
  19654. // model: 'gpt-3.5-turbo',
  19655. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19656. // max_tokens: 4096,
  19657. // top_p: 1,
  19658. // frequency_penalty: 0,
  19659. // presence_penalty: 0,
  19660. // messages: [{
  19661. // content: messages,
  19662. // role: 'user'
  19663. // }],
  19664. // stream: false,
  19665. // uid: this.userid,
  19666. // mind_map_question: "",
  19667. // })
  19668. // // let params = JSON.stringify({
  19669. // // message: {
  19670. // // anthropic_version: "bedrock-2023-05-31",
  19671. // // max_tokens: 4096,
  19672. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19673. // // top_p: 1,
  19674. // // messages: [{
  19675. // // content: messages,
  19676. // // role: 'user'
  19677. // // }], //
  19678. // // },
  19679. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19680. // // });
  19681. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19682. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19683. // console.log(response);
  19684. // let data = response.data.FunctionResponse
  19685. // if (data.choices && data.choices.length && data.choices[0].message) {
  19686. // console.log(data.choices[0].message.content);
  19687. // let dArray = JSON.parse(data.choices[0].message.content)
  19688. // _this.dArray = dArray
  19689. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19690. // for (var i = 0; i < dArray.length; i++) {
  19691. // let _task = dArray[i]
  19692. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19693. // task: _task.task,
  19694. // taskDetail: "",
  19695. // taskDetail2: _task.detail,
  19696. // taskDetail3: "",
  19697. // chapterData: [],
  19698. // toolText: "",
  19699. // toolChoose: [
  19700. // {
  19701. // tool: [],
  19702. // toolDetail: "",
  19703. // toolType: 0,
  19704. // askCount: 1,
  19705. // askTitle: "",
  19706. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19707. // },
  19708. // ],
  19709. // isShowTools: false,
  19710. // askCount: 1,
  19711. // isFold: 0,
  19712. // askTitle: "",
  19713. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19714. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19715. // homeworkList: [],
  19716. // })
  19717. // }
  19718. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19719. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19720. // _this.$forceUpdate();
  19721. // }
  19722. // // if (data.result) {
  19723. // // console.log(data.result);
  19724. // // let dArray = JSON.parse(data.result)
  19725. // // _this.dArray = dArray
  19726. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19727. // // for (var i = 0; i < dArray.length; i++) {
  19728. // // let _task = dArray[i]
  19729. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19730. // // task: _task.task,
  19731. // // taskDetail: "",
  19732. // // taskDetail2: _task.detail,
  19733. // // taskDetail3: "",
  19734. // // chapterData: [],
  19735. // // toolText: "",
  19736. // // toolChoose: [
  19737. // // {
  19738. // // tool: [],
  19739. // // toolDetail: "",
  19740. // // toolType: 0,
  19741. // // askCount: 1,
  19742. // // askTitle: "",
  19743. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19744. // // },
  19745. // // ],
  19746. // // isShowTools: false,
  19747. // // askCount: 1,
  19748. // // isFold: 1,
  19749. // // askTitle: "",
  19750. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19751. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19752. // // homeworkList: [],
  19753. // // })
  19754. // // }
  19755. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19756. // // _this.$forceUpdate();
  19757. // // }
  19758. // callback ? callback() : ''
  19759. // }).catch(function (error) {
  19760. // _this.loading = false
  19761. // console.log(error);
  19762. // });
  19763. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  19764. let parm = {
  19765. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19766. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19767. session_name: uuidv4(),
  19768. userId: this.userid,
  19769. file_ids: '',
  19770. model: 'gpt-4o-2024-08-06',
  19771. temperature: this.mode == 3 ? 0.5 : 0.1,
  19772. }
  19773. this.ajax
  19774. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  19775. .then((response) => {
  19776. console.log(response);
  19777. let data = response.data.FunctionResponse
  19778. if (data.message) {
  19779. console.log(data.message);
  19780. let dArray = {}
  19781. try {
  19782. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19783. } catch (error) {
  19784. console.log("error_________________" + error);
  19785. try {
  19786. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19787. let match = data.message.match(regex);
  19788. dArray = JSON.parse(match[0]);
  19789. // var message = data.message;
  19790. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19791. // var jsonEnd = message.indexOf("```", jsonStart);
  19792. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19793. // dArray = JSON.parse(jsonString);
  19794. } catch (error) {
  19795. try {
  19796. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19797. let match = data.message.match(regex);
  19798. // eval("var aaa = " + match[0])
  19799. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19800. } catch (error) {
  19801. console.log("error_________________" + error);
  19802. }
  19803. console.log("error_________________" + error);
  19804. }
  19805. }
  19806. _this.dArray = dArray
  19807. if(_this.panOutline() > 0){
  19808. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19809. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19810. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  19811. }
  19812. for (var i = 0; i < dArray.length; i++) {
  19813. let _task = dArray[i]
  19814. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19815. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  19816. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  19817. }else {
  19818. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19819. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19820. taskDetail: "",
  19821. taskDetail2: "",
  19822. taskDetail3: "",
  19823. chapterData: [],
  19824. toolText: "",
  19825. toolChoose: [
  19826. {
  19827. tool: [],
  19828. toolDetail: "",
  19829. toolType: 0,
  19830. askCount: 1,
  19831. askTitle: "",
  19832. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19833. },
  19834. ],
  19835. isShowTools: false,
  19836. askCount: 1,
  19837. isFold: 0,
  19838. askTitle: "",
  19839. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19840. checkJson: [{ checkCount: [], checkPerent: [] }],
  19841. homeworkList: [],
  19842. })
  19843. }
  19844. }
  19845. }else {
  19846. _this.unitJson[0].chapterInfo[0].taskJson = []
  19847. for (var i = 0; i < dArray.length; i++) {
  19848. let _task = dArray[i]
  19849. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19850. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19851. taskDetail: "",
  19852. taskDetail2: "",
  19853. taskDetail3: "",
  19854. chapterData: [],
  19855. toolText: "",
  19856. toolChoose: [
  19857. {
  19858. tool: [],
  19859. toolDetail: "",
  19860. toolType: 0,
  19861. askCount: 1,
  19862. askTitle: "",
  19863. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19864. },
  19865. ],
  19866. isShowTools: false,
  19867. askCount: 1,
  19868. isFold: 0,
  19869. askTitle: "",
  19870. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19871. checkJson: [{ checkCount: [], checkPerent: [] }],
  19872. homeworkList: [],
  19873. })
  19874. }
  19875. }
  19876. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19877. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19878. _this.$forceUpdate();
  19879. _this.saveCourse()
  19880. // setTimeout(()=>{
  19881. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19882. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  19883. // }
  19884. // }, 0)
  19885. setTimeout(()=>{
  19886. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19887. const _tindex = 'task-' + i;
  19888. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19889. _this.taskDetailLoading5.push(_tindex)
  19890. }
  19891. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  19892. _this.ttaskDetailLoading5.push(_tindex)
  19893. }
  19894. }
  19895. let ij = 0;
  19896. function processNext() {
  19897. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19898. const _tindex = 'task-' + ij;
  19899. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19900. ij++;
  19901. processNext();
  19902. return;
  19903. }
  19904. // 处理当前任务
  19905. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  19906. // 回调函数,当前任务完成后执行
  19907. ij++;
  19908. processNext(); // 处理下一个任务
  19909. });
  19910. }
  19911. }
  19912. processNext(); // 启动处理
  19913. }, 0)
  19914. }
  19915. callback ? callback() : ''
  19916. _this.isTeacherTaskCancelToken = null
  19917. })
  19918. .catch((error) => {
  19919. _this.loading = false
  19920. _this.isTeacherTaskCancelToken = null
  19921. console.log(error);
  19922. });
  19923. },
  19924. async aiGet3(messages, callback) {
  19925. let _this = this
  19926. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19927. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19928. if (_this.infoData.length) {
  19929. for (var i = 0; i < _this.infoData.length; i++) {
  19930. if(_this.infoData[i].fileid){
  19931. fileid.push(_this.infoData[i].fileid)
  19932. }else {
  19933. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19934. if(_fileid){
  19935. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19936. _this.$forceUpdate();
  19937. if(_fileid != 1){
  19938. fileid.push(_fileid)
  19939. }
  19940. }
  19941. }
  19942. }
  19943. }
  19944. // let params = JSON.stringify({
  19945. // // "model": "Chat",
  19946. // model: 'gpt-3.5-turbo',
  19947. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19948. // max_tokens: 4096,
  19949. // top_p: 1,
  19950. // frequency_penalty: 0,
  19951. // presence_penalty: 0,
  19952. // messages: [{
  19953. // content: messages,
  19954. // role: 'user'
  19955. // }],
  19956. // stream: false,
  19957. // uid: this.userid,
  19958. // mind_map_question: "",
  19959. // })
  19960. // // let params = JSON.stringify({
  19961. // // message: {
  19962. // // anthropic_version: "bedrock-2023-05-31",
  19963. // // max_tokens: 4096,
  19964. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19965. // // top_p: 1,
  19966. // // messages: [{
  19967. // // content: messages,
  19968. // // role: 'user'
  19969. // // }], //
  19970. // // },
  19971. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19972. // // });
  19973. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19974. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19975. // console.log(response);
  19976. // let data = response.data.FunctionResponse
  19977. // if (data.choices && data.choices.length && data.choices[0].message) {
  19978. // console.log(data.choices[0].message.content);
  19979. // let tArray = JSON.parse(data.choices[0].message.content)
  19980. // // _this.unitJson[0].chapterInfo[0].task = []
  19981. // let toolsJson = {
  19982. // "电子白板": { tool: 1, type: 1 },
  19983. // "文档": { tool: 52, type: 1 },
  19984. // "思维导图": { tool: 3, type: 1 },
  19985. // "表格": { tool: 48, type: 1 },
  19986. // "作业提交": { tool: 16, type: 2 }
  19987. // }
  19988. // for (var i = 0; i < tArray.length; i++) {
  19989. // let _task = tArray[i]
  19990. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19991. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19992. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19993. // if (_task.toolChoose.length) {
  19994. // for (var j = 0; j < _task.toolChoose.length; j++) {
  19995. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19996. // {
  19997. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  19998. // toolDetail: _task.toolChoose[j].detail,
  19999. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20000. // askCount: 1,
  20001. // askTitle: "",
  20002. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20003. // },
  20004. // )
  20005. // }
  20006. // } else {
  20007. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20008. // {
  20009. // tool: [],
  20010. // toolDetail: "",
  20011. // toolType: 0,
  20012. // askCount: 1,
  20013. // askTitle: "",
  20014. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20015. // },
  20016. // )
  20017. // }
  20018. // }
  20019. // // if (_this.infoData.length) {
  20020. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20021. // // }
  20022. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20023. // _this.$forceUpdate();
  20024. // }
  20025. // // if (data.result) {
  20026. // // console.log(data.result);
  20027. // // let tArray = JSON.parse(data.result)
  20028. // // // _this.unitJson[0].chapterInfo[0].task = []
  20029. // // let toolsJson = {
  20030. // // "电子白板": { tool: 1, type: 1 },
  20031. // // "文档": { tool: 52, type: 1 },
  20032. // // "思维导图": { tool: 3, type: 1 },
  20033. // // "表格": { tool: 48, type: 1 },
  20034. // // "作业提交": { tool: 16, type: 2 }
  20035. // // }
  20036. // // for (var i = 0; i < tArray.length; i++) {
  20037. // // let _task = tArray[i]
  20038. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20039. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20040. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20041. // // if (_task.toolChoose.length) {
  20042. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20043. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20044. // // {
  20045. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20046. // // toolDetail: _task.toolChoose[j].detail,
  20047. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20048. // // askCount: 1,
  20049. // // askTitle: "",
  20050. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20051. // // },
  20052. // // )
  20053. // // }
  20054. // // } else {
  20055. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20056. // // {
  20057. // // tool: [],
  20058. // // toolDetail: "",
  20059. // // toolType: 0,
  20060. // // askCount: 1,
  20061. // // askTitle: "",
  20062. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20063. // // },
  20064. // // )
  20065. // // }
  20066. // // }
  20067. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20068. // // _this.$forceUpdate();
  20069. // // }
  20070. // callback ? callback() : ''
  20071. // }).catch(function (error) {
  20072. // _this.loading = false
  20073. // console.log(error);
  20074. // });
  20075. let parm = {
  20076. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20077. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20078. session_name: uuidv4(),
  20079. userId: this.userid,
  20080. file_ids: fileid.length ? [...fileid] : '',
  20081. model: 'gpt-4o-2024-08-06',
  20082. temperature: this.mode == 3 ? 0.5 : 0.1,
  20083. }
  20084. this.ajax
  20085. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20086. .then(async (response) => {
  20087. console.log(response);
  20088. let data = response.data.FunctionResponse
  20089. if (data.message) {
  20090. console.log(data.message);
  20091. let tArray = {}
  20092. try {
  20093. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20094. } catch (error) {
  20095. console.log("error_________________" + error);
  20096. try {
  20097. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20098. let match = data.message.match(regex);
  20099. tArray = JSON.parse(match[0]);
  20100. // var message = data.message;
  20101. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20102. // var jsonEnd = message.indexOf("```", jsonStart);
  20103. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20104. // tArray = JSON.parse(jsonString);
  20105. } catch (error) {
  20106. try {
  20107. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20108. let match = data.message.match(regex);
  20109. // eval("var aaa = " + match[0])
  20110. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20111. } catch (error) {
  20112. console.log("error_________________" + error);
  20113. }
  20114. console.log("error_________________" + error);
  20115. }
  20116. }
  20117. let toolsJson = {
  20118. "电子白板": { tool: 1, type: 1 },
  20119. "文档": { tool: 52, type: 1 },
  20120. "思维导图": { tool: 3, type: 1 },
  20121. "表格": { tool: 48, type: 1 },
  20122. "作业提交": { tool: 16, type: 2 },
  20123. "问答": { tool: 15, type: 2 },
  20124. "选择题": { tool: 45, type: 2 },
  20125. }
  20126. // answerQ:"sssssssssssssss"
  20127. for (var i = 0; i < tArray.length; i++) {
  20128. let _task = tArray[i]
  20129. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20130. _task.elist = _task.elist.filter(el=>{
  20131. el.isai = "1"
  20132. return el
  20133. })
  20134. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20135. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20136. if (_task.toolChoose.length) {
  20137. for (var j = 0; j < _task.toolChoose.length; j++) {
  20138. let _json = {
  20139. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  20140. toolDetail: _task.toolChoose[j].detail,
  20141. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20142. askCount: 1,
  20143. askTitle: "",
  20144. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20145. }
  20146. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  20147. let answerQ = await _this.aiCreateQuestion(15, i)
  20148. _json.answerQ = answerQ.answerQ
  20149. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  20150. let testJson = await _this.aiCreateQuestion(45, i)
  20151. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20152. }
  20153. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  20154. }
  20155. } else {
  20156. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20157. {
  20158. tool: [],
  20159. toolDetail: "",
  20160. toolType: 0,
  20161. askCount: 1,
  20162. askTitle: "",
  20163. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20164. },
  20165. )
  20166. }
  20167. }
  20168. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20169. _this.$forceUpdate();
  20170. _this.createTeacherAn();
  20171. }
  20172. callback ? callback() : ''
  20173. })
  20174. .catch((error) => {
  20175. _this.loading = false
  20176. console.log(error);
  20177. });
  20178. },
  20179. async aiGet32(messages, index) {
  20180. let _this = this
  20181. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20182. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20183. if (_this.infoData.length) {
  20184. for (var i = 0; i < _this.infoData.length; i++) {
  20185. if(_this.infoData[i].fileid){
  20186. fileid.push(_this.infoData[i].fileid)
  20187. }else {
  20188. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20189. if(_fileid){
  20190. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20191. _this.$forceUpdate();
  20192. if(_fileid != 1){
  20193. fileid.push(_fileid)
  20194. }
  20195. }
  20196. }
  20197. }
  20198. }
  20199. // let params = JSON.stringify({
  20200. // // "model": "Chat",
  20201. // model: 'gpt-3.5-turbo',
  20202. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20203. // max_tokens: 4096,
  20204. // top_p: 1,
  20205. // frequency_penalty: 0,
  20206. // presence_penalty: 0,
  20207. // messages: [{
  20208. // content: messages,
  20209. // role: 'user'
  20210. // }],
  20211. // stream: false,
  20212. // uid: this.userid,
  20213. // mind_map_question: "",
  20214. // })
  20215. // // let params = JSON.stringify({
  20216. // // message: {
  20217. // // anthropic_version: "bedrock-2023-05-31",
  20218. // // max_tokens: 4096,
  20219. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20220. // // top_p: 1,
  20221. // // messages: [{
  20222. // // content: messages,
  20223. // // role: 'user'
  20224. // // }], //
  20225. // // },
  20226. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20227. // // });
  20228. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20229. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20230. // console.log(response);
  20231. // let data = response.data.FunctionResponse
  20232. // if (data.choices && data.choices.length && data.choices[0].message) {
  20233. // console.log(data.choices[0].message.content);
  20234. // let tArray = JSON.parse(data.choices[0].message.content)
  20235. // // _this.unitJson[0].chapterInfo[0].task = []
  20236. // let toolsJson = {
  20237. // "电子白板": { tool: 1, type: 1 },
  20238. // "文档": { tool: 52, type: 1 },
  20239. // "思维导图": { tool: 3, type: 1 },
  20240. // "表格": { tool: 48, type: 1 },
  20241. // "作业提交": { tool: 16, type: 2 }
  20242. // }
  20243. // for (var i = 0; i < tArray.length; i++) {
  20244. // let _task = tArray[i]
  20245. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20246. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20247. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20248. // if (_task.toolChoose.length) {
  20249. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20250. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20251. // {
  20252. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20253. // toolDetail: _task.toolChoose[j].detail,
  20254. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20255. // askCount: 1,
  20256. // askTitle: "",
  20257. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20258. // },
  20259. // )
  20260. // }
  20261. // } else {
  20262. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20263. // {
  20264. // tool: [],
  20265. // toolDetail: "",
  20266. // toolType: 0,
  20267. // askCount: 1,
  20268. // askTitle: "",
  20269. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20270. // },
  20271. // )
  20272. // }
  20273. // }
  20274. // // if (_this.infoData.length) {
  20275. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20276. // // }
  20277. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20278. // _this.$forceUpdate();
  20279. // }
  20280. // // if (data.result) {
  20281. // // console.log(data.result);
  20282. // // let tArray = JSON.parse(data.result)
  20283. // // // _this.unitJson[0].chapterInfo[0].task = []
  20284. // // let toolsJson = {
  20285. // // "电子白板": { tool: 1, type: 1 },
  20286. // // "文档": { tool: 52, type: 1 },
  20287. // // "思维导图": { tool: 3, type: 1 },
  20288. // // "表格": { tool: 48, type: 1 },
  20289. // // "作业提交": { tool: 16, type: 2 }
  20290. // // }
  20291. // // for (var i = 0; i < tArray.length; i++) {
  20292. // // let _task = tArray[i]
  20293. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20294. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20295. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20296. // // if (_task.toolChoose.length) {
  20297. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20298. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20299. // // {
  20300. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20301. // // toolDetail: _task.toolChoose[j].detail,
  20302. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20303. // // askCount: 1,
  20304. // // askTitle: "",
  20305. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20306. // // },
  20307. // // )
  20308. // // }
  20309. // // } else {
  20310. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20311. // // {
  20312. // // tool: [],
  20313. // // toolDetail: "",
  20314. // // toolType: 0,
  20315. // // askCount: 1,
  20316. // // askTitle: "",
  20317. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20318. // // },
  20319. // // )
  20320. // // }
  20321. // // }
  20322. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20323. // // _this.$forceUpdate();
  20324. // // }
  20325. // callback ? callback() : ''
  20326. // }).catch(function (error) {
  20327. // _this.loading = false
  20328. // console.log(error);
  20329. // });
  20330. let parm = {
  20331. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20332. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20333. session_name: uuidv4(),
  20334. userId: this.userid,
  20335. file_ids: fileid.length ? [...fileid] : '',
  20336. model: 'gpt-4o-2024-08-06',
  20337. temperature: this.mode == 3 ? 0.5 : 0.1,
  20338. }
  20339. this.ajax
  20340. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20341. .then(async (response) => {
  20342. console.log(response);
  20343. let data = response.data.FunctionResponse
  20344. if (data.message) {
  20345. console.log(data.message);
  20346. let tArray = {}
  20347. try {
  20348. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20349. } catch (error) {
  20350. console.log("error_________________" + error);
  20351. try {
  20352. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20353. let match = data.message.match(regex);
  20354. tArray = JSON.parse(match[0]);
  20355. // var message = data.message;
  20356. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20357. // var jsonEnd = message.indexOf("```", jsonStart);
  20358. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20359. // tArray = JSON.parse(jsonString);
  20360. } catch (error) {
  20361. try {
  20362. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20363. let match = data.message.match(regex);
  20364. // eval("var aaa = " + match[0])
  20365. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20366. } catch (error) {
  20367. console.log("error_________________" + error);
  20368. }
  20369. console.log("error_________________" + error);
  20370. }
  20371. }
  20372. let toolsJson = {
  20373. "电子白板": { tool: 1, type: 1 },
  20374. "文档": { tool: 52, type: 1 },
  20375. "思维导图": { tool: 3, type: 1 },
  20376. "表格": { tool: 48, type: 1 },
  20377. "作业提交": { tool: 16, type: 2 },
  20378. "问答": { tool: 15, type: 2 },
  20379. "选择题": { tool: 45, type: 2 },
  20380. }
  20381. // answerQ:"sssssssssssssss"
  20382. // for (var i = 0; i < tArray.length; i++) {
  20383. let _task = tArray
  20384. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  20385. _task.elist = _task.elist.filter(el=>{
  20386. el.isai = 1
  20387. return el
  20388. })
  20389. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  20390. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  20391. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  20392. console.log("error_________________JSON不对重新生成");
  20393. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20394. _this.aiGet32(messages, index)
  20395. return;
  20396. }
  20397. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  20398. if (_task.toolChoose && _task.toolChoose.length) {
  20399. for (var j = 0; j < _task.toolChoose.length; j++) {
  20400. let _json = {
  20401. tool: [],
  20402. toolDetail: _task.toolChoose[j].detail,
  20403. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20404. askCount: 1,
  20405. askTitle: "",
  20406. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20407. }
  20408. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  20409. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  20410. let answerQ = await _this.aiCreateQuestion(15, index)
  20411. // _json.answerQ = answerQ.answerQ
  20412. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  20413. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  20414. let testJson = await _this.aiCreateQuestion(45, index)
  20415. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20416. _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}
  20417. }
  20418. _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]
  20419. _this.$forceUpdate();
  20420. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  20421. }
  20422. } else {
  20423. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  20424. {
  20425. tool: [],
  20426. toolDetail: "",
  20427. toolType: 0,
  20428. askCount: 1,
  20429. askTitle: "",
  20430. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20431. },
  20432. )
  20433. }
  20434. // }
  20435. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20436. _this.$forceUpdate();
  20437. _this.createTeacherAn(index);
  20438. }
  20439. // callback ? callback() : ''
  20440. _this.taskLoading[index] = false
  20441. })
  20442. .catch((error) => {
  20443. // _this.loading = false
  20444. _this.taskLoading[index] = false
  20445. console.log(error);
  20446. });
  20447. },
  20448. async aiGetG321(messages, index, callback, callback2) {
  20449. let _this = this
  20450. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20451. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20452. if (_this.infoData.length) {
  20453. for (var i = 0; i < _this.infoData.length; i++) {
  20454. if(_this.infoData[i].fileid){
  20455. fileid.push(_this.infoData[i].fileid)
  20456. }else {
  20457. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20458. if(_fileid){
  20459. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20460. _this.$forceUpdate();
  20461. if(_fileid != 1){
  20462. fileid.push(_fileid)
  20463. }
  20464. }
  20465. }
  20466. }
  20467. }
  20468. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  20469. let parm = {
  20470. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20471. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20472. session_name: uuidv4(),
  20473. userId: this.userid,
  20474. file_ids: fileid.length ? [...fileid] : '',
  20475. model: 'gpt-4o-2024-08-06',
  20476. temperature: this.mode == 3 ? 0.5 : 0.1,
  20477. }
  20478. this.ajax
  20479. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  20480. .then(async (response) => {
  20481. console.log(response);
  20482. let data = response.data.FunctionResponse
  20483. if (data.message) {
  20484. let tArray = {}
  20485. try {
  20486. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20487. } catch (error) {
  20488. console.log("error_________________" + error);
  20489. try {
  20490. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20491. let match = data.message.match(regex);
  20492. tArray = JSON.parse(match[0]);
  20493. } catch (error) {
  20494. try {
  20495. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20496. let match = data.message.match(regex);
  20497. // eval("var aaa = " + match[0])
  20498. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20499. } catch (error) {
  20500. console.log("error_________________" + error);
  20501. }
  20502. console.log("error_________________" + error);
  20503. }
  20504. }
  20505. console.log(data.message);
  20506. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  20507. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  20508. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20509. _this.$forceUpdate();
  20510. _this.createTeacherAn(index);
  20511. }
  20512. callback ? callback(callback2) : ''
  20513. _this.taskGLoading[index][0] = false
  20514. _this.taskCancelToken1[index] = null
  20515. _this.$forceUpdate();
  20516. })
  20517. .catch((error) => {
  20518. // _this.loading = false
  20519. callback ? callback(callback2) : ''
  20520. _this.taskGLoading[index][0] = false
  20521. _this.taskCancelToken1[index] = null
  20522. _this.$forceUpdate();
  20523. console.log(error);
  20524. });
  20525. },
  20526. async aiGetG322(messages, index, callback) {
  20527. let _this = this
  20528. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20529. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20530. if (_this.infoData.length) {
  20531. for (var i = 0; i < _this.infoData.length; i++) {
  20532. if(_this.infoData[i].fileid){
  20533. fileid.push(_this.infoData[i].fileid)
  20534. }else {
  20535. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20536. if(_fileid){
  20537. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20538. _this.$forceUpdate();
  20539. if(_fileid != 1){
  20540. fileid.push(_fileid)
  20541. }
  20542. }
  20543. }
  20544. }
  20545. }
  20546. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  20547. let parm = {
  20548. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20549. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20550. session_name: uuidv4(),
  20551. userId: this.userid,
  20552. file_ids: fileid.length ? [...fileid] : '',
  20553. model: 'gpt-4o-2024-08-06',
  20554. temperature: this.mode == 3 ? 0.5 : 0.1,
  20555. }
  20556. this.ajax
  20557. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  20558. .then(async (response) => {
  20559. console.log(response);
  20560. let data = response.data.FunctionResponse
  20561. if (data.message) {
  20562. console.log(data.message);
  20563. let tArray = {}
  20564. try {
  20565. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20566. } catch (error) {
  20567. console.log("error_________________" + error);
  20568. try {
  20569. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20570. let match = data.message.match(regex);
  20571. tArray = JSON.parse(match[0]);
  20572. } catch (error) {
  20573. try {
  20574. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20575. let match = data.message.match(regex);
  20576. // eval("var aaa = " + match[0])
  20577. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20578. } catch (error) {
  20579. console.log("error_________________" + error);
  20580. }
  20581. console.log("error_________________" + error);
  20582. }
  20583. }
  20584. let toolsJson = {
  20585. "电子白板": { tool: 1, type: 1 },
  20586. "文档": { tool: 52, type: 1 },
  20587. "思维导图": { tool: 3, type: 1 },
  20588. "表格": { tool: 48, type: 1 },
  20589. "作业提交": { tool: 16, type: 2 },
  20590. "问答": { tool: 15, type: 2 },
  20591. "选择题": { tool: 45, type: 2 },
  20592. }
  20593. if(_this.languageSetting == 1){
  20594. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  20595. }else if(_this.languageSetting == 2){
  20596. toolsJson = {
  20597. "Mind Map Tool": { tool: 1, type: 1 },
  20598. "Document tool": { tool: 52, type: 1 },
  20599. "Diagram Tool": { tool: 3, type: 1 },
  20600. "Spreadsheet tool": { tool: 48, type: 1 },
  20601. "作业提交": { tool: 16, type: 2 },
  20602. "Q&A Tool": { tool: 15, type: 2 },
  20603. "Choice tool": { tool: 45, type: 2 },
  20604. }
  20605. }
  20606. let _task = tArray
  20607. if(!_task.toolChoose){
  20608. console.log("error_________________JSON不对重新生成");
  20609. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20610. _this.aiGetG322(messages, index)
  20611. return;
  20612. }
  20613. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  20614. if (_task.toolChoose && _task.toolChoose.length) {
  20615. for (var j = 0; j < _task.toolChoose.length; j++) {
  20616. let _json = {
  20617. tool: [],
  20618. toolDetail: _task.toolChoose[j].detail,
  20619. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20620. askCount: 1,
  20621. askTitle: "",
  20622. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20623. }
  20624. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  20625. if(converter(_task.toolChoose[j].tool) == converter('问答') || _task.toolChoose[j].tool == 'Q&A Tool'){
  20626. let answerQ = await _this.aiCreateQuestion(15, index)
  20627. // _json.answerQ = answerQ.answerQ
  20628. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  20629. }else if(converter(_task.toolChoose[j].tool) == converter('选择题') || _task.toolChoose[j].tool == 'Choice tool'){
  20630. let testJson = await _this.aiCreateQuestion(45, index)
  20631. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20632. _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}
  20633. }
  20634. _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]
  20635. _this.$forceUpdate();
  20636. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  20637. }
  20638. } else {
  20639. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  20640. {
  20641. tool: [],
  20642. toolDetail: "",
  20643. toolType: 0,
  20644. askCount: 1,
  20645. askTitle: "",
  20646. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20647. },
  20648. )
  20649. }
  20650. //
  20651. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20652. _this.$forceUpdate();
  20653. // _this.$nextTick(()=>{
  20654. // setTimeout(() => {
  20655. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20656. // if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  20657. // _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  20658. // }
  20659. // }
  20660. // }, 2000);
  20661. // })
  20662. }
  20663. callback ? callback() : ''
  20664. _this.taskGLoading[index][1] = false
  20665. _this.taskCancelToken2[index] = null
  20666. _this.$forceUpdate();
  20667. })
  20668. .catch((error) => {
  20669. // _this.loading = false
  20670. callback ? callback() : ''
  20671. _this.taskGLoading[index][1] = false
  20672. _this.taskCancelToken2[index] = null
  20673. _this.$forceUpdate();
  20674. console.log(error);
  20675. });
  20676. },
  20677. async aiGetG323(messages, index) {
  20678. let _this = this
  20679. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20680. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20681. if (_this.infoData.length) {
  20682. for (var i = 0; i < _this.infoData.length; i++) {
  20683. if(_this.infoData[i].fileid){
  20684. fileid.push(_this.infoData[i].fileid)
  20685. }else {
  20686. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20687. if(_fileid){
  20688. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20689. _this.$forceUpdate();
  20690. if(_fileid != 1){
  20691. fileid.push(_fileid)
  20692. }
  20693. }
  20694. }
  20695. }
  20696. }
  20697. let parm = {
  20698. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20699. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20700. session_name: uuidv4(),
  20701. userId: this.userid,
  20702. file_ids: fileid.length ? [...fileid] : '',
  20703. model: 'gpt-4o-2024-08-06',
  20704. temperature: this.mode == 3 ? 0.5 : 0.1,
  20705. }
  20706. this.ajax
  20707. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20708. .then(async (response) => {
  20709. console.log(response);
  20710. let data = response.data.FunctionResponse
  20711. if (data.message) {
  20712. console.log(data.message);
  20713. let tArray = {}
  20714. try {
  20715. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20716. } catch (error) {
  20717. console.log("error_________________" + error);
  20718. try {
  20719. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20720. let match = data.message.match(regex);
  20721. tArray = JSON.parse(match[0]);
  20722. } catch (error) {
  20723. try {
  20724. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20725. let match = data.message.match(regex);
  20726. // eval("var aaa = " + match[0])
  20727. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20728. } catch (error) {
  20729. console.log("error_________________" + error);
  20730. }
  20731. console.log("error_________________" + error);
  20732. }
  20733. }
  20734. let _task = tArray
  20735. if(!_task.elist){
  20736. console.log("error_________________JSON不对重新生成");
  20737. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20738. _this.aiGetG322(messages, index)
  20739. return;
  20740. }
  20741. _task.elist = _task.elist.filter(el=>{
  20742. el.isai = "1"
  20743. return el
  20744. })
  20745. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  20746. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20747. _this.$forceUpdate();
  20748. }
  20749. // callback ? callback() : ''
  20750. _this.taskGLoading[index][2] = false
  20751. })
  20752. .catch((error) => {
  20753. // _this.loading = false
  20754. _this.taskGLoading[index][2] = false
  20755. console.log(error);
  20756. });
  20757. },
  20758. async aiCreateQuestion(type, task) {
  20759. let _this = this
  20760. return new Promise((resolve, reject) => {
  20761. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20762. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20763. if (_this.infoData.length) {
  20764. for (var i = 0; i < _this.infoData.length; i++) {
  20765. if(_this.infoData[i].fileid){
  20766. fileid.push(_this.infoData[i].fileid)
  20767. }
  20768. }
  20769. }
  20770. let sub = []
  20771. let mclass = []
  20772. if (this.courseTypeId.length) {
  20773. for (var i = 0; i < this.courseTypeId.length; i++) {
  20774. let _sid = this.courseTypeId[i]
  20775. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20776. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20777. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20778. }
  20779. }
  20780. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20781. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20782. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20783. }
  20784. }
  20785. }
  20786. }
  20787. let messages = ""
  20788. if(type == 15){
  20789. messages = `NOTICE
  20790. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  20791. Language: ${this.getLang()}
  20792. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20793. Instruction: Based on the context, follow "Format example", write content.
  20794. # Context
  20795. ## 任务
  20796. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  20797. ## 限制
  20798. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  20799. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  20800. ## 课程简介
  20801. 课程名字:${_this.courseName}
  20802. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20803. ${sub.length ? '学科:' + sub.join(",") : ''}
  20804. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20805. ## 教案
  20806. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20807. # Format example
  20808. {"answerQ":"问题"}
  20809. `
  20810. }else if(type == 45){
  20811. messages = `NOTICE
  20812. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  20813. Language: ${this.getLang()}
  20814. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20815. Instruction: Based on the context, follow "Format example", write content.
  20816. # Context
  20817. ## 任务
  20818. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  20819. ## 限制
  20820. - 生成题目禁止重复。
  20821. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  20822. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  20823. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  20824. ## 课程简介
  20825. 课程名字:${_this.courseName}
  20826. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20827. ${sub.length ? '学科:' + sub.join(",") : ''}
  20828. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20829. ## 教案
  20830. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20831. # Format example
  20832. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  20833. `
  20834. }
  20835. let parm = {
  20836. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20837. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20838. session_name: uuidv4(),
  20839. userId: this.userid,
  20840. file_ids: fileid.length ? [...fileid] : '',
  20841. model: 'gpt-4o-2024-08-06',
  20842. temperature: this.mode == 3 ? 0.5 : 0.1,
  20843. }
  20844. this.ajax
  20845. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20846. .then((response) => {
  20847. console.log(response);
  20848. let data = response.data.FunctionResponse
  20849. if (data.message) {
  20850. console.log(data.message);
  20851. try {
  20852. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20853. let tArray = {}
  20854. try {
  20855. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20856. } catch (error) {
  20857. console.log("error_________________" + error);
  20858. try {
  20859. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20860. let match = data.message.match(regex);
  20861. tArray = JSON.parse(match[0]);
  20862. // var message = data.message;
  20863. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20864. // var jsonEnd = message.indexOf("```", jsonStart);
  20865. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20866. // tArray = JSON.parse(jsonString);
  20867. } catch (error) {
  20868. try {
  20869. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20870. let match = data.message.match(regex);
  20871. // eval("var aaa = " + match[0])
  20872. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20873. } catch (error) {
  20874. try {
  20875. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20876. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  20877. let match = data.message.match(regex.replace(regex2, '"$1"'));
  20878. // eval("var aaa = " + match[0])
  20879. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20880. } catch (error) {
  20881. console.log("error_________________" + error);
  20882. }
  20883. console.log("error_________________" + error);
  20884. }
  20885. console.log("error_________________" + error);
  20886. }
  20887. }
  20888. resolve(tArray)
  20889. } catch (error) {
  20890. if(type == 15){
  20891. resolve({answerQ: "题目"})
  20892. }else if(type == 45){
  20893. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  20894. }
  20895. }
  20896. }else if(type == 15){
  20897. resolve({answerQ: "题目"})
  20898. }else if(type == 45){
  20899. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  20900. }
  20901. })
  20902. .catch((error) => {
  20903. if(type == 15){
  20904. resolve({answerQ: "题目"})
  20905. }else if(type == 45){
  20906. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  20907. }
  20908. console.log(error);
  20909. });
  20910. });
  20911. },
  20912. async aiChoice(type){
  20913. if(type == 45){
  20914. this.choiceLoading = true
  20915. }
  20916. let _this = this
  20917. let fileid = []
  20918. if (_this.xuanzeInfoData.length) {
  20919. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  20920. if(_this.xuanzeInfoData[i].fileid){
  20921. fileid.push(_this.xuanzeInfoData[i].fileid)
  20922. }
  20923. }
  20924. }else{
  20925. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20926. if (_this.infoData.length) {
  20927. for (var i = 0; i < _this.infoData.length; i++) {
  20928. if(_this.infoData[i].fileid){
  20929. fileid.push(_this.infoData[i].fileid)
  20930. }
  20931. }
  20932. }
  20933. }
  20934. let sub = []
  20935. let mclass = []
  20936. if (this.courseTypeId.length) {
  20937. for (var i = 0; i < this.courseTypeId.length; i++) {
  20938. let _sid = this.courseTypeId[i]
  20939. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20940. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20941. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20942. }
  20943. }
  20944. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20945. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20946. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20947. }
  20948. }
  20949. }
  20950. }
  20951. let messages = ""
  20952. if(type == 15){
  20953. messages = `NOTICE
  20954. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  20955. Language: ${this.getLang()}
  20956. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20957. Instruction: Based on the context, follow "Format example", write content.
  20958. # Context
  20959. ## 任务
  20960. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  20961. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  20962. ## 限制
  20963. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  20964. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  20965. ## 课程简介
  20966. 课程名字:${_this.courseName}
  20967. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20968. ${sub.length ? '学科:' + sub.join(",") : ''}
  20969. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20970. ## 教案
  20971. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20972. # Format example
  20973. {"answerQ":"问题"}
  20974. `
  20975. }else if(type == 45){
  20976. messages = `NOTICE
  20977. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  20978. Language: ${this.getLang()}
  20979. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20980. Instruction: Based on the context, follow "Format example", write content.
  20981. # Context
  20982. ## 任务
  20983. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  20984. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  20985. ## 限制
  20986. - 生成题目禁止重复。
  20987. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  20988. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  20989. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  20990. ## 课程简介
  20991. 课程名字:${_this.courseName}
  20992. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20993. ${sub.length ? '学科:' + sub.join(",") : ''}
  20994. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20995. ## 教案
  20996. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20997. # Format example
  20998. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  20999. `
  21000. }
  21001. let parm = {
  21002. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21003. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21004. session_name: uuidv4(),
  21005. userId: this.userid,
  21006. file_ids: fileid.length ? [...fileid] : '',
  21007. model: 'gpt-4o-2024-08-06',
  21008. temperature: this.mode == 3 ? 0.5 : 0.1,
  21009. }
  21010. this.ajax
  21011. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21012. .then((response) => {
  21013. console.log(response);
  21014. let data = response.data.FunctionResponse
  21015. if (data.message) {
  21016. console.log(data.message);
  21017. try {
  21018. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21019. let tArray = {}
  21020. try {
  21021. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21022. } catch (error) {
  21023. console.log("error_________________" + error);
  21024. try {
  21025. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  21026. let match = data.message.match(regex);
  21027. tArray = JSON.parse(match[0]);
  21028. // var message = data.message;
  21029. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21030. // var jsonEnd = message.indexOf("```", jsonStart);
  21031. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21032. // tArray = JSON.parse(jsonString);
  21033. } catch (error) {
  21034. try {
  21035. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  21036. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21037. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21038. // eval("var aaa = " + match[0])
  21039. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21040. } catch (error) {
  21041. console.log("error_________________" + error);
  21042. }
  21043. console.log("error_________________" + error);
  21044. }
  21045. }
  21046. if(type == 45){
  21047. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  21048. }
  21049. } catch (error) {
  21050. if(type == 15){
  21051. {answerQ: "题目"}
  21052. }else if(type == 45){
  21053. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21054. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21055. }
  21056. _this.choiceLoading = false
  21057. }
  21058. }else if(type == 15){
  21059. {answerQ: "题目"}
  21060. }else if(type == 45){
  21061. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21062. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21063. }
  21064. _this.choiceLoading = false
  21065. }).catch((error) => {
  21066. if(type == 15){
  21067. {answerQ: "题目"}
  21068. }else if(type == 45){
  21069. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21070. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21071. }
  21072. console.log(error);
  21073. _this.choiceLoading = false
  21074. });
  21075. },
  21076. async aiGet4(messages, callback, clickType) {
  21077. let _this = this
  21078. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21079. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21080. if (_this.infoData.length) {
  21081. for (var i = 0; i < _this.infoData.length; i++) {
  21082. if(_this.infoData[i].fileid){
  21083. fileid.push(_this.infoData[i].fileid)
  21084. }else {
  21085. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21086. if(_fileid){
  21087. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21088. _this.$forceUpdate();
  21089. if(_fileid != 1){
  21090. fileid.push(_fileid)
  21091. }
  21092. }
  21093. }
  21094. }
  21095. }
  21096. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  21097. if(_this.cankaoInfoData[i].fileid){
  21098. fileid.push(_this.cankaoInfoData[i].fileid)
  21099. }else {
  21100. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  21101. if(_fileid){
  21102. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21103. _this.$forceUpdate();
  21104. if(_fileid != 1){
  21105. fileid.push(_fileid)
  21106. }
  21107. }
  21108. }
  21109. }
  21110. // let params = JSON.stringify({
  21111. // // "model": "Chat",
  21112. // model: 'gpt-3.5-turbo',
  21113. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21114. // max_tokens: 4096,
  21115. // top_p: 1,
  21116. // frequency_penalty: 0,
  21117. // presence_penalty: 0,
  21118. // messages: [{
  21119. // content: messages,
  21120. // role: 'user'
  21121. // }],
  21122. // stream: false,
  21123. // uid: this.userid,
  21124. // mind_map_question: "",
  21125. // })
  21126. // // let params = JSON.stringify({
  21127. // // message: {
  21128. // // anthropic_version: "bedrock-2023-05-31",
  21129. // // max_tokens: 4096,
  21130. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  21131. // // top_p: 1,
  21132. // // messages: [{
  21133. // // content: messages,
  21134. // // role: 'user'
  21135. // // }], //
  21136. // // },
  21137. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21138. // // });
  21139. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21140. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21141. // console.log(response);
  21142. // let data = response.data.FunctionResponse
  21143. // if (data.choices && data.choices.length && data.choices[0].message) {
  21144. // console.log(data.choices[0].message.content);
  21145. // let dArray = JSON.parse(data.choices[0].message.content)
  21146. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  21147. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  21148. // _this.unitJson[0].chapterInfo[0].taskJson = []
  21149. // for (var i = 0; i < dArray.length; i++) {
  21150. // let _task = dArray[i]
  21151. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  21152. // task: _task.task,
  21153. // taskDetail: "",
  21154. // taskDetail2: "",
  21155. // taskDetail3: _task.detail,
  21156. // chapterData: [],
  21157. // toolText: "",
  21158. // toolChoose: [
  21159. // {
  21160. // tool: [],
  21161. // toolDetail: "",
  21162. // toolType: 0,
  21163. // askCount: 1,
  21164. // askTitle: "",
  21165. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21166. // },
  21167. // ],
  21168. // isShowTools: false,
  21169. // askCount: 1,
  21170. // isFold: 0,
  21171. // askTitle: "",
  21172. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21173. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21174. // homeworkList: [],
  21175. // })
  21176. // }
  21177. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  21178. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21179. // _this.$forceUpdate();
  21180. // } else {
  21181. // for (var i = 0; i < dArray.length; i++) {
  21182. // let _task = dArray[i]
  21183. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  21184. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21185. // }else {
  21186. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  21187. // task: _task.task,
  21188. // taskDetail: "",
  21189. // taskDetail2: "",
  21190. // taskDetail3: _task.detail,
  21191. // chapterData: [],
  21192. // toolText: "",
  21193. // toolChoose: [
  21194. // {
  21195. // tool: [],
  21196. // toolDetail: "",
  21197. // toolType: 0,
  21198. // askCount: 1,
  21199. // askTitle: "",
  21200. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21201. // },
  21202. // ],
  21203. // isShowTools: false,
  21204. // askCount: 1,
  21205. // isFold: 0,
  21206. // askTitle: "",
  21207. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21208. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21209. // homeworkList: [],
  21210. // }
  21211. // }
  21212. // }
  21213. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21214. // _this.$forceUpdate();
  21215. // }
  21216. // }
  21217. // // if (data.result) {
  21218. // // console.log(data.result);
  21219. // // let dArray = JSON.parse(data.result)
  21220. // // _this.teacherText = JSON.parse(data.result)
  21221. // // for (var i = 0; i < dArray.length; i++) {
  21222. // // let _task = dArray[i]
  21223. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21224. // // }
  21225. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21226. // // _this.$forceUpdate();
  21227. // // }
  21228. // callback ? callback() : ''
  21229. // _this.loading = false
  21230. // }).catch(function (error) {
  21231. // _this.loading = false
  21232. // console.log(error);
  21233. // });
  21234. let parm = {
  21235. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21236. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21237. session_name: uuidv4(),
  21238. userId: this.userid,
  21239. file_ids: fileid.length ? [...fileid] : '',
  21240. model: 'gpt-4o-2024-08-06',
  21241. temperature: this.mode == 3 ? 0.5 : 0.1,
  21242. }
  21243. this.ajax
  21244. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21245. .then((response) => {
  21246. console.log(response);
  21247. let data = response.data.FunctionResponse
  21248. if (data.message) {
  21249. console.log(data.message);
  21250. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21251. let dArray = []
  21252. try {
  21253. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21254. } catch (error) {
  21255. console.log("error_________________" + error);
  21256. try {
  21257. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  21258. let match = data.message.match(regex);
  21259. dArray = JSON.parse(match[0]);
  21260. // var message = data.message;
  21261. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21262. // var jsonEnd = message.indexOf("```", jsonStart);
  21263. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21264. // dArray = JSON.parse(jsonString);
  21265. } catch (error) {
  21266. _this.aiGet4(messages, callback)
  21267. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21268. console.log("error_________________" + error);
  21269. return;
  21270. console.log("error_________________" + error);
  21271. _this.loading = false
  21272. }
  21273. }
  21274. try {
  21275. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  21276. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  21277. if(_this.panTeacher() > 0){
  21278. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  21279. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  21280. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  21281. }
  21282. for (var i = 0; i < dArray.length; i++) {
  21283. let _task = dArray[i]
  21284. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  21285. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  21286. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21287. }else {
  21288. _this.unitJson[0].chapterInfo[0].taskJson.push({
  21289. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  21290. taskDetail: "",
  21291. taskDetail2: "",
  21292. taskDetail3: _task.detail,
  21293. chapterData: [],
  21294. toolText: "",
  21295. toolChoose: [
  21296. {
  21297. tool: [],
  21298. toolDetail: "",
  21299. toolType: 0,
  21300. askCount: 1,
  21301. askTitle: "",
  21302. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21303. },
  21304. ],
  21305. isShowTools: false,
  21306. askCount: 1,
  21307. isFold: 0,
  21308. askTitle: "",
  21309. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21310. checkJson: [{ checkCount: [], checkPerent: [] }],
  21311. homeworkList: [],
  21312. })
  21313. }
  21314. }
  21315. }else {
  21316. _this.unitJson[0].chapterInfo[0].taskJson = []
  21317. for (var i = 0; i < dArray.length; i++) {
  21318. let _task = dArray[i]
  21319. _this.unitJson[0].chapterInfo[0].taskJson.push({
  21320. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  21321. taskDetail: "",
  21322. taskDetail2: "",
  21323. taskDetail3: _task.detail,
  21324. chapterData: [],
  21325. toolText: "",
  21326. toolChoose: [
  21327. {
  21328. tool: [],
  21329. toolDetail: "",
  21330. toolType: 0,
  21331. askCount: 1,
  21332. askTitle: "",
  21333. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21334. },
  21335. ],
  21336. isShowTools: false,
  21337. askCount: 1,
  21338. isFold: 0,
  21339. askTitle: "",
  21340. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21341. checkJson: [{ checkCount: [], checkPerent: [] }],
  21342. homeworkList: [],
  21343. })
  21344. }
  21345. }
  21346. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  21347. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21348. _this.$forceUpdate();
  21349. } else {
  21350. for (var i = 0; i < dArray.length; i++) {
  21351. let _task = dArray[i]
  21352. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  21353. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21354. }else {
  21355. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  21356. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  21357. taskDetail: "",
  21358. taskDetail2: "",
  21359. taskDetail3: _task.detail,
  21360. chapterData: [],
  21361. toolText: "",
  21362. toolChoose: [
  21363. {
  21364. tool: [],
  21365. toolDetail: "",
  21366. toolType: 0,
  21367. askCount: 1,
  21368. askTitle: "",
  21369. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21370. },
  21371. ],
  21372. isShowTools: false,
  21373. askCount: 1,
  21374. isFold: 0,
  21375. askTitle: "",
  21376. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21377. checkJson: [{ checkCount: [], checkPerent: [] }],
  21378. homeworkList: [],
  21379. }
  21380. }
  21381. }
  21382. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21383. _this.$forceUpdate();
  21384. }
  21385. } catch (error) {
  21386. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21387. _this.aiGet4(messages, callback)
  21388. console.log("error_________________" + error);
  21389. return;
  21390. // _this.loading = false
  21391. }
  21392. }
  21393. callback ? callback() : ''
  21394. })
  21395. .catch((error) => {
  21396. _this.loading = false
  21397. console.log(error);
  21398. });
  21399. },
  21400. async aiDetail(msg, index) {
  21401. let _this = this
  21402. const _tindex = 'task-' + index
  21403. const _tindex2 = index
  21404. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21405. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21406. if (_this.infoData.length) {
  21407. for (var i = 0; i < _this.infoData.length; i++) {
  21408. if(_this.infoData[i].fileid){
  21409. fileid.push(_this.infoData[i].fileid)
  21410. }else {
  21411. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21412. if(_fileid){
  21413. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21414. _this.$forceUpdate();
  21415. if(_fileid != 1){
  21416. fileid.push(_fileid)
  21417. }
  21418. }
  21419. }
  21420. }
  21421. }
  21422. let url = []
  21423. if (this.infoData.length) {
  21424. for (var i = 0; i < this.infoData.length; i++) {
  21425. url.push(this.infoData[i].url)
  21426. }
  21427. }
  21428. let messages = `NOTICE
  21429. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21430. Language: ${this.getLang()}
  21431. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21432. Instruction: Based on the context, follow "Format example", write content.
  21433. #Context
  21434. ## 要求
  21435. ${msg}
  21436. ## 参考信息
  21437. 任务名称:${_this.aiCallBack.task}
  21438. ## 优化内容
  21439. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  21440. // -------- #补充参考资料和
  21441. // ## 补充参考资料
  21442. // - 补充资料:${url.join(",")}
  21443. // - 补充描述:${_this.courseText2}
  21444. _this.taskDetailLoading.push(_tindex)
  21445. _this.ttaskDetailLoading.push(_tindex)
  21446. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  21447. let _uuid = uuidv4();
  21448. // let params = JSON.stringify({
  21449. // // "model": "Chat",
  21450. // model: 'gpt-3.5-turbo',
  21451. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21452. // max_tokens: 4096,
  21453. // top_p: 1,
  21454. // frequency_penalty: 0,
  21455. // presence_penalty: 0,
  21456. // messages: [{
  21457. // content: messages,
  21458. // role: 'user'
  21459. // }],
  21460. // uid: _uuid,
  21461. // mind_map_question: "",
  21462. // })
  21463. let params = {
  21464. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21465. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  21466. session_name: _uuid,
  21467. userId: _this.userid,
  21468. uid: _uuid,
  21469. file_ids: fileid.length ? [...fileid] : '',
  21470. model: 'gpt-4o-2024-08-06',
  21471. temperature: this.mode == 3 ? 0.5 : 0.1,
  21472. }
  21473. // let params = JSON.stringify({
  21474. // message: {
  21475. // anthropic_version: "bedrock-2023-05-31",
  21476. // max_tokens: 4096,
  21477. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21478. // top_p: 1,
  21479. // messages: [{
  21480. // "role": "user",
  21481. // "content": messages
  21482. // }] ,
  21483. // },
  21484. // uid: _uuid,
  21485. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21486. // });
  21487. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21488. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  21489. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21490. console.log(response);
  21491. // let data = response.data.FunctionResponse
  21492. // if (data.choices && data.choices.length && data.choices[0].message) {
  21493. // console.log(data.choices[0].message.content);
  21494. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  21495. // _this.$forceUpdate()
  21496. // }
  21497. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21498. } else {
  21499. _this.$message.warning(response.data.FunctionResponse.result);
  21500. }
  21501. _this.isOutlineTaskCancelToken[index] = null
  21502. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21503. }).catch(function (error) {
  21504. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21505. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  21506. _this.isOutlineTaskCancelToken[index] = null
  21507. if(error && error.message != 'Request canceled by the user.'){
  21508. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21509. }
  21510. console.log(error);
  21511. });
  21512. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  21513. },
  21514. aiDetailgetAiContent(_uid, loading, _tindex2) {
  21515. try {
  21516. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21517. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21518. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21519. } catch(error){
  21520. console.log('EventSource error:', error);
  21521. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21522. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21523. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  21524. this.isOutlineTaskCancelToken[_tindex2] = null
  21525. return;
  21526. }
  21527. let _allText = "";
  21528. let _mdText = "";
  21529. let _iindex = 0
  21530. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  21531. let _eData = JSON.parse(_e.data).content;
  21532. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21533. //对话已经完成
  21534. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21535. this.isOutlineTaskCancelSource[_tindex2].close();
  21536. this.isOutlineTaskCancelSource[_tindex2] = null;
  21537. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  21538. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21539. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  21540. this.isOutlineTaskCancelToken[_tindex2] = null
  21541. return;
  21542. } else {
  21543. _iindex++
  21544. //对话还在继续
  21545. let _text = "";
  21546. _text = _eData.replaceAll("'", "");
  21547. if (_allText == "") {
  21548. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21549. } else {
  21550. _allText += _text;
  21551. }
  21552. _mdText = _allText + "_";
  21553. _mdText = _mdText.replace(/\\n/g, "\n");
  21554. _mdText = _mdText.replace(/\\/g, "");
  21555. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21556. //转化返回的回复流数据.
  21557. if(_iindex == 10){
  21558. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  21559. _iindex = 0
  21560. }
  21561. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21562. // 处理流数据
  21563. }
  21564. // this.$forceUpdate();
  21565. };
  21566. let _this = _this
  21567. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  21568. // 处理错误,可以尝试重新连接
  21569. console.log('EventSource error:', event);
  21570. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21571. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  21572. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  21573. _this.isOutlineTaskCancelToken[_tindex2] = null
  21574. _this.isOutlineTaskCancelSource[_tindex2].close();
  21575. _this.isOutlineTaskCancelSource[_tindex2] = null;
  21576. };
  21577. },
  21578. async aiOutlineDetail(msg, index) {
  21579. let _this = this
  21580. const _tindex = 'task-' + index
  21581. const _tindex2 = index
  21582. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21583. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21584. if (_this.infoData.length) {
  21585. for (var i = 0; i < _this.infoData.length; i++) {
  21586. if(_this.infoData[i].fileid){
  21587. fileid.push(_this.infoData[i].fileid)
  21588. }else {
  21589. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21590. if(_fileid){
  21591. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21592. _this.$forceUpdate();
  21593. if(_fileid != 1){
  21594. fileid.push(_fileid)
  21595. }
  21596. }
  21597. }
  21598. }
  21599. }
  21600. let url = []
  21601. if (this.infoData.length) {
  21602. for (var i = 0; i < this.infoData.length; i++) {
  21603. url.push(this.infoData[i].url)
  21604. }
  21605. }
  21606. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  21607. let messages = `NOTICE
  21608. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  21609. Language: ${this.getLang()}
  21610. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21611. Instruction: Based on the context, follow "Format example", write content.
  21612. #Context
  21613. ## 要求
  21614. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  21615. ## 参考信息
  21616. 课程名字:${_this.courseName}
  21617. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21618. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21619. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21620. # Format example
  21621. 子任务名称:名称应该总结了该任务是在做什么,
  21622. 子任务设计:任务设计。
  21623. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  21624. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  21625. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  21626. `
  21627. // 教学目标:教学目标。
  21628. // 任务设计:任务设计。
  21629. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  21630. // -------- #补充参考资料和
  21631. // ## 补充参考资料
  21632. // - 补充资料:${url.join(",")}
  21633. // - 补充描述:${_this.courseText2}
  21634. _this.taskDetailLoading.push(_tindex)
  21635. _this.ttaskDetailLoading.push(_tindex)
  21636. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  21637. let _uuid = uuidv4();
  21638. // let params = JSON.stringify({
  21639. // // "model": "Chat",
  21640. // model: 'gpt-3.5-turbo',
  21641. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21642. // max_tokens: 4096,
  21643. // top_p: 1,
  21644. // frequency_penalty: 0,
  21645. // presence_penalty: 0,
  21646. // messages: [{
  21647. // content: messages,
  21648. // role: 'user'
  21649. // }],
  21650. // uid: _uuid,
  21651. // mind_map_question: "",
  21652. // })
  21653. let params = {
  21654. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21655. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21656. session_name: _uuid,
  21657. userId: _this.userid,
  21658. uid: _uuid,
  21659. file_ids: fileid.length ? [...fileid] : '',
  21660. model: 'gpt-4o-2024-08-06',
  21661. temperature: this.mode == 3 ? 0.5 : 0.1,
  21662. }
  21663. // let params = JSON.stringify({
  21664. // message: {
  21665. // anthropic_version: "bedrock-2023-05-31",
  21666. // max_tokens: 4096,
  21667. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21668. // top_p: 1,
  21669. // messages: [{
  21670. // "role": "user",
  21671. // "content": messages
  21672. // }] ,
  21673. // },
  21674. // uid: _uuid,
  21675. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21676. // });
  21677. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21678. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  21679. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21680. console.log(response);
  21681. // let data = response.data.FunctionResponse
  21682. // if (data.choices && data.choices.length && data.choices[0].message) {
  21683. // console.log(data.choices[0].message.content);
  21684. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  21685. // _this.$forceUpdate()
  21686. // }
  21687. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21688. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  21689. } else {
  21690. _this.$message.warning(response.data.FunctionResponse.result);
  21691. }
  21692. _this.isOutlineTaskCancelToken[index] = null
  21693. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21694. }).catch(function (error) {
  21695. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21696. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  21697. _this.isOutlineTaskCancelToken[index] = null
  21698. if(error && error.message != 'Request canceled by the user.'){
  21699. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21700. }
  21701. console.log(error);
  21702. });
  21703. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  21704. },
  21705. async aiOutlineDetail2(msg, index) {
  21706. let _this = this
  21707. const _tindex = 'task-' + index
  21708. const _tindex2 = index
  21709. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21710. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21711. if (_this.infoData.length) {
  21712. for (var i = 0; i < _this.infoData.length; i++) {
  21713. if(_this.infoData[i].fileid){
  21714. fileid.push(_this.infoData[i].fileid)
  21715. }else {
  21716. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21717. if(_fileid){
  21718. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21719. _this.$forceUpdate();
  21720. if(_fileid != 1){
  21721. fileid.push(_fileid)
  21722. }
  21723. }
  21724. }
  21725. }
  21726. }
  21727. let url = []
  21728. if (this.infoData.length) {
  21729. for (var i = 0; i < this.infoData.length; i++) {
  21730. url.push(this.infoData[i].url)
  21731. }
  21732. }
  21733. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  21734. let taskArray = []
  21735. let taskArrayD = []
  21736. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  21737. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  21738. if(k != index){
  21739. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  21740. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  21741. }
  21742. }
  21743. let messages = `NOTICE
  21744. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  21745. Language: ${this.getLang()}
  21746. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21747. Instruction: Based on the context, follow "Format example", write content.
  21748. #Context
  21749. ## 要求
  21750. ${msg}
  21751. ## 参考信息
  21752. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21753. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21754. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21755. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  21756. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  21757. # Format example
  21758. **子任务标题**:环节+子任务名称
  21759. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  21760. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  21761. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  21762. `
  21763. // 教学目标:教学目标。
  21764. // 任务设计:任务设计。
  21765. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  21766. // -------- #补充参考资料和
  21767. // ## 补充参考资料
  21768. // - 补充资料:${url.join(",")}
  21769. // - 补充描述:${_this.courseText2}
  21770. _this.taskDetailLoading.push(_tindex)
  21771. _this.ttaskDetailLoading.push(_tindex)
  21772. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  21773. let _uuid = uuidv4();
  21774. // let params = JSON.stringify({
  21775. // // "model": "Chat",
  21776. // model: 'gpt-3.5-turbo',
  21777. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21778. // max_tokens: 4096,
  21779. // top_p: 1,
  21780. // frequency_penalty: 0,
  21781. // presence_penalty: 0,
  21782. // messages: [{
  21783. // content: messages,
  21784. // role: 'user'
  21785. // }],
  21786. // uid: _uuid,
  21787. // mind_map_question: "",
  21788. // })
  21789. let params = {
  21790. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21791. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  21792. session_name: _uuid,
  21793. userId: _this.userid,
  21794. uid: _uuid,
  21795. file_ids: fileid.length ? [...fileid] : '',
  21796. model: 'gpt-4o-2024-08-06',
  21797. temperature: this.mode == 3 ? 0.5 : 0.1,
  21798. }
  21799. // let params = JSON.stringify({
  21800. // message: {
  21801. // anthropic_version: "bedrock-2023-05-31",
  21802. // max_tokens: 4096,
  21803. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21804. // top_p: 1,
  21805. // messages: [{
  21806. // "role": "user",
  21807. // "content": messages
  21808. // }] ,
  21809. // },
  21810. // uid: _uuid,
  21811. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21812. // });
  21813. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21814. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  21815. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21816. console.log(response);
  21817. // let data = response.data.FunctionResponse
  21818. // if (data.choices && data.choices.length && data.choices[0].message) {
  21819. // console.log(data.choices[0].message.content);
  21820. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  21821. // _this.$forceUpdate()
  21822. // }
  21823. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21824. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  21825. } else {
  21826. _this.$message.warning(response.data.FunctionResponse.result);
  21827. }
  21828. _this.isOutlineTaskCancelToken[index] = null
  21829. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21830. }).catch(function (error) {
  21831. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21832. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  21833. _this.isOutlineTaskCancelToken[index] = null
  21834. if(error && error.message != 'Request canceled by the user.'){
  21835. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21836. }
  21837. console.log(error);
  21838. });
  21839. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  21840. },
  21841. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  21842. try {
  21843. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21844. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21845. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21846. } catch(error) {
  21847. console.log('EventSource error:', error);
  21848. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21849. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21850. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  21851. this.isOutlineTaskCancelToken[_tindex2] = null
  21852. return;
  21853. }
  21854. let _allText = "";
  21855. let _mdText = "";
  21856. let _iindex = 0
  21857. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  21858. let _eData = JSON.parse(_e.data).content;
  21859. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21860. //对话已经完成
  21861. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21862. this.isOutlineTaskCancelSource[_tindex2].close();
  21863. this.isOutlineTaskCancelSource[_tindex2] = null;
  21864. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  21865. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  21866. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  21867. }
  21868. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21869. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  21870. this.isOutlineTaskCancelToken[_tindex2] = null
  21871. return;
  21872. } else {
  21873. _iindex++
  21874. //对话还在继续
  21875. let _text = "";
  21876. _text = _eData.replaceAll("'", "");
  21877. if (_allText == "") {
  21878. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21879. } else {
  21880. _allText += _text;
  21881. }
  21882. _mdText = _allText + "_";
  21883. _mdText = _mdText.replace(/\\n/g, "\n");
  21884. _mdText = _mdText.replace(/\\/g, "");
  21885. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21886. //转化返回的回复流数据.
  21887. if(_iindex == 10){
  21888. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  21889. _iindex = 0
  21890. }
  21891. if(this.taskDetailLoading.indexOf(loading) !== -1){
  21892. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21893. }
  21894. // 处理流数据
  21895. }
  21896. // this.$forceUpdate();
  21897. };
  21898. let _this = this
  21899. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  21900. // 处理错误,可以尝试重新连接
  21901. console.log('EventSource error:', event);
  21902. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21903. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  21904. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  21905. _this.isOutlineTaskCancelToken[_tindex2] = null
  21906. _this.isOutlineTaskCancelSource[_tindex2].close();
  21907. _this.isOutlineTaskCancelSource[_tindex2] = null;
  21908. };
  21909. },
  21910. async aiDetail2(msg, index) {
  21911. let _this = this
  21912. const _tindex = 'task-' + index
  21913. const _tindex2 = index
  21914. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21915. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21916. if (_this.infoData.length) {
  21917. for (var i = 0; i < _this.infoData.length; i++) {
  21918. if(_this.infoData[i].fileid){
  21919. fileid.push(_this.infoData[i].fileid)
  21920. }else {
  21921. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21922. if(_fileid){
  21923. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21924. _this.$forceUpdate();
  21925. if(_fileid != 1){
  21926. fileid.push(_fileid)
  21927. }
  21928. }
  21929. }
  21930. }
  21931. }
  21932. let messages = `NOTICE
  21933. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  21934. Language: ${this.getLang()}
  21935. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21936. Instruction: Based on the context, follow "Format example", write content.
  21937. #Context
  21938. ## 要求
  21939. ${msg}
  21940. ## 参考资料
  21941. 任务名字: ${_this.aiCallBack.task}
  21942. ## 优化信息
  21943. ${_this.aiCallBack.taskDetail}
  21944. # Format example
  21945. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  21946. _this.taskDetailLoading2.push(_tindex)
  21947. _this.ttaskDetailLoading2.push(_tindex)
  21948. let _uuid = uuidv4();
  21949. // let params = JSON.stringify({
  21950. // // "model": "Chat",
  21951. // model: 'gpt-3.5-turbo',
  21952. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21953. // max_tokens: 4096,
  21954. // top_p: 1,
  21955. // frequency_penalty: 0,
  21956. // presence_penalty: 0,
  21957. // messages: [{
  21958. // content: messages,
  21959. // role: 'user'
  21960. // }],
  21961. // uid: _uuid,
  21962. // mind_map_question: "",
  21963. // })
  21964. let params = {
  21965. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21966. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  21967. session_name: _uuid,
  21968. userId: _this.userid,
  21969. uid: _uuid,
  21970. file_ids: fileid.length ? [...fileid] : '',
  21971. model: 'gpt-4o-2024-08-06',
  21972. temperature: this.mode == 3 ? 0.5 : 0.1,
  21973. }
  21974. // let params = JSON.stringify({
  21975. // message: {
  21976. // anthropic_version: "bedrock-2023-05-31",
  21977. // max_tokens: 4096,
  21978. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21979. // top_p: 1,
  21980. // messages: [{
  21981. // "role": "user",
  21982. // "content": messages
  21983. // }] ,
  21984. // },
  21985. // uid: _uuid,
  21986. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21987. // });
  21988. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21989. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21990. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21991. console.log(response);
  21992. // let data = response.data.FunctionResponse
  21993. // if (data.choices && data.choices.length && data.choices[0].message) {
  21994. // console.log(data.choices[0].message.content);
  21995. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21996. // _this.$forceUpdate()
  21997. // }
  21998. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21999. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22000. } else {
  22001. _this.$message.warning(response.data.FunctionResponse.result);
  22002. }
  22003. }).catch(function (error) {
  22004. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  22005. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  22006. if(error && error.message != 'Request canceled by the user.'){
  22007. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22008. }
  22009. console.log(error);
  22010. });
  22011. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  22012. },
  22013. aiDetail2getAiContent(_uid, loading, _tindex2) {
  22014. let _source;
  22015. try {
  22016. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22017. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22018. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22019. } catch(error) {
  22020. console.log('EventSource error:', error);
  22021. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22022. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22023. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22024. return;
  22025. }
  22026. let _allText = "";
  22027. let _mdText = "";
  22028. let _iindex = 0
  22029. _source.onmessage = _e => {
  22030. let _eData = JSON.parse(_e.data).content;
  22031. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22032. //对话已经完成
  22033. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22034. _source.close();
  22035. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22036. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22037. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22038. return;
  22039. } else {
  22040. _iindex++
  22041. //对话还在继续
  22042. let _text = "";
  22043. _text = _eData.replaceAll("'", "");
  22044. if (_allText == "") {
  22045. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22046. } else {
  22047. _allText += _text;
  22048. }
  22049. _mdText = _allText + "_";
  22050. _mdText = _mdText.replace(/\\n/g, "\n");
  22051. _mdText = _mdText.replace(/\\/g, "");
  22052. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22053. //转化返回的回复流数据
  22054. if(_iindex == 10){
  22055. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22056. _iindex = 0
  22057. }
  22058. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22059. // 处理流数据
  22060. }
  22061. // this.$forceUpdate();
  22062. };
  22063. let _this = this
  22064. _source.onerror = function(event) {
  22065. // 处理错误,可以尝试重新连接
  22066. console.log('EventSource error:', event);
  22067. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22068. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  22069. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  22070. _source.close();
  22071. };
  22072. },
  22073. async aiDetail3(msg, index, tindex) {
  22074. let _this = this
  22075. const _tindex = 'task-' + index + tindex
  22076. const _tindex2 = index
  22077. const _tindex3 = tindex
  22078. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22079. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22080. if (_this.infoData.length) {
  22081. for (var i = 0; i < _this.infoData.length; i++) {
  22082. if(_this.infoData[i].fileid){
  22083. fileid.push(_this.infoData[i].fileid)
  22084. }else {
  22085. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22086. if(_fileid){
  22087. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22088. _this.$forceUpdate();
  22089. if(_fileid != 1){
  22090. fileid.push(_fileid)
  22091. }
  22092. }
  22093. }
  22094. }
  22095. }
  22096. // **重点考虑该任务及工具名和工具内容的情况下*
  22097. let messages = `NOTICE
  22098. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22099. Language: ${this.getLang()}
  22100. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22101. Instruction: Based on the context, follow "Format example", write content.
  22102. #Context
  22103. ## 参考内容
  22104. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22105. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22106. 工具名称:${_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 : '无'}
  22107. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  22108. ## 要求
  22109. ${msg} 输出格式和内容要求参考#格式与要求
  22110. # Format example
  22111. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  22112. _this.taskDetailLoading3.push(_tindex)
  22113. _this.ttaskDetailLoading3.push(_tindex)
  22114. let _uuid = uuidv4();
  22115. // let params = JSON.stringify({
  22116. // // "model": "Chat",
  22117. // model: 'gpt-3.5-turbo',
  22118. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22119. // max_tokens: 4096,
  22120. // top_p: 1,
  22121. // frequency_penalty: 0,
  22122. // presence_penalty: 0,
  22123. // messages: [{
  22124. // content: messages,
  22125. // role: 'user'
  22126. // }],
  22127. // uid: _uuid,
  22128. // mind_map_question: "",
  22129. // })
  22130. let params = {
  22131. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22132. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22133. session_name: _uuid,
  22134. userId: _this.userid,
  22135. uid: _uuid,
  22136. file_ids: fileid.length ? [...fileid] : '',
  22137. model: 'gpt-4o-2024-08-06',
  22138. temperature: this.mode == 3 ? 0.5 : 0.1,
  22139. }
  22140. // let params = JSON.stringify({
  22141. // message: {
  22142. // anthropic_version: "bedrock-2023-05-31",
  22143. // max_tokens: 4096,
  22144. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22145. // top_p: 1,
  22146. // messages: [{
  22147. // "role": "user",
  22148. // "content": messages
  22149. // }] ,
  22150. // },
  22151. // uid: _uuid,
  22152. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22153. // });
  22154. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22155. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22156. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22157. console.log(response);
  22158. let data = response.data.FunctionResponse
  22159. // if (data.choices && data.choices.length && data.choices[0].message) {
  22160. // console.log(data.choices[0].message.content);
  22161. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  22162. // _this.$forceUpdate()
  22163. // }
  22164. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  22165. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22166. } else {
  22167. _this.$message.warning(response.data.FunctionResponse.result);
  22168. }
  22169. }).catch(function (error) {
  22170. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  22171. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  22172. if(error && error.message != 'Request canceled by the user.'){
  22173. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22174. }
  22175. console.log(error);
  22176. });
  22177. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  22178. },
  22179. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  22180. let _source;
  22181. try {
  22182. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22183. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22184. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22185. } catch(error) {
  22186. console.log('EventSource error:', event);
  22187. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22188. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22189. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  22190. return;
  22191. }
  22192. let _allText = "";
  22193. let _mdText = "";
  22194. let _iindex = 0
  22195. _source.onmessage = _e => {
  22196. let _eData = JSON.parse(_e.data).content;
  22197. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22198. //对话已经完成
  22199. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22200. _source.close();
  22201. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  22202. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22203. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  22204. return;
  22205. } else {
  22206. _iindex++
  22207. //对话还在继续
  22208. let _text = "";
  22209. _text = _eData.replaceAll("'", "");
  22210. if (_allText == "") {
  22211. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22212. } else {
  22213. _allText += _text;
  22214. }
  22215. _mdText = _allText + "_";
  22216. _mdText = _mdText.replace(/\\n/g, "\n");
  22217. _mdText = _mdText.replace(/\\/g, "");
  22218. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22219. //转化返回的回复流数据
  22220. if(_iindex == 10){
  22221. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  22222. _iindex = 0
  22223. }
  22224. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22225. // 处理流数据
  22226. }
  22227. // this.$forceUpdate();
  22228. };
  22229. let _this = this
  22230. _source.onerror = function(event) {
  22231. // 处理错误,可以尝试重新连接
  22232. console.log('EventSource error:', event);
  22233. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22234. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  22235. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  22236. _source.close();
  22237. };
  22238. },
  22239. async aiDetail4(msg, index) {
  22240. if (!msg.length) {
  22241. this.$message.error("请添加评价后才能优化")
  22242. return
  22243. }
  22244. let _this = this
  22245. const _tindex = 'task-' + index
  22246. const _tindex2 = index
  22247. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22248. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22249. if (_this.infoData.length) {
  22250. for (var i = 0; i < _this.infoData.length; i++) {
  22251. if(_this.infoData[i].fileid){
  22252. fileid.push(_this.infoData[i].fileid)
  22253. }else {
  22254. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22255. if(_fileid){
  22256. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22257. _this.$forceUpdate();
  22258. if(_fileid != 1){
  22259. fileid.push(_fileid)
  22260. }
  22261. }
  22262. }
  22263. }
  22264. }
  22265. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  22266. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  22267. if(_this.pingjiaInfoData[index][i].fileid){
  22268. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  22269. }
  22270. }
  22271. }
  22272. var _text = ""
  22273. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  22274. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  22275. // _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 : ''} `
  22276. _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 : ''} `
  22277. }
  22278. }
  22279. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  22280. // **重点考虑该任务详情**
  22281. // let messages = `
  22282. // Language: ${this.getLang()}
  22283. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  22284. // #Context
  22285. // ## 参考内容
  22286. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22287. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22288. // 评价设计:${_text}
  22289. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  22290. // ## 要求
  22291. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  22292. // # 格式与要求
  22293. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  22294. // # Format example
  22295. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  22296. let messages = `
  22297. Language: ${this.getLang()}
  22298. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  22299. #Context
  22300. ## 参考内容
  22301. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22302. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22303. ${_text ? '评价设计:'+_text : ''}
  22304. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  22305. ## 要求
  22306. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  22307. # 格式与要求
  22308. 核心素养:从教案中提取
  22309. 目标:从教案中提取
  22310. 评价标准:从教案中提取评价标准
  22311. # Format example
  22312. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  22313. _this.taskDetailLoading4.push(_tindex)
  22314. // let params = JSON.stringify({
  22315. // // "model": "Chat",
  22316. // model: 'gpt-3.5-turbo',
  22317. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22318. // max_tokens: 4096,
  22319. // top_p: 1,
  22320. // frequency_penalty: 0,
  22321. // presence_penalty: 0,
  22322. // messages: [{
  22323. // content: messages,
  22324. // role: 'user'
  22325. // }],
  22326. // stream: false,
  22327. // uid: this.userid,
  22328. // mind_map_question: "",
  22329. // })
  22330. let params = {
  22331. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22332. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22333. session_name: uuidv4(),
  22334. userId: _this.userid,
  22335. file_ids: fileid.length ? [...fileid] : '',
  22336. model: 'gpt-4o-2024-08-06',
  22337. temperature: this.mode == 3 ? 0.5 : 0.1,
  22338. }
  22339. // let params = JSON.stringify({
  22340. // message: {
  22341. // anthropic_version: "bedrock-2023-05-31",
  22342. // max_tokens: 4096,
  22343. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22344. // top_p: 1,
  22345. // messages: [{
  22346. // content: messages,
  22347. // role: 'user'
  22348. // }], //
  22349. // },
  22350. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22351. // });
  22352. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22353. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  22354. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  22355. console.log(response);
  22356. let data = response.data.FunctionResponse
  22357. // if (data.choices && data.choices.length && data.choices[0].message) {
  22358. // console.log(data.choices[0].message.content);
  22359. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  22360. // _this.$forceUpdate()
  22361. // }
  22362. if (data.message) {
  22363. console.log(data.message);
  22364. try {
  22365. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  22366. } catch (e) {
  22367. console.log("error_________________" + e);
  22368. // _this.$message.error(data.message)
  22369. try {
  22370. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  22371. let match = data.message.match(regex);
  22372. let elist = JSON.parse(match[0])
  22373. elist = elist.filter(el=>{
  22374. el.isai = 1
  22375. return el
  22376. })
  22377. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  22378. // var message = data.message;
  22379. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  22380. // var jsonEnd = message.indexOf("```", jsonStart);
  22381. // if (jsonStart !== -1 && jsonEnd !== -1) {
  22382. // var jsonString = message
  22383. // .substring(jsonStart, jsonEnd)
  22384. // .trim();
  22385. // var _data2 = JSON.parse(jsonString);
  22386. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  22387. // }
  22388. } catch (error) {
  22389. }
  22390. }
  22391. _this.$forceUpdate()
  22392. }
  22393. // if (data.result) {
  22394. // console.log(data.result);
  22395. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  22396. // _this.$forceUpdate()
  22397. // }
  22398. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22399. }).catch(function (error) {
  22400. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22401. if(error && error.message != 'Request canceled by the user.'){
  22402. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22403. }
  22404. console.log(error);
  22405. });
  22406. },
  22407. async aiDetail5(msg, index) {
  22408. let _this = this
  22409. const _tindex = 'task-' + index
  22410. const _tindex2 = index
  22411. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22412. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22413. if (_this.infoData.length) {
  22414. for (var i = 0; i < _this.infoData.length; i++) {
  22415. if(_this.infoData[i].fileid){
  22416. fileid.push(_this.infoData[i].fileid)
  22417. }else {
  22418. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22419. if(_fileid){
  22420. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22421. _this.$forceUpdate();
  22422. if(_fileid != 1){
  22423. fileid.push(_fileid)
  22424. }
  22425. }
  22426. }
  22427. }
  22428. }
  22429. let url = []
  22430. if (this.infoData.length) {
  22431. for (var i = 0; i < this.infoData.length; i++) {
  22432. url.push(this.infoData[i].url)
  22433. }
  22434. }
  22435. var _text = ""
  22436. var _text2 = ""
  22437. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  22438. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  22439. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  22440. }
  22441. let messages = `
  22442. Language: ${this.getLang()}
  22443. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  22444. --------
  22445. ## 要求
  22446. ${msg}
  22447. -------
  22448. ## 本教案描述
  22449. ${_this.aiCallBack}
  22450. -------
  22451. ## 课程大纲
  22452. ${_text}
  22453. -------
  22454. ## 其他教学任务教案
  22455. ${_text2}`
  22456. // ## 补充参考资料
  22457. // - 补充资料:${url.join(",")}
  22458. // - 补充描述:${this.courseText2}
  22459. _this.taskDetailLoading5.push(_tindex)
  22460. _this.ttaskDetailLoading5.push(_tindex)
  22461. let _uuid = uuidv4();
  22462. // let params = JSON.stringify({
  22463. // // "model": "Chat",
  22464. // model: 'gpt-3.5-turbo',
  22465. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22466. // max_tokens: 4096,
  22467. // top_p: 1,
  22468. // frequency_penalty: 0,
  22469. // presence_penalty: 0,
  22470. // messages: [{
  22471. // content: messages,
  22472. // role: 'user'
  22473. // }],
  22474. // uid: _uuid,
  22475. // mind_map_question: "",
  22476. // })
  22477. let params = {
  22478. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22479. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22480. session_name: _uuid,
  22481. userId: _this.userid,
  22482. uid: _uuid,
  22483. file_ids: fileid.length ? [...fileid] : '',
  22484. model: 'gpt-4o-2024-08-06',
  22485. temperature: this.mode == 3 ? 0.5 : 0.1,
  22486. }
  22487. // let params = JSON.stringify({
  22488. // message: {
  22489. // anthropic_version: "bedrock-2023-05-31",
  22490. // max_tokens: 4096,
  22491. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22492. // top_p: 1,
  22493. // messages: [{
  22494. // "role": "user",
  22495. // "content": messages
  22496. // }] ,
  22497. // },
  22498. // uid: _uuid,
  22499. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22500. // });
  22501. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22502. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22503. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22504. console.log(response);
  22505. // let data = response.data.FunctionResponse
  22506. // if (data.choices && data.choices.length && data.choices[0].message) {
  22507. // console.log(data.choices[0].message.content);
  22508. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22509. // _this.$forceUpdate()
  22510. // }
  22511. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22512. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22513. } else {
  22514. _this.$message.warning(response.data.FunctionResponse.result);
  22515. }
  22516. }).catch(function (error) {
  22517. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  22518. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  22519. }
  22520. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  22521. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  22522. }
  22523. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  22524. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  22525. if(error && error.message != 'Request canceled by the user.'){
  22526. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22527. }
  22528. console.log(error);
  22529. });
  22530. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  22531. },
  22532. aiDetail5getAiContent(_uid, loading, _tindex2) {
  22533. let _source;
  22534. try {
  22535. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22536. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22537. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22538. } catch(error){
  22539. console.log('EventSource error:', error);
  22540. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22541. if(this.taskDetailLoading5.indexOf(loading) != -1){
  22542. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22543. }
  22544. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  22545. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22546. }
  22547. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22548. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22549. return;
  22550. }
  22551. let _allText = "";
  22552. let _mdText = "";
  22553. let _iindex = 0
  22554. _source.onmessage = _e => {
  22555. let _eData = JSON.parse(_e.data).content;
  22556. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22557. //对话已经完成
  22558. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22559. _source.close();
  22560. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  22561. if(this.taskDetailLoading5.indexOf(loading) != -1){
  22562. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22563. }
  22564. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  22565. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22566. }
  22567. return;
  22568. } else {
  22569. _iindex++
  22570. //对话还在继续
  22571. let _text = "";
  22572. _text = _eData.replaceAll("'", "");
  22573. if (_allText == "") {
  22574. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22575. } else {
  22576. _allText += _text;
  22577. }
  22578. _mdText = _allText + "_";
  22579. _mdText = _mdText.replace(/\\n/g, "\n");
  22580. _mdText = _mdText.replace(/\\/g, "");
  22581. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22582. //转化返回的回复流数据
  22583. if(_iindex == 10){
  22584. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  22585. _iindex = 0
  22586. }
  22587. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  22588. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22589. }
  22590. // 处理流数据
  22591. }
  22592. // this.$forceUpdate();
  22593. };
  22594. let _this = this
  22595. _source.onerror = function(event) {
  22596. // 处理错误,可以尝试重新连接
  22597. console.log('EventSource error:', event);
  22598. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22599. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  22600. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  22601. }
  22602. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  22603. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  22604. }
  22605. _source.close();
  22606. };
  22607. },
  22608. async aiDetail52(msg, index, callback) {
  22609. let _this = this
  22610. const _tindex = 'task-' + index
  22611. const _tindex2 = index
  22612. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22613. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22614. if (_this.infoData.length) {
  22615. for (var i = 0; i < _this.infoData.length; i++) {
  22616. if(_this.infoData[i].fileid){
  22617. fileid.push(_this.infoData[i].fileid)
  22618. }else {
  22619. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22620. if(_fileid){
  22621. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22622. _this.$forceUpdate();
  22623. if(_fileid != 1){
  22624. fileid.push(_fileid)
  22625. }
  22626. }
  22627. }
  22628. }
  22629. }
  22630. let url = []
  22631. if (this.infoData.length) {
  22632. for (var i = 0; i < this.infoData.length; i++) {
  22633. url.push(this.infoData[i].url)
  22634. }
  22635. }
  22636. let taskN = []
  22637. let taskD = []
  22638. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  22639. if(_tindex2 != ti){
  22640. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  22641. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  22642. }
  22643. }
  22644. let messages = `NOTICE
  22645. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  22646. Language: ${this.getLang()}
  22647. ATTENTION: follow "Language"
  22648. #Context
  22649. ## 要求
  22650. ${msg}
  22651. ## 补充描述
  22652. 课程简要描述:${_this.courseText}
  22653. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22654. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  22655. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  22656. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22657. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  22658. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22659. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22660. `
  22661. // ## 补充参考资料
  22662. // - 补充资料:${url.join(",")}
  22663. // - 补充描述:${this.courseText2}
  22664. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  22665. _this.taskDetailLoading5.push(_tindex)
  22666. }
  22667. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  22668. _this.ttaskDetailLoading5.push(_tindex)
  22669. }
  22670. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  22671. let _uuid = uuidv4();
  22672. // let params = JSON.stringify({
  22673. // // "model": "Chat",
  22674. // model: 'gpt-3.5-turbo',
  22675. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22676. // max_tokens: 4096,
  22677. // top_p: 1,
  22678. // frequency_penalty: 0,
  22679. // presence_penalty: 0,
  22680. // messages: [{
  22681. // content: messages,
  22682. // role: 'user'
  22683. // }],
  22684. // uid: _uuid,
  22685. // mind_map_question: "",
  22686. // })
  22687. let params = {
  22688. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22689. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22690. session_name: _uuid,
  22691. userId: _this.userid,
  22692. uid: _uuid,
  22693. file_ids: fileid.length ? [...fileid] : '',
  22694. model: 'gpt-4o-2024-08-06',
  22695. temperature: this.mode == 3 ? 0.5 : 0.1,
  22696. }
  22697. // let params = JSON.stringify({
  22698. // message: {
  22699. // anthropic_version: "bedrock-2023-05-31",
  22700. // max_tokens: 4096,
  22701. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22702. // top_p: 1,
  22703. // messages: [{
  22704. // "role": "user",
  22705. // "content": messages
  22706. // }] ,
  22707. // },
  22708. // uid: _uuid,
  22709. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22710. // });
  22711. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22712. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  22713. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22714. console.log(response);
  22715. // let data = response.data.FunctionResponse
  22716. // if (data.choices && data.choices.length && data.choices[0].message) {
  22717. // console.log(data.choices[0].message.content);
  22718. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22719. // _this.$forceUpdate()
  22720. // }
  22721. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22722. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22723. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  22724. } else {
  22725. _this.$message.warning(response.data.FunctionResponse.result);
  22726. }
  22727. _this.isTeacherTaskCancelToken2[index] = null
  22728. }).catch(function (error) {
  22729. if(error && error.message != 'Request canceled by the user.'){
  22730. _this.isTeacherTaskCancelToken2[index] = null
  22731. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  22732. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  22733. }
  22734. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  22735. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  22736. }
  22737. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  22738. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  22739. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22740. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  22741. confirmButtonText: "确定",
  22742. cancelButtonText: "取消",
  22743. distinguishCancelAndClose: true,
  22744. type: "warning",
  22745. customClass: 'custom-confirm-box'
  22746. })
  22747. .then(() => {
  22748. _this.aiDetail52(msg, index, callback)
  22749. }).catch((v) => {
  22750. console.log(v);
  22751. callback ? callback() : ''
  22752. })
  22753. setTimeout(() => {
  22754. _this.setTipsIndex()
  22755. }, 500)
  22756. }
  22757. console.log(error);
  22758. });
  22759. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  22760. },
  22761. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  22762. try {
  22763. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22764. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22765. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22766. } catch(error) {
  22767. console.log('EventSource error:', error);
  22768. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22769. if(this.taskDetailLoading5.indexOf(loading) != -1){
  22770. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22771. }
  22772. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  22773. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22774. }
  22775. this.isTeacherTaskCancelToken2[_tindex2] = null
  22776. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  22777. confirmButtonText: "确定",
  22778. cancelButtonText: "取消",
  22779. distinguishCancelAndClose: true,
  22780. type: "warning",
  22781. customClass: 'custom-confirm-box'
  22782. })
  22783. .then(() => {
  22784. _this.aiDetail52(msg, _tindex2, callback)
  22785. }).catch((v) => {
  22786. console.log(v);
  22787. callback ? callback() : ''
  22788. })
  22789. setTimeout(() => {
  22790. _this.setTipsIndex()
  22791. }, 500)
  22792. return;
  22793. }
  22794. let _allText = "";
  22795. let _mdText = "";
  22796. this.allTextArray[_tindex2] = ""
  22797. let _iindex = 0
  22798. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  22799. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  22800. let _eData = JSON.parse(_e.data).content;
  22801. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22802. //对话已经完成
  22803. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22804. this.isTeacherTaskCancelSource[_tindex2].close();
  22805. this.isTeacherTaskCancelSource[_tindex2] = null;
  22806. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  22807. if(this.taskDetailLoading5.indexOf(loading) != -1){
  22808. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22809. }
  22810. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  22811. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22812. }
  22813. this.isTeacherTaskCancelToken2[_tindex2] = null
  22814. callback ? callback() : ''
  22815. this.saveCourse()
  22816. return;
  22817. } else {
  22818. _iindex++
  22819. //对话还在继续
  22820. let _text = "";
  22821. _text = _eData.replaceAll("'", "");
  22822. if (_allText == "") {
  22823. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22824. } else {
  22825. _allText += _text;
  22826. }
  22827. _mdText = _allText + "_";
  22828. _mdText = _mdText.replace(/\\n/g, "\n");
  22829. _mdText = _mdText.replace(/\\/g, "");
  22830. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22831. //转化返回的回复流数据
  22832. if(_iindex == 10){
  22833. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  22834. _iindex = 0
  22835. }
  22836. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  22837. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22838. }
  22839. // 处理流数据
  22840. }
  22841. };
  22842. let _this = this
  22843. _this.isTeacherTaskCancelSource.onerror = function(event) {
  22844. // 处理错误,可以尝试重新连接
  22845. console.log('EventSource error:', event);
  22846. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22847. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  22848. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  22849. }
  22850. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  22851. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  22852. }
  22853. _this.isTeacherTaskCancelSource[_tindex2].close();
  22854. _this.isTeacherTaskCancelSource[_tindex2] = null;
  22855. _this.isTeacherTaskCancelToken2[_tindex2] = null
  22856. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  22857. confirmButtonText: "确定",
  22858. cancelButtonText: "取消",
  22859. distinguishCancelAndClose: true,
  22860. type: "warning",
  22861. customClass: 'custom-confirm-box'
  22862. })
  22863. .then(() => {
  22864. _this.aiDetail52(msg, _tindex2, callback)
  22865. }).catch((v) => {
  22866. console.log(v);
  22867. callback ? callback() : ''
  22868. })
  22869. setTimeout(() => {
  22870. _this.setTipsIndex()
  22871. }, 500)
  22872. };
  22873. },
  22874. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  22875. let _mdText = "";
  22876. let _eData = JSON.parse(_e.data).content;
  22877. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22878. //对话已经完成
  22879. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22880. _source.close();
  22881. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22882. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22883. return;
  22884. } else {
  22885. //对话还在继续
  22886. let _text = "";
  22887. _text = _eData.replaceAll("'", "");
  22888. if (this.allTextArray[_tindex2] == "") {
  22889. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22890. } else {
  22891. this.allTextArray[_tindex2] += _text;
  22892. }
  22893. _mdText = this.allTextArray[_tindex2] + "_";
  22894. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  22895. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  22896. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  22897. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  22898. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22899. // 处理流数据
  22900. }
  22901. },
  22902. async aiCpote(msg, callback) {
  22903. let _this = this
  22904. let _index = _this.aitype.replace("aiC","c")
  22905. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22906. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22907. if (_this.infoData.length) {
  22908. for (var i = 0; i < _this.infoData.length; i++) {
  22909. if(_this.infoData[i].fileid){
  22910. fileid.push(_this.infoData[i].fileid)
  22911. }else {
  22912. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22913. if(_fileid){
  22914. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22915. _this.$forceUpdate();
  22916. if(_fileid != 1){
  22917. fileid.push(_fileid)
  22918. }
  22919. }
  22920. }
  22921. }
  22922. }
  22923. let sub = []
  22924. if (this.courseTypeId.length) {
  22925. for (var i = 0; i < this.courseTypeId.length; i++) {
  22926. let _sid = this.courseTypeId[i]
  22927. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22928. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22929. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22930. }
  22931. }
  22932. }
  22933. }
  22934. let mclass = []
  22935. if (this.courseTypeId.length) {
  22936. for (var i = 0; i < this.courseTypeId.length; i++) {
  22937. let _sid = this.courseTypeId[i]
  22938. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22939. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22940. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22941. }
  22942. }
  22943. }
  22944. }
  22945. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  22946. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  22947. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  22948. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  22949. let messages = `NOTICE
  22950. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  22951. Language: ${this.getLang()}
  22952. ATTENTION: follow "Language"
  22953. ${msg}
  22954. ## 课程简介
  22955. 课程名字:${this.courseName}
  22956. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22957. ${sub.length ? '学科:' + sub.join(",") : ''}
  22958. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22959. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22960. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  22961. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  22962. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  22963. _this.cpoteLoading[_index] = true
  22964. _this.cpotetLoading[_index] = true
  22965. let _uuid = uuidv4();
  22966. // let params = JSON.stringify({
  22967. // // "model": "Chat",
  22968. // model: 'gpt-3.5-turbo',
  22969. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22970. // max_tokens: 4096,
  22971. // top_p: 1,
  22972. // frequency_penalty: 0,
  22973. // presence_penalty: 0,
  22974. // messages: [{
  22975. // content: messages,
  22976. // role: 'user'
  22977. // }],
  22978. // uid: _uuid,
  22979. // mind_map_question: "",
  22980. // })
  22981. let params = {
  22982. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22983. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22984. session_name: _uuid,
  22985. userId: _this.userid,
  22986. uid: _uuid,
  22987. file_ids: fileid.length ? [...fileid] : '',
  22988. model: 'gpt-4o-2024-08-06',
  22989. temperature: this.mode == 3 ? 0.5 : 0.1,
  22990. }
  22991. // let params = JSON.stringify({
  22992. // message: {
  22993. // anthropic_version: "bedrock-2023-05-31",
  22994. // max_tokens: 4096,
  22995. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22996. // top_p: 1,
  22997. // messages: [{
  22998. // "role": "user",
  22999. // "content": messages
  23000. // }] ,
  23001. // },
  23002. // uid: _uuid,
  23003. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23004. // });
  23005. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23006. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23007. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23008. console.log(response);
  23009. // let data = response.data.FunctionResponse
  23010. // if (data.choices && data.choices.length && data.choices[0].message) {
  23011. // console.log(data.choices[0].message.content);
  23012. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23013. // _this.$forceUpdate()
  23014. // }
  23015. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23016. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23017. } else {
  23018. _this.$message.warning(response.data.FunctionResponse.result);
  23019. }
  23020. }).catch(function (error) {
  23021. _this.cpoteLoading[_index] = false
  23022. _this.cpotetLoading[_index] = false
  23023. callback ? callback() : ''
  23024. if(error && error.message != 'Request canceled by the user.'){
  23025. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23026. }
  23027. console.log(error);
  23028. });
  23029. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  23030. },
  23031. aiCpotegetAiContent(_uid, loading, callback) {
  23032. let _source;
  23033. try {
  23034. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23035. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23036. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23037. } catch(error){
  23038. console.log('EventSource error:', error);
  23039. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23040. this.cpoteLoading[loading] = false
  23041. this.cpotetLoading[loading] = false
  23042. return;
  23043. }
  23044. let _allText = "";
  23045. let _mdText = "";
  23046. let _iindex = 0
  23047. _source.onmessage = _e => {
  23048. let _eData = JSON.parse(_e.data).content;
  23049. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23050. //对话已经完成
  23051. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23052. _source.close();
  23053. this.cpote[loading] = _mdText;
  23054. this.cpoteLoading[loading] = false
  23055. this.cpotetLoading[loading] = false
  23056. callback ? callback() : ''
  23057. this.saveCourse()
  23058. return;
  23059. } else {
  23060. _iindex++
  23061. //对话还在继续
  23062. let _text = "";
  23063. _text = _eData.replaceAll("'", "");
  23064. if (_allText == "") {
  23065. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23066. } else {
  23067. _allText += _text;
  23068. }
  23069. _mdText = _allText + "_";
  23070. _mdText = _mdText.replace(/\\n/g, "\n");
  23071. _mdText = _mdText.replace(/\\/g, "");
  23072. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23073. //转化返回的回复流数据
  23074. if(_iindex == 10){
  23075. this.cpote[loading] = _mdText;
  23076. _iindex = 0
  23077. }
  23078. this.cpoteLoading[loading] = false
  23079. // 处理流数据
  23080. }
  23081. // this.$forceUpdate();
  23082. };
  23083. let _this = this
  23084. _source.onerror = function(event) {
  23085. // 处理错误,可以尝试重新连接
  23086. console.log('EventSource error:', event);
  23087. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23088. _this.cpoteLoading[loading] = false
  23089. _this.cpotetLoading[loading] = false
  23090. _source.close();
  23091. };
  23092. },
  23093. async aiteacherTextDetail(msg) {
  23094. let _this = this
  23095. let fileid = []
  23096. if (_this.teacherInfoData.length) {
  23097. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  23098. if(_this.teacherInfoData[i].fileid){
  23099. fileid.push(_this.teacherInfoData[i].fileid)
  23100. }else {
  23101. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  23102. if(_fileid){
  23103. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23104. _this.$forceUpdate();
  23105. if(_fileid != 1){
  23106. fileid.push(_fileid)
  23107. }
  23108. }
  23109. }
  23110. }
  23111. }
  23112. _this.teacherTextLoading = true
  23113. _this.tteacherTextLoading = true
  23114. let sub = []
  23115. if (_this.courseTypeId.length) {
  23116. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23117. let _sid = _this.courseTypeId[i]
  23118. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23119. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23120. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23121. }
  23122. }
  23123. }
  23124. }
  23125. let mclass = []
  23126. if (_this.courseTypeId.length) {
  23127. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23128. let _sid = _this.courseTypeId[i]
  23129. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23130. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23131. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23132. }
  23133. }
  23134. }
  23135. }
  23136. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  23137. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  23138. let messages = `NOTICE
  23139. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23140. Language: ${this.getLang()}
  23141. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23142. Instruction: Based on the context, follow "Format example", write content.
  23143. #Context
  23144. ## 参考资料
  23145. 课程名字:${this.courseName}
  23146. ${sub.length ? '学科:' + sub.join(",") : ''}
  23147. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23148. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  23149. ## 要求
  23150. ${msg}
  23151. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23152. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  23153. let _uuid = uuidv4();
  23154. // let params = JSON.stringify({
  23155. // // "model": "Chat",
  23156. // model: 'gpt-3.5-turbo',
  23157. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23158. // max_tokens: 4096,
  23159. // top_p: 1,
  23160. // frequency_penalty: 0,
  23161. // presence_penalty: 0,
  23162. // messages: [{
  23163. // content: messages,
  23164. // role: 'user'
  23165. // }],
  23166. // uid: _uuid,
  23167. // mind_map_question: "",
  23168. // })
  23169. let params = {
  23170. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23171. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23172. session_name: _uuid,
  23173. userId: _this.userid,
  23174. uid: _uuid,
  23175. file_ids: fileid.length ? [...fileid] : '',
  23176. model: 'gpt-4o-2024-08-06',
  23177. temperature: this.mode == 3 ? 0.5 : 0.1,
  23178. }
  23179. // let params = JSON.stringify({
  23180. // message: {
  23181. // anthropic_version: "bedrock-2023-05-31",
  23182. // max_tokens: 4096,
  23183. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23184. // top_p: 1,
  23185. // messages: [{
  23186. // "role": "user",
  23187. // "content": messages
  23188. // }] ,
  23189. // },
  23190. // uid: _uuid,
  23191. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23192. // });
  23193. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23194. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  23195. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23196. console.log(response);
  23197. // let data = response.data.FunctionResponse
  23198. // if (data.choices && data.choices.length && data.choices[0].message) {
  23199. // _this.courseText = data.choices[0].message.content
  23200. // }
  23201. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23202. } else {
  23203. _this.$message.warning(response.data.FunctionResponse.result);
  23204. }
  23205. _this.isTeacherTextCancelToken = null
  23206. }).catch(function (error) {
  23207. _this.teacherTextLoading = false
  23208. _this.tteacherTextLoading = false
  23209. _this.isTeacherTextCancelToken = null
  23210. if(error && error.message != 'Request canceled by the user.'){
  23211. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23212. }
  23213. console.log(error);
  23214. });
  23215. await _this.aiteacherTextDetailgetAiContent(_uuid)
  23216. },
  23217. aiteacherTextDetailgetAiContent(_uid) {
  23218. try {
  23219. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23220. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23221. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23222. } catch(error) {
  23223. console.log('EventSource error:', event);
  23224. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23225. this.teacherTextLoading = false
  23226. this.tteacherTextLoading = false
  23227. this.isTeacherTextCancelToken = null
  23228. return;
  23229. }
  23230. let _allText = "";
  23231. let _mdText = "";
  23232. let _iindex = 0
  23233. this.isTeacherTextCancelSource.onmessage = _e => {
  23234. let _eData = JSON.parse(_e.data).content;
  23235. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23236. //对话已经完成
  23237. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23238. this.isTeacherTextCancelSource.close();
  23239. this.isTeacherTextCancelSource = null;
  23240. this.teacherCourseText = _mdText;
  23241. this.teacherTextLoading = false
  23242. this.tteacherTextLoading = false
  23243. this.teacherCourseTextB = false
  23244. this.isTeacherTextCancelToken = null
  23245. return;
  23246. } else {
  23247. _iindex++
  23248. //对话还在继续
  23249. let _text = "";
  23250. _text = _eData.replaceAll("'", "");
  23251. if (_allText == "") {
  23252. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23253. } else {
  23254. _allText += _text;
  23255. }
  23256. _mdText = _allText + "_";
  23257. _mdText = _mdText.replace(/\\n/g, "\n");
  23258. _mdText = _mdText.replace(/\\/g, "");
  23259. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23260. //转化返回的回复流数据
  23261. if(_iindex == 10){
  23262. this.teacherCourseText = _mdText;
  23263. _iindex = 0
  23264. }
  23265. if(this.teacherTextLoading){
  23266. this.teacherTextLoading = false
  23267. }
  23268. // 处理流数据
  23269. }
  23270. // this.$forceUpdate();
  23271. };
  23272. let _this = this
  23273. this.isTeacherTextCancelSource.onerror = function(event) {
  23274. // 处理错误,可以尝试重新连接
  23275. console.log('EventSource error:', event);
  23276. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23277. _this.teacherTextLoading = false
  23278. _this.tteacherTextLoading = false
  23279. _this.isTeacherTextCancelToken = null
  23280. _this.isTeacherTextCancelSource.close();
  23281. _this.isTeacherTextCancelSource = null;
  23282. };
  23283. },
  23284. async aitargetTextDetail(msg) {
  23285. let _this = this
  23286. let fileid = []
  23287. if (_this.teacherInfoData.length) {
  23288. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  23289. if(_this.teacherInfoData[i].fileid){
  23290. fileid.push(_this.teacherInfoData[i].fileid)
  23291. }else {
  23292. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  23293. if(_fileid){
  23294. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23295. _this.$forceUpdate();
  23296. if(_fileid != 1){
  23297. fileid.push(_fileid)
  23298. }
  23299. }
  23300. }
  23301. }
  23302. }
  23303. _this.targetTextLoading = true
  23304. _this.ttargetTextLoading = true
  23305. let sub = []
  23306. if (_this.courseTypeId.length) {
  23307. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23308. let _sid = _this.courseTypeId[i]
  23309. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23310. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23311. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23312. }
  23313. }
  23314. }
  23315. }
  23316. let mclass = []
  23317. if (_this.courseTypeId.length) {
  23318. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23319. let _sid = _this.courseTypeId[i]
  23320. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23321. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23322. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23323. }
  23324. }
  23325. }
  23326. }
  23327. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  23328. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  23329. let messages = `NOTICE
  23330. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23331. Language: ${this.getLang()}
  23332. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23333. Instruction: Based on the context, follow "Format example", write content.
  23334. #Context
  23335. ## 参考资料
  23336. 课程名字:${this.courseName}
  23337. ${sub.length ? '学科:' + sub.join(",") : ''}
  23338. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23339. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  23340. ## 要求
  23341. ${msg}
  23342. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23343. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  23344. let _uuid = uuidv4();
  23345. // let params = JSON.stringify({
  23346. // // "model": "Chat",
  23347. // model: 'gpt-3.5-turbo',
  23348. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23349. // max_tokens: 4096,
  23350. // top_p: 1,
  23351. // frequency_penalty: 0,
  23352. // presence_penalty: 0,
  23353. // messages: [{
  23354. // content: messages,
  23355. // role: 'user'
  23356. // }],
  23357. // uid: _uuid,
  23358. // mind_map_question: "",
  23359. // })
  23360. let params = {
  23361. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23362. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23363. session_name: _uuid,
  23364. userId: _this.userid,
  23365. uid: _uuid,
  23366. file_ids: fileid.length ? [...fileid] : '',
  23367. model: 'gpt-4o-2024-08-06',
  23368. temperature: this.mode == 3 ? 0.5 : 0.1,
  23369. }
  23370. // let params = JSON.stringify({
  23371. // message: {
  23372. // anthropic_version: "bedrock-2023-05-31",
  23373. // max_tokens: 4096,
  23374. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23375. // top_p: 1,
  23376. // messages: [{
  23377. // "role": "user",
  23378. // "content": messages
  23379. // }] ,
  23380. // },
  23381. // uid: _uuid,
  23382. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23383. // });
  23384. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23385. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  23386. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23387. console.log(response);
  23388. // let data = response.data.FunctionResponse
  23389. // if (data.choices && data.choices.length && data.choices[0].message) {
  23390. // _this.courseText = data.choices[0].message.content
  23391. // }
  23392. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23393. } else {
  23394. _this.$message.warning(response.data.FunctionResponse.result);
  23395. }
  23396. _this.isTargetCancelToken1 = null
  23397. }).catch(function (error) {
  23398. _this.targetTextLoading = false
  23399. _this.ttargetTextLoading = false
  23400. _this.isTargetCancelToken1 = null
  23401. if(error && error.message != 'Request canceled by the user.'){
  23402. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23403. }
  23404. console.log(error);
  23405. });
  23406. await _this.aitargetTextDetailgetAiContent(_uuid)
  23407. },
  23408. aitargetTextDetailgetAiContent(_uid) {
  23409. try {
  23410. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23411. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23412. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23413. } catch (error) {
  23414. console.log('EventSource error:', error);
  23415. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23416. this.targetTextLoading = false
  23417. this.ttargetTextLoading = false
  23418. this.isTargetCancelToken1 = null
  23419. return;
  23420. }
  23421. let _allText = "";
  23422. let _mdText = "";
  23423. let _iindex = 0
  23424. this.isTargetCancelSource1.onmessage = _e => {
  23425. let _eData = JSON.parse(_e.data).content;
  23426. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23427. //对话已经完成
  23428. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23429. this.isTargetCancelSource1.close();
  23430. this.isTargetCancelSource1 = null;
  23431. this.targetCourseText = _mdText;
  23432. this.targetTextLoading = false
  23433. this.ttargetTextLoading = false
  23434. this.targetCourseTextB = false
  23435. this.isTargetCancelToken1 = null
  23436. return;
  23437. } else {
  23438. _iindex++
  23439. //对话还在继续
  23440. let _text = "";
  23441. _text = _eData.replaceAll("'", "");
  23442. if (_allText == "") {
  23443. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23444. } else {
  23445. _allText += _text;
  23446. }
  23447. _mdText = _allText + "_";
  23448. _mdText = _mdText.replace(/\\n/g, "\n");
  23449. _mdText = _mdText.replace(/\\/g, "");
  23450. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23451. //转化返回的回复流数据
  23452. if(_iindex == 10){
  23453. this.targetCourseText = _mdText;
  23454. _iindex = 0
  23455. }
  23456. if(this.targetTextLoading){
  23457. this.targetTextLoading = false
  23458. }
  23459. // 处理流数据
  23460. }
  23461. // this.$forceUpdate();
  23462. };
  23463. let _this = this
  23464. this.isTargetCancelSource1.onerror = function(event) {
  23465. // 处理错误,可以尝试重新连接
  23466. console.log('EventSource error:', event);
  23467. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23468. _this.targetTextLoading = false
  23469. _this.ttargetTextLoading = false
  23470. _this.isTargetCancelToken1 = null
  23471. _this.isTargetCancelSource1.close();
  23472. _this.isTargetCancelSource1 = null;
  23473. };
  23474. },
  23475. async aitargetTextDetail2(msg) {
  23476. let _this = this
  23477. let fileid = []
  23478. if(_this.mubiaoInfoData.length){
  23479. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  23480. if(_this.mubiaoInfoData[i].fileid){
  23481. fileid.push(_this.mubiaoInfoData[i].fileid)
  23482. }else {
  23483. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  23484. if(_fileid){
  23485. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23486. _this.$forceUpdate();
  23487. if(_fileid != 1){
  23488. fileid.push(_fileid)
  23489. }
  23490. }
  23491. }
  23492. }
  23493. }
  23494. _this.targetTextLoading2 = true
  23495. _this.ttargetTextLoading2 = true
  23496. let sub = []
  23497. if (_this.courseTypeId.length) {
  23498. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23499. let _sid = _this.courseTypeId[i]
  23500. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23501. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23502. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23503. }
  23504. }
  23505. }
  23506. }
  23507. let mclass = []
  23508. if (_this.courseTypeId.length) {
  23509. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23510. let _sid = _this.courseTypeId[i]
  23511. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23512. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23513. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23514. }
  23515. }
  23516. }
  23517. }
  23518. if(sub.length){
  23519. let _fileid = _this.importFileid(sub)
  23520. fileid = [...fileid, ..._fileid]
  23521. }
  23522. let messages = `NOTICE
  23523. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23524. Language: ${this.getLang()}
  23525. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23526. Instruction: Based on the context, follow "Format example", write content.
  23527. #Context
  23528. ## 参考资料
  23529. 课程标题:${this.courseName}
  23530. ${sub.length ? '学科:' + sub.join(",") : ''}
  23531. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23532. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  23533. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  23534. ## 要求
  23535. ${msg}
  23536. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23537. let _uuid = uuidv4();
  23538. // let params = JSON.stringify({
  23539. // // "model": "Chat",
  23540. // model: 'gpt-3.5-turbo',
  23541. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23542. // max_tokens: 4096,
  23543. // top_p: 1,
  23544. // frequency_penalty: 0,
  23545. // presence_penalty: 0,
  23546. // messages: [{
  23547. // content: messages,
  23548. // role: 'user'
  23549. // }],
  23550. // uid: _uuid,
  23551. // mind_map_question: "",
  23552. // })
  23553. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  23554. let params = {
  23555. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23556. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23557. session_name: _uuid,
  23558. userId: _this.userid,
  23559. uid: _uuid,
  23560. file_ids: fileid.length ? [...fileid] : '',
  23561. model: 'gpt-4o-2024-08-06',
  23562. temperature: this.mode == 3 ? 0.5 : 0.1,
  23563. }
  23564. // let params = JSON.stringify({
  23565. // message: {
  23566. // anthropic_version: "bedrock-2023-05-31",
  23567. // max_tokens: 4096,
  23568. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23569. // top_p: 1,
  23570. // messages: [{
  23571. // "role": "user",
  23572. // "content": messages
  23573. // }] ,
  23574. // },
  23575. // uid: _uuid,
  23576. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23577. // });
  23578. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23579. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  23580. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23581. console.log(response);
  23582. // let data = response.data.FunctionResponse
  23583. // if (data.choices && data.choices.length && data.choices[0].message) {
  23584. // _this.courseText = data.choices[0].message.content
  23585. // }
  23586. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23587. } else {
  23588. _this.$message.warning(response.data.FunctionResponse.result);
  23589. }
  23590. _this.isTargetCancelToken2 = null
  23591. }).catch(function (error) {
  23592. _this.targetTextLoading2 = false
  23593. _this.ttargetTextLoading2 = false
  23594. _this.isTargetCancelToken2 = null
  23595. if(error && error.message != 'Request canceled by the user.'){
  23596. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23597. }
  23598. console.log(error);
  23599. });
  23600. await _this.aitargetTextDetail2getAiContent(_uuid)
  23601. },
  23602. importFileid(sub){
  23603. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  23604. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  23605. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  23606. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  23607. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  23608. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  23609. let _sub = converter(sub.join(","))
  23610. let fileid = []
  23611. for(var i = 0; i < this.fileidArray.length; i++){
  23612. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  23613. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  23614. fileid.push(this.fileidArray[i].fileid)
  23615. }
  23616. }
  23617. }
  23618. return fileid
  23619. },
  23620. selectFileid(){
  23621. let params = {
  23622. oid: this.oid,
  23623. };
  23624. this.ajax
  23625. .get(this.$store.state.api + "selectFileid", params)
  23626. .then((res) => {
  23627. this.fileidArray = res.data[0]
  23628. if(res.data[1].length){
  23629. this.fileidArray = res.data[1]
  23630. }
  23631. if(res.data[2].length){
  23632. this.fileidArray = res.data[2]
  23633. }
  23634. })
  23635. .catch((err) => {
  23636. console.error(err);
  23637. });
  23638. },
  23639. selectAiFileid(){
  23640. let params = {
  23641. oid: this.oid,
  23642. };
  23643. this.ajax
  23644. .get(this.$store.state.api + "selectAiFileid", params)
  23645. .then((res) => {
  23646. let fileIds = []
  23647. for(var i = 0; i < res.data[0].length; i++){
  23648. fileIds.push(res.data[0][i].fileid)
  23649. }
  23650. this.fileIds = fileIds
  23651. if(res.data[1].length){
  23652. fileIds = []
  23653. for(var i = 0; i < res.data[1].length; i++){
  23654. fileIds.push(res.data[0][i].fileid)
  23655. }
  23656. this.fileIds = fileIds
  23657. }
  23658. if(res.data[2].length){
  23659. fileIds = []
  23660. for(var i = 0; i < res.data[2].length; i++){
  23661. fileIds.push(res.data[0][i].fileid)
  23662. }
  23663. this.fileIds = fileIds
  23664. }
  23665. })
  23666. .catch((err) => {
  23667. console.error(err);
  23668. });
  23669. },
  23670. selectKnowFileid(){
  23671. let params = {
  23672. oid: this.oid,
  23673. sta: 'cn'
  23674. };
  23675. this.ajax
  23676. .get(this.$store.state.api + "selectKnowFileid", params)
  23677. .then((res) => {
  23678. this.knowFileArray = res.data[0]
  23679. if(res.data[1].length){
  23680. this.knowFileArray = res.data[1]
  23681. }
  23682. if(res.data[2].length){
  23683. this.knowFileArray = res.data[2]
  23684. }
  23685. })
  23686. .catch((err) => {
  23687. console.error(err);
  23688. });
  23689. },
  23690. async aitargetTextDetail22(msg,msg2) {
  23691. let _this = this
  23692. let fileid = []
  23693. _this.targetTextLoading2 = true
  23694. _this.ttargetTextLoading2 = true
  23695. let sub = []
  23696. if (_this.courseTypeId.length) {
  23697. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23698. let _sid = _this.courseTypeId[i]
  23699. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23700. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23701. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23702. }
  23703. }
  23704. }
  23705. }
  23706. let mclass = []
  23707. if (_this.courseTypeId.length) {
  23708. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23709. let _sid = _this.courseTypeId[i]
  23710. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23711. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23712. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23713. }
  23714. }
  23715. }
  23716. }
  23717. if(!msg2 && sub.length){
  23718. // let _fileid = _this.importFileid(sub)
  23719. // fileid = [...fileid, ..._fileid]
  23720. }
  23721. let messages = `NOTICE
  23722. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23723. Language: ${this.getLang()}
  23724. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23725. Instruction: Based on the context, follow "Format example", write content.
  23726. #Context
  23727. ## 参考资料
  23728. 课程标题:${this.courseName}
  23729. ${sub.length ? '学科:' + sub.join(",") : ''}
  23730. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23731. 课程目标:${msg2}
  23732. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  23733. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  23734. ## 要求
  23735. ${msg}
  23736. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23737. let _uuid = uuidv4();
  23738. // let params = JSON.stringify({
  23739. // // "model": "Chat",
  23740. // model: 'gpt-3.5-turbo',
  23741. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23742. // max_tokens: 4096,
  23743. // top_p: 1,
  23744. // frequency_penalty: 0,
  23745. // presence_penalty: 0,
  23746. // messages: [{
  23747. // content: messages,
  23748. // role: 'user'
  23749. // }],
  23750. // uid: _uuid,
  23751. // mind_map_question: "",
  23752. // })
  23753. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  23754. let params = {
  23755. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  23756. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23757. session_name: _uuid,
  23758. userId: _this.userid,
  23759. uid: _uuid,
  23760. file_ids: fileid.length ? [...fileid] : '',
  23761. model: 'gpt-4o-2024-08-06',
  23762. temperature: this.mode == 3 ? 0.5 : 0.1,
  23763. }
  23764. // let params = JSON.stringify({
  23765. // message: {
  23766. // anthropic_version: "bedrock-2023-05-31",
  23767. // max_tokens: 4096,
  23768. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23769. // top_p: 1,
  23770. // messages: [{
  23771. // "role": "user",
  23772. // "content": messages
  23773. // }] ,
  23774. // },
  23775. // uid: _uuid,
  23776. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23777. // });
  23778. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23779. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  23780. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23781. console.log(response);
  23782. // let data = response.data.FunctionResponse
  23783. // if (data.choices && data.choices.length && data.choices[0].message) {
  23784. // _this.courseText = data.choices[0].message.content
  23785. // }
  23786. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23787. } else {
  23788. _this.$message.warning(response.data.FunctionResponse.result);
  23789. }
  23790. _this.isTargetCancelToken2 = null
  23791. }).catch(function (error) {
  23792. _this.targetTextLoading2 = false
  23793. _this.ttargetTextLoading2 = false
  23794. _this.isTargetCancelToken2 = null
  23795. if(error && error.message != 'Request canceled by the user.'){
  23796. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23797. }
  23798. console.log(error);
  23799. });
  23800. await _this.aitargetTextDetail2getAiContent(_uuid)
  23801. },
  23802. aitargetTextDetail2getAiContent(_uid) {
  23803. try {
  23804. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23805. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23806. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23807. } catch(error) {
  23808. console.log('EventSource error:', error);
  23809. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23810. this.targetTextLoading2 = false
  23811. this.ttargetTextLoading2 = false
  23812. this.isTargetCancelToken2 = null
  23813. return;
  23814. }
  23815. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  23816. let _allText = "";
  23817. let _mdText = "";
  23818. let _iindex = 0
  23819. this.isTargetCancelSource2.onmessage = _e => {
  23820. let _eData = JSON.parse(_e.data).content;
  23821. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23822. //对话已经完成
  23823. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23824. this.isTargetCancelSource2.close();
  23825. this.isTargetCancelSource2 = null;
  23826. this.targetCourseText2 = text1+' \n '+_mdText;
  23827. this.targetTextLoading2 = false
  23828. this.ttargetTextLoading2 = false
  23829. this.targetCourseText2B = false
  23830. this.isTargetCancelToken2 = null
  23831. this.saveCourse()
  23832. return;
  23833. } else {
  23834. _iindex++
  23835. //对话还在继续
  23836. let _text = "";
  23837. _text = _eData.replaceAll("'", "");
  23838. if (_allText == "") {
  23839. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23840. } else {
  23841. _allText += _text;
  23842. }
  23843. _mdText = _allText + "_";
  23844. _mdText = _mdText.replace(/\\n/g, "\n");
  23845. _mdText = _mdText.replace(/\\/g, "");
  23846. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23847. //转化返回的回复流数据
  23848. if(_iindex == 10){
  23849. this.targetCourseText2 = text1+' \n '+_mdText;
  23850. _iindex = 0
  23851. }
  23852. if(this.targetTextLoading2){
  23853. this.targetTextLoading2 = false
  23854. }
  23855. // 处理流数据
  23856. }
  23857. // this.$forceUpdate();
  23858. };
  23859. let _this = this
  23860. this.isTargetCancelSource2.onerror = function(event) {
  23861. // 处理错误,可以尝试重新连接
  23862. console.log('EventSource error:', event);
  23863. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23864. _this.targetTextLoading2 = false
  23865. _this.ttargetTextLoading2 = false
  23866. _this.isTargetCancelToken2 = null
  23867. _this.isTargetCancelSource2.close();
  23868. _this.isTargetCancelSource2 = null;
  23869. };
  23870. },
  23871. async aitargetTextDetail3(msg) {
  23872. let _this = this
  23873. let fileid = []
  23874. if(_this.mubiaoInfoData.length){
  23875. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  23876. if(_this.mubiaoInfoData[i].fileid){
  23877. fileid.push(_this.mubiaoInfoData[i].fileid)
  23878. }else {
  23879. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  23880. if(_fileid){
  23881. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23882. _this.$forceUpdate();
  23883. if(_fileid != 1){
  23884. fileid.push(_fileid)
  23885. }
  23886. }
  23887. }
  23888. }
  23889. }
  23890. _this.targetTextLoading2 = true
  23891. _this.ttargetTextLoading2 = true
  23892. let sub = []
  23893. if (_this.courseTypeId.length) {
  23894. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23895. let _sid = _this.courseTypeId[i]
  23896. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23897. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23898. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23899. }
  23900. }
  23901. }
  23902. }
  23903. let mclass = []
  23904. if (_this.courseTypeId.length) {
  23905. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23906. let _sid = _this.courseTypeId[i]
  23907. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23908. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23909. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23910. }
  23911. }
  23912. }
  23913. }
  23914. // if(sub.length){
  23915. // let _fileid = _this.importFileid(sub)
  23916. // fileid = [...fileid, ..._fileid]
  23917. // }
  23918. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23919. if (_this.infoData.length) {
  23920. for (var i = 0; i < _this.infoData.length; i++) {
  23921. if(_this.infoData[i].fileid){
  23922. fileid.push(_this.infoData[i].fileid)
  23923. }else {
  23924. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23925. if(_fileid){
  23926. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23927. _this.$forceUpdate();
  23928. if(_fileid != 1){
  23929. fileid.push(_fileid)
  23930. }
  23931. }
  23932. }
  23933. }
  23934. }
  23935. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  23936. let messages = `Language: ${this.getLang()}
  23937. ${msg}
  23938. ## 课程信息
  23939. 课程名字:${this.courseName}
  23940. 课程概况:${this.courseText}
  23941. ${sub.length ? '学科:' + sub.join(",") : ''}
  23942. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  23943. let _uuid = uuidv4();
  23944. // let params = JSON.stringify({
  23945. // // "model": "Chat",
  23946. // model: 'gpt-3.5-turbo',
  23947. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23948. // max_tokens: 4096,
  23949. // top_p: 1,
  23950. // frequency_penalty: 0,
  23951. // presence_penalty: 0,
  23952. // messages: [{
  23953. // content: messages,
  23954. // role: 'user'
  23955. // }],
  23956. // uid: _uuid,
  23957. // mind_map_question: "",
  23958. // })
  23959. let params = {
  23960. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23961. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23962. session_name: _uuid,
  23963. userId: _this.userid,
  23964. uid: _uuid,
  23965. file_ids: fileid.length ? [...fileid] : '',
  23966. model: 'gpt-4o-2024-08-06',
  23967. temperature: this.mode == 3 ? 0.5 : 0.1,
  23968. }
  23969. // let params = JSON.stringify({
  23970. // message: {
  23971. // anthropic_version: "bedrock-2023-05-31",
  23972. // max_tokens: 4096,
  23973. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23974. // top_p: 1,
  23975. // messages: [{
  23976. // "role": "user",
  23977. // "content": messages
  23978. // }] ,
  23979. // },
  23980. // uid: _uuid,
  23981. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23982. // });
  23983. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23984. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  23985. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23986. console.log(response);
  23987. // let data = response.data.FunctionResponse
  23988. // if (data.choices && data.choices.length && data.choices[0].message) {
  23989. // _this.courseText = data.choices[0].message.content
  23990. // }
  23991. console.log(response);
  23992. let data = response.data.FunctionResponse
  23993. // if (data.choices && data.choices.length && data.choices[0].message) {
  23994. // console.log(data.choices[0].message.content);
  23995. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  23996. // _this.$forceUpdate()
  23997. // }
  23998. if (data.message) {
  23999. console.log('返回回来的目标:',data.message);
  24000. _this.targetCourseText2 = data.message
  24001. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  24002. }
  24003. _this.isTargetCancelToken2 = null
  24004. }).catch(function (error) {
  24005. _this.targetTextLoading2 = false
  24006. _this.ttargetTextLoading2 = false
  24007. _this.isTargetCancelToken2 = null
  24008. if(error && error.message != 'Request canceled by the user.'){
  24009. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24010. }
  24011. console.log(error);
  24012. });
  24013. },
  24014. againEva(msg, i, k) {
  24015. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  24016. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  24017. return;
  24018. }
  24019. if (this.ruleLoading[i]) {
  24020. this.ruleLoading[i][k] = true
  24021. } else {
  24022. this.ruleLoading[i] = []
  24023. this.ruleLoading[i][k] = true
  24024. }
  24025. let message = `NOTICE
  24026. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  24027. Language: ${this.getLang()}
  24028. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24029. Instruction: Based on the context, follow "Format example", write content.
  24030. #Context
  24031. ##要求
  24032. ${msg}
  24033. ##制定标准资料
  24034. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  24035. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  24036. # Format example
  24037. ==
  24038. 0 星,作业内容与作业要求无关;
  24039. 1 星,没有识别问题和需求;
  24040. 2 星,问题或需求没有被清晰理解或准确识别;
  24041. 3 星,问题或需求的一部分被识别;
  24042. 4 星,问题或需求的大部分被识别;
  24043. 5 星,问题或需求都被识别。
  24044. ==
  24045. `
  24046. // let params = {
  24047. // // "model": "Chat",
  24048. // model: 'gpt-4o-2024-08-06',
  24049. // // model: "gpt-4o",
  24050. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24051. // max_tokens: 4096,
  24052. // top_p: 1,
  24053. // frequency_penalty: 0,
  24054. // presence_penalty: 0,
  24055. // messages: [
  24056. // {
  24057. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  24058. // role: "user"
  24059. // }
  24060. // ],
  24061. // stream: false,
  24062. // uid: this.userid,
  24063. // mind_map_question: ""
  24064. // };
  24065. // this.ajax
  24066. // .post("https://gpt4.cocorobo.cn/chat", params)
  24067. // .then(response => {
  24068. // let data = response.data.FunctionResponse;
  24069. // console.log("data", data);
  24070. // if (data.choices && data.choices.length && data.choices[0].message) {
  24071. // let content = data.choices[0].message.content;
  24072. // var regex = new RegExp('==([^=]+)==');
  24073. // let match = content.match(regex);
  24074. // if (match) {
  24075. // content = match[1].trim().replaceAll(' ', '');
  24076. // // 获取匹配到的内容并去除两端空格
  24077. // console.log('contentInsideDoubleEquals', content);
  24078. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24079. // console.log("未有星级。");
  24080. // this.againEva(msg, i, k)
  24081. // return
  24082. // }
  24083. // //  return
  24084. // } else {
  24085. // console.log("未找到匹配的内容。");
  24086. // this.againEva(msg, i, k)
  24087. // return
  24088. // }
  24089. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  24090. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24091. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24092. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  24093. // this.$forceUpdate();
  24094. // this.ruleLoading[i][k] = false
  24095. // }else{
  24096. // this.ruleLoading[i][k] = false
  24097. // }
  24098. // })
  24099. // .catch(error => {
  24100. // console.log(error);
  24101. // this.ruleLoading[i][k] = false
  24102. // });
  24103. let parm = {
  24104. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24105. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  24106. session_name: uuidv4(),
  24107. userId: this.userid,
  24108. file_ids: [],
  24109. model: 'gpt-4o-2024-08-06',
  24110. temperature: this.mode == 3 ? 0.5 : 0.1,
  24111. }
  24112. this.ajax
  24113. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  24114. .then(async (response) => {
  24115. console.log(response);
  24116. let data = response.data.FunctionResponse
  24117. if (data.message) {
  24118. console.log(data.message);
  24119. let content = data.message;
  24120. var regex = new RegExp('==([^=]+)==');
  24121. let match = content.match(regex);
  24122. if (match) {
  24123. content = match[1].trim().replaceAll(' ', '');
  24124. // 获取匹配到的内容并去除两端空格
  24125. console.log('contentInsideDoubleEquals', content);
  24126. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24127. console.log("未有星级。");
  24128. this.againEva(msg, i, k)
  24129. return
  24130. }
  24131. //  return
  24132. } else {
  24133. console.log("未找到匹配的内容。");
  24134. this.againEva(msg, i, k)
  24135. return
  24136. }
  24137. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  24138. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24139. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24140. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  24141. this.$forceUpdate();
  24142. this.ruleLoading[i][k] = false
  24143. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  24144. }else {
  24145. this.ruleLoading[i][k] = false
  24146. }
  24147. })
  24148. .catch((error) => {
  24149. this.ruleLoading[i][k] = false
  24150. console.log(error);
  24151. });
  24152. },
  24153. async aiSearchFile(messages, callback) {
  24154. let _this = this
  24155. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  24156. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24157. console.log('fileid=========',fileid)
  24158. // let params = JSON.stringify({
  24159. // // "model": "Chat",
  24160. // model: 'gpt-3.5-turbo',
  24161. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24162. // max_tokens: 4096,
  24163. // top_p: 1,
  24164. // frequency_penalty: 0,
  24165. // presence_penalty: 0,
  24166. // messages: [{
  24167. // content: messages,
  24168. // role: 'user'
  24169. // }],
  24170. // stream: false,
  24171. // uid: this.userid,
  24172. // mind_map_question: "",
  24173. // })
  24174. // // let params = JSON.stringify({
  24175. // // message: {
  24176. // // anthropic_version: "bedrock-2023-05-31",
  24177. // // max_tokens: 4096,
  24178. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  24179. // // top_p: 1,
  24180. // // messages: [{
  24181. // // content: messages,
  24182. // // role: 'user'
  24183. // // }], //
  24184. // // },
  24185. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24186. // // });
  24187. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24188. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  24189. // console.log(response);
  24190. // let data = response.data.FunctionResponse
  24191. // if (data.choices && data.choices.length && data.choices[0].message) {
  24192. // console.log(data.choices[0].message.content);
  24193. // let dArray = JSON.parse(data.choices[0].message.content)
  24194. // _this.dArray = dArray
  24195. // _this.unitJson[0].chapterInfo[0].taskJson = []
  24196. // for (var i = 0; i < dArray.length; i++) {
  24197. // let _task = dArray[i]
  24198. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  24199. // task: _task.task,
  24200. // taskDetail: "",
  24201. // taskDetail2: _task.detail,
  24202. // taskDetail3: "",
  24203. // chapterData: [],
  24204. // toolText: "",
  24205. // toolChoose: [
  24206. // {
  24207. // tool: [],
  24208. // toolDetail: "",
  24209. // toolType: 0,
  24210. // askCount: 1,
  24211. // askTitle: "",
  24212. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24213. // },
  24214. // ],
  24215. // isShowTools: false,
  24216. // askCount: 1,
  24217. // isFold: 0,
  24218. // askTitle: "",
  24219. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24220. // checkJson: [{ checkCount: [], checkPerent: [] }],
  24221. // homeworkList: [],
  24222. // })
  24223. // }
  24224. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  24225. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  24226. // _this.$forceUpdate();
  24227. // }
  24228. // // if (data.result) {
  24229. // // console.log(data.result);
  24230. // // let dArray = JSON.parse(data.result)
  24231. // // _this.dArray = dArray
  24232. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  24233. // // for (var i = 0; i < dArray.length; i++) {
  24234. // // let _task = dArray[i]
  24235. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  24236. // // task: _task.task,
  24237. // // taskDetail: "",
  24238. // // taskDetail2: _task.detail,
  24239. // // taskDetail3: "",
  24240. // // chapterData: [],
  24241. // // toolText: "",
  24242. // // toolChoose: [
  24243. // // {
  24244. // // tool: [],
  24245. // // toolDetail: "",
  24246. // // toolType: 0,
  24247. // // askCount: 1,
  24248. // // askTitle: "",
  24249. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24250. // // },
  24251. // // ],
  24252. // // isShowTools: false,
  24253. // // askCount: 1,
  24254. // // isFold: 1,
  24255. // // askTitle: "",
  24256. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24257. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  24258. // // homeworkList: [],
  24259. // // })
  24260. // // }
  24261. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  24262. // // _this.$forceUpdate();
  24263. // // }
  24264. // callback ? callback() : ''
  24265. // }).catch(function (error) {
  24266. // _this.loading = false
  24267. // console.log(error);
  24268. // });
  24269. this.isFileCancelToken = this.ajax.setCancelSource();
  24270. let parm = {
  24271. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  24272. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24273. session_name: uuidv4(),
  24274. userId: this.userid,
  24275. file_ids: fileid.length ? [...fileid] : '',
  24276. model: 'gpt-4o-2024-08-06',
  24277. temperature: this.mode == 3 ? 0.5 : 0.1,
  24278. }
  24279. this.ajax
  24280. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  24281. .then((response) => {
  24282. console.log(response);
  24283. let data = response.data.FunctionResponse
  24284. if (data.message) {
  24285. console.log(data.message);
  24286. let dArray = []
  24287. try {
  24288. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  24289. let regex3 = new RegExp('(?<!")content(?!")','g')
  24290. //
  24291. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  24292. } catch (error) {
  24293. // callback ? callback() : ''
  24294. console.log("error_________________" + error);
  24295. try {
  24296. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  24297. let match = data.message.match(regex);
  24298. dArray = JSON.parse(match[0]);
  24299. } catch (error) {
  24300. // callback ? callback() : ''
  24301. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  24302. console.log("error_________________" + error);
  24303. _this.isFileCancelToken = null;
  24304. _this.aiSearchFile(messages, callback)
  24305. return
  24306. }
  24307. }
  24308. for(let i = 0; i < dArray.length; i++){
  24309. let content = dArray[i].content
  24310. let name = '参考资料'+(i+1)
  24311. let md = new MarkdownIt();
  24312. let _html = content ? md.render(content) : ''
  24313. setTimeout(()=>{
  24314. if(i == (dArray.length - 1)){
  24315. _this.generate2(name, _html, i, callback)
  24316. }else {
  24317. _this.generate2(name, _html, i)
  24318. }
  24319. }, 500 * i)
  24320. }
  24321. _this.isFileCancelToken = null
  24322. _this.$forceUpdate();
  24323. }
  24324. })
  24325. .catch((error) => {
  24326. callback ? callback() : ''
  24327. _this.isFileCancelToken = null
  24328. console.log(error);
  24329. });
  24330. },
  24331. async aiSearchFile2(messages, callback) {
  24332. let _this = this
  24333. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  24334. console.log('fileid=========',fileid)
  24335. this.isFileCancelToken = this.ajax.setCancelSource();
  24336. let parm = {
  24337. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24338. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24339. session_name: uuidv4(),
  24340. userId: this.userid,
  24341. file_ids: fileid.length ? [...fileid] : '',
  24342. model: 'gpt-4o-2024-08-06',
  24343. temperature: this.mode == 3 ? 0.5 : 0.1,
  24344. }
  24345. this.ajax
  24346. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  24347. .then((response) => {
  24348. console.log(response);
  24349. let data = response.data.FunctionResponse
  24350. if (data.message) {
  24351. console.log(data.message);
  24352. let content = data.message
  24353. let name = '参考资料'
  24354. let md = new MarkdownIt();
  24355. let _html = content ? md.render(content) : ''
  24356. _this.generate2(name, _html, 0, callback)
  24357. _this.isFileCancelToken = null
  24358. _this.$forceUpdate();
  24359. }
  24360. })
  24361. .catch((error) => {
  24362. callback ? callback() : ''
  24363. _this.isFileCancelToken = null
  24364. console.log(error);
  24365. });
  24366. },
  24367. createFileid(url) {
  24368. let _this = this
  24369. return new Promise((resolve, reject) => {
  24370. try {
  24371. _this.ajax
  24372. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  24373. url: url,
  24374. })
  24375. .then((res) => {
  24376. let _data = res.data.FunctionResponse;
  24377. if (_data.result && _data.result.id) {
  24378. resolve(_data.result.id)
  24379. }else {
  24380. resolve(1)
  24381. }
  24382. }).catch(function (error) {
  24383. resolve(1)
  24384. });
  24385. }catch (e){
  24386. resolve(1)
  24387. }
  24388. });
  24389. },
  24390. handleSwitchChange(string){
  24391. // let area = ''
  24392. // let text = ''
  24393. // if(string == 'aiteacherTextDetail'){
  24394. // area = '已有教案摘要'
  24395. // text = this.teacherCourseText
  24396. // }else if(string == 'aitargetTextDetail'){
  24397. // area = '课程目标'
  24398. // text = this.targetCourseText
  24399. // }else if(string == 'aiDetail'){
  24400. // area = '课程简要描述'
  24401. // text = this.courseText
  24402. // }else if(string == 'aitargetTextDetail2'){
  24403. // area = '课程目标'
  24404. // text = this.targetCourseText2
  24405. // }else if(string.indexOf('aiDetail1') != -1){
  24406. // let index = parseInt(string.split('aiDetail1-')[1])
  24407. // area = `任务${index+1}课程大纲`
  24408. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  24409. // }else if(string == 'aiCpote1'){
  24410. // area = '概念群'
  24411. // text = this.cpote.cpote1
  24412. // }else if(string == 'aiCpote2'){
  24413. // area = '问题链'
  24414. // text = this.cpote.cpote2
  24415. // }else if(string == 'aiCpote3'){
  24416. // area = '目标层'
  24417. // text = this.cpote.cpote3
  24418. // }else if(string == 'aiCpote4'){
  24419. // area = '任务簇'
  24420. // text = this.cpote.cpote4
  24421. // }else if(string.indexOf('teacherDetail2') != -1){
  24422. // let index = parseInt(string.split('teacherDetail2-')[1])
  24423. // area = `任务${index+1}教案`
  24424. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  24425. // }else if(string.indexOf('aiDetail2') != -1){
  24426. // let index = parseInt(string.split('aiDetail2-')[1])
  24427. // area = `任务${index+1}任务描述`
  24428. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  24429. // }else if(string.indexOf('aiDetail3') != -1){
  24430. // let index = parseInt(string.split('-')[1])
  24431. // let index2 = parseInt(string.split('-')[2])
  24432. // area = `任务${index+1}工具${index2+1}的工具描述`
  24433. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  24434. // }
  24435. // if(this.isQuote[string] && text){
  24436. // this.quoteArray.push({
  24437. // string,
  24438. // area,
  24439. // value: text
  24440. // })
  24441. // }
  24442. console.log(this.isQuote)
  24443. },
  24444. setIsQuote(string){
  24445. this.isQuote[string] = false
  24446. },
  24447. setEvaList(task, tool, elist){
  24448. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  24449. this.$forceUpdate()
  24450. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  24451. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  24452. }
  24453. },
  24454. closeRight(){
  24455. this.isDisplay = !this.isDisplay;
  24456. },
  24457. addCourseBehavior(type, _html) { // 保存行为操作
  24458. let params = [{
  24459. uid: this.userid,
  24460. courseId: '',
  24461. type: type,
  24462. content: _html,
  24463. }];
  24464. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  24465. if (res.data == 1) {
  24466. console.log('保存操作成功');
  24467. } else {
  24468. console.log('保存操作失败');
  24469. }
  24470. }).catch(e => {
  24471. console.log('保存操作失败');
  24472. console.log(e);
  24473. });
  24474. },
  24475. async useUrl(){
  24476. if(!this.knowFileids3.length){
  24477. this.$message.error('请选择要使用的检索资料')
  24478. return
  24479. }
  24480. let array = []
  24481. for(var i = 0; i < this.knowFileids3.length; i++){
  24482. let item = this.knowFileids3[i]
  24483. for(var j = 0; j < this.knowInfoData3.length; j++){
  24484. if(item == this.knowInfoData3[j].url){
  24485. let isExist = this.knowInfoData2.some(item => item.name === this.knowInfoData3[j].name);
  24486. if (!isExist) {
  24487. this.knowInfoData2.push(this.knowInfoData3[j]);
  24488. }
  24489. }
  24490. }
  24491. }
  24492. this.$nextTick(() => {
  24493. this.$refs.rightKnow.scrollTop = this.$refs.rightKnow.scrollHeight;
  24494. });
  24495. this.knowFileids3 = []
  24496. for (let i = 0; i < this.knowInfoData2.length; i++) {
  24497. if (!this.knowInfoData2[i].fileid) {
  24498. let fileid = await this.createFileid(this.knowInfoData2[i].url)
  24499. this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  24500. console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  24501. if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  24502. this.knowFileids2.push(fileid)
  24503. }
  24504. }
  24505. }
  24506. },
  24507. panFind(event) {
  24508. if(!this.findMatchingContentsFinish){
  24509. const { scrollTop, clientHeight, scrollHeight } = event.target;
  24510. // 判断是否触底
  24511. if (scrollTop + clientHeight >= scrollHeight - 5 && !this.knowInfoDataLoading) {
  24512. this.findMatchingContentsPage++
  24513. this.findMatchingContents(); // 调用下拉刷新方法
  24514. }
  24515. }
  24516. },
  24517. startFindMatchingContents(){
  24518. if(!this.searchFileName){
  24519. this.$message.error('请输入检索关键词')
  24520. return
  24521. }
  24522. if(this.knowInfoDataLoading){
  24523. this.$message.error('检索中请稍后')
  24524. return
  24525. }
  24526. this.findMatchingContentsFinish = false
  24527. this.findMatchingContentsPage = 1
  24528. this.knowInfoData3 = []
  24529. this.findMatchingContents(); // 调用下拉刷新方法
  24530. },
  24531. findMatchingContents(){
  24532. if(!this.searchFileName){
  24533. this.$message.error('请输入检索关键词')
  24534. return
  24535. }
  24536. if(this.knowInfoDataLoading){
  24537. this.$message.error('检索中请稍后')
  24538. return
  24539. }
  24540. let sub = []
  24541. if (this.courseTypeId.length) {
  24542. for (var i = 0; i < this.courseTypeId.length; i++) {
  24543. let _sid = this.courseTypeId[i]
  24544. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24545. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24546. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24547. }
  24548. }
  24549. }
  24550. }
  24551. this.knowInfoDataLoading = true
  24552. let params = {
  24553. type: sub.join(","),
  24554. string: this.searchFileName,
  24555. page: this.findMatchingContentsPage
  24556. };
  24557. let md = new MarkdownIt();
  24558. this.isfindMatchingContents = this.ajax.setCancelSource()
  24559. this.ajax.get(this.$store.state.api + 'findMatchingContentsPage', params, this.isfindMatchingContents).then(async res => {
  24560. console.log(res)
  24561. this.isfindMatchingContents = null
  24562. this.knowInfoDataLoading = false
  24563. if(res.data.length){
  24564. let files = []
  24565. // let knowFile = JSON.parse(JSON.stringify(this.knowFileids2))
  24566. for (var i = 0; i < res.data.length; i++) {
  24567. // files.push(await this.generateExport2(el.title, md.render(el.content)));
  24568. let el = res.data[i];
  24569. let url = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn' + el.file_url;
  24570. let extension = url.split('.').pop().toLowerCase();
  24571. let _type = 2; // 默认类型为2
  24572. // 定义文件类型数组
  24573. let imgA = ["png", "jpg", "jpeg", "bmp", "gif", "webp", "psd", "svg", "tiff"];
  24574. let fileA = ["PDF", "DOC", "DOCX", "DOCM", "DOTM", "DOTX", "PPTX", "PPSX", "PPT", "PPS", "PPTM", "POTM", "PPAM", "POTX", "PPSM", "XLSX", "XLS"];
  24575. 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"];
  24576. // 根据文件扩展名判断文件类型
  24577. if (fileA.includes(extension.toUpperCase())) {
  24578. _type = 3;
  24579. } else if (videoA.includes(extension.toUpperCase())) {
  24580. _type = 2;
  24581. } else if (imgA.includes(extension)) {
  24582. _type = 13;
  24583. } else {
  24584. _type = 12;
  24585. }
  24586. let isExist = this.knowInfoData3.some(item => item.name === el.title);
  24587. if (!isExist) {
  24588. // let fileid = await this.createFileid(url)
  24589. this.knowInfoData3.push({
  24590. name: el.title,
  24591. url: url,
  24592. uid: '',
  24593. type: _type,
  24594. fileid: '',
  24595. // fileid == 1 ? '' : fileid
  24596. });
  24597. // if(fileid != 1){
  24598. // this.knowFileids2.push(fileid)
  24599. // }
  24600. }
  24601. }
  24602. // for (let i = 0; i < this.knowInfoData3.length; i++) {
  24603. // if (!this.knowInfoData2[i].fileid) {
  24604. // let fileid = await this.createFileid(this.knowInfoData2[i].url)
  24605. // this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  24606. // console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  24607. // if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  24608. // this.knowFileids2.push(fileid)
  24609. // }
  24610. // }
  24611. // }
  24612. // let data = {
  24613. // target:{
  24614. // files: files
  24615. // }
  24616. // }
  24617. // console.log(data)
  24618. // this.beforeUploadInfo2(data, 20)
  24619. }else{
  24620. if(this.findMatchingContentsPage == 1){
  24621. this.$message.error('未检索出内容')
  24622. }else {
  24623. this.findMatchingContentsFinish = true
  24624. }
  24625. }
  24626. }).catch(e => {
  24627. console.log('查询失败');
  24628. this.isfindMatchingContents = null
  24629. this.knowInfoDataLoading = false
  24630. console.log(e);
  24631. });
  24632. }
  24633. },
  24634. beforeDestroy() {
  24635. // clearTimeout(this.timer);
  24636. // this.timer = null;
  24637. // clearInterval(this.timer2);
  24638. // this.timer2 = null;
  24639. clearInterval(this.pasteTimer);
  24640. this.pasteTimer = null;
  24641. },
  24642. beforeRouteLeave(to, from, next) {
  24643. // clearTimeout(this.timer);
  24644. // this.timer = null;
  24645. // clearInterval(this.timer2);
  24646. // this.timer2 = null;
  24647. clearInterval(this.pasteTimer);
  24648. this.pasteTimer = null;
  24649. next();
  24650. },
  24651. mounted(){
  24652. let _this = this
  24653. // 监听浏览器后退或者刷新等离开页面的操作
  24654. window.onbeforeunload = function(event) {
  24655. // 检查是否有未保存的更改
  24656. const message = "你有未保存的更改,确定要离开吗?";
  24657. // 现代浏览器通常会显示一个默认的提示信息,不能完全自定义提示内容
  24658. event.returnValue = message; // 兼容大部分浏览器
  24659. console.log(message)
  24660. return message; // 兼容部分浏览器
  24661. };
  24662. const resizable = this.$el.querySelector('.resizable');
  24663. const resizer = this.$el.querySelector('.resizer');
  24664. const maxWidth = document.body.offsetWidth / 2;
  24665. const maxWidth2 = window.innerWidth / 2;
  24666. let startX, startWidth;
  24667. const mouseMoveHandler = (e) => {
  24668. e.preventDefault(); // 添加此行以防止选中其他文本
  24669. const dx = startX - e.clientX;
  24670. const newWidth = startWidth + dx;
  24671. if (newWidth >= 350 && newWidth <= maxWidth) {
  24672. resizable.style.minWidth = `${newWidth}px`;
  24673. }
  24674. };
  24675. const mouseUpHandler = () => {
  24676. document.removeEventListener('mousemove', mouseMoveHandler);
  24677. document.removeEventListener('mouseup', mouseUpHandler);
  24678. document.body.style.cursor = 'default';
  24679. };
  24680. const mouseDownHandler = (e) => {
  24681. e.preventDefault(); // 添加此行以防止选中其他文本
  24682. startX = e.clientX;
  24683. startWidth = resizable.getBoundingClientRect().width;
  24684. document.addEventListener('mousemove', mouseMoveHandler);
  24685. document.addEventListener('mouseup', mouseUpHandler);
  24686. document.body.style.cursor = 'ew-resize';
  24687. };
  24688. resizer.addEventListener('mousedown', mouseDownHandler);
  24689. const touchMoveHandler = (e) => {
  24690. e.preventDefault(); // 添加此行以防止选中其他文本
  24691. const dx = startX - e.touches[0].clientX;
  24692. const newWidth = startWidth + dx;
  24693. if (newWidth >= 350 && newWidth <= maxWidth2) {
  24694. resizable.style.minWidth = `${newWidth}px`;
  24695. }
  24696. };
  24697. const touchEndHandler = () => {
  24698. document.removeEventListener('touchmove', touchMoveHandler);
  24699. document.removeEventListener('touchend', touchEndHandler);
  24700. document.body.style.cursor = 'default';
  24701. };
  24702. const touchStartHandler = (e) => {
  24703. e.preventDefault(); // 添加此行以防止选中其他文本
  24704. startX = e.touches[0].clientX;
  24705. startWidth = resizable.getBoundingClientRect().width;
  24706. document.addEventListener('touchmove', touchMoveHandler);
  24707. document.addEventListener('touchend', touchEndHandler);
  24708. document.body.style.cursor = 'ew-resize';
  24709. };
  24710. resizer.addEventListener('touchstart', touchStartHandler);
  24711. },
  24712. created() {
  24713. this.selectFileid();
  24714. // this.selectAiFileid();
  24715. this.selectKnowFileid();
  24716. this.getStudent();
  24717. this.getTeacher();
  24718. this.getClass();
  24719. this.selectGrage();
  24720. this.getTemplate();
  24721. this.getTipsTemplate();
  24722. // this.selectType();
  24723. this.selectEva();
  24724. if(this.istemplate == 1){
  24725. this.isOutline = true
  24726. this.isOutline2 = true
  24727. this.courseTextBool = true
  24728. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  24729. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  24730. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  24731. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  24732. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  24733. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  24734. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  24735. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  24736. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  24737. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  24738. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  24739. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  24740. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  24741. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  24742. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  24743. - 我们的课程主题可以如何与学生的实际生活联系起来?
  24744. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  24745. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  24746. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  24747. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  24748. - 学生个人最终要完成什么?学生小组最终要完成什么?
  24749. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  24750. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  24751. 讨论:<转文本内容>`
  24752. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  24753. }
  24754. this.loading = false;
  24755. // this.timer2 = setInterval(() => {
  24756. // this.selectEva();
  24757. // }, 5000);
  24758. // this.pasteTimer = setInterval(() => {
  24759. // this.getPaste();
  24760. // }, 1000);
  24761. this.pasteTimer = setInterval(() => {
  24762. this.getPaste2();
  24763. }, 500);
  24764. setTimeout(() => {
  24765. // this.selectAllType();
  24766. this.selectCourseDetail();
  24767. }, 500);
  24768. let _this = this;
  24769. window.pasteStage = function (json) {
  24770. _this.pasteStage(json);
  24771. };
  24772. window.pasteTask = function (json) {
  24773. _this.pasteTask(json);
  24774. };
  24775. },
  24776. };
  24777. </script>
  24778. <style scoped>
  24779. @media screen and (max-width: 1280px) {
  24780. .mbCss {
  24781. flex-direction: column !important;
  24782. }
  24783. .pjCss {
  24784. width: 100% !important;
  24785. }
  24786. .evaCss {
  24787. width: 100% !important;
  24788. margin-top: 10px;
  24789. }
  24790. }
  24791. .el-table>>>.even_row {
  24792. background-color: #f1f1f1 !important;
  24793. }
  24794. .dialog_diy>>>.el-dialog__header {
  24795. background: #3c3c3c !important;
  24796. padding: 15px 20px;
  24797. }
  24798. .dialog_diy>>>.el-dialog__title {
  24799. color: #fff;
  24800. }
  24801. .dialog_diy>>>.el-dialog__headerbtn {
  24802. top: 19px;
  24803. }
  24804. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  24805. color: #fff;
  24806. }
  24807. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  24808. color: #fff;
  24809. }
  24810. .dialog_diy>>>.el-dialog__body,
  24811. .dialog_diy>>>.el-dialog__footer {
  24812. background: #fafafa;
  24813. }
  24814. .dialog_diy3>>>.el-dialog__body,
  24815. .dialog_diy3>>>.el-dialog__footer {
  24816. background: #eee !important;
  24817. }
  24818. .dialog_diy3>>>.el-dialog__body {
  24819. padding: 20px 20px;
  24820. }
  24821. .dialog_diyStage>>>.el-dialog__body {
  24822. padding: 10px;
  24823. }
  24824. .source_diy>>>.el-dialog {
  24825. height: 100% !important;
  24826. margin: 0 auto !important;
  24827. }
  24828. .source_diy>>>.el-dialog__body {
  24829. height: calc(100% - 185px);
  24830. overflow: auto;
  24831. background: #e6eaf0;
  24832. }
  24833. .source_diy>>>.el-dialog__footer {
  24834. background: #e6eaf0 !important;
  24835. }
  24836. .left {
  24837. border-right: 1px solid rgb(60, 94, 143);
  24838. display: flex;
  24839. flex-direction: column;
  24840. align-items: center;
  24841. min-height: 600px;
  24842. width: 385px;
  24843. height: 80%;
  24844. }
  24845. .tips {
  24846. color: rgb(128, 128, 128);
  24847. font-size: 12px;
  24848. width: 270px;
  24849. margin: 40px;
  24850. }
  24851. .pb_content {
  24852. height: 100% !important;
  24853. /* margin: 0 20px 0 20px; */
  24854. }
  24855. .pb_content_body {
  24856. width: 100% !important;
  24857. height: 100%;
  24858. display: flex;
  24859. }
  24860. .info_solid {
  24861. width: 270px;
  24862. height: 30px;
  24863. border-left: 1px solid #bdbdbd;
  24864. margin: 10px 0px 10px 30px;
  24865. }
  24866. .info_steps {
  24867. width: 270px;
  24868. font-size: 0.875rem;
  24869. display: flex;
  24870. align-items: center;
  24871. }
  24872. .info_steps span:nth-child(1) {
  24873. width: 30px;
  24874. height: 30px;
  24875. background: rgba(0, 0, 0, 0.38);
  24876. display: block;
  24877. color: #fff;
  24878. border-radius: 40px;
  24879. text-align: center;
  24880. line-height: 30px;
  24881. }
  24882. .steps_active {
  24883. background: #3d67bc !important;
  24884. }
  24885. .info_steps span:nth-child(2) {
  24886. margin-left: 5px;
  24887. }
  24888. .right {
  24889. height: 100%;
  24890. width: 100%;
  24891. display: flex;
  24892. overflow: hidden;
  24893. flex-direction: column;
  24894. }
  24895. .leftBar{
  24896. width: 290px;
  24897. height: calc(100% - 50px);
  24898. overflow: auto;
  24899. border-radius: 5px;
  24900. margin: 25px auto;
  24901. box-sizing: border-box;
  24902. margin-right: 10px;
  24903. }
  24904. .leftBar2{
  24905. width: 400px;
  24906. min-width: 400px;
  24907. height: calc(100% - 50px);
  24908. overflow: auto;
  24909. border-radius: 5px;
  24910. margin: 25px auto;
  24911. box-sizing: border-box;
  24912. margin-right: 10px;
  24913. background: #fff;
  24914. padding: 5px;
  24915. border-radius: 5px;
  24916. }
  24917. .basic_box {
  24918. margin: 0 auto;
  24919. position: relative;
  24920. padding: 0 20px 0 20px;
  24921. }
  24922. .basic_box_success {
  24923. width: 100%;
  24924. min-height: 455px;
  24925. padding: 50px 0;
  24926. position: relative;
  24927. text-align: center;
  24928. border-bottom: 1px solid #bfbfbf;
  24929. box-sizing: border-box;
  24930. display: flex;
  24931. align-items: center;
  24932. flex-direction: column;
  24933. justify-content: center;
  24934. }
  24935. .info_title {
  24936. font-size: 1.5em;
  24937. margin-right: 25px;
  24938. /* margin: 20px 30px 20px 30px; */
  24939. }
  24940. .bInfo_title {
  24941. text-align: left;
  24942. margin: 10px 0;
  24943. }
  24944. .small_title {
  24945. font-size: 14px;
  24946. line-height: 40px;
  24947. }
  24948. .chapter_beizhu {
  24949. font-size: 12px;
  24950. font-weight: bold;
  24951. float: right;
  24952. color: rgb(128, 128, 128);
  24953. margin-top: 5px;
  24954. }
  24955. .chapter_uploadBox1 {
  24956. text-align: left;
  24957. background-color: rgb(242, 242, 242);
  24958. width: 100%;
  24959. height: 67px;
  24960. padding: 0px 15px;
  24961. border-radius: 8px;
  24962. overflow: hidden;
  24963. font-size: 16px;
  24964. box-sizing: border-box;
  24965. position: relative;
  24966. }
  24967. .chapter_add {
  24968. width: 100%;
  24969. height: 32px;
  24970. margin-top: 15px;
  24971. cursor: pointer;
  24972. }
  24973. .chapter_add_l {
  24974. margin-left: 5px;
  24975. width: 30px;
  24976. height: 30px;
  24977. float: left;
  24978. border: 1px solid #aaa;
  24979. color: #aaa;
  24980. border-radius: 50%;
  24981. font-size: 25px;
  24982. text-align: center;
  24983. }
  24984. .chapter_add_r {
  24985. font-size: 18px;
  24986. height: 40px;
  24987. line-height: 30px;
  24988. text-indent: 10px;
  24989. color: #aaa;
  24990. }
  24991. .chapter_add_r span {
  24992. font-size: 12px;
  24993. color: rgb(204, 204, 204);
  24994. }
  24995. .chapter_add_input {
  24996. display: none;
  24997. }
  24998. .line {
  24999. width: 85%;
  25000. margin: 0 auto;
  25001. border-top: 1px solid #e5e5e5;
  25002. margin-top: 20px;
  25003. }
  25004. .info_btnBox {
  25005. width: calc(100%);
  25006. display: flex;
  25007. justify-content: center;
  25008. height: 80px;
  25009. align-items: center;
  25010. background: #fff;
  25011. margin: 0 auto;
  25012. border-top: 2px solid rgb(228, 232, 237);
  25013. box-sizing: border-box;
  25014. }
  25015. .info_btnBox2 {
  25016. width: calc(100%);
  25017. display: flex;
  25018. justify-content: center;
  25019. height: 20px;
  25020. align-items: center;
  25021. background: #fff;
  25022. margin: 0 auto;
  25023. border-top: 2px solid rgb(228, 232, 237);
  25024. box-sizing: border-box;
  25025. overflow: hidden;
  25026. cursor: pointer;
  25027. }
  25028. .info_btnBox3 {
  25029. width: calc(100%);
  25030. display: flex;
  25031. justify-content: flex-end;
  25032. padding: 0 20px;
  25033. height: 60px;
  25034. align-items: center;
  25035. background: unset;
  25036. margin: 0 auto;
  25037. /* border-top: 1px solid rgb(228, 232, 237); */
  25038. box-sizing: border-box;
  25039. overflow: hidden;
  25040. cursor: pointer;
  25041. background: #fff;
  25042. border-radius: 10px;
  25043. }
  25044. .info_btn+.info_btn {
  25045. margin-left: 15px;
  25046. }
  25047. .info_btn,
  25048. .teacherWord {
  25049. color: #fff;
  25050. background-color: #0f7eff;
  25051. padding: 8px 24px;
  25052. font-size: 0.9375rem;
  25053. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  25054. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  25055. min-width: 64px;
  25056. font-weight: 500;
  25057. border-radius: 4px;
  25058. box-sizing: border-box;
  25059. border: none;
  25060. cursor: pointer;
  25061. }
  25062. .teacherWord {
  25063. width: 105px !important;
  25064. text-align: center !important;
  25065. line-height: 36px !important;
  25066. padding: 0 !important;
  25067. font-size: 14px !important;
  25068. margin: 10px 0 !important;
  25069. }
  25070. .template_box {
  25071. display: flex;
  25072. flex-wrap: wrap;
  25073. }
  25074. .wordTeacher {
  25075. display: flex;
  25076. flex-direction: column;
  25077. width: 100px;
  25078. height: 100px;
  25079. text-align: center;
  25080. font-size: 13px;
  25081. margin: 0 20px 20px 0;
  25082. background: #f0f4fa;
  25083. position: relative;
  25084. border-radius: 5px;
  25085. align-items: center;
  25086. justify-content: center;
  25087. border: 1px solid #cad1dc;
  25088. color: #0e1e33;
  25089. /* padding: 25px 0px; */
  25090. cursor: pointer;
  25091. }
  25092. .wordTeacher::after {
  25093. content: "";
  25094. display: block;
  25095. position: absolute;
  25096. width: 15px;
  25097. height: 15px;
  25098. right: 10px;
  25099. top: 10px;
  25100. background-image: url(../../../assets/icon/new/choose_a.png);
  25101. background-size: 100% 100%;
  25102. }
  25103. .wordTeacherA::after {
  25104. background-image: url(../../../assets/icon/new/choose_b.png);
  25105. }
  25106. .wordTeacher:nth-child(5n) {
  25107. margin-right: 0px;
  25108. }
  25109. .wordPic {
  25110. margin: 0 auto;
  25111. width: 30px;
  25112. height: 30px;
  25113. cursor: pointer;
  25114. }
  25115. .deleteWord {
  25116. width: 22px;
  25117. height: 22px;
  25118. position: absolute;
  25119. right: 5px;
  25120. top: -15px;
  25121. cursor: pointer;
  25122. display: none;
  25123. z-index: 999;
  25124. }
  25125. .wordPic>img,
  25126. .deleteWord>img,
  25127. .addToolImg>img {
  25128. width: 100%;
  25129. height: 100%;
  25130. }
  25131. .info_btn:hover {
  25132. background-color: #4f7cd5 !important;
  25133. }
  25134. .cru_selectBox {
  25135. display: flex;
  25136. margin: 15px 0;
  25137. flex-wrap: nowrap;
  25138. white-space: nowrap;
  25139. overflow: auto;
  25140. position: relative;
  25141. height: 40px;
  25142. max-width: calc(100% - 175px);
  25143. }
  25144. .cru_selectBox::-webkit-scrollbar {
  25145. /*滚动条整体样式*/
  25146. width: 6px;
  25147. /*高宽分别对应横竖滚动条的尺寸*/
  25148. height: 6px;
  25149. }
  25150. /*定义滚动条轨道 内阴影+圆角*/
  25151. .cru_selectBox::-webkit-scrollbar-track {
  25152. border-radius: 10px;
  25153. background-color: #eee;
  25154. }
  25155. /*定义滑块 内阴影+圆角*/
  25156. .cru_selectBox::-webkit-scrollbar-thumb {
  25157. border-radius: 10px;
  25158. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  25159. background-color: rgba(0, 0, 0, 0.1);
  25160. }
  25161. .cru_line {
  25162. position: absolute;
  25163. bottom: 0px;
  25164. transition: all 0.5s;
  25165. left: 0px;
  25166. width: 50px;
  25167. height: 4px;
  25168. left: 10px;
  25169. border-radius: 2px;
  25170. background: #3681fc;
  25171. }
  25172. .cru_select {
  25173. font-size: 18px;
  25174. margin-right: 20px;
  25175. margin-left: 5px;
  25176. cursor: pointer;
  25177. color: #0e1e33;
  25178. }
  25179. .cru_select:hover {
  25180. color: #3681fc !important;
  25181. }
  25182. .cru_selected {
  25183. color: #3681fc !important;
  25184. font-weight: bold;
  25185. }
  25186. .chapter_box {
  25187. margin-top: 10px;
  25188. width: 100%;
  25189. padding: 10px 20px;
  25190. background: #fff;
  25191. border-radius: 8px;
  25192. box-sizing: border-box;
  25193. }
  25194. .chapter_contentbox {
  25195. display: flex;
  25196. align-items: center;
  25197. /* margin-top: 15px; */
  25198. }
  25199. .chapter_contentbox .cc_title {
  25200. margin: 0px;
  25201. color: black;
  25202. display: block;
  25203. white-space: nowrap;
  25204. overflow: hidden;
  25205. text-overflow: ellipsis;
  25206. margin-right: 20px;
  25207. font-size: 18px;
  25208. height: 20px;
  25209. line-height: 22px;
  25210. min-width: fit-content;
  25211. display: flex;
  25212. }
  25213. .chapter_contentbox .cc_title::before {
  25214. content: "";
  25215. height: 100%;
  25216. width: 3px;
  25217. background: #3681fc;
  25218. border-radius: 3px;
  25219. opacity: 1;
  25220. display: block;
  25221. margin-right: 10px;
  25222. }
  25223. .chapter_contentbox .cc_input {
  25224. width: 100%;
  25225. display: flex;
  25226. }
  25227. .show_taskD {
  25228. min-width: fit-content;
  25229. margin-left: 10px;
  25230. display: flex;
  25231. align-items: center;
  25232. font-size: 14px;
  25233. cursor: pointer;
  25234. color: #717c8d;
  25235. }
  25236. .show_taskD>img {
  25237. width: 15px;
  25238. margin-right: 5px;
  25239. transition: 0.2s all;
  25240. transform: rotate(-90deg);
  25241. }
  25242. .show_taskD.show>img {
  25243. transform: rotate(0deg);
  25244. }
  25245. .show_toolD {
  25246. min-width: fit-content;
  25247. margin-left: 10px;
  25248. display: flex;
  25249. align-items: center;
  25250. font-size: 14px;
  25251. cursor: pointer;
  25252. color: #717c8d;
  25253. /* position: absolute;
  25254. right: 45px;
  25255. top: 5px; */
  25256. }
  25257. .show_toolD>img {
  25258. width: 15px;
  25259. margin-right: 5px;
  25260. transition: 0.2s all;
  25261. transform: rotate(-90deg);
  25262. }
  25263. .show_toolD.show>img {
  25264. transform: rotate(0deg);
  25265. }
  25266. .remove {
  25267. background-image: url("../../../assets/icon/new/delete_u.png");
  25268. cursor: pointer;
  25269. opacity: 0.5;
  25270. width: 30px;
  25271. min-width: 30px;
  25272. height: 30px;
  25273. background-size: 100% 100%;
  25274. background-repeat: no-repeat;
  25275. margin-left: 10px;
  25276. }
  25277. .remove1 {
  25278. background-image: url("../../../assets/remove1.png");
  25279. background-repeat: no-repeat;
  25280. background-position: 5px 10px;
  25281. width: 40px;
  25282. height: 50px;
  25283. cursor: pointer;
  25284. margin-left: 10px;
  25285. }
  25286. .binfo_input {
  25287. width: 100%;
  25288. margin: 0;
  25289. padding: 12px 14px;
  25290. display: block;
  25291. min-width: 0;
  25292. outline: none;
  25293. box-sizing: border-box;
  25294. background: none;
  25295. border: none;
  25296. border-radius: 4px;
  25297. background: #fff;
  25298. font-size: 16px;
  25299. resize: none;
  25300. font-family: "Microsoft YaHei";
  25301. min-height: 48px;
  25302. /* border: 1px solid #3682fc00; */
  25303. border: 1.5px solid #cad1dc;
  25304. }
  25305. .binfo_textarea {
  25306. border: 1.5px solid #cad1dc;
  25307. font-size: 16px;
  25308. resize: none;
  25309. /* background: #f6f6f6; */
  25310. font-family: "Microsoft YaHei";
  25311. }
  25312. .binfo_input:focus-visible {
  25313. border: 1.5px solid #3681fc !important;
  25314. }
  25315. .time {
  25316. display: flex;
  25317. margin: 35px 0 80px 0;
  25318. }
  25319. .chapter_btnbox {
  25320. width: 160px;
  25321. border-radius: 5px;
  25322. border: 2px dashed gray;
  25323. display: flex;
  25324. padding: 8px 50px;
  25325. align-items: center;
  25326. justify-content: center;
  25327. margin: 30px auto 0;
  25328. cursor: pointer;
  25329. }
  25330. .icon_add {
  25331. position: relative;
  25332. width: 24px;
  25333. padding-top: 20px;
  25334. border-radius: 100%;
  25335. border-width: 2px;
  25336. border-style: solid;
  25337. border-color: gray;
  25338. }
  25339. .icon_add i:nth-child(1) {
  25340. position: absolute;
  25341. left: 50%;
  25342. top: 50%;
  25343. height: 60%;
  25344. transform: translate(-50%, -50%);
  25345. border-width: 1px;
  25346. border-style: solid;
  25347. border-color: inherit;
  25348. }
  25349. .icon_add i:nth-child(2) {
  25350. position: absolute;
  25351. top: 50%;
  25352. left: 50%;
  25353. width: 60%;
  25354. transform: translate(-50%, -50%);
  25355. border-width: 1px;
  25356. border-style: solid;
  25357. border-color: inherit;
  25358. }
  25359. .chapter_btn_w {
  25360. font-size: 0.9375rem;
  25361. font-weight: bold;
  25362. color: gray;
  25363. margin-left: 20px;
  25364. }
  25365. .disUoloadSty>>>.el-icon-plus {
  25366. display: none !important;
  25367. /* 上传按钮隐藏 */
  25368. }
  25369. .imgLeft {
  25370. margin: 15px 0;
  25371. }
  25372. .add_info_box {
  25373. margin: 0 0 0 auto;
  25374. display: flex;
  25375. flex-wrap: wrap;
  25376. }
  25377. .add_info_box button {
  25378. margin: 0 5px 10px 0;
  25379. }
  25380. .add_info_box2 {
  25381. display: flex;
  25382. align-items: center;
  25383. flex-wrap: wrap;
  25384. }
  25385. .add_info_box2::after {
  25386. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  25387. color: red;
  25388. font-size: 14px;
  25389. margin-bottom: 10px;
  25390. }
  25391. .add_chapters_box {
  25392. text-align: left;
  25393. background-color: #fff;
  25394. width: 100%;
  25395. border-radius: 4px;
  25396. font-size: 16px;
  25397. box-sizing: border-box;
  25398. position: relative;
  25399. padding: 0 15px;
  25400. height: auto;
  25401. overflow-y: auto;
  25402. overflow-x: hidden;
  25403. border: 1px solid #cad1dc;
  25404. }
  25405. .add_chapters_box.add_c_none {
  25406. display: flex;
  25407. justify-content: center;
  25408. align-items: center;
  25409. padding: 15px;
  25410. }
  25411. .add_c_none>img {
  25412. width: 25px;
  25413. }
  25414. .add_chapters_box.add_c_none>span {
  25415. font-size: 14px;
  25416. font-weight: 400;
  25417. margin: 0 0 5px 5px;
  25418. }
  25419. .homework_box {
  25420. display: flex;
  25421. align-items: flex-start;
  25422. flex-wrap: wrap;
  25423. margin: 15px 0 0 0;
  25424. flex-direction: column;
  25425. align-content: flex-start;
  25426. }
  25427. .course_homework {
  25428. display: flex;
  25429. justify-content: center;
  25430. flex-direction: row;
  25431. align-items: center;
  25432. margin: 0 10px 0 0;
  25433. }
  25434. .course_homework>>>.el-input__inner {
  25435. width: 140px;
  25436. margin-left: 15px;
  25437. }
  25438. .chapter_upload_move {
  25439. position: relative;
  25440. background-color: #fff;
  25441. position: absolute;
  25442. width: 100%;
  25443. top: 0px;
  25444. left: 0px;
  25445. border: 1px solid #eee;
  25446. border-radius: 5px;
  25447. transition: width 2s;
  25448. -moz-transition: width 2s;
  25449. -webkit-transition: width 2s;
  25450. -o-transition: width 2s;
  25451. }
  25452. .chapter_upload_l_i {
  25453. background-image: url("../../../assets/icon.png");
  25454. background-position: 3px -165px;
  25455. width: 30px;
  25456. height: 30px;
  25457. margin: 10px auto 0 auto;
  25458. }
  25459. .course_input_box {
  25460. display: flex;
  25461. margin-right: 20px;
  25462. min-width: 400px;
  25463. width: calc(100% - 350px);
  25464. align-items: center;
  25465. position: relative;
  25466. margin-bottom: 15px;
  25467. }
  25468. .course_input_box2 {
  25469. display: flex;
  25470. width: 100%;
  25471. align-items: center;
  25472. position: relative;
  25473. flex-wrap: wrap;
  25474. }
  25475. .course_input_box>.binfo_input {
  25476. width: calc(100%);
  25477. margin: 0;
  25478. border: 1.5px solid rgb(202, 209, 220);
  25479. border-radius: 5px;
  25480. font-weight: 600;
  25481. padding: 12px 14px 12px 71px;
  25482. }
  25483. .bb_courseIcon {
  25484. width: 57px;
  25485. height: 45px;
  25486. background: #f0f4fa;
  25487. border-radius: 5px 0px 0px 5px;
  25488. display: flex;
  25489. align-items: center;
  25490. justify-content: center;
  25491. border-right: 1.5px solid rgb(202, 209, 220);
  25492. box-sizing: border-box;
  25493. position: absolute;
  25494. left: 1.5px;
  25495. }
  25496. .bb_courseIcon>img {
  25497. width: 25px;
  25498. height: auto;
  25499. }
  25500. .big_box {
  25501. /* margin-top: 20px; */
  25502. display: flex;
  25503. justify-content: space-between;
  25504. /* border-bottom: 1px solid #E0E2ED; */
  25505. }
  25506. .left_first {
  25507. display: flex;
  25508. flex-direction: column;
  25509. flex-wrap: nowrap;
  25510. width: calc(100% - 310px);
  25511. padding: 20px;
  25512. box-sizing: border-box;
  25513. background: #fff;
  25514. border-radius: 5px;
  25515. }
  25516. .right_first {
  25517. width: 300px;
  25518. display: flex;
  25519. align-items: center;
  25520. justify-content: center;
  25521. /* border-left: 1px solid #E0E2ED; */
  25522. box-sizing: border-box;
  25523. padding: 20px;
  25524. flex-direction: column;
  25525. background: #fff;
  25526. border-radius: 5px;
  25527. }
  25528. .ai_box {
  25529. width: 204px;
  25530. display: flex;
  25531. justify-content: flex-end;
  25532. margin-bottom: 15px;
  25533. }
  25534. .ai_content {
  25535. display: flex;
  25536. align-items: center;
  25537. font-size: 14px;
  25538. padding: 7px 20px;
  25539. box-sizing: border-box;
  25540. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  25541. border-radius: 12px;
  25542. font-weight: 700;
  25543. cursor: pointer;
  25544. }
  25545. .ai_content>img {
  25546. width: 40px;
  25547. margin-right: 5px;
  25548. }
  25549. .c_info_title {
  25550. padding: 15px 0 15px 0;
  25551. font-size: 16px;
  25552. font-weight: bold;
  25553. margin: 0 0 0 20px;
  25554. box-sizing: border-box;
  25555. display: flex;
  25556. align-items: center;
  25557. line-height: 20px;
  25558. }
  25559. .c_info_title::before {
  25560. content: "";
  25561. display: block;
  25562. width: 3px;
  25563. height: 20px;
  25564. background: #0061ff;
  25565. border-radius: 3px;
  25566. margin: 0 5px 0 0;
  25567. }
  25568. .right_title {
  25569. height: 30px;
  25570. padding: 15px 0 15px 20px;
  25571. border-bottom: 1px solid #f2f2f2;
  25572. font-size: 1.5em;
  25573. font-weight: bold;
  25574. color: #0f7eff;
  25575. margin: 0 auto;
  25576. }
  25577. .people {
  25578. border: 1px solid rgb(229 229 229);
  25579. /* height: 495px; */
  25580. height: 350px;
  25581. border-radius: 5px;
  25582. width: 100%;
  25583. overflow: auto;
  25584. }
  25585. .people_top {
  25586. display: flex;
  25587. width: 100%;
  25588. /* justify-content: space-between; */
  25589. /* align-items: center; */
  25590. flex-direction: column;
  25591. padding: 10px 10px 0;
  25592. box-sizing: border-box;
  25593. }
  25594. .people_nav,
  25595. .people_top_right {
  25596. /* padding: 20px 0 0 20px; */
  25597. }
  25598. .people_top_right {
  25599. height: 40px;
  25600. margin-bottom: 10px;
  25601. }
  25602. .people_search {
  25603. display: flex;
  25604. position: relative;
  25605. }
  25606. .people_search>>>.el-input__inner {
  25607. /* height: 25px; */
  25608. width: 100%;
  25609. }
  25610. .search_img {
  25611. width: 20px;
  25612. height: 20px;
  25613. position: absolute;
  25614. right: 10px;
  25615. top: 50%;
  25616. transform: translateY(-50%);
  25617. }
  25618. .search_img>img {
  25619. width: 100%;
  25620. height: 100%;
  25621. }
  25622. .people_name {
  25623. display: flex;
  25624. justify-content: flex-start;
  25625. padding: 20px 10px;
  25626. flex-direction: column;
  25627. flex-wrap: wrap;
  25628. }
  25629. .p_box {
  25630. position: relative;
  25631. }
  25632. .people_name>>>.el-checkbox {
  25633. width: 100%;
  25634. display: flex;
  25635. align-items: center;
  25636. margin-bottom: 10px;
  25637. }
  25638. .people_name>>>.el-checkbox__label {
  25639. text-overflow: ellipsis;
  25640. overflow: hidden;
  25641. width: calc(100%);
  25642. }
  25643. .people_name2>>>.el-checkbox__label {
  25644. width: calc(100% - 130px);
  25645. }
  25646. .inviteCode {
  25647. position: absolute;
  25648. right: 30px;
  25649. color: #237ade;
  25650. top: 0;
  25651. cursor: pointer;
  25652. font-size: 13px;
  25653. }
  25654. .noneInvite {
  25655. color: #a8a8a8;
  25656. }
  25657. .inviteImg {
  25658. position: absolute;
  25659. right: 5px;
  25660. top: 0;
  25661. width: 20px;
  25662. }
  25663. .right_img {
  25664. width: 150px;
  25665. height: 150px;
  25666. margin: 0 auto;
  25667. }
  25668. .right_img>img {
  25669. width: 100%;
  25670. height: 100%;
  25671. }
  25672. .number {
  25673. margin-top: 20px;
  25674. color: #4aa6ff;
  25675. text-decoration: underline;
  25676. }
  25677. .success_button {
  25678. display: flex;
  25679. text-align: center;
  25680. margin: 5% 0 auto;
  25681. flex-direction: row;
  25682. justify-content: center;
  25683. }
  25684. .look_course {
  25685. margin-right: 40px;
  25686. background: #3d67bc;
  25687. width: 200px;
  25688. height: 35px;
  25689. line-height: 35px;
  25690. color: #fff;
  25691. text-align: center;
  25692. font-size: 14px;
  25693. border-radius: 5px;
  25694. cursor: pointer;
  25695. }
  25696. .attend_others {
  25697. width: 250px;
  25698. background: #4fb13c;
  25699. height: 35px;
  25700. line-height: 35px;
  25701. color: #fff;
  25702. text-align: center;
  25703. font-size: 14px;
  25704. border-radius: 5px;
  25705. cursor: pointer;
  25706. }
  25707. .dialog_diy2>>>.el-dialog__body {
  25708. text-align: center;
  25709. }
  25710. .write_togother {
  25711. position: absolute;
  25712. right: 45px;
  25713. display: flex;
  25714. top: 5%;
  25715. }
  25716. .write_people {
  25717. font-size: 14px;
  25718. line-height: 50px;
  25719. padding-right: 10px;
  25720. }
  25721. .end_write {
  25722. background: #3d67bc;
  25723. color: #fff;
  25724. width: 100px;
  25725. height: 35px;
  25726. line-height: 35px;
  25727. text-align: center;
  25728. font-size: 14px;
  25729. border-radius: 5px;
  25730. cursor: pointer;
  25731. }
  25732. .chapter_upload+.chapter_upload {
  25733. /* margin-top: 15px; */
  25734. border-top: 1px solid #e7ebf1;
  25735. }
  25736. .chapter_upload {
  25737. height: 45px;
  25738. position: relative;
  25739. display: flex;
  25740. align-items: center;
  25741. width: 100%;
  25742. min-height: 45px;
  25743. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  25744. /* border-radius: 4px; */
  25745. /* overflow: hidden; */
  25746. box-sizing: border-box;
  25747. }
  25748. .chapter_upload_drag {
  25749. position: absolute;
  25750. cursor: pointer;
  25751. width: 16px;
  25752. height: 16px;
  25753. left: -9px;
  25754. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  25755. background-size: 100% 100%;
  25756. z-index: 10;
  25757. display: none;
  25758. }
  25759. .isNavStage>.chapter_upload_drag {
  25760. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  25761. }
  25762. .chapter_upload_t {
  25763. background-color: #fff;
  25764. position: absolute;
  25765. height: 100%;
  25766. top: 0px;
  25767. left: 0px;
  25768. box-sizing: border-box;
  25769. }
  25770. .chapter_upload_o {
  25771. width: 100%;
  25772. height: 100%;
  25773. position: relative;
  25774. z-index: 1;
  25775. }
  25776. .chapter_upload_ic {
  25777. margin: 0 15px 0px auto;
  25778. display: flex;
  25779. align-items: center;
  25780. }
  25781. .chapter_upload_ic_l {
  25782. width: 50px;
  25783. height: 50px;
  25784. float: left;
  25785. }
  25786. .chapter_upload_ic_l div {
  25787. width: 30px;
  25788. height: 35px;
  25789. background: url("../../../assets/icon/icon.png");
  25790. }
  25791. .chapter_upload_ic_edit {
  25792. height: 100%;
  25793. display: flex;
  25794. align-items: center;
  25795. cursor: pointer;
  25796. margin: 0 10px 0 0;
  25797. }
  25798. .chapter_upload_ic_edit div {
  25799. width: 18px;
  25800. height: 18px;
  25801. background-image: url("../../../assets/icon/new/edit_u.png");
  25802. background-size: 100% 100%;
  25803. }
  25804. .chapter_upload_ic_check {
  25805. height: 100%;
  25806. display: flex;
  25807. align-items: center;
  25808. cursor: pointer;
  25809. margin: 0 10px 0 0;
  25810. }
  25811. .chapter_upload_ic_check div {
  25812. width: 18px;
  25813. height: 18px;
  25814. background-image: url("../../../assets/icon/course/lookeye.svg");
  25815. background-size: 100% 100%;
  25816. }
  25817. .chapter_upload_ic_r {
  25818. height: 100%;
  25819. display: flex;
  25820. align-items: center;
  25821. cursor: pointer;
  25822. }
  25823. .chapter_upload_ic_r div {
  25824. width: 18px;
  25825. height: 18px;
  25826. background-image: url("../../../assets/icon/new/delete_u.png");
  25827. background-size: 100% 100%;
  25828. }
  25829. .chapter_upload_n {
  25830. display: flex;
  25831. text-indent: 10px;
  25832. text-decoration: none;
  25833. text-overflow: ellipsis;
  25834. white-space: nowrap;
  25835. overflow: hidden;
  25836. width: 55%;
  25837. margin-left: 10px;
  25838. cursor: pointer;
  25839. margin-top: 2px;
  25840. align-items: center;
  25841. }
  25842. .chapter_upload_l_i2,
  25843. .chapter_upload_l_i3,
  25844. .chapter_upload_l_i8,
  25845. .chapter_upload_l_i6,
  25846. .chapter_upload_l_i12,
  25847. .chapter_upload_l_i14,
  25848. .chapter_upload_l_i13 {
  25849. width: 15px;
  25850. height: 15px;
  25851. background-size: 100% 100%;
  25852. }
  25853. .chapter_upload_l_i2 {
  25854. background-image: url("../../../assets/icon/new/u_word.png");
  25855. }
  25856. .chapter_upload_l_i3 {
  25857. background-image: url("../../../assets/icon/new/u_video.png");
  25858. }
  25859. .chapter_upload_l_i8 {
  25860. background-image: url("../../../assets/icon/new/u_url.png");
  25861. }
  25862. .chapter_upload_l_i14 {
  25863. background-image: url("../../../assets/icon/new/u_source.png");
  25864. }
  25865. .chapter_upload_l_i6 {
  25866. background-image: url("../../../assets/icon/new/u_picture.png");
  25867. }
  25868. .chapter_upload_l_i12 {
  25869. background-image: url("../../../assets/icon/new/u_word.png");
  25870. }
  25871. .chapter_upload_l_i13 {
  25872. background-image: url("../../../assets/icon/new/u_img.png");
  25873. }
  25874. .chapter_upload_noSee {
  25875. background-image: url("../../../assets/icon/new/u_noUpload.png");
  25876. width: 18px;
  25877. height: 18px;
  25878. background-size: 100% 100%;
  25879. display: block;
  25880. margin-right: 10px;
  25881. }
  25882. .chapter_upload_ud {
  25883. display: flex;
  25884. flex-direction: row;
  25885. justify-content: center;
  25886. margin: 0 10px 0 0;
  25887. }
  25888. .chapter_upload_ud>.chapter_upload_up {
  25889. margin-bottom: 0;
  25890. margin-right: 10px;
  25891. }
  25892. .chapter_upload_down,
  25893. .chapter_upload_up {
  25894. width: 20px;
  25895. height: 20px;
  25896. background: #e4eaf2;
  25897. cursor: pointer;
  25898. margin: 0 auto;
  25899. border-radius: 5px;
  25900. display: flex;
  25901. justify-content: center;
  25902. align-items: center;
  25903. }
  25904. .chapter_upload_up::after,
  25905. .chapter_upload_down::after {
  25906. content: "";
  25907. background-image: url("../../../assets/icon/new/downBtn.png");
  25908. width: 13px;
  25909. height: 13px;
  25910. background-size: 100% 100%;
  25911. display: block;
  25912. }
  25913. .chapter_upload_up::after {
  25914. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  25915. }
  25916. .chapter_upload_up {
  25917. margin-bottom: 5px;
  25918. }
  25919. .chapter_upload_ud2 {
  25920. display: flex;
  25921. flex-direction: row;
  25922. justify-content: center;
  25923. margin: 0 10px 0 0;
  25924. }
  25925. .chapter_upload_ud2>.chapter_upload_up2 {
  25926. margin-bottom: 0;
  25927. margin-right: 10px;
  25928. }
  25929. .chapter_upload_down2,
  25930. .chapter_upload_up2 {
  25931. cursor: pointer;
  25932. margin: 0 auto;
  25933. border-radius: 5px;
  25934. display: flex;
  25935. justify-content: center;
  25936. align-items: center;
  25937. color: #717c8d;
  25938. font-size: 14px;
  25939. }
  25940. .chapter_upload_up2 {
  25941. margin-right: 10px;
  25942. }
  25943. .chapter_upload_up2::before,
  25944. .chapter_upload_down2::before {
  25945. content: "";
  25946. background-image: url("../../../assets/icon/new/c_down.png");
  25947. width: 14px;
  25948. height: 14px;
  25949. background-size: 100% 100%;
  25950. display: block;
  25951. margin-right: 5px;
  25952. }
  25953. .chapter_upload_up2::before {
  25954. background-image: url("../../../assets/icon/new/c_up.png") !important;
  25955. }
  25956. .addWordStyle {
  25957. display: flex;
  25958. flex-direction: row;
  25959. justify-content: flex-start;
  25960. overflow-x: auto;
  25961. white-space: nowrap;
  25962. flex-wrap: wrap;
  25963. }
  25964. /* table 样式 */
  25965. .cont>>>table {
  25966. border-top: 1px solid #ccc;
  25967. border-left: 1px solid #ccc;
  25968. }
  25969. .cont>>>table td,
  25970. .cont>>>table th {
  25971. border-bottom: 1px solid #ccc;
  25972. border-right: 1px solid #ccc;
  25973. /* padding: 20px 5px; */
  25974. padding: 5px 10px;
  25975. max-width: 0px;
  25976. height: 30px;
  25977. vertical-align: baseline;
  25978. }
  25979. .cont>>>table th {
  25980. border-bottom: 2px solid #ccc;
  25981. text-align: center;
  25982. }
  25983. /* blockquote 样式 */
  25984. .cont>>>blockquote {
  25985. display: block;
  25986. border-left: 8px solid #d0e5f2;
  25987. padding: 5px 10px;
  25988. margin: 10px 0;
  25989. line-height: 1.4;
  25990. font-size: 100%;
  25991. background-color: #f1f1f1;
  25992. }
  25993. /* code 样式 */
  25994. .cont>>>code {
  25995. display: inline-block;
  25996. /* *display: inline; */
  25997. zoom: 1;
  25998. background-color: #f1f1f1;
  25999. border-radius: 3px;
  26000. padding: 3px 5px;
  26001. margin: 0 3px;
  26002. }
  26003. .cont>>>pre code {
  26004. display: block;
  26005. }
  26006. /* ul ol 样式 */
  26007. .cont>>>ul,
  26008. ol {
  26009. margin: 10px 0 10px 20px;
  26010. }
  26011. .wordbox {
  26012. display: flex;
  26013. flex-wrap: wrap;
  26014. cursor: pointer;
  26015. width: 100%;
  26016. }
  26017. .checkword {
  26018. width: 22px;
  26019. height: 22px;
  26020. margin: 10px auto 0;
  26021. cursor: pointer;
  26022. }
  26023. .checkword img {
  26024. width: 100%;
  26025. }
  26026. .stepBg {
  26027. display: flex;
  26028. justify-content: space-between;
  26029. align-items: center;
  26030. background: #fff;
  26031. width: calc(100%);
  26032. margin: 0 auto;
  26033. }
  26034. .stepBorder {
  26035. height: 3px !important;
  26036. background: #cad1dc;
  26037. width: 100px !important;
  26038. margin: 0 15px !important;
  26039. position: relative;
  26040. }
  26041. .border-active {
  26042. background: #3681fc !important;
  26043. }
  26044. .border-active::before,
  26045. .border-active::after {
  26046. border-color: #3681fc !important;
  26047. }
  26048. .stepBorder::before,
  26049. .stepBorder::after {
  26050. content: "";
  26051. width: 9px;
  26052. height: 9px;
  26053. background: #ffffff;
  26054. opacity: 1;
  26055. border: 2px solid #acb4bf;
  26056. display: block;
  26057. box-sizing: border-box;
  26058. border-radius: 50%;
  26059. position: absolute;
  26060. top: 50%;
  26061. transform: translateY(-50%);
  26062. }
  26063. .stepBorder::after {
  26064. right: -9px;
  26065. }
  26066. .stepTop {
  26067. width: 100%;
  26068. /* border-radius: 10px; */
  26069. display: flex;
  26070. justify-content: center;
  26071. align-items: center;
  26072. flex-wrap: nowrap;
  26073. background: #fff;
  26074. /* top: 18%; */
  26075. height: 80px;
  26076. border-bottom: 2px solid rgb(228, 232, 237);
  26077. box-sizing: border-box;
  26078. }
  26079. .stepTop2 {
  26080. width: 100%;
  26081. /* border-radius: 10px; */
  26082. display: flex;
  26083. justify-content: center;
  26084. align-items: center;
  26085. flex-wrap: nowrap;
  26086. background: #fff;
  26087. /* top: 18%; */
  26088. height: 20px;
  26089. border-bottom: 2px solid rgb(228, 232, 237);
  26090. box-sizing: border-box;
  26091. overflow: hidden;
  26092. cursor: pointer;
  26093. }
  26094. .stepTop>div img {
  26095. width: 100%;
  26096. }
  26097. .stepTop>div {
  26098. height: 50px;
  26099. width: 180px;
  26100. cursor: pointer;
  26101. margin: 10px 0;
  26102. border-radius: 10px;
  26103. }
  26104. .first,
  26105. .second,
  26106. .third,
  26107. .four {
  26108. background: #3681fc;
  26109. height: 90px;
  26110. color: #fff;
  26111. display: flex;
  26112. flex-direction: row;
  26113. align-items: center;
  26114. justify-content: center;
  26115. }
  26116. .first>div:nth-child(1),
  26117. .second>div:nth-child(1),
  26118. .third>div:nth-child(1),
  26119. .four>div:nth-child(1) {
  26120. margin: 5px 10px 0 0;
  26121. width: 2rem;
  26122. }
  26123. .firstNo,
  26124. .secondNo,
  26125. .thirdNo,
  26126. .fourNo {
  26127. background: #e7e7e7;
  26128. color: #adadad;
  26129. display: flex;
  26130. flex-direction: row;
  26131. align-items: center;
  26132. justify-content: center;
  26133. }
  26134. .firstNo>div:nth-child(1),
  26135. .secondNo>div:nth-child(1),
  26136. .thirdNo>div:nth-child(1),
  26137. .fourNo>div:nth-child(1) {
  26138. margin: 5px 10px 0 0;
  26139. width: 2rem;
  26140. }
  26141. .uploadWidth>>>.el-upload {
  26142. width: 60px;
  26143. height: 60px;
  26144. position: relative;
  26145. }
  26146. .addPeople {
  26147. background: #fa6060;
  26148. width: 150px;
  26149. height: 40px;
  26150. color: #fff;
  26151. border-radius: 5px;
  26152. text-align: center;
  26153. line-height: 40px;
  26154. font-size: 14px;
  26155. cursor: pointer;
  26156. }
  26157. .kcImg {
  26158. width: 60px;
  26159. margin-left: 10px;
  26160. }
  26161. .zyImg {
  26162. width: 55px;
  26163. margin: 0 10px;
  26164. }
  26165. .deleteZy {
  26166. width: 20px;
  26167. position: absolute;
  26168. top: 5px;
  26169. right: 5px;
  26170. cursor: pointer;
  26171. }
  26172. .kcImg>img,
  26173. .zyImg>img,
  26174. .deleteZy>img {
  26175. width: 100%;
  26176. height: 100%;
  26177. }
  26178. .zyBox {
  26179. display: flex;
  26180. flex-direction: row;
  26181. align-items: center;
  26182. background: #67d37d;
  26183. color: #fff;
  26184. width: 210px;
  26185. margin: 20px 20px 0 0;
  26186. border-radius: 10px;
  26187. height: 70px;
  26188. position: relative;
  26189. }
  26190. .upCss {
  26191. display: flex;
  26192. flex-direction: row;
  26193. justify-content: flex-start;
  26194. }
  26195. .upCss>>>.el-icon-plus {
  26196. position: none !important;
  26197. width: 200px;
  26198. height: 100px;
  26199. display: flex;
  26200. flex-wrap: nowrap;
  26201. flex-direction: column;
  26202. align-items: center;
  26203. justify-content: center;
  26204. border: 1px dashed #ccc;
  26205. min-width: 78px;
  26206. min-height: 100px;
  26207. z-index: 999;
  26208. }
  26209. .upCss>>>.el-upload-list__item-name {
  26210. width: 100px;
  26211. white-space: nowrap;
  26212. overflow: hidden;
  26213. text-overflow: ellipsis;
  26214. }
  26215. .upCss>>>.el-upload-list__item .el-icon-close {
  26216. font-size: 20px;
  26217. z-index: 9999;
  26218. }
  26219. .addStageImg {
  26220. min-width: 20px;
  26221. min-height: 20px;
  26222. width: 20px;
  26223. height: 20px;
  26224. cursor: pointer;
  26225. }
  26226. .addHW {
  26227. width: 28px;
  26228. height: 28px;
  26229. cursor: pointer;
  26230. }
  26231. .addStageImg>img,
  26232. .addHW>img {
  26233. width: 100%;
  26234. height: 100%;
  26235. }
  26236. .addNewPP>>>.el-dialog__body {
  26237. padding: 5px 20px;
  26238. }
  26239. .addNewPP>>>.el-dialog {
  26240. margin-top: 5vh !important;
  26241. }
  26242. .addNewPP2>>>.el-dialog__body {
  26243. padding: 5px 0;
  26244. }
  26245. .addNewPP2>>>.el-dialog {
  26246. margin-top: 5vh !important;
  26247. }
  26248. .isHeight {
  26249. height: 680px;
  26250. }
  26251. .toolChoose {
  26252. display: flex;
  26253. /* width: 100%; */
  26254. flex-direction: row;
  26255. flex-wrap: wrap;
  26256. }
  26257. .tool,
  26258. .isToolChoose {
  26259. display: flex;
  26260. flex-direction: column;
  26261. flex-wrap: nowrap;
  26262. width: fit-content;
  26263. margin: 10px 0 10px 0;
  26264. align-items: center;
  26265. border: 2px solid #dbdbdb00;
  26266. padding: 10px 20px;
  26267. border-radius: 5px;
  26268. cursor: pointer;
  26269. /* box-shadow: 0 0 2px 0px #dedede; */
  26270. position: relative;
  26271. box-sizing: border-box;
  26272. }
  26273. .tool:hover {
  26274. border: 2px solid #a5c7ff;
  26275. }
  26276. .tool:hover>.noCTool {
  26277. display: block;
  26278. opacity: 0.5;
  26279. }
  26280. .isToolChoose {
  26281. border: 2px solid #438aff !important;
  26282. box-shadow: 0 0 2px 0px #438aff;
  26283. opacity: 1 !important;
  26284. }
  26285. .isCTool,
  26286. .noCTool {
  26287. width: 30px;
  26288. height: 30px;
  26289. position: absolute;
  26290. top: -4px;
  26291. right: -4px;
  26292. }
  26293. .noCTool {
  26294. display: none;
  26295. }
  26296. .isCTool>img,
  26297. .noCTool>img {
  26298. width: 100%;
  26299. height: 100%;
  26300. }
  26301. .tool+.tool {
  26302. margin-right: 10px;
  26303. }
  26304. .whiteBIcon {
  26305. width: 60px;
  26306. cursor: pointer;
  26307. display: flex;
  26308. flex-direction: column;
  26309. flex-wrap: nowrap;
  26310. align-items: center;
  26311. font-size: 14px;
  26312. }
  26313. .whiteBIcon>img,
  26314. .toolIcon>img,
  26315. .arrow>img {
  26316. width: 100%;
  26317. height: 100%;
  26318. }
  26319. .check img {
  26320. width: 20px;
  26321. height: 20px;
  26322. }
  26323. .whiteBIcon>img {
  26324. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  26325. border-radius: 15px;
  26326. }
  26327. .whiteBIcon>div:nth-child(2) {
  26328. height: 20px;
  26329. line-height: 20px;
  26330. text-align: center;
  26331. }
  26332. .check {
  26333. /* width: 20px;
  26334. height: 20px; */
  26335. cursor: pointer;
  26336. margin: 10px 0 0;
  26337. }
  26338. .checkDiv {
  26339. display: flex;
  26340. align-items: center;
  26341. }
  26342. .checkDiv span {
  26343. margin-left: 5px;
  26344. color: #858585;
  26345. }
  26346. .customWidth>>>.el-dialog {
  26347. min-width: 600px !important;
  26348. }
  26349. .CollaborativeCss {
  26350. width: 100%;
  26351. display: flex;
  26352. justify-content: center;
  26353. align-items: center;
  26354. box-sizing: border-box;
  26355. padding: 10px 0;
  26356. cursor: pointer;
  26357. }
  26358. .CollaborativeCss >>> .el-tooltip {
  26359. overflow: hidden;
  26360. white-space: nowrap;
  26361. text-overflow: ellipsis;
  26362. }
  26363. .CollaborativeCss2 {
  26364. background: #e0eafb;
  26365. color: #3681fc;
  26366. font-weight: 700;
  26367. border-radius: 5px;
  26368. }
  26369. .a_addBox {
  26370. margin: 10px 0;
  26371. background: #fff;
  26372. padding: 15px;
  26373. /* max-height: 600px; */
  26374. overflow: auto;
  26375. }
  26376. .a_add_box {
  26377. border-bottom: 2px solid #eee;
  26378. padding-bottom: 25px;
  26379. }
  26380. .a_add_head {
  26381. display: flex;
  26382. align-items: center;
  26383. justify-content: space-between;
  26384. margin: 10px 0 0 0;
  26385. font-size: 18px;
  26386. }
  26387. .a_add_checkType {
  26388. margin-top: 10px;
  26389. display: flex;
  26390. font-size: 14px;
  26391. align-items: center;
  26392. }
  26393. .a_add_checkType span {
  26394. box-sizing: border-box;
  26395. padding: 0 0 5px 0;
  26396. cursor: pointer;
  26397. }
  26398. .a_add_checkType span+span {
  26399. margin-left: 10px;
  26400. }
  26401. .a_add_checkType .active {
  26402. border-bottom: 2px solid #409eff;
  26403. color: #409eff;
  26404. }
  26405. .a_add_head .a_add_head_input {
  26406. /* width: 540px; */
  26407. width: 100%;
  26408. }
  26409. .a_add_head .a_add_head_div {
  26410. display: flex;
  26411. align-items: center;
  26412. justify-content: space-between;
  26413. }
  26414. .a_add_body {
  26415. display: flex;
  26416. /* align-items: center; */
  26417. align-items: flex-end;
  26418. }
  26419. .a_add_input {
  26420. display: flex;
  26421. align-items: center;
  26422. flex-wrap: wrap;
  26423. }
  26424. .a_add_input_choice {
  26425. flex-direction: column;
  26426. margin-right: 10px;
  26427. }
  26428. .a_add_input_choice>>>.el-radio {
  26429. display: flex;
  26430. align-items: center;
  26431. flex-direction: row-reverse;
  26432. margin: 30px 0 0 0;
  26433. position: relative;
  26434. }
  26435. .a_add_input_choice>>>.el-checkbox {
  26436. display: flex;
  26437. align-items: center;
  26438. flex-direction: row-reverse;
  26439. margin: 30px 0 0 0;
  26440. position: relative;
  26441. }
  26442. .width100 {
  26443. width: 100%;
  26444. }
  26445. .a_add_input .a_add_persent {
  26446. width: 100%;
  26447. }
  26448. .a_add_persent_div {
  26449. width: 100%;
  26450. display: flex;
  26451. align-items: center;
  26452. }
  26453. .a_add_persent_div span {
  26454. margin: 5px 0;
  26455. }
  26456. .a_add_persent_div span:nth-child(1) {
  26457. width: 30%;
  26458. }
  26459. .a_add_persent_div span:nth-child(2) {
  26460. width: 7%;
  26461. }
  26462. .a_add_persent_div span:nth-child(3) {
  26463. width: 40%;
  26464. }
  26465. .a_add_body_div {
  26466. display: flex;
  26467. align-items: center;
  26468. justify-content: center;
  26469. /* flex-direction: column; */
  26470. position: absolute;
  26471. right: -20px;
  26472. transform: translateX(100%);
  26473. }
  26474. .a_add_body_div>>>.el-button--primary {
  26475. background: #466b99;
  26476. border: none;
  26477. }
  26478. .all_choose {
  26479. display: flex;
  26480. flex-direction: row;
  26481. align-items: flex-start;
  26482. width: 100%;
  26483. }
  26484. .all_choose+.all_choose {
  26485. /* margin-top: 10px */
  26486. }
  26487. .all_choose>span {
  26488. min-width: fit-content;
  26489. display: block;
  26490. white-space: nowrap;
  26491. overflow: hidden;
  26492. text-overflow: ellipsis;
  26493. margin-right: 20px;
  26494. font-weight: bold;
  26495. font-size: 14px;
  26496. }
  26497. .all_choose>>>.el-checkbox-group {
  26498. display: flex;
  26499. flex-direction: row;
  26500. width: 100%;
  26501. flex-wrap: wrap;
  26502. align-content: center;
  26503. justify-content: flex-start;
  26504. align-items: center;
  26505. margin-top: 3px;
  26506. }
  26507. .all_choose>.el-checkbox-group>>>.el-checkbox {
  26508. margin-bottom: 10px;
  26509. display: flex;
  26510. flex-direction: row;
  26511. align-items: center;
  26512. margin-right: 10px;
  26513. }
  26514. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  26515. min-width: 80px;
  26516. overflow: hidden;
  26517. width: 80px;
  26518. text-overflow: ellipsis;
  26519. white-space: nowrap;
  26520. }
  26521. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  26522. width: auto;
  26523. }
  26524. .choose>div:nth-child(3)>span {
  26525. /* letter-spacing: 0 !important; */
  26526. }
  26527. .choose {
  26528. display: flex;
  26529. flex-direction: column;
  26530. flex-wrap: nowrap;
  26531. height: 100%;
  26532. justify-content: space-evenly;
  26533. align-items: flex-start;
  26534. }
  26535. .both {
  26536. display: flex;
  26537. flex-direction: row;
  26538. flex-wrap: wrap;
  26539. width: 100%;
  26540. align-items: center;
  26541. justify-content: flex-start;
  26542. margin: 0 0 15px;
  26543. }
  26544. .notice>>>.el-dialog {
  26545. width: 500px !important;
  26546. text-align: center;
  26547. }
  26548. .notice>>>.el-button {
  26549. margin-top: 20px;
  26550. }
  26551. .whiteBg {
  26552. /* background: #fff; */
  26553. border-radius: 10px;
  26554. }
  26555. .wb_j_box {
  26556. display: flex;
  26557. width: 100%;
  26558. padding: 0 20px 0;
  26559. box-sizing: border-box;
  26560. }
  26561. .wb_j_box_content {
  26562. width: calc(100% - 55% - 100px);
  26563. display: flex;
  26564. align-items: center;
  26565. }
  26566. .wb_j_box_p_box {
  26567. max-width: calc(100% - 200px);
  26568. word-break: break-all;
  26569. overflow: hidden;
  26570. margin: 0 0 0 10px;
  26571. font-size: 14px;
  26572. color: #6e6e6e;
  26573. z-index: 999;
  26574. }
  26575. .chooseWho {
  26576. display: flex;
  26577. width: 410px;
  26578. flex-direction: row;
  26579. flex-wrap: nowrap;
  26580. justify-content: space-between;
  26581. padding-bottom: 10px;
  26582. }
  26583. .chooseWho>div {
  26584. cursor: pointer;
  26585. padding-bottom: 10px;
  26586. font-weight: bold;
  26587. }
  26588. .isChooseActive {
  26589. color: #3e88f4;
  26590. border-bottom: 2px solid #2f80f3;
  26591. }
  26592. .toolSort {
  26593. display: flex;
  26594. flex-direction: row;
  26595. flex-wrap: wrap;
  26596. justify-content: flex-start;
  26597. align-items: flex-start;
  26598. }
  26599. .toolSort>div {
  26600. margin-right: 10px;
  26601. }
  26602. .tools {
  26603. width: 100%;
  26604. display: flex;
  26605. flex-direction: column;
  26606. flex-wrap: nowrap;
  26607. align-items: flex-start;
  26608. }
  26609. .leftTools,
  26610. .rightTools {
  26611. width: 50%;
  26612. }
  26613. .leftTools+.leftTools {
  26614. border-top: 1px solid #dbdbdb;
  26615. padding-top: 30px;
  26616. }
  26617. .rightTools {
  26618. display: flex;
  26619. flex-direction: row;
  26620. flex-wrap: nowrap;
  26621. justify-content: space-around;
  26622. }
  26623. .firstToolList {
  26624. display: flex;
  26625. flex-direction: column;
  26626. flex-wrap: nowrap;
  26627. align-items: center;
  26628. }
  26629. .iconList {
  26630. display: flex;
  26631. flex-direction: row;
  26632. flex-wrap: wrap;
  26633. justify-content: flex-start;
  26634. align-items: center;
  26635. margin: 20px 0 5px 0;
  26636. width: 240px;
  26637. min-width: 240px;
  26638. }
  26639. .iconTool {
  26640. display: flex;
  26641. flex-direction: column;
  26642. flex-wrap: nowrap;
  26643. align-items: center;
  26644. justify-content: flex-start;
  26645. margin: 15px 10px;
  26646. }
  26647. .toolIcon {
  26648. width: 50px;
  26649. }
  26650. .taskBorder {
  26651. /* border: 1px solid #CAD1DC; */
  26652. border-radius: 10px;
  26653. margin-top: 10px;
  26654. min-height: 670px;
  26655. position: relative;
  26656. background: #fff;
  26657. padding: 20px;
  26658. overflow: hidden;
  26659. box-sizing: border-box;
  26660. }
  26661. .smallTaskBorder {
  26662. height: 405px;
  26663. min-height: 405px !important;
  26664. overflow: hidden;
  26665. }
  26666. /* .taskBorder>div {
  26667. padding: 30px 30px 10px;
  26668. } */
  26669. .addTaskBorder {
  26670. /* border: 2px solid #5E9AFC; */
  26671. border-radius: 8px;
  26672. margin-top: 10px;
  26673. cursor: pointer;
  26674. /* height: 50px;
  26675. line-height: 50px; */
  26676. background: #fff;
  26677. padding: 15px 0;
  26678. display: flex;
  26679. align-items: center;
  26680. justify-content: center;
  26681. }
  26682. /* .addTaskBorder>div {
  26683. margin: 0 auto;
  26684. display: flex;
  26685. align-items: center;
  26686. justify-content: center;
  26687. }
  26688. .addTaskBorder>div>img {
  26689. width: 20px;
  26690. }
  26691. .addTaskBorder>div>span {
  26692. font-size: 16px;
  26693. margin-left: 10px;
  26694. color: #5E9AFC;
  26695. } */
  26696. .funBlock {
  26697. display: flex;
  26698. padding: 15px 0;
  26699. flex-direction: row;
  26700. justify-content: center;
  26701. align-items: center;
  26702. position: absolute;
  26703. right: 0;
  26704. bottom: 0;
  26705. background: #fff;
  26706. width: 100%;
  26707. height: 60px;
  26708. z-index: 9;
  26709. }
  26710. .fold {
  26711. display: flex;
  26712. margin: 0 20px;
  26713. flex-direction: row;
  26714. align-items: center;
  26715. cursor: pointer;
  26716. color: #2b7bff;
  26717. }
  26718. .arrow {
  26719. margin-right: 8px;
  26720. width: 16px;
  26721. height: 16px;
  26722. min-width: 16px;
  26723. min-height: 16px;
  26724. background-size: 100% 100%;
  26725. display: block;
  26726. background-image: url(../../../assets/icon/new/u_up.png);
  26727. /* border-left: 7px solid transparent;
  26728. border-bottom: 7px solid #717C8D;
  26729. border-top: 0px solid transparent;
  26730. border-right: 7px solid transparent; */
  26731. /* box-sizing: border-box; */
  26732. transition: all 0.3s;
  26733. }
  26734. .arrowZ {
  26735. transform: rotate(180deg);
  26736. }
  26737. .addToolFun {
  26738. display: flex;
  26739. width: 150px;
  26740. flex-direction: row;
  26741. align-items: center;
  26742. justify-content: center;
  26743. border: 2px dashed #cad1dc;
  26744. border-radius: 5px;
  26745. height: 50px;
  26746. margin: 35px auto 0;
  26747. cursor: pointer;
  26748. }
  26749. .addToolFun2 {
  26750. display: flex;
  26751. width: 150px;
  26752. border: 2px dashed #cad1dc;
  26753. flex-direction: row;
  26754. align-items: center;
  26755. justify-content: center;
  26756. border-radius: 5px;
  26757. height: 50px;
  26758. margin: 0 auto 0;
  26759. cursor: pointer;
  26760. }
  26761. .addToolFun2>div,
  26762. .addToolFun>div {
  26763. display: flex;
  26764. line-height: 50px;
  26765. }
  26766. .addToolImg {
  26767. width: 20px;
  26768. height: 20px;
  26769. margin-right: 10px;
  26770. }
  26771. .addToolsDia>>>.el-dialog__body {
  26772. padding: 20px;
  26773. }
  26774. .addToolsDia>>>.el-dialog__body>.toolChoose {
  26775. padding: 0;
  26776. }
  26777. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  26778. padding: 0;
  26779. border-bottom: none;
  26780. margin-bottom: 0;
  26781. }
  26782. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  26783. width: 100%;
  26784. }
  26785. .lineCss>>>.el-form-item__label {
  26786. width: auto !important;
  26787. }
  26788. .lineCss>>>.el-form-item__content {
  26789. margin-left: 50px !important;
  26790. }
  26791. .newSteps {
  26792. display: flex;
  26793. width: 100% !important;
  26794. /* height: 80px; */
  26795. cursor: pointer;
  26796. margin: 10px 0;
  26797. border-radius: 10px;
  26798. flex-direction: row;
  26799. align-content: center;
  26800. justify-content: center;
  26801. align-items: center;
  26802. margin: 0 !important;
  26803. }
  26804. /* 评价样式 */
  26805. .elist_css {
  26806. padding-bottom: 75px !important;
  26807. }
  26808. .elist_title {
  26809. margin-bottom: 10px;
  26810. }
  26811. .elist_input {
  26812. width: 100%;
  26813. }
  26814. .elist_input_box {
  26815. display: flex;
  26816. align-items: center;
  26817. flex-wrap: wrap;
  26818. }
  26819. .elist_input_box+.elist_input_box {
  26820. margin-top: 30px;
  26821. }
  26822. .elist_input .elist_input_box input {
  26823. font: inherit;
  26824. color: currentColor;
  26825. width: 100%;
  26826. /* max-width: calc(100% - 385px); */
  26827. max-width: calc(100% - 150px);
  26828. padding: 8px 14px;
  26829. display: block;
  26830. min-width: 0;
  26831. outline: none;
  26832. border: 1px solid rgba(0, 0, 0, 0.23);
  26833. border-radius: 4px;
  26834. box-sizing: border-box;
  26835. background: #fff;
  26836. margin: 0 20px 0 0;
  26837. }
  26838. .elist_input .elist_input_box span {
  26839. height: 36px;
  26840. line-height: 36px;
  26841. color: rgb(82, 82, 82);
  26842. min-width: 80px;
  26843. }
  26844. .elist_input .elist_input_box .remove {
  26845. height: 20px;
  26846. width: 20px;
  26847. min-height: 20px;
  26848. min-width: 20px;
  26849. background-size: 100% 100%;
  26850. background-position: unset;
  26851. margin-left: 5px;
  26852. }
  26853. .elist_input_box>>>.el-rate {
  26854. display: flex;
  26855. height: 36px;
  26856. align-items: center;
  26857. }
  26858. .elist_input_box .elist_inptu_text {
  26859. width: 100%;
  26860. display: flex;
  26861. align-items: center;
  26862. margin-top: 10px;
  26863. }
  26864. .elist_input_box .elist_inptu_text input {
  26865. /* width: 500px; */
  26866. width: 100%;
  26867. max-width: unset;
  26868. }
  26869. .elist_input_box>>>.el-rate__icon {
  26870. font-size: 24px;
  26871. }
  26872. .elist_btn {
  26873. margin-top: 10px;
  26874. }
  26875. .lineTitle {
  26876. /* margin-top: 15px; */
  26877. width: 110px;
  26878. font-size: 16px;
  26879. display: flex;
  26880. align-items: center;
  26881. line-height: 20px;
  26882. }
  26883. .lineTitle::before {
  26884. content: "";
  26885. display: block;
  26886. width: 3px;
  26887. height: 20px;
  26888. background: #0061ff;
  26889. border-radius: 3px;
  26890. margin: 0 5px 0 0;
  26891. }
  26892. .clineTitle::before {
  26893. content: "";
  26894. display: block;
  26895. min-width: 10px;
  26896. width: 10px;
  26897. height: 10px;
  26898. background: #0061ff;
  26899. border-radius: 50%;
  26900. margin: 0 5px 0 0;
  26901. }
  26902. .courseTop {
  26903. display: flex;
  26904. flex-direction: row;
  26905. justify-content: space-between;
  26906. align-items: center;
  26907. width: calc(100%);
  26908. margin: 0 auto;
  26909. padding: 10px 20px;
  26910. box-sizing: border-box;
  26911. position: absolute;
  26912. top: 0;
  26913. }
  26914. .stepsNav {
  26915. display: flex;
  26916. flex-direction: row;
  26917. justify-content: flex-start;
  26918. align-items: center;
  26919. }
  26920. .stepsWord {
  26921. font-size: 18px;
  26922. color: #fff;
  26923. font-weight: bold;
  26924. margin-left: auto;
  26925. background: rgb(15, 126, 255);
  26926. border-radius: 5px;
  26927. padding: 3px 25px;
  26928. box-sizing: border-box;
  26929. }
  26930. .stepBox {
  26931. width: calc(100% - 40px);
  26932. height: calc(100%);
  26933. overflow: hidden;
  26934. border-radius: 5px;
  26935. margin: 0 auto;
  26936. }
  26937. .rightBox {
  26938. width: calc(100%);
  26939. background: #f0f2f5;
  26940. /* border-radius: 10px; */
  26941. overflow: auto;
  26942. height: calc(100% - 150px);
  26943. margin: 0 auto;
  26944. position: relative;
  26945. box-sizing: border-box;
  26946. }
  26947. .e_add_top {
  26948. display: flex;
  26949. justify-content: space-between;
  26950. background: #fff;
  26951. position: absolute;
  26952. right: 20px;
  26953. height: 50px;
  26954. align-items: center;
  26955. }
  26956. .e_add_title2 {
  26957. display: flex;
  26958. align-items: center;
  26959. }
  26960. .e_add_title2 span {
  26961. width: 40px;
  26962. }
  26963. .e_add_title {
  26964. display: flex;
  26965. align-items: center;
  26966. color: #b8b8b8;
  26967. font-size: 18px;
  26968. position: relative;
  26969. height: 40px;
  26970. }
  26971. .e_add_title span {
  26972. margin-right: 10px;
  26973. }
  26974. .e_add_title .el_input {
  26975. width: 300px;
  26976. }
  26977. .e_add_title>>>.el-input__inner {
  26978. width: 400px;
  26979. }
  26980. .e_add_btn {}
  26981. .e_add_content {
  26982. display: flex;
  26983. width: 100%;
  26984. }
  26985. .e_add_list {
  26986. background: #fff;
  26987. height: 500px;
  26988. width: 210px;
  26989. position: relative;
  26990. margin: 15px 5px 0 0;
  26991. flex-shrink: 0;
  26992. display: flex;
  26993. flex-direction: column;
  26994. }
  26995. .e_add_list_title {
  26996. font-size: 20px;
  26997. width: 100%;
  26998. box-sizing: border-box;
  26999. padding: 15px 40px;
  27000. text-align: center;
  27001. border-bottom: 1px solid #eaeaea;
  27002. position: relative;
  27003. display: flex;
  27004. align-items: center;
  27005. justify-content: center;
  27006. height: 57px;
  27007. background: #f6f6f6;
  27008. }
  27009. .e_add_list_title span {
  27010. overflow: hidden;
  27011. white-space: nowrap;
  27012. text-overflow: ellipsis;
  27013. }
  27014. .e_add_list_title img {
  27015. position: absolute;
  27016. right: 15px;
  27017. width: 25px;
  27018. cursor: pointer;
  27019. top: 50%;
  27020. transform: translateY(-50%);
  27021. }
  27022. .e_add_list_body {
  27023. height: calc(100% - 187px);
  27024. overflow: auto;
  27025. }
  27026. .e_add_list_child {
  27027. width: 100%;
  27028. display: flex;
  27029. align-items: center;
  27030. justify-content: center;
  27031. position: relative;
  27032. box-sizing: border-box;
  27033. padding: 15px 40px;
  27034. text-align: center;
  27035. }
  27036. .e_add_list_child span {
  27037. overflow: hidden;
  27038. white-space: nowrap;
  27039. text-overflow: ellipsis;
  27040. cursor: pointer;
  27041. }
  27042. .e_add_list_child img {
  27043. position: absolute;
  27044. right: 10px;
  27045. width: 21px;
  27046. cursor: pointer;
  27047. top: 50%;
  27048. transform: translateY(-50%);
  27049. }
  27050. .e_add_list_child+.e_add_list_child {
  27051. border-top: 1px solid #eaeaea;
  27052. }
  27053. .e_add_list_child .active {
  27054. color: #409eff;
  27055. }
  27056. .e_add_list_btn {
  27057. position: absolute;
  27058. bottom: 0;
  27059. height: 50px;
  27060. background: rgb(120, 120, 254);
  27061. width: 100%;
  27062. color: #fff;
  27063. font-size: 16px;
  27064. text-align: center;
  27065. line-height: 50px;
  27066. cursor: pointer;
  27067. }
  27068. .e_add_list_detail {
  27069. position: absolute;
  27070. bottom: 0;
  27071. height: 130px;
  27072. background: rgb(120, 120, 254);
  27073. width: 100%;
  27074. color: #fff;
  27075. font-size: 16px;
  27076. display: flex;
  27077. align-items: center;
  27078. justify-content: center;
  27079. }
  27080. .e_add_list_detail textarea {
  27081. height: 90%;
  27082. width: 95%;
  27083. border: none;
  27084. resize: none;
  27085. outline: none;
  27086. padding: 5px;
  27087. box-sizing: border-box;
  27088. }
  27089. .e_add_list_pbox {
  27090. width: 100%;
  27091. }
  27092. .e_add_list_pbox_title {
  27093. height: 50px;
  27094. background: #fff;
  27095. display: flex;
  27096. align-items: center;
  27097. width: 100%;
  27098. box-sizing: border-box;
  27099. padding: 0 20px;
  27100. flex-direction: row;
  27101. flex-wrap: wrap;
  27102. }
  27103. .type_title {
  27104. font-size: 18px;
  27105. font-weight: 700;
  27106. }
  27107. .type_content {
  27108. font-size: 16px;
  27109. margin-left: 30px;
  27110. }
  27111. .type_content span+span {
  27112. margin-left: 20px;
  27113. }
  27114. .type_content span {
  27115. cursor: pointer;
  27116. padding-bottom: 5px;
  27117. box-sizing: border-box;
  27118. }
  27119. .type_content .active {
  27120. color: #409eff;
  27121. border-bottom: 2px solid #409eff;
  27122. }
  27123. .e_add_list_pbox_content {
  27124. height: calc(100% - 50px);
  27125. display: flex;
  27126. align-items: center;
  27127. width: 100%;
  27128. background: #fff;
  27129. }
  27130. .mbCss {
  27131. width: 100%;
  27132. display: flex;
  27133. flex-direction: row;
  27134. flex-wrap: nowrap;
  27135. align-content: center;
  27136. align-items: flex-start;
  27137. justify-content: flex-start;
  27138. }
  27139. .pjCss {
  27140. /* width: 42%; */
  27141. width: calc(100% - 55%);
  27142. display: flex;
  27143. flex-direction: column;
  27144. flex-wrap: nowrap;
  27145. align-items: flex-start;
  27146. }
  27147. .e_box {
  27148. /* display: flex; */
  27149. flex-wrap: wrap;
  27150. max-height: 500px;
  27151. align-items: flex-start;
  27152. overflow: auto;
  27153. width: 100%;
  27154. }
  27155. .e_card {
  27156. border: 1px solid #ccc;
  27157. background: #fff;
  27158. margin-right: 20px;
  27159. width: 270px;
  27160. display: flex;
  27161. flex-direction: column;
  27162. align-items: center;
  27163. border-radius: 5px;
  27164. margin-top: 10px;
  27165. text-align: center;
  27166. }
  27167. .e_card_picture {
  27168. margin: 10px 0;
  27169. }
  27170. .e_card_picture>img {
  27171. width: 50px;
  27172. }
  27173. .e_card_name {
  27174. width: 100%;
  27175. padding: 0 10px;
  27176. box-sizing: border-box;
  27177. margin-bottom: 10px;
  27178. overflow: hidden;
  27179. text-overflow: ellipsis;
  27180. white-space: nowrap;
  27181. }
  27182. .e_card_time {
  27183. width: 100%;
  27184. padding: 0 10px;
  27185. box-sizing: border-box;
  27186. font-size: 15px;
  27187. color: #c3c3c3;
  27188. margin-bottom: 10px;
  27189. }
  27190. .e_card_btn {
  27191. height: 40px;
  27192. display: flex;
  27193. align-items: center;
  27194. width: 100%;
  27195. background: rgb(244, 244, 244);
  27196. }
  27197. .e_card_btn:hover {
  27198. background: rgb(221 221 221);
  27199. }
  27200. .e_card_btn span {
  27201. flex: 1 1 auto;
  27202. text-align: center;
  27203. cursor: pointer;
  27204. }
  27205. .addEva {
  27206. border: 1px solid #ccc;
  27207. background: #fff;
  27208. margin-right: 20px;
  27209. width: 270px;
  27210. height: 149px;
  27211. display: flex;
  27212. flex-direction: column;
  27213. align-items: center;
  27214. border-radius: 5px;
  27215. margin-top: 10px;
  27216. text-align: center;
  27217. cursor: pointer;
  27218. justify-content: center;
  27219. }
  27220. .addEva>img {
  27221. width: 50px;
  27222. object-fit: cover;
  27223. }
  27224. .uploadFm {
  27225. border: 1px dashed #ccc;
  27226. width: 100%;
  27227. height: 140px;
  27228. position: relative;
  27229. cursor: pointer;
  27230. display: flex;
  27231. flex-direction: column;
  27232. justify-content: center;
  27233. align-items: center;
  27234. font-size: 14px;
  27235. color: #6e6e6e;
  27236. position: relative;
  27237. }
  27238. .cover_p {
  27239. width: 100% !important;
  27240. height: 100%;
  27241. object-fit: cover;
  27242. }
  27243. .uploadFm2:hover .cover_mask {
  27244. display: flex !important;
  27245. }
  27246. .cover_mask {
  27247. display: none;
  27248. width: 100%;
  27249. height: 100%;
  27250. position: absolute;
  27251. background: #00000054;
  27252. align-items: center;
  27253. justify-content: center;
  27254. flex-direction: column;
  27255. }
  27256. .cover_mask>img {
  27257. width: 30px;
  27258. }
  27259. .cover_mask>span {
  27260. color: #fff;
  27261. font-size: 12px;
  27262. }
  27263. .uploadFm>img {
  27264. width: 50px;
  27265. }
  27266. .fileCss {
  27267. width: 100%;
  27268. display: flex;
  27269. flex-direction: row;
  27270. flex-wrap: nowrap;
  27271. justify-content: space-around;
  27272. align-items: center;
  27273. padding-top: 15px;
  27274. }
  27275. .fileCss>div {
  27276. display: flex;
  27277. flex-direction: column;
  27278. align-items: center;
  27279. }
  27280. .fileCss .spanName {
  27281. margin-top: 10px;
  27282. }
  27283. .sysPicBox {
  27284. display: flex;
  27285. flex-direction: row;
  27286. flex-wrap: wrap;
  27287. align-content: flex-start;
  27288. height: 435px;
  27289. overflow: auto;
  27290. position: relative;
  27291. }
  27292. .picNone {
  27293. position: absolute;
  27294. left: 50%;
  27295. top: 45%;
  27296. transform: translate(-50%, -50%);
  27297. width: fit-content;
  27298. color: #9c9c9c;
  27299. }
  27300. .sysPic {
  27301. width: 200px;
  27302. height: 115px;
  27303. margin: 0 20px 20px 0;
  27304. cursor: pointer;
  27305. }
  27306. .sysPic>img,
  27307. .isSysPic>img,
  27308. .deletePic>img {
  27309. width: 100%;
  27310. height: 100%;
  27311. object-fit: cover;
  27312. }
  27313. .isSysPic {
  27314. width: 200px;
  27315. height: 115px;
  27316. position: relative;
  27317. }
  27318. .deletePic {
  27319. width: 20px;
  27320. height: 20px;
  27321. position: absolute;
  27322. top: 0;
  27323. right: 0;
  27324. cursor: pointer;
  27325. }
  27326. .select_box1 {
  27327. height: 100%;
  27328. }
  27329. .select_box1_img {
  27330. background: #fff;
  27331. border-radius: 5px;
  27332. padding: 15px;
  27333. box-sizing: border-box;
  27334. margin-bottom: 20px;
  27335. }
  27336. .select_box1_title {
  27337. padding: 0 0 15px 0;
  27338. border-bottom: 1px solid #eee;
  27339. margin-bottom: 15px;
  27340. }
  27341. .select_box1_title span:nth-child(1) {
  27342. font-size: 16px;
  27343. margin-right: 20px;
  27344. color: #000;
  27345. }
  27346. .select_box1_title span:nth-child(2) {
  27347. font-size: 14px;
  27348. color: rgb(112, 112, 112);
  27349. }
  27350. .select_box1_add_img {}
  27351. .select_box1_select {
  27352. background: #fff;
  27353. border-radius: 5px;
  27354. padding: 15px;
  27355. box-sizing: border-box;
  27356. height: calc(100% - 200px);
  27357. overflow: auto;
  27358. }
  27359. .select_box2 {
  27360. height: 100%;
  27361. }
  27362. .select_box2_title {
  27363. background: #fff;
  27364. border-radius: 5px;
  27365. padding: 5px 10px;
  27366. box-sizing: border-box;
  27367. margin-bottom: 10px;
  27368. }
  27369. .select_box2_box {
  27370. display: flex;
  27371. height: calc(100% - 30px);
  27372. }
  27373. .select_box2_img {
  27374. width: calc(100% - 310px);
  27375. height: 100%;
  27376. overflow: auto;
  27377. background: #fff;
  27378. border-radius: 5px;
  27379. }
  27380. .select_box2_img img {
  27381. width: 100%;
  27382. }
  27383. .select_box2_answer {
  27384. background: #fff;
  27385. margin-left: 10px;
  27386. border-radius: 5px;
  27387. width: 300px;
  27388. overflow: auto;
  27389. height: 100%;
  27390. display: flex;
  27391. flex-direction: column;
  27392. align-items: center;
  27393. padding-top: 10px;
  27394. box-sizing: border-box;
  27395. }
  27396. .select_box2_answer_box {
  27397. margin: 0 0 10px 0;
  27398. width: 85%;
  27399. }
  27400. .rate_textarea {
  27401. font: inherit;
  27402. color: currentColor;
  27403. width: 100%;
  27404. padding: 8px 14px;
  27405. display: block;
  27406. min-width: 0;
  27407. outline: none;
  27408. border: 1px solid rgba(0, 0, 0, 0.23);
  27409. border-radius: 4px;
  27410. box-sizing: border-box;
  27411. background: #fff;
  27412. margin: 0 20px 0 0;
  27413. resize: none;
  27414. }
  27415. .select_answer_title {
  27416. text-align: left;
  27417. width: 85%;
  27418. margin-bottom: 10px;
  27419. font-size: 18px;
  27420. color: #8e8e8e;
  27421. }
  27422. .mask {
  27423. background-color: rgb(0 0 0 / 30%);
  27424. /* position: fixed; */
  27425. position: absolute;
  27426. top: 0;
  27427. left: 0;
  27428. width: 100%;
  27429. height: 100%;
  27430. z-index: 90;
  27431. display: flex;
  27432. align-items: center;
  27433. justify-content: center;
  27434. }
  27435. .progressBox {
  27436. width: 300px;
  27437. height: 150px;
  27438. background: #fff;
  27439. border-radius: 10px;
  27440. box-shadow: 0 0 6px 1px #bfbfbf;
  27441. display: flex;
  27442. align-items: center;
  27443. justify-content: center;
  27444. flex-direction: column;
  27445. position: relative;
  27446. color: #6c6c6c;
  27447. }
  27448. .progressBox>>>.el-progress-bar__outer {
  27449. background-color: #d1dfff !important;
  27450. }
  27451. .progressBox .lbox {
  27452. height: 50px;
  27453. font-size: 19px;
  27454. display: flex;
  27455. align-items: center;
  27456. color: #747474;
  27457. }
  27458. .progressBox .lbox img {
  27459. width: 40px;
  27460. margin-right: 20px;
  27461. }
  27462. .closeCss {
  27463. position: absolute;
  27464. top: 8px;
  27465. right: 8px;
  27466. cursor: pointer;
  27467. width: 20px;
  27468. height: 20px;
  27469. }
  27470. .closeCss>img {
  27471. width: 100%;
  27472. height: 100%;
  27473. }
  27474. .updateTips::before {
  27475. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  27476. font-size: 14px;
  27477. margin-left: 20px;
  27478. font-weight: 400;
  27479. color: #ff3a3a;
  27480. margin-bottom: 10px;
  27481. display: block;
  27482. }
  27483. .updateMask {
  27484. width: 100%;
  27485. z-index: 3;
  27486. top: 0;
  27487. position: absolute;
  27488. /* background-color: rgba(0,0,0,.3); */
  27489. }
  27490. .t_j_box {
  27491. display: flex;
  27492. }
  27493. .t_j_box span:nth-child(1) {
  27494. width: 15%;
  27495. overflow: hidden;
  27496. margin-right: 10px;
  27497. text-overflow: ellipsis;
  27498. white-space: nowrap;
  27499. }
  27500. .t_j_box span:nth-child(2) {
  27501. width: 30%;
  27502. overflow: hidden;
  27503. text-overflow: ellipsis;
  27504. margin-right: 10px;
  27505. }
  27506. .t_j_box span:nth-child(3) {
  27507. max-width: calc(55% - 20px);
  27508. overflow: hidden;
  27509. text-overflow: ellipsis;
  27510. }
  27511. .sentenBox {
  27512. background: #fff;
  27513. height: 600px;
  27514. overflow: auto;
  27515. background-image: url("../../../assets/icon/conSentences/csBg.png");
  27516. background-position: 102%;
  27517. background-repeat: no-repeat;
  27518. background-size: 60%;
  27519. }
  27520. .sentenBox>.sentenContent {
  27521. padding-bottom: 10px;
  27522. width: 97%;
  27523. margin: 0 auto;
  27524. }
  27525. .sentenBox>.sentenContent+.sentenContent {
  27526. border-top: 1px solid #cbcbcb;
  27527. }
  27528. .addSen {
  27529. background: #409efe;
  27530. width: 90px;
  27531. color: #fff;
  27532. height: 35px;
  27533. text-align: center;
  27534. line-height: 35px;
  27535. border-radius: 5px;
  27536. float: right;
  27537. margin: 10px 20px 0 0;
  27538. cursor: pointer;
  27539. }
  27540. .sentenTop {
  27541. display: flex;
  27542. flex-direction: row;
  27543. flex-wrap: nowrap;
  27544. align-items: center;
  27545. }
  27546. .sentenTop::before {
  27547. content: attr(index);
  27548. background: #3681fc;
  27549. border-radius: 50%;
  27550. color: #fff;
  27551. width: 25px;
  27552. height: 25px;
  27553. min-width: 25px;
  27554. min-height: 25px;
  27555. text-align: center;
  27556. line-height: 25px;
  27557. margin-right: 5px;
  27558. }
  27559. .sentenTop>div:nth-child(2) {
  27560. width: 300px;
  27561. margin: 0 15px;
  27562. }
  27563. .sentenTop>div:nth-child(3) {
  27564. background: #409efe;
  27565. color: #fff;
  27566. width: 65px;
  27567. height: 35px;
  27568. text-align: center;
  27569. line-height: 35px;
  27570. border-radius: 5px;
  27571. cursor: pointer;
  27572. }
  27573. .cardList {
  27574. padding: 30px 0 20px 0;
  27575. display: flex;
  27576. flex-direction: row;
  27577. flex-wrap: wrap;
  27578. align-items: center;
  27579. box-sizing: border-box;
  27580. border-bottom: 1px solid #f4f4f4;
  27581. width: 98%;
  27582. margin: 0 auto;
  27583. }
  27584. .rightCardList {
  27585. display: flex;
  27586. flex-wrap: wrap;
  27587. }
  27588. .cardBox {
  27589. display: flex;
  27590. flex-direction: row;
  27591. flex-wrap: wrap;
  27592. align-items: center;
  27593. align-content: center;
  27594. }
  27595. .isCard,
  27596. .isCard1 {
  27597. width: auto;
  27598. padding: 0 20px;
  27599. height: 65px;
  27600. text-align: center;
  27601. line-height: 65px;
  27602. font-size: 14px;
  27603. cursor: pointer;
  27604. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  27605. background-size: 100% 100%;
  27606. position: relative;
  27607. z-index: 99;
  27608. }
  27609. .isCard1 {
  27610. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  27611. }
  27612. .isCard:hover .deleteWord {
  27613. display: block;
  27614. }
  27615. .isCard>div:nth-child(1),
  27616. .isCard1>div:nth-child(1) {
  27617. white-space: nowrap;
  27618. overflow: hidden;
  27619. text-overflow: ellipsis;
  27620. width: 100%;
  27621. margin: 0 auto;
  27622. }
  27623. .card {
  27624. width: 140px;
  27625. height: 65px;
  27626. }
  27627. .card>img {
  27628. width: 100%;
  27629. height: 100%;
  27630. }
  27631. .rightCardBox {
  27632. width: 98%;
  27633. margin: 10px auto 0;
  27634. }
  27635. .rightCardBox>div:nth-child(1) {
  27636. margin-bottom: 10px;
  27637. }
  27638. .cardCss {
  27639. display: flex;
  27640. flex-direction: column;
  27641. flex-wrap: nowrap;
  27642. align-items: center;
  27643. border-bottom: 3px solid #b4c3d3;
  27644. padding: 0 0 5px 0;
  27645. /* margin-right: 10px; */
  27646. }
  27647. .cardCss>div:nth-child(2) {
  27648. background: #5b7b9d;
  27649. color: #fff;
  27650. width: 20px;
  27651. height: 20px;
  27652. border-radius: 50%;
  27653. text-align: center;
  27654. line-height: 20px;
  27655. }
  27656. .sentenTopBox {
  27657. display: flex;
  27658. flex-direction: row;
  27659. flex-wrap: nowrap;
  27660. align-items: center;
  27661. justify-content: space-between;
  27662. padding: 55px 0 0 20px;
  27663. box-sizing: border-box;
  27664. width: 85%;
  27665. }
  27666. .rb_c_ai_box,
  27667. .stepsBottom {
  27668. width: 100%;
  27669. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  27670. /* background: #f7f7f7; */
  27671. border-radius: 10px;
  27672. overflow: hidden;
  27673. /* height: 100%; */
  27674. height: calc(100% - 55px);
  27675. }
  27676. .navTop {
  27677. background: #53749b;
  27678. color: #fff;
  27679. height: 40px;
  27680. line-height: 40px;
  27681. padding-left: 15px;
  27682. font-size: 18px;
  27683. }
  27684. .navBottom {
  27685. /* background: #6b91b7; */
  27686. height: 100%;
  27687. overflow: auto;
  27688. padding: 10px 0;
  27689. }
  27690. .navStage {
  27691. display: flex;
  27692. flex-direction: row;
  27693. flex-wrap: nowrap;
  27694. align-items: center;
  27695. padding: 10px 10px 10px 0;
  27696. cursor: pointer;
  27697. background: #ffffff;
  27698. width: 95%;
  27699. margin: 5px auto 5px;
  27700. box-sizing: border-box;
  27701. border-radius: 5px;
  27702. flex-wrap: wrap;
  27703. position: relative;
  27704. }
  27705. .navStage:hover>.chapter_upload_drag {
  27706. display: block;
  27707. }
  27708. .navTask:hover>.chapter_upload_drag {
  27709. display: block;
  27710. }
  27711. .chapter_upload:hover>.chapter_upload_drag {
  27712. display: block;
  27713. }
  27714. .navStage::before {
  27715. content: "";
  27716. display: block;
  27717. width: 16px;
  27718. height: 16px;
  27719. background-image: url(../../../assets/icon/new/icon_stage.png);
  27720. background-size: 100%;
  27721. margin-left: 25px;
  27722. }
  27723. .navStage .chapter_unit_open {
  27724. content: "";
  27725. display: block;
  27726. width: 16px;
  27727. height: 16px;
  27728. background-image: url(../../../assets/icon/new/down.png);
  27729. transform: rotate(-90deg);
  27730. background-size: 100%;
  27731. margin-left: 10px;
  27732. transition: all 0.5s;
  27733. }
  27734. .isNavStageOpen .chapter_unit_open {
  27735. transform: rotate(0deg);
  27736. }
  27737. .isNavStage {
  27738. background: #0061ff;
  27739. }
  27740. .isNavStage::before {
  27741. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  27742. }
  27743. .isNavStage .chapter_unit_open {
  27744. background-image: url(../../../assets/icon/new/downC.png);
  27745. }
  27746. .isNavStage .nt_taskName {
  27747. font-weight: bold !important;
  27748. color: #ffffff !important;
  27749. }
  27750. .isNavStage .nt_taskTitle {
  27751. font-weight: bold !important;
  27752. color: #fff !important;
  27753. }
  27754. .navStage .nt_taskBox {
  27755. width: calc(100% - 68px);
  27756. padding: 0 0 0 5px;
  27757. box-sizing: border-box;
  27758. box-sizing: border-box;
  27759. display: flex;
  27760. flex-direction: row;
  27761. flex-wrap: nowrap;
  27762. align-items: baseline;
  27763. }
  27764. .navStage .nt_taskTitle {
  27765. color: #060e17;
  27766. line-height: 25px;
  27767. font-size: 16px;
  27768. }
  27769. .navStage .nt_taskName {
  27770. max-width: calc(100% - 82px);
  27771. white-space: nowrap;
  27772. overflow: hidden;
  27773. text-overflow: ellipsis;
  27774. font-size: 16px;
  27775. color: #060e17;
  27776. }
  27777. .navTask {
  27778. display: flex;
  27779. flex-direction: row;
  27780. flex-wrap: nowrap;
  27781. align-items: center;
  27782. padding: 10px 10px 10px 0;
  27783. cursor: pointer;
  27784. background: #ffffff;
  27785. width: 95%;
  27786. margin: 5px auto 5px;
  27787. box-sizing: border-box;
  27788. border-radius: 5px;
  27789. flex-wrap: wrap;
  27790. position: relative;
  27791. }
  27792. .navTask .chapter_upload_open {
  27793. content: "";
  27794. display: block;
  27795. width: 16px;
  27796. height: 16px;
  27797. background-image: url(../../../assets/icon/new/icon_arrow.png);
  27798. background-size: 100%;
  27799. margin-left: 23px;
  27800. }
  27801. .noImage .chapter_upload_open {
  27802. display: none;
  27803. background-image: unset !important;
  27804. }
  27805. .isNavOpen .chapter_upload_open {
  27806. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  27807. transform: rotate(90deg);
  27808. }
  27809. .isNavTask .chapter_upload_open {
  27810. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  27811. transform: rotate(-90deg);
  27812. }
  27813. .isNavTask.isNavOpen .chapter_upload_open {
  27814. transform: rotate(0deg);
  27815. }
  27816. .dragOverTop {
  27817. border-top: 2px solid #0061ff !important;
  27818. border-radius: 0 !important;
  27819. margin-top: 10px;
  27820. }
  27821. .dragOverBottom {
  27822. border-bottom: 2px solid #0061ff !important;
  27823. border-radius: 0 !important;
  27824. margin-top: 10px;
  27825. }
  27826. .dragOverTop2 {
  27827. border-top: 2px solid #0061ff !important;
  27828. border-radius: 0 !important;
  27829. }
  27830. .dragOverBottom2 {
  27831. border-bottom: 2px solid #0061ff !important;
  27832. border-radius: 0 !important;
  27833. }
  27834. .isNavTask {
  27835. /* background: #3681FC; */
  27836. background: #eef3fb;
  27837. }
  27838. .isNavTask>.chapter_upload_drag {
  27839. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  27840. }
  27841. .isNavTask .nt_taskName {
  27842. /* color: #fff !important; */
  27843. font-weight: bold !important;
  27844. color: #0061ff !important;
  27845. }
  27846. .isNavTask .nt_taskTitle {
  27847. /* color: #AECCFE !important; */
  27848. font-weight: bold !important;
  27849. color: #0061ff !important;
  27850. }
  27851. .navTask .nt_taskBox {
  27852. width: calc(100% - 40px);
  27853. padding: 0 0 0 5px;
  27854. box-sizing: border-box;
  27855. box-sizing: border-box;
  27856. display: flex;
  27857. flex-direction: row;
  27858. flex-wrap: nowrap;
  27859. align-items: baseline;
  27860. }
  27861. .navTask .nt_taskTitle {
  27862. /* color: #717C8D; */
  27863. color: #060e17;
  27864. line-height: 25px;
  27865. font-size: 16px;
  27866. /* min-width: 66px; */
  27867. }
  27868. .navTask .nt_taskName {
  27869. /* color: #fff; */
  27870. /* max-width: 130px; */
  27871. /* width: 100%; */
  27872. max-width: calc(100% - 66px);
  27873. font-size: 16px;
  27874. color: #060e17;
  27875. /* color: #0E1E33; */
  27876. }
  27877. .navTask .nt_taskName span {
  27878. width: 100%;
  27879. white-space: nowrap;
  27880. overflow: hidden;
  27881. text-overflow: ellipsis;
  27882. display: block;
  27883. }
  27884. .gjBox {
  27885. width: calc(100% - 25px);
  27886. padding: 0 0 0 0;
  27887. box-sizing: border-box;
  27888. border-left: 1px solid #cad1dc;
  27889. margin-left: 25px;
  27890. }
  27891. .gjBox>div {
  27892. display: flex;
  27893. align-items: center;
  27894. }
  27895. .gjBox>div::before {
  27896. content: "";
  27897. height: 1px;
  27898. width: 10px;
  27899. background: #cad1dc;
  27900. display: block;
  27901. margin-right: 5px;
  27902. }
  27903. .gjCss {
  27904. display: flex;
  27905. flex-direction: row;
  27906. flex-wrap: nowrap;
  27907. align-items: center;
  27908. padding: 15px 0;
  27909. box-sizing: border-box;
  27910. font-size: 14px;
  27911. cursor: pointer;
  27912. }
  27913. .isGjCss {
  27914. color: #0061ff;
  27915. }
  27916. .groupBox {}
  27917. .groupContent+.groupContent {
  27918. margin-top: 30px;
  27919. }
  27920. .groupTitle {
  27921. font-size: 24px;
  27922. color: rgb(80, 80, 80);
  27923. margin-bottom: 20px;
  27924. }
  27925. .groupName {
  27926. display: flex;
  27927. align-items: center;
  27928. }
  27929. .groupn {
  27930. font-size: 15px;
  27931. margin-right: 10px;
  27932. }
  27933. .groupName+.groupName {
  27934. margin-top: 15px;
  27935. }
  27936. .groupBtn {
  27937. margin-left: 10px;
  27938. }
  27939. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  27940. text-align: left;
  27941. }
  27942. .radioBox>div {
  27943. margin: 10px 0 0 10px;
  27944. }
  27945. .radioBox>>>.el-radio__input,
  27946. .radioBox>>>.el-checkbox__inner {
  27947. margin-left: 10px;
  27948. }
  27949. .radioBox>>>.el-radio__label,
  27950. .radioBox>>>.el-checkbox__label {
  27951. display: flex;
  27952. align-items: center;
  27953. }
  27954. .inImg {
  27955. width: 50px;
  27956. }
  27957. .inImg>img {
  27958. width: 100%;
  27959. height: 100%;
  27960. object-fit: cover;
  27961. }
  27962. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  27963. height: auto;
  27964. padding: 10px;
  27965. margin: 0;
  27966. }
  27967. .upCss>>>.el-upload-list {
  27968. width: 100%;
  27969. }
  27970. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  27971. width: 100%;
  27972. height: 120px;
  27973. object-fit: contain;
  27974. background: unset;
  27975. margin-left: 0;
  27976. }
  27977. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  27978. display: none;
  27979. }
  27980. .tcMember+.tcMember::before {
  27981. content: "、";
  27982. }
  27983. .xzUpImg {
  27984. width: 25px;
  27985. height: 25px;
  27986. min-width: 25px;
  27987. min-height: 25px;
  27988. cursor: pointer;
  27989. margin: 0 10px;
  27990. }
  27991. .xzUpImg>img {
  27992. width: 100%;
  27993. height: 100%;
  27994. }
  27995. .closeCss {
  27996. position: absolute;
  27997. top: 8px;
  27998. right: 8px;
  27999. cursor: pointer;
  28000. width: 20px;
  28001. height: 20px;
  28002. }
  28003. .closeCss>img {
  28004. width: 100%;
  28005. height: 100%;
  28006. }
  28007. .moveBtn {
  28008. display: flex;
  28009. flex-direction: row;
  28010. flex-wrap: nowrap;
  28011. align-items: center;
  28012. width: 55px;
  28013. }
  28014. .timuUpImg {
  28015. display: flex;
  28016. flex-direction: row;
  28017. align-items: center;
  28018. width: 100%;
  28019. margin-right: 10px;
  28020. }
  28021. .timuUpImg>div:nth-child(1) {
  28022. margin-right: 10px;
  28023. display: flex;
  28024. align-items: center;
  28025. width: 100%;
  28026. }
  28027. .timuImgBox {
  28028. margin: 10px 0;
  28029. display: flex;
  28030. flex-direction: column;
  28031. flex-wrap: wrap;
  28032. align-items: flex-start;
  28033. }
  28034. .timuImg {
  28035. width: 100px;
  28036. margin: 5px 0;
  28037. cursor: pointer;
  28038. position: relative;
  28039. }
  28040. .timuImg:hover .deleteWord {
  28041. display: block;
  28042. }
  28043. .deleteWord {
  28044. width: 25px;
  28045. height: 25px;
  28046. position: absolute;
  28047. right: -5px;
  28048. top: -5px;
  28049. cursor: pointer;
  28050. display: none;
  28051. }
  28052. .timuImg>img,
  28053. .deleteWord>img {
  28054. width: 100%;
  28055. height: 100%;
  28056. object-fit: cover;
  28057. }
  28058. .e_add_delete {
  28059. cursor: pointer;
  28060. margin-left: 10px;
  28061. }
  28062. .pType_box {
  28063. margin: 15px 0;
  28064. align-items: flex-end;
  28065. }
  28066. .noneBox {
  28067. height: 200px;
  28068. width: 100%;
  28069. display: flex;
  28070. align-items: center;
  28071. justify-content: center;
  28072. flex-direction: column;
  28073. /* margin-top: 150px; */
  28074. }
  28075. .noneBox>img {
  28076. width: 95px;
  28077. }
  28078. .noneBox>span {
  28079. margin-top: 10px;
  28080. color: #717c8d;
  28081. }
  28082. .rb_c_box {
  28083. width: 100%;
  28084. height: 100%;
  28085. display: flex;
  28086. /* padding: 20px; */
  28087. box-sizing: border-box;
  28088. justify-content: space-between;
  28089. }
  28090. .rb_c_box_left {
  28091. height: 100%;
  28092. background: #fff;
  28093. width: 270px;
  28094. min-width: 270px;
  28095. border-radius: 8px;
  28096. margin-right: 10px;
  28097. }
  28098. .rb_c_box_right {
  28099. height: 100%;
  28100. width: calc(100%);
  28101. overflow: hidden;
  28102. }
  28103. .rb_c_box_btn {
  28104. display: flex;
  28105. justify-content: flex-start;
  28106. height: 50px;
  28107. align-items: center;
  28108. background: #fff;
  28109. padding: 0 20px;
  28110. border-radius: 10px 10px 0px 0px;
  28111. border-bottom: 1px solid #cad1dc;
  28112. }
  28113. .rb_c_box_btn > .title{
  28114. font-size: 24px;
  28115. font-weight: bold;
  28116. display: flex;
  28117. align-items: center;
  28118. }
  28119. .rb_c_box_btn > .title:before{
  28120. content: '';
  28121. background-image: url(../../../assets/icon/course/courseName.png);
  28122. width: 24px;
  28123. height: 24px;
  28124. background-size: 100% 100%;
  28125. margin-right: 10px;
  28126. }
  28127. .rb_c_box_right>.basic_box {
  28128. /* background: #fff; */
  28129. border-radius: 0;
  28130. height: calc(100% - 50px);
  28131. overflow: auto;
  28132. padding: 0;
  28133. }
  28134. .textarea_css {
  28135. display: block;
  28136. resize: none;
  28137. padding: 10px 15px;
  28138. line-height: 1.5;
  28139. box-sizing: border-box;
  28140. width: 100%;
  28141. font-size: 14px;
  28142. color: #606266;
  28143. background-color: #fff;
  28144. background-image: none;
  28145. border: 1px solid #dcdfe6;
  28146. border-radius: 4px;
  28147. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  28148. outline: none;
  28149. overflow: hidden;
  28150. height: 46px;
  28151. font-family: "Microsoft YaHei";
  28152. }
  28153. .textarea_css::-webkit-input-placeholder {
  28154. color: #c0c4cc;
  28155. }
  28156. .textarea_css:focus {
  28157. border-color: #409eff;
  28158. outline: 0;
  28159. }
  28160. .addEditor>>>.text {
  28161. height: auto;
  28162. min-height: 100px;
  28163. }
  28164. .addEditor>>>.w-e-text-container {
  28165. min-height: 100px;
  28166. }
  28167. .moveBtn2 {
  28168. flex-direction: column;
  28169. width: fit-content;
  28170. margin: 0 10px 0 10px;
  28171. }
  28172. .moveBtn2 .chapter_upload_down,
  28173. .moveBtn2 .chapter_upload_up {
  28174. width: 16px;
  28175. height: 16px;
  28176. }
  28177. .moveBtn2 .chapter_upload_up::after,
  28178. .moveBtn2 .chapter_upload_down::after {
  28179. width: 10px;
  28180. height: 10px;
  28181. }
  28182. .fullStyle>>>.el-dialog__body {
  28183. height: calc(100% - 125px) !important;
  28184. box-sizing: border-box;
  28185. }
  28186. .fullStyle1>>>.el-dialog__body {
  28187. height: auto !important;
  28188. }
  28189. .fullStyle>>>.el-dialog {
  28190. width: 100% !important;
  28191. max-width: 100% !important;
  28192. height: 100% !important;
  28193. margin: 0 !important;
  28194. }
  28195. .fullStyle {
  28196. width: 100% !important;
  28197. max-width: 100% !important;
  28198. height: 100% !important;
  28199. margin: 0 auto !important;
  28200. }
  28201. .wb_j_box_btn {
  28202. width: calc(100% - 30px);
  28203. display: flex;
  28204. height: 40px;
  28205. border: 1.5px solid #cad1dc;
  28206. border-radius: 4px;
  28207. box-sizing: border-box;
  28208. align-items: center;
  28209. font-size: 14px;
  28210. cursor: pointer;
  28211. overflow: hidden;
  28212. }
  28213. .wb_j_box_btn:hover {
  28214. border: 1.5px solid #0061ff;
  28215. }
  28216. .wb_j_box_title {
  28217. background: #f0f4fa;
  28218. height: 100%;
  28219. line-height: 40px;
  28220. width: 90px;
  28221. text-align: center;
  28222. color: #060e17;
  28223. border-right: 1.5px solid #cad1dc;
  28224. box-sizing: border-box;
  28225. }
  28226. .wb_j_box_btn_c {
  28227. width: calc(100% - 90px);
  28228. padding: 0 35px 0 10px;
  28229. box-sizing: border-box;
  28230. position: relative;
  28231. }
  28232. .wb_j_box_span {
  28233. width: 100%;
  28234. overflow: hidden;
  28235. white-space: nowrap;
  28236. text-overflow: ellipsis;
  28237. word-wrap: break-word;
  28238. color: #717c8d;
  28239. }
  28240. .wb_j_box_arrow {
  28241. content: "";
  28242. width: 14px;
  28243. height: 14px;
  28244. background: url(../../../assets/icon/new/u_arrow.png);
  28245. background-size: 100% 100%;
  28246. position: absolute;
  28247. right: 12px;
  28248. top: 50%;
  28249. transform: translateY(-50%);
  28250. }
  28251. .check_classBox {
  28252. height: 400px;
  28253. display: flex;
  28254. border-top: 1.5px solid #e7ebf1;
  28255. border-bottom: 1.5px solid #e7ebf1;
  28256. }
  28257. .check_class_right {
  28258. width: 130px;
  28259. border-right: 1px solid #e7ebf1;
  28260. display: flex;
  28261. align-items: center;
  28262. flex-direction: column;
  28263. height: 100%;
  28264. overflow: auto;
  28265. padding: 15px 0;
  28266. box-sizing: border-box;
  28267. }
  28268. .check_class {
  28269. width: 85%;
  28270. border-radius: 5px;
  28271. height: 30px;
  28272. min-height: 30px;
  28273. line-height: 30px;
  28274. text-align: center;
  28275. padding: 0 10px;
  28276. box-sizing: border-box;
  28277. cursor: pointer;
  28278. white-space: nowrap;
  28279. overflow: hidden;
  28280. text-overflow: ellipsis;
  28281. }
  28282. .check_class.activeX {
  28283. background: #e0eafb;
  28284. color: #3681fc;
  28285. font-weight: 700;
  28286. }
  28287. .check_class+.check_class {
  28288. margin-top: 15px;
  28289. }
  28290. .check_class_left {
  28291. background: #fafafa;
  28292. width: calc(100% - 130px);
  28293. padding: 15px;
  28294. box-sizing: border-box;
  28295. }
  28296. .check_class_all_box {
  28297. display: flex;
  28298. margin-bottom: 10px;
  28299. }
  28300. .all_check {
  28301. display: flex;
  28302. align-items: center;
  28303. padding: 2px 0 0;
  28304. margin-left: 10px;
  28305. }
  28306. .all_check>>>.el-checkbox__label {
  28307. line-height: 18px;
  28308. }
  28309. .check_class_left_title {
  28310. font-size: 16px;
  28311. font-weight: 700;
  28312. }
  28313. .check_class_item {
  28314. display: flex;
  28315. flex-wrap: wrap;
  28316. height: calc(100% - 45px);
  28317. overflow: auto;
  28318. justify-content: flex-start;
  28319. align-items: flex-start;
  28320. align-content: flex-start;
  28321. }
  28322. .class_item:first-child {
  28323. /* margin: 0 15px 15px 67px; */
  28324. }
  28325. .class_item {
  28326. margin: 0 15px 15px 0;
  28327. }
  28328. .class_item:hover>>>.el-checkbox__label {
  28329. color: #409eff;
  28330. }
  28331. .class_item>>>.el-checkbox__label {
  28332. color: #0e1e33;
  28333. }
  28334. .class_item:hover>>>.el-checkbox__inner {
  28335. border-color: #409eff;
  28336. }
  28337. .class_item>>>.el-checkbox,
  28338. .class_item>>>.el-checkbox__input {
  28339. display: flex;
  28340. align-items: center;
  28341. }
  28342. .taskTitle {
  28343. font-size: 20px;
  28344. font-weight: bold;
  28345. margin-bottom: 35px;
  28346. }
  28347. .taskTitle:after {
  28348. content: "";
  28349. width: 100%;
  28350. display: block;
  28351. height: 1px;
  28352. background: #cad1dc;
  28353. position: absolute;
  28354. left: 0;
  28355. margin: 15px 0 0;
  28356. }
  28357. .eva_btn_box {
  28358. margin: 20px 0px 0 0;
  28359. display: flex;
  28360. flex-direction: row;
  28361. flex-wrap: nowrap;
  28362. align-items: center;
  28363. justify-content: space-between;
  28364. width: 100%;
  28365. }
  28366. .eva_btn_left_box {
  28367. display: flex;
  28368. flex-direction: row;
  28369. flex-wrap: nowrap;
  28370. align-items: center;
  28371. }
  28372. .addTypeChoose {
  28373. display: flex;
  28374. flex-direction: row;
  28375. flex-wrap: nowrap;
  28376. align-items: center;
  28377. margin: 15px 0;
  28378. }
  28379. .addTypeBox {
  28380. display: flex;
  28381. flex-direction: column;
  28382. flex-wrap: nowrap;
  28383. align-items: center;
  28384. }
  28385. .addTypeChoose {
  28386. display: flex;
  28387. flex-direction: row;
  28388. flex-wrap: nowrap;
  28389. align-items: center;
  28390. margin: 15px 0;
  28391. }
  28392. .buchong_box {
  28393. background: #E0EAFB66;
  28394. width: calc(100% - 20px);
  28395. min-height: 50px;
  28396. display: flex;
  28397. align-items: center;
  28398. justify-content: center;
  28399. margin: 0 auto;
  28400. }
  28401. .outline {
  28402. width: calc(100% - 40px);
  28403. margin: 0 auto;
  28404. }
  28405. .task_outline {
  28406. width: calc(100% - 40px);
  28407. margin: 0 auto;
  28408. }
  28409. .outline_box+.outline_box {
  28410. margin: 30px 0 0px;
  28411. }
  28412. .outline_task {
  28413. display: flex;
  28414. align-items: center;
  28415. margin-bottom: 10px;
  28416. }
  28417. .outline_btn{
  28418. display: flex;
  28419. align-items: center;
  28420. min-width: fit-content;
  28421. margin-left: 10px;
  28422. }
  28423. .outline_task .title {
  28424. font-size: 18px;
  28425. font-weight: bold;
  28426. min-width: 80px;
  28427. }
  28428. .op_task_box,
  28429. .op_tool_box,
  28430. .outline_detail {
  28431. position: relative;
  28432. }
  28433. .op_task_box:hover .op_box,
  28434. .op_tool_box:hover .op_box,
  28435. .outline_detail:hover .op_box {
  28436. display: flex
  28437. }
  28438. .op_box {
  28439. position: absolute;
  28440. bottom: 10px;
  28441. display: none;
  28442. align-items: center;
  28443. justify-content: space-between;
  28444. width: calc(100% - 20px);
  28445. left: 50%;
  28446. transform: translateX(-50%);
  28447. }
  28448. .op_box .op_remark {
  28449. color: #8E8E8E;
  28450. font-size: 14px;
  28451. }
  28452. .op_box_right{
  28453. display: flex;
  28454. }
  28455. .op_box_isquote{
  28456. display: flex;
  28457. }
  28458. .op_box_isquote *{
  28459. display: none;
  28460. }
  28461. .op_box_isquote .op_box_right,
  28462. .op_box_isquote .custom-switch{
  28463. display: flex;
  28464. margin-left: auto;
  28465. }
  28466. .op_task_box:hover .op_box_isquote *{
  28467. display: flex;
  28468. }
  28469. .op_task_box:hover .op_box_isquote .op_box_right,
  28470. .op_task_box:hover .op_box_isquote .custom-switch{
  28471. display: flex;
  28472. margin-left: unset;
  28473. }
  28474. .rb_c_nav {
  28475. width: calc(100% - 20px);
  28476. margin: 15px auto 0;
  28477. font-size: 18px;
  28478. display: flex;
  28479. align-items: center;
  28480. }
  28481. .rb_c_nav span {
  28482. cursor: pointer;
  28483. }
  28484. .rb_c_nav span+span {
  28485. margin-left: 10px;
  28486. }
  28487. .rb_c_nav span.active {
  28488. color: #0061FF
  28489. }
  28490. .text_panel>>>.text {
  28491. height: 400px;
  28492. }
  28493. .markBox{
  28494. padding: 20px 14px;
  28495. line-height: 29px;
  28496. font-size: 16px;
  28497. background: #f4f4f4;
  28498. border-radius: 5px;
  28499. word-break: break-word;
  28500. }
  28501. .info_box_t {
  28502. display: flex;
  28503. align-items: center;
  28504. flex-wrap: wrap;
  28505. }
  28506. .info_box_t + .info_box_t {
  28507. margin-top: 10px;
  28508. }
  28509. .info_box_t_box {
  28510. display: flex;
  28511. align-items: center;
  28512. flex-wrap: wrap;
  28513. margin-bottom: 5px;
  28514. }
  28515. .info_box_t_box + .info_box_t_box{
  28516. margin-left: 10px;
  28517. }
  28518. .info_box_t_box > span{
  28519. width: fit-content;
  28520. font-weight: bold;
  28521. font-size: 14px;
  28522. }
  28523. .info_box_t_box > input{
  28524. width: 150px !important;
  28525. margin: 0 5px 0 0;
  28526. }
  28527. .info_radio >>> .el-radio, .el-radio__input{
  28528. line-height: 18px;
  28529. height: 18px;
  28530. }
  28531. .mode_box{
  28532. display: flex;
  28533. align-items: center;
  28534. }
  28535. .mode_box > span{
  28536. padding: 0px 5px;
  28537. cursor: pointer;
  28538. }
  28539. .mode_box > span.active{
  28540. color: #409eff;
  28541. }
  28542. .chapter_upload_check {
  28543. width: 15px;
  28544. height: 15px;
  28545. cursor: pointer;
  28546. background-image: url('../../../assets/icon/check.png');
  28547. background-size: 100% 100%;
  28548. }
  28549. .chapter_upload_check.checked{
  28550. background-image: url('../../../assets/icon/checked.png');
  28551. }
  28552. .ruleBtn {
  28553. width: fit-content;
  28554. height: 36px;
  28555. line-height: 36px;
  28556. cursor: pointer;
  28557. color: #0061FF;
  28558. }
  28559. .stopBtn{
  28560. z-index: 999999;
  28561. position: absolute;
  28562. left: 50%;
  28563. top: calc(50% + 70px);
  28564. transform: translateX(-50%);
  28565. }
  28566. .rateSwitch >>> .el-switch__label.is-active {
  28567. color: #0061FF;
  28568. }
  28569. .rateSwitch >>> .el-switch__label--right{
  28570. display: flex;
  28571. align-items: center;
  28572. }
  28573. .rateSwitch >>> .el-switch__label--right::before{
  28574. content: "";
  28575. width: 14px;
  28576. height: 14px;
  28577. min-width: 14px;
  28578. min-height: 14px;
  28579. background-size: 100% 100%;
  28580. display: block;
  28581. margin-right: 7px;
  28582. background-image: url(../../../assets/icon/new/u_op2.png);
  28583. }
  28584. .rateSwitch >>> .el-switch__label--right.is-active::before{
  28585. background-image: url(../../../assets/icon/new/u_op.png);
  28586. }
  28587. .inter_box{
  28588. min-width: calc(50%);
  28589. min-height: 500px;
  28590. margin-right: 10px;
  28591. border: 1px solid #c7c7c7;
  28592. border-radius: 0px 5px 5px 5px;
  28593. overflow: hidden;
  28594. position: relative;
  28595. box-sizing: border-box;
  28596. }
  28597. .inter_box::before{
  28598. content:'对话区';
  28599. position: absolute;
  28600. left: 0;
  28601. top: 0;
  28602. display: block;
  28603. padding: 8px 10px;
  28604. background: #e0eafb;
  28605. color: #98a0ac;
  28606. font-size: 14px;
  28607. border-radius: 0 15px 15px 0;
  28608. }
  28609. .inter_voiceBox,
  28610. .inter_Detailbox{
  28611. border: 1px solid #c7c7c7;
  28612. border-radius: 0px 5px 5px 5px;
  28613. overflow: hidden;
  28614. position: relative;
  28615. box-sizing: border-box;
  28616. }
  28617. .inter_Detailbox::before{
  28618. content:'编辑区';
  28619. position: absolute;
  28620. left: 0;
  28621. top: 0;
  28622. display: block;
  28623. padding: 8px 10px;
  28624. background: #e0eafb;
  28625. color: #98a0ac;
  28626. font-size: 14px;
  28627. border-radius: 0 15px 15px 0;
  28628. }
  28629. .inter_voiceBox::before{
  28630. content:'录音区';
  28631. position: absolute;
  28632. left: 0;
  28633. top: 0;
  28634. display: block;
  28635. padding: 8px 10px;
  28636. background: #e0eafb;
  28637. color: #98a0ac;
  28638. font-size: 14px;
  28639. border-radius: 0 15px 15px 0;
  28640. z-index: 999;
  28641. }
  28642. .inter_box > iframe{
  28643. width: 100%;
  28644. height: 100%;
  28645. border: none;
  28646. }
  28647. .inter_setting{
  28648. display: block;
  28649. background-image: url(../../../assets/icon/course/setting.svg);
  28650. background-size: 100% 100%;
  28651. width: 20px;
  28652. height: 20px;
  28653. cursor: pointer;
  28654. margin-left: 10px;
  28655. }
  28656. .inter_setting_panel{
  28657. position: absolute;
  28658. left: 110px;
  28659. top: 30px;
  28660. background: #fff;
  28661. border-radius: 5px;
  28662. box-shadow: 0px 0px 2px 1px #00000017;
  28663. padding: 10px;
  28664. z-index: 999;
  28665. }
  28666. .panel_title{
  28667. text-align: center;
  28668. font-size: 18px;
  28669. margin-bottom: 10px;
  28670. }
  28671. .panel_tips{
  28672. font-weight: 500;
  28673. font-size: 14px;
  28674. text-align: center;
  28675. margin-bottom: 10px;
  28676. color: #6d6d6d;
  28677. }
  28678. .panel_input{
  28679. margin-bottom: 10px;
  28680. }
  28681. .panel_button{
  28682. display: flex;
  28683. justify-content: space-between;
  28684. }
  28685. .panel_input_record {
  28686. margin-top: 10px;
  28687. }
  28688. .panel_input_record > span{
  28689. margin-bottom: 5px;
  28690. display: block;
  28691. }
  28692. .custom-switch >>> .el-switch__label.is-active {
  28693. color: #0061FF;
  28694. }
  28695. .close_btn{
  28696. position: absolute;
  28697. top: 40px;
  28698. right: 10px;
  28699. box-shadow: 0 0 4px 2px #00000033;
  28700. border-radius: 70px 0 0 70px;
  28701. display: flex;
  28702. align-items: center;
  28703. padding-left: 5px;
  28704. padding: 10px 7px 10px 12px;
  28705. background: #fff;
  28706. cursor: pointer;
  28707. }
  28708. .close_btn > img {
  28709. width: 15px;
  28710. transition: 0.3s;
  28711. transform: rotate(0deg);
  28712. }
  28713. .close_btn_voice > img{
  28714. transform: rotate(180deg);
  28715. }
  28716. .resizable {
  28717. position: relative;
  28718. min-width: 350px; /* 最小宽度 */
  28719. max-width: 50%; /* 最大宽度 */
  28720. }
  28721. .resizer {
  28722. width: 12.8px;
  28723. height: 28.8px;
  28724. /* background: #ccc; */
  28725. position: absolute;
  28726. top: 50%;
  28727. left: 0;
  28728. cursor: ew-resize;
  28729. transform: translateY(-50%);
  28730. /* border-radius: 43px; */
  28731. background-image: url(../../../assets/icon/course/course_slide.png);
  28732. background-size: 100% 100%;
  28733. }
  28734. .pptBox{
  28735. position: fixed;
  28736. bottom: 10px;
  28737. left: 20px;
  28738. padding: 10px;
  28739. }
  28740. .pptBox > .box > div + div{
  28741. margin-top: 10px;
  28742. }
  28743. .ppClass{
  28744. background: #fff;
  28745. border-radius: 5px;
  28746. box-shadow: 0 0 6px 3px #00000030;
  28747. overflow: hidden;
  28748. }
  28749. .file-loading-class >>> .el-loading-spinner{
  28750. margin-top: -10px;
  28751. }
  28752. .file-loading-class >>> .el-loading-spinner .circular{
  28753. height: 20px;
  28754. width: 20px;
  28755. }
  28756. .button-toggle {
  28757. color: #007bff; /* 文本颜色 */
  28758. cursor: pointer; /* 鼠标悬停时显示手型 */
  28759. transition: color 0.2s; /* 文字颜色过渡效果 */
  28760. font-size: 14px;
  28761. }
  28762. .button-toggle:hover {
  28763. color: #0056b3; /* 悬停时的文字颜色 */
  28764. }
  28765. .button-toggle:focus {
  28766. outline: none; /* 去掉聚焦时的边框 */
  28767. }
  28768. .right_icon{
  28769. width: 12px;
  28770. height: 12px;
  28771. margin-left: 5px;
  28772. }
  28773. .buttonBoxB{
  28774. position: relative;
  28775. margin: 0 0 0 10px;
  28776. }
  28777. .buttonBoxB::after{
  28778. content: '';
  28779. display: block;
  28780. background-image: url(../../../assets/icon/course/downArrow.svg);
  28781. background-size: 100% 100%;
  28782. width: 15px;
  28783. height: 15px;
  28784. cursor: pointer;
  28785. margin-left: 5px;
  28786. }
  28787. .buttonBoxB:hover .buttonBox{
  28788. display: block;
  28789. }
  28790. .buttonBox {
  28791. position: absolute;
  28792. bottom: -0;
  28793. left: 0;
  28794. transform: translateY(100%);
  28795. background: #fff;
  28796. border-radius: 5px;
  28797. box-shadow: 0 0 3px 1px #e3e3e3;
  28798. width: 155px;
  28799. display: none;
  28800. z-index: 99999;
  28801. }
  28802. .buttonBox>div {
  28803. height: 40px;
  28804. line-height: 40px;
  28805. width: 100%;
  28806. text-align: center;
  28807. color: #000;
  28808. box-sizing: border-box;
  28809. }
  28810. .buttonBox>div+div {
  28811. border-top: 1px solid #e0e0e0;
  28812. }
  28813. .buttonBox>div:hover {
  28814. background: #f6f8ff;
  28815. }
  28816. </style>