addCourse.vue 1.2 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading"
  3. element-loading-text="小可正在努力生成中,请稍等...">
  4. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止
  5. </div>
  6. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken"
  7. @click="cancelAjax('teacherTask')">停止</div>
  8. <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
  9. <div class="courseTop">
  10. <!-- <div class="stepsNav">
  11. <el-breadcrumb separator-class="el-icon-arrow-right">
  12. <el-breadcrumb-item :to="{
  13. path:
  14. '/course?userid=' +
  15. userid +
  16. '&oid=' +
  17. oid +
  18. '&org=' +
  19. org +
  20. '&role=' +
  21. role,
  22. }">课程管理</el-breadcrumb-item>
  23. <el-breadcrumb-item>
  24. <span style="color: rgb(15, 126, 255)">添加课程</span>
  25. </el-breadcrumb-item>
  26. </el-breadcrumb>
  27. </div> -->
  28. <div class="r_pub_button_retrun" style="margin-left: auto" @click="retrunCourse">返回</div>
  29. </div>
  30. <div class="right" style="height: calc(100% - 36px); margin-top: 36px;"
  31. :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  32. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  33. <!-- @mouseenter="stepDisplay(true)"
  34. @mouseleave="stepDisplay(false)" -->
  35. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  36. <div class="stepBg" v-if="false">
  37. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  38. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  39. <div>
  40. <img src="../../../assets/icon/first.png" alt />
  41. </div>
  42. <div>填写基本信息</div>
  43. </div>
  44. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  45. <div>
  46. <img src="../../../assets/icon/firstNo.png" alt />
  47. </div>
  48. <div>填写基本信息</div>
  49. </div>
  50. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  51. </div>
  52. <!-- <div
  53. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  54. class="second"
  55. @click="navSteps(2)"
  56. >
  57. <div style="margin: 5px 10px 0 0; width: 2rem">
  58. <img src="../../../assets/icon/second.png" alt />
  59. </div>
  60. <div>选择课程模板</div>
  61. </div>
  62. <div
  63. v-else-if="cidType === 0 && isStepDisplay"
  64. class="secondNo"
  65. @click="navSteps(2)"
  66. >
  67. <div>
  68. <img src="../../../assets/icon/secondNo.png" alt />
  69. </div>
  70. <div>选择课程模板</div>
  71. </div> -->
  72. <!-- <div
  73. v-if="isStepDisplay"
  74. class="stepBorder"
  75. :class="{ 'border-active': steps > 2 }"
  76. ></div> -->
  77. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  78. <div>
  79. <img src="../../../assets/icon/third.png" alt />
  80. </div>
  81. <div>上传课程内容</div>
  82. </div>
  83. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  84. <div>
  85. <img src="../../../assets/icon/thirdNo.png" alt />
  86. </div>
  87. <div>上传课程内容</div>
  88. </div>
  89. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  90. <div v-if="steps > 3 && isStepDisplay" class="four">
  91. <div>
  92. <img src="../../../assets/icon/four.png" alt />
  93. </div>
  94. <div>上传完成</div>
  95. </div>
  96. <div v-else-if="isStepDisplay" class="fourNo">
  97. <div>
  98. <img src="../../../assets/icon/fourNo.png" alt />
  99. </div>
  100. <div>上传完成</div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  105. style="padding: 0" :style="{
  106. height:
  107. !isStepDisplay && !isBtnDisplay
  108. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  109. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  110. }">
  111. <!-- <div class="updateMask" :style="{
  112. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  113. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  114. <div class="whiteBg" style="background: unset; padding: 0">
  115. <div>
  116. <div class="basic_box" style="padding: 0">
  117. <div class="big_box">
  118. <div class="left_first">
  119. <div :class="{
  120. updateTips:
  121. cid && userid != courseUserid && role != '1',
  122. }">
  123. <div style="width: 100%">
  124. <div class="course_input_box2">
  125. <div class="course_input_box">
  126. <div class="bb_courseIcon">
  127. <img src="../../../assets/icon/new/course.png" />
  128. </div>
  129. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName"
  130. @change="setCover" />
  131. </div>
  132. <div style=" margin-bottom: 15px; display:flex;">
  133. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  134. style="justify-content: center; min-width: 150px;"></el-switch>
  135. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  136. style="justify-content: center; min-width: 175px"></el-switch>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  142. <span>类型</span>
  143. <!-- 学科+ 主题+ 未来+ -->
  144. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  145. style="display: flex; align-items: center">
  146. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  147. :key="index">
  148. <el-radio :label="item.name">{{
  149. item.name
  150. }}</el-radio>
  151. </div>
  152. </el-radio-group>
  153. </div>
  154. <div class="both">
  155. <div class="choose" v-if="oid != '91796dfb-8791-11ef-9b30-005056b86db5'">
  156. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  157. <span v-if="
  158. CourseTypeJson[item.id].length > 0 &&
  159. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  160. ? pTypeCheck.indexOf(item.id) != -1
  161. : true)
  162. ">{{ item.name }}:</span>
  163. <el-checkbox-group v-model="courseTypeId" @change="typeChange" v-if="
  164. CourseTypeJson[item.id].length > 0 &&
  165. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  166. ? pTypeCheck.indexOf(item.id) != -1
  167. : true)
  168. ">
  169. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  170. item1.name }}</el-checkbox>
  171. </el-checkbox-group>
  172. <!-- <div
  173. v-else
  174. style="font-size: 14px; margin-left: -8px"
  175. >
  176. 暂无
  177. </div> -->
  178. </div>
  179. </div>
  180. </div>
  181. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  182. <div class="info_box_t_box">
  183. <span>输出语言:</span>
  184. <el-radio-group v-model="languageSetting" style="display: flex; align-items: center"
  185. @change="changeLang">
  186. <div class="all_choose info_radio">
  187. <el-radio :label="0">简体中文</el-radio>
  188. </div>
  189. <div class="all_choose info_radio" style="margin-left: 10px">
  190. <el-radio :label="1">繁体中文</el-radio>
  191. </div>
  192. <div class="all_choose info_radio" style="margin-left: 10px">
  193. <el-radio :label="2">English</el-radio>
  194. </div>
  195. </el-radio-group>
  196. </div>
  197. </div>
  198. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  199. <div class="info_box_t_box">
  200. <!-- <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  201. style="justify-content: center; min-width: 175px"></el-switch> -->
  202. <span>生成模式:</span>
  203. <el-radio-group v-model="isuseT" style="display: flex; align-items: center"
  204. @change="changeIsuseT">
  205. <div class="all_choose info_radio">
  206. <el-radio :label="false">从零开始生成</el-radio>
  207. </div>
  208. <div class="all_choose info_radio" style="margin-left: 10px">
  209. <el-radio :label="true">从已有教案生成</el-radio>
  210. </div>
  211. <div class="all_choose info_radio" style="margin-left: 10px">
  212. <el-radio :label="1">对话模式生成</el-radio>
  213. </div>
  214. <div class="all_choose info_radio" style="margin-left: 10px">
  215. <el-radio :label="2">头脑风暴模式生成</el-radio>
  216. </div>
  217. </el-radio-group>
  218. </div>
  219. </div>
  220. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  221. <div class="info_box_t_box">
  222. <span>生成风格:</span>
  223. <div class="mode_box">
  224. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  225. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  226. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  227. </div>
  228. </div>
  229. </div>
  230. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  231. <div class="info_box_t_box">
  232. <span>课程节数:</span>
  233. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  234. <span>节</span>
  235. </div>
  236. <div class="info_box_t_box">
  237. <span>课程时长:</span>
  238. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  239. <span>min</span>
  240. </div>
  241. </div> -->
  242. </div>
  243. <div class="right_first" v-loading="imageloading2">
  244. <!-- <div class="ai_box">
  245. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  246. </div> -->
  247. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  248. 上传封面
  249. </div>
  250. <div style="width: 100%">
  251. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  252. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  253. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  254. <div v-if="cover.length == 0">点击添加封面</div>
  255. <div class="cover_mask">
  256. <img src="../../../assets/icon/new/cover_update.png" /><span
  257. style="margin-top: 5px">修改封面</span>
  258. </div>
  259. </div>
  260. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  261. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  262. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  263. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  264. <i class="el-icon-plus"></i>
  265. </el-upload> -->
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  273. <div class="whiteBg" style="border-radius: 0">
  274. <div class="c_info_title">
  275. 课程权限设置
  276. </div>
  277. <div class="wb_j_box">
  278. <div class="wb_j_box_content">
  279. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  280. (dialogVisibleClass = true),
  281. (classSearch = ''),
  282. (gradeId = ''),
  283. getClass()
  284. ">添加班级</button>
  285. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  286. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  287. getClassC(tc) }}</span>
  288. </div> -->
  289. <div class="wb_j_box_btn" @click="
  290. (dialogVisibleClass = true),
  291. (classSearch = ''),
  292. (gradeId = ''),
  293. getClass()
  294. ">
  295. <div class="wb_j_box_title">授课班级</div>
  296. <div class="wb_j_box_btn_c">
  297. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  298. v-if="checkboxList2.length" popper-class="text_tooltip2">
  299. <div class="wb_j_box_span">
  300. {{ getListClassC(checkboxList2) }}
  301. </div>
  302. </el-tooltip>
  303. <div v-else class="wb_j_box_span">请选择授课班级</div>
  304. <div class="wb_j_box_arrow"></div>
  305. </div>
  306. </div>
  307. </div>
  308. <div class="wb_j_box_content">
  309. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  310. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  311. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  312. checkBoolean
  313. ? checkboxList3
  314. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  315. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  316. </div> -->
  317. <div class="wb_j_box_btn" @click="openMember">
  318. <div class="wb_j_box_title">协同人员</div>
  319. <div class="wb_j_box_btn_c">
  320. <!-- <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  321. v-if="checkboxList3.length" popper-class="text_tooltip2"> -->
  322. <div class="wb_j_box_span" v-if="checkboxList3.length">
  323. {{ getListMan2(checkboxList3) }}
  324. </div>
  325. <!-- </el-tooltip> -->
  326. <div v-else class="wb_j_box_span">请选择协同人员</div>
  327. <div class="wb_j_box_arrow"></div>
  328. </div>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  334. <div class="c_info_title">目标管理</div>
  335. <div style="margin: 0 auto; padding: 0 20px">
  336. <div style="
  337. width: 95%;
  338. min-height: 200px;
  339. border: 1px solid #cad1dc;
  340. border-radius: 4px;
  341. position: relative;
  342. ">
  343. <div class="e_add_top">
  344. <div class="e_add_title">
  345. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  346. 清除
  347. </button>
  348. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  349. 添加
  350. </button>
  351. <!-- <span>当前使用目标管理</span>
  352. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  353. <img
  354. src="../../../assets/line.png"
  355. class="cru_line"
  356. style="
  357. width: 125px;
  358. height: 20px;
  359. bottom: -10px;
  360. left: 155px;
  361. "
  362. /> -->
  363. </div>
  364. <div style="
  365. display: flex;
  366. flex-direction: row;
  367. align-items: center;
  368. ">
  369. <!-- <el-button
  370. type="primary"
  371. size="small"
  372. @click="dialogVisiblemb = true"
  373. >添加目标管理</el-button
  374. >
  375. <el-button
  376. type="primary"
  377. size="small"
  378. @click="deleteEva()"
  379. >清除内容</el-button
  380. > -->
  381. <!-- <div class="e_add_delete" @click="deleteEva()">
  382. <img src="../../../assets/icon/delete.png" alt="" />
  383. </div> -->
  384. </div>
  385. </div>
  386. <div v-if="evalua == ''">
  387. <div class="noneBox">
  388. <img src="../../../assets/icon/new/eva_none.png" />
  389. <span>请添加目标管理</span>
  390. </div>
  391. </div>
  392. <div class="e_add_content" v-else>
  393. <div class="e_add_list_pbox">
  394. <div class="e_add_list_pbox_title">
  395. <span class="type_title">切换模式</span>
  396. <div class="type_content">
  397. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  398. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  399. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  400. </div>
  401. </div>
  402. <div class="e_add_list_pbox_content">
  403. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  404. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  405. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  406. v-if="typeMode == 3">
  407. </SeeBoard>
  408. </div>
  409. </div>
  410. </div>
  411. </div>
  412. </div>
  413. </div>
  414. </div>
  415. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  416. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  417. <div style="position: relative;
  418. background: #fff;
  419. box-sizing: border-box;
  420. padding: 1px 20px 10px;
  421. width: 100%;
  422. border-radius: 10px;">
  423. <div style="
  424. display: flex;
  425. flex-direction: row;
  426. justify-content: space-between;
  427. align-items: center;
  428. " :style="{
  429. margin: true
  430. ? '20px 0 10px'
  431. : '20px 0 0',
  432. }">
  433. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  434. 已有教案
  435. <div class="add_info_box" style="margin: 0 0 0 auto">
  436. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  437. 上传已有教案
  438. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  439. style="display: none" v-if="inputShow" @change="
  440. beforeUploadInfo2(
  441. $event,
  442. 14
  443. )
  444. " />
  445. </button>
  446. <button class="c_pub_button_add" @click="clickGenTT"
  447. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  448. 一键智能总结生成
  449. </button>
  450. </div>
  451. </div>
  452. </div>
  453. <div>
  454. <div class="add_chapters_box add_c_none" v-if="
  455. teacherInfoData &&
  456. teacherInfoData.length == 0
  457. ">
  458. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  459. <span>暂时还没有内容,快去添加吧</span>
  460. </div>
  461. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  462. <div @dragstart="
  463. dragStart(item1, index1, 0)
  464. " @dragover.prevent="
  465. dragOver(index1, 0)
  466. " @dragend="dragEnd()" :draggable="isdrag ==
  467. 'chapter-' + 0 + '-' + index1
  468. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  469. getChapterData(
  470. $event,
  471. index1,
  472. item1.type
  473. )
  474. " :class="{
  475. dragOverTop2:
  476. newIndex === index1 &&
  477. typeIndex ==
  478. 'chapter-' +
  479. 0 +
  480. '-' +
  481. index1 &&
  482. oldIndex > index1 &&
  483. dragType == 'drag',
  484. dragOverBottom2:
  485. newIndex === index1 &&
  486. typeIndex ==
  487. 'chapter-' +
  488. 0 +
  489. '-' +
  490. index1 &&
  491. oldIndex < index1 &&
  492. dragType == 'drag',
  493. }">
  494. <div class="chapter_upload_o" style="
  495. position: relative;
  496. display: flex;
  497. align-items: center;
  498. ">
  499. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  500. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  501. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  502. </div>
  503. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  504. </div>
  505. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  506. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  507. </div>
  508. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  509. </div>
  510. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  511. </div>
  512. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  513. </div>
  514. </div>
  515. <div class="chapter_upload_n">
  516. <input readonly="true" v-if="
  517. item1.type == 2 ||
  518. item1.type == 3 ||
  519. item1.type == 12 ||
  520. item1.type == 13 ||
  521. item1.type == 7
  522. " :placeholder="item1.name" style="
  523. border: none;
  524. outline: none;
  525. width: 80%;
  526. minwidth: 215px;
  527. z-index: 99;
  528. font-size: 14px;
  529. white-space: nowrap;
  530. overflow: hidden;
  531. text-overflow: ellipsis;
  532. " />
  533. </div>
  534. <div class="chapter_upload_ic">
  535. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  536. <div class="chapter_upload_ic_r" @click.stop="
  537. deleteTeacherInfoData(
  538. $event,
  539. index1
  540. )
  541. ">
  542. <div></div>
  543. </div>
  544. </div>
  545. </div>
  546. </div>
  547. </div>
  548. </div>
  549. <div v-if="
  550. teacherinfoproVisible
  551. " class="mask">
  552. <div class="progressBox">
  553. <div class="lbox">
  554. <img src="../../../assets/loading.gif" />上传中,请稍后
  555. </div>
  556. <div style="margin-bottom: 10px">
  557. <span>{{
  558. teacherinfoisFinishSize
  559. }}</span>
  560. /
  561. <span>{{
  562. teacherinfoisAllSize
  563. }}</span>
  564. </div>
  565. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  566. ? teacherinfoprogress
  567. : 0
  568. " style="width: 80%"></el-progress> -->
  569. </div>
  570. </div>
  571. </div>
  572. </div>
  573. <div class="whiteBg" :style="{ minHeight: teacherTextLoading ? '250px' : 'auto'}"
  574. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;position: relative"
  575. v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..."
  576. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  577. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken"
  578. @click="cancelAjax('teacherText')">停止</div>
  579. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  580. <div class="c_info_title">
  581. 已有教案摘要
  582. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  583. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  584. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '右键已有教案摘要-提取摘要按钮')"
  585. @click="openAiDialog(2, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '点击已有教案摘要-提取摘要按钮')">提取摘要</button>
  586. </el-tooltip>
  587. </div>
  588. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  589. <div style="width: calc(100%);" class='op_task_box'>
  590. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  591. v-model="teacherCourseText" placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  592. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText"
  593. v-else-if="teacherTextLoading"></div>
  594. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  595. <div class="op_box" :class="{op_box_isquote: isQuote['aiteacherTextDetail']}">
  596. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  597. <div class="op_box_right">
  598. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  599. <div class="r_pub_button_op"
  600. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '右键已有教案摘要-智能优化按钮')"
  601. @click="openAiDialog(2, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '点击已有教案摘要-智能优化按钮')">
  602. 智能优化</div>
  603. </el-tooltip>
  604. <div class="r_pub_button_edit" style="margin-left:10px"
  605. @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击已有教案摘要-确定/编辑按钮')">
  606. {{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  607. <el-switch style="margin-left: 10px" v-model="isQuote['aiteacherTextDetail']" active-text="引用"
  608. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  609. @change="handleSwitchChange('aiteacherTextDetail'), addCourseBehavior('courseBehavior', '点击已有教案摘要-引用按钮')"></el-switch>
  610. </div>
  611. </div>
  612. </div>
  613. </div>
  614. </div>
  615. </div>
  616. <div class="whiteBg" :style="{ minHeight: targetTextLoading ? '250px' : 'auto'}"
  617. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading"
  618. element-loading-text="小可正在努力生成中,请稍等..."
  619. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  620. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1"
  621. @click="cancelAjax('target1')">停止</div>
  622. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  623. <div class="c_info_title">
  624. 课程目标
  625. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  626. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  627. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '右键课程目标-提取目标按钮')"
  628. @click="openAiDialog(2, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '点击课程目标-提取目标按钮')">提取目标</button>
  629.                   </el-tooltip>
  630. </div>
  631. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  632. <div style="width: calc(100%);" class='op_task_box'>
  633. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  634. v-model="targetCourseText" placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  635. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText"
  636. v-else-if="targetTextLoading"></div>
  637. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  638. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail']}">
  639. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  640. <div class="op_box_right">
  641. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  642. <div class="r_pub_button_op"
  643. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  644. @click="openAiDialog(2, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">
  645. 智能优化</div>
  646. </el-tooltip>
  647. <div class="r_pub_button_edit" style="margin-left:10px"
  648. @click="targetCourseTextB = !targetCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">
  649. {{ targetCourseTextB ? '确定' : '编辑'}}</div>
  650. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail']" active-text="引用"
  651. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  652. @change="handleSwitchChange('aitargetTextDetail'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  653. </div>
  654. </div>
  655. </div>
  656. </div>
  657. </div>
  658. </div>
  659. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  660. <div style="position: relative;
  661. background: #fff;
  662. box-sizing: border-box;
  663. padding: 1px 20px 10px;
  664. width: 100%;
  665. border-radius: 10px;">
  666. <div style="
  667. display: flex;
  668. flex-direction: row;
  669. justify-content: space-between;
  670. align-items: center;
  671. " :style="{
  672. margin: true
  673. ? '20px 0 10px'
  674. : '20px 0 0',
  675. }">
  676. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  677. 系统推荐参考资料
  678. <div class="add_info_box" style="margin: 0 0 0 auto">
  679. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  680. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  681. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  682. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  683.  </el-tooltip>
  684. </div>
  685. </div>
  686. </div>
  687. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  688. <div class="add_chapters_box add_c_none" v-if="
  689. cankaoInfoData &&
  690. cankaoInfoData.length == 0
  691. ">
  692. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  693. <span>暂时还没有内容,快去添加吧</span>
  694. </div>
  695. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  696. <div @dragstart="
  697. dragStart(item1, index1, 0)
  698. " @dragover.prevent="
  699. dragOver(index1, 0)
  700. " @dragend="dragEnd()" :draggable="isdrag ==
  701. 'chapter-' + 0 + '-' + index1
  702. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  703. getChapterData(
  704. $event,
  705. index1,
  706. item1.type
  707. )
  708. " :class="{
  709. dragOverTop2:
  710. newIndex === index1 &&
  711. typeIndex ==
  712. 'chapter-' +
  713. 0 +
  714. '-' +
  715. index1 &&
  716. oldIndex > index1 &&
  717. dragType == 'drag',
  718. dragOverBottom2:
  719. newIndex === index1 &&
  720. typeIndex ==
  721. 'chapter-' +
  722. 0 +
  723. '-' +
  724. index1 &&
  725. oldIndex < index1 &&
  726. dragType == 'drag',
  727. }">
  728. <div class="chapter_upload_o" style="
  729. position: relative;
  730. display: flex;
  731. align-items: center;
  732. ">
  733. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  734. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  735. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  736. </div>
  737. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  738. </div>
  739. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  740. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  741. </div>
  742. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  743. </div>
  744. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  745. </div>
  746. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  747. </div>
  748. </div>
  749. <div class="chapter_upload_n">
  750. <input readonly="true" v-if="
  751. item1.type == 2 ||
  752. item1.type == 3 ||
  753. item1.type == 12 ||
  754. item1.type == 13 ||
  755. item1.type == 7
  756. " :placeholder="item1.name" style="
  757. border: none;
  758. outline: none;
  759. width: 80%;
  760. minwidth: 215px;
  761. z-index: 99;
  762. font-size: 14px;
  763. white-space: nowrap;
  764. overflow: hidden;
  765. text-overflow: ellipsis;
  766. " />
  767. </div>
  768. <div class="chapter_upload_ic">
  769. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  770. <div class="chapter_upload_ic_r" @click.stop="
  771. deleteCankaoInfoData(
  772. $event,
  773. index1
  774. )
  775. ">
  776. <div></div>
  777. </div>
  778. </div>
  779. </div>
  780. </div>
  781. </div>
  782. </div>
  783. </div>
  784. </div>
  785. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  786. v-if="(!yiKeTemplateArray.includes(templateid))">
  787. <div style="position: relative;
  788. background: #fff;
  789. box-sizing: border-box;
  790. padding: 1px 20px 10px;
  791. width: 100%;
  792. border-radius: 10px;">
  793. <div style="
  794. display: flex;
  795. flex-direction: row;
  796. justify-content: space-between;
  797. align-items: center;
  798. " :style="{
  799. margin: true
  800. ? '20px 0 10px'
  801. : '20px 0 0',
  802. }">
  803. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  804. 参考标准
  805. <div class="add_info_box" style="margin: 0 0 0 auto">
  806. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  807. 上传参考标准
  808. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  809. style="display: none" v-if="inputShow" @change="
  810. beforeUploadInfo2(
  811. $event,
  812. 19
  813. )
  814. " />
  815. </button>
  816. </div>
  817. </div>
  818. </div>
  819. <div>
  820. <div class="add_chapters_box add_c_none" v-if="
  821. knowInfoData &&
  822. knowInfoData.length == 0
  823. ">
  824. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  825. <span>暂时还没有内容,快去添加吧</span>
  826. </div>
  827. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  828. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
  829. getChapterData(
  830. $event,
  831. index1,
  832. item1.type
  833. )
  834. ">
  835. <div class="chapter_upload_o" style="
  836. position: relative;
  837. display: flex;
  838. align-items: center;
  839. ">
  840. <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }"
  841. @click="checkKnowInfoData(item1.fileid)"></div>
  842. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  843. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  844. <div v-if="item1.type == 3 || item1.type == 16" class="chapter_upload_l_i3" style="margin-left: 1px">
  845. </div>
  846. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  847. </div>
  848. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  849. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  850. </div>
  851. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  852. </div>
  853. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  854. </div>
  855. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  856. </div>
  857. </div>
  858. <div class="chapter_upload_n">
  859. <input readonly="true" v-if="
  860. item1.type == 2 ||
  861. item1.type == 3 ||
  862. item1.type == 12 ||
  863. item1.type == 13 ||
  864. item1.type == 7
  865. " :placeholder="item1.name" @click.stop="
  866. checkChpater3($event, index1, item1)
  867. " style="
  868. border: none;
  869. outline: none;
  870. width: 80%;
  871. minwidth: 215px;
  872. z-index: 99;
  873. font-size: 14px;
  874. white-space: nowrap;
  875. overflow: hidden;
  876. text-overflow: ellipsis;
  877. " />
  878. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  879. border: none;
  880. outline: none;
  881. width: 80%;
  882. white-space: nowrap;
  883. overflow: hidden;
  884. text-overflow: ellipsis;
  885. " readonly="true" @click="
  886. selectAttText(index1)
  887. " />
  888. <input :placeholder="item1.title ? item1.title : '链接'
  889. " v-if="item1.type == 8" style="
  890. border: none;
  891. outline: none;
  892. width: 80%;
  893. white-space: nowrap;
  894. overflow: hidden;
  895. text-overflow: ellipsis;
  896. " readonly="true" @click="selectLine(index1)" />
  897. <input :placeholder="item1.title ? item1.title : '链接'
  898. " v-if="item1.type == 14" style="
  899. border: none;
  900. outline: none;
  901. width: 80%;
  902. white-space: nowrap;
  903. overflow: hidden;
  904. text-overflow: ellipsis;
  905. " readonly="true" @click="
  906. openUpdateSource(index1)
  907. " />
  908. </div>
  909. <div class="chapter_upload_ic">
  910. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  911. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  912. checkChpater3($event, index1, item1)
  913. ">
  914. <div></div>
  915. </div>
  916. <div class="chapter_upload_ic_r" @click.stop="
  917. deleteKnowInfoData(
  918. $event,
  919. index1
  920. )
  921. ">
  922. <div></div>
  923. </div>
  924. </div>
  925. </div>
  926. </div>
  927. </div>
  928. </div>
  929. <div v-if="
  930. knowinfoproVisible
  931. " class="mask">
  932. <div class="progressBox">
  933. <div class="lbox">
  934. <img src="../../../assets/loading.gif" />上传中,请稍后
  935. </div>
  936. <div style="margin-bottom: 10px">
  937. <span>{{
  938. knowinfoisFinishSize
  939. }}</span>
  940. /
  941. <span>{{
  942. knowinfoisAllSize
  943. }}</span>
  944. </div>
  945. </div>
  946. </div>
  947. </div>
  948. </div>
  949. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;"
  950. v-if="(!yiKeTemplateArray.includes(templateid))" :style="{padding: interFindPan ? '0 0 15px' : '0 0 0'}">
  951. <div style="position: relative;
  952. background: #fff;
  953. box-sizing: border-box;
  954. width: 100%;
  955. border-radius: 10px;" :style="{padding: interFindPan ? '1px 20px 10px' : '1px 20px 1px'}">
  956. <div style="
  957. display: flex;
  958. flex-direction: row;
  959. justify-content: space-between;
  960. align-items: center;
  961. " :style="{
  962. margin: true
  963. ? '20px 0 10px'
  964. : '20px 0 0',
  965. }">
  966. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  967. 检索资料
  968. <div class="add_info_box" style="margin: 0 0 0 auto;align-items:center">
  969. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  970. @click="interFindPan = !interFindPan,forceUpdate2()">{{ interFindPan ? '折叠' : '展开'}}</button>
  971. </div>
  972. </div>
  973. </div>
  974. <div class="know_serach" v-show="interFindPan">
  975. <div class="know_serach_box" v-if="getTypeC(2).length || getTypeC(1).length">
  976. <span>检索项:</span>
  977. <el-select v-if="getTypeC(2).length" v-model="typeC1" placeholder="请选择年级" @change="forceUpdate()" style="width: 150px;margin-right: 10px;" clearable multiple :collapse-tags="true" :collapse-tags-tooltip="true">
  978. <el-option v-for="(e, eIndex) in getTypeC(2)" :key="eIndex" :label="e" :value="e">
  979. </el-option>
  980. </el-select>
  981. <el-select v-if="getTypeC(1).length" v-model="typeC2" placeholder="请选择学科" @change="forceUpdate()" style="width: 150px;margin-right: 10px;" clearable multiple :collapse-tags="true" :collapse-tags-tooltip="true">
  982. <el-option v-for="(e, eIndex) in getTypeC(1)" :key="eIndex" :label="e" :value="e">
  983. </el-option>
  984. </el-select>
  985. </div>
  986. <div class="know_serach_box">
  987. <span>检索关键词:</span>
  988. <input type="text" placeholder="请输入检索关键词" class="binfo_input" v-model="searchFileName"
  989. style="width: 100%;margin: 0 5px 0 0;min-height: 36px;box-sizing: border-box;height: 36px;" />
  990. <button class="c_pub_button_add" @click="startFindMatchingContents">点击检索资料</button>
  991. </div>
  992. <!-- <div class="know_serach_box" v-if="getTypeC(2)">
  993. <span>筛选年级:</span>
  994. <div>{{getTypeC(2)}}</div>
  995. </div>
  996. <div class="know_serach_box" v-if="getTypeC(1)">
  997. <span>筛选学科:</span>
  998. <div>{{getTypeC(1)}}</div>
  999. </div> -->
  1000. <div class="know_serach_box" v-if="this.knowInfoData3.length">
  1001. <span>筛选项:</span>
  1002. <el-select v-model="knowFileType1" placeholder="请选择册数" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1003. <el-option v-for="(e, eIndex) in knowFileTypeArray1" :key="eIndex" :label="e" :value="e">
  1004. </el-option>
  1005. </el-select>
  1006. <el-select v-model="knowFileType2" placeholder="请选择单元" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1007. <el-option v-for="(e, eIndex) in 10" :key="eIndex" :label="`第${e}单元`" :value="e">
  1008. </el-option>
  1009. </el-select>
  1010. <el-select v-model="knowFileType" placeholder="请选择类型" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1011. <el-option v-for="(e, eIndex) in getKnowType()" :key="eIndex" :label="e" :value="e">
  1012. </el-option>
  1013. </el-select>
  1014. <button class="c_pub_button_confirm" style="margin: 0 10px 0 0px;" @click="knowFileType1 = '',knowFileType2 = '',knowFileType = ''">重置</button>
  1015. <button v-loading="isfindMatchingContents" class="c_pub_button_confirm" style="margin: 0 0 0 0px;" @click="panFind" v-if="findMatchingContentsPage != 1">下一页</button>
  1016. <button class="c_pub_button_stopeped" style="margin: 0 0 0 10px;" @click="cancelAjax('findMatchingContents')" v-if="isfindMatchingContents">停止</button>
  1017. </div>
  1018. </div>
  1019. <div style="display: flex; align-items: center;" v-show="interFindPan">
  1020. <div v-loading="knowInfoDataLoading" element-loading-text="小可正在努力生成中,请稍等..."
  1021. style="height: 400px; width:calc(50% - 50px);">
  1022. <div class="c_pub_button_confirm stopBtn" v-if="knowInfoDataLoading && isfindMatchingContents"
  1023. @click="cancelAjax('findMatchingContents')">停止</div>
  1024. <div class="add_chapters_check_box" v-if="allknowInfoData3() && allknowInfoData3().length">
  1025. <div class="add_chapters_check" @click="checkAllKnowInfoData3()">
  1026. <div class="chapter_upload_check" :class="{ checked: panknowInfoData3CheckAll() }"></div>
  1027. <div style="margin-left: 5px">全选</div>
  1028. </div>
  1029. </div>
  1030. <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
  1031. allknowInfoData3() &&
  1032. allknowInfoData3().length == 0
  1033. ">
  1034. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1035. <span>暂时还没有内容,快去检索吧</span>
  1036. </div>
  1037. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:calc(100% - 50px);overflow: auto;padding: 0;">
  1038. <div class="chapter_upload">
  1039. <div class="chapter_upload_o" style="position: relative; display: flex; align-items: center; padding: 0 10px;box-sizing: border-box;">
  1040. <div class="chapter_upload_check" style="min-width: 50px; background: unset;text-align: center; font-size: 14px;">选中</div>
  1041. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1042. <div class="chapter_upload_l_i2" style="background: unset"></div>
  1043. </div>
  1044. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px); margin-top:0">
  1045. <div class="chapter_upload_box" style="color: #000">文件名</div>
  1046. </div>
  1047. <div class="chapter_upload_type">文件类型</div>
  1048. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center; font-size: 14px;">操作</div>
  1049. </div>
  1050. </div>
  1051. <!-- @scroll="panFind" -->
  1052. <div class="chapter_upload_box_file">
  1053. <div class="chapter_upload" v-for="(item1, index1) in allknowInfoData3()" :key="item1.id" @click="
  1054. getChapterData(
  1055. $event,
  1056. index1,
  1057. item1.type
  1058. )
  1059. ">
  1060. <div class="chapter_upload_o" style="
  1061. position: relative;
  1062. display: flex;
  1063. align-items: center;
  1064. padding: 0 10px;
  1065. box-sizing: border-box;
  1066. ">
  1067. <div class="chapter_upload_check file-loading-class"
  1068. :class="{ checked: knowFileids3.indexOf(item1.url) != -1 }"
  1069. @click="checkKnowInfoData3(item1.url)" style="min-width: 50px;text-align: center;background-size: 15px 15px;background-repeat: no-repeat;background-position: center;"></div>
  1070. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1071. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1072. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1073. </div>
  1074. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1075. </div>
  1076. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1077. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1078. </div>
  1079. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1080. </div>
  1081. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1082. </div>
  1083. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1084. </div>
  1085. </div>
  1086. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px)">
  1087. <el-tooltip :content="item1.name" placement="top" effect="dark">
  1088. <!-- content to trigger tooltip here -->
  1089. <div v-if="
  1090. item1.type == 2 ||
  1091. item1.type == 3 ||
  1092. item1.type == 12 ||
  1093. item1.type == 13 ||
  1094. item1.type == 7
  1095. " @click.stop="
  1096. checkChpater3($event, index1, item1)
  1097. " class="chapter_upload_box" >{{ item1.name }}</div>
  1098. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  1099. selectAttText(index1)
  1100. " >{{ item1.name }}</div>
  1101. <div v-if="item1.type == 8" class="chapter_upload_box" @click="selectLine(index1)" >{{ item1.title ? item1.title : '链接' }}</div>
  1102. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  1103. openUpdateSource(index1)
  1104. " >{{ item1.title ? item1.title : '链接' }}</div>
  1105. </el-tooltip>
  1106. </div>
  1107. <div class="chapter_upload_type">
  1108. {{ item1.file_type }}
  1109. </div>
  1110. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center;margin:0 10px 0px auto;">
  1111. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1112. <div class="chapter_upload_ic_check" style="margin: 0" v-if="item1.type == 3" @click.stop="
  1113. checkChpater3($event, index1, item1)
  1114. ">
  1115. <div></div>
  1116. </div>
  1117. <!-- <div class="chapter_upload_ic_r" @click.stop="
  1118. deleteKnowInfoData3(
  1119. $event,
  1120. index1
  1121. )
  1122. ">
  1123. <div></div>
  1124. </div> -->
  1125. </div>
  1126. </div>
  1127. </div>
  1128. </div>
  1129. </div>
  1130. </div>
  1131. <div style="margin: 0 5px; min-width: fit-content">
  1132. <button class="c_pub_button_confirm" @click="useUrl">
  1133. 使用
  1134. <svg t="1730970226429" class="right_icon" viewBox="0 0 1024 1024" version="1.1"
  1135. xmlns="http://www.w3.org/2000/svg" p-id="1465" width="128" height="128">
  1136. <path
  1137. d="M236.552013 926.853955a55.805997 55.805997 0 0 0 0 80.454996 59.682997 59.682997 0 0 0 82.794996 0l468.099978-455.081978a55.805997 55.805997 0 0 0 0-80.453996L319.348009 16.689999a59.682997 59.682997 0 0 0-82.794996 0 55.805997 55.805997 0 0 0 0 80.454996L663.401993 511.999975 236.624013 926.853955z"
  1138. p-id="1466" fill="#ffffff"></path>
  1139. </svg>
  1140. </button>
  1141. </div>
  1142. <div style="height: 400px; width:calc(50% - 50px);position: relative;">
  1143. <div class="add_chapters_check_box" v-if="knowInfoData2 && knowInfoData2.length">
  1144. <div class="add_chapters_check" @click="checkAllKnowInfoData2()" v-if="knowInfoData2 && knowInfoData2.length">
  1145. <div class="chapter_upload_check" :class="{ checked: knowFileids2.length == knowInfoData2.length }"></div>
  1146. <div style="margin-left: 5px">全选</div>
  1147. </div>
  1148. <button v-if="knowFileids2.length" class="c_pub_button_confirm" style="margin: 0 0 0 10px;" @click="deleteCheckAllKnowInfoData2()">删除</button>
  1149. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)" style="margin: 0 0 0 auto;">
  1150. 上传知识库
  1151. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1152. style="display: none" v-if="inputShow" @change="beforeUploadInfo2($event, 20)" />
  1153. </button>
  1154. </div>
  1155. <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
  1156. knowInfoData2 &&
  1157. knowInfoData2.length == 0
  1158. ">
  1159. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1160. <span>暂时还没有内容,快去添加吧</span>
  1161. </div>
  1162. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:calc(100% - 50px);overflow: auto;padding: 0;" ref="rightKnow">
  1163. <div class="chapter_upload">
  1164. <div class="chapter_upload_o" style="position: relative; display: flex; align-items: center; padding: 0 10px;box-sizing: border-box;">
  1165. <div class="chapter_upload_check" style="min-width: 50px; background: unset;text-align: center; font-size: 14px;">选中</div>
  1166. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1167. <div class="chapter_upload_l_i2" style="background: unset"></div>
  1168. </div>
  1169. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px); margin-top:0">
  1170. <div class="chapter_upload_box" style="color: #000">文件名</div>
  1171. </div>
  1172. <div class="chapter_upload_type">文件类型</div>
  1173. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center; font-size: 14px;">操作</div>
  1174. </div>
  1175. </div>
  1176. <div class="chapter_upload_box_file">
  1177. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData2" :key="item1.id" @click="
  1178. getChapterData(
  1179. $event,
  1180. index1,
  1181. item1.type
  1182. )
  1183. ">
  1184. <div class="chapter_upload_o" style="
  1185. position: relative;
  1186. display: flex;
  1187. align-items: center;
  1188. padding: 0 10px;
  1189. box-sizing: border-box;
  1190. ">
  1191. <div class="chapter_upload_check file-loading-class"
  1192. :class="{ checked: knowFileids2.indexOf(item1.fileid) != -1 }"
  1193. @click="checkKnowInfoData2(item1.fileid)" v-loading="!item1.fileid" style="min-width: 50px;text-align: center;background-size: 15px 15px;background-repeat: no-repeat;background-position: center;"></div>
  1194. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1195. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1196. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1197. </div>
  1198. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1199. </div>
  1200. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1201. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1202. </div>
  1203. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1204. </div>
  1205. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1206. </div>
  1207. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1208. </div>
  1209. </div>
  1210. <div class="chapter_upload_n" style="width: calc(100% - 80px - 80px - 116px - 20px)">
  1211. <el-tooltip :content="item1.name" placement="top" effect="dark">
  1212. <!-- content to trigger tooltip here -->
  1213. <div v-if="
  1214. item1.type == 2 ||
  1215. item1.type == 3 ||
  1216. item1.type == 12 ||
  1217. item1.type == 13 ||
  1218. item1.type == 7
  1219. " @click.stop="
  1220. checkChpater3($event, index1, item1)
  1221. " class="chapter_upload_box">{{ item1.name }}</div>
  1222. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  1223. selectAttText(index1)
  1224. ">{{ item1.name }}</div>
  1225. <div v-if="item1.type == 8" class="chapter_upload_box" @click="selectLine(index1)">{{ item1.title ? item1.title : '链接' }}</div>
  1226. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  1227. openUpdateSource(index1)
  1228. ">{{ item1.title ? item1.title : '链接' }}</div>
  1229. </el-tooltip>
  1230. </div>
  1231. <div class="chapter_upload_type">
  1232. {{ item1.file_type ? item1.file_type : '无'}}
  1233. </div>
  1234. <div class="chapter_upload_ic" style="width:80px;min-width: 80px;justify-content: center;margin:0 10px 0px auto;">
  1235. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1236. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1237. checkChpater3($event, index1, item1)
  1238. ">
  1239. <div></div>
  1240. </div>
  1241. <div class="chapter_upload_ic_r" @click.stop="
  1242. deleteKnowInfoData2(
  1243. $event,
  1244. index1
  1245. )
  1246. ">
  1247. <div></div>
  1248. </div>
  1249. </div>
  1250. </div>
  1251. </div>
  1252. </div>
  1253. </div>
  1254. <div v-if="
  1255. knowinfoproVisible2
  1256. " class="mask">
  1257. <div class="progressBox">
  1258. <div class="lbox">
  1259. <img src="../../../assets/loading.gif" />上传中,请稍后
  1260. </div>
  1261. <div style="margin-bottom: 10px">
  1262. <span>{{
  1263. knowinfoisFinishSize2
  1264. }}</span>
  1265. /
  1266. <span>{{
  1267. knowinfoisAllSize2
  1268. }}</span>
  1269. </div>
  1270. </div>
  1271. </div>
  1272. </div>
  1273. </div>
  1274. <!-- <div v-if="
  1275. knowinfoproVisible2
  1276. " class="mask">
  1277. <div class="progressBox">
  1278. <div class="lbox">
  1279. <img src="../../../assets/loading.gif" />上传中,请稍后
  1280. </div>
  1281. <div style="margin-bottom: 10px">
  1282. <span>{{
  1283. knowinfoisFinishSize2
  1284. }}</span>
  1285. /
  1286. <span>{{
  1287. knowinfoisAllSize2
  1288. }}</span>
  1289. </div>
  1290. </div>
  1291. </div> -->
  1292. </div>
  1293. </div>
  1294. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  1295. v-if="(!yiKeTemplateArray.includes(templateid)) && infoData2.length">
  1296. <div style="position: relative;
  1297. background: #fff;
  1298. box-sizing: border-box;
  1299. padding: 1px 20px 10px;
  1300. width: 100%;
  1301. border-radius: 10px;">
  1302. <div style="
  1303. display: flex;
  1304. flex-direction: row;
  1305. justify-content: space-between;
  1306. align-items: center;
  1307. " :style="{
  1308. margin: true
  1309. ? '20px 0 10px'
  1310. : '20px 0 0',
  1311. }">
  1312. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1313. 知识库
  1314. <div class="add_info_box" style="margin: 0 0 0 auto">
  1315. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1316. 上传补充资料
  1317. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1318. style="display: none" v-if="inputShow" @change="
  1319. beforeUploadInfo2(
  1320. $event,
  1321. 15
  1322. )
  1323. " />
  1324. </button>
  1325. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="knowFileids.length">
  1326. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1327. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  1328. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  1329.  </el-tooltip> -->
  1330. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1331. @click="openAiDialog(2, 'aiSearchFile2')" v-if="knowFileids.length">智能检索资料</button>
  1332. </div>
  1333. </div>
  1334. </div>
  1335. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等..."
  1336. :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  1337. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken"
  1338. @click="cancelAjax('file')">停止</div>
  1339. <div class="add_chapters_box add_c_none" v-if="
  1340. infoData2 &&
  1341. infoData2.length == 0
  1342. ">
  1343. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1344. <span>暂时还没有内容,快去添加吧</span>
  1345. </div>
  1346. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1347. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  1348. getChapterData(
  1349. $event,
  1350. index1,
  1351. item1.type
  1352. )
  1353. ">
  1354. <div class="chapter_upload_o" style="
  1355. position: relative;
  1356. display: flex;
  1357. align-items: center;
  1358. ">
  1359. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }"
  1360. @click="checkInfoData(item1.fileid, item1)"></div>
  1361. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1362. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1363. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1364. </div>
  1365. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1366. </div>
  1367. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1368. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1369. </div>
  1370. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1371. </div>
  1372. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1373. </div>
  1374. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1375. </div>
  1376. </div>
  1377. <div class="chapter_upload_n">
  1378. <input readonly="true" v-if="
  1379. item1.type == 2 ||
  1380. item1.type == 3 ||
  1381. item1.type == 12 ||
  1382. item1.type == 13 ||
  1383. item1.type == 7
  1384. " :placeholder="item1.name" @click.stop="
  1385. checkChpater2($event, index1 )
  1386. " style="
  1387. border: none;
  1388. outline: none;
  1389. width: 80%;
  1390. minwidth: 215px;
  1391. z-index: 99;
  1392. font-size: 14px;
  1393. white-space: nowrap;
  1394. overflow: hidden;
  1395. text-overflow: ellipsis;
  1396. " />
  1397. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1398. border: none;
  1399. outline: none;
  1400. width: 80%;
  1401. white-space: nowrap;
  1402. overflow: hidden;
  1403. text-overflow: ellipsis;
  1404. " readonly="true" @click="
  1405. selectAttText(index1)
  1406. " />
  1407. <input :placeholder="item1.title ? item1.title : '链接'
  1408. " v-if="item1.type == 8" style="
  1409. border: none;
  1410. outline: none;
  1411. width: 80%;
  1412. white-space: nowrap;
  1413. overflow: hidden;
  1414. text-overflow: ellipsis;
  1415. " readonly="true" @click="selectLine(index1)" />
  1416. <input :placeholder="item1.title ? item1.title : '链接'
  1417. " v-if="item1.type == 14" style="
  1418. border: none;
  1419. outline: none;
  1420. width: 80%;
  1421. white-space: nowrap;
  1422. overflow: hidden;
  1423. text-overflow: ellipsis;
  1424. " readonly="true" @click="
  1425. openUpdateSource(index1)
  1426. " />
  1427. </div>
  1428. <div class="chapter_upload_ic">
  1429. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1430. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1431. checkChpater2($event, index1 )
  1432. ">
  1433. <div></div>
  1434. </div>
  1435. <div class="chapter_upload_ic_r" @click.stop="
  1436. deleteInfoData2(
  1437. $event,
  1438. index1
  1439. )
  1440. ">
  1441. <div></div>
  1442. </div>
  1443. </div>
  1444. </div>
  1445. </div>
  1446. </div>
  1447. </div>
  1448. <div v-if="
  1449. infoproVisible
  1450. " class="mask">
  1451. <div class="progressBox">
  1452. <div class="lbox">
  1453. <img src="../../../assets/loading.gif" />上传中,请稍后
  1454. </div>
  1455. <div style="margin-bottom: 10px">
  1456. <span>{{
  1457. infoisFinishSize
  1458. }}</span>
  1459. /
  1460. <span>{{
  1461. infoisAllSize
  1462. }}</span>
  1463. </div>
  1464. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1465. ? infoprogress
  1466. : 0
  1467. " style="width: 80%"></el-progress> -->
  1468. </div>
  1469. </div>
  1470. </div>
  1471. </div>
  1472. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="(isuseT === 2)">
  1473. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1474. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1475. 课程概况<span class="inter_setting" @click="openInterPanSetting2" v-if="istemplate == 1"></span>
  1476. <div class="inter_setting_panel" v-show="interSetting">
  1477. <div class="panel_title">配置工作流</div>
  1478. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1479. <div class="panel_input">
  1480. <input type="text" :placeholder="'请输入agentid'" class="binfo_input" v-model="r_agentid" />
  1481. <div class="panel_input_record">
  1482. <span>议程和问题引导</span>
  1483. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordstart"
  1484. placeholder="议程和问题引导"></textarea>
  1485. </div>
  1486. <div class="panel_input_record">
  1487. <span>查看进度</span>
  1488. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordCheckJindu"
  1489. placeholder="查看进度"></textarea>
  1490. </div>
  1491. <div class="panel_input_record">
  1492. <span>总结并生成课程概况</span>
  1493. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordCourseD"
  1494. placeholder="总结并生成课程概况"></textarea>
  1495. </div>
  1496. </div>
  1497. <div class="panel_button" style="justify-content: flex-end;">
  1498. <button class="c_pub_button_confirm" @click="setAgentid2" style="margin-right: 10px;">确认</button>
  1499. <button class="c_pub_button_return" @click="cancelInterSetting2">取消</button>
  1500. </div>
  1501. </div>
  1502. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1503. @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1504. </div>
  1505. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1506. <div style="width: calc(100%);height: 100%" class='op_task_box inter_voiceBox'>
  1507. <recordV :videoText2.sync="recordVideoText" :audioUrl2.sync="recordAudioUrl"></recordV>
  1508. </div>
  1509. <div class="inter_box" v-show="interPan" style="margin: 0 0 0 10px;max-width: 50%;max-height:500px;">
  1510. <aiBoxCourseDetail v-if="aiJson.recordAgentid && chatid" :languageSetting="languageSetting"
  1511. :courseId="chatid" :courseText2.sync="courseText" :viedoText="recordVideoText"
  1512. :agentid="aiJson.recordAgentid" :recordstart="aiJson.recordstart"
  1513. :recordCheckJindu="aiJson.recordCheckJindu" :recordCourseD="aiJson.recordCourseD"
  1514. :courseInfo="course_info" :fileids='[...knowFileids, ...knowFileids2]'></aiBoxCourseDetail>
  1515. </div>
  1516. </div>
  1517. </div>
  1518. </div>
  1519. <div class="whiteBg" :style="{ minHeight: textLoading ? '250px' : 'auto'}"
  1520. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading"
  1521. element-loading-text="小可正在努力生成中,请稍等..."
  1522. v-if="(!(isuseT === true) && !(isuseT === 1) && !(isuseT === 2) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid)) || (isuseT === 2 && courseText)">
  1523. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken"
  1524. @click="cancelAjax('text')">停止</div>
  1525. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1526. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  1527. 课程简要描述
  1528. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1529. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1530. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1), addCourseBehavior('courseBehavior', '右键课程简要描述-AI优化按钮')"
  1531. @click="openAiDialog(2, 'aiDetail',1), addCourseBehavior('courseBehavior', '点击课程简要描述-AI优化按钮')">AI优化</button>
  1532. </el-tooltip>
  1533. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;"
  1534. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">生成概况和目标</button>
  1535. </div>
  1536. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1537. <div style="width: calc(100%);" class='op_task_box'>
  1538. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1539. placeholder="请输入课程简要描述" v-if="courseTextB" @change="textAreaChange('courseText')"></textarea>
  1540. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText"
  1541. v-else-if="textLoading"></div>
  1542. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  1543. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1544. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1545. <div class="op_box_right">
  1546. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1547. <div class="r_pub_button_op"
  1548. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2), addCourseBehavior('courseBehavior', '右键课程简要描述-智能优化按钮')"
  1549. @click="openAiDialog(2, 'aiDetail', 2), addCourseBehavior('courseBehavior', '点击课程简要描述-智能优化按钮')">
  1550. 智能优化</div>
  1551. </el-tooltip>
  1552. <div class="r_pub_button_edit" style="margin-left:10px"
  1553. @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程简要描述-确定/编辑按钮')">
  1554. {{ courseTextB ? '确定' : '编辑'}}</div>
  1555. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用"
  1556. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  1557. @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程简要描述-引用按钮')"></el-switch>
  1558. </div>
  1559. </div>
  1560. </div>
  1561. </div>
  1562. </div>
  1563. </div>
  1564. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading"
  1565. element-loading-text="小可正在努力生成中,请稍等..." v-if="(isuseT === 1)">
  1566. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1567. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1568. 课程概况<span class="inter_setting" @click="openInterPanSetting"></span>
  1569. <div class="inter_setting_panel" v-show="interSetting">
  1570. <div class="panel_title">配置工作流</div>
  1571. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1572. <div class="panel_input">
  1573. <input type="text" :placeholder="this.aiJson.agentid ? this.aiJson.agentid : '请输入agentid'"
  1574. class="binfo_input" v-model="agentid" />
  1575. </div>
  1576. <div class="panel_button">
  1577. <button class="c_pub_button_confirm" @click="setAgentid">确认</button>
  1578. <button class="c_pub_button_confirm" @click="rebuildAgentid" v-if="istemplate != 1">复原</button>
  1579. <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
  1580. </div>
  1581. </div>
  1582. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1583. @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1584. </div>
  1585. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1586. <div class="inter_box" v-show="interPan">
  1587. <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl"
  1588. frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
  1589. </div>
  1590. <div style="width: calc(100%);height: 100%" class='op_task_box'
  1591. :class="{inter_Detailbox: !courseTextB && interPan}">
  1592. <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
  1593. placeholder="请输入课程简要描述" v-if="courseTextB && interPan"
  1594. @change="textAreaChange('courseText')"></textarea>
  1595. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1596. placeholder="请输入课程简要描述" v-else-if="courseTextB && !interPan"
  1597. @change="textAreaChange('courseText')"></textarea>
  1598. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText"
  1599. :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-else-if="textLoading"></div>
  1600. <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}"
  1601. v-html="MarkdownT(courseText)" v-else></div>
  1602. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1603. <div class="op_remark"></div>
  1604. <div class="op_box_right">
  1605. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1606. <div class="r_pub_button_op"
  1607. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1608. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1609. </el-tooltip> -->
  1610. <div class="r_pub_button_edit" style="margin-left:10px"
  1611. @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程概况-确定/编辑按钮')">
  1612. {{ courseTextB ? '确定' : '编辑'}}</div>
  1613. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用"
  1614. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  1615. @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程概况-引用按钮')"></el-switch>
  1616. </div>
  1617. </div>
  1618. </div>
  1619. </div>
  1620. </div>
  1621. </div>
  1622. <div class="whiteBg" :style="{ minHeight: targetTextLoading2 ? '250px' : 'auto'}"
  1623. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2"
  1624. element-loading-text="小可正在努力生成中,请稍等..."
  1625. v-if="((!(isuseT === true) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1626. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2"
  1627. @click="cancelAjax('target2')">停止</div>
  1628. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1629. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  1630. 课程目标
  1631. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  1632. 上传补充资料
  1633. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1634. style="display: none" v-if="inputShow" @change="
  1635. beforeUploadInfo2(
  1636. $event,
  1637. 16
  1638. )
  1639. " />
  1640. </button>
  1641. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  1642. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1643. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  1644. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  1645. </el-tooltip>
  1646. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1647. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1648. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '右键课程目标-生成目标按钮')"
  1649. @click="openAiDialog(2, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '点击课程目标-生成目标按钮')"
  1650. ref="aitargetTextDetail3">生成目标</button>
  1651. </el-tooltip>
  1652. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  1653. <div class="add_chapters_box add_c_none" v-if="
  1654. mubiaoInfoData &&
  1655. mubiaoInfoData.length == 0
  1656. ">
  1657. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1658. <span>暂时还没有内容,快去添加吧</span>
  1659. </div>
  1660. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1661. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  1662. getChapterData(
  1663. $event,
  1664. index1,
  1665. item1.type
  1666. )
  1667. ">
  1668. <div class="chapter_upload_o" style="
  1669. position: relative;
  1670. display: flex;
  1671. align-items: center;
  1672. ">
  1673. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1674. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1675. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1676. </div>
  1677. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1678. </div>
  1679. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1680. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1681. </div>
  1682. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1683. </div>
  1684. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1685. </div>
  1686. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1687. </div>
  1688. </div>
  1689. <div class="chapter_upload_n">
  1690. <input readonly="true" v-if="
  1691. item1.type == 2 ||
  1692. item1.type == 3 ||
  1693. item1.type == 12 ||
  1694. item1.type == 13 ||
  1695. item1.type == 7
  1696. " :placeholder="item1.name" @click.stop="
  1697. checkChpater3($event, index1, item1)
  1698. " style="
  1699. border: none;
  1700. outline: none;
  1701. width: 80%;
  1702. minwidth: 215px;
  1703. z-index: 99;
  1704. font-size: 14px;
  1705. white-space: nowrap;
  1706. overflow: hidden;
  1707. text-overflow: ellipsis;
  1708. " />
  1709. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1710. border: none;
  1711. outline: none;
  1712. width: 80%;
  1713. white-space: nowrap;
  1714. overflow: hidden;
  1715. text-overflow: ellipsis;
  1716. " readonly="true" @click="
  1717. selectAttText(index1)
  1718. " />
  1719. <input :placeholder="item1.title ? item1.title : '链接'
  1720. " v-if="item1.type == 8" style="
  1721. border: none;
  1722. outline: none;
  1723. width: 80%;
  1724. white-space: nowrap;
  1725. overflow: hidden;
  1726. text-overflow: ellipsis;
  1727. " readonly="true" @click="selectLine(index1)" />
  1728. <input :placeholder="item1.title ? item1.title : '链接'
  1729. " v-if="item1.type == 14" style="
  1730. border: none;
  1731. outline: none;
  1732. width: 80%;
  1733. white-space: nowrap;
  1734. overflow: hidden;
  1735. text-overflow: ellipsis;
  1736. " readonly="true" @click="
  1737. openUpdateSource(index1)
  1738. " />
  1739. </div>
  1740. <div class="chapter_upload_ic">
  1741. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1742. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1743. checkChpater3($event, index1, item1)
  1744. ">
  1745. <div></div>
  1746. </div>
  1747. <div class="chapter_upload_ic_r" @click.stop="
  1748. deletemubiaoInfoData(
  1749. $event,
  1750. index1
  1751. )
  1752. ">
  1753. <div></div>
  1754. </div>
  1755. </div>
  1756. </div>
  1757. </div>
  1758. </div>
  1759. </div>
  1760. <div v-if="
  1761. mubiaoinfoproVisible
  1762. " class="mask">
  1763. <div class="progressBox">
  1764. <div class="lbox">
  1765. <img src="../../../assets/loading.gif" />上传中,请稍后
  1766. </div>
  1767. <div style="margin-bottom: 10px">
  1768. <span>{{
  1769. mubiaoinfoisFinishSize
  1770. }}</span>
  1771. /
  1772. <span>{{
  1773. mubiaoinfoisAllSize
  1774. }}</span>
  1775. </div>
  1776. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1777. ? mubiaoinfoprogress
  1778. : 0
  1779. " style="width: 80%"></el-progress> -->
  1780. </div>
  1781. </div>
  1782. </div>
  1783. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1784. <div style="width: calc(100%);" class='op_task_box'>
  1785. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  1786. v-model="targetCourseText2" placeholder="请输入课程目标" v-if="targetCourseText2B"
  1787. @change="textAreaChange('targetCourseText2')"></textarea>
  1788. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2"
  1789. v-else-if="targetTextLoading2"></div>
  1790. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1791. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail2']}">
  1792. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1793. <div class="op_box_right">
  1794. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1795. <div class="r_pub_button_op"
  1796. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  1797. @click="openAiDialog(2, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">
  1798. 智能优化</div>
  1799. </el-tooltip>
  1800. <div class="r_pub_button_edit" style="margin-left:10px"
  1801. @click="targetCourseText2B = !targetCourseText2B,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">
  1802. {{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1803. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail2']" active-text="引用"
  1804. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  1805. @change="handleSwitchChange('aitargetTextDetail2'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  1806. </div>
  1807. </div>
  1808. </div>
  1809. </div>
  1810. </div>
  1811. </div>
  1812. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  1813. v-if="yiKeTemplateArray.includes(templateid)">
  1814. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1815. <div class="c_info_title">
  1816. 补充资料
  1817. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1818. </div>
  1819. <div class="buchong_box">
  1820. <span>暂时还没有内容,快去添加吧~</span>
  1821. </div>
  1822. </div> -->
  1823. <div style="position: relative;
  1824. background: #fff;
  1825. box-sizing: border-box;
  1826. padding: 1px 20px 10px;
  1827. width: 100%;
  1828. border-radius: 10px;">
  1829. <div style="
  1830. display: flex;
  1831. flex-direction: row;
  1832. justify-content: space-between;
  1833. align-items: center;
  1834. " :style="{
  1835. margin: true
  1836. ? '20px 0 10px'
  1837. : '20px 0 0',
  1838. }">
  1839. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1840. 补充资料
  1841. <div class="add_info_box" style="margin: 0 0 0 auto">
  1842. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1843. 上传补充资料
  1844. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  1845. style="display: none" v-if="inputShow" @change="
  1846. beforeUploadInfo2(
  1847. $event,
  1848. 13
  1849. )
  1850. " />
  1851. </button>
  1852. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1853. 图文
  1854. </button>
  1855. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1856. 链接
  1857. </button>
  1858. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1859. 代码
  1860. </button>
  1861. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1862. 资源
  1863. </button> -->
  1864. </div>
  1865. </div>
  1866. </div>
  1867. <div>
  1868. <div class="add_chapters_box add_c_none" v-if="
  1869. infoData &&
  1870. infoData.length == 0
  1871. ">
  1872. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1873. <span>暂时还没有内容,快去添加吧</span>
  1874. </div>
  1875. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1876. <div @dragstart="
  1877. dragStart(item1, index1, 0)
  1878. " @dragover.prevent="
  1879. dragOver(index1, 0)
  1880. " @dragend="dragEnd()" :draggable="isdrag ==
  1881. 'chapter-' + 0 + '-' + index1
  1882. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1883. getChapterData(
  1884. $event,
  1885. index1,
  1886. item1.type
  1887. )
  1888. " :class="{
  1889. dragOverTop2:
  1890. newIndex === index1 &&
  1891. typeIndex ==
  1892. 'chapter-' +
  1893. 0 +
  1894. '-' +
  1895. index1 &&
  1896. oldIndex > index1 &&
  1897. dragType == 'drag',
  1898. dragOverBottom2:
  1899. newIndex === index1 &&
  1900. typeIndex ==
  1901. 'chapter-' +
  1902. 0 +
  1903. '-' +
  1904. index1 &&
  1905. oldIndex < index1 &&
  1906. dragType == 'drag',
  1907. }">
  1908. <!-- <div @mousedown="
  1909. isdrag =
  1910. 'chapter-' + 0 + '-' + index1
  1911. " @mouseup="isdrag = ''" @touchstart="
  1912. isdrag =
  1913. 'chapter-' + 0 + '-' + index1
  1914. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1915. <div class="chapter_upload_o" style="
  1916. position: relative;
  1917. display: flex;
  1918. align-items: center;
  1919. ">
  1920. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1921. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1922. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1923. </div>
  1924. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1925. </div>
  1926. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1927. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1928. </div>
  1929. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1930. </div>
  1931. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1932. </div>
  1933. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1934. </div>
  1935. </div>
  1936. <div class="chapter_upload_n">
  1937. <input readonly="true" v-if="
  1938. item1.type == 2 ||
  1939. item1.type == 3 ||
  1940. item1.type == 12 ||
  1941. item1.type == 13 ||
  1942. item1.type == 7
  1943. " :placeholder="item1.name" @click="
  1944. updataVideoT(
  1945. $event,
  1946. index1
  1947. )
  1948. " style="
  1949. border: none;
  1950. outline: none;
  1951. width: 80%;
  1952. minwidth: 215px;
  1953. z-index: 99;
  1954. font-size: 14px;
  1955. white-space: nowrap;
  1956. overflow: hidden;
  1957. text-overflow: ellipsis;
  1958. " />
  1959. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1960. border: none;
  1961. outline: none;
  1962. width: 80%;
  1963. white-space: nowrap;
  1964. overflow: hidden;
  1965. text-overflow: ellipsis;
  1966. " readonly="true" @click="
  1967. selectAttText(index1)
  1968. " />
  1969. <input :placeholder="item1.title ? item1.title : '链接'
  1970. " v-if="item1.type == 8" style="
  1971. border: none;
  1972. outline: none;
  1973. width: 80%;
  1974. white-space: nowrap;
  1975. overflow: hidden;
  1976. text-overflow: ellipsis;
  1977. " readonly="true" @click="selectLine(index1)" />
  1978. <input :placeholder="item1.title ? item1.title : '链接'
  1979. " v-if="item1.type == 14" style="
  1980. border: none;
  1981. outline: none;
  1982. width: 80%;
  1983. white-space: nowrap;
  1984. overflow: hidden;
  1985. text-overflow: ellipsis;
  1986. " readonly="true" @click="
  1987. openUpdateSource(index1)
  1988. " />
  1989. </div>
  1990. <div class="chapter_upload_ic">
  1991. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1992. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1993. <div class="chapter_upload_up" @click="
  1994. upCd(
  1995. $event,
  1996. index1
  1997. )
  1998. "></div>
  1999. <div class="chapter_upload_down" @click="
  2000. downCd(
  2001. $event,
  2002. index1
  2003. )
  2004. "></div>
  2005. </div>
  2006. <div class="chapter_upload_ic_edit" v-if="
  2007. item1.type == 2 ||
  2008. item1.type == 3 ||
  2009. item1.type == 12 ||
  2010. item1.type == 13 ||
  2011. item1.type == 7
  2012. " @click.stop="
  2013. updataVideoT(
  2014. $event,
  2015. index1
  2016. )
  2017. ">
  2018. <div></div>
  2019. </div>
  2020. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2021. selectAttText(index1)
  2022. ">
  2023. <div></div>
  2024. </div>
  2025. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2026. @click="selectLine(index1)">
  2027. <div></div>
  2028. </div>
  2029. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2030. openUpdateSource(index1)
  2031. ">
  2032. <div></div>
  2033. </div> -->
  2034. <div class="chapter_upload_ic_r" @click.stop="
  2035. deleteInfoData(
  2036. $event,
  2037. index1
  2038. )
  2039. ">
  2040. <div></div>
  2041. </div>
  2042. </div>
  2043. </div>
  2044. </div>
  2045. </div>
  2046. </div>
  2047. <div v-if="
  2048. infoproVisible
  2049. " class="mask">
  2050. <div class="progressBox">
  2051. <!-- <div id="closePro" class="closeCss">
  2052. <img src="../../../../assets/icon/close.png" alt />
  2053. </div> -->
  2054. <div class="lbox">
  2055. <img src="../../../assets/loading.gif" />上传中,请稍后
  2056. </div>
  2057. <div style="margin-bottom: 10px">
  2058. <span>{{
  2059. infoisFinishSize
  2060. }}M</span>
  2061. /
  2062. <span>{{
  2063. infoisAllSize
  2064. }}M</span>
  2065. </div>
  2066. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  2067. ? infoprogress
  2068. : 0
  2069. " style="width: 80%"></el-progress>
  2070. </div>
  2071. </div>
  2072. </div>
  2073. </div>
  2074. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  2075. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2076. <div class="c_info_title">
  2077. 补充描述
  2078. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2079. </div>
  2080. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  2081. <div style="width: calc(100%)">
  2082. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  2083. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  2084. </div>
  2085. </div>
  2086. </div>
  2087. </div>
  2088. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2089. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3' && isOutline">
  2090. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2091. <div class="c_info_title">
  2092. 课程大纲
  2093. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  2094. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2095. @contextmenu.prevent="openAiDialog(1, 'aiOutline')" @click="openAiDialog(2, 'aiOutline')"
  2096. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  2097. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2098. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')" @click="openAiDialog(2, 'aiOutline2')"
  2099. v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  2100. </el-tooltip>
  2101. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2102. @click="openAiDialog2(2, 'aiOutline'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')"
  2103. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">{{panOutline() > 0 ?
  2104. '重新生成大纲' : '生成大纲'}}</button>
  2105. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2106. @click="openAiDialog2(2, 'aiOutline2'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')"
  2107. v-if="(templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">{{panOutline() > 0
  2108. ? '重新生成大纲' : '生成大纲'}}</button>
  2109. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2110. </div>
  2111. <div class="task_outline">
  2112. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  2113. <div class="outline_task">
  2114. <div class="title">任务{{ index + 1 }}</div>
  2115. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2116. v-model="item.task" />
  2117. <div class="outline_btn">
  2118. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2119. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2120. @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)"
  2121. @click="openAiDialog(2, 'aiOutlineDetail2', index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-${item.taskDetail2 ? '重新生成任务' : '生成任务'}按钮`)">{{
  2122. item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  2123. </el-tooltip>
  2124. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2125. @click="addTaskBorder2(1, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在上面加入一个任务按钮`)">在上面加入一个任务</button>
  2126. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2127. @click="addTaskBorder2(2, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在下面加入一个任务按钮`)">在下面加入一个任务</button>
  2128. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;"
  2129. @click="deleteTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-删除按钮`)"
  2130. v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  2131. </div>
  2132. </div>
  2133. <div class="outline_detail"
  2134. :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}"
  2135. v-loading="taskDetailLoading.indexOf('task-' + index) !== -1"
  2136. element-loading-text="小可正在努力生成中,请稍等...">
  2137. <div div class="c_pub_button_confirm stopBtn"
  2138. v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]"
  2139. @click="cancelAjax('outlineTask', index)">停止</div>
  2140. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2141. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"
  2142. @change="textAreaChange('taskDetail2', index)"></textarea>
  2143. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2"
  2144. v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  2145. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  2146. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail1-'+index]}">
  2147. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2148. <div class="op_box_right">
  2149. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2150. <div class="r_pub_button_op"
  2151. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `右键课程大纲-任务${index + 1}-智能优化按钮`)"
  2152. @click="openAiDialog(2, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-智能优化按钮`)">
  2153. 智能优化</div>
  2154. </el-tooltip>
  2155. <div class="r_pub_button_edit" style="margin-left:10px"
  2156. @click="editTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-确定/编辑按钮`)">
  2157. {{
  2158. item.isTask2 ? '确定' : '编辑'}}</div>
  2159. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail1-'+index]" active-text="引用"
  2160. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2161. @change="handleSwitchChange('aiDetail1-'+index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-引用按钮`)"></el-switch>
  2162. </div>
  2163. </div>
  2164. </div>
  2165. </div>
  2166. </div>
  2167. </div>
  2168. </div>
  2169. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2170. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 0 || istemplate == 1)">
  2171. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2172. <div class="c_info_title">
  2173. 概念群
  2174. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2175. @click="openAiDialog2(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-重新生成概念群按钮`)">{{cpote.cpote1
  2176. ? '重新生成概念群' : '生成概念群'}}</button>
  2177. </div>
  2178. <div class="task_outline">
  2179. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  2180. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  2181. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  2182. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1"
  2183. v-else-if="cpotetLoading.cpote1"></div>
  2184. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  2185. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote1']}">
  2186. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2187. <div class="op_box_right">
  2188. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2189. <div class="r_pub_button_op"
  2190. @contextmenu.prevent="openAiDialog(1, 'aiCpote1'), addCourseBehavior('courseBehavior', `右键概念群-智能优化按钮`)"
  2191. @click="openAiDialog(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-智能优化按钮`)">
  2192. 智能优化</div>
  2193. </el-tooltip>
  2194. <div class="r_pub_button_edit" style="margin-left:10px"
  2195. @click="editCpote('cpote1s'), addCourseBehavior('courseBehavior', `点击概念群-确定/编辑按钮`)">{{
  2196. cpote.cpote1s ? '确定' : '编辑'}}</div>
  2197. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote1']" active-text="引用"
  2198. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2199. @change="handleSwitchChange('aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-引用按钮`)"></el-switch>
  2200. </div>
  2201. </div>
  2202. </div>
  2203. </div>
  2204. </div>
  2205. </div>
  2206. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2207. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 1 || istemplate == 1)">
  2208. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2209. <div class="c_info_title">
  2210. 问题链
  2211. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2212. @click="openAiDialog2(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-重新生成问题链按钮`)">{{cpote.cpote2
  2213. ? '重新生成问题链' : '生成问题链'}}</button>
  2214. </div>
  2215. <div class="task_outline">
  2216. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  2217. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  2218. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  2219. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2"
  2220. v-else-if="cpotetLoading.cpote2"></div>
  2221. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  2222. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote2']}">
  2223. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2224. <div class="op_box_right">
  2225. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2226. <div class="r_pub_button_op"
  2227. @contextmenu.prevent="openAiDialog(1, 'aiCpote2'), addCourseBehavior('courseBehavior', `右键问题链-智能优化按钮`)"
  2228. @click="openAiDialog(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-智能优化按钮`)">
  2229. 智能优化</div>
  2230. </el-tooltip>
  2231. <div class="r_pub_button_edit" style="margin-left:10px"
  2232. @click="editCpote('cpote2s'), addCourseBehavior('courseBehavior', `点击问题链-确定/编辑按钮`)">{{
  2233. cpote.cpote2s ? '确定' : '编辑'}}</div>
  2234. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote2']" active-text="引用"
  2235. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2236. @change="handleSwitchChange('aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-引用按钮`)"></el-switch>
  2237. </div>
  2238. </div>
  2239. </div>
  2240. </div>
  2241. </div>
  2242. </div>
  2243. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2244. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 2 || istemplate == 1)">
  2245. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2246. <div class="c_info_title">
  2247. 目标层
  2248. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2249. @click="openAiDialog2(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-重新生成目标层按钮`)">{{cpote.cpote3
  2250. ? '重新生成目标层' : '生成目标层'}}</button>
  2251. </div>
  2252. <div class="task_outline">
  2253. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  2254. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  2255. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  2256. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3"
  2257. v-else-if="cpotetLoading.cpote3"></div>
  2258. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  2259. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote3']}">
  2260. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2261. <div class="op_box_right">
  2262. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2263. <div class="r_pub_button_op"
  2264. @contextmenu.prevent="openAiDialog(1, 'aiCpote3'), addCourseBehavior('courseBehavior', `右键目标层-智能优化按钮`)"
  2265. @click="openAiDialog(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-智能优化按钮`)">
  2266. 智能优化</div>
  2267. </el-tooltip>
  2268. <div class="r_pub_button_edit" style="margin-left:10px"
  2269. @click="editCpote('cpote3s'), addCourseBehavior('courseBehavior', `点击目标层-确定/编辑按钮`)">{{
  2270. cpote.cpote3s ? '确定' : '编辑'}}</div>
  2271. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote3']" active-text="引用"
  2272. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2273. @change="handleSwitchChange('aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-引用按钮`)"></el-switch>
  2274. </div>
  2275. </div>
  2276. </div>
  2277. </div>
  2278. </div>
  2279. </div>
  2280. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  2281. v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 3 || istemplate == 1)">
  2282. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2283. <div class="c_info_title">
  2284. 任务簇
  2285. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2286. @click="openAiDialog2(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-重新生成任务簇按钮`)">{{cpote.cpote4
  2287. ? '重新生成任务簇' : '生成任务簇'}}</button>
  2288. </div>
  2289. <div class="task_outline">
  2290. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  2291. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  2292. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  2293. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4"
  2294. v-else-if="cpotetLoading.cpote4"></div>
  2295. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  2296. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote4']}">
  2297. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2298. <div class="op_box_right">
  2299. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2300. <div class="r_pub_button_op"
  2301. @contextmenu.prevent="openAiDialog(1, 'aiCpote4'), addCourseBehavior('courseBehavior', `右键任务簇-智能优化按钮`)"
  2302. @click="openAiDialog(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-智能优化按钮`)">
  2303. 智能优化</div>
  2304. </el-tooltip>
  2305. <div class="r_pub_button_edit" style="margin-left:10px"
  2306. @click="editCpote('cpote4s'), addCourseBehavior('courseBehavior', `点击任务簇-确定/编辑按钮`)">{{
  2307. cpote.cpote4s ? '确定' : '编辑'}}</div>
  2308. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote4']" active-text="引用"
  2309. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2310. @change="handleSwitchChange('aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-引用按钮`)"></el-switch>
  2311. </div>
  2312. </div>
  2313. </div>
  2314. </div>
  2315. </div>
  2316. </div>
  2317. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  2318. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2319. <div class="c_info_title">
  2320. 教案
  2321. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  2322. v-if="istemplate == 1 && dArray.length && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  2323. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2324. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  2325. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  2326. </el-tooltip>
  2327. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2328. @click="openAiDialog2(2, 'aiTeacher2'), addCourseBehavior('courseBehavior', `点击教案-重新生成教案按钮`)"
  2329. v-if="istemplate != 1">重新生成教案</button>
  2330. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  2331. v-if="panTeacher() == 0 && istemplate == 1 && (templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3')">
  2332. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2333. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  2334. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  2335. </el-tooltip>
  2336. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2337. </div>
  2338. <div class="task_outline">
  2339. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  2340. <div class="outline_task">
  2341. <div class="title">任务{{ index + 1 }}</div>
  2342. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2343. v-model="item.task" />
  2344. </div>
  2345. <div class="outline_detail"
  2346. :style="{ minHeight: taskDetailLoading5.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}"
  2347. v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1"
  2348. element-loading-text="小可正在努力生成中,请稍等...">
  2349. <div div class="c_pub_button_confirm stopBtn"
  2350. v-if="taskDetailLoading5.indexOf('task-' + index) !== -1"
  2351. @click="cancelAjax('teacherDetail2', index)">停止</div>
  2352. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  2353. v-model="item.taskDetail3" v-if="item.isTask3"
  2354. @change="textAreaChange('taskDetail3', index)"></textarea>
  2355. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3"
  2356. v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  2357. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  2358. <div class="op_box" :class="{op_box_isquote: isQuote['teacherDetail2-'+index]}">
  2359. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2360. <div class="op_box_right">
  2361. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2362. <div class="r_pub_button_op"
  2363. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `右键教案-任务${index + 1}-智能优化按钮`)"
  2364. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-智能优化按钮`)">
  2365. 智能优化</div>
  2366. </el-tooltip>
  2367. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  2368. item.isTask3 ? '确定' : '编辑'}}</div>
  2369. <el-switch style="margin-left: 10px" v-model="isQuote['teacherDetail2-'+index]"
  2370. active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  2371. @change="handleSwitchChange('teacherDetail2-'+index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-引用按钮`)"></el-switch>
  2372. </div>
  2373. </div>
  2374. </div>
  2375. </div>
  2376. </div>
  2377. </div>
  2378. </div>
  2379. <div class="info_btnBox3" v-if="istemplate != 1">
  2380. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2381. goTo(
  2382. '/course?userid=' +
  2383. userid +
  2384. '&oid=' +
  2385. oid +
  2386. '&org=' +
  2387. org +
  2388. '&role=' +
  2389. role
  2390. )
  2391. ">
  2392. 返回课程
  2393. </button>
  2394. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2395. {{ steps == 4 ? "返回课程" : "上一步" }}
  2396. </button>
  2397. <button class="c_pub_button_confirm"
  2398. v-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"
  2399. @click="clickGenTT2">
  2400. {{isuseT === true ? "重新生成概况和目标" : "生成概况和目标"}}
  2401. </button>
  2402. <button class="c_pub_button_confirm"
  2403. v-else-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))"
  2404. @click="clickGenTT2">
  2405. {{isuseT === true ? "重新生成概况" : "生成概况"}}
  2406. </button>
  2407. <button class="c_pub_button_confirm" v-if="isOutline2" @click="exportTeachPlan">
  2408. {{ "导出教案" }}
  2409. </button>
  2410. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  2411. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  2412. <button class="c_pub_button_confirm" @click="nextSteps(2)" @contextmenu.prevent="nextSteps(1)"
  2413. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"
  2414. :class="{
  2415. pub_btn_next_img: steps != 3,
  2416. pub_btn_finish_img: steps == 3,
  2417. }">
  2418. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  2419. </button>
  2420. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)" @contextmenu.prevent="nextSteps(1)"
  2421. :class="{
  2422. pub_btn_next_img: steps != 3,
  2423. pub_btn_finish_img: steps == 3,
  2424. }">
  2425. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid ==
  2426. "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ? cpoteType < 3 ? cpoteType < 2 ? cpoteType
  2427. < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案" : "下一步" }} </button>
  2428. </el-tooltip>
  2429. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  2430. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  2431. pub_btn_next_img: steps != 3,
  2432. pub_btn_finish_img: steps == 3,
  2433. }">下一步2</button>
  2434. </el-tooltip> -->
  2435. </div>
  2436. </div>
  2437. <div class="rightBox" v-if="steps == 2" :style="{
  2438. height:
  2439. !isStepDisplay && !isBtnDisplay
  2440. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  2441. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2442. }">
  2443. <div class="basic_box" style="
  2444. padding: 20px 30px 0px !important;
  2445. box-sizing: border-box;
  2446. height: calc(100% - 80px);
  2447. overflow: auto;
  2448. background: #fff;
  2449. ">
  2450. <!-- <div
  2451. style="
  2452. color: #b8b8b8;
  2453. background: #fff;
  2454. width: 26%;
  2455. height: 40px;
  2456. border-radius: 15px;
  2457. padding-left: 20px;
  2458. line-height: 40px;
  2459. font-size: 17px;
  2460. box-shadow: 0px 1px 2px 2px #e0e0e0;
  2461. "
  2462. >-->
  2463. <div class="right_title" style="border: none; margin: 0; padding: 0">
  2464. 请选择合适的课程模板
  2465. </div>
  2466. <div class="wordbox">
  2467. <div class="wordTeacher" @click="checkTemplate2()">
  2468. <div class="wordPic">
  2469. <img src="../../../assets/icon/new/template_none.png" alt />
  2470. </div>
  2471. <div style="
  2472. margin-top: 10px;
  2473. line-height: 19px;
  2474. overflow: hidden;
  2475. text-overflow: ellipsis;
  2476. white-space: nowrap;
  2477. padding: 0 20px;
  2478. ">
  2479. 空白模板
  2480. </div>
  2481. </div>
  2482. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  2483. <div class="wordPic">
  2484. <img src="../../../assets/icon/new/template.png" alt />
  2485. </div>
  2486. <div style="
  2487. margin-top: 10px;
  2488. line-height: 19px;
  2489. overflow: hidden;
  2490. text-overflow: ellipsis;
  2491. white-space: nowrap;
  2492. padding: 0 20px;
  2493. ">
  2494. {{ aa.title }}
  2495. </div>
  2496. </div>
  2497. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  2498. <div class="wordPic">
  2499. <img src="../../../assets/icon/new/template.png" alt />
  2500. </div>
  2501. <div style="
  2502. margin-top: 10px;
  2503. line-height: 19px;
  2504. overflow: hidden;
  2505. text-overflow: ellipsis;
  2506. white-space: nowrap;
  2507. padding: 0 20px;
  2508. ">
  2509. 简易模板
  2510. </div>
  2511. </div>
  2512. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  2513. <div class="wordPic">
  2514. <img src="../../../assets/icon/new/template.png" alt />
  2515. </div>
  2516. <div style="
  2517. margin-top: 10px;
  2518. line-height: 19px;
  2519. overflow: hidden;
  2520. text-overflow: ellipsis;
  2521. white-space: nowrap;
  2522. padding: 0 20px;
  2523. ">
  2524. 智能粘贴模式
  2525. </div>
  2526. </div>
  2527. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  2528. <div class="wordPic">
  2529. <img src="../../../assets/icon/wordMub.png" alt />
  2530. </div>
  2531. <div style="
  2532. margin-top: 10px;
  2533. line-height: 19px;
  2534. overflow: hidden;
  2535. text-overflow: ellipsis;
  2536. white-space: nowrap;
  2537. padding: 0 20px;
  2538. ">
  2539. 未来小学课程设计
  2540. </div>
  2541. </div> -->
  2542. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  2543. <div class="wordPic">
  2544. <img src="../../../assets/icon/wordMub.png" alt />
  2545. </div>
  2546. <div style="
  2547. margin-top: 10px;
  2548. line-height: 19px;
  2549. overflow: hidden;
  2550. text-overflow: ellipsis;
  2551. white-space: nowrap;
  2552. padding: 0 20px;
  2553. ">
  2554. 我的课程
  2555. </div>
  2556. </div> -->
  2557. </div>
  2558. </div>
  2559. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  2560. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2561. goTo(
  2562. '/course?userid=' +
  2563. userid +
  2564. '&oid=' +
  2565. oid +
  2566. '&org=' +
  2567. org +
  2568. '&role=' +
  2569. role
  2570. )
  2571. ">
  2572. 返回课程
  2573. </button>
  2574. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2575. {{ steps == 4 ? "返回课程" : "上一步" }}
  2576. </button>
  2577. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  2578. pub_btn_next_img: steps != 3,
  2579. pub_btn_finish_img: steps == 3,
  2580. }">
  2581. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  2582. </button>
  2583. </div>
  2584. </div>
  2585. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  2586. height:
  2587. !isStepDisplay && !isBtnDisplay
  2588. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  2589. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2590. }">
  2591. <div class="rb_c_box">
  2592. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1"
  2593. :style="{width: stepShow ? '270px' : '0',minWidth: stepShow ? '270px' : '0',height: stepShow ? '100%' : '0',marginRight: stepShow ? '10px' : '0'}">
  2594. <div class="close_btn" @click="stepShow = !stepShow" :class="!stepShow ? 'close_btn_voice' : ''"
  2595. style="left: 0;right: unset;top: 5px;transform: rotate(180deg);">
  2596. <img src="../../../assets/icon/course/arrow.svg">
  2597. </div>
  2598. <div class="rb_c_nav">
  2599. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1" v-show="stepShow"
  2600. style="margin-left: auto">目录</span>
  2601. <!-- <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span> -->
  2602. <!-- <span class="button-toggle" @click="stepShow = !stepShow">{{ stepShow ? '收缩' : '展开' }}</span> -->
  2603. </div>
  2604. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  2605. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  2606. position: istemplate == 1 ? 'sticky' : 'unset',
  2607. top: istemplate == 1 ? '0' : 'unset'
  2608. }">
  2609. <!-- <div class="navTop">辅助导航</div> -->
  2610. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  2611. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  2612. <div class="nt_taskBox" style="width: 100%;">
  2613. <div class="nt_taskTitle"
  2614. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  2615. unitIndex + 1 }}</div>
  2616. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  2617. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  2618. <span>{{ unitJson[unitIndex].dyName }}</span>
  2619. </el-tooltip>
  2620. </div>
  2621. </div>
  2622. </div> -->
  2623. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  2624. .taskJson" :key="tIndex" :class="{
  2625. dragOverTop:
  2626. newIndex === tIndex &&
  2627. typeIndex == 'task-' + tIndex &&
  2628. oldIndex > tIndex &&
  2629. dragType == 'task',
  2630. dragOverBottom:
  2631. newIndex === tIndex &&
  2632. typeIndex == 'task-' + tIndex &&
  2633. oldIndex < tIndex &&
  2634. dragType == 'task',
  2635. }">
  2636. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  2637. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  2638. class="navTask" :class="{
  2639. isNavTask:
  2640. isClickColor > 0 && isClickColor == tIndex + 1,
  2641. isNavOpen: t.toolOpen,
  2642. }">
  2643. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  2644. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  2645. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  2646. class="chapter_upload_drag"></div>
  2647. <div class="nt_taskBox">
  2648. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  2649. <div class="nt_taskName">
  2650. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2651. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  2652. </el-tooltip>
  2653. </div>
  2654. </div>
  2655. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  2656. 1
  2657. ">
  2658. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  2659. @click.stop="taskMove(1, tIndex)"></div>
  2660. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  2661. @click.stop="taskMove(2, tIndex)"></div>
  2662. </div> -->
  2663. </div>
  2664. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2665. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2666. @click="jumpGj(tIndex, toolIndex2)">
  2667. <div class="gjCss" :class="{
  2668. isGjCss:
  2669. toolIndexType == `gj${tIndex}${toolIndex2}`,
  2670. }">
  2671. <div>工具{{ toolIndex2 + 1 }}:</div>
  2672. <div>
  2673. {{
  2674. toolsData[tool.tool[0]] &&
  2675. toolsData[tool.tool[0]].name
  2676. }}
  2677. </div>
  2678. </div>
  2679. </div>
  2680. </div>
  2681. </div>
  2682. <div>
  2683. <div @click="goToTask(unitJson[unitIndex].chapterInfo[0].taskJson.length)"
  2684. class="navTask" :class="{ isNavTask: isClickColor == unitJson[unitIndex].chapterInfo[0].taskJson.length + 1 }">
  2685. <div class="nt_taskBox" style="padding: 0 0 0 45px;">
  2686. <div class="nt_taskTitle">附件区</div>
  2687. </div>
  2688. </div>
  2689. </div>
  2690. </div>
  2691. <div class="navBottom" v-if="courseState == 1">
  2692. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  2693. dragOverTop:
  2694. newIndex === stageIndex &&
  2695. typeIndex == 'Unit-' + stageIndex &&
  2696. oldIndex > stageIndex &&
  2697. dragType == 'Unit',
  2698. dragOverBottom:
  2699. newIndex === stageIndex &&
  2700. typeIndex == 'Unit-' + stageIndex &&
  2701. oldIndex < stageIndex &&
  2702. dragType == 'Unit',
  2703. }">
  2704. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  2705. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  2706. @click="unitSet2(stageIndex)" class="navStage" :class="{
  2707. isNavStage: stageIndex == unitIndex,
  2708. isNavStageOpen: stage.toolOpen,
  2709. }">
  2710. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  2711. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  2712. class="chapter_upload_drag"></div>
  2713. <div class="nt_taskBox">
  2714. <div class="nt_taskTitle">
  2715. 第{{ stageIndex + 1 }}阶段:
  2716. </div>
  2717. <div class="nt_taskName">
  2718. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  2719. " placement="top">
  2720. <span>{{
  2721. stage.dyName ? stage.dyName : "未命名阶段"
  2722. }}</span>
  2723. </el-tooltip>
  2724. </div>
  2725. </div>
  2726. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  2727. </div>
  2728. <div v-for="(t, tIndex) in unitJson[stageIndex]
  2729. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  2730. dragOverTop:
  2731. newIndex === tIndex &&
  2732. typeIndex == 'task-' + tIndex &&
  2733. ((oldIndex > tIndex &&
  2734. stageIndex == checkUnitIndex) ||
  2735. (oldIndex == tIndex &&
  2736. stageIndex == checkUnitIndex &&
  2737. checkUnitIndex != oldUnitIndex)) &&
  2738. dragType == 'task',
  2739. dragOverBottom:
  2740. newIndex === tIndex &&
  2741. typeIndex == 'task-' + tIndex &&
  2742. oldIndex < tIndex &&
  2743. stageIndex == checkUnitIndex &&
  2744. dragType == 'task',
  2745. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  2746. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  2747. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  2748. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  2749. isNavTask:
  2750. isClickColor > 0 &&
  2751. isClickColor == tIndex + 1 &&
  2752. stageIndex == unitIndex,
  2753. isNavOpen: t.toolOpen,
  2754. }">
  2755. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  2756. <div @mousedown="
  2757. isdrag = 'task-' + stageIndex + '-' + tIndex
  2758. " @mouseup="isdrag = ''" @touchstart="
  2759. isdrag = 'task-' + stageIndex + '-' + tIndex
  2760. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  2761. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  2762. <div class="nt_taskTitle">
  2763. 任务{{ tIndex + 1 }}:
  2764. </div>
  2765. <div class="nt_taskName">
  2766. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2767. <span>{{
  2768. t.task ? t.task : "未命名任务"
  2769. }}</span>
  2770. </el-tooltip>
  2771. </div>
  2772. </div>
  2773. </div>
  2774. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2775. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2776. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  2777. <div class="gjCss" :class="{
  2778. isGjCss:
  2779. toolIndexType ==
  2780. `gj${tIndex}${toolIndex2}${stageIndex}`,
  2781. }">
  2782. <div>工具{{ toolIndex2 + 1 }}:</div>
  2783. <div>
  2784. {{
  2785. toolsData[tool.tool[0]] &&
  2786. toolsData[tool.tool[0]].name
  2787. }}
  2788. </div>
  2789. </div>
  2790. </div>
  2791. </div>
  2792. </div>
  2793. </div>
  2794. </div>
  2795. </div>
  2796. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  2797. <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
  2798. </div>
  2799. </div>
  2800. <div class="rb_c_box_right">
  2801. <div class="rb_c_box_btn" style="justify-content: flex-end">
  2802. <span class="title">{{ courseName }}</span>
  2803. <!-- <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button> -->
  2804. <button class="c_pub_button_return" v-if="steps > 1 && steps != 5 && istemplate != 1"
  2805. @click="lastSteps" style="margin-left: auto;border: none;">
  2806. {{ steps == 4 ? "返回课程" : "上一步" }}
  2807. </button>
  2808. <button class="c_pub_button_confirm3 buttonBoxB">
  2809. <span>一键生成</span>
  2810. <div class="buttonBox">
  2811. <div
  2812. @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">
  2813. 重新生成所有任务</div>
  2814. <div
  2815. @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)"
  2816. v-if="panTool() == 0">一键生成所有工具</div>
  2817. <div
  2818. @click="openAiDialog2(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)"
  2819. v-if="panTool() > 0">重新生成所有工具</div>
  2820. <div @click="allEvaCan(), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有评价按钮`)"
  2821. v-if="panTool() > 0">{{panTaskElist() == 0 && panEvaCont() == 0 ? '一键生成所有评价' : '重新生成所有评价'}}
  2822. </div>
  2823. <!-- <div @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案
  2824. </div> -->
  2825. </div>
  2826. </button>
  2827. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</button> -->
  2828. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)" v-if="panTool() == 0">一键生成所有工具</button> -->
  2829. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="allEvaCan(), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有评价按钮`)" v-if="panTool() > 0 && panTaskElist() == 0 && panEvaCont() == 0">一键生成所有评价</button> -->
  2830. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案</button> -->
  2831. <button class="c_pub_button_confirm" style="margin: 0 0 0 10px;" v-if="steps < 4 && istemplate != 1"
  2832. @click="nextSteps">
  2833. {{ steps == 3 ? "确认上传" : "下一步" }}
  2834. </button>
  2835. </div>
  2836. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  2837. <div v-if="false" style="
  2838. display: flex;
  2839. flex-direction: row;
  2840. align-items: center;
  2841. position: sticky;
  2842. top: 0;
  2843. z-index: 99;
  2844. width: 100%;
  2845. padding: 0 20px 0 20px;
  2846. box-sizing: border-box;
  2847. background: #fff;
  2848. border-radius: 8px;
  2849. ">
  2850. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2851. <div class="cru_selectBox" :style="{
  2852. maxWidth: isPasteTask
  2853. ? 'calc(100% - 335px)'
  2854. : 'calc(100% - 190px)',
  2855. }" v-if="courseState == 1">
  2856. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2857. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2858. <!-- item.dyName ? item.dyName : -->
  2859. <span v-if="
  2860. unitJson[unitJson.length - 1].easy == 4 ||
  2861. unitJson[unitJson.length - 1].easy == 6
  2862. ">{{
  2863. item.dyName
  2864. ? item.dyName
  2865. : "第" + (index + 1) + "阶段"
  2866. }}</span>
  2867. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2868. </div>
  2869. <div class="cru_line" :style="{
  2870. left: offsetLetfPx + 'px',
  2871. }"></div>
  2872. </div>
  2873. <div class="addStageImg" @click="addunit()" v-if="
  2874. !(unitJson[unitJson.length - 1].easy == 4) &&
  2875. !(unitJson[unitJson.length - 1].easy == 6) &&
  2876. courseState == 1
  2877. ">
  2878. <img src="../../../assets/icon/new/addStage.png" alt />
  2879. </div>
  2880. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2881. v-if="courseState == 2" style="margin: 15px 0">
  2882. 新建阶段
  2883. </button>
  2884. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2885. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2886. 阶段顺序
  2887. </button>
  2888. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2889. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2890. 智能粘贴
  2891. </button>
  2892. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2893. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2894. }" style="padding: 0 12px">
  2895. 选择课程模板
  2896. </button>
  2897. </div>
  2898. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2899. :key="index">
  2900. <div v-loading="anLoading[0]" v-if="courseState == 4" style="position: relative;
  2901. background: #fff;
  2902. box-sizing: border-box;
  2903. padding: 1px 20px 10px;
  2904. width: 100%;
  2905. border-radius: 10px;">
  2906. <div style="
  2907. display: flex;
  2908. flex-direction: row;
  2909. justify-content: space-between;
  2910. align-items: center;
  2911. " :style="{
  2912. margin: !item.taskJson[0].isFoldchapter
  2913. ? '20px 0 10px'
  2914. : '20px 0 0',
  2915. }">
  2916. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2917. 学习内容
  2918. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2919. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2920. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2921. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2922. </el-tooltip>
  2923. </div>
  2924. </div>
  2925. <div>
  2926. <div class="add_chapters_box add_c_none" v-if="
  2927. item.taskJson[0].chapterData &&
  2928. item.taskJson[0].chapterData.length == 0
  2929. ">
  2930. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  2931. <span>请添加学习内容</span>
  2932. </div>
  2933. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2934. <div @dragstart="
  2935. dragStart(item1, index1, 0)
  2936. " @dragover.prevent="
  2937. dragOver(index1, 0)
  2938. " @dragend="dragEnd()" :draggable="isdrag ==
  2939. 'chapter-' + 0 + '-' + index1
  2940. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2941. :key="item1.id" @click="
  2942. getChapterData(
  2943. $event,
  2944. unitIndex,
  2945. index,
  2946. index1,
  2947. item1.type
  2948. )
  2949. " :class="{
  2950. dragOverTop2:
  2951. newIndex === index1 &&
  2952. typeIndex ==
  2953. 'chapter-' +
  2954. 0 +
  2955. '-' +
  2956. index1 &&
  2957. oldIndex > index1 &&
  2958. dragType == 'drag',
  2959. dragOverBottom2:
  2960. newIndex === index1 &&
  2961. typeIndex ==
  2962. 'chapter-' +
  2963. 0 +
  2964. '-' +
  2965. index1 &&
  2966. oldIndex < index1 &&
  2967. dragType == 'drag',
  2968. }">
  2969. <div @mousedown="
  2970. isdrag =
  2971. 'chapter-' + 0 + '-' + index1
  2972. " @mouseup="isdrag = ''" @touchstart="
  2973. isdrag =
  2974. 'chapter-' + 0 + '-' + index1
  2975. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2976. <div class="chapter_upload_o" style="
  2977. position: relative;
  2978. display: flex;
  2979. align-items: center;
  2980. ">
  2981. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2982. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2983. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2984. </div>
  2985. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2986. </div>
  2987. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2988. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2989. </div>
  2990. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2991. </div>
  2992. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2993. </div>
  2994. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2995. </div>
  2996. </div>
  2997. <div class="chapter_upload_n">
  2998. <input readonly="true" v-if="
  2999. item1.type == 2 ||
  3000. item1.type == 3 ||
  3001. item1.type == 12 ||
  3002. item1.type == 13 ||
  3003. item1.type == 7
  3004. " :placeholder="item1.name" @click="
  3005. updataVideoT(
  3006. $event,
  3007. unitIndex,
  3008. 0,
  3009. index1
  3010. )
  3011. " style="
  3012. border: none;
  3013. outline: none;
  3014. width: 80%;
  3015. minwidth: 215px;
  3016. z-index: 99;
  3017. font-size: 14px;
  3018. white-space: nowrap;
  3019. overflow: hidden;
  3020. text-overflow: ellipsis;
  3021. " />
  3022. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3023. border: none;
  3024. outline: none;
  3025. width: 80%;
  3026. white-space: nowrap;
  3027. overflow: hidden;
  3028. text-overflow: ellipsis;
  3029. " readonly="true" @click="
  3030. selectAttText(0, index1)
  3031. " />
  3032. <input :placeholder="item1.title ? item1.title : '链接'
  3033. " v-if="item1.type == 8" style="
  3034. border: none;
  3035. outline: none;
  3036. width: 80%;
  3037. white-space: nowrap;
  3038. overflow: hidden;
  3039. text-overflow: ellipsis;
  3040. " readonly="true" @click="selectLine(0, index1)" />
  3041. <input :placeholder="item1.title ? item1.title : '链接'
  3042. " v-if="item1.type == 14" style="
  3043. border: none;
  3044. outline: none;
  3045. width: 80%;
  3046. white-space: nowrap;
  3047. overflow: hidden;
  3048. text-overflow: ellipsis;
  3049. " readonly="true" @click="
  3050. openUpdateSource(0, index1)
  3051. " />
  3052. </div>
  3053. <div class="chapter_upload_ic">
  3054. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3055. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3056. checkChpater( $event, unitIndex, 0, index1 )
  3057. ">
  3058. <div></div>
  3059. </div>
  3060. <div class="chapter_upload_ud" style="z-index: 99">
  3061. <div class="chapter_upload_up" @click="
  3062. upCd(
  3063. $event,
  3064. unitIndex,
  3065. index,
  3066. 0,
  3067. index1
  3068. )
  3069. "></div>
  3070. <div class="chapter_upload_down" @click="
  3071. downCd(
  3072. $event,
  3073. unitIndex,
  3074. index,
  3075. 0,
  3076. index1
  3077. )
  3078. "></div>
  3079. </div>
  3080. <div class="chapter_upload_ic_edit" v-if="
  3081. item1.type == 2 ||
  3082. item1.type == 3 ||
  3083. item1.type == 12 ||
  3084. item1.type == 13 ||
  3085. item1.type == 7
  3086. " @click.stop="
  3087. updataVideoT(
  3088. $event,
  3089. unitIndex,
  3090. 0,
  3091. index1
  3092. )
  3093. ">
  3094. <div></div>
  3095. </div>
  3096. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3097. selectAttText(0, index1)
  3098. ">
  3099. <div></div>
  3100. </div>
  3101. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3102. @click="selectLine(0, index1)">
  3103. <div></div>
  3104. </div>
  3105. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3106. openUpdateSource(0, index1)
  3107. ">
  3108. <div></div>
  3109. </div>
  3110. <div class="chapter_upload_ic_r" @click.stop="
  3111. deleteChapterData(
  3112. $event,
  3113. unitIndex,
  3114. index,
  3115. index1,
  3116. 0
  3117. )
  3118. ">
  3119. <div></div>
  3120. </div>
  3121. </div>
  3122. </div>
  3123. </div>
  3124. </div>
  3125. </div>
  3126. <div class="add_info_box" style="margin: 10px 0 0">
  3127. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3128. 文件
  3129. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple"
  3130. @change="
  3131. beforeUpload2(
  3132. $event,
  3133. unitIndex,
  3134. 13,
  3135. 0
  3136. )
  3137. " />
  3138. </button>
  3139. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  3140. 图文
  3141. </button>
  3142. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  3143. 链接
  3144. </button>
  3145. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  3146. 代码
  3147. </button>
  3148. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  3149. 资源
  3150. </button>
  3151. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  3152. AI生成PPT
  3153. </button>
  3154. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  3155. AI生成教案
  3156. </button>
  3157. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  3158. 智能检索视频
  3159. </button>
  3160. </div>
  3161. <div v-if="
  3162. unitJson[unitIndex].chapterInfo[0].taskJson[
  3163. 0
  3164. ].proVisible
  3165. " class="mask">
  3166. <div class="progressBox">
  3167. <!-- <div id="closePro" class="closeCss">
  3168. <img src="../../../../assets/icon/close.png" alt />
  3169. </div> -->
  3170. <div class="lbox">
  3171. <img src="../../../assets/loading.gif" />上传中,请稍后
  3172. </div>
  3173. <div style="margin-bottom: 10px">
  3174. <span>{{
  3175. unitJson[unitIndex].chapterInfo[0].taskJson[
  3176. 0
  3177. ].isFinishSize
  3178. }}</span>
  3179. /
  3180. <span>{{
  3181. unitJson[unitIndex].chapterInfo[0].taskJson[
  3182. 0
  3183. ].isAllSize
  3184. }}</span>
  3185. </div>
  3186. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3187. 0
  3188. ].progress
  3189. ? unitJson[unitIndex].chapterInfo[0]
  3190. .taskJson[0].progress
  3191. : 0
  3192. " style="width: 80%"></el-progress> -->
  3193. </div>
  3194. </div>
  3195. </div>
  3196. <div class="chapter_box" v-if="courseState == 1">
  3197. <div class="chapter_contentbox">
  3198. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  3199. <div class="cc_input">
  3200. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  3201. v-model="unitJson[unitIndex].dyName" />
  3202. </div>
  3203. <div class="remove" v-if="
  3204. (unitJson.length > 1 || courseState != 2) &&
  3205. !(unitJson[unitJson.length - 1].easy == 4) &&
  3206. !(unitJson[unitJson.length - 1].easy == 6)
  3207. " @click="deleteUnit(unitIndex)"></div>
  3208. </div>
  3209. </div>
  3210. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  3211. margin: 50px 0px 10px;
  3212. font-size: 1.5em;
  3213. font-weight: 700;
  3214. color: #0f7eff;
  3215. ">
  3216. 添加任务
  3217. </div> -->
  3218. <div class="taskBorder" :style="{
  3219. minHeight: unitJson[unitIndex].easy && 'unset',
  3220. borderRadius: itemTaskIndex == 0 ? '0px 0px 10px 10px' : '10px',
  3221. marginTop: itemTaskIndex == 0 ? '0' : '10px',
  3222. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  3223. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex"
  3224. v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  3225. <div style="background: #fff; border-radius: 5px"
  3226. v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]"
  3227. element-loading-text="小可正在努力生成中,请稍等...">
  3228. <div class="c_pub_button_confirm stopBtn"
  3229. v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]"
  3230. @click="cancelAjax('aiTaskGL1', itemTaskIndex)">停止</div>
  3231. <div class="taskTitle">
  3232. <div style="display: flex;width: 100%;justify-content: space-between;">
  3233. <span>任务{{ itemTaskIndex + 1 }}</span>
  3234. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3235. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  3236. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  3237. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  3238. </el-tooltip> -->
  3239. <div style="display: flex">
  3240. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3241. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  3242. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)"
  3243. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)">重新生成任务</button>
  3244. </el-tooltip>
  3245. </div>
  3246. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3247. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  3248. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  3249. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  3250. </el-tooltip> -->
  3251. </div>
  3252. </div>
  3253. <!-- padding: 20px; -->
  3254. <div v-if="unitJson[unitIndex].easy != 1">
  3255. <div :style="{
  3256. marginBottom:
  3257. unitJson[unitIndex].easy == 3 ||
  3258. (unitJson[unitIndex].easy == 5 &&
  3259. itemTask.taskType == 1)
  3260. ? '75px'
  3261. : '0',
  3262. }">
  3263. <div style="
  3264. display: flex;
  3265. margin: 0px 0 20px;
  3266. flex-direction: row;
  3267. justify-content: flex-start;
  3268. align-items: center;
  3269. ">
  3270. <div class="lineTitle">任务概述</div>
  3271. </div>
  3272. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  3273. flex-direction: row;
  3274. justify-content: flex-start;
  3275. align-items: center;
  3276. margin: 0;
  3277. ">
  3278. <!-- <div class="cc_title">
  3279. 任务{{ itemTaskIndex + 1 }}
  3280. </div> -->
  3281. <div class="cc_input">
  3282. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  3283. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3284. itemTaskIndex
  3285. ].task
  3286. " />
  3287. </div>
  3288. <div class="remove" v-if="
  3289. item.taskJson.length > 1 &&
  3290. (!unitJson[unitIndex].easy ||
  3291. unitJson[unitIndex].easy == 6)
  3292. " @click="deleteTask(itemTaskIndex)"></div>
  3293. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  3294. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  3295. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  3296. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  3297. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  3298. </div> -->
  3299. </div>
  3300. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  3301. display: flex;
  3302. margin: 20px 0;
  3303. flex-direction: row;
  3304. justify-content: flex-start;
  3305. align-items: center;
  3306. ">
  3307. <div class="lineTitle">任务描述</div>
  3308. </div> && !itemTask.isFold2-->
  3309. <div v-if="
  3310. easyArray.indexOf(unitJson[unitIndex].easy) ==
  3311. -1
  3312. " style="margin-top: 20px" class="op_task_box"
  3313. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1"
  3314. element-loading-text="小可正在努力生成中,请稍等...">
  3315. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3316. itemTaskIndex
  3317. ].taskDetail
  3318. " @change="change"></editor-bar> -->
  3319. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  3320. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3321. itemTaskIndex
  3322. ].taskDetail
  3323. "></textarea>
  3324. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  3325. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3326. itemTaskIndex
  3327. ].taskDetail
  3328. "></textarea> -->
  3329. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail2-'+itemTaskIndex]}">
  3330. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  3331. <div class="op_box_right">
  3332. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3333. <div class="r_pub_button_op"
  3334. @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  3335. itemTaskIndex
  3336. ], itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)"
  3337. @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  3338. itemTaskIndex
  3339. ], itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)">智能优化</div>
  3340. </el-tooltip>
  3341. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail2-'+itemTaskIndex]"
  3342. active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  3343. @change="handleSwitchChange('aiDetail2-'+itemTaskIndex)"></el-switch>
  3344. </div>
  3345. </div>
  3346. </div>
  3347. </div>
  3348. </div>
  3349. <div v-loading="anLoading[itemTaskIndex]" style="position: relative" v-if="courseState == 5">
  3350. <div style="
  3351. display: flex;
  3352. flex-direction: row;
  3353. justify-content: space-between;
  3354. align-items: center;
  3355. " :style="{
  3356. margin: !itemTask.isFoldchapter
  3357. ? '20px 0 10px'
  3358. : '20px 0 0',
  3359. }">
  3360. <div style="margin-bottom: 10px" class="lineTitle clineTitle">
  3361. 学习内容
  3362. </div>
  3363. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  3364. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  3365. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  3366. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  3367. <!-- <div class="line"></div> -->
  3368. </div>
  3369. <!-- v-if="!itemTask.isFoldchapter" -->
  3370. <div>
  3371. <div class="add_chapters_box add_c_none" v-if="
  3372. itemTask.chapterData &&
  3373. itemTask.chapterData.length == 0
  3374. ">
  3375. <!-- <img
  3376. src="../../../assets/icon/new/c_none.png"
  3377. alt
  3378. /> -->
  3379. <span>请添加学习内容</span>
  3380. </div>
  3381. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3382. <div @dragstart="
  3383. dragStart(item1, index1, itemTaskIndex)
  3384. " @dragover.prevent="
  3385. dragOver(index1, itemTaskIndex)
  3386. " @dragend="dragEnd()" :draggable="
  3387. isdrag ==
  3388. 'chapter-' + itemTaskIndex + '-' + index1
  3389. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3390. :key="item1.id" @click="
  3391. getChapterData(
  3392. $event,
  3393. unitIndex,
  3394. index,
  3395. index1,
  3396. item1.type
  3397. )
  3398. " :class="{
  3399. dragOverTop2:
  3400. newIndex === index1 &&
  3401. typeIndex ==
  3402. 'chapter-' +
  3403. itemTaskIndex +
  3404. '-' +
  3405. index1 &&
  3406. oldIndex > index1 &&
  3407. dragType == 'drag',
  3408. dragOverBottom2:
  3409. newIndex === index1 &&
  3410. typeIndex ==
  3411. 'chapter-' +
  3412. itemTaskIndex +
  3413. '-' +
  3414. index1 &&
  3415. oldIndex < index1 &&
  3416. dragType == 'drag',
  3417. }">
  3418. <div @mousedown="
  3419. isdrag =
  3420. 'chapter-' + itemTaskIndex + '-' + index1
  3421. " @mouseup="isdrag = ''" @touchstart="
  3422. isdrag =
  3423. 'chapter-' + itemTaskIndex + '-' + index1
  3424. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3425. <div class="chapter_upload_o" style="
  3426. position: relative;
  3427. display: flex;
  3428. align-items: center;
  3429. ">
  3430. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3431. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3432. <div v-if="item1.type == 3 || item1.type == 16" class="chapter_upload_l_i3" style="margin-left: 1px">
  3433. </div>
  3434. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3435. </div>
  3436. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3437. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3438. </div>
  3439. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3440. </div>
  3441. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3442. </div>
  3443. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3444. </div>
  3445. <div
  3446. v-if="item1.type == 15"
  3447. class="chapter_upload_l_i15"
  3448. style="margin-left: 1px"
  3449. ></div>
  3450. </div>
  3451. <div class="chapter_upload_n">
  3452. <input
  3453. readonly="true"
  3454. v-if="
  3455. item1.type == 16
  3456. "
  3457. :placeholder="item1.name"
  3458. @click="
  3459. openCodeEditor(1,item1, unitIndex,itemTaskIndex, index1)
  3460. "
  3461. style="
  3462. border: none;
  3463. outline: none;
  3464. width: 80%;
  3465. minwidth: 215px;
  3466. z-index: 99;
  3467. font-size: 14px;
  3468. white-space: nowrap;
  3469. overflow: hidden;
  3470. text-overflow: ellipsis;
  3471. "
  3472. />
  3473. <input readonly="true" v-if="
  3474. item1.type == 2 ||
  3475. item1.type == 3 ||
  3476. item1.type == 12 ||
  3477. item1.type == 13 ||
  3478. item1.type == 7
  3479. " :placeholder="item1.name" @click="
  3480. updataVideoT(
  3481. $event,
  3482. unitIndex,
  3483. itemTaskIndex,
  3484. index1
  3485. )
  3486. " style="
  3487. border: none;
  3488. outline: none;
  3489. width: 80%;
  3490. minwidth: 215px;
  3491. z-index: 99;
  3492. font-size: 14px;
  3493. white-space: nowrap;
  3494. overflow: hidden;
  3495. text-overflow: ellipsis;
  3496. " />
  3497. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3498. border: none;
  3499. outline: none;
  3500. width: 80%;
  3501. white-space: nowrap;
  3502. overflow: hidden;
  3503. text-overflow: ellipsis;
  3504. " readonly="true" @click="
  3505. selectAttText(itemTaskIndex, index1)
  3506. " />
  3507. <input :placeholder="
  3508. item1.title ? item1.title : '链接'
  3509. " v-if="item1.type == 8" style="
  3510. border: none;
  3511. outline: none;
  3512. width: 80%;
  3513. white-space: nowrap;
  3514. overflow: hidden;
  3515. text-overflow: ellipsis;
  3516. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3517. <input :placeholder="
  3518. item1.title ? item1.title : '链接'
  3519. " v-if="item1.type == 14" style="
  3520. border: none;
  3521. outline: none;
  3522. width: 80%;
  3523. white-space: nowrap;
  3524. overflow: hidden;
  3525. text-overflow: ellipsis;
  3526. " readonly="true" @click="
  3527. openUpdateSource(itemTaskIndex, index1)
  3528. " />
  3529. <input
  3530. :placeholder="
  3531. item1.title ? item1.title : 'Ai应用'
  3532. "
  3533. v-if="item1.type == 15"
  3534. style="
  3535. border: none;
  3536. outline: none;
  3537. width: 80%;
  3538. white-space: nowrap;
  3539. overflow: hidden;
  3540. text-overflow: ellipsis;
  3541. "
  3542. readonly="true"
  3543. @click="selectLine(0, index1)"
  3544. />
  3545. </div>
  3546. <div class="chapter_upload_ic">
  3547. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3548. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3549. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  3550. ">
  3551. <div></div>
  3552. </div>
  3553. <div class="chapter_upload_ud" style="z-index: 99">
  3554. <div class="chapter_upload_up" @click="
  3555. upCd(
  3556. $event,
  3557. unitIndex,
  3558. index,
  3559. itemTaskIndex,
  3560. index1
  3561. )
  3562. "></div>
  3563. <div class="chapter_upload_down" @click="
  3564. downCd(
  3565. $event,
  3566. unitIndex,
  3567. index,
  3568. itemTaskIndex,
  3569. index1
  3570. )
  3571. "></div>
  3572. </div>
  3573. <div class="chapter_upload_ic_edit" v-if="
  3574. item1.type == 2 ||
  3575. item1.type == 3 ||
  3576. item1.type == 12 ||
  3577. item1.type == 13 ||
  3578. item1.type == 7
  3579. " @click.stop="
  3580. updataVideoT(
  3581. $event,
  3582. unitIndex,
  3583. itemTaskIndex,
  3584. index1
  3585. )
  3586. ">
  3587. <div></div>
  3588. </div>
  3589. <div
  3590. class="chapter_upload_ic_edit"
  3591. v-if="
  3592. item1.type == 16
  3593. "
  3594. @click.stop="
  3595. openCodeEditor(1,item1, unitIndex,itemTaskIndex, index1)
  3596. "
  3597. >
  3598. <div></div>
  3599. </div>
  3600. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3601. selectAttText(itemTaskIndex, index1)
  3602. ">
  3603. <div></div>
  3604. </div>
  3605. <div class="chapter_upload_ic_edit" v-if="item1.type == 8 || item1.type==15"
  3606. @click="selectLine(itemTaskIndex, index1)">
  3607. <div></div>
  3608. </div>
  3609. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3610. openUpdateSource(itemTaskIndex, index1)
  3611. ">
  3612. <div></div>
  3613. </div>
  3614. <div class="chapter_upload_ic_r" @click.stop="
  3615. deleteChapterData(
  3616. $event,
  3617. unitIndex,
  3618. index,
  3619. index1,
  3620. itemTaskIndex
  3621. )
  3622. ">
  3623. <div></div>
  3624. </div>
  3625. </div>
  3626. </div>
  3627. </div>
  3628. </div>
  3629. </div>
  3630. <!-- v-if="!itemTask.isFoldchapter" -->
  3631. <div class="add_info_box" style="margin: 10px 0 0">
  3632. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3633. 文件
  3634. <input type="file" accept="*" style="display: none" multiple="multiple" v-if="inputShow"
  3635. @change="
  3636. beforeUpload2(
  3637. $event,
  3638. unitIndex,
  3639. 13,
  3640. itemTaskIndex
  3641. )
  3642. " />
  3643. </button>
  3644. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(itemTaskIndex)">
  3645. 图文
  3646. </button>
  3647. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(itemTaskIndex)">
  3648. 链接
  3649. </button>
  3650. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(itemTaskIndex)">
  3651. 代码
  3652. </button>
  3653. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(itemTaskIndex)">
  3654. 资源
  3655. </button>
  3656. <button class="c_pub_button_add pub_btn_add_img"
  3657. @click="openAiCreate(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成PPT按钮`)">
  3658. AI生成PPT
  3659. </button>
  3660. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3661. AI生成教案
  3662. </button> -->
  3663. <button class="c_pub_button_add pub_btn_add_img"
  3664. @click="createTaskAn(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成学历案按钮`)">
  3665. {{ taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex] == true ? '停止生成学历案' :
  3666. 'AI生成学历案'}}
  3667. </button>
  3668. <button class="c_pub_button_add pub_btn_add_img"
  3669. @click="openAiCreateVideo(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-智能检索视频按钮`)">
  3670. 智能检索视频
  3671. </button>
  3672. <button
  3673. class="c_pub_button_add pub_btn_add_img"
  3674. @click="openAddApp(itemTaskIndex)"
  3675. >
  3676. 智能应用
  3677. </button>
  3678. <button
  3679. class="c_pub_button_add pub_btn_add_img"
  3680. @click="openCodeEditor(0,'',unitIndex,itemTaskIndex ,'')"
  3681. >
  3682. 代码编辑器
  3683. </button>
  3684. </div>
  3685. <div v-if="
  3686. unitJson[unitIndex].chapterInfo[0].taskJson[
  3687. itemTaskIndex
  3688. ].proVisible
  3689. " class="mask">
  3690. <div class="progressBox">
  3691. <!-- <div id="closePro" class="closeCss">
  3692. <img src="../../../../assets/icon/close.png" alt />
  3693. </div> -->
  3694. <div class="lbox">
  3695. <img src="../../../assets/loading.gif" />上传中,请稍后
  3696. </div>
  3697. <div style="margin-bottom: 10px">
  3698. <span>{{
  3699. unitJson[unitIndex].chapterInfo[0].taskJson[
  3700. itemTaskIndex
  3701. ].isFinishSize
  3702. }}</span>
  3703. /
  3704. <span>{{
  3705. unitJson[unitIndex].chapterInfo[0].taskJson[
  3706. itemTaskIndex
  3707. ].isAllSize
  3708. }}</span>
  3709. </div>
  3710. <!-- <el-progress
  3711. :text-inside="true"
  3712. :stroke-width="20"
  3713. :percentage="
  3714. unitJson[unitIndex].chapterInfo[0].taskJson[
  3715. itemTaskIndex
  3716. ].progress
  3717. ? unitJson[unitIndex].chapterInfo[0]
  3718. .taskJson[itemTaskIndex].progress
  3719. : 0
  3720. "
  3721. style="width: 80%"
  3722. ></el-progress> -->
  3723. </div>
  3724. </div>
  3725. </div>
  3726. <div v-if="
  3727. unitJson[unitIndex].easy == 1 ||
  3728. (unitJson[unitIndex].easy == 5 &&
  3729. itemTask.taskType == 2)
  3730. ">
  3731. <div>
  3732. <div class="add_chapters_box add_c_none" v-if="
  3733. itemTask.chapterData &&
  3734. itemTask.chapterData.length == 0
  3735. ">
  3736. <img src="../../../assets/icon/new/c_none.png" alt />
  3737. </div>
  3738. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3739. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3740. dragOver(index1, itemTaskIndex)
  3741. " @dragend="dragEnd()" :draggable="isdrag ==
  3742. 'chapter-' + itemTaskIndex + '-' + index1
  3743. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3744. :key="item1.id" @click="
  3745. getChapterData(
  3746. $event,
  3747. unitIndex,
  3748. index,
  3749. index1,
  3750. item1.type
  3751. )
  3752. " :class="{
  3753. dragOverTop2:
  3754. newIndex === index1 &&
  3755. typeIndex ==
  3756. 'chapter-' +
  3757. itemTaskIndex +
  3758. '-' +
  3759. index1 &&
  3760. oldIndex > index1,
  3761. dragOverBottom2:
  3762. newIndex === index1 &&
  3763. typeIndex ==
  3764. 'chapter-' +
  3765. itemTaskIndex +
  3766. '-' +
  3767. index1 &&
  3768. oldIndex < index1,
  3769. }">
  3770. <div @mousedown="
  3771. isdrag =
  3772. 'chapter-' + itemTaskIndex + '-' + index1
  3773. " @mouseup="isdrag = ''" @touchstart="
  3774. isdrag =
  3775. 'chapter-' + itemTaskIndex + '-' + index1
  3776. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3777. <div class="chapter_upload_t" style="width: 100%"></div>
  3778. <div class="chapter_upload_o" style="
  3779. position: relative;
  3780. display: flex;
  3781. align-items: center;
  3782. ">
  3783. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3784. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3785. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3786. </div>
  3787. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3788. </div>
  3789. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3790. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3791. </div>
  3792. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3793. </div>
  3794. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3795. </div>
  3796. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3797. </div>
  3798. <div
  3799. v-if="item1.type == 15"
  3800. class="chapter_upload_l_i15"
  3801. style="margin-left: 1px"
  3802. ></div>
  3803. </div>
  3804. <div class="chapter_upload_n">
  3805. <span style="
  3806. font-size: 14px;
  3807. color: rgb(109, 109, 109);
  3808. height: 14px;
  3809. line-height: 14px;
  3810. " v-if="
  3811. item1.type == 2 ||
  3812. item1.type == 3 ||
  3813. item1.type == 7
  3814. ">{{ item1.text }}-</span>
  3815. <input readonly="true" v-if="
  3816. item1.type == 2 ||
  3817. item1.type == 3 ||
  3818. item1.type == 7
  3819. " :placeholder="item1.name" @click="
  3820. updataVideoT(
  3821. $event,
  3822. unitIndex,
  3823. itemTaskIndex,
  3824. index1
  3825. )
  3826. " style="
  3827. border: none;
  3828. outline: none;
  3829. width: 80%;
  3830. minwidth: 215px;
  3831. z-index: 99;
  3832. font-size: 14px;
  3833. white-space: nowrap;
  3834. overflow: hidden;
  3835. text-overflow: ellipsis;
  3836. " />
  3837. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3838. border: none;
  3839. outline: none;
  3840. width: 80%;
  3841. white-space: nowrap;
  3842. overflow: hidden;
  3843. text-overflow: ellipsis;
  3844. " readonly="true" @click="
  3845. selectAttText(itemTaskIndex, index1)
  3846. " />
  3847. <input :placeholder="item1.title ? item1.title : '链接'
  3848. " v-if="item1.type == 8 || item1.type == 14" style="
  3849. border: none;
  3850. outline: none;
  3851. width: 80%;
  3852. white-space: nowrap;
  3853. overflow: hidden;
  3854. text-overflow: ellipsis;
  3855. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3856. <input
  3857. :placeholder="
  3858. item1.title ? item1.title : 'Ai应用'
  3859. "
  3860. v-if="item1.type == 15"
  3861. style="
  3862. border: none;
  3863. outline: none;
  3864. width: 80%;
  3865. white-space: nowrap;
  3866. overflow: hidden;
  3867. text-overflow: ellipsis;
  3868. "
  3869. readonly="true"
  3870. @click="selectLine(0, index1)"
  3871. />
  3872. </div>
  3873. <div class="chapter_upload_ic">
  3874. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3875. <div class="chapter_upload_ud" style="z-index: 99">
  3876. <div class="chapter_upload_up" @click="
  3877. upCd(
  3878. $event,
  3879. unitIndex,
  3880. index,
  3881. itemTaskIndex,
  3882. index1
  3883. )
  3884. "></div>
  3885. <div class="chapter_upload_down" @click="
  3886. downCd(
  3887. $event,
  3888. unitIndex,
  3889. index,
  3890. itemTaskIndex,
  3891. index1
  3892. )
  3893. "></div>
  3894. </div>
  3895. <div class="chapter_upload_ic_edit" v-if="
  3896. item1.type == 2 ||
  3897. item1.type == 3 ||
  3898. item1.type == 12 ||
  3899. item1.type == 13 ||
  3900. item1.type == 7
  3901. " @click.stop="
  3902. updataVideoT(
  3903. $event,
  3904. unitIndex,
  3905. itemTaskIndex,
  3906. index1
  3907. )
  3908. ">
  3909. <div></div>
  3910. </div>
  3911. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3912. selectAttText(itemTaskIndex, index1)
  3913. ">
  3914. <div></div>
  3915. </div>
  3916. <div class="chapter_upload_ic_edit" v-if="item1.type == 8 || item1.type == 15"
  3917. @click="selectLine(itemTaskIndex, index1)">
  3918. <div></div>
  3919. </div>
  3920. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3921. openUpdateSource(itemTaskIndex, index1)
  3922. ">
  3923. <div></div>
  3924. </div>
  3925. <div class="chapter_upload_ic_r" @click.stop="
  3926. deleteChapterData(
  3927. $event,
  3928. unitIndex,
  3929. index,
  3930. index1,
  3931. itemTaskIndex
  3932. )
  3933. ">
  3934. <div></div>
  3935. </div>
  3936. </div>
  3937. </div>
  3938. </div>
  3939. </div>
  3940. </div>
  3941. <div class="add_info_box" style="margin: 10px 0 0">
  3942. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3943. <span style="color: red">*</span>
  3944. 教学设计
  3945. <input type="file"
  3946. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3947. style="display: none" v-if="inputShow" @change="
  3948. beforeUpload3(
  3949. $event,
  3950. unitIndex,
  3951. 3,
  3952. itemTaskIndex,
  3953. '教学设计'
  3954. )
  3955. " />
  3956. </button>
  3957. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3958. <span style="color: red">*</span>
  3959. 教学课件
  3960. <input type="file"
  3961. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3962. style="display: none" v-if="inputShow" @change="
  3963. beforeUpload3(
  3964. $event,
  3965. unitIndex,
  3966. 3,
  3967. itemTaskIndex,
  3968. '教学课件'
  3969. )
  3970. " />
  3971. </button>
  3972. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3973. 教学视频
  3974. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3975. style="display: none" v-if="inputShow" @change="
  3976. beforeUpload3(
  3977. $event,
  3978. unitIndex,
  3979. 2,
  3980. itemTaskIndex,
  3981. '教学视频'
  3982. )
  3983. " />
  3984. </button>
  3985. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3986. 教学音频
  3987. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3988. beforeUpload3(
  3989. $event,
  3990. unitIndex,
  3991. 2,
  3992. itemTaskIndex,
  3993. '教学音频'
  3994. )
  3995. " />
  3996. </button>
  3997. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3998. 学习单
  3999. <input type="file"
  4000. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  4001. style="display: none" v-if="inputShow" @change="
  4002. beforeUpload3(
  4003. $event,
  4004. unitIndex,
  4005. 3,
  4006. itemTaskIndex,
  4007. '学习单'
  4008. )
  4009. " />
  4010. </button>
  4011. </div>
  4012. <div v-if="
  4013. unitJson[unitIndex].chapterInfo[0].taskJson[
  4014. itemTaskIndex
  4015. ].proVisible
  4016. " class="mask">
  4017. <div class="progressBox">
  4018. <!-- <div id="closePro" class="closeCss">
  4019. <img src="../../../../assets/icon/close.png" alt />
  4020. </div> -->
  4021. <div class="lbox">
  4022. <img src="../../../assets/loading.gif" />上传中,请稍后
  4023. </div>
  4024. <div style="margin-bottom: 10px">
  4025. <span>{{
  4026. unitJson[unitIndex].chapterInfo[0].taskJson[
  4027. itemTaskIndex
  4028. ].isFinishSize
  4029. }}M</span>
  4030. /
  4031. <span>{{
  4032. unitJson[unitIndex].chapterInfo[0].taskJson[
  4033. itemTaskIndex
  4034. ].isAllSize
  4035. }}M</span>
  4036. </div>
  4037. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  4038. itemTaskIndex
  4039. ].progress
  4040. ? unitJson[unitIndex].chapterInfo[0]
  4041. .taskJson[itemTaskIndex].progress
  4042. : 0
  4043. " style="width: 80%"></el-progress>
  4044. </div>
  4045. </div>
  4046. </div>
  4047. </div>
  4048. <!-- padding: 20px; -->
  4049. <div style="
  4050. background: #fff;
  4051. border-radius: 5px;
  4052. margin-top: 15px;
  4053. " :style="{paddingBottom: panTaskElist() == 0?'75px':''}">
  4054. <div v-if="
  4055. unitJson[unitIndex].easy == 6 ||
  4056. !unitJson[unitIndex].easy
  4057. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]"
  4058. element-loading-text="小可正在努力生成中,请稍等...">
  4059. <div class="c_pub_button_confirm stopBtn"
  4060. v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]"
  4061. @click="cancelAjax('aiTaskGL2', itemTaskIndex)">停止</div>
  4062. <div style="width: 100%">
  4063. <div style="
  4064. display: flex;
  4065. flex-direction: row;
  4066. align-items: center;
  4067. margin: 5px 0 20px;
  4068. width: 100%
  4069. ">
  4070. <div class="lineTitle clineTitle" style="width: 100%">
  4071. <span>练习内容</span>
  4072. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4073. <div class="r_pub_button_op" style="margin-left:auto;"
  4074. @contextmenu.prevent="openAiDialog(1, 'aiTaskG2', itemTaskIndex)"
  4075. @click="openAiDialog(2, 'aiTaskG2', itemTaskIndex)">{{ panDanTool(itemTask) > 0 ?
  4076. '重新生成工具' : '生成工具' }}</div>
  4077. </el-tooltip>
  4078. <div class="r_pub_button_op" style="margin-left:10px;" @click="allEvaCan2(itemTaskIndex)" v-if="panDanTool(itemTask) > 0">{{ panDanToolEva(itemTask) > 0 ?
  4079. '重新生成工具评价' : '生成工具评价' }}</div>
  4080. </div>
  4081. <!-- <div class="line" style="width: 90%"></div> -->
  4082. </div>
  4083. </div>
  4084. <div class="tools">
  4085. <div class="leftTools" style="width: 100%" v-for="(
  4086. itemTool, toolIndex
  4087. ) in itemTask.toolChoose" :key="toolIndex">
  4088. <div style="
  4089. display: flex;
  4090. flex-direction: row;
  4091. align-items: baseline;
  4092. flex-wrap: nowrap;
  4093. justify-content: flex-start;
  4094. position: relative;
  4095. ">
  4096. <div style="margin-right: 20px; font-weight: bold"
  4097. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4098. 工具 {{ toolIndex + 1 }} :
  4099. </div>
  4100. <div class="chooseWho">
  4101. <div :class="itemTool.toolType == 0
  4102. ? 'isChooseActive'
  4103. : ''
  4104. " @click="
  4105. (itemTool.toolType = 0),
  4106. (itemTool.isFold3 = false),
  4107. $forceUpdate()
  4108. ">
  4109. 互动类
  4110. </div>
  4111. <div :class="itemTool.toolType == 1
  4112. ? 'isChooseActive'
  4113. : ''
  4114. " @click="
  4115. (itemTool.toolType = 1),
  4116. (itemTool.isFold3 = false),
  4117. $forceUpdate()
  4118. ">
  4119. 思维类
  4120. </div>
  4121. <div :class="itemTool.toolType == 6
  4122. ? 'isChooseActive'
  4123. : ''
  4124. " @click="
  4125. (itemTool.toolType = 6),
  4126. (itemTool.isFold3 = false),
  4127. $forceUpdate()
  4128. ">
  4129. 协作类
  4130. </div>
  4131. <div :class="itemTool.toolType == 2
  4132. ? 'isChooseActive'
  4133. : ''
  4134. " @click="
  4135. (itemTool.toolType = 2),
  4136. (itemTool.isFold3 = false),
  4137. $forceUpdate()
  4138. ">
  4139. 测评类
  4140. </div>
  4141. <div :class="itemTool.toolType == 7
  4142. ? 'isChooseActive'
  4143. : ''
  4144. " @click="
  4145. (itemTool.toolType = 7),
  4146. (itemTool.isFold3 = false),
  4147. $forceUpdate()
  4148. ">
  4149. 评价类
  4150. </div>
  4151. <div :class="itemTool.toolType == 3
  4152. ? 'isChooseActive'
  4153. : ''
  4154. " @click="
  4155. (itemTool.toolType = 3),
  4156. (itemTool.isFold3 = false),
  4157. $forceUpdate()
  4158. ">
  4159. 编程类
  4160. </div>
  4161. <div :class="itemTool.toolType == 5
  4162. ? 'isChooseActive'
  4163. : ''
  4164. " @click="
  4165. (itemTool.toolType = 5),
  4166. (itemTool.isFold3 = false),
  4167. $forceUpdate()
  4168. ">
  4169. 学科类
  4170. </div>
  4171. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  4172. " @click="(itemTool.toolType = 4), $forceUpdate()">
  4173. 其他
  4174. </div> -->
  4175. </div>
  4176. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  4177. margin:
  4178. itemTask.toolChoose.length > 1
  4179. ? '0px 35px 0px auto'
  4180. : '0 0 0 auto',
  4181. }" v-if="itemTask.toolChoose.length > 1">
  4182. <div class="chapter_upload_up2" @click.stop="
  4183. upTool(
  4184. $event,
  4185. unitIndex,
  4186. itemTaskIndex,
  4187. toolIndex
  4188. )
  4189. ">
  4190. 上移
  4191. </div>
  4192. <div class="chapter_upload_down2" @click.stop="
  4193. downTool(
  4194. $event,
  4195. unitIndex,
  4196. itemTaskIndex,
  4197. toolIndex
  4198. )
  4199. ">
  4200. 下移
  4201. </div>
  4202. </div>
  4203. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  4204. @click="fold3(itemTaskIndex, toolIndex)"
  4205. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4206. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  4207. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  4208. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4209. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  4210. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4211. v-if="itemTask.toolChoose.length > 1" style="
  4212. position: absolute;
  4213. right: 0;
  4214. top: -5px;
  4215. "></div>
  4216. </div>
  4217. <!-- v-show="!itemTool.isFold3" -->
  4218. <div style="min-height: 163px">
  4219. <div class="toolSort" v-if="itemTool.toolType == 0">
  4220. <!-- <div class="tool">
  4221. <div
  4222. class="whiteBIcon"
  4223. @click="addTools(8, itemTaskIndex, toolIndex)"
  4224. >
  4225. <img src="../../../assets/icon/secondToolList/library.png" alt />
  4226. <div style="margin: 5px 0">素材库</div>
  4227. </div>
  4228. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  4229. <img
  4230. src="../../../assets/icon/checkNo.png"
  4231. alt
  4232. v-if="itemTool.tool.indexOf(8) == -1"
  4233. />
  4234. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  4235. alt /><span>已选择</span></div>
  4236. </div>
  4237. </div>-->
  4238. <!-- <div class="tool">
  4239. <div
  4240. class="whiteBIcon"
  4241. @click="addTools(17, itemTaskIndex, toolIndex)"
  4242. >
  4243. <img
  4244. src="../../../assets/icon/secondToolList/library.png"
  4245. alt
  4246. />
  4247. <div style="margin: 5px 0">学习资料</div>
  4248. </div>
  4249. <div
  4250. class="check"
  4251. @click="addTools(17, itemTaskIndex, toolIndex)"
  4252. >
  4253. <img
  4254. src="../../../assets/icon/checkNo.png"
  4255. alt
  4256. v-if="itemTool.tool.indexOf(17) == -1"
  4257. />
  4258. <img
  4259. src="../../../assets/icon/checkedIs.png"
  4260. alt
  4261. v-else
  4262. />
  4263. </div>10
  4264. </div> -->
  4265. <div class="tool" :class="{
  4266. isToolChoose:
  4267. itemTool.tool.indexOf(10) != -1,
  4268. }" @click="
  4269. addTools(10, itemTaskIndex, toolIndex)
  4270. ">
  4271. <div class="whiteBIcon" @click.stop="
  4272. openTools(itemTaskIndex, 10, toolIndex)
  4273. ">
  4274. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  4275. <div style="margin: 5px 0">倒计时</div>
  4276. </div>
  4277. <div class="noCTool">
  4278. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4279. </div>
  4280. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  4281. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4282. </div>
  4283. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  4284. <img src="../../../assets/icon/checkNo.png" alt
  4285. v-if="itemTool.tool.indexOf(10) == -1" />
  4286. <div class="checkDiv" v-else>
  4287. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4288. </div>
  4289. </div> -->
  4290. </div>
  4291. <div class="tool" :class="{
  4292. isToolChoose:
  4293. itemTool.tool.indexOf(65) != -1,
  4294. }" @click="
  4295. addTools(65, itemTaskIndex, toolIndex)
  4296. ">
  4297. <div class="whiteBIcon" @click.stop="
  4298. addTools(65, itemTaskIndex, toolIndex)
  4299. ">
  4300. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  4301. <div style="margin: 5px 0">挑人</div>
  4302. </div>
  4303. <div class="noCTool">
  4304. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4305. </div>
  4306. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  4307. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4308. </div>
  4309. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  4310. <img src="../../../assets/icon/checkNo.png" alt
  4311. v-if="itemTool.tool.indexOf(65) == -1" />
  4312. <div class="checkDiv" v-else>
  4313. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4314. </div>
  4315. </div> -->
  4316. </div>
  4317. <!-- <div class="tool">
  4318. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  4319. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4320. <div style="margin: 5px 0">学生分组</div>
  4321. </div>
  4322. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4323. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  4324. <div class="checkDiv" v-else>
  4325. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4326. </div>
  4327. </div>
  4328. </div> -->
  4329. <!-- <div class="tool">
  4330. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  4331. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  4332. <div style="margin: 5px 0">交互视频</div>
  4333. </div>
  4334. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  4335. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  4336. <div class="checkDiv" v-else>
  4337. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4338. </div>
  4339. </div>
  4340. </div> -->
  4341. <div class="tool" :class="{
  4342. isToolChoose:
  4343. itemTool.tool.indexOf(72) != -1,
  4344. }" @click="
  4345. addTools(72, itemTaskIndex, toolIndex)
  4346. ">
  4347. <div class="whiteBIcon" @click.stop="
  4348. openTools(itemTaskIndex, 72, toolIndex)
  4349. ">
  4350. <img
  4351. style="object-fit: cover;height: 60px;"
  4352. :src="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson ?
  4353. unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.json.icon :
  4354. require('../../../assets/icon/firstToolList/appStore.png')"
  4355. alt />
  4356. <div style="margin: 5px 0" >
  4357. <div
  4358. v-if="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson"
  4359. >
  4360. <el-tooltip class="item" effect="dark"
  4361. :content="unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.name"
  4362. placement="top">
  4363. <div class="Ovh">
  4364. {{unitJson[unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson.name}}
  4365. </div>
  4366. </el-tooltip>
  4367. </div>
  4368. <span v-else>
  4369. 应用中心
  4370. </span>
  4371. </div>
  4372. </div>
  4373. <div class="noCTool">
  4374. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4375. </div>
  4376. <div class="isCTool" v-if="itemTool.tool.indexOf(72) != -1">
  4377. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4378. </div>
  4379. </div>
  4380. </div>
  4381. <div class="toolSort" v-if="itemTool.toolType == 1">
  4382. <div class="tool" :class="{
  4383. isToolChoose:
  4384. itemTool.tool.indexOf(7) != -1,
  4385. }" @click="
  4386. addTools(7, itemTaskIndex, toolIndex)
  4387. ">
  4388. <div class="whiteBIcon" @click.stop="
  4389. addTools(7, itemTaskIndex, toolIndex)
  4390. ">
  4391. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  4392. <div style="margin: 5px 0">思维网格</div>
  4393. </div>
  4394. <div class="noCTool">
  4395. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4396. </div>
  4397. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  4398. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4399. </div>
  4400. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  4401. <img src="../../../assets/icon/checkNo.png" alt
  4402. v-if="itemTool.tool.indexOf(7) == -1" />
  4403. <div class="checkDiv" v-else>
  4404. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4405. </div>
  4406. </div> -->
  4407. </div>
  4408. <div class="tool" :class="{
  4409. isToolChoose:
  4410. itemTool.tool.indexOf(1) != -1,
  4411. }" @click="
  4412. addTools(1, itemTaskIndex, toolIndex)
  4413. ">
  4414. <div class="whiteBIcon" @click.stop="
  4415. openTools(itemTaskIndex, 1, toolIndex)
  4416. ">
  4417. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4418. <div style="margin: 5px 0">电子白板</div>
  4419. </div>
  4420. <div class="noCTool">
  4421. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4422. </div>
  4423. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  4424. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4425. </div>
  4426. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  4427. <img src="../../../assets/icon/checkNo.png" alt
  4428. v-if="itemTool.tool.indexOf(1) == -1" />
  4429. <div class="checkDiv" v-else>
  4430. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4431. </div>
  4432. </div> -->
  4433. </div>
  4434. <!-- <div class="tool">
  4435. <div
  4436. class="whiteBIcon"
  4437. @click="addTools(2, itemTaskIndex, toolIndex)"
  4438. >
  4439. <img
  4440. src="../../../assets/icon/secondToolList/note.png"
  4441. alt
  4442. />
  4443. <div style="margin: 5px 0">便签</div>
  4444. </div>
  4445. <div
  4446. class="check"
  4447. @click="addTools(2, itemTaskIndex, toolIndex)"
  4448. >
  4449. <img
  4450. src="../../../assets/icon/checkNo.png"
  4451. alt
  4452. v-if="itemTool.tool.indexOf(2) == -1"
  4453. />
  4454. <div class="checkDiv" v-else>
  4455. <img
  4456. src="../../../assets/icon/checkedIs.png"
  4457. alt
  4458. /><span>已选择</span>
  4459. </div>
  4460. </div>
  4461. </div> -->
  4462. <!-- <div class="tool">
  4463. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  4464. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4465. <div style="margin: 5px 0">协同文档</div>
  4466. </div>
  4467. <div
  4468. class="check"
  4469. @click="addTools(6, itemTaskIndex, toolIndex)"
  4470. >
  4471. <img
  4472. src="../../../assets/icon/checkNo.png"
  4473. alt
  4474. v-if="itemTool.tool.indexOf(6) == -1"
  4475. />
  4476. <div class="checkDiv" v-else>
  4477. <img
  4478. src="../../../assets/icon/checkedIs.png"
  4479. alt
  4480. /><span>已选择</span>
  4481. </div>
  4482. </div>
  4483. </div> -->
  4484. <div class="tool" :class="{
  4485. isToolChoose:
  4486. itemTool.tool.indexOf(52) != -1,
  4487. }" @click="
  4488. addTools(52, itemTaskIndex, toolIndex)
  4489. ">
  4490. <div class="whiteBIcon" @click.stop="
  4491. openTools(itemTaskIndex, 52, toolIndex)
  4492. ">
  4493. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4494. <div style="margin: 5px 0">文档</div>
  4495. </div>
  4496. <div class="noCTool">
  4497. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4498. </div>
  4499. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  4500. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4501. </div>
  4502. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  4503. <img src="../../../assets/icon/checkNo.png" alt
  4504. v-if="itemTool.tool.indexOf(52) == -1" />
  4505. <div class="checkDiv" v-else>
  4506. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4507. </div>
  4508. </div> -->
  4509. </div>
  4510. <div class="tool" :class="{
  4511. isToolChoose:
  4512. itemTool.tool.indexOf(3) != -1,
  4513. }" @click="
  4514. addTools(3, itemTaskIndex, toolIndex)
  4515. ">
  4516. <div class="whiteBIcon" @click.stop="
  4517. openTools(itemTaskIndex, 3, toolIndex)
  4518. ">
  4519. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4520. <div style="margin: 5px 0">思维导图</div>
  4521. </div>
  4522. <div class="noCTool">
  4523. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4524. </div>
  4525. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  4526. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4527. </div>
  4528. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  4529. <img src="../../../assets/icon/checkNo.png" alt
  4530. v-if="itemTool.tool.indexOf(3) == -1" />
  4531. <div class="checkDiv" v-else>
  4532. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4533. </div>
  4534. </div> -->
  4535. </div>
  4536. <div class="tool" :class="{
  4537. isToolChoose:
  4538. itemTool.tool.indexOf(48) != -1,
  4539. }" @click="
  4540. addTools(48, itemTaskIndex, toolIndex)
  4541. ">
  4542. <div class="whiteBIcon" @click.stop="
  4543. openTools(itemTaskIndex, 48, toolIndex)
  4544. ">
  4545. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4546. <div style="margin: 5px 0">表格</div>
  4547. </div>
  4548. <div class="noCTool">
  4549. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4550. </div>
  4551. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  4552. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4553. </div>
  4554. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  4555. <img src="../../../assets/icon/checkNo.png" alt
  4556. v-if="itemTool.tool.indexOf(48) == -1" />
  4557. <div class="checkDiv" v-else>
  4558. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4559. </div>
  4560. </div> -->
  4561. </div>
  4562. </div>
  4563. <div class="toolSort" v-if="itemTool.toolType == 6">
  4564. <div class="tool" :class="{
  4565. isToolChoose:
  4566. itemTool.tool.indexOf(49) != -1,
  4567. }" @click="
  4568. addTools(49, itemTaskIndex, toolIndex)
  4569. ">
  4570. <div class="whiteBIcon" @click.stop="
  4571. openTools(itemTaskIndex, 49, toolIndex)
  4572. ">
  4573. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4574. <div style="margin: 5px 0">学生分组</div>
  4575. </div>
  4576. <div class="noCTool">
  4577. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4578. </div>
  4579. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  4580. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4581. </div>
  4582. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4583. <img src="../../../assets/icon/checkNo.png" alt
  4584. v-if="itemTool.tool.indexOf(49) == -1" />
  4585. <div class="checkDiv" v-else>
  4586. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4587. </div>
  4588. </div> -->
  4589. </div>
  4590. </div>
  4591. <div class="toolSort" v-if="itemTool.toolType == 2">
  4592. <!-- <div class="tool">
  4593. <div
  4594. class="whiteBIcon"
  4595. @click="addTools(5, itemTaskIndex, toolIndex)"
  4596. >
  4597. <img
  4598. src="../../../assets/icon/thirdToolList/score.png"
  4599. alt
  4600. />
  4601. <div style="margin: 5px 0">量规评分</div>
  4602. </div>
  4603. <div
  4604. class="check"
  4605. @click="addTools(5, itemTaskIndex, toolIndex)"
  4606. >
  4607. <img
  4608. src="../../../assets/icon/checkNo.png"
  4609. alt
  4610. v-if="itemTool.tool.indexOf(5) == -1"
  4611. />
  4612. <img
  4613. src="../../../assets/icon/checkedIs.png"
  4614. alt
  4615. v-else
  4616. />
  4617. </div>
  4618. </div>-->
  4619. <div class="tool" :class="{
  4620. isToolChoose:
  4621. itemTool.tool.indexOf(4) != -1,
  4622. }" @click="
  4623. addTools(4, itemTaskIndex, toolIndex)
  4624. ">
  4625. <div class="whiteBIcon" @click.stop="
  4626. openTools(itemTaskIndex, 4, toolIndex)
  4627. ">
  4628. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4629. <div style="margin: 5px 0">问卷调查</div>
  4630. </div>
  4631. <div class="noCTool">
  4632. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4633. </div>
  4634. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4635. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4636. </div>
  4637. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4638. <img src="../../../assets/icon/checkNo.png" alt
  4639. v-if="itemTool.tool.indexOf(4) == -1" />
  4640. <div class="checkDiv" v-else>
  4641. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4642. </div>
  4643. </div> -->
  4644. </div>
  4645. <div class="tool" :class="{
  4646. isToolChoose:
  4647. itemTool.tool.indexOf(45) != -1,
  4648. }" @click="
  4649. addTools(45, itemTaskIndex, toolIndex)
  4650. ">
  4651. <div class="whiteBIcon" @click="
  4652. openTools(itemTaskIndex, 45, toolIndex)
  4653. ">
  4654. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4655. <div style="margin: 5px 0">选择题</div>
  4656. </div>
  4657. <div class="noCTool">
  4658. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4659. </div>
  4660. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4661. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4662. </div>
  4663. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4664. <img src="../../../assets/icon/checkNo.png" alt
  4665. v-if="itemTool.tool.indexOf(45) == -1" />
  4666. <div class="checkDiv" v-else>
  4667. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4668. </div>
  4669. </div> -->
  4670. </div>
  4671. <div class="tool" :class="{
  4672. isToolChoose:
  4673. itemTool.tool.indexOf(15) != -1,
  4674. }" @click="
  4675. addTools(15, itemTaskIndex, toolIndex)
  4676. ">
  4677. <div class="whiteBIcon" @click.stop="
  4678. openTools(itemTaskIndex, 15, toolIndex)
  4679. ">
  4680. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4681. <div style="margin: 5px 0">问答</div>
  4682. </div>
  4683. <div class="noCTool">
  4684. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4685. </div>
  4686. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4687. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4688. </div>
  4689. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4690. <img src="../../../assets/icon/checkNo.png" alt
  4691. v-if="itemTool.tool.indexOf(15) == -1" />
  4692. <div class="checkDiv" v-else>
  4693. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4694. </div>
  4695. </div> -->
  4696. </div>
  4697. <div class="tool" :class="{
  4698. isToolChoose:
  4699. itemTool.tool.indexOf(16) != -1,
  4700. }" @click="
  4701. addTools(16, itemTaskIndex, toolIndex)
  4702. ">
  4703. <div class="whiteBIcon" @click.stop="
  4704. addTools(16, itemTaskIndex, toolIndex)
  4705. ">
  4706. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4707. <div style="margin: 5px 0">作业提交</div>
  4708. </div>
  4709. <div class="noCTool">
  4710. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4711. </div>
  4712. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4713. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4714. </div>
  4715. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4716. <img src="../../../assets/icon/checkNo.png" alt
  4717. v-if="itemTool.tool.indexOf(16) == -1" />
  4718. <div class="checkDiv" v-else>
  4719. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4720. </div>
  4721. </div> -->
  4722. </div>
  4723. <div class="tool" :class="{
  4724. isToolChoose:
  4725. itemTool.tool.indexOf(50) != -1,
  4726. }" @click="
  4727. addTools(50, itemTaskIndex, toolIndex)
  4728. ">
  4729. <div class="whiteBIcon" @click.stop="
  4730. addTools(50, itemTaskIndex, toolIndex)
  4731. ">
  4732. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4733. <div style="margin: 5px 0">批量上传</div>
  4734. </div>
  4735. <div class="noCTool">
  4736. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4737. </div>
  4738. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4739. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4740. </div>
  4741. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4742. <img src="../../../assets/icon/checkNo.png" alt
  4743. v-if="itemTool.tool.indexOf(50) == -1" />
  4744. <div class="checkDiv" v-else>
  4745. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4746. </div>
  4747. </div> -->
  4748. </div>
  4749. <!-- <div class="tool">
  4750. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4751. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4752. <div style="margin: 5px 0">个人评价</div>
  4753. </div>
  4754. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4755. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4756. <div class="checkDiv" v-else>
  4757. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4758. </div>
  4759. </div>
  4760. </div> -->
  4761. <div class="tool" :class="{
  4762. isToolChoose:
  4763. itemTool.tool.indexOf(41) != -1,
  4764. }" @click="
  4765. addTools(41, itemTaskIndex, toolIndex)
  4766. ">
  4767. <div class="whiteBIcon" @click.stop="
  4768. openTools(itemTaskIndex, 41, toolIndex)
  4769. ">
  4770. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4771. <div style="margin: 5px 0">选择匹配</div>
  4772. </div>
  4773. <div class="noCTool">
  4774. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4775. </div>
  4776. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4777. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4778. </div>
  4779. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4780. <img src="../../../assets/icon/checkNo.png" alt
  4781. v-if="itemTool.tool.indexOf(41) == -1" />
  4782. <div class="checkDiv" v-else>
  4783. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4784. </div>
  4785. </div> -->
  4786. </div>
  4787. <div class="tool" :class="{
  4788. isToolChoose:
  4789. itemTool.tool.indexOf(47) != -1,
  4790. }" @click="
  4791. addTools(47, itemTaskIndex, toolIndex)
  4792. ">
  4793. <div class="whiteBIcon" @click.stop="
  4794. openTools(itemTaskIndex, 47, toolIndex)
  4795. ">
  4796. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4797. <div style="margin: 5px 0">排序</div>
  4798. </div>
  4799. <div class="noCTool">
  4800. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4801. </div>
  4802. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4803. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4804. </div>
  4805. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4806. <img src="../../../assets/icon/checkNo.png" alt
  4807. v-if="itemTool.tool.indexOf(47) == -1" />
  4808. <div class="checkDiv" v-else>
  4809. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4810. </div>
  4811. </div> -->
  4812. </div>
  4813. <!-- <div class="tool">
  4814. <div
  4815. class="whiteBIcon"
  4816. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4817. >
  4818. <img
  4819. src="../../../assets/icon/thirdToolList/mp3.png"
  4820. alt
  4821. />
  4822. <div style="margin: 5px 0">上传音频</div>
  4823. </div>
  4824. <div
  4825. class="check"
  4826. @click="addTools(42, itemTaskIndex, toolIndex)"
  4827. >
  4828. <img
  4829. src="../../../assets/icon/checkNo.png"
  4830. alt
  4831. v-if="itemTool.tool.indexOf(42) == -1"
  4832. />
  4833. <img
  4834. src="../../../assets/icon/checkedIs.png"
  4835. alt
  4836. v-else
  4837. />
  4838. </div>
  4839. </div> -->
  4840. </div>
  4841. <div class="toolSort" v-if="itemTool.toolType == 3">
  4842. <div class="tool" :class="{
  4843. isToolChoose:
  4844. itemTool.tool.indexOf(18) != -1,
  4845. }" @click="
  4846. addTools(18, itemTaskIndex, toolIndex)
  4847. ">
  4848. <div class="whiteBIcon" @click.stop="
  4849. addTools(18, itemTaskIndex, toolIndex)
  4850. ">
  4851. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4852. <div style="margin: 5px 0">训练平台</div>
  4853. </div>
  4854. <div class="noCTool">
  4855. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4856. </div>
  4857. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4858. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4859. </div>
  4860. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4861. <img src="../../../assets/icon/checkNo.png" alt
  4862. v-if="itemTool.tool.indexOf(18) == -1" />
  4863. <div class="checkDiv" v-else>
  4864. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4865. </div>
  4866. </div> -->
  4867. </div>
  4868. <div class="tool" :class="{
  4869. isToolChoose:
  4870. itemTool.tool.indexOf(21) != -1,
  4871. }" @click="
  4872. addTools(21, itemTaskIndex, toolIndex)
  4873. ">
  4874. <div class="whiteBIcon" @click.stop="
  4875. addTools(21, itemTaskIndex, toolIndex)
  4876. ">
  4877. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4878. <div style="margin: 5px 0">
  4879. AIoT Blockly
  4880. </div>
  4881. </div>
  4882. <div class="noCTool">
  4883. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4884. </div>
  4885. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4886. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4887. </div>
  4888. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4889. <img src="../../../assets/icon/checkNo.png" alt
  4890. v-if="itemTool.tool.indexOf(21) == -1" />
  4891. <div class="checkDiv" v-else>
  4892. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4893. </div>
  4894. </div> -->
  4895. </div>
  4896. <!-- <div class="tool">
  4897. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4898. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4899. <div style="margin: 5px 0">AI体验</div>
  4900. </div>
  4901. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4902. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4903. <div class="checkDiv" v-else>
  4904. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4905. </div>
  4906. </div>
  4907. </div> -->
  4908. <div class="tool" :class="{
  4909. isToolChoose:
  4910. itemTool.tool.indexOf(23) != -1,
  4911. }" @click="
  4912. addTools(23, itemTaskIndex, toolIndex)
  4913. ">
  4914. <div class="whiteBIcon" @click.stop="
  4915. addTools(23, itemTaskIndex, toolIndex)
  4916. ">
  4917. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4918. <div style="margin: 5px 0">AI Python</div>
  4919. </div>
  4920. <div class="noCTool">
  4921. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4922. </div>
  4923. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4924. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4925. </div>
  4926. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4927. <img src="../../../assets/icon/checkNo.png" alt
  4928. v-if="itemTool.tool.indexOf(23) == -1" />
  4929. <div class="checkDiv" v-else>
  4930. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4931. </div>
  4932. </div> -->
  4933. </div>
  4934. <div class="tool" :class="{
  4935. isToolChoose:
  4936. itemTool.tool.indexOf(24) != -1,
  4937. }" @click="
  4938. addTools(24, itemTaskIndex, toolIndex)
  4939. ">
  4940. <div class="whiteBIcon" @click.stop="
  4941. addTools(24, itemTaskIndex, toolIndex)
  4942. ">
  4943. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4944. <div style="margin: 5px 0">
  4945. AI Blockly
  4946. </div>
  4947. </div>
  4948. <div class="noCTool">
  4949. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4950. </div>
  4951. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4952. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4953. </div>
  4954. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4955. <img src="../../../assets/icon/checkNo.png" alt
  4956. v-if="itemTool.tool.indexOf(24) == -1" />
  4957. <div class="checkDiv" v-else>
  4958. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4959. </div>
  4960. </div> -->
  4961. </div>
  4962. <div class="tool" :class="{
  4963. isToolChoose:
  4964. itemTool.tool.indexOf(32) != -1,
  4965. }" @click="
  4966. addTools(32, itemTaskIndex, toolIndex)
  4967. ">
  4968. <div class="whiteBIcon" @click.stop="
  4969. addTools(32, itemTaskIndex, toolIndex)
  4970. ">
  4971. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4972. <div style="margin: 5px 0">源码编辑</div>
  4973. </div>
  4974. <div class="noCTool">
  4975. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4976. </div>
  4977. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4978. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4979. </div>
  4980. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4981. <img src="../../../assets/icon/checkNo.png" alt
  4982. v-if="itemTool.tool.indexOf(32) == -1" />
  4983. <div class="checkDiv" v-else>
  4984. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4985. </div>
  4986. </div> -->
  4987. </div>
  4988. <div class="tool" :class="{
  4989. isToolChoose:
  4990. itemTool.tool.indexOf(57) != -1,
  4991. }" @click="
  4992. addTools(57, itemTaskIndex, toolIndex)
  4993. ">
  4994. <div class="whiteBIcon" @click.stop="
  4995. openTools(itemTaskIndex, 57, toolIndex)
  4996. ">
  4997. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4998. <div style="margin: 5px 0">CocoPi</div>
  4999. </div>
  5000. <div class="noCTool">
  5001. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5002. </div>
  5003. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  5004. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5005. </div>
  5006. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  5007. <img src="../../../assets/icon/checkNo.png" alt
  5008. v-if="itemTool.tool.indexOf(57) == -1" />
  5009. <div class="checkDiv" v-else>
  5010. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5011. </div>
  5012. </div> -->
  5013. </div>
  5014. <div class="tool" :class="{
  5015. isToolChoose:
  5016. itemTool.tool.indexOf(63) != -1,
  5017. }" @click="
  5018. addTools(63, itemTaskIndex, toolIndex)
  5019. ">
  5020. <div class="whiteBIcon" @click.stop="
  5021. addTools(63, itemTaskIndex, toolIndex)
  5022. ">
  5023. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  5024. <div style="margin: 5px 0">海龟编程</div>
  5025. </div>
  5026. <div class="noCTool">
  5027. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5028. </div>
  5029. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  5030. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5031. </div>
  5032. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  5033. <img src="../../../assets/icon/checkNo.png" alt
  5034. v-if="itemTool.tool.indexOf(63) == -1" />
  5035. <div class="checkDiv" v-else>
  5036. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5037. </div>
  5038. </div> -->
  5039. </div>
  5040. <!-- <div class="tool" :class="{
  5041. isToolChoose:
  5042. itemTool.tool.indexOf(71) != -1,
  5043. }" @click="
  5044. addTools(71, itemTaskIndex, toolIndex)
  5045. ">
  5046. <div class="whiteBIcon" @click.stop="
  5047. addTools(71, itemTaskIndex, toolIndex)
  5048. ">
  5049. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  5050. <div style="margin: 5px 0">AI智能体</div>
  5051. </div>
  5052. <div class="noCTool">
  5053. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5054. </div>
  5055. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  5056. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5057. </div>
  5058. </div> -->
  5059. </div>
  5060. <div class="toolSort" v-if="itemTool.toolType == 7">
  5061. <div class="tool" :class="{
  5062. isToolChoose:
  5063. itemTool.tool.indexOf(40) != -1,
  5064. }" @click.stop="
  5065. addTools(40, itemTaskIndex, toolIndex)
  5066. ">
  5067. <div class="whiteBIcon" @click.stop="
  5068. openTools(itemTaskIndex, 40, toolIndex)
  5069. ">
  5070. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  5071. <div style="margin: 5px 0">个人评价</div>
  5072. </div>
  5073. <div class="noCTool">
  5074. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5075. </div>
  5076. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  5077. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5078. </div>
  5079. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  5080. <img src="../../../assets/icon/checkNo.png" alt
  5081. v-if="itemTool.tool.indexOf(40) == -1" />
  5082. <div class="checkDiv" v-else>
  5083. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5084. </div>
  5085. </div> -->
  5086. </div>
  5087. </div>
  5088. <div class="toolSort" v-if="itemTool.toolType == 5">
  5089. <div class="tool" :class="{
  5090. isToolChoose:
  5091. itemTool.tool.indexOf(28) != -1,
  5092. }" @click="
  5093. addTools(28, itemTaskIndex, toolIndex)
  5094. ">
  5095. <div class="whiteBIcon" @click.stop="
  5096. addTools(28, itemTaskIndex, toolIndex)
  5097. ">
  5098. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  5099. <div style="margin: 5px 0">翻译</div>
  5100. </div>
  5101. <div class="noCTool">
  5102. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5103. </div>
  5104. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  5105. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5106. </div>
  5107. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5108. <img src="../../../assets/icon/checkNo.png" alt
  5109. v-if="itemTool.tool.indexOf(28) == -1" />
  5110. <div class="checkDiv" v-else>
  5111. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5112. </div>
  5113. </div> -->
  5114. </div>
  5115. <div class="tool" :class="{
  5116. isToolChoose:
  5117. itemTool.tool.indexOf(31) != -1,
  5118. }" @click="
  5119. addTools(31, itemTaskIndex, toolIndex)
  5120. ">
  5121. <div class="whiteBIcon" @click.stop="
  5122. addTools(31, itemTaskIndex, toolIndex)
  5123. ">
  5124. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5125. <div style="margin: 5px 0">数字画板</div>
  5126. </div>
  5127. <div class="noCTool">
  5128. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5129. </div>
  5130. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  5131. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5132. </div>
  5133. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5134. <img src="../../../assets/icon/checkNo.png" alt
  5135. v-if="itemTool.tool.indexOf(31) == -1" />
  5136. <div class="checkDiv" v-else>
  5137. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5138. </div>
  5139. </div> -->
  5140. </div>
  5141. <div class="tool" :class="{
  5142. isToolChoose:
  5143. itemTool.tool.indexOf(39) != -1,
  5144. }" @click="
  5145. addTools(39, itemTaskIndex, toolIndex)
  5146. ">
  5147. <div class="whiteBIcon" @click.stop="
  5148. addTools(39, itemTaskIndex, toolIndex)
  5149. ">
  5150. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5151. <div style="margin: 5px 0">GeoGebra</div>
  5152. </div>
  5153. <div class="noCTool">
  5154. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5155. </div>
  5156. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  5157. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5158. </div>
  5159. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5160. <img src="../../../assets/icon/checkNo.png" alt
  5161. v-if="itemTool.tool.indexOf(39) == -1" />
  5162. <div class="checkDiv" v-else>
  5163. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5164. </div>
  5165. </div> -->
  5166. </div>
  5167. <div class="tool" :class="{
  5168. isToolChoose:
  5169. itemTool.tool.indexOf(66) != -1,
  5170. }" @click="
  5171. addTools(66, itemTaskIndex, toolIndex)
  5172. ">
  5173. <div class="whiteBIcon" @click.stop="
  5174. addTools(66, itemTaskIndex, toolIndex)
  5175. ">
  5176. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  5177. <div style="margin: 5px 0">公式编辑</div>
  5178. </div>
  5179. <div class="noCTool">
  5180. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5181. </div>
  5182. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  5183. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5184. </div>
  5185. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  5186. <img src="../../../assets/icon/checkNo.png" alt
  5187. v-if="itemTool.tool.indexOf(66) == -1" />
  5188. <div class="checkDiv" v-else>
  5189. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5190. </div>
  5191. </div> -->
  5192. </div>
  5193. <!-- <div class="tool">
  5194. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  5195. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  5196. <div style="margin: 5px 0">分子结构</div>
  5197. </div>
  5198. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  5199. <img src="../../../assets/icon/checkNo.png" alt
  5200. v-if="itemTool.tool.indexOf(67) == -1" />
  5201. <div class="checkDiv" v-else>
  5202. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5203. </div>
  5204. </div>
  5205. </div> -->
  5206. <!-- <div class="tool" :class="{
  5207. isToolChoose:
  5208. itemTool.tool.indexOf(68) != -1,
  5209. }" @click="
  5210. addTools(68, itemTaskIndex, toolIndex)
  5211. ">
  5212. <div class="whiteBIcon" @click.stop="
  5213. addTools(68, itemTaskIndex, toolIndex)
  5214. ">
  5215. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  5216. <div style="margin: 5px 0">时间轴</div>
  5217. </div>
  5218. <div class="noCTool">
  5219. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5220. </div>
  5221. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  5222. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5223. </div> -->
  5224. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  5225. <img src="../../../assets/icon/checkNo.png" alt
  5226. v-if="itemTool.tool.indexOf(68) == -1" />
  5227. <div class="checkDiv" v-else>
  5228. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5229. </div>
  5230. </div> -->
  5231. <!-- </div> -->
  5232. <div class="tool" :class="{
  5233. isToolChoose:
  5234. itemTool.tool.indexOf(69) != -1,
  5235. }" @click="
  5236. addTools(69, itemTaskIndex, toolIndex)
  5237. ">
  5238. <div class="whiteBIcon" @click.stop="
  5239. openTools(itemTaskIndex, 69, toolIndex)
  5240. ">
  5241. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  5242. <div style="margin: 5px 0">英语写作</div>
  5243. </div>
  5244. <div class="noCTool">
  5245. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5246. </div>
  5247. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  5248. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5249. </div>
  5250. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  5251. <img src="../../../assets/icon/checkNo.png" alt
  5252. v-if="itemTool.tool.indexOf(4) == -1" />
  5253. <div class="checkDiv" v-else>
  5254. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5255. </div>
  5256. </div> -->
  5257. </div>
  5258. <div class="tool" :class="{
  5259. isToolChoose:
  5260. itemTool.tool.indexOf(70) != -1,
  5261. }" @click="
  5262. addTools(70, itemTaskIndex, toolIndex)
  5263. ">
  5264. <div class="whiteBIcon" @click.stop="
  5265. openTools(itemTaskIndex, 70, toolIndex)
  5266. ">
  5267. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  5268. <div style="margin: 5px 0">英语口语</div>
  5269. </div>
  5270. <div class="noCTool">
  5271. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5272. </div>
  5273. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  5274. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5275. </div>
  5276. </div>
  5277. <!-- <div class="tool">
  5278. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  5279. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  5280. <div style="margin: 5px 0">翻译</div>
  5281. </div>
  5282. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5283. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  5284. <div class="checkDiv" v-else>
  5285. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5286. </div>
  5287. </div>
  5288. </div>
  5289. <div class="tool">
  5290. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  5291. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  5292. <div style="margin: 5px 0">魔盒识字</div>
  5293. </div>
  5294. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  5295. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  5296. <div class="checkDiv" v-else>
  5297. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5298. </div>
  5299. </div>
  5300. </div>
  5301. <div class="tool">
  5302. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  5303. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  5304. <div style="margin: 5px 0">24点</div>
  5305. </div>
  5306. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  5307. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  5308. <div class="checkDiv" v-else>
  5309. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5310. </div>
  5311. </div>
  5312. </div>
  5313. <div class="tool">
  5314. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  5315. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5316. <div style="margin: 5px 0">数学画板</div>
  5317. </div>
  5318. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5319. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  5320. <div class="checkDiv" v-else>
  5321. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5322. </div>
  5323. </div>
  5324. </div>
  5325. <div class="tool">
  5326. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  5327. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5328. <div style="margin: 5px 0">GeoGebra</div>
  5329. </div>
  5330. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5331. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  5332. <div class="checkDiv" v-else>
  5333. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5334. </div>
  5335. </div>
  5336. </div>
  5337. <div class="tool">
  5338. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  5339. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  5340. <div style="margin: 5px 0">模拟驾驶</div>
  5341. </div>
  5342. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  5343. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  5344. <div class="checkDiv" v-else>
  5345. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5346. </div>
  5347. </div>
  5348. </div>
  5349. <div class="tool">
  5350. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  5351. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  5352. <div style="margin: 5px 0">路径搜索</div>
  5353. </div>
  5354. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  5355. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  5356. <div class="checkDiv" v-else>
  5357. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5358. </div>
  5359. </div>
  5360. </div>
  5361. <div class="tool">
  5362. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  5363. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  5364. <div style="margin: 5px 0">深度学习</div>
  5365. </div>
  5366. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  5367. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  5368. <div class="checkDiv" v-else>
  5369. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5370. </div>
  5371. </div>
  5372. </div>
  5373. <div class="tool">
  5374. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  5375. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  5376. <div style="margin: 5px 0">全历史</div>
  5377. </div>
  5378. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  5379. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  5380. <div class="checkDiv" v-else>
  5381. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5382. </div>
  5383. </div>
  5384. </div>
  5385. </div>
  5386. <div class="toolSort" v-if="itemTool.toolType == 4">
  5387. <div class="tool">
  5388. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  5389. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  5390. <div style="margin: 5px 0">课程设计</div>
  5391. </div>
  5392. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  5393. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  5394. <div class="checkDiv" v-else>
  5395. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5396. </div>
  5397. </div>
  5398. </div>
  5399. <div class="tool">
  5400. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  5401. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  5402. <div style="margin: 5px 0">目标管理</div>
  5403. </div>
  5404. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  5405. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  5406. <div class="checkDiv" v-else>
  5407. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5408. </div>
  5409. </div>
  5410. </div> -->
  5411. <!-- <div class="tool">
  5412. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  5413. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  5414. <div style="margin: 5px 0">汉字宫</div>
  5415. </div>
  5416. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  5417. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  5418. <div class="checkDiv" v-else>
  5419. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5420. </div>
  5421. </div>
  5422. </div> -->
  5423. </div>
  5424. </div>
  5425. <!-- v-show="!itemTool.isFold3" -->
  5426. <div class="op_tool_box"
  5427. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1"
  5428. element-loading-text="小可正在努力生成中,请稍等...">
  5429. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  5430. class="binfo_input" style="
  5431. margin: 0 0 20px 0;
  5432. width: 100% !important;
  5433. " v-model="itemTool.toolDetail"></textarea>
  5434. <div class="op_box"
  5435. :class="{op_box_isquote: isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]}">
  5436. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  5437. <div class="op_box_right">
  5438. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5439. <div class="r_pub_button_op"
  5440. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)"
  5441. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)">
  5442. 智能优化</div>
  5443. </el-tooltip>
  5444. <el-switch style="margin-left: 10px"
  5445. v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" active-text="引用"
  5446. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  5447. @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  5448. </div>
  5449. </div>
  5450. </div>
  5451. <evaList :toolsData="toolsData" :unitJson="unitJson" :itemTaskIndex="itemTaskIndex"
  5452. :toolIndex="toolIndex" :knowFileids="knowFileids" :languageSetting="languageSetting"
  5453. :userid="userid" :aiJson="aiJson" @addAppendixEva="addAppendixEva"
  5454. @setEvaList="setEvaList" @addCourseBehavior="addCourseBehavior"
  5455. v-if="panTaskElist() == 0 && pjIndex.indexOf(itemTool.tool[0]) != -1"
  5456. :ref="'evalist'+itemTaskIndex+toolIndex"></evaList>
  5457. </div>
  5458. <button class="c_pub_button_add pub_btn_tool_img"
  5459. @click="addToolFun(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具描述-添加按钮`)"
  5460. style="
  5461. margin: 0 auto;
  5462. padding: 0 30px;
  5463. height: 45px;
  5464. ">
  5465. 添加工具
  5466. </button>
  5467. </div>
  5468. </div>
  5469. <div class="elist_css" v-if="panElist(itemTask) > 0">
  5470. <div class="elist_title">
  5471. <div style=" display: flex; flex-direction: row; align-items: center; margin: 20px 0; ">
  5472. <div class="lineTitle clineTitle" style="width: auto">任务评价体系</div>
  5473. </div>
  5474. <div>
  5475. <MindTask :showBar="false" :mindData="itemTask" style="width: 100%"
  5476. :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' "
  5477. :ref="unitIndex + '-' + itemTaskIndex + 'mindTask'"></MindTask>
  5478. </div>
  5479. </div>
  5480. </div>
  5481. <div class="elist_css" v-if="panTaskElist() > 0"
  5482. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])"
  5483. element-loading-text="小可正在努力生成中,请稍等...">
  5484. <div class="elist_title">
  5485. <div style="
  5486. display: flex;
  5487. flex-direction: row;
  5488. align-items: center;
  5489. margin: 20px 0;
  5490. ">
  5491. <div class="lineTitle clineTitle">评价设置</div>
  5492. <div style="margin-left:auto;display: flex;">
  5493. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  5494. v-if="itemTask.eList && itemTask.eList.length">
  5495. <div class="r_pub_button_op"
  5496. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  5497. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  5498. </el-tooltip>
  5499. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  5500. v-if="itemTask.eList && itemTask.eList.length">
  5501. <div class="r_pub_button_op" style="margin-left:10px;"
  5502. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  5503. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  5504. </el-tooltip>
  5505. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5506. <div class="r_pub_button_op" style="margin-left:10px;"
  5507. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  5508. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList &&
  5509. itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
  5510. </el-tooltip>
  5511. </div>
  5512. <!-- <div class="line" style="width: 90%"></div> -->
  5513. </div>
  5514. </div>
  5515. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5516. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5517. 上传补充资料
  5518. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  5519. style="display: none" v-if="inputShow" @change="
  5520. beforeUploadInfo2(
  5521. $event,
  5522. 18,
  5523. itemTaskIndex
  5524. )
  5525. " />
  5526. </button>
  5527. <div style="margin-top: 10px;width:100%"
  5528. v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  5529. <div class="add_chapters_box add_c_none" v-if="
  5530. pingjiaInfoData[itemTaskIndex] &&
  5531. pingjiaInfoData[itemTaskIndex].length == 0
  5532. ">
  5533. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5534. <span>暂时还没有内容,快去添加吧</span>
  5535. </div>
  5536. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5537. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]"
  5538. :key="item1.id" @click="
  5539. getChapterData(
  5540. $event,
  5541. index1,
  5542. item1.type
  5543. )
  5544. ">
  5545. <div class="chapter_upload_o" style="
  5546. position: relative;
  5547. display: flex;
  5548. align-items: center;
  5549. ">
  5550. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5551. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5552. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5553. </div>
  5554. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5555. </div>
  5556. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5557. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5558. </div>
  5559. <div v-if="item1.type == 14" class="chapter_upload_l_i14"
  5560. style="margin-left: 1px">
  5561. </div>
  5562. <div v-if="item1.type == 12" class="chapter_upload_l_i12"
  5563. style="margin-left: 1px">
  5564. </div>
  5565. <div v-if="item1.type == 13" class="chapter_upload_l_i13"
  5566. style="margin-left: 1px">
  5567. </div>
  5568. </div>
  5569. <div class="chapter_upload_n">
  5570. <input readonly="true" v-if="
  5571. item1.type == 2 ||
  5572. item1.type == 3 ||
  5573. item1.type == 12 ||
  5574. item1.type == 13 ||
  5575. item1.type == 7
  5576. " :placeholder="item1.name" @click.stop="
  5577. checkChpater3($event, index1, item1)
  5578. " style="
  5579. border: none;
  5580. outline: none;
  5581. width: 80%;
  5582. minwidth: 215px;
  5583. z-index: 99;
  5584. font-size: 14px;
  5585. white-space: nowrap;
  5586. overflow: hidden;
  5587. text-overflow: ellipsis;
  5588. " />
  5589. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5590. border: none;
  5591. outline: none;
  5592. width: 80%;
  5593. white-space: nowrap;
  5594. overflow: hidden;
  5595. text-overflow: ellipsis;
  5596. " readonly="true" @click="
  5597. selectAttText(index1)
  5598. " />
  5599. <input :placeholder="item1.title ? item1.title : '链接'
  5600. " v-if="item1.type == 8" style="
  5601. border: none;
  5602. outline: none;
  5603. width: 80%;
  5604. white-space: nowrap;
  5605. overflow: hidden;
  5606. text-overflow: ellipsis;
  5607. " readonly="true" @click="selectLine(index1)" />
  5608. <input :placeholder="item1.title ? item1.title : '链接'
  5609. " v-if="item1.type == 14" style="
  5610. border: none;
  5611. outline: none;
  5612. width: 80%;
  5613. white-space: nowrap;
  5614. overflow: hidden;
  5615. text-overflow: ellipsis;
  5616. " readonly="true" @click="
  5617. openUpdateSource(index1)
  5618. " />
  5619. </div>
  5620. <div class="chapter_upload_ic">
  5621. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5622. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5623. checkChpater3($event, index1, item1)
  5624. ">
  5625. <div></div>
  5626. </div>
  5627. <div class="chapter_upload_ic_r" @click.stop="
  5628. deletepingjiaInfoData(
  5629. $event,
  5630. index1,
  5631. itemTaskIndex
  5632. )
  5633. ">
  5634. <div></div>
  5635. </div>
  5636. </div>
  5637. </div>
  5638. </div>
  5639. </div>
  5640. </div>
  5641. <div v-if="
  5642. pingjiainfoproVisible[itemTaskIndex]
  5643. " class="mask">
  5644. <div class="progressBox">
  5645. <div class="lbox">
  5646. <img src="../../../assets/loading.gif" />上传中,请稍后
  5647. </div>
  5648. <div style="margin-bottom: 10px">
  5649. <span>{{
  5650. pingjiainfoisFinishSize[itemTaskIndex]
  5651. }}</span>
  5652. /
  5653. <span>{{
  5654. pingjiainfoisAllSize[itemTaskIndex]
  5655. }}</span>
  5656. </div>
  5657. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5658. ? pingjiainfoprogress[itemTaskIndex]
  5659. : 0
  5660. " style="width: 80%"></el-progress> -->
  5661. </div>
  5662. </div>
  5663. </div>
  5664. <div class="mbCss">
  5665. <div class="pjCss" :style="{
  5666. width: itemTask.isEvaFold
  5667. ? 'calc(100% - 55%)'
  5668. : 'calc(100% - 120px)',
  5669. }">
  5670. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5671. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5672. <div class="elist_inptu_text">
  5673. <span>目标:</span>
  5674. <!-- <span>核心素养:</span> -->
  5675. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标"
  5676. style="width: calc(100% - 280px);" />
  5677. <el-switch @change="forceUpdate" class="rateSwitch" style="margin-left: auto;"
  5678. v-model="itemTask.eList[eIndex].isai" active-color="#0061FF" active-text="AI评分"
  5679. inactive-text="" active-value="1" inactive-value="2">
  5680. </el-switch>
  5681. </div>
  5682. <div class="elist_inptu_text" v-show="false">
  5683. <!-- <span>评价维度:</span> -->
  5684. <span>能力:</span>
  5685. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5686. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5687. <!-- </el-tooltip> -->
  5688. <!-- <span>评星等级:</span>
  5689. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5690. disabled></el-rate> -->
  5691. <div class="remove" @click="
  5692. deletEList(
  5693. unitIndex,
  5694. itemTaskIndex,
  5695. eIndex
  5696. )
  5697. "></div>
  5698. </div>
  5699. <div class="elist_inptu_text">
  5700. <!-- <span>维度描述:</span> -->
  5701. <span>评价标准:</span>
  5702. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5703. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5704. <div class="remove" @click="
  5705. deletEList(
  5706. unitIndex,
  5707. itemTaskIndex,
  5708. eIndex
  5709. )
  5710. "></div>
  5711. <!-- </el-tooltip> -->
  5712. </div>
  5713. <div class="elist_inptu_text" v-if="evalua">
  5714. <span>目标:</span>
  5715. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5716. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5717. @change="forceUpdate()">
  5718. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5719. :value="e.name">
  5720. </el-option>
  5721. </el-select> -->
  5722. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5723. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5724. </div>
  5725. <div class="elist_inptu_text" style="align-items: flex-start;"
  5726. v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]"
  5727. element-loading-text="小可正在努力生成中,请稍等...">
  5728. <span>评价细则:</span>
  5729. <div style="width: calc(100%);">
  5730. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn"
  5731. v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' :
  5732. '展开细则'}}</div>
  5733. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5734. <div class="ruleBtn"
  5735. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5736. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5737. </el-tooltip>
  5738. <div style="width: calc(100%);" class='op_task_box'
  5739. v-if="itemTask.eList[eIndex].isrule">
  5740. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  5741. v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5742. <div class="op_box">
  5743. <div class="op_remark"></div>
  5744. <div class="op_box_right">
  5745. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5746. <div class="r_pub_button_op"
  5747. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5748. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">
  5749. {{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5750. </el-tooltip>
  5751. </div>
  5752. </div>
  5753. </div>
  5754. </div>
  5755. </div>
  5756. </div>
  5757. </div>
  5758. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5759. style="margin: 35px 35px 0 0">
  5760. <div class="addToolImg">
  5761. <img src="../../../assets/icon/add.png" alt />
  5762. </div>
  5763. <div>添加</div>
  5764. </div> -->
  5765. <div class="eva_btn_box">
  5766. <div class="eva_btn_left_box">
  5767. <button class="c_pub_button_add pub_btn_eval_img"
  5768. @click="addEList(unitIndex, itemTaskIndex)">
  5769. 添加
  5770. </button>
  5771. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5772. @click="openEList(unitIndex, itemTaskIndex)">
  5773. 资源
  5774. </button> -->
  5775. </div>
  5776. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5777. v-if="itemTask.eList && itemTask.eList.length">
  5778. 添加资源模板
  5779. </button>
  5780. </div>
  5781. </div>
  5782. <div v-if="evalua" style="
  5783. border: 1px solid #e5e5e5;
  5784. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5785. " :style="{
  5786. width: itemTask.isEvaFold ? '55%' : '116px',
  5787. }" class="evaCss">
  5788. <!-- <div class="e_add_top">
  5789. <div class="e_add_title">
  5790. <span>当前使用目标管理</span>
  5791. <span>{{ eTitle }}</span>
  5792. <img src="../../../assets/line.png" class="cru_line" style="
  5793. width: 125px;
  5794. height: 20px;
  5795. bottom: -10px;
  5796. left: 155px;
  5797. " />
  5798. </div>
  5799. </div> -->
  5800. <div class="e_add_content" style="width: 100%">
  5801. <div class="e_add_list_pbox" style="width: 100%">
  5802. <div class="e_add_list_pbox_title">
  5803. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5804. <div class="type_content" v-if="itemTask.isEvaFold">
  5805. <span :class="{ active: typeMode == 1 }"
  5806. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5807. <span :class="{ active: typeMode == 2 }"
  5808. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5809. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5810. </div>
  5811. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5812. @click="foldEva(itemTaskIndex)">
  5813. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5814. </div>
  5815. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5816. @click="foldEva(itemTaskIndex)">
  5817. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5818. </div>
  5819. </div>
  5820. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5821. style="min-height: 200px">
  5822. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5823. " v-if="typeMode == 1"></Mind>
  5824. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5825. </Sunburst>
  5826. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5827. v-if="typeMode == 3"></SeeBoard>
  5828. </div>
  5829. </div>
  5830. </div>
  5831. </div>
  5832. </div>
  5833. </div>
  5834. <div class="funBlock" style="padding: 0">
  5835. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5836. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5837. <div>
  5838. {{
  5839. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5840. }}
  5841. </div>
  5842. </div>
  5843. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5844. <div>展开</div>
  5845. <div class="arrow">
  5846. <img src="../../../assets/icon/expand.png" alt />
  5847. </div>
  5848. </div> -->
  5849. </div>
  5850. </div>
  5851. </div>
  5852. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5853. <!-- <div>
  5854. <img src="../../../../assets/icon/new/addStage.png" alt />
  5855. <span>添加任务</span>
  5856. </div> -->
  5857. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5858. 添加任务
  5859. </button>
  5860. </div>
  5861. <div class="appendixBox whiteBg taskBorder" style="background: #fff; margin: 10px 0 10px;"
  5862. :style="{ paddingBottom: appendixPan ? '10px' : '0px', minHeight: appendixPan ? '670px' : 'unset' }" v-if="(appendixTaskCheck != 'all' || appendixTypeCheck != 'all') || allFile().length" v-loading="appendixLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5863. <div class="whiteBg" style="border-radius: 0; ">
  5864. <div class="appendix_info_title" style="margin: 0 20px 0 20px;position:relative; padding: 0 0 15px;">
  5865. <span>附件</span>
  5866. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  5867. @click="appendixPan = !appendixPan">{{ appendixPan ? '折叠' : '展开' }}</button>
  5868. </div>
  5869. <div style="width: 100%; box-sizing: border-box;"
  5870. v-show="appendixPan">
  5871. <div class="appendix_check_box">
  5872. <div class="appendix_check_task">
  5873. <span>任务:</span>
  5874. <div class="checkButton" :class="{ checked: appendixTaskCheck == 'all' }" @click="appendixTaskCheck = 'all'">全部</div>
  5875. <div class="checkButton" :class="{ checked: appendixTaskCheck == (tIndex+1) }" @click="appendixTaskCheck = (tIndex+1)" v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0].taskJson" :key="tIndex">任务{{ tIndex+1 }}</div>
  5876. </div>
  5877. <div class="appendix_check_type">
  5878. <span>文件类型:</span>
  5879. <div class="checkButton" :class="{ checked: appendixTypeCheck == 'all' }" @click="appendixTypeCheck = 'all'">全部</div>
  5880. <div class="checkButton" :class="{ checked: appendixTypeCheck == tIndex }" @click="appendixTypeCheck = t.value" v-for="(t, tIndex) in appendixType" :key="tIndex">{{ t.label }}</div>
  5881. </div>
  5882. <div class="appendix_check_all_box">
  5883. <div class="appendix_check_all" v-if="allFile().length" @click="checkAllappendixFile()">
  5884. <div class="chapter_upload_check" :class="{ checked: panAppendixCheckAll() }"></div>
  5885. <div class="appendix_check_all_text">全选</div>
  5886. </div>
  5887. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="exportAppendixFiles">批量下载</button>
  5888. </div>
  5889. </div>
  5890. <div class="appendix_file_box">
  5891. <div class="add_chapters_box" style="display: flex; flex-direction: column">
  5892. <div style="height: 50px; display: flex ; align-items: center; justify-content: center;" v-if="allFile().length == 0 ">
  5893. <span>暂时还没有内容,快去添加吧</span>
  5894. </div>
  5895. <div class="chapter_upload" v-for="(item1, index1) in allFile()" :key="item1.id">
  5896. <div class="chapter_upload_o"
  5897. style=" position: relative; display: flex; align-items: center; ">
  5898. <div class="chapter_upload_check"
  5899. :class="{ checked: appendixFiles.indexOf(item1.url) != -1 }"
  5900. @click="checkAppendixFile(item1.url)"></div>
  5901. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5902. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5903. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5904. </div>
  5905. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5906. </div>
  5907. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5908. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5909. </div>
  5910. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5911. </div>
  5912. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5913. </div>
  5914. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5915. </div>
  5916. </div>
  5917. <div class="chapter_upload_n" style="width: 100%;">
  5918. <div @click.stop="
  5919. checkChpater3($event, index1, item1)
  5920. " v-if="
  5921. item1.type == 2 ||
  5922. item1.type == 3 ||
  5923. item1.type == 12 ||
  5924. item1.type == 13 ||
  5925. item1.type == 7
  5926. " class="chapter_upload_box">{{ item1.name }}</div>
  5927. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  5928. selectAttText(0, index1)
  5929. ">{{ item1.name }}</div>
  5930. <div v-if="item1.type == 8" class="chapter_upload_box"
  5931. @click="selectLine(0, index1)">{{ item1.title ? item1.title : '链接' }}</div>
  5932. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  5933. openUpdateSource(0, index1)
  5934. ">{{ item1.title ? item1.title : '链接' }}</div>
  5935. </div>
  5936. <div class="chapter_upload_ic">
  5937. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5938. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5939. checkChpater3($event, index1, item1)
  5940. ">
  5941. <div></div>
  5942. </div>
  5943. <div class="chapter_upload_ic_download" @click.stop="downloadFile(item1)">
  5944. <div></div>
  5945. </div>
  5946. </div>
  5947. </div>
  5948. </div>
  5949. </div>
  5950. </div>
  5951. </div>
  5952. </div>
  5953. </div>
  5954. </div>
  5955. <div class="info_btnBox3" v-show="istemplate == 1">
  5956. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5957. goTo(
  5958. '/course?userid=' +
  5959. userid +
  5960. '&oid=' +
  5961. oid +
  5962. '&org=' +
  5963. org +
  5964. '&role=' +
  5965. role
  5966. )
  5967. ">
  5968. 返回课程
  5969. </button>
  5970. <button class="c_pub_button_return pub_btn_last_img"
  5971. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5972. {{ steps == 4 ? "返回课程" : "上一步" }}
  5973. </button>
  5974. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5975. pub_btn_next_img: steps != 3,
  5976. pub_btn_finish_img: steps == 3,
  5977. }">
  5978. {{ steps == 3 ? "确认上传" : "下一步" }}
  5979. </button>
  5980. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5981. '修改模板' : '保存模板'}}</button>
  5982. </div>
  5983. </div>
  5984. </div>
  5985. </div>
  5986. </div>
  5987. <div style="
  5988. width: calc(100% - 20px);
  5989. background: rgb(255, 255, 255);
  5990. border-radius: 10px;
  5991. " v-if="steps == 4">
  5992. <div class="basic_box_success">
  5993. <div class="right_img">
  5994. <img src="../../../assets/icon/right.png" alt />
  5995. </div>
  5996. <div style="font-weight: bold">成功</div>
  5997. <!-- <div>您的课程编号</div>
  5998. <div class="number">{{ number }}</div>-->
  5999. <!-- <div class="success_button">
  6000. <div class="look_course" @click="isNoFinsh">
  6001. 邀请老师协同编辑
  6002. </div>
  6003. <div class="attend_others" @click="goCourse">预览课程</div>
  6004. </div> -->
  6005. </div>
  6006. </div>
  6007. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  6008. @mouseleave="btnDisplay(false)" v-if="false">
  6009. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  6010. goTo(
  6011. '/course?userid=' +
  6012. userid +
  6013. '&oid=' +
  6014. oid +
  6015. '&org=' +
  6016. org +
  6017. '&role=' +
  6018. role
  6019. )
  6020. ">
  6021. 返回课程
  6022. </button>
  6023. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  6024. @click="lastSteps">
  6025. {{ steps == 4 ? "返回课程" : "上一步" }}
  6026. </button>
  6027. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  6028. pub_btn_next_img: steps != 3,
  6029. pub_btn_finish_img: steps == 3,
  6030. }">
  6031. {{ steps == 3 ? "确认上传" : "下一步" }}
  6032. </button>
  6033. </div>
  6034. </div>
  6035. </div>
  6036. <div class="leftBar" style="height: calc(100% - 36px - 20px);margin-top: 36px;" v-if="istemplate == 1">
  6037. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson"
  6038. v-if="!yiKeTemplateArray.includes(templateid)" />
  6039. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson"
  6040. v-if="!yiKeTemplateArray.includes(templateid)" />
  6041. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson"
  6042. v-if="!yiKeTemplateArray.includes(templateid)" />
  6043. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  6044. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson"
  6045. v-if="!yiKeTemplateArray.includes(templateid)" />
  6046. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson"
  6047. v-if="!yiKeTemplateArray.includes(templateid)" />
  6048. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson"
  6049. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6050. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson"
  6051. v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'" />
  6052. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2"
  6053. @setAiJson="setAiJson" />
  6054. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson"
  6055. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6056. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson"
  6057. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6058. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson"
  6059. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6060. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson"
  6061. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6062. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson"
  6063. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6064. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson"
  6065. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  6066. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  6067. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  6068. @setAiJson="setAiJson" /> -->
  6069. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  6070. @setAiJson="setAiJson" />
  6071. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  6072. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  6073. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  6074. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  6075. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  6076. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  6077. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  6078. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson" />
  6079. </div>
  6080. <div class="leftBar2 resizable" style="height: calc(100% - 36px - 20px);margin-top: 36px;"
  6081. v-show="istemplate != 1 && isDialog == 1 && chatid && isDisplay">
  6082. <div class="resizer"></div>
  6083. <aiBoxRight :languageSetting="languageSetting" :courseId="chatid" :unitJson="unitJson" :quoteArray="isQuote"
  6084. :teacherCourseText="teacherCourseText" :targetCourseText="targetCourseText" :courseText2="courseText"
  6085. :targetCourseText2="targetCourseText2" :cpote="cpote" @addCourseBehavior="addCourseBehavior"
  6086. :fileids='[...knowFileids, ...knowFileids2]' @setIsQuote="setIsQuote" @addChatAppendixFile="addChatAppendixFile"></aiBoxRight>
  6087. </div>
  6088. <div class="close_btn" @click="closeRight" :class="!isDisplay ? 'close_btn_voice' : ''"
  6089. v-show="istemplate != 1 && isDialog == 1 && chatid">
  6090. <img src="../../../assets/icon/course/arrow.svg">
  6091. </div>
  6092. </div>
  6093. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  6094. class="dialog_diy2 customWidth">
  6095. <div>请复制该链接邀请协同编辑</div>
  6096. <div>http://www.boomyon.com/index-zhang.com</div>
  6097. <span slot="footer" class="dialog-footer">
  6098. <el-button type="primary">复制链接分享</el-button>
  6099. <el-button @click="dialogVisible = false">取消</el-button>
  6100. </span>
  6101. </el-dialog>
  6102. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  6103. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  6104. <el-form>
  6105. <el-form-item label="文档标题">
  6106. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  6107. </el-form-item>
  6108. <div>文档简介</div>
  6109. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  6110. </el-form>
  6111. <span slot="footer" class="dialog-footer">
  6112. <el-button @click="dialogVisible1 = false">取 消</el-button>
  6113. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  6114. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  6115. </span>
  6116. </el-dialog>
  6117. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  6118. :before-close="handleClose" class="dialog_diy">
  6119. <el-form>
  6120. <el-form-item label="文档标题">
  6121. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  6122. </el-form-item>
  6123. <div>文档内容</div>
  6124. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  6125. </el-form>
  6126. <span slot="footer" class="dialog-footer">
  6127. <el-button @click="clearChoose">取 消</el-button>
  6128. <el-button type="primary" @click="wordNext()">确定</el-button>
  6129. </span>
  6130. </el-dialog>
  6131. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  6132. :before-close="handleClose" class="dialog_diy">
  6133. <el-form>
  6134. <el-form-item label="文本标题">
  6135. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  6136. placeholder="请输入文本标题..."></el-input>
  6137. </el-form-item>
  6138. <!-- <div>富文本内容</div> -->
  6139. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  6140. </el-form>
  6141. <span slot="footer" class="dialog-footer">
  6142. <el-button @click="clearAttText">取 消</el-button>
  6143. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  6144. </span>
  6145. </el-dialog>
  6146. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  6147. :before-close="handleClose" class="dialog_diy lineCss">
  6148. <el-form>
  6149. <el-form-item label="标题" :label-width="formLabelWidth">
  6150. <span>
  6151. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  6152. </span>
  6153. </el-form-item>
  6154. <el-form-item label="链接" :label-width="formLabelWidth">
  6155. <span>
  6156. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  6157. </span>
  6158. </el-form-item>
  6159. </el-form>
  6160. <span slot="footer" class="dialog-footer">
  6161. <el-button @click="clearLine">取 消</el-button>
  6162. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  6163. </span>
  6164. </el-dialog>
  6165. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  6166. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  6167. <div>
  6168. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  6169. </div>
  6170. <span slot="footer" class="dialog-footer">
  6171. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  6172. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  6173. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  6174. </span>
  6175. </el-dialog>
  6176. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  6177. :before-close="handleClose" class="addNewPP customWidth">
  6178. <div class="people">
  6179. <div class="people_top">
  6180. <div class="people_nav">选择成员</div>
  6181. <div class="people_top_right">
  6182. <div class="people_search">
  6183. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  6184. <div class="search_img" @click="searchStudent">
  6185. <img src="../../../assets/icon/search.png" alt />
  6186. </div>
  6187. </div>
  6188. </div>
  6189. </div>
  6190. <el-checkbox-group v-model="checkboxList" class="people_name">
  6191. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  6192. "暂无学生可选" }}</el-checkbox>
  6193. </el-checkbox-group>
  6194. </div>
  6195. <span slot="footer" class="dialog-footer">
  6196. <el-button @click="dialogVisible3 = false">取 消</el-button>
  6197. <el-button type="primary" @click="isAddPP">确定</el-button>
  6198. </span>
  6199. </el-dialog>
  6200. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  6201. :before-close="handleClose" class="addNewPP2">
  6202. <div class="check_classBox">
  6203. <div class="check_class_right">
  6204. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  6205. 全部
  6206. </div>
  6207. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  6208. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  6209. {{ item.name }}
  6210. </div>
  6211. </el-tooltip>
  6212. </div>
  6213. <div class="check_class_left">
  6214. <div class="check_class_all_box">
  6215. <div class="check_class_left_title">选择班级</div>
  6216. <div style="display: flex; align-items: center; margin-left: auto">
  6217. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  6218. </div>
  6219. </div>
  6220. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  6221. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  6222. </div> -->
  6223. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  6224. v-if="grade2.length">
  6225. <div v-for="item in grade2" :key="item.id" class="class_item">
  6226. <el-checkbox :label="item.id">
  6227. {{ item.name }}
  6228. </el-checkbox>
  6229. </div>
  6230. </el-checkbox-group>
  6231. <div v-if="!grade2.length">暂无数据</div>
  6232. </div>
  6233. </div>
  6234. <span slot="footer" class="dialog-footer">
  6235. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  6236. <el-button type="primary" @click="isAddClass">确定</el-button>
  6237. </span>
  6238. </el-dialog>
  6239. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  6240. :before-close="handleClose" class="addNewPP customWidth">
  6241. <div style="display: flex;justify-content: space-between;">
  6242. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  6243. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  6244. 全部
  6245. </div>
  6246. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  6247. v-for="(i) in CollaborativeTeaList" :key="i.id">
  6248. <el-tooltip placement="top" :content="i.name">
  6249. <span>{{i.name}}</span>
  6250. </el-tooltip>
  6251. </div>
  6252. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  6253. 其他
  6254. </div>
  6255. </div>
  6256. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  6257. <div class="people">
  6258. <div class="people_top">
  6259. <div class="people_top_right">
  6260. <div class="people_search">
  6261. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  6262. <div class="search_img" @click="getTeacher(collid)">
  6263. <img src="../../../assets/icon/search.png" alt />
  6264. </div>
  6265. </div>
  6266. </div>
  6267. <div class="people_nav" style="display: flex; align-items: center">
  6268. <div class="check_class_left_title">选择成员</div>
  6269. <div style="display: flex; align-items: center; margin-left: auto">
  6270. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  6271. </div>
  6272. </div>
  6273. </div>
  6274. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  6275. @change="InviteChange2">
  6276. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  6277. <div class="t_j_box">
  6278. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  6279. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  6280. </el-tooltip>
  6281. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  6282. <span>{{ item.username.split('@')[0] }}</span>
  6283. </el-tooltip>
  6284. <el-tooltip placement="top" :content="item.school">
  6285. <span>{{ item.school }}</span>
  6286. </el-tooltip>
  6287. </div>
  6288. </el-checkbox>
  6289. </el-checkbox-group>
  6290. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  6291. </div>
  6292. </div>
  6293. </div>
  6294. <span slot="footer" class="dialog-footer">
  6295. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  6296. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  6297. </span>
  6298. </el-dialog>
  6299. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  6300. closePan(4);
  6301. }
  6302. " class="dialog_diy fullStyle">
  6303. <div style="height: 100%">
  6304. <div class="a_add_title" style="
  6305. display: flex;
  6306. flex-direction: row;
  6307. align-items: center;
  6308. justify-content: center;
  6309. ">
  6310. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  6311. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6312. </div>
  6313. <div class="a_addBox" style="height: calc(100% - 50px)">
  6314. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  6315. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  6316. <div class="a_add_checkType">
  6317. <span :class="{
  6318. active:
  6319. askJson.askJson[index1].type == '1' ||
  6320. !askJson.askJson[index1].type,
  6321. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  6322. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  6323. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  6324. </div>
  6325. <div class="a_add_head">
  6326. <div style="
  6327. display: flex;
  6328. align-items: center;
  6329. width: 100%;
  6330. margin-right: 20px;
  6331. ">
  6332. <span style="min-width: fit-content">{{
  6333. index1 + 1 + "、"
  6334. }}</span>
  6335. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6336. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  6337. $forceUpdate();
  6338. }
  6339. "></textarea>
  6340. </div>
  6341. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  6342. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  6343. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  6344. </div>
  6345. <div class="a_add_head_div">
  6346. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  6347. </el-button>
  6348. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  6349. </div>
  6350. </div>
  6351. <div class="a_add_body">
  6352. <div class="a_add_input" style="flex-direction: column">
  6353. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  6354. margin: 20px 10px 0 0;
  6355. display: flex;
  6356. align-items: center;
  6357. position: relative;
  6358. ">
  6359. <div style="margin-right: 10px">{{ optionTypeList[checkIndex] }}.</div>
  6360. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6361. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  6362. @change="() => {
  6363. $forceUpdate();
  6364. }
  6365. "></textarea>
  6366. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  6367. v-if="askJson.askJson[index1].askItem != 1">
  6368. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  6369. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  6370. </div>
  6371. <div class="a_add_body_div">
  6372. <el-button type="primary" size="small"
  6373. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  6374. <el-button type="primary" size="small" @click="
  6375. deletecheckList(askJson.askJson[index1], checkIndex)
  6376. " v-if="askJson.askJson[index1].askItem != 1">删除
  6377. </el-button>
  6378. </div>
  6379. </div>
  6380. </div>
  6381. <!-- <div class="a_add_body_div">
  6382. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  6383. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  6384. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  6385. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  6386. </el-button>
  6387. </div> -->
  6388. </div>
  6389. </div>
  6390. </div>
  6391. </div>
  6392. <span slot="footer" class="dialog-footer">
  6393. <el-button @click="closePan(4)">取 消</el-button>
  6394. <el-button type="primary" @click="addAsk">确 定</el-button>
  6395. </span>
  6396. </el-dialog>
  6397. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  6398. closePan(45);
  6399. }
  6400. " class="dialog_diy fullStyle">
  6401. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  6402. <!-- <div class="a_add_title" style="
  6403. display: flex;
  6404. flex-direction: row;
  6405. align-items: center;
  6406. justify-content: center;
  6407. ">
  6408. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  6409. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6410. </div> -->
  6411. <div class="a_addBox" style="height: 100%">
  6412. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  6413. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  6414. 上传补充资料
  6415. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none"
  6416. v-if="inputShow" @change="
  6417. beforeUploadInfo2(
  6418. $event,
  6419. 17
  6420. )
  6421. " />
  6422. </button>
  6423. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  6424. <div class="add_chapters_box add_c_none" v-if="
  6425. xuanzeInfoData &&
  6426. xuanzeInfoData.length == 0
  6427. ">
  6428. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  6429. <span>暂时还没有内容,快去添加吧</span>
  6430. </div>
  6431. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  6432. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  6433. getChapterData(
  6434. $event,
  6435. index1,
  6436. item1.type
  6437. )
  6438. ">
  6439. <div class="chapter_upload_o" style="
  6440. position: relative;
  6441. display: flex;
  6442. align-items: center;
  6443. ">
  6444. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  6445. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  6446. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  6447. </div>
  6448. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  6449. </div>
  6450. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  6451. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  6452. </div>
  6453. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  6454. </div>
  6455. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  6456. </div>
  6457. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  6458. </div>
  6459. </div>
  6460. <div class="chapter_upload_n">
  6461. <input readonly="true" v-if="
  6462. item1.type == 2 ||
  6463. item1.type == 3 ||
  6464. item1.type == 12 ||
  6465. item1.type == 13 ||
  6466. item1.type == 7
  6467. " :placeholder="item1.name" @click.stop="
  6468. checkChpater3($event, index1, item1)
  6469. " style="
  6470. border: none;
  6471. outline: none;
  6472. width: 80%;
  6473. minwidth: 215px;
  6474. z-index: 99;
  6475. font-size: 14px;
  6476. white-space: nowrap;
  6477. overflow: hidden;
  6478. text-overflow: ellipsis;
  6479. " />
  6480. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  6481. border: none;
  6482. outline: none;
  6483. width: 80%;
  6484. white-space: nowrap;
  6485. overflow: hidden;
  6486. text-overflow: ellipsis;
  6487. " readonly="true" @click="
  6488. selectAttText(index1)
  6489. " />
  6490. <input :placeholder="item1.title ? item1.title : '链接'
  6491. " v-if="item1.type == 8" style="
  6492. border: none;
  6493. outline: none;
  6494. width: 80%;
  6495. white-space: nowrap;
  6496. overflow: hidden;
  6497. text-overflow: ellipsis;
  6498. " readonly="true" @click="selectLine(index1)" />
  6499. <input :placeholder="item1.title ? item1.title : '链接'
  6500. " v-if="item1.type == 14" style="
  6501. border: none;
  6502. outline: none;
  6503. width: 80%;
  6504. white-space: nowrap;
  6505. overflow: hidden;
  6506. text-overflow: ellipsis;
  6507. " readonly="true" @click="
  6508. openUpdateSource(index1)
  6509. " />
  6510. </div>
  6511. <div class="chapter_upload_ic">
  6512. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  6513. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  6514. checkChpater3($event, index1, item1)
  6515. ">
  6516. <div></div>
  6517. </div>
  6518. <div class="chapter_upload_ic_r" @click.stop="
  6519. deletexuanzeInfoData(
  6520. $event,
  6521. index1
  6522. )
  6523. ">
  6524. <div></div>
  6525. </div>
  6526. </div>
  6527. </div>
  6528. </div>
  6529. </div>
  6530. </div>
  6531. <div v-if="
  6532. xuanzeinfoproVisible
  6533. " class="mask">
  6534. <div class="progressBox">
  6535. <div class="lbox">
  6536. <img src="../../../assets/loading.gif" />上传中,请稍后
  6537. </div>
  6538. <div style="margin-bottom: 10px">
  6539. <span>{{
  6540. xuanzeinfoisFinishSize
  6541. }}</span>
  6542. /
  6543. <span>{{
  6544. xuanzeinfoisAllSize
  6545. }}</span>
  6546. </div>
  6547. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  6548. ? xuanzeinfoprogress
  6549. : 0
  6550. " style="width: 80%"></el-progress> -->
  6551. </div>
  6552. </div>
  6553. </div>
  6554. <div style="
  6555. font-size: 16px;
  6556. color: #c7c7c7;
  6557. display: flex;
  6558. align-items: center;
  6559. justify-content: flex-end;
  6560. ">
  6561. <!-- 请输入题目内容 -->
  6562. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  6563. 智能生成
  6564. </button>
  6565. <!-- 请输入题目内容 -->
  6566. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  6567. v-if="isPasteChoice">
  6568. 智能粘贴
  6569. </button>
  6570. </div>
  6571. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  6572. <div class="a_add_checkType">
  6573. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  6574. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  6575. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  6576. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  6577. </div>
  6578. <div class="a_add_head">
  6579. <div class="timuUpImg">
  6580. <div style="display: flex; align-items: center">
  6581. <span style="min-width: fit-content">{{
  6582. index1 + 1 + "、"
  6583. }}</span>
  6584. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  6585. placeholder="请输入题目">
  6586. </el-input> -->
  6587. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6588. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  6589. $forceUpdate();
  6590. }
  6591. "></textarea>
  6592. </div>
  6593. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  6594. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  6595. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  6596. </div>
  6597. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  6598. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6599. <input type="file" accept="image/*" style="display: none"
  6600. @change="beforeUploadTiMu($event, index1)" />
  6601. </div>
  6602. </div>
  6603. <div class="a_add_head_div">
  6604. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  6605. </el-button>
  6606. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  6607. </div>
  6608. </div>
  6609. <div class="timuImgBox" v-if="
  6610. testJson.testJson[index1].timuList &&
  6611. testJson.testJson[index1].timuList.length
  6612. ">
  6613. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  6614. @click.stop="previewImg(timg.src)">
  6615. <img :src="timg.src" alt="" />
  6616. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  6617. <img src="../../../assets/icon/delete.png" alt="" />
  6618. </div>
  6619. </div>
  6620. </div>
  6621. <div class="a_add_body">
  6622. <div class="a_add_input a_add_input_choice">
  6623. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  6624. @change="() => {
  6625. $forceUpdate();
  6626. }
  6627. ">
  6628. <div class="radioBox">
  6629. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  6630. .testItem" :key="checkIndex" :label="checkIndex">
  6631. <div style="margin-right: 10px">
  6632. {{ optionTypeList[checkIndex] }}.
  6633. </div>
  6634. <div style="margin-right: 10px; width: 300px" v-if="
  6635. testJson.testJson[index1].checkList[checkIndex] &&
  6636. testJson.testJson[index1].checkList[checkIndex]
  6637. .imgType &&
  6638. testJson.testJson[index1].checkList[checkIndex]
  6639. .imgType == 1
  6640. ">
  6641. <div class="inImg" @click.stop="
  6642. previewImg(
  6643. testJson.testJson[index1].checkList[checkIndex]
  6644. .src
  6645. )
  6646. ">
  6647. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  6648. .src
  6649. " lazy />
  6650. <!-- <img :src="
  6651. testJson.testJson[index1].checkList[checkIndex]
  6652. .src
  6653. " alt="" /> -->
  6654. </div>
  6655. </div>
  6656. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  6657. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6658. $forceUpdate();
  6659. }
  6660. "></textarea>
  6661. <div class="xzUpImg" @click.stop="addImg($event)">
  6662. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6663. <input type="file" accept="image/*" style="display: none"
  6664. @change="beforeUploadTi($event, index1, checkIndex)" />
  6665. </div>
  6666. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6667. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  6668. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  6669. </div>
  6670. <div class="a_add_body_div">
  6671. <el-button type="primary" size="small" @click.stop="
  6672. addTcheckList(testJson.testJson[index1], checkIndex)
  6673. ">添加</el-button>
  6674. <el-button type="primary" size="small" @click.stop="
  6675. deleteTcheckList(
  6676. testJson.testJson[index1],
  6677. checkIndex
  6678. )
  6679. " v-if="testJson.testJson[index1].testItem != 1">删除
  6680. </el-button>
  6681. </div>
  6682. </el-radio>
  6683. </div>
  6684. </el-radio-group>
  6685. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6686. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6687. $forceUpdate();
  6688. }
  6689. ">
  6690. <div class="radioBox">
  6691. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6692. .testItem" :key="checkIndex1" :label="checkIndex1">
  6693. <div style="margin-right: 10px">
  6694. {{ optionTypeList[checkIndex1] }}.
  6695. </div>
  6696. <div style="margin-right: 10px; width: 300px" v-if="
  6697. testJson.testJson[index1].checkList[checkIndex1] &&
  6698. testJson.testJson[index1].checkList[checkIndex1]
  6699. .imgType &&
  6700. testJson.testJson[index1].checkList[checkIndex1]
  6701. .imgType == 1
  6702. ">
  6703. <div class="inImg" @click.stop="
  6704. previewImg(
  6705. testJson.testJson[index1].checkList[checkIndex1]
  6706. .src
  6707. )
  6708. ">
  6709. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6710. .src
  6711. " lazy />
  6712. <!-- <img :src="
  6713. testJson.testJson[index1].checkList[checkIndex1]
  6714. .src
  6715. " alt="" /> -->
  6716. </div>
  6717. </div>
  6718. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6719. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6720. $forceUpdate();
  6721. }
  6722. "></textarea>
  6723. <div class="xzUpImg" @click.stop="addImg($event)">
  6724. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6725. <input type="file" accept="image/*" style="display: none"
  6726. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6727. </div>
  6728. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6729. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6730. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6731. </div>
  6732. <div class="a_add_body_div">
  6733. <el-button type="primary" size="small" @click.stop="
  6734. addTcheckList(
  6735. testJson.testJson[index1],
  6736. checkIndex1
  6737. )
  6738. ">添加</el-button>
  6739. <el-button type="primary" size="small" @click.stop="
  6740. deleteTcheckList(
  6741. testJson.testJson[index1],
  6742. checkIndex1
  6743. )
  6744. " v-if="testJson.testJson[index1].testItem != 1">删除
  6745. </el-button>
  6746. </div>
  6747. </el-checkbox>
  6748. </div>
  6749. </el-checkbox-group>
  6750. </div>
  6751. <!-- <div class="a_add_body_div">
  6752. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6753. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6754. v-if="testJson.testJson[index1].testItem != 1">删除
  6755. </el-button>
  6756. </div> -->
  6757. </div>
  6758. </div>
  6759. </div>
  6760. </div>
  6761. <span slot="footer" class="dialog-footer">
  6762. <el-button @click="closePan(45)">取 消</el-button>
  6763. <el-button type="primary" @click="addTest">确 定</el-button>
  6764. </span>
  6765. </el-dialog>
  6766. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6767. :before-close="handleClose" class="dialog_diy addToolsDia">
  6768. <div class="toolChoose">
  6769. <div class="tools">
  6770. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6771. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6772. <div style="
  6773. display: flex;
  6774. flex-direction: row;
  6775. align-items: baseline;
  6776. flex-wrap: nowrap;
  6777. justify-content: flex-start;
  6778. position: relative;
  6779. ">
  6780. <div class="chooseWho">
  6781. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6782. 互动类
  6783. </div>
  6784. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6785. 思维类
  6786. </div>
  6787. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6788. 评价类
  6789. </div>
  6790. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6791. 其他
  6792. </div>
  6793. </div>
  6794. </div>
  6795. <div style="min-height: 163px">
  6796. <div class="toolSort" v-if="chapToolsType == 0">
  6797. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6798. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6799. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6800. <div style="margin: 5px 0">素材库</div>
  6801. </div>
  6802. <div class="noCTool">
  6803. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6804. </div>
  6805. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6806. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6807. </div>
  6808. <!-- <div class="check" @click="chapAddTools(8)">
  6809. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6810. <div class="checkDiv" v-else>
  6811. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6812. </div>
  6813. </div> -->
  6814. </div>
  6815. </div>
  6816. <div class="toolSort" v-if="chapToolsType == 1">
  6817. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6818. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6819. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6820. <div style="margin: 5px 0">思维网格</div>
  6821. </div>
  6822. <div class="noCTool">
  6823. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6824. </div>
  6825. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6826. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6827. </div>
  6828. <!-- <div class="check" @click="chapAddTools(7)">
  6829. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6830. <div class="checkDiv" v-else>
  6831. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6832. </div>
  6833. </div> -->
  6834. </div>
  6835. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6836. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6837. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6838. <div style="margin: 5px 0">电子白板</div>
  6839. </div>
  6840. <div class="noCTool">
  6841. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6842. </div>
  6843. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6844. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6845. </div>
  6846. <!-- <div class="check" @click="chapAddTools(1)">
  6847. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6848. <div class="checkDiv" v-else>
  6849. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6850. </div>
  6851. </div> -->
  6852. </div>
  6853. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6854. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6855. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6856. <div style="margin: 5px 0">便签</div>
  6857. </div>
  6858. <div class="noCTool">
  6859. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6860. </div>
  6861. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6862. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6863. </div>
  6864. <!-- <div class="check" @click="chapAddTools(2)">
  6865. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6866. <div class="checkDiv" v-else>
  6867. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6868. </div>
  6869. </div> -->
  6870. </div>
  6871. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6872. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6873. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6874. <div style="margin: 5px 0">协同文档</div>
  6875. </div>
  6876. <div class="noCTool">
  6877. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6878. </div>
  6879. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6880. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6881. </div>
  6882. <!-- <div class="check" @click="chapAddTools(6)">
  6883. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6884. <div class="checkDiv" v-else>
  6885. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6886. </div>
  6887. </div> -->
  6888. </div>
  6889. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6890. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6891. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6892. <div style="margin: 5px 0">思维导图</div>
  6893. </div>
  6894. <div class="noCTool">
  6895. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6896. </div>
  6897. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6898. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6899. </div>
  6900. <!-- <div class="check" @click="chapAddTools(3)">
  6901. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6902. <div class="checkDiv" v-else>
  6903. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6904. </div>
  6905. </div> -->
  6906. </div>
  6907. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6908. @click="chapAddTools(31)">
  6909. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6910. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6911. <div style="margin: 5px 0">数学画板</div>
  6912. </div>
  6913. <div class="noCTool">
  6914. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6915. </div>
  6916. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6917. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6918. </div>
  6919. <!-- <div class="check" @click="chapAddTools(31)">
  6920. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6921. <div class="checkDiv" v-else>
  6922. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6923. </div>
  6924. </div> -->
  6925. </div>
  6926. </div>
  6927. <div class="toolSort" v-if="chapToolsType == 2">
  6928. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6929. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6930. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6931. <div style="margin: 5px 0">量规评分</div>
  6932. </div>
  6933. <div class="noCTool">
  6934. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6935. </div>
  6936. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6937. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6938. </div>
  6939. <!-- <div class="check" @click="chapAddTools(5)">
  6940. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6941. <div class="checkDiv" v-else>
  6942. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6943. </div>
  6944. </div> -->
  6945. </div>
  6946. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6947. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6948. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6949. <div style="margin: 5px 0">问卷调查</div>
  6950. </div>
  6951. <div class="noCTool">
  6952. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6953. </div>
  6954. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6955. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6956. </div>
  6957. <!-- <div class="check" @click="chapAddTools(4)">
  6958. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6959. <div class="checkDiv" v-else>
  6960. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6961. </div>
  6962. </div> -->
  6963. </div>
  6964. </div>
  6965. </div>
  6966. <div>
  6967. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6968. v-model="itemTools.toolDetail" />
  6969. </div>
  6970. </div>
  6971. </div>
  6972. </div>
  6973. <span slot="footer" class="dialog-footer">
  6974. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6975. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6976. </span>
  6977. </el-dialog>
  6978. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6979. closePan(15);
  6980. }
  6981. " class="dialog_diy">
  6982. <div>
  6983. <div class="a_add_title" style="
  6984. display: flex;
  6985. flex-direction: column;
  6986. align-items: flex-start;
  6987. justify-content: center;
  6988. ">
  6989. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6990. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6991. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6992. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6993. </div>
  6994. </div>
  6995. <span slot="footer" class="dialog-footer">
  6996. <el-button @click="closePan(15)">取 消</el-button>
  6997. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6998. </span>
  6999. </el-dialog>
  7000. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  7001. :before-close="handleClose" class="dialog_diy">
  7002. <div>
  7003. <div class="a_add_title" style="
  7004. display: flex;
  7005. flex-direction: column;
  7006. align-items: flex-start;
  7007. justify-content: center;
  7008. ">
  7009. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  7010. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  7011. </div>
  7012. </div>
  7013. <span slot="footer" class="dialog-footer">
  7014. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  7015. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  7016. </span>
  7017. </el-dialog>
  7018. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  7019. :before-close="handleClose" class="dialog_diy">
  7020. <div>
  7021. <div class="fileCss" style="padding-top: 20px">
  7022. <div>
  7023. <button class="info_btn" @click="addImg($event)">
  7024. 选择本地文件
  7025. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  7026. </button>
  7027. <div class="spanName">选择本地文件</div>
  7028. </div>
  7029. <!-- <div>
  7030. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  7031. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  7032. <img :src="cover[0].url" alt="" />
  7033. <div class="deletePic" @click="deleteSysPic">
  7034. <img src="../../../assets/icon/delete.png" alt="" />
  7035. </div>
  7036. </div>
  7037. <div class="spanName">选择系统文件</div>
  7038. </div> -->
  7039. <div>
  7040. <el-button @click="(searchImageValue = courseName), resetImage()"
  7041. v-if="isSysPic2 == false">选择网络文件</el-button>
  7042. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  7043. <img :src="cover[0].url" alt="" />
  7044. <div class="deletePic" @click="deleteSysPic">
  7045. <img src="../../../assets/icon/delete.png" alt="" />
  7046. </div>
  7047. </div>
  7048. <div class="spanName">选择网络文件</div>
  7049. </div>
  7050. </div>
  7051. <!-- <div class="fileCss">
  7052. </div> -->
  7053. </div>
  7054. <span slot="footer" class="dialog-footer">
  7055. <el-button @click="choosePicVisible = false">取 消</el-button>
  7056. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  7057. </span>
  7058. </el-dialog>
  7059. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  7060. :before-close="handleClose" class="dialog_diy">
  7061. <div class="cru_selectBox" style="margin: 0">
  7062. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  7063. 绘画
  7064. </div>
  7065. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  7066. 科技
  7067. </div>
  7068. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  7069. 人文
  7070. </div>
  7071. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  7072. 艺术
  7073. </div>
  7074. </div>
  7075. <div class="sysPicBox">
  7076. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  7077. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  7078. </div>
  7079. </div>
  7080. </el-dialog>
  7081. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  7082. :before-close="handleClose" class="dialog_diy">
  7083. <div>
  7084. <div class="people_top_right" style="display: flex; align-items: center">
  7085. <div style="position: relative; width: 100%">
  7086. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  7087. @keyup.enter.native="resetImage()"></el-input>
  7088. <div class="search_img" @click="resetImage" style="right: 10px">
  7089. <img src="../../../assets/icon/search.png" alt />
  7090. </div>
  7091. </div>
  7092. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  7093. </div>
  7094. <div class="sysPicBox" v-loading="imageloading">
  7095. <div class="picNone" v-if="!imageList.length">
  7096. 请输入关键词搜索图片
  7097. </div>
  7098. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  7099. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  7100. </div>
  7101. </div>
  7102. </div>
  7103. </el-dialog>
  7104. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  7105. closePan(41);
  7106. }
  7107. " class="dialog_diy dialog_diy3 fullStyle">
  7108. <div v-if="selectJson" style="height: 100%">
  7109. <div class="select_box1" v-if="selectSteps == 1">
  7110. <div class="select_box1_img">
  7111. <div class="select_box1_title">
  7112. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  7113. </div>
  7114. <div class="select_box1_add_img">
  7115. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  7116. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  7117. <img src="../../../assets/icon/addPoster.png" alt="" />
  7118. </div>
  7119. <div class="isSysPic" v-else>
  7120. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  7121. <div class="deletePic" @click="deleteSelectPic">
  7122. <img src="../../../assets/icon/delete.png" alt="" />
  7123. </div>
  7124. </div>
  7125. </div>
  7126. </div>
  7127. <div class="select_box1_select">
  7128. <div class="select_box1_title">
  7129. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  7130. </div>
  7131. <div class="select_box1_select_box">
  7132. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  7133. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  7134. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  7135. <div class="select_box1_select_box_add">
  7136. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  7137. 添加</el-button>
  7138. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  7139. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  7140. </div>
  7141. </div>
  7142. </div>
  7143. </div>
  7144. <div v-if="selectSteps == 2" style="height: 100%">
  7145. <div class="select_box2">
  7146. <div class="select_box2_title">设置每道题目的正确选项</div>
  7147. <div class="select_box2_box">
  7148. <div class="select_box2_img">
  7149. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  7150. </div>
  7151. <div class="select_box2_answer">
  7152. <div class="select_answer_title">根据题目选择对应答案</div>
  7153. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  7154. <span>{{ checkIndex + 1 }}、</span>
  7155. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  7156. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  7157. </el-option>
  7158. </el-select>
  7159. </div>
  7160. </div>
  7161. </div>
  7162. </div>
  7163. </div>
  7164. </div>
  7165. <span slot="footer" class="dialog-footer">
  7166. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  7167. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  7168. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  7169. </span>
  7170. </el-dialog>
  7171. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  7172. :before-close="handleClose" class="dialog_diy">
  7173. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  7174. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  7175. <div class="pjCss" style="width: 100%">
  7176. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  7177. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  7178. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  7179. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  7180. <div class="remove" @click="deletRateList(eIndex)"></div>
  7181. <div style="width: 100%; display: flex">
  7182. <span style="min-width: 100px; text-align: right">评星等级:</span>
  7183. <el-rate v-model="eItem.score" disabled></el-rate>
  7184. </div>
  7185. <div class="elist_inptu_text" style="align-items: flex-start">
  7186. <span style="min-width: 100px; text-align: right">描述:</span>
  7187. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  7188. </div>
  7189. </div>
  7190. </div>
  7191. <div class="addToolFun" @click="addRateList()">
  7192. <div class="addToolImg">
  7193. <img src="../../../assets/icon/add.png" alt />
  7194. </div>
  7195. <div>添加</div>
  7196. </div>
  7197. </div>
  7198. </div>
  7199. <span slot="footer" class="dialog-footer">
  7200. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  7201. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  7202. </span>
  7203. </el-dialog>
  7204. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  7205. closePan(47);
  7206. }
  7207. " class="dialog_diy dialog_diy3 fullStyle">
  7208. <div style="height: 100%">
  7209. <div class="sentenBox" style="height: 100%">
  7210. <div class="addSen" @click="addSt">添加题目</div>
  7211. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  7212. <div class="sentenTopBox">
  7213. <div class="sentenTop" :index="stIndex + 1">
  7214. <div>题目设置</div>
  7215. <div>
  7216. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  7217. </div>
  7218. <div @click="addSen(stIndex)">添加</div>
  7219. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  7220. </div>
  7221. </div>
  7222. <div class="cardList">
  7223. <div v-if="st.addSentence.length > 0" class="cardBox">
  7224. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  7225. @click="setRightAnswer(s, stIndex, sIndex)">
  7226. <el-tooltip class="item" effect="light" :content="s" placement="top">
  7227. <div>{{ s }}</div>
  7228. </el-tooltip>
  7229. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  7230. <img src="../../../assets/icon/delete.png" alt="" />
  7231. </div>
  7232. </div>
  7233. </div>
  7234. <div class="card">
  7235. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  7236. </div>
  7237. </div>
  7238. <div class="rightCardBox">
  7239. <div>正确顺序</div>
  7240. <div class="rightCardList">
  7241. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  7242. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  7243. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  7244. <el-tooltip class="item" effect="light" :content="r" placement="top">
  7245. <div>{{ r }}</div>
  7246. </el-tooltip>
  7247. </div>
  7248. <div>{{ rIndex + 1 }}</div>
  7249. </div>
  7250. </div>
  7251. <div class="card" v-if="st.rightAnswer.length == 0">
  7252. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  7253. </div>
  7254. <div class="card" v-else>
  7255. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  7256. </div>
  7257. </div>
  7258. </div>
  7259. </div>
  7260. </div>
  7261. </div>
  7262. <span slot="footer" class="dialog-footer">
  7263. <el-button @click="closePan(47)">取 消</el-button>
  7264. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  7265. </span>
  7266. </el-dialog>
  7267. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  7268. :before-close="handleClose" class="dialog_diy">
  7269. <el-form>
  7270. <!-- <el-form-item label="文本标题">
  7271. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7272. </el-form-item> -->
  7273. <div>表格内容</div>
  7274. <Table v-model="tableJson.text" @change="change"></Table>
  7275. </el-form>
  7276. <span slot="footer" class="dialog-footer">
  7277. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  7278. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  7279. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  7280. </span>
  7281. </el-dialog>
  7282. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  7283. :before-close="handleClose" class="dialog_diy">
  7284. <el-form>
  7285. <!-- <el-form-item label="文本标题">
  7286. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7287. </el-form-item> -->
  7288. <div>文档内容</div>
  7289. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  7290. </el-form>
  7291. <span slot="footer" class="dialog-footer">
  7292. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  7293. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  7294. </span>
  7295. </el-dialog>
  7296. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  7297. :before-close="handleClose" class="dialog_diy">
  7298. <div style="
  7299. width: 100%;
  7300. display: flex;
  7301. flex-direction: row;
  7302. flex-wrap: nowrap;
  7303. align-items: center;
  7304. justify-content: center;
  7305. ">
  7306. <div>班级:</div>
  7307. <el-select multiple v-model="uploadJson" placeholder="请选择">
  7308. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  7309. </el-option>
  7310. </el-select>
  7311. </div>
  7312. <span slot="footer" class="dialog-footer">
  7313. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  7314. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  7315. </span>
  7316. </el-dialog>
  7317. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  7318. :before-close="handleClose" class="dialog_diy">
  7319. <div style="
  7320. width: 100%;
  7321. display: flex;
  7322. flex-direction: row;
  7323. flex-wrap: nowrap;
  7324. align-items: center;
  7325. justify-content: center;
  7326. ">
  7327. <div>随机码:</div>
  7328. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  7329. </div>
  7330. <span slot="footer" class="dialog-footer">
  7331. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  7332. <el-button type="primary" @click="addInvite">确定</el-button>
  7333. </span>
  7334. </el-dialog>
  7335. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  7336. :before-close="handleClose" class="dialog_diy">
  7337. <div>
  7338. <div style="margin-bottom: 20px; color: #999">
  7339. 提示:点击“+”或“-”修改倒计时时长。
  7340. </div>
  7341. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  7342. </div>
  7343. <span slot="footer" class="dialog-footer">
  7344. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  7345. <el-button type="primary" @click="addPreTime">确定</el-button>
  7346. </span>
  7347. </el-dialog>
  7348. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  7349. :before-close="handleClose" class="dialog_diy">
  7350. <div>
  7351. <div style="
  7352. width: 100%;
  7353. display: flex;
  7354. flex-direction: row;
  7355. flex-wrap: nowrap;
  7356. align-content: center;
  7357. align-items: center;
  7358. justify-content: space-between;
  7359. ">
  7360. <div style="
  7361. display: flex;
  7362. flex-flow: row nowrap;
  7363. align-items: flex-start;
  7364. width: 100%;
  7365. flex-direction: column;
  7366. flex-wrap: nowrap;
  7367. position: relative;
  7368. ">
  7369. <div class="e_box">
  7370. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  7371. <div class="e_card_picture">
  7372. <img src="../../../assets/e_picture.png" />
  7373. </div>
  7374. <div class="e_card_name">
  7375. <span>{{ item.title }}</span>
  7376. </div>
  7377. <div class="e_card_btn">
  7378. <span @click="checkEva(item.id, 2)">导入</span>
  7379. </div>
  7380. </div> -->
  7381. <!-- <div class="addEva" @click="openT">
  7382. <img src="../../../assets/icon/addEva.png" alt="" />
  7383. </div> -->
  7384. <div style="
  7385. display: flex;
  7386. justify-content: flex-end;
  7387. margin-bottom: 10px;
  7388. ">
  7389. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  7390. </div>
  7391. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  7392. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  7393. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  7394. </el-table-column>
  7395. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  7396. </el-table-column>
  7397. <el-table-column label="操作" width="250px">
  7398. <template slot-scope="scope">
  7399. <div class="btnBox">
  7400. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  7401. </div>
  7402. </template>
  7403. </el-table-column>
  7404. </el-table>
  7405. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  7406. 暂无数据
  7407. </div>
  7408. </div>
  7409. </div>
  7410. </div>
  7411. </div>
  7412. <span slot="footer" class="dialog-footer">
  7413. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  7414. </span>
  7415. </el-dialog>
  7416. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  7417. :before-close="handleClose" class="dialog_diy">
  7418. <div class="groupBox">
  7419. <div v-if="groupJson.group" class="groupContent">
  7420. <div class="groupTitle">请设置小组数量及名称</div>
  7421. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  7422. <span class="groupn">第{{ index + 1 }}组名称:</span>
  7423. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  7424. <div class="groupBtn">
  7425. <el-button type="primary" size="small" @click="addGroup(index)"
  7426. v-if="groupJson.group.length - 1 == index">
  7427. 添加</el-button>
  7428. <el-button type="primary" size="small" @click="deleteGroup(index)"
  7429. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  7430. </div>
  7431. </div>
  7432. </div>
  7433. <div class="groupContent">
  7434. <div class="groupTitle">请设置每组人数</div>
  7435. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  7436. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  7437. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  7438. @change="numberPan"></el-input>
  7439. </div>
  7440. </div>
  7441. <span slot="footer" class="dialog-footer">
  7442. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  7443. <el-button type="primary" @click="addGroupJson">确定</el-button>
  7444. </span>
  7445. </el-dialog>
  7446. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  7447. :before-close="handleClose" class="dialog_diy">
  7448. <div style="
  7449. width: 100%;
  7450. display: flex;
  7451. flex-direction: row;
  7452. flex-wrap: nowrap;
  7453. align-items: center;
  7454. justify-content: center;
  7455. ">
  7456. <div style="min-width: fit-content">文件名称:</div>
  7457. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  7458. </div>
  7459. <span slot="footer" class="dialog-footer">
  7460. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  7461. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  7462. </span>
  7463. </el-dialog>
  7464. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  7465. closePan(69);
  7466. }
  7467. " class="dialog_diy fullStyle fullStyle1">
  7468. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  7469. <span slot="footer" class="dialog-footer">
  7470. <el-button @click="englishDialogVisible = false">取 消</el-button>
  7471. <el-button type="primary" @click="addEnglish">确 定</el-button>
  7472. </span>
  7473. </el-dialog>
  7474. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  7475. :before-close="handleClose" class="dialog_diy">
  7476. <div class="template_box">
  7477. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  7478. :class="{ wordTeacherA: ctJson.id == aa.id }">
  7479. <div class="wordPic">
  7480. <img src="../../../assets/icon/new/course_template.png" alt />
  7481. </div>
  7482. <el-tooltip effect="dark" :content="aa.title" placement="top">
  7483. <div style="
  7484. margin-top: 10px;
  7485. line-height: 19px;
  7486. overflow: hidden;
  7487. text-overflow: ellipsis;
  7488. white-space: nowrap;
  7489. padding: 0 10px;
  7490. box-sizing: border-box;
  7491. width: 100%;
  7492. ">
  7493. {{ aa.title }}
  7494. </div>
  7495. </el-tooltip>
  7496. </div>
  7497. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  7498. :class="{ wordTeacherA: ctJson.id == 1 }">
  7499. <div class="wordPic">
  7500. <img src="../../../assets/icon/new/course_template.png" alt />
  7501. </div>
  7502. <div style="
  7503. margin-top: 10px;
  7504. line-height: 19px;
  7505. overflow: hidden;
  7506. text-overflow: ellipsis;
  7507. white-space: nowrap;
  7508. padding: 0 20px;
  7509. ">
  7510. 简易模板
  7511. </div>
  7512. </div>
  7513. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  7514. :class="{ wordTeacherA: ctJson.id == 2 }">
  7515. <div class="wordPic">
  7516. <img src="../../../assets/icon/new/course_template.png" alt />
  7517. </div>
  7518. <div style="
  7519. margin-top: 10px;
  7520. line-height: 19px;
  7521. overflow: hidden;
  7522. text-overflow: ellipsis;
  7523. white-space: nowrap;
  7524. padding: 0 20px;
  7525. ">
  7526. 智能粘贴模式
  7527. </div>
  7528. </div>
  7529. </div>
  7530. <span slot="footer" class="dialog-footer">
  7531. <el-button @click="templateDialog = false">取 消</el-button>
  7532. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  7533. </span>
  7534. </el-dialog>
  7535. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  7536. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  7537. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  7538. <div class="change_stageBox">
  7539. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  7540. <div class="nt_taskBox">
  7541. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  7542. <div class="nt_taskName">
  7543. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7544. <span>{{ t.dyName }}</span>
  7545. </el-tooltip>
  7546. </div>
  7547. </div>
  7548. <div class="moveBtn" v-if="unitJson3.length > 1">
  7549. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7550. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7551. </div>
  7552. </div>
  7553. </div>
  7554. <span slot="footer" class="dialog-footer">
  7555. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  7556. <el-button type="primary" @click="updateChange">确定</el-button>
  7557. </span>
  7558. </el-dialog>
  7559. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7560. :before-close="handleClose" class="dialog_diy">
  7561. <div class="addTypeChoose" style="justify-content: center">
  7562. <div style="min-width: 100px">模板名称:</div>
  7563. <el-input v-model="templateName" style="width: 200px"></el-input>
  7564. </div>
  7565. <div class="addTypeBox">
  7566. <div class="addTypeChoose">
  7567. <div style="min-width: 100px">选择一级分类:</div>
  7568. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  7569. style="width: 200px">
  7570. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7571. </el-option>
  7572. </el-select>
  7573. </div>
  7574. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7575. <div style="min-width: 100px">选择二级分类:</div>
  7576. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  7577. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7578. </el-option>
  7579. </el-select>
  7580. </div>
  7581. </div>
  7582. <span slot="footer" class="dialog-footer">
  7583. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  7584. <el-button @click="close()">关 闭</el-button>
  7585. </span>
  7586. </el-dialog>
  7587. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7588. </evaBox>
  7589. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7590. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7591. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3"
  7592. @aiConfirm="aiConfirm" :clickType="clickType">
  7593. </aiDialog>
  7594. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7595. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7596. <div class="pptBox" :class="{'ppClass': pptBoxDialog && panPptCount() > 0 && pptCount.length}">
  7597. <div class="box" v-show="pptBoxDialog">
  7598. <aiCreateDialog v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson" :key="index"
  7599. :languageSetting="languageSetting" :dialogVisibleAiCreate="dialogVisibleAiCreate2.includes(index)"
  7600. :courseName="courseName" @createAiPpt="createAiPpt" @closeAiPpt="closeAiPpt" :infoData="infoData"
  7601. :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="index"
  7602. :unitJson="unitJson" :ref="'ppt'+index"
  7603. v-show="dialogVisibleAiCreate2.includes(index) && pptCount.includes(index)"></aiCreateDialog>
  7604. </div>
  7605. <span v-show="panPptCount() > 0 && pptCount.length" class="r_pub_button_edit"
  7606. :style="{marginTop: panPptCount() > 0 ? '10px' : '0'}" style="justify-content: flex-start;"
  7607. @click="pptBoxDialog = !pptBoxDialog">{{ pptBoxDialog ? "收缩" : "展开" }}</span>
  7608. </div>
  7609. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName"
  7610. @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson">
  7611. </aiCreateVideoDialog>
  7612. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7613. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl"></wOffice>
  7614. <appDialog ref="appDialog" @success="selectAppSuccess"></appDialog>
  7615. <CodeEditor ref="CodeEditorRef" @success="addHtmlSuccess"></CodeEditor>
  7616. </div>
  7617. </template>
  7618. <script>
  7619. import "../../../common/aws-sdk-2.235.1.min.js";
  7620. import { tools as toolsData } from "../../../common/tools.js";
  7621. // import "../../../common/aws-sdk-2.99.0.min.js";
  7622. import $ from "jquery";
  7623. import EditorBar from "../../../components/tools/wangEnduit";
  7624. import Table from "../../../components/tools/table";
  7625. import Mind from "../../tools/jsmind2";
  7626. import Time from "../../tools/time.vue";
  7627. import Sunburst from "../../tools/sunburst";
  7628. import SeeBoard from "../../tools/seeBoard";
  7629. import weilaiData from "../components/weilai.js";
  7630. import sourceDialog from "../teacherSource/dialog.vue";
  7631. import interVideo from "../interVideo/index.vue";
  7632. import englishRight from "../components/englishRight.vue";
  7633. import evaBox from "../evaBox/index.vue";
  7634. import EnglishVoice from "../EnglishVoice/index.vue";
  7635. import aiBox from './aiBox.vue'
  7636. import aiBoxRight from './aiBoxRight.vue'
  7637. import aiBoxCourseDetail from './aiBoxCourseDetail.vue'
  7638. import recordV from './record.vue'
  7639. import aiDialog from './aiDialog'
  7640. import aiTips from './aiTips.vue'
  7641. import tipsDialog from './tipsDialog.vue'
  7642. import { v4 as uuidv4 } from "uuid";
  7643. import MarkdownIt from "markdown-it";
  7644. import aiCreateDialog from './aiCreateDialog.vue'
  7645. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7646. import wpdf from "../test/file/wPdf2.vue";
  7647. import wOffice from "../test/file/wOffice.vue";
  7648. import htmlDocx from "html-docx-js/dist/html-docx";
  7649. import TurndownService from 'turndown';
  7650. import JSZip from "jszip";
  7651. import evaList from "./evaList.vue";
  7652. import MindTask from "./jsmind2";
  7653. import ConvertApi from 'convertapi-js'
  7654. let convertApi = ConvertApi.auth('secret_U1EO5rhgMCnoBnBT')
  7655. import appDialog from '../components/appDialog.vue'
  7656. import { myMixin } from "@/mixins/mixin.js"
  7657. import CodeEditor from "../components/CodeEditor";
  7658. var OpenCC = require("opencc-js");
  7659. let converter = OpenCC.Converter({
  7660. from:'hk',
  7661. to:'cn'
  7662. })
  7663. let converter2 = OpenCC.Converter({
  7664. from:'cn',
  7665. to:'hk'
  7666. })
  7667. const getFile = (url) => {
  7668. return new Promise((resolve, reject) => {
  7669. var credentials = {
  7670. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7671. secretAccessKey: "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",
  7672. }; //秘钥形式的登录上传
  7673. window.AWS.config.update(credentials);
  7674. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7675. let url2 = url;
  7676. let _url2 = "";
  7677. if (
  7678. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  7679. ) {
  7680. _url2 = url2.split(
  7681. "https://view.officeapps.live.com/op/view.aspx?src="
  7682. )[1];
  7683. } else {
  7684. _url2 = url2;
  7685. }
  7686. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  7687. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  7688. var params = {
  7689. Bucket: "ccrb",
  7690. Key: name
  7691. };
  7692. s3.getObject(params, function (err, data) {
  7693. if (err) {
  7694. console.log(err, err.stack)
  7695. resolve({ data: 1 });
  7696. }else {
  7697. resolve({ data: data.Body });
  7698. console.log(data);
  7699. } // sxuccessful response
  7700. });
  7701. });
  7702. };
  7703. export default {
  7704. mixins: [ myMixin ],
  7705. components: {
  7706. CodeEditor,
  7707. EditorBar,
  7708. Mind,
  7709. Time,
  7710. Sunburst,
  7711. SeeBoard,
  7712. Table,
  7713. sourceDialog,
  7714. interVideo,
  7715. englishRight,
  7716. evaBox,
  7717. EnglishVoice,
  7718. aiBox,
  7719. aiBoxRight,
  7720. aiBoxCourseDetail,
  7721. aiDialog,
  7722. aiTips,
  7723. tipsDialog,
  7724. aiCreateDialog,
  7725. aiCreateVideoDialog,
  7726. wpdf,
  7727. wOffice,
  7728. evaList,
  7729. MindTask,
  7730. recordV,
  7731. appDialog
  7732. },
  7733. data() {
  7734. return {
  7735. checkAll: false,
  7736. checkAll2: false,
  7737. chooseType: 1,
  7738. checkedCities: [],
  7739. isIndeterminate: true,
  7740. isIndeterminate2: true,
  7741. isSysPic: false,
  7742. isSysPic2: false,
  7743. steps: 1,
  7744. stepsNav: 1,
  7745. nbOrder: 0,
  7746. courseId: "",
  7747. chapToolsType: 0,
  7748. chapTools: [
  7749. {
  7750. tools: [],
  7751. toolDetail: "",
  7752. },
  7753. ],
  7754. line: "",
  7755. lineTitle: "",
  7756. sysPic: [],
  7757. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7758. sentenceList2: [],
  7759. isPushTitleList: [],
  7760. lineCount: 0,
  7761. lineType: 0,
  7762. chapCount: 0,
  7763. courseName: "",
  7764. isTeacherSee: false,
  7765. courseText: "",
  7766. textLoading: false,
  7767. ttextLoading: false,
  7768. courseText2: "",
  7769. preTime: 0,
  7770. formLabelWidth: "100px",
  7771. choosePicVisible: false,
  7772. sysPicVisible: false,
  7773. sysPicVisible2: false,
  7774. uploadLoading1: false,
  7775. noneBtnImg: false,
  7776. updateBoolean2: false,
  7777. unitIndex: 0,
  7778. taskCount: 0,
  7779. dialogVisible: false,
  7780. dialogVisible1: false,
  7781. dialogVisible2: false,
  7782. dialogVisible3: false,
  7783. dialogVisible4: false,
  7784. dialogVisible5: false,
  7785. dialogVisible6: false,
  7786. dialogVisible7: false,
  7787. dialogVisible8: false,
  7788. dialogVisible9: false,
  7789. dialogVisibleClass: false,
  7790. dialogVisibleMember: false,
  7791. dialogVisibleMp3: false,
  7792. dialogVisibleSelect: false,
  7793. dialogVisibleSentence: false,
  7794. dialogVisibleRate: false,
  7795. dialogVisibleChoice: false,
  7796. dialogVisiblemb: false,
  7797. dialogVisibleInvite: false,
  7798. dialogVisibleSource: false,
  7799. dialogVisibleVideo: false,
  7800. dialogVisibleStageChange: false,
  7801. dialogVisibleupdataVideoT: false,
  7802. englishDialogVisible: false,
  7803. templateDialog: false,
  7804. ctJson: {},
  7805. isClickColor: 1,
  7806. toolIndexType: "",
  7807. publicTool: 0,
  7808. searchPeople: "",
  7809. searchTN: "",
  7810. collid: '',
  7811. CollLoading: false,
  7812. userid: this.$route.query.userid,
  7813. oid: this.$route.query.oid,
  7814. org: this.$route.query.org,
  7815. role: this.$route.query.role,
  7816. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7817. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7818. dialogVisibleTable: false,
  7819. dialogVisibleWord: false,
  7820. tableJson: { text: "" },
  7821. wordJson: { text: "" },
  7822. dialogVisibleMoreUpload: false,
  7823. dialogVisiblePreTime: false,
  7824. uploadJson: [],
  7825. classJuri: [],
  7826. gradeList: [],
  7827. cover: [], //课程封面
  7828. myWord: [],
  7829. evaJuri: [],
  7830. evalua: "",
  7831. targetArray: [],
  7832. eTitle: "",
  7833. eJson: {},
  7834. fid: "", //一级
  7835. sid: "", //二级
  7836. tid: "", //二级
  7837. typeMode: 3,
  7838. eJSONNum: 0,
  7839. data: {
  7840. meta: {
  7841. name: "example",
  7842. author: "dd@163.com",
  7843. version: "0.2",
  7844. },
  7845. format: "node_array",
  7846. data: [{ id: "root", isroot: true, topic: "" }],
  7847. },
  7848. askJson: {
  7849. askCount: 1,
  7850. askTitle: "",
  7851. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7852. },
  7853. askJson2: {},
  7854. testJson: {},
  7855. testJson2: {},
  7856. selectJson: {},
  7857. selectJson2: {},
  7858. rateJson: [],
  7859. unitJson2: [],
  7860. unitJson3: [],
  7861. unitJson: [
  7862. {
  7863. dyName: "", //单元标题
  7864. chapterInfo: [
  7865. {
  7866. isread: false,
  7867. chapterid: this.guid(),
  7868. title: "",
  7869. courseName: "",
  7870. taskJson: [
  7871. {
  7872. task: "",
  7873. taskDetail: "",
  7874. chapterData: [],
  7875. toolText: "",
  7876. toolChoose: [
  7877. {
  7878. tool: [],
  7879. toolDetail: "",
  7880. toolType: 0,
  7881. askCount: 1,
  7882. askTitle: "",
  7883. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7884. },
  7885. ],
  7886. isShowTools: false,
  7887. askCount: 1,
  7888. isFold: 1,
  7889. askTitle: "",
  7890. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7891. checkJson: [{ checkCount: [], checkPerent: [] }],
  7892. homeworkList: [],
  7893. },
  7894. ],
  7895. itemCount: 1,
  7896. fileList1: [],
  7897. video: [],
  7898. testData: [],
  7899. pData: [],
  7900. templateArray: [],
  7901. },
  7902. ],
  7903. },
  7904. ],
  7905. templateArray: [],
  7906. studentJuri: [],
  7907. teacherJuri: [],
  7908. CollaborativeTeaList: [],
  7909. checkboxList: [],
  7910. checkboxList2: [],
  7911. checkboxList3: [],
  7912. classSearch: "",
  7913. gradeId: "",
  7914. number: "",
  7915. tTitle: "",
  7916. tdetail: "",
  7917. templateC: {},
  7918. AttText: {},
  7919. AttTextType: 0,
  7920. AttTextIndex: 0,
  7921. cTemplate: "",
  7922. CourseType: [],
  7923. CourseType1: [],
  7924. CourseType2: [],
  7925. CourseTypeJson: {},
  7926. CourseTypeJson1: {},
  7927. courseTypeId: [],
  7928. courseTypeId1: [],
  7929. courseTypeSon: [],
  7930. clearArray: [],
  7931. pTypeCheck: [],
  7932. pTypeCheckName: [],
  7933. loading: false,
  7934. toolType: 0,
  7935. inputShow: true,
  7936. inputShow2: true,
  7937. toolIndex: 0,
  7938. cidType: 0,
  7939. answerQ: "",
  7940. answerQ2: "",
  7941. grade: [],
  7942. grade2: [],
  7943. courseUserid: "",
  7944. timer: null,
  7945. timer2: null,
  7946. pasteTimer: null,
  7947. checkId: "",
  7948. isDelete: 1,
  7949. addindex: 0,
  7950. selectSteps: 1,
  7951. groupJson: {},
  7952. dialogVisibleGroup: false,
  7953. rightBoxHeight: 0,
  7954. ManAarray: [],
  7955. checkBoolean: false,
  7956. inviteCode: [],
  7957. inviteId: "",
  7958. icode: "",
  7959. easyArray: [2, 4],
  7960. sourceData: {},
  7961. updateSourcePan: false,
  7962. videoJson: {},
  7963. isBtnDisplay: false,
  7964. isStepDisplay: false,
  7965. isPasteStage: false,
  7966. isPasteTask: false,
  7967. isPasteChoice: false,
  7968. imageList: [],
  7969. imageloading: false,
  7970. imageloading2: false,
  7971. searchImageValue: "",
  7972. ppage: 1,
  7973. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7974. oldIndex: 0,
  7975. dragType: "",
  7976. oldUnitIndex: 0,
  7977. oldData: null,
  7978. newIndex: "",
  7979. englishList: {},
  7980. typeIndex: "",
  7981. courseState: 5,
  7982. taskJSONa: [
  7983. {
  7984. task: "",
  7985. taskDetail: "",
  7986. chapterData: [],
  7987. toolText: "",
  7988. toolChoose: [
  7989. {
  7990. tool: [],
  7991. toolDetail: "",
  7992. toolType: 0,
  7993. askCount: 1,
  7994. askTitle: "",
  7995. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7996. },
  7997. ],
  7998. isShowTools: false,
  7999. askCount: 1,
  8000. isFold: 1,
  8001. askTitle: "",
  8002. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8003. checkJson: [{ checkCount: [], checkPerent: [] }],
  8004. homeworkList: [],
  8005. },
  8006. ],
  8007. checkUnitIndex: 0,
  8008. isdrag: "",
  8009. evaIndex: "",
  8010. evatIndex: "",
  8011. evaBoxDialog: false,
  8012. EnglishVoiceDialog: false,
  8013. englishVoiceJson: {},
  8014. cetIndex: "",
  8015. cettIndex: "",
  8016. cetBoxDialog: false,
  8017. templateName: "",
  8018. setTypeJson: {
  8019. one: "",
  8020. two: "",
  8021. },
  8022. twoJson: [],
  8023. oneJson: [],
  8024. updateKey: 1,
  8025. isOutline: false,
  8026. isOutline2: false,
  8027. infoData: [],
  8028. infoproVisible: false,
  8029. infoisFinishSize: 0,
  8030. infoisAllSize: 0,
  8031. infoprogress: 0,
  8032. taskDetailLoading: [],
  8033. ttaskDetailLoading: [],
  8034. taskDetailLoading2: [],
  8035. ttaskDetailLoading2: [],
  8036. taskDetailLoading3: [],
  8037. ttaskDetailLoading3: [],
  8038. taskDetailLoading4: [],
  8039. taskDetailLoading5: [],
  8040. ttaskDetailLoading5: [],
  8041. dArray: [],
  8042. dialogVisibleAiD: false,
  8043. aitype: "",
  8044. aiJson: {
  8045. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  8046. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  8047. "aiTask": "请根据<教学任务教案>。",
  8048. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  8049. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  8050. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  8051. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  8052. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  8053. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  8054. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  8055. },
  8056. aiText: "",
  8057. aiText2: "",
  8058. aiText3: "",
  8059. aiCallBack: "",
  8060. aiIndex: "",
  8061. clickType: 1,
  8062. promptShow: false,
  8063. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  8064. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  8065. dialogVisibleTips: false,
  8066. tipsJson: {},
  8067. cpote:{
  8068. cpote1: '',
  8069. cpote2: '',
  8070. cpote3: '',
  8071. cpote4: '',
  8072. },
  8073. cpoteLoading:{
  8074. cpote1: false,
  8075. cpote2: false,
  8076. cpote3: false,
  8077. cpote4: false,
  8078. },
  8079. cpotetLoading:{
  8080. cpote1: false,
  8081. cpote2: false,
  8082. cpote3: false,
  8083. cpote4: false,
  8084. },
  8085. cpoteType: 0,
  8086. dialogVisibleAiCreate: false,
  8087. dialogVisibleAiCreate2: [],
  8088. pptBoxDialog: true,
  8089. pptCount: [],
  8090. dialogVisibleAiCreateVideo: false,
  8091. teacherText: [],
  8092. isFileSearch: true,
  8093. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  8094. 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'],
  8095. courseJie:1,
  8096. courseTime:45,
  8097. allTextArray: [],
  8098. dialogVisiblePdf: false,
  8099. dialogVisibleOffice: false,
  8100. wurl: "",
  8101. choiceLoading: false,
  8102. teacherInfoData: [],
  8103. teacherinfoproVisible: false,
  8104. teacherinfoisFinishSize: 0,
  8105. teacherinfoisAllSize: 0,
  8106. teacherinfoprogress: 0,
  8107. teacherCourseText: "",
  8108. teacherTextLoading: false,
  8109. tteacherTextLoading: false,
  8110. targetCourseText: "",
  8111. targetTextLoading: false,
  8112. ttargetTextLoading: false,
  8113. cankaoInfoData: [],
  8114. fileSLoading: false,
  8115. infoData2: [],
  8116. isuseT: false,
  8117. mode: 1,
  8118. targetCourseText2: "",
  8119. targetTextLoading2: false,
  8120. ttargetTextLoading2: false,
  8121. courseTextBool: false,
  8122. teacherCourseTextB: true,
  8123. targetCourseTextB: true,
  8124. courseTextB: true,
  8125. targetCourseText2B: true,
  8126. // 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'],
  8127. yiKeTemplateArray:[],
  8128. taskLoading: [],
  8129. ruleLoading: [],
  8130. mubiaoInfoData: [],
  8131. mubiaoinfoproVisible: false,
  8132. mubiaoinfoisFinishSize: 0,
  8133. mubiaoinfoisAllSize: 0,
  8134. mubiaoinfoprogress: 0,
  8135. xuanzeInfoData: [],
  8136. xuanzeinfoproVisible: false,
  8137. xuanzeinfoisFinishSize: 0,
  8138. xuanzeinfoisAllSize: 0,
  8139. xuanzeinfoprogress: 0,
  8140. pingjiaInfoData: [],
  8141. pingjiainfoproVisible: [],
  8142. pingjiainfoisFinishSize: [],
  8143. pingjiainfoisAllSize: [],
  8144. pingjiainfoprogress: [],
  8145. taskGLoading: [],
  8146. ttaskGLoading: [],
  8147. isOutlineCancelToken: null,
  8148. isFileCancelToken: null,
  8149. isTargetCancelToken1: null,
  8150. isTargetCancelToken2: null,
  8151. isTextCancelToken: null,
  8152. isTeacherTextCancelToken: null,
  8153. isTeacherTaskCancelToken: null,
  8154. isOutlineTaskCancelToken: [],
  8155. isTeacherTaskCancelToken2: [],
  8156. isTeacherTaskCancelSource: [],
  8157. isTextCancelSource: null,
  8158. isOutlineTaskCancelSource: [],
  8159. isTeacherTextCancelSource: null,
  8160. isTargetCancelSource1: null,
  8161. isTargetCancelSource2: null,
  8162. fileidArray: [],
  8163. interPan: true,
  8164. interFlash: true,
  8165. agentid: "",
  8166. interSetting: false,
  8167. chatid: "",
  8168. languageSetting: 0, //0中文 1繁体 2英文
  8169. isQuote: {},
  8170. knowFileArray: [],
  8171. knowInfoData: [],
  8172. knowinfoproVisible: false,
  8173. knowinfoisFinishSize: 0,
  8174. knowinfoisAllSize: 0,
  8175. knowinfoprogress: 0,
  8176. knowFileids: [],
  8177. searchFileName: "",
  8178. knowInfoDataLoading: false,
  8179. isfindMatchingContents: null,
  8180. findMatchingContentsPage: 1,
  8181. findMatchingContentsFinish: false,
  8182. knowInfoData2: [],
  8183. knowinfoproVisible2: false,
  8184. knowinfoisFinishSize2: 0,
  8185. knowinfoisAllSize2: 0,
  8186. knowinfoprogress2: 0,
  8187. knowFileids2: [],
  8188. knowInfoData3: [],
  8189. knowFileids3: [],
  8190. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8191. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41, 72],
  8192. taskAnLoading: [],
  8193. taskAnCancelToken: [],
  8194. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8195. taskCancelToken1: [],
  8196. isTaskCancelSource1: [],
  8197. taskCancelToken2: [],
  8198. isDisplay: false,
  8199. isDialog: 0,
  8200. recordVideoText: "",
  8201. recordAudioUrl: "",
  8202. r_agentid: "",
  8203. course_info: "",
  8204. stepShow: true,
  8205. anLoading: [],
  8206. appendixFile: [],
  8207. appendixPan: true,
  8208. appendixFiles: [],
  8209. appendixTypeCheck: 'all',
  8210. appendixTaskCheck: 'all',
  8211. appendixType: [
  8212. {
  8213. label: "教案",
  8214. value: 0,
  8215. },
  8216. {
  8217. label: "PPT",
  8218. value: 1,
  8219. },
  8220. {
  8221. label: "学历案",
  8222. value: 2,
  8223. },
  8224. {
  8225. label: "量规",
  8226. value: 3,
  8227. },
  8228. {
  8229. label: "聊天栏记录",
  8230. value: 4,
  8231. },
  8232. ],
  8233. appendixLoading: false,
  8234. interFindPan: true,
  8235. typeC1: [],
  8236. typeC2: [],
  8237. knowFileType1: "",
  8238. knowFileType2: "",
  8239. knowFileType: "",
  8240. knowFileTypeArray1: ['上册', '下册'],
  8241. knowFileTypeArray: ['作业', '教案', '其他'],
  8242. optionTypeList:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
  8243. };
  8244. },
  8245. directives: {
  8246. autoHeight: {
  8247. update(el, binding) {
  8248. const { value } = binding;
  8249. if (value && typeof value === "number") {
  8250. el.style.height = `${value}px`;
  8251. } else {
  8252. el.style.height = "auto";
  8253. }
  8254. },
  8255. componentUpdated(el) {
  8256. el.style.height = `${el.scrollHeight + 25}px`;
  8257. },
  8258. },
  8259. },
  8260. computed: {
  8261. // rightBoxHeight: function () {
  8262. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  8263. // },
  8264. offsetLetfPx: function () {
  8265. //addnum可以直接在模板语法里面用,相当于data内的值
  8266. return (
  8267. $(".cru_select")[this.unitIndex] &&
  8268. $(".cru_select")[this.unitIndex].offsetLeft + 5
  8269. );
  8270. },
  8271. getMan2() {
  8272. return function (people) {
  8273. let _people = people;
  8274. let _people2 = "";
  8275. if (this.ManAarray.length) {
  8276. for (var i = 0; i < this.ManAarray.length; i++) {
  8277. if (this.ManAarray[i].userid == people) {
  8278. _people2 = this.ManAarray[i].name;
  8279. break;
  8280. }
  8281. }
  8282. }
  8283. if (people == this.courseUserid) {
  8284. return "";
  8285. }
  8286. return this.ManAarray.length ? _people2 : "";
  8287. };
  8288. },
  8289. getListMan2() {
  8290. return function (list) {
  8291. console.log('getListMan2',list);
  8292. let _people2 = [];
  8293. if (this.ManAarray.length) {
  8294. list.slice(0, 10).forEach(people => {
  8295. let name = this.ManAarray.find(man => man.userid === people && people !== this.courseUserid).name || "";
  8296. if (name) {
  8297. _people2.push(name);
  8298. }
  8299. });
  8300. }
  8301. return _people2.join("、");
  8302. };
  8303. },
  8304. isInvite() {
  8305. return function (cid) {
  8306. let array = [];
  8307. for (var i = 0; i < this.inviteCode.length; i++) {
  8308. array.push(this.inviteCode[i].cid);
  8309. }
  8310. return array.indexOf(cid) != -1;
  8311. };
  8312. },
  8313. getInviteCodeC() {
  8314. return function (cid) {
  8315. let array = [];
  8316. for (var i = 0; i < this.inviteCode.length; i++) {
  8317. array.push(this.inviteCode[i].cid);
  8318. }
  8319. return this.inviteCode[array.indexOf(cid)].ic;
  8320. };
  8321. },
  8322. getClassC() {
  8323. return function (c) {
  8324. let _c2 = "";
  8325. if (this.grade.length) {
  8326. for (var i = 0; i < this.grade.length; i++) {
  8327. if (this.grade[i].id == c) {
  8328. _c2 = this.grade[i].name;
  8329. break;
  8330. }
  8331. }
  8332. }
  8333. return this.grade.length ? _c2 : "";
  8334. };
  8335. },
  8336. getListClassC() {
  8337. return function (list) {
  8338. let _c2 = [];
  8339. if (this.grade.length) {
  8340. for (var j = 0; j < list.length; j++) {
  8341. let c = list[j];
  8342. for (var i = 0; i < this.grade.length; i++) {
  8343. if (this.grade[i].id == c) {
  8344. _c2.push(this.grade[i].name);
  8345. break;
  8346. }
  8347. }
  8348. }
  8349. }
  8350. return this.grade.length ? _c2.join("、") : "";
  8351. };
  8352. },
  8353. MarkdownT() {
  8354. return function (c) {
  8355. let md = new MarkdownIt();
  8356. return c
  8357. ? md.render(c) : "";
  8358. };
  8359. },
  8360. panOutline(){
  8361. return function () {
  8362. let count = 0;
  8363. for(var i = 0; i < this.unitJson.length; i++){
  8364. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8365. for(var j = 0; j < _task.length; j++){
  8366. if(_task[j].taskDetail2){
  8367. count++
  8368. }
  8369. }
  8370. }
  8371. return count;
  8372. };
  8373. },
  8374. panTeacher(){
  8375. return function () {
  8376. let count = 0;
  8377. for(var i = 0; i < this.unitJson.length; i++){
  8378. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8379. for(var j = 0; j < _task.length; j++){
  8380. if(_task[j].taskDetail3){
  8381. count++
  8382. }
  8383. }
  8384. }
  8385. return count;
  8386. };
  8387. },
  8388. panTask(){
  8389. return function () {
  8390. let count = 0;
  8391. for(var i = 0; i < this.unitJson.length; i++){
  8392. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8393. for(var j = 0; j < _task.length; j++){
  8394. if(_task[j].taskDetail){
  8395. count++
  8396. }
  8397. }
  8398. }
  8399. return count;
  8400. };
  8401. },
  8402. panElist(){
  8403. return function (array) {
  8404. let count = 0;
  8405. for(var i = 0; i < array.toolChoose.length; i++){
  8406. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  8407. count++
  8408. }
  8409. }
  8410. return count;
  8411. };
  8412. },
  8413. panTaskElist(){
  8414. return function () {
  8415. let count = 0;
  8416. for(var i = 0; i < this.unitJson.length; i++){
  8417. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8418. for(var j = 0; j < _task.length; j++){
  8419. if(_task[j].eList && _task[j].eList.length){
  8420. count++
  8421. }
  8422. }
  8423. }
  8424. return count;
  8425. };
  8426. },
  8427. panEvaCont(){
  8428. return function () {
  8429. let count = 0;
  8430. for(var i = 0; i < this.unitJson.length; i++){
  8431. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8432. for(var j = 0; j < _task.length; j++){
  8433. let tool = _task[j].toolChoose
  8434. for(var k = 0; k < tool.length; k++){
  8435. if(tool[k].eList && tool[k].eList.length){
  8436. count++
  8437. }
  8438. }
  8439. }
  8440. }
  8441. return count;
  8442. };
  8443. },
  8444. dataCheckPan(){
  8445. return function (fileid) {
  8446. for(let i = 0; i < this.infoData.length; i++){
  8447. if(this.infoData[i].fileid == fileid){
  8448. return true
  8449. }
  8450. }
  8451. return false;
  8452. };
  8453. },
  8454. interUrl: function () {
  8455. let agentid = this.aiJson.agentid
  8456. let sagentid = this.aiJson.sagentid
  8457. let url = ''
  8458. if(sagentid){
  8459. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${sagentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8460. }else{
  8461. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8462. }
  8463. return url;
  8464. },
  8465. panPptCount(){
  8466. return function () {
  8467. let ppts = 0
  8468. for(var i = 0; i < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; i++){
  8469. let ppt = this.$refs['ppt'+i]
  8470. if(ppt && ppt[0].tanDialog){
  8471. ppts++
  8472. }
  8473. }
  8474. if(!this.pptCount.length){
  8475. this.pptBoxDialog = false
  8476. }
  8477. return ppts;
  8478. };
  8479. },
  8480. panDanTool(){
  8481. return function (array) {
  8482. let count = 0;
  8483. for(var i = 0; i < array.toolChoose.length; i++){
  8484. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8485. count++
  8486. }
  8487. }
  8488. return count;
  8489. };
  8490. },
  8491. panDanToolEva(){
  8492. return function (array) {
  8493. let count = 0;
  8494. let tool = array.toolChoose
  8495. for(var k = 0; k < tool.length; k++){
  8496. if(tool[k].eList && tool[k].eList.length){
  8497. count++
  8498. }
  8499. }
  8500. return count;
  8501. };
  8502. },
  8503. panTool(){
  8504. return function () {
  8505. let count = 0;
  8506. for(var j = 0; j < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; j++){
  8507. let array = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[j]
  8508. for(var i = 0; i < array.toolChoose.length; i++){
  8509. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8510. count++
  8511. }
  8512. }
  8513. }
  8514. return count;
  8515. };
  8516. },
  8517. allFile(){
  8518. return function (type) {
  8519. let file = [...this.knowInfoData, ...this.infoData, ...this.knowInfoData2, ...this.appendixFile];
  8520. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8521. let _task = this.unitJson[0].chapterInfo[0].taskJson[i];
  8522. for(var j = 0; j < _task.chapterData.length; j++){
  8523. if(_task.chapterData[j].type == 3){
  8524. file.push({..._task.chapterData[j], tool:j, task:i});
  8525. }
  8526. }
  8527. }
  8528. let uniqueUrls = new Set(file.map(item => item.url)); // 使用Set去重
  8529. let uniqueFile = Array.from(uniqueUrls).map(url => file.find(item => item.url === url)); // 根据url获取唯一文件
  8530. if(this.appendixTaskCheck != 'all' && type != '2'){
  8531. uniqueFile = uniqueFile.filter(file => file.task+1 == this.appendixTaskCheck || file.name.includes('任务'+this.appendixTaskCheck) || file.name.includes('任务'+this.numberToChinese(this.appendixTaskCheck)));
  8532. }
  8533. if(this.appendixTypeCheck != 'all' && type != '2'){
  8534. if(this.appendixTypeCheck == 0){
  8535. uniqueFile = uniqueFile.filter(file => file.name.includes('教案'));
  8536. }else if(this.appendixTypeCheck == 1){
  8537. uniqueFile = uniqueFile.filter(file => file.name.toUpperCase().includes('PPT') || file.name.toUpperCase().includes('PPTX'));
  8538. }else if(this.appendixTypeCheck == 2){
  8539. uniqueFile = uniqueFile.filter(file => file.name.includes('学历案'));
  8540. }else if(this.appendixTypeCheck == 3){
  8541. uniqueFile = uniqueFile.filter(file => file.name.includes('的评价'));
  8542. }else if(this.appendixTypeCheck == 4){
  8543. uniqueFile = uniqueFile.filter(file => file.task == 'dialog');
  8544. }
  8545. }
  8546. return uniqueFile;
  8547. };
  8548. },
  8549. panAppendixCheckAll(){
  8550. return function(){
  8551. let files = this.allFile();
  8552. let count = 0
  8553. for(var i = 0; i < files.length; i++){
  8554. if(this.appendixFiles.includes(files[i].url)){
  8555. count++
  8556. }
  8557. }
  8558. if (count == files.length) {
  8559. return true
  8560. }else {
  8561. false
  8562. }
  8563. }
  8564. },
  8565. getTypeC(){
  8566. return function(index){
  8567. let sub = []
  8568. let grade = []
  8569. if (this.courseTypeId.length) {
  8570. for (var i = 0; i < this.courseTypeId.length; i++) {
  8571. let _sid = this.courseTypeId[i]
  8572. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8573. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  8574. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  8575. }
  8576. }
  8577. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8578. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  8579. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  8580. }
  8581. }
  8582. }
  8583. }
  8584. if(index == 1){
  8585. return sub
  8586. }else if(index == 2){
  8587. return grade
  8588. }
  8589. }
  8590. },
  8591. getFileType(){
  8592. return function (name) {
  8593. let fileType = this.getKnowType();
  8594. for (let type of fileType) {
  8595. if (converter(name).includes(type)) {
  8596. return type; // 判断name中是否包含对应的文件类型
  8597. }
  8598. }
  8599. return '其他';
  8600. };
  8601. },
  8602. allknowInfoData3(){
  8603. return function () {
  8604. let knowInfoData = this.knowInfoData3;
  8605. if(this.knowFileType){
  8606. // if(converter(this.knowFileType) == '其他'){
  8607. // let fileType = this.getKnowType().filter(item => item != '其他');
  8608. // knowInfoData = knowInfoData.filter(item => {
  8609. // return !fileType.some(type => converter(item.name).includes(type));
  8610. // });
  8611. // }else{
  8612. knowInfoData = knowInfoData.filter(item => converter(item.file_type).includes(this.knowFileType))
  8613. // }
  8614. }
  8615. if(this.knowFileType1){
  8616. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType1))
  8617. }
  8618. if(this.knowFileType2){
  8619. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(converter(`第${this.knowFileType2}单元`)) || converter(item.name).includes(converter(`第${this.numberToChinese(this.knowFileType2)}单元`)))
  8620. }
  8621. return knowInfoData;
  8622. };
  8623. },
  8624. getKnowType(){
  8625. return function () {
  8626. let knowInfoData = this.knowInfoData3;
  8627. let array = []
  8628. for(var i = 0; i < knowInfoData.length; i++){
  8629. if(array.indexOf(knowInfoData[i].file_type) == -1){
  8630. array.push(knowInfoData[i].file_type)
  8631. }
  8632. }
  8633. return array;
  8634. };
  8635. },
  8636. panknowInfoData3CheckAll(){
  8637. return function(){
  8638. let files = this.allknowInfoData3();
  8639. let count = 0
  8640. for(var i = 0; i < files.length; i++){
  8641. if(this.knowFileids3.includes(files[i].url)){
  8642. count++
  8643. }
  8644. }
  8645. if (count == files.length) {
  8646. return true
  8647. }else {
  8648. false
  8649. }
  8650. }
  8651. },
  8652. },
  8653. watch: {
  8654. unitIndex(newValue, oldValue) {
  8655. // return;
  8656. if (this.isDelete == 2) {
  8657. this.isDelete = 1;
  8658. return;
  8659. }
  8660. if (this.cid != "") {
  8661. let _unitIndex = oldValue;
  8662. if (
  8663. JSON.stringify(this.unitJson2[_unitIndex]) ==
  8664. JSON.stringify(this.unitJson[_unitIndex])
  8665. ) {
  8666. this.$refs.rightboxR.scrollTop = 0;
  8667. return;
  8668. }
  8669. let cPan = 1;
  8670. for (
  8671. var j = 0;
  8672. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8673. j++
  8674. ) {
  8675. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8676. j
  8677. ].proVisible = false;
  8678. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8679. j
  8680. ].proVisible2 = false;
  8681. if (
  8682. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8683. .length > 1
  8684. ) {
  8685. for (
  8686. var z = 0;
  8687. z <
  8688. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8689. .length;
  8690. z++
  8691. ) {
  8692. if (
  8693. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  8694. .toolChoose[z].tool.length
  8695. ) {
  8696. this.$message.error("请把工具添加完整");
  8697. cPan = 2;
  8698. break;
  8699. }
  8700. }
  8701. }
  8702. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8703. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8704. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8705. (ele) => {
  8706. return ele.value != "" || ele.detail != "" || ele.target != "";
  8707. }
  8708. );
  8709. }
  8710. }
  8711. if (cPan == 2) {
  8712. this.unitIndex = oldValue;
  8713. return;
  8714. }
  8715. for (var i = 0; i < this.unitJson.length; i++) {
  8716. if (this.addindex != i) {
  8717. delete this.unitJson[i].isUpdate;
  8718. }
  8719. }
  8720. this.$refs.rightboxR.scrollTop = 0;
  8721. this.addindex = -1;
  8722. let params = [
  8723. {
  8724. cid: this.cid,
  8725. chapters: JSON.stringify(this.unitJson),
  8726. uid: this.userid,
  8727. unitIndex: _unitIndex,
  8728. },
  8729. ];
  8730. this.ajax
  8731. .post(this.$store.state.api + "updateWorkNew4", params)
  8732. .then((res) => {
  8733. // this.$message({
  8734. // message: "修改成功",
  8735. // type: "success",
  8736. // });
  8737. // this.courseId = this.cid;
  8738. this.addtips()
  8739. })
  8740. .catch((err) => {
  8741. this.$message.error("网络不佳");
  8742. console.error(err);
  8743. });
  8744. }
  8745. },
  8746. steps(newValue, old) {
  8747. if(newValue == 2){
  8748. this.steps = old
  8749. }
  8750. if (newValue == 4) {
  8751. let cPan = 1;
  8752. for (var i = 0; i < this.unitJson.length; i++) {
  8753. for (
  8754. var j = 0;
  8755. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8756. j++
  8757. ) {
  8758. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8759. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8760. if (
  8761. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8762. ) {
  8763. for (
  8764. var z = 0;
  8765. z <
  8766. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8767. z++
  8768. ) {
  8769. if (
  8770. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  8771. .tool.length
  8772. ) {
  8773. this.$message.error("请把工具添加完整");
  8774. cPan = 2;
  8775. break;
  8776. }
  8777. }
  8778. }
  8779. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8780. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8781. i
  8782. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8783. return ele.value != "" || ele.detail != "" || ele.target != "";
  8784. });
  8785. }
  8786. }
  8787. }
  8788. this.inputShow = true;
  8789. if (cPan == 2) {
  8790. this.steps = old;
  8791. return;
  8792. }
  8793. this.goTo(
  8794. "/course?userid=" +
  8795. this.userid +
  8796. "&oid=" +
  8797. this.oid +
  8798. "&org=" +
  8799. this.org +
  8800. "&role=" +
  8801. this.role
  8802. );
  8803. }
  8804. },
  8805. courseName(newVal, oldVal) {
  8806. this.setCourseInfo();
  8807. },
  8808. courseTypeId: {
  8809. immediate: true,
  8810. deep: true,
  8811. handler(newValue, oldValue) {
  8812. this.setCourseInfo();
  8813. }
  8814. },
  8815. knowFileids(newVal, oldVal) {
  8816. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8817. },
  8818. knowFileids2(newVal, oldVal) {
  8819. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8820. },
  8821. },
  8822. methods: {
  8823. tableRowClassName({ row, rowIndex }) {
  8824. if ((rowIndex + 1) % 2 === 0) {
  8825. return "even_row";
  8826. } else {
  8827. return "";
  8828. }
  8829. },
  8830. close() {
  8831. this.cetIndex = "";
  8832. this.cettIndex = "";
  8833. this.templateName = "";
  8834. this.cetBoxDialog = false;
  8835. },
  8836. openAI() {
  8837. window.topU.postMessage({ tools: "64" }, "*");
  8838. },
  8839. setMan() {
  8840. // let teacherJuri = this.teacherJuri2;
  8841. this.ManAarray = [];
  8842. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  8843. if (_user.indexOf(this.userid) == -1) {
  8844. _user.push(this.userid);
  8845. }
  8846. if (_user.indexOf(this.courseUserid) == -1) {
  8847. _user.push(this.courseUserid);
  8848. }
  8849. let params = [{
  8850. uid: _user.join(","),
  8851. }];
  8852. this.ajax
  8853. .post(this.$store.state.api + "getAllUserByIdP", params)
  8854. .then((res) => {
  8855. let teacherJuri = res.data[0];
  8856. this.ManAarray = teacherJuri;
  8857. })
  8858. .catch((err) => {
  8859. console.error(err);
  8860. });
  8861. },
  8862. previewImg(url) {
  8863. this.$hevueImgPreview(url);
  8864. },
  8865. btnDisplay(bool) {
  8866. this.isBtnDisplay = bool;
  8867. },
  8868. stepDisplay(bool) {
  8869. this.isStepDisplay = bool;
  8870. },
  8871. scrollChange() {
  8872. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8873. },
  8874. addHw(e) {
  8875. var el = e.currentTarget;
  8876. el.getElementsByTagName("input")[0].click();
  8877. },
  8878. change(val) {
  8879. if (this.dialogVisible1) {
  8880. this.tdetail = val;
  8881. } else if (this.dialogVisible6) {
  8882. this.AttText.text = val;
  8883. } else if (this.dialogVisible2) {
  8884. this.cTemplate = val;
  8885. } else if (this.dialogVisibleTable) {
  8886. this.tableJson.text = val;
  8887. }
  8888. this.$forceUpdate();
  8889. console.log(val);
  8890. },
  8891. change2(val) {
  8892. console.log(val);
  8893. this.$forceUpdate();
  8894. },
  8895. handleClose(done) {
  8896. done();
  8897. },
  8898. closePan(tool) {
  8899. if (tool == 15) {
  8900. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8901. this.dialogVisible8 = false;
  8902. } else {
  8903. this.closeConfirm(tool);
  8904. }
  8905. } else if (tool == 4) {
  8906. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8907. this.dialogVisible5 = false;
  8908. } else {
  8909. this.closeConfirm(tool);
  8910. }
  8911. } else if (tool == 45) {
  8912. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8913. this.dialogVisibleChoice = false;
  8914. } else {
  8915. this.closeConfirm(tool);
  8916. }
  8917. } else if (tool == 41) {
  8918. if (
  8919. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8920. ) {
  8921. this.dialogVisibleSelect = false;
  8922. } else {
  8923. this.closeConfirm(tool);
  8924. }
  8925. } else if (tool == 47) {
  8926. if (
  8927. JSON.stringify(this.sentenceList) ==
  8928. JSON.stringify(this.sentenceList2)
  8929. ) {
  8930. this.dialogVisibleSentence = false;
  8931. } else {
  8932. this.closeConfirm(tool);
  8933. }
  8934. } else if (tool == 69) {
  8935. if (
  8936. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8937. ) {
  8938. this.englishDialogVisible = false;
  8939. } else {
  8940. this.closeConfirm(tool);
  8941. }
  8942. }
  8943. },
  8944. closeConfirm(tool) {
  8945. this.$confirm("是否保存已编辑内容?", "提示", {
  8946. confirmButtonText: "保存",
  8947. cancelButtonText: "不保存",
  8948. type: "warning",
  8949. })
  8950. .then(() => {
  8951. if (tool == 15) {
  8952. this.addAnswer();
  8953. } else if (tool == 4) {
  8954. this.addAsk();
  8955. } else if (tool == 45) {
  8956. this.addTest();
  8957. } else if (tool == 41) {
  8958. this.addSelectAnswer();
  8959. } else if (tool == 47) {
  8960. this.addSentenceTool();
  8961. } else if (tool == 69) {
  8962. this.addEnglish();
  8963. }
  8964. })
  8965. .catch(() => {
  8966. if (tool == 15) {
  8967. this.dialogVisible8 = false;
  8968. } else if (tool == 4) {
  8969. this.dialogVisible5 = false;
  8970. } else if (tool == 45) {
  8971. this.dialogVisibleChoice = false;
  8972. } else if (tool == 41) {
  8973. this.dialogVisibleSelect = false;
  8974. } else if (tool == 47) {
  8975. this.dialogVisibleSentence = false;
  8976. } else if (tool == 69) {
  8977. this.englishDialogVisible = false;
  8978. }
  8979. });
  8980. },
  8981. addEnglish(jsonType) {
  8982. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  8983. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  8984. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  8985. if (
  8986. this.englishList.engTitle == "" ||
  8987. this.englishList.englishText == ""
  8988. ) {
  8989. this.$message.error("请将内容填写完整!");
  8990. return;
  8991. }
  8992. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8993. this.taskCount
  8994. ].toolChoose[this.toolIndex].englishList = this.englishList;
  8995. this.englishList = {};
  8996. if (jsonType && jsonType == 1) {
  8997. this.englishDialogVisible = true;
  8998. } else {
  8999. this.englishDialogVisible = false;
  9000. }
  9001. if (
  9002. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  9003. .toolChoose[this.toolIndex].tool != 69
  9004. ) {
  9005. this.addTools(69, this.taskCount, this.toolIndex);
  9006. }
  9007. },
  9008. imgChange2(i, j) {
  9009. var _tmp = this.testJson.testJson[i].checkList[j];
  9010. this.noneBtnImg = _tmp.length >= 1;
  9011. },
  9012. imgChange3(i) {
  9013. var _tmp = this.testJson.testJson[i];
  9014. this.noneBtnImg = _tmp.length >= 1;
  9015. },
  9016. imgChange1(file, fileList, type, itemTaskIndex) {
  9017. if (type == 1) {
  9018. var _tmp = this.cover;
  9019. } else if (
  9020. type == 2 ||
  9021. type == 3 ||
  9022. type == 6 ||
  9023. type == 7 ||
  9024. type == 8
  9025. ) {
  9026. var _tmp =
  9027. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9028. .chapterData;
  9029. } else if (type == 4) {
  9030. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  9031. } else {
  9032. var _tmp =
  9033. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9034. .homeworkList;
  9035. }
  9036. this.noneBtnImg = _tmp.length >= 1;
  9037. },
  9038. goTo(path) {
  9039. this.$router.push(path);
  9040. },
  9041. guid() {
  9042. var _num,
  9043. i,
  9044. _guid = "";
  9045. for (i = 0; i < 32; i++) {
  9046. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  9047. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  9048. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  9049. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  9050. _guid += "-";
  9051. }
  9052. }
  9053. return _guid;
  9054. },
  9055. retrunCourse() {
  9056. if(this.istemplate == 1){
  9057. this.goTo(
  9058. "/course?userid=" +
  9059. this.userid +
  9060. "&oid=" +
  9061. this.oid +
  9062. "&org=" +
  9063. this.org +
  9064. "&role=" +
  9065. this.role
  9066. );
  9067. return
  9068. }
  9069. this.$confirm("是否保存已编辑内容?", "提示", {
  9070. confirmButtonText: "保存",
  9071. cancelButtonText: "不保存",
  9072. distinguishCancelAndClose: true,
  9073. type: "warning",
  9074. customClass: 'custom-confirm-box'
  9075. })
  9076. .then(() => {
  9077. if (this.taskLoading.length) {
  9078. let _pan = 1
  9079. for(var k = 0; k < this.taskLoading.length; k++){
  9080. if(this.taskLoading[k]){
  9081. this.$message({
  9082. message: `请等待任务${k+1}回答完毕后再保存`,
  9083. type: "warning"
  9084. });
  9085. _pan = 2
  9086. }
  9087. }
  9088. if(_pan == 2){
  9089. return
  9090. }
  9091. }
  9092. if(this.taskGLoading.length){
  9093. let _pan = 1
  9094. for(var k = 0; k < this.taskGLoading.length; k++){
  9095. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9096. this.$message({
  9097. message: `请等待任务${k+1}回答完毕后再保存`,
  9098. type: "warning"
  9099. });
  9100. _pan = 2
  9101. }
  9102. }
  9103. if(_pan == 2){
  9104. return
  9105. }
  9106. }
  9107. let pan2 = 1
  9108. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9109. for(var index = 0; index < taskJson.length; index++){
  9110. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9111. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9112. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9113. this.$message({
  9114. message: `请等待任务${index+1}回答完毕后再继续`,
  9115. type: "warning"
  9116. });
  9117. pan2 = 2
  9118. }
  9119. }
  9120. }
  9121. }
  9122. if(pan2 == 2){
  9123. return
  9124. }
  9125. if (this.cid == "" || this.cid == undefined) {
  9126. if (this.courseName == "") {
  9127. this.$message.error("请补充填写课程名称");
  9128. return;
  9129. } else {
  9130. this.addWork();
  9131. }
  9132. this.steps = 4;
  9133. } else {
  9134. if (this.courseName == "") {
  9135. this.$message.error("请补充填写课程名称");
  9136. return;
  9137. } else {
  9138. if (this.userid != this.courseUserid && this.role != "1") {
  9139. this.updateWork2();
  9140. } else {
  9141. this.updateWork();
  9142. }
  9143. this.steps = 4;
  9144. }
  9145. }
  9146. })
  9147. .catch((v) => {
  9148. console.log(v);
  9149. if (v == "cancel") {
  9150. this.goTo(
  9151. "/course?userid=" +
  9152. this.userid +
  9153. "&oid=" +
  9154. this.oid +
  9155. "&org=" +
  9156. this.org +
  9157. "&role=" +
  9158. this.role
  9159. );
  9160. }
  9161. });
  9162. setTimeout(() => {
  9163. this.setTipsIndex()
  9164. }, 500)
  9165. },
  9166. lastSteps() {
  9167. if (this.steps == 4) {
  9168. this.goTo(
  9169. "/course?userid=" +
  9170. this.userid +
  9171. "&oid=" +
  9172. this.oid +
  9173. "&org=" +
  9174. this.org +
  9175. "&role=" +
  9176. this.role
  9177. );
  9178. } else {
  9179. // if (this.cidType == 0) {
  9180. // this.steps--;
  9181. // if (this.steps == 1) {
  9182. // setTimeout(() => {
  9183. // this.checkEva(this.checkId);
  9184. // setTimeout(() => {
  9185. // this.checkEva(this.checkId);
  9186. // }, 100);
  9187. // }, 100);
  9188. // }
  9189. // } else {
  9190. if (this.steps == 3) {
  9191. this.steps = 1;
  9192. setTimeout(() => {
  9193. this.checkEva(this.checkId);
  9194. setTimeout(() => {
  9195. this.checkEva(this.checkId);
  9196. }, 100);
  9197. }, 100);
  9198. }
  9199. // }
  9200. }
  9201. },
  9202. navSteps(s) {
  9203. if (this.courseName == "") {
  9204. this.$message.error("请补充填写课程名称");
  9205. return;
  9206. }
  9207. if (this.cidType == 0) {
  9208. if (this.steps == 1) {
  9209. if (this.cid == "" || this.cid == undefined) {
  9210. this.addWork();
  9211. } else {
  9212. if (this.userid != this.courseUserid && this.role != "1") {
  9213. this.updateWork2();
  9214. } else {
  9215. this.updateWork();
  9216. }
  9217. }
  9218. }
  9219. if (s == 1) {
  9220. this.steps = 1;
  9221. setTimeout(() => {
  9222. this.checkEva(this.checkId);
  9223. setTimeout(() => {
  9224. this.checkEva(this.checkId);
  9225. }, 100);
  9226. }, 100);
  9227. }
  9228. if (s == 2) {
  9229. this.steps = 2;
  9230. }
  9231. if (s == 3) {
  9232. this.cTemplate = this.templateC.content;
  9233. this.dialogVisible2 = false;
  9234. this.steps = 3;
  9235. this.isClickColor = 1;
  9236. this.unitJson[
  9237. this.unitIndex
  9238. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9239. this.$forceUpdate();
  9240. setTimeout(() => {
  9241. this.checkEva(this.checkId);
  9242. setTimeout(() => {
  9243. this.checkEva(this.checkId);
  9244. }, 100);
  9245. }, 1000);
  9246. }
  9247. } else {
  9248. if (this.steps == 1) {
  9249. if (this.cid == "" || this.cid == undefined) {
  9250. this.addWork();
  9251. } else {
  9252. if (this.userid != this.courseUserid && this.role != "1") {
  9253. this.updateWork2();
  9254. } else {
  9255. this.updateWork();
  9256. }
  9257. }
  9258. }
  9259. if (s == 1) {
  9260. this.steps = 1;
  9261. setTimeout(() => {
  9262. this.checkEva(this.checkId);
  9263. setTimeout(() => {
  9264. this.checkEva(this.checkId);
  9265. }, 100);
  9266. }, 100);
  9267. }
  9268. if (s == 3) {
  9269. this.cTemplate = this.templateC.content;
  9270. this.dialogVisible2 = false;
  9271. this.steps = 3;
  9272. this.isClickColor = 1;
  9273. this.unitJson[
  9274. this.unitIndex
  9275. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9276. this.$forceUpdate();
  9277. setTimeout(() => {
  9278. this.checkEva(this.checkId);
  9279. setTimeout(() => {
  9280. this.checkEva(this.checkId);
  9281. }, 100);
  9282. }, 1000);
  9283. }
  9284. }
  9285. this.$refs.stepBox.scrollTop = 0;
  9286. },
  9287. setTipsIndex(){
  9288. // 使用 setTimeout 确保对话框已经渲染完成
  9289. this.$nextTick(() => {
  9290. const dialog = document.querySelector('.custom-confirm-box');
  9291. if (dialog) {
  9292. const parent = dialog.parentElement;
  9293. if (parent) {
  9294. parent.style.zIndex = 9999999;
  9295. const adjacentElement = parent.nextElementSibling;
  9296. if (adjacentElement) {
  9297. adjacentElement.style.zIndex = 9999998;
  9298. }
  9299. }
  9300. }
  9301. });
  9302. },
  9303. nextSteps(clickType, ttype) {
  9304. if(!this.time()){
  9305. return
  9306. }
  9307. // if (this.cidType == 1) {
  9308. if (this.steps == 1) {
  9309. if (this.courseName != "") {
  9310. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  9311. // this.$message({
  9312. // message: "请回答完毕后再次发送",
  9313. // type: "warning"
  9314. // });
  9315. if(this.ttaskDetailLoading.length){
  9316. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  9317. this.$message({
  9318. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9319. type: "warning"
  9320. });
  9321. }
  9322. if(this.cpotetLoading.cpote1){
  9323. this.$message({
  9324. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  9325. type: "warning"
  9326. });
  9327. }
  9328. if(this.cpotetLoading.cpote2){
  9329. this.$message({
  9330. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  9331. type: "warning"
  9332. });
  9333. }
  9334. if(this.cpotetLoading.cpote3){
  9335. this.$message({
  9336. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  9337. type: "warning"
  9338. });
  9339. }
  9340. if(this.cpotetLoading.cpote4){
  9341. this.$message({
  9342. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  9343. type: "warning"
  9344. });
  9345. }
  9346. return;
  9347. }
  9348. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  9349. if(!this.courseText && !this.teacherCourseText){
  9350. this.$message.error("请生成简要描述后再生成大纲");
  9351. return;
  9352. }
  9353. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  9354. this.openAiDialog(clickType, 'aiOutline2')
  9355. if(clickType == 1){
  9356. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9357. }else {
  9358. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9359. }
  9360. }else {
  9361. this.openAiDialog(clickType, 'aiOutline')
  9362. if(clickType == 1){
  9363. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9364. }else {
  9365. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9366. }
  9367. }
  9368. return;
  9369. }
  9370. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  9371. let _type = ''
  9372. if(this.cpoteType == 0){
  9373. _type = 'aiCpote1'
  9374. if(clickType == 1){
  9375. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  9376. }else {
  9377. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  9378. }
  9379. }else if(this.cpoteType == 1){
  9380. _type = 'aiCpote2'
  9381. if(clickType == 1){
  9382. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  9383. }else {
  9384. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  9385. }
  9386. }else if(this.cpoteType == 2){
  9387. _type = 'aiCpote3'
  9388. if(clickType == 1){
  9389. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  9390. }else {
  9391. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  9392. }
  9393. }else if(this.cpoteType == 3){
  9394. _type = 'aiCpote4'
  9395. if(clickType == 1){
  9396. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  9397. }else {
  9398. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  9399. }
  9400. }
  9401. this.cpoteType++
  9402. this.openAiDialog(clickType, _type)
  9403. return;
  9404. }
  9405. // if (!this.isOutline2) {
  9406. // this.openAiDialog(clickType, 'aiTeacher')
  9407. // return;
  9408. // }
  9409. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  9410. this.openAiDialog(clickType, 'aiTeacher3')
  9411. if(clickType == 1){
  9412. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9413. }else {
  9414. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9415. }
  9416. return;
  9417. }
  9418. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  9419. this.openAiDialog(clickType, 'aiTeacher2')
  9420. if(clickType == 1){
  9421. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9422. }else {
  9423. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9424. }
  9425. return;
  9426. }
  9427. let _pan2 = 1
  9428. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  9429. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  9430. _pan2 = 2
  9431. this.$message.error(`请完善任务${k+1}的课程大纲`)
  9432. break;
  9433. }
  9434. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  9435. _pan2 = 2
  9436. this.$message.error(`请完善任务${k+1}的课程教案`)
  9437. break;
  9438. }
  9439. }
  9440. if(_pan2 == 2){
  9441. return;
  9442. }
  9443. const functionA = () => {
  9444. setTimeout(() => {
  9445. this.loading = false
  9446. this.steps = 3;
  9447. }, 0)
  9448. this.isClickColor = 1;
  9449. this.unitJson[
  9450. this.unitIndex
  9451. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9452. this.$forceUpdate();
  9453. setTimeout(() => {
  9454. this.checkEva(this.checkId);
  9455. setTimeout(() => {
  9456. this.checkEva(this.checkId);
  9457. }, 100);
  9458. }, 1000);
  9459. if (this.cid == "" || this.cid == undefined) {
  9460. this.addWork();
  9461. } else {
  9462. if (this.userid != this.courseUserid && this.role != "1") {
  9463. this.updateWork2();
  9464. } else {
  9465. this.updateWork();
  9466. }
  9467. }
  9468. }
  9469. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  9470. if(this.ttaskDetailLoading5.length){
  9471. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  9472. // this.$message({
  9473. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9474. // type: "warning"
  9475. // });
  9476. this.$confirm("还有教案描述未生成完毕,是否直接下一步?", "提示", {
  9477. confirmButtonText: "确定",
  9478. cancelButtonText: "取消",
  9479. distinguishCancelAndClose: true,
  9480. type: "warning",
  9481. customClass: 'custom-confirm-box'
  9482. })
  9483. .then(() => {
  9484. if(this.isTeacherTaskCancelToken2){
  9485. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  9486. if(this.isTeacherTaskCancelToken2[i]){
  9487. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  9488. this.isTeacherTaskCancelToken2[i] = null;
  9489. }
  9490. }
  9491. }
  9492. this.taskDetailLoading5 = []
  9493. this.ttaskDetailLoading5 = []
  9494. if(this.isTeacherTaskCancelSource){
  9495. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  9496. if(this.isTeacherTaskCancelSource[i]){
  9497. this.isTeacherTaskCancelSource[i].close()
  9498. this.isTeacherTaskCancelSource[i] = null
  9499. }
  9500. }
  9501. }
  9502. if (this.cid) {
  9503. this.loading = true
  9504. functionA()
  9505. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9506. } else {
  9507. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9508. if(clickType == 1){
  9509. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  9510. }else {
  9511. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9512. }
  9513. }
  9514. }).catch((v) => {
  9515. console.log(v);
  9516. })
  9517. setTimeout(() => {
  9518. this.setTipsIndex()
  9519. }, 500)
  9520. }
  9521. return;
  9522. }
  9523. if (this.cid && this.panTask() > 0) {
  9524. this.loading = true
  9525. functionA()
  9526. } else {
  9527. // if(ttype == 2){
  9528. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9529. // }else {
  9530. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  9531. // }
  9532. }
  9533. } else {
  9534. this.$message.error("请补充填写课程名称");
  9535. return;
  9536. }
  9537. } else if (this.steps == 3) {
  9538. if (this.taskLoading.length) {
  9539. let _pan = 1
  9540. for(var k = 0; k < this.taskLoading.length; k++){
  9541. if(this.taskLoading[k]){
  9542. this.$message({
  9543. message: `请等待任务${k+1}回答完毕后再上传`,
  9544. type: "warning"
  9545. });
  9546. _pan = 2
  9547. }
  9548. }
  9549. if(_pan == 2){
  9550. return
  9551. }
  9552. }
  9553. if(this.taskGLoading.length){
  9554. let _pan = 1
  9555. for(var k = 0; k < this.taskGLoading.length; k++){
  9556. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9557. this.$message({
  9558. message: `请等待任务${k+1}回答完毕后再保存`,
  9559. type: "warning"
  9560. });
  9561. _pan = 2
  9562. }
  9563. }
  9564. if(_pan == 2){
  9565. return
  9566. }
  9567. }
  9568. let pan2 = 1
  9569. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9570. for(var index = 0; index < taskJson.length; index++){
  9571. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9572. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9573. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9574. this.$message({
  9575. message: `请等待任务${index+1}回答完毕后再继续`,
  9576. type: "warning"
  9577. });
  9578. pan2 = 2
  9579. }
  9580. }
  9581. }
  9582. }
  9583. if(pan2 == 2){
  9584. return
  9585. }
  9586. if (this.cid == "" || this.cid == undefined) {
  9587. if (this.courseName == "") {
  9588. this.$message.error("请补充填写课程名称");
  9589. return;
  9590. } else {
  9591. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9592. this.addWork();
  9593. this.steps++;
  9594. }
  9595. } else {
  9596. if (this.courseName == "") {
  9597. this.$message.error("请补充填写课程名称");
  9598. return;
  9599. } else {
  9600. if (this.userid != this.courseUserid && this.role != "1") {
  9601. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9602. this.updateWork2();
  9603. } else {
  9604. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9605. this.updateWork();
  9606. }
  9607. this.steps++;
  9608. }
  9609. }
  9610. }
  9611. // } else {
  9612. // if (this.steps == 1) {
  9613. // if (this.courseName != "") {
  9614. // if (this.cid == "" || this.cid == undefined) {
  9615. // this.addWork();
  9616. // } else {
  9617. // if (this.userid != this.courseUserid && this.role != "1") {
  9618. // // this.updateWork2();
  9619. // } else {
  9620. // this.updateWork();
  9621. // }
  9622. // }
  9623. // this.steps++;
  9624. // } else {
  9625. // this.$message.error("请补充填写课程名称");
  9626. // return;
  9627. // }
  9628. // } else if (this.steps == 2) {
  9629. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  9630. // this.cTemplate = this.templateC.content;
  9631. // }
  9632. // this.dialogVisible2 = false;
  9633. // this.steps++;
  9634. // setTimeout(() => {
  9635. // this.checkEva(this.checkId);
  9636. // setTimeout(() => {
  9637. // this.checkEva(this.checkId);
  9638. // }, 100);
  9639. // }, 1000);
  9640. // } else if (this.steps == 3) {
  9641. // if (this.cid == "" || this.cid == undefined) {
  9642. // if (this.courseName == "") {
  9643. // this.$message.error("请补充填写课程名称");
  9644. // return;
  9645. // } else {
  9646. // this.addWork();
  9647. // this.steps++;
  9648. // }
  9649. // } else {
  9650. // if (this.courseName == "") {
  9651. // this.$message.error("请补充填写课程名称");
  9652. // return;
  9653. // } else {
  9654. // if (this.userid != this.courseUserid && this.role != "1") {
  9655. // this.updateWork2();
  9656. // } else {
  9657. // this.updateWork();
  9658. // }
  9659. // this.steps++;
  9660. // }
  9661. // }
  9662. // }
  9663. // }
  9664. this.$refs.stepBox.scrollTop = 0;
  9665. },
  9666. unitSet(i) {
  9667. if (this.unitIndex == i) {
  9668. return;
  9669. }
  9670. this.unitIndex = i;
  9671. this.isClickColor = 1;
  9672. // this.$refs.rightboxR.scrollTop = 0;
  9673. this.$refs.unitBox.scrollTop = 0;
  9674. },
  9675. panUnitJson() {
  9676. let _unitIndex = this.unitIndex;
  9677. let cPan = 1;
  9678. for (
  9679. var j = 0;
  9680. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9681. j++
  9682. ) {
  9683. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9684. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9685. j
  9686. ].proVisible2 = false;
  9687. if (
  9688. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9689. .length > 1
  9690. ) {
  9691. for (
  9692. var z = 0;
  9693. z <
  9694. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9695. .length;
  9696. z++
  9697. ) {
  9698. if (
  9699. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9700. z
  9701. ].tool.length
  9702. ) {
  9703. this.$message.error("请把工具添加完整");
  9704. cPan = 2;
  9705. break;
  9706. }
  9707. }
  9708. }
  9709. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9710. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9711. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9712. (ele) => {
  9713. return ele.value != "" || ele.detail != "" || ele.target != "";
  9714. }
  9715. );
  9716. }
  9717. }
  9718. return cPan;
  9719. },
  9720. unitOpen(i) {
  9721. if (this.unitJson[i].toolOpen) {
  9722. this.unitJson[i].toolOpen = false;
  9723. } else {
  9724. this.unitJson[i].toolOpen = true;
  9725. }
  9726. this.updateWork();
  9727. this.$forceUpdate();
  9728. },
  9729. unitSet2(i) {
  9730. if (this.panUnitJson() == 2) {
  9731. return;
  9732. }
  9733. // if(this.unitJson[i].toolOpen){
  9734. // this.unitJson[i].toolOpen = false
  9735. // this.updateWork()
  9736. // this.$forceUpdate()
  9737. // return
  9738. // }else {
  9739. this.unitJson[i].toolOpen = true;
  9740. // }
  9741. this.$forceUpdate();
  9742. if (this.unitIndex == i) {
  9743. return;
  9744. }
  9745. this.unitIndex = i;
  9746. this.isClickColor = 1;
  9747. // this.$refs.rightboxR.scrollTop = 0;
  9748. this.$refs.unitBox.scrollTop = 0;
  9749. },
  9750. updateCourseState(i) {
  9751. let params = [
  9752. {
  9753. cid: this.cid,
  9754. state: i,
  9755. },
  9756. ];
  9757. this.ajax
  9758. .post(this.$store.state.api + "updateCourseMode", params)
  9759. .then((res) => {
  9760. this.courseState = i;
  9761. })
  9762. .catch((err) => {
  9763. this.$message.error("网络不佳");
  9764. console.error(err);
  9765. });
  9766. },
  9767. addtips(){
  9768. let params = [
  9769. {
  9770. cid: this.cid,
  9771. tips: JSON.stringify(this.aiJson),
  9772. tid: this.templateid
  9773. },
  9774. ];
  9775. this.ajax
  9776. .post(this.$store.state.api + "addTips", params)
  9777. .then((res) => {
  9778. })
  9779. .catch((err) => {
  9780. this.$message.error("网络不佳");
  9781. console.error(err);
  9782. });
  9783. },
  9784. openSaveTips(){
  9785. this.dialogVisibleTips = true
  9786. },
  9787. time() {
  9788. if (!this.now) {
  9789. this.now = new Date().getTime();
  9790. return true;
  9791. } else {
  9792. let time = new Date().getTime();
  9793. if (time - this.now > 1000) {
  9794. this.now = time;
  9795. return true;
  9796. } else {
  9797. return false;
  9798. }
  9799. }
  9800. },
  9801. deleteUnit(i) {
  9802. var _this = this;
  9803. if (i == 0 && _this.unitJson.length == 1) {
  9804. _this
  9805. .$confirm("确定切换成任务模式吗?", "提示", {
  9806. confirmButtonText: "确定",
  9807. cancelButtonText: "取消",
  9808. type: "warning",
  9809. })
  9810. .then(() => {
  9811. _this.unitJson[i].dyName = "";
  9812. // _this.updateCourseState(2);
  9813. })
  9814. .catch(() => {
  9815. return;
  9816. });
  9817. } else {
  9818. _this
  9819. .$confirm("确定删除此阶段吗?", "提示", {
  9820. confirmButtonText: "确定",
  9821. cancelButtonText: "取消",
  9822. type: "warning",
  9823. })
  9824. .then(() => {
  9825. _this.isDelete = 2;
  9826. // _this.unitIndex = _this.unitIndex - 1;
  9827. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  9828. // _this.$message.success("删除成功");
  9829. })
  9830. .catch(() => {
  9831. return;
  9832. });
  9833. }
  9834. },
  9835. deleteWork(chapid) {
  9836. let params = [
  9837. {
  9838. cid: this.cid,
  9839. chapters: JSON.stringify(this.unitJson),
  9840. uid: this.userid,
  9841. chapid: chapid,
  9842. },
  9843. ];
  9844. this.ajax
  9845. .post(this.$store.state.api + "deleteWork", params)
  9846. .then((res) => {
  9847. this.$message({
  9848. message: "删除成功",
  9849. type: "success",
  9850. });
  9851. let task = JSON.parse(
  9852. JSON.stringify(
  9853. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  9854. )
  9855. );
  9856. this.unitJson.splice(this.unitIndex, 1);
  9857. if (this.unitIndex == 0) {
  9858. this.unitIndex = 0;
  9859. } else {
  9860. this.unitIndex = this.unitIndex - 1;
  9861. }
  9862. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  9863. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  9864. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  9865. ...task,
  9866. ];
  9867. }
  9868. })
  9869. .catch((err) => {
  9870. this.$message.error("网络不佳");
  9871. console.error(err);
  9872. });
  9873. },
  9874. deleteTool(itemTaskIndex, i) {
  9875. var _this = this;
  9876. if (_this.time()) {
  9877. _this
  9878. .$confirm("确定删除此工具吗?", "提示", {
  9879. confirmButtonText: "确定",
  9880. cancelButtonText: "取消",
  9881. type: "warning",
  9882. })
  9883. .then(() => {
  9884. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9885. itemTaskIndex
  9886. ].toolChoose.splice(i, 1);
  9887. _this.$message.success("删除成功");
  9888. })
  9889. .catch(() => {
  9890. return;
  9891. });
  9892. }
  9893. },
  9894. deleteSentence(i) {
  9895. var _this = this;
  9896. _this
  9897. .$confirm("确定删除此题目吗?", "提示", {
  9898. confirmButtonText: "确定",
  9899. cancelButtonText: "取消",
  9900. type: "warning",
  9901. })
  9902. .then(() => {
  9903. _this.sentenceList.splice(i, 1);
  9904. _this.$message.success("删除成功");
  9905. })
  9906. .catch(() => {
  9907. return;
  9908. });
  9909. },
  9910. deleteS(s, i, j) {
  9911. this.sentenceList[i].addSentence.splice(j, 1);
  9912. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9913. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9914. this.sentenceList[i].rightAnswer.splice(a, 1);
  9915. }
  9916. },
  9917. openT() {
  9918. window.topU.postMessage({ tools: "25" }, "*");
  9919. },
  9920. deleteTask(i) {
  9921. var _this = this;
  9922. if (_this.time()) {
  9923. _this
  9924. .$confirm(
  9925. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9926. 1 ==
  9927. i
  9928. ? "确定删除此任务吗?"
  9929. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  9930. "提示",
  9931. {
  9932. confirmButtonText: "确定",
  9933. cancelButtonText: "取消",
  9934. type: "warning",
  9935. }
  9936. )
  9937. .then(() => {
  9938. if (i == 0 && _this.courseState == 4) {
  9939. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9940. i + 1
  9941. ].chapterData = JSON.parse(
  9942. JSON.stringify(
  9943. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9944. .chapterData
  9945. )
  9946. );
  9947. }
  9948. _this.$forceUpdate();
  9949. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9950. i,
  9951. 1
  9952. );
  9953. _this.$message.success("删除成功");
  9954. })
  9955. .catch(() => {
  9956. return;
  9957. });
  9958. }
  9959. },
  9960. deleteTask2(i) {
  9961. var _this = this;
  9962. if (_this.time()) {
  9963. _this
  9964. .$confirm(
  9965. "确定删除此任务吗?",
  9966. "提示",
  9967. {
  9968. confirmButtonText: "确定",
  9969. cancelButtonText: "取消",
  9970. type: "warning",
  9971. }
  9972. )
  9973. .then(() => {
  9974. if (i == 0 && _this.courseState == 4) {
  9975. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9976. i + 1
  9977. ].chapterData = JSON.parse(
  9978. JSON.stringify(
  9979. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9980. .chapterData
  9981. )
  9982. );
  9983. }
  9984. _this.$forceUpdate();
  9985. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9986. i,
  9987. 1
  9988. );
  9989. _this.$message.success("删除成功");
  9990. })
  9991. .catch(() => {
  9992. return;
  9993. });
  9994. }
  9995. },
  9996. handlePictureCardPreview(file) {
  9997. this.dialogImageUrl = file.url;
  9998. },
  9999. clean(i, c) {
  10000. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  10001. },
  10002. handle_remove1(file, fileList, type) {
  10003. var _tmp = this.cover;
  10004. // for (var i = 0, len = _tmp.length; i < len; i++) {
  10005. // if (_tmp[i].uid == file.uid) {
  10006. // _tmp.splice(i, 1);
  10007. // break;
  10008. // }
  10009. // this.cover = _tmp;
  10010. // }
  10011. this.cover = [];
  10012. this.noneBtnImg = this.cover.length >= 1;
  10013. this.isSysPic = false;
  10014. this.isSysPic2 = false;
  10015. this.$forceUpdate();
  10016. },
  10017. addImg(e) {
  10018. var el = e.currentTarget;
  10019. el.getElementsByTagName("input")[0].click();
  10020. e.target.value = "";
  10021. },
  10022. addChaptersTools(i) {
  10023. this.chapTools = [
  10024. {
  10025. tools: [],
  10026. toolDetail: "",
  10027. },
  10028. ];
  10029. this.chapCount = i;
  10030. this.dialogVisible4 = true;
  10031. },
  10032. isNoFinsh() {
  10033. this.$message.warning("功能正在开发中");
  10034. },
  10035. addAttText(i) {
  10036. this.AttText = {
  10037. title: "",
  10038. text: "",
  10039. };
  10040. this.taskCount = i;
  10041. this.AttTextType = 0;
  10042. this.$forceUpdate();
  10043. this.dialogVisible6 = true;
  10044. setTimeout(() => {
  10045. this.$refs["fuInput"].focus();
  10046. }, 100);
  10047. },
  10048. openLine(i) {
  10049. this.line = "";
  10050. this.lineCount = i;
  10051. this.lineType = 0;
  10052. this.$forceUpdate();
  10053. this.dialogVisible7 = true;
  10054. },
  10055. pasteLine(i) {
  10056. navigator.clipboard
  10057. .readText()
  10058. .then((v) => {
  10059. console.log("获取剪贴板成功:", v);
  10060. const html = v;
  10061. const regex = /src="(.*?)"/g;
  10062. const match = regex.exec(html);
  10063. if (match && match[1]) {
  10064. console.log(match[1]);
  10065. this.$message.success("粘贴成功");
  10066. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10067. i
  10068. ].chapterData.unshift({
  10069. name: "链接",
  10070. title: "嵌入代码",
  10071. url: match[1],
  10072. type: 8,
  10073. });
  10074. } else {
  10075. // console.log("未找到包含 src 属性的 iframe");
  10076. this.$message.error(
  10077. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  10078. );
  10079. }
  10080. })
  10081. .catch((v) => {
  10082. console.log("获取剪贴板失败: ", v);
  10083. });
  10084. },
  10085. openSource(i) {
  10086. this.lineCount = i;
  10087. this.sourceData = {};
  10088. this.dialogVisibleSource = true;
  10089. this.updateSourcePan = false;
  10090. },
  10091. openAiCreate(i){
  10092. // this.lineCount = i;
  10093. // this.dialogVisibleAiCreate = true;
  10094. if(!this.pptCount.includes(i)){
  10095. this.pptCount.push(i)
  10096. this.dialogVisibleAiCreate2.push(i);
  10097. }else{
  10098. this.$refs['ppt'+i][0].tanDialog = false
  10099. this.$refs['ppt'+i][0].dialogVisibleAiCreate2 = true
  10100. }
  10101. this.pptBoxDialog = true
  10102. },
  10103. createAiPpt(json, i){
  10104. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10105. // this.dialogVisibleAiCreate = false;
  10106. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10107. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10108. },
  10109. closeAiPpt(i){
  10110. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10111. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10112. },
  10113. openAiCreateVideo(i){
  10114. this.lineCount = i;
  10115. this.dialogVisibleAiCreateVideo = true;
  10116. },
  10117. createAiVideo(json){
  10118. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10119. // this.dialogVisibleAiCreateVideo = false;
  10120. },
  10121. async createTeacherAn(index, type){
  10122. // this.lineCount = index;
  10123. let md = new MarkdownIt();
  10124. if(this.courseState == 4){
  10125. this.anLoading[0] = true
  10126. // if(index == 0 || index){
  10127. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10128. // let name = _task.task+'-教案'
  10129. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10130. // await this.generate(name, _html, 0)
  10131. // }else {
  10132. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10133. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10134. let name = `任务${i+1}`+_task.task+'-教案'
  10135. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10136. await this.generate(name, _html, 0)
  10137. }
  10138. // }
  10139. }else if(this.courseState == 5){
  10140. if(type != 2){
  10141. this.anLoading[index] = true
  10142. }
  10143. if(index == 0 || index){
  10144. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10145. let name = `任务${index+1}`+_task.task+'-教案'
  10146. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10147. await this.generate(name, _html, index,"", type)
  10148. }else {
  10149. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10150. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10151. let name = `任务${i+1}`+_task.task+'-教案'
  10152. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10153. await this.generate(name, _html, i)
  10154. }
  10155. }
  10156. }
  10157. },
  10158. async createTaskAn(index){
  10159. // this.lineCount = index;
  10160. if(this.taskAnLoading[index]){
  10161. // this.$message.error('请等待当前学历案生成完成')
  10162. this.cancelAjax('taskAn', index)
  10163. return
  10164. }
  10165. this.taskAnLoading[index] = true
  10166. this.$forceUpdate()
  10167. let _this = this
  10168. let md = new MarkdownIt();
  10169. let messages = ""
  10170. messages = `NOTICE
  10171. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  10172. Language: ${this.getLang()}
  10173. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  10174. ## 任务教案
  10175. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  10176. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  10177. let parm = {
  10178. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  10179. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  10180. session_name: uuidv4(),
  10181. userId: this.userid,
  10182. file_ids: [],
  10183. model: 'gpt-4o-2024-11-20',
  10184. temperature: this.mode == 3 ? 0.5 : 0.1,
  10185. }
  10186. this.ajax
  10187. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  10188. .then(async (response) => {
  10189. console.log(response);
  10190. let data = response.data.FunctionResponse
  10191. if (data.message) {
  10192. console.log(data.message);
  10193. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  10194. let name = _task.task+'-学历案'
  10195. let _html = md.render(data.message).replace(/[\r\n]+/g, '').replace(/<hr>/g, '').replace(/<ol[^>]*>/g, '').replace(/<\/ol>/g, '').replace(/<li[^>]*>(.*?)<\/li>/g, (match, content) => {
  10196. // 去除内容为空的<li>标签
  10197. if (!content.trim()) {
  10198. return ''; // 如果<li>标签内容为空,删除该标签
  10199. }
  10200. // 去掉<li>中的标签,保留纯文本内容
  10201. return `<li>${content.replace(/<[^>]+>/g, '')}</li>`;
  10202. }); // 去掉 <ol> 和 </ol> 标签
  10203. console.log(_html)
  10204. await _this.generate(name, _html, index, ()=>{
  10205. _this.taskAnLoading[index] = false
  10206. _this.taskAnCancelToken[index] = null
  10207. })
  10208. }else{
  10209. _this.taskAnLoading[index] = false
  10210. _this.taskAnCancelToken[index] = null
  10211. }
  10212. }).catch((error) => {
  10213. console.log(error);
  10214. _this.taskAnLoading[index] = false
  10215. _this.taskAnCancelToken[index] = null
  10216. });
  10217. },
  10218. async generate(a, html, index, callback, type) {
  10219. // <html lang="en">
  10220. // 将html文件中需要用到的数据挂载到store上
  10221. const content = `<!DOCTYPE html>
  10222. <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'>
  10223. <head>
  10224. <!--[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]-->
  10225. <meta charset="UTF-8">
  10226. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10227. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10228. <title>${a}</title>
  10229. <style>
  10230. table {
  10231. border-collapse: collapse; /* 折叠边框 */
  10232. width: 100%;
  10233. }
  10234. th, td {
  10235. border: 1px solid black; /* 线条样式 */
  10236. padding: 8px;
  10237. text-align: left;
  10238. }
  10239. </style>
  10240. </head>
  10241. <body>
  10242. ${html}
  10243. </body>
  10244. </html>`;
  10245. // debugger
  10246. const blob = htmlDocx.asBlob(content)
  10247. // debugger
  10248. let dname = a + ".docx";
  10249. // 创建文件流
  10250. // 创建bolb实例时,内容一定要放在[]中
  10251. // const blob = new Blob([content], {
  10252. // type: "text/plain;charset='utf-8'",
  10253. // });
  10254. // const file = new File([blob], dname, { type: 'application/msword' });
  10255. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10256. // let params = convertApi.createParams()
  10257. // params.add('file', file)
  10258. // try {
  10259. // let result = await convertApi.convert('docx', 'docx', params)
  10260. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10261. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10262. // });
  10263. // await this.beforeUploadHtml(file, index, callback)
  10264. // } catch (error) {
  10265. // console.log('=================','报错')
  10266. // await this.beforeUploadHtml(file, index, callback)
  10267. // return
  10268. // }
  10269. await this.beforeUploadHtml(file, index, callback, type)
  10270. },
  10271. async generateExport(a, html, index) {
  10272. // <html lang="en">
  10273. // 将html文件中需要用到的数据挂载到store上
  10274. const content = `<!DOCTYPE html>
  10275. <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'>
  10276. <head>
  10277. <!--[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]-->
  10278. <meta charset="UTF-8">
  10279. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10280. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10281. <title>${a}</title>
  10282. <style>
  10283. table {
  10284. border-collapse: collapse; /* 折叠边框 */
  10285. width: 100%;
  10286. }
  10287. th, td {
  10288. border: 1px solid black; /* 线条样式 */
  10289. padding: 8px;
  10290. text-align: left;
  10291. }
  10292. </style>
  10293. </head>
  10294. <body>
  10295. ${html}
  10296. </body>
  10297. </html>`;
  10298. // debugger
  10299. const blob = htmlDocx.asBlob(content)
  10300. // debugger
  10301. const dname = `${a}.docx`;
  10302. // 创建文件流
  10303. // const file = new File([blob], dname, { type: 'application/msword' });
  10304. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10305. // let params = convertApi.createParams()
  10306. // params.add('file', file)
  10307. // try {
  10308. // let result = await convertApi.convert('docx', 'docx', params)
  10309. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10310. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10311. // });
  10312. // // 执行下载
  10313. // saveAs(file, dname);
  10314. // } catch (error) {
  10315. // saveAs(file, dname);
  10316. // // this.$message.error('导出失败')
  10317. // }
  10318. saveAs(file, dname);
  10319. // return file
  10320. },
  10321. async generateExport2(a, html, index) {
  10322. return new Promise(async (resolve) => {
  10323. // <html lang="en">
  10324. // 将html文件中需要用到的数据挂载到store上
  10325. const content = `<!DOCTYPE html>
  10326. <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'>
  10327. <head>
  10328. <!--[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]-->
  10329. <meta charset="UTF-8">
  10330. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10331. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10332. <title>${a}</title>
  10333. <style>
  10334. table {
  10335. border-collapse: collapse; /* 折叠边框 */
  10336. width: 100%;
  10337. }
  10338. th, td {
  10339. border: 1px solid black; /* 线条样式 */
  10340. padding: 8px;
  10341. text-align: left;
  10342. }
  10343. </style>
  10344. </head>
  10345. <body>
  10346. ${html}
  10347. </body>
  10348. </html>`;
  10349. // debugger
  10350. const blob = htmlDocx.asBlob(content)
  10351. // debugger
  10352. const dname = `${a}`;
  10353. // 创建文件流
  10354. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10355. let params = convertApi.createParams()
  10356. params.add('file', file)
  10357. resolve(file); // 通过 Promise 返回 File 对象
  10358. // try {
  10359. // let result = await convertApi.convert('docx', 'docx', params)
  10360. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10361. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10362. // });
  10363. // resolve(file); // 通过 Promise 返回 File 对象
  10364. // } catch (error) {
  10365. // resolve(''); // 通过 Promise 返回 File 对象
  10366. // }
  10367. });
  10368. },
  10369. async addChatAppendixFile(name, html){
  10370. await this.generate(name, html, 0,"", 3)
  10371. },
  10372. beforeUploadHtml(event, index, callback, type) {
  10373. var file = event;
  10374. var credentials = {
  10375. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10376. secretAccessKey: "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",
  10377. }; //秘钥形式的登录上传
  10378. window.AWS.config.update(credentials);
  10379. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10380. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10381. var _this = this;
  10382. if (file) {
  10383. var params = {
  10384. Key:
  10385. file.name.split(".")[0] +
  10386. new Date().getTime() +
  10387. "." +
  10388. file.name.split(".")[file.name.split(".").length - 1],
  10389. ContentType: file.type,
  10390. Body: file,
  10391. "Access-Control-Allow-Credentials": "*",
  10392. ACL: "public-read",
  10393. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10394. var options = {
  10395. partSize: 2048 * 1024 * 1024,
  10396. queueSize: 2,
  10397. leavePartsOnError: true,
  10398. };
  10399. bucket
  10400. .upload(params, options)
  10401. .on("httpUploadProgress", function (evt) {
  10402. //这里可以写进度条
  10403. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10404. })
  10405. .send(function (err, data) {
  10406. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  10407. _this.anLoading[0] = false
  10408. }
  10409. if(_this.courseState == 5){
  10410. _this.anLoading[index] = false
  10411. }
  10412. callback ? callback() : ''
  10413. _this.$forceUpdate();
  10414. if (err) {
  10415. _this.$message.error("上传失败");
  10416. } else {
  10417. let _index = 0
  10418. // if(_this.lineCount == 0 || _this.lineCount){
  10419. // _index = _this.lineCount
  10420. // }else {
  10421. _index = index
  10422. // }
  10423. if(type != 2 && type != 3){
  10424. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  10425. name: file.name,
  10426. url: data.Location,
  10427. type: 3,
  10428. })
  10429. }else{
  10430. let fileName = file.name;
  10431. let baseName = fileName.split('.').slice(0, -1).join('.'); // 获取不带扩展名的文件名
  10432. let extension = fileName.split('.').pop(); // 获取文件扩展名
  10433. let count = 1;
  10434. // 检查文件名是否已存在
  10435. while (_this.appendixFile.some(item => item.name === fileName)) {
  10436. fileName = `${baseName} (${count}).${extension}`; // 修改文件名
  10437. count++;
  10438. }
  10439. if(type == 3){
  10440. _this.$message.success('保存到附件成功')
  10441. _this.appendixFile.unshift({
  10442. name: fileName,
  10443. url: data.Location,
  10444. type: 3,
  10445. task: 'dialog'
  10446. })
  10447. }else{
  10448. _this.appendixFile.unshift({
  10449. name: fileName,
  10450. url: data.Location,
  10451. type: 3,
  10452. })
  10453. }
  10454. }
  10455. console.log(data.Location);
  10456. }
  10457. });
  10458. }
  10459. },
  10460. async generate2(a, html, index, callback) {
  10461. // 将html文件中需要用到的数据挂载到store上
  10462. const content = `<!DOCTYPE html>
  10463. <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'>
  10464. <head>
  10465. <!--[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]-->
  10466. <meta charset="UTF-8">
  10467. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10468. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10469. <title>${a}</title>
  10470. <style>
  10471. table {
  10472. border-collapse: collapse; /* 折叠边框 */
  10473. width: 100%;
  10474. }
  10475. th, td {
  10476. border: 1px solid black; /* 线条样式 */
  10477. padding: 8px;
  10478. text-align: left;
  10479. }
  10480. </style>
  10481. </head>
  10482. <body>
  10483. ${html}
  10484. </body>
  10485. </html>`;
  10486. const blob = htmlDocx.asBlob(content)
  10487. // debugger
  10488. let dname = a + ".docx";
  10489. // 创建文件流
  10490. // 创建bolb实例时,内容一定要放在[]中
  10491. // const blob = new Blob([content], {
  10492. // type: "text/plain;charset='utf-8'",
  10493. // });
  10494. // const file = new File([blob], dname, { type: 'application/msword' });
  10495. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10496. // let params = convertApi.createParams()
  10497. // params.add('file', file)
  10498. // try {
  10499. // let result = await convertApi.convert('docx', 'docx', params)
  10500. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10501. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10502. // });
  10503. // await this.beforeUploadHtml2(file, index, callback)
  10504. // } catch (error) {
  10505. // await this.beforeUploadHtml2(file, index, callback)
  10506. // return;
  10507. // }
  10508. await this.beforeUploadHtml2(file, index, callback)
  10509. },
  10510. beforeUploadHtml2(event, index, callback) {
  10511. var file = event;
  10512. var credentials = {
  10513. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10514. secretAccessKey: "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",
  10515. }; //秘钥形式的登录上传
  10516. window.AWS.config.update(credentials);
  10517. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10518. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10519. var _this = this;
  10520. if (file) {
  10521. var params = {
  10522. Key:
  10523. file.name.split(".")[0] +
  10524. new Date().getTime() +
  10525. "." +
  10526. file.name.split(".")[file.name.split(".").length - 1],
  10527. ContentType: file.type,
  10528. Body: file,
  10529. "Access-Control-Allow-Credentials": "*",
  10530. ACL: "public-read",
  10531. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10532. var options = {
  10533. partSize: 2048 * 1024 * 1024,
  10534. queueSize: 2,
  10535. leavePartsOnError: true,
  10536. };
  10537. bucket
  10538. .upload(params, options)
  10539. .on("httpUploadProgress", function (evt) {
  10540. //这里可以写进度条
  10541. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10542. })
  10543. .send(async function (err, data) {
  10544. if(_this.courseState == 5){
  10545. _this.loading = false
  10546. }
  10547. if (err) {
  10548. callback ? callback() : ''
  10549. _this.$message.error("上传失败");
  10550. } else {
  10551. let fileid = await _this.createFileid(data.Location)
  10552. // _this.cankaoInfoData.push({
  10553. //                   name: file.name,
  10554. //                   url: data.Location,
  10555. //                   type: 3,
  10556. // fileid: fileid,
  10557. //   })
  10558. _this.infoData2.push({
  10559.                   name: file.name,
  10560.                   url: data.Location,
  10561.                   type: 3,
  10562. fileid: fileid == 1 ? '' : fileid,
  10563.   })
  10564. _this.infoData.push({
  10565. name: file.name,
  10566. url: data.Location,
  10567. type: 3,
  10568. fileid: fileid == 1 ? '' : fileid,
  10569. });
  10570. console.log(data.Location);
  10571. callback ? callback() : ''
  10572. }
  10573. });
  10574. }
  10575. },
  10576. addSource() {
  10577. if (!Object.keys(this.sourceData).length) {
  10578. this.$message.error("请选择要上传的资源");
  10579. return;
  10580. }
  10581. let keys = Object.keys(this.sourceData);
  10582. for (var i = 0; i < keys.length; i++) {
  10583. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10584. this.lineCount
  10585. ].chapterData.unshift({
  10586. name: "链接",
  10587. title: this.sourceData[keys[i]].name,
  10588. url: this.sourceData[keys[i]].url,
  10589. type: 14,
  10590. id: keys[i],
  10591. });
  10592. }
  10593. this.$forceUpdate();
  10594. this.dialogVisibleSource = false;
  10595. },
  10596. updateSource() {
  10597. if (!Object.keys(this.sourceData).length) {
  10598. this.$message.error("请选择要上传的资源");
  10599. return;
  10600. }
  10601. let keys = Object.keys(this.sourceData);
  10602. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10603. this.taskCount
  10604. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  10605. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10606. this.taskCount
  10607. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  10608. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10609. this.taskCount
  10610. ].chapterData[this.lineCount].id = keys[0];
  10611. this.updateSourcePan = false;
  10612. this.$forceUpdate();
  10613. this.dialogVisibleSource = false;
  10614. },
  10615. deleteM(i, j) {
  10616. this.testJson.testJson[i].timuList.splice(j, 1);
  10617. },
  10618. beforeUploadTiMu(event, i) {
  10619. const loading = this.openLoading();
  10620. var file = event.target.files[0];
  10621. var credentials = {
  10622. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10623. secretAccessKey: "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",
  10624. }; //秘钥形式的登录上传
  10625. window.AWS.config.update(credentials);
  10626. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10627. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10628. var _this = this;
  10629. if (file) {
  10630. var params = {
  10631. Key:
  10632. file.name.split(".")[0] +
  10633. new Date().getTime() +
  10634. "." +
  10635. file.name.split(".")[file.name.split(".").length - 1],
  10636. ContentType: file.type,
  10637. Body: file,
  10638. "Access-Control-Allow-Credentials": "*",
  10639. ACL: "public-read",
  10640. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10641. var options = {
  10642. partSize: 2048 * 1024 * 1024,
  10643. queueSize: 2,
  10644. leavePartsOnError: true,
  10645. };
  10646. bucket
  10647. .upload(params, options)
  10648. .on("httpUploadProgress", function (evt) {
  10649. //这里可以写进度条
  10650. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10651. })
  10652. .send(function (err, data) {
  10653. loading.close();
  10654. if (err) {
  10655. _this.$message.error("上传失败");
  10656. } else {
  10657. if (_this.testJson.testJson[i].timuList) {
  10658. _this.testJson.testJson[i].timuList.push({
  10659. src: data.Location,
  10660. });
  10661. } else {
  10662. _this.testJson.testJson[i].timuList = [];
  10663. _this.testJson.testJson[i].timuList.push({
  10664. src: data.Location,
  10665. });
  10666. }
  10667. _this.imgChange3(i);
  10668. _this.$forceUpdate();
  10669. }
  10670. });
  10671. }
  10672. },
  10673. beforeUploadTi(event, i, j) {
  10674. const loading = this.openLoading();
  10675. var file = event.target.files[0];
  10676. var credentials = {
  10677. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10678. secretAccessKey: "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",
  10679. }; //秘钥形式的登录上传
  10680. window.AWS.config.update(credentials);
  10681. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10682. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10683. var _this = this;
  10684. if (file) {
  10685. var params = {
  10686. Key:
  10687. file.name.split(".")[0] +
  10688. new Date().getTime() +
  10689. "." +
  10690. file.name.split(".")[file.name.split(".").length - 1],
  10691. ContentType: file.type,
  10692. Body: file,
  10693. "Access-Control-Allow-Credentials": "*",
  10694. ACL: "public-read",
  10695. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10696. var options = {
  10697. partSize: 2048 * 1024 * 1024,
  10698. queueSize: 2,
  10699. leavePartsOnError: true,
  10700. };
  10701. bucket
  10702. .upload(params, options)
  10703. .on("httpUploadProgress", function (evt) {
  10704. //这里可以写进度条
  10705. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10706. })
  10707. .send(function (err, data) {
  10708. loading.close();
  10709. if (err) {
  10710. _this.$message.error("上传失败");
  10711. } else {
  10712. _this.testJson.testJson[i].checkList[j] = {};
  10713. _this.testJson.testJson[i].checkList[j].src = data.Location;
  10714. _this.testJson.testJson[i].checkList[j].imgType = 1;
  10715. _this.imgChange2(i, j);
  10716. _this.$forceUpdate();
  10717. }
  10718. });
  10719. }
  10720. },
  10721. beforeUpload1(event, type) {
  10722. // const loading = this.openLoading();
  10723. var file = event.target.files[0];
  10724. var credentials = {
  10725. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10726. secretAccessKey: "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",
  10727. }; //秘钥形式的登录上传
  10728. window.AWS.config.update(credentials);
  10729. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10730. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10731. var _this = this;
  10732. if (file) {
  10733. var params = {
  10734. Key:
  10735. file.name.split(".")[0] +
  10736. new Date().getTime() +
  10737. "." +
  10738. file.name.split(".")[file.name.split(".").length - 1],
  10739. ContentType: file.type,
  10740. Body: file,
  10741. "Access-Control-Allow-Credentials": "*",
  10742. ACL: "public-read",
  10743. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10744. var options = {
  10745. partSize: 2048 * 1024 * 1024,
  10746. queueSize: 2,
  10747. leavePartsOnError: true,
  10748. };
  10749. bucket
  10750. .upload(params, options)
  10751. .on("httpUploadProgress", function (evt) {
  10752. //这里可以写进度条
  10753. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10754. })
  10755. .send(function (err, data) {
  10756. // loading.close();
  10757. if (err) {
  10758. // var a = _this.$refs.upload1.uploadFiles;
  10759. // a.splice(a.length - 1, a.length);
  10760. _this.$message.error("上传失败");
  10761. } else {
  10762. // _this.cover.push({
  10763. // name: file.name,
  10764. // url: data.Location,
  10765. // uid: file.uid,
  10766. // });
  10767. _this.cover = [
  10768. {
  10769. name: file.name,
  10770. url: data.Location,
  10771. uid: file.uid,
  10772. },
  10773. ];
  10774. _this.imgChange1(null, null, 1, null);
  10775. _this.choosePicVisible = false;
  10776. console.log(data.Location);
  10777. }
  10778. });
  10779. }
  10780. },
  10781. beforeUploadSelect(event, type) {
  10782. // const loading = this.openLoading();
  10783. var file = event.target.files[0];
  10784. var credentials = {
  10785. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10786. secretAccessKey: "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",
  10787. }; //秘钥形式的登录上传
  10788. window.AWS.config.update(credentials);
  10789. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10790. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10791. var _this = this;
  10792. if (file) {
  10793. var params = {
  10794. Key:
  10795. file.name.split(".")[0] +
  10796. new Date().getTime() +
  10797. "." +
  10798. file.name.split(".")[file.name.split(".").length - 1],
  10799. ContentType: file.type,
  10800. Body: file,
  10801. "Access-Control-Allow-Credentials": "*",
  10802. ACL: "public-read",
  10803. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10804. var options = {
  10805. partSize: 2048 * 1024 * 1024,
  10806. queueSize: 2,
  10807. leavePartsOnError: true,
  10808. };
  10809. bucket
  10810. .upload(params, options)
  10811. .on("httpUploadProgress", function (evt) {
  10812. //这里可以写进度条
  10813. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10814. })
  10815. .send(function (err, data) {
  10816. // loading.close();
  10817. if (err) {
  10818. _this.$message.error("上传失败");
  10819. } else {
  10820. _this.selectJson.url = data.Location;
  10821. console.log(data.Location);
  10822. }
  10823. });
  10824. }
  10825. },
  10826. chooseSysPic(p) {
  10827. this.cover = [];
  10828. setTimeout(() => {
  10829. this.cover[0] = {
  10830. name: "系统图片.png",
  10831. url: p,
  10832. };
  10833. this.imgChange1(null, null, 1, null);
  10834. this.$forceUpdate();
  10835. }, 0);
  10836. this.isSysPic = true;
  10837. this.isSysPic2 = false;
  10838. this.sysPicVisible = false;
  10839. this.$forceUpdate();
  10840. },
  10841. chooseSysPic2(p) {
  10842. this.cover = [];
  10843. setTimeout(() => {
  10844. this.cover[0] = {
  10845. name: "网络图片.png",
  10846. url: p,
  10847. };
  10848. this.imgChange1(null, null, 1, null);
  10849. this.$forceUpdate();
  10850. }, 0);
  10851. this.isSysPic2 = true;
  10852. this.isSysPic = false;
  10853. this.sysPicVisible2 = false;
  10854. this.$forceUpdate();
  10855. },
  10856. beforeUpload(data) {
  10857. this.$refs.upload1.uploadFiles;
  10858. this.uploadLoading1 = true;
  10859. var file = data.file;
  10860. var credentials = {
  10861. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10862. secretAccessKey: "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",
  10863. }; //秘钥形式的登录上传
  10864. window.AWS.config.update(credentials);
  10865. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10866. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10867. var _this = this;
  10868. if (file) {
  10869. var params = {
  10870. Key:
  10871. file.name.split(".")[0] +
  10872. new Date().getTime() +
  10873. "." +
  10874. file.name.split(".")[file.name.split(".").length - 1],
  10875. ContentType: file.type,
  10876. Body: file,
  10877. "Access-Control-Allow-Credentials": "*",
  10878. ACL: "public-read",
  10879. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10880. var options = {
  10881. partSize: 2048 * 1024 * 1024,
  10882. queueSize: 2,
  10883. leavePartsOnError: true,
  10884. };
  10885. bucket
  10886. .upload(params, options)
  10887. .on("httpUploadProgress", function (evt) {
  10888. //这里可以写进度条
  10889. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10890. })
  10891. .send(function (err, data) {
  10892. _this.uploadLoading1 = false;
  10893. if (err) {
  10894. // var a = _this.$refs.upload1.uploadFiles;
  10895. // a.splice(a.length - 1, a.length);
  10896. _this.$message.error("上传失败");
  10897. } else {
  10898. //上传成功处理
  10899. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  10900. name: file.name,
  10901. url: data.Location,
  10902. uid: file.uid,
  10903. });
  10904. _this.imgChange();
  10905. console.log(data.Location);
  10906. }
  10907. });
  10908. }
  10909. },
  10910. onExceed() {
  10911. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  10912. },
  10913. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  10914. let file = "";
  10915. let cfindex2 = 0;
  10916. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10917. // var file = event.target.files[0];
  10918. file = event.target.files[cfindex];
  10919. let fileName = file.name
  10920. let fileUid = file.uid
  10921. // const loading = this.openLoading();
  10922. // var file = event.target.files[0];
  10923. var credentials = {
  10924. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10925. secretAccessKey: "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",
  10926. }; //秘钥形式的登录上传
  10927. window.AWS.config.update(credentials);
  10928. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10929. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10930. var _this = this;
  10931. if (type == 3) {
  10932. var b = [
  10933. "DOC",
  10934. "DOCX",
  10935. "DOCM",
  10936. "DOTM",
  10937. "DOTX",
  10938. "PPTX",
  10939. "PPSX",
  10940. "PPT",
  10941. "PPS",
  10942. "PPTM",
  10943. "POTM",
  10944. "PPAM",
  10945. "POTX",
  10946. "PPSM",
  10947. ];
  10948. if (
  10949. b.indexOf(
  10950. file.name
  10951. .split(".")
  10952. [file.name.split(".").length - 1].toLocaleUpperCase()
  10953. ) != -1
  10954. ) {
  10955. if (file.size / 1024 / 1024 > 80) {
  10956. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10957. this.inputShow = true;
  10958. // var a = _this.$refs.upload1.uploadFiles;
  10959. // a.splice(a.length - 1, a.length);
  10960. // loading.close();
  10961. return;
  10962. }
  10963. } else if (
  10964. file.name
  10965. .split(".")
  10966. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10967. ) {
  10968. if (file.size / 1024 / 1024 > 80) {
  10969. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10970. this.inputShow = true;
  10971. // var a = _this.$refs.upload1.uploadFiles;
  10972. // a.splice(a.length - 1, a.length);
  10973. // loading.close();
  10974. return;
  10975. }
  10976. }
  10977. }
  10978. this.inputShow = false;
  10979. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10980. // itemTaskIndex
  10981. // ].progress = 0;
  10982. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10983. itemTaskIndex
  10984. ].proVisible = true;
  10985. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10986. itemTaskIndex
  10987. ].isFinishSize = 0;
  10988. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10989. itemTaskIndex
  10990. ].isAllSize = event.target.files.length;
  10991. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10992. // itemTaskIndex
  10993. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10994. _this.$forceUpdate();
  10995. if (file) {
  10996. var params = {
  10997. Key:
  10998. file.name.split(".")[0] +
  10999. new Date().getTime() +
  11000. "." +
  11001. file.name.split(".")[file.name.split(".").length - 1],
  11002. ContentType: file.type,
  11003. Body: file,
  11004. "Access-Control-Allow-Credentials": "*",
  11005. ACL: "public-read",
  11006. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11007. var options = {
  11008. partSize: 2048 * 1024 * 1024,
  11009. queueSize: 2,
  11010. leavePartsOnError: true,
  11011. };
  11012. bucket
  11013. .upload(params, options)
  11014. .on("httpUploadProgress", function (evt) {
  11015. //这里可以写进度条
  11016. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11017. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11018. // itemTaskIndex
  11019. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  11020. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11021. // itemTaskIndex
  11022. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11023. // _this.$forceUpdate();
  11024. })
  11025. .send(function (err, data) {
  11026. cfindex2++
  11027. // loading.close();
  11028. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11029. // itemTaskIndex
  11030. // ].progress = 100;
  11031. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11032. itemTaskIndex
  11033. ].isFinishSize = cfindex2
  11034. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11035. // itemTaskIndex
  11036. // ].isAllSize;
  11037. _this.$forceUpdate();
  11038. setTimeout(() => {
  11039. if (
  11040. cfindex2 == event.target.files.length ||
  11041. cfindex2 > event.target.files.length
  11042. ) {
  11043. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11044. itemTaskIndex
  11045. ].proVisible = false;
  11046. }
  11047. _this.$forceUpdate();
  11048. }, 1000);
  11049. _this.inputShow = true;
  11050. if (err) {
  11051. // var a = _this.$refs.upload1.uploadFiles;
  11052. // a.splice(a.length - 1, a.length);
  11053. _this.$message.error("上传失败");
  11054. } else {
  11055. if (type == 13) {
  11056. let _type = 2;
  11057. var imgA = [
  11058. "png",
  11059. "jpg",
  11060. "jpeg",
  11061. "bmp",
  11062. "gif",
  11063. "webp",
  11064. "psd",
  11065. "svg",
  11066. "tiff",
  11067. ];
  11068. var fileA = [
  11069. "PDF",
  11070. "DOC",
  11071. "DOCX",
  11072. "DOCM",
  11073. "DOTM",
  11074. "DOTX",
  11075. "PPTX",
  11076. "PPSX",
  11077. "PPT",
  11078. "PPS",
  11079. "PPTM",
  11080. "POTM",
  11081. "PPAM",
  11082. "POTX",
  11083. "PPSM",
  11084. "XLSX",
  11085. "XLS",
  11086. ];
  11087. var videoA = [
  11088. "AVI",
  11089. "NAVI",
  11090. "MPEG",
  11091. "ASF",
  11092. "MOV",
  11093. "WMV",
  11094. "3GP",
  11095. "RM",
  11096. "RMVB",
  11097. "FLV",
  11098. "F4V",
  11099. "H.264",
  11100. "H.265",
  11101. "REAL VIDEO",
  11102. "MKV",
  11103. "WebM",
  11104. "HDDVD",
  11105. "MP4",
  11106. "MPG",
  11107. "M4V",
  11108. "MGV",
  11109. "OGV",
  11110. "QTM",
  11111. "STR",
  11112. "AMC",
  11113. "DVX",
  11114. "EVO",
  11115. "DAT",
  11116. "OGG",
  11117. "OGM",
  11118. ];
  11119. if (
  11120. fileA.indexOf(
  11121. data.Location.split(".")[
  11122. data.Location.split(".").length - 1
  11123. ].toLocaleUpperCase()
  11124. ) != -1
  11125. ) {
  11126. _type = 3;
  11127. } else if (
  11128. videoA.indexOf(
  11129. data.Location.split(".")[
  11130. data.Location.split(".").length - 1
  11131. ].toLocaleUpperCase()
  11132. ) != -1
  11133. ) {
  11134. _type = 2;
  11135. } else if (
  11136. imgA.indexOf(
  11137. data.Location.split(".")[
  11138. data.Location.split(".").length - 1
  11139. ].toLocaleLowerCase()
  11140. ) != -1
  11141. ) {
  11142. _type = 13;
  11143. } else {
  11144. _type = 12;
  11145. }
  11146. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11147. itemTaskIndex
  11148. ].chapterData.unshift({
  11149. name: fileName,
  11150. url: data.Location,
  11151. uid: fileUid,
  11152. type: _type,
  11153. });
  11154. _this.imgChange1(null, null, _type, itemTaskIndex);
  11155. } else if (type == 2 || type == 3 || type == 12) {
  11156. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11157. itemTaskIndex
  11158. ].chapterData.unshift({
  11159. name: fileName,
  11160. url: data.Location,
  11161. uid: fileUid,
  11162. type: type,
  11163. });
  11164. _this.imgChange1(null, null, type, itemTaskIndex);
  11165. } else if (type == 4) {
  11166. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11167. itemTaskIndex
  11168. ].fileList1.push({
  11169. name: fileName,
  11170. url: data.Location,
  11171. uid: fileUid,
  11172. });
  11173. _this.imgChange1(null, null, type, itemTaskIndex);
  11174. } else if (type == 5) {
  11175. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11176. itemTaskIndex
  11177. ].homeworkList.push({
  11178. name: fileName,
  11179. url: data.Location,
  11180. uid: fileUid,
  11181. });
  11182. _this.imgChange1(null, null, type, itemTaskIndex);
  11183. }
  11184. console.log(data.Location);
  11185. }
  11186. });
  11187. }
  11188. }
  11189. },
  11190. async beforeUploadInfo2(event, type, tindex) {
  11191. // const loading = this.openLoading();
  11192. let file = "";
  11193. let cfindex2 = 0;
  11194. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  11195. // var file = event.target.files[0];
  11196. file = event.target.files[cfindex];
  11197. let fileName = file.name
  11198. let fileUid = file.uid
  11199. var credentials = {
  11200. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11201. secretAccessKey: "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",
  11202. }; //秘钥形式的登录上传
  11203. window.AWS.config.update(credentials);
  11204. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11205. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11206. var _this = this;
  11207. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  11208. if (
  11209. xianObj.indexOf(
  11210. file.name
  11211. .split(".")
  11212. [file.name.split(".").length - 1].toLocaleUpperCase()
  11213. ) == -1
  11214. ) {
  11215. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  11216. this.inputShow = true;
  11217. // var a = _this.$refs.upload1.uploadFiles;
  11218. // a.splice(a.length - 1, a.length);
  11219. // loading.close();
  11220. return;
  11221. }
  11222. // if (
  11223. // ['DOC'].indexOf(
  11224. // file.name
  11225. // .split(".")
  11226. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11227. // ) !== -1
  11228. // ) {
  11229. // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11230. // this.inputShow = true;
  11231. // return;
  11232. // }
  11233. if (type == 3) {
  11234. var b = [
  11235. "DOC",
  11236. "DOCX",
  11237. "DOCM",
  11238. "DOTM",
  11239. "DOTX",
  11240. "PPTX",
  11241. "PPSX",
  11242. "PPT",
  11243. "PPS",
  11244. "PPTM",
  11245. "POTM",
  11246. "PPAM",
  11247. "POTX",
  11248. "PPSM",
  11249. ];
  11250. if (
  11251. b.indexOf(
  11252. file.name
  11253. .split(".")
  11254. [file.name.split(".").length - 1].toLocaleUpperCase()
  11255. ) != -1
  11256. ) {
  11257. if (file.size / 1024 / 1024 > 80) {
  11258. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11259. this.inputShow = true;
  11260. // var a = _this.$refs.upload1.uploadFiles;
  11261. // a.splice(a.length - 1, a.length);
  11262. // loading.close();
  11263. return;
  11264. }
  11265. } else if (
  11266. file.name
  11267. .split(".")
  11268. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11269. ) {
  11270. if (file.size / 1024 / 1024 > 80) {
  11271. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11272. this.inputShow = true;
  11273. // var a = _this.$refs.upload1.uploadFiles;
  11274. // a.splice(a.length - 1, a.length);
  11275. // loading.close();
  11276. return;
  11277. }
  11278. }
  11279. }
  11280. this.inputShow = false;
  11281. if(type == 14){
  11282. // _this.teacherinfoprogress = 0;
  11283. _this.teacherinfoproVisible = true;
  11284. _this.teacherinfoisFinishSize = 0;
  11285. _this.teacherinfoisAllSize = event.target.files.length;
  11286. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  11287. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11288. }else if(type == 16){
  11289. _this.mubiaoinfoprogress = 0;
  11290. _this.mubiaoinfoproVisible = true;
  11291. _this.mubiaoinfoisFinishSize = 0;
  11292. _this.mubiaoinfoisAllSize = event.target.files.length;
  11293. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  11294. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11295. }else if(type == 17){
  11296. _this.xuanzeinfoprogress = 0;
  11297. _this.xuanzeinfoproVisible = true;
  11298. _this.xuanzeinfoisFinishSize = 0;
  11299. _this.xuanzeinfoisAllSize = event.target.files.length;
  11300. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11301. }else if(type == 18){
  11302. _this.pingjiainfoprogress[tindex] = 0;
  11303. _this.pingjiainfoproVisible[tindex] = true;
  11304. _this.pingjiainfoisFinishSize[tindex] = 0;
  11305. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  11306. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  11307. }else if(type == 19){
  11308. _this.knowinfoprogress = 0;
  11309. _this.knowinfoproVisible = true;
  11310. _this.knowinfoisFinishSize = 0;
  11311. _this.knowinfoisAllSize = event.target.files.length;
  11312. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11313. }else if(type == 20){
  11314. _this.knowinfoprogress2 = 0;
  11315. _this.knowinfoproVisible2 = true;
  11316. _this.knowinfoisFinishSize2 = 0;
  11317. _this.knowinfoisAllSize2 = event.target.files.length;
  11318. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11319. }else{
  11320. _this.infoprogress = 0;
  11321. _this.infoproVisible = true;
  11322. _this.infoisFinishSize = 0;
  11323. _this.infoisAllSize = event.target.files.length;
  11324. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11325. }
  11326. // if (
  11327. // ['DOC'].indexOf(
  11328. // file.name
  11329. // .split(".")
  11330. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11331. // ) !== -1
  11332. // ) {
  11333. // // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11334. // // this.inputShow = true;
  11335. // let params = convertApi.createParams()
  11336. // params.add('file', file)
  11337. // try {
  11338. // let result = await convertApi.convert('doc', 'docx', params);
  11339. // // Get result file URL
  11340. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  11341. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  11342. // });
  11343. // console.log(result)
  11344. // console.log(file)
  11345. // } catch (error) {
  11346. // cfindex2++;
  11347. // if(type == 14){
  11348. // _this.teacherinfoisFinishSize = cfindex2;
  11349. // }else if(type == 16){
  11350. // _this.mubiaoinfoisFinishSize = cfindex2;
  11351. // }else if(type == 17){
  11352. // _this.xuanzeinfoisFinishSize = cfindex2;
  11353. // }else if(type == 18){
  11354. // _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11355. // }else if(type == 19){
  11356. // _this.knowinfoisFinishSize = cfindex2;
  11357. // }else if(type == 20){
  11358. // _this.knowinfoisFinishSize2 = cfindex2;
  11359. // }else {
  11360. // _this.infoisFinishSize = cfindex2;
  11361. // }
  11362. // setTimeout(() => {
  11363. // if (
  11364. // cfindex2 == event.target.files.length ||
  11365. // cfindex2 > event.target.files.length
  11366. // ) {
  11367. // if(type == 14){
  11368. // _this.teacherinfoproVisible = false;
  11369. // }else if(type == 16){
  11370. // _this.mubiaoinfoproVisible = false;
  11371. // }else if(type == 17){
  11372. // _this.xuanzeinfoproVisible = false;
  11373. // }else if(type == 18){
  11374. // _this.pingjiainfoproVisible[tindex] = false;
  11375. // }else if(type == 19){
  11376. // _this.knowinfoproVisible = false;
  11377. // }else if(type == 20){
  11378. // _this.knowinfoproVisible2 = false;
  11379. // }else{
  11380. // _this.infoproVisible = false;
  11381. // }
  11382. // }
  11383. // _this.$forceUpdate();
  11384. // }, 1000);
  11385. // _this.inputShow = true;
  11386. // _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11387. // // 捕捉到这个convertApi.convert报错就不要往下走了
  11388. // return; // 直接返回,不继续执行后续代码
  11389. // }
  11390. // // return;
  11391. // }
  11392. _this.$forceUpdate();
  11393. if (file) {
  11394. var params = {
  11395. Key:
  11396. file.name.split(".")[0] +
  11397. new Date().getTime() +
  11398. "." +
  11399. file.name.split(".")[file.name.split(".").length - 1],
  11400. ContentType: file.type,
  11401. Body: file,
  11402. "Access-Control-Allow-Credentials": "*",
  11403. ACL: "public-read",
  11404. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11405. var options = {
  11406. partSize: 2048 * 1024 * 1024,
  11407. queueSize: 2,
  11408. leavePartsOnError: true,
  11409. };
  11410. bucket
  11411. .upload(params, options)
  11412. .on("httpUploadProgress", function (evt) {
  11413. //这里可以写进度条
  11414. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11415. // if(type == 14){
  11416. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11417. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11418. // }else if(type == 16){
  11419. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11420. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11421. // }else if(type == 17){
  11422. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11423. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11424. // }else if(type == 18){
  11425. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  11426. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  11427. // }else {
  11428. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  11429. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11430. // }
  11431. _this.$forceUpdate();
  11432. })
  11433. .send(async function (err, data) {
  11434. // loading.close();
  11435. // if(type == 14){
  11436. // _this.teacherinfoprogress = 100;
  11437. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  11438. // }else if(type == 16){
  11439. // _this.mubiaoinfoprogress = 100;
  11440. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  11441. // }else if(type == 17){
  11442. // _this.xuanzeinfoprogress = 100;
  11443. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  11444. // }else if(type == 18){
  11445. // _this.pingjiainfoprogress[tindex] = 100;
  11446. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  11447. // }else {
  11448. // _this.infoprogress = 100;
  11449. // _this.infoisFinishSize = _this.infoisAllSize;
  11450. // }
  11451. _this.$forceUpdate();
  11452. _this.inputShow = true;
  11453. if (err) {
  11454. cfindex2++;
  11455. if(type == 14){
  11456. _this.teacherinfoisFinishSize = cfindex2;
  11457. }else if(type == 16){
  11458. _this.mubiaoinfoisFinishSize = cfindex2;
  11459. }else if(type == 17){
  11460. _this.xuanzeinfoisFinishSize = cfindex2;
  11461. }else if(type == 18){
  11462. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11463. }else if(type == 19){
  11464. _this.knowinfoisFinishSize = cfindex2;
  11465. }else if(type == 20){
  11466. _this.knowinfoisFinishSize2 = cfindex2;
  11467. }else {
  11468. _this.infoisFinishSize = cfindex2;
  11469. }
  11470. setTimeout(() => {
  11471. if (
  11472. cfindex2 == event.target.files.length ||
  11473. cfindex2 > event.target.files.length
  11474. ) {
  11475. if(type == 14){
  11476. _this.teacherinfoproVisible = false;
  11477. }else if(type == 16){
  11478. _this.mubiaoinfoproVisible = false;
  11479. }else if(type == 17){
  11480. _this.xuanzeinfoproVisible = false;
  11481. }else if(type == 18){
  11482. _this.pingjiainfoproVisible[tindex] = false;
  11483. }else if(type == 19){
  11484. _this.knowinfoproVisible = false;
  11485. }else if(type == 20){
  11486. _this.knowinfoproVisible2 = false;
  11487. }else{
  11488. _this.infoproVisible = false;
  11489. }
  11490. }
  11491. _this.$forceUpdate();
  11492. }, 1000);
  11493. // var a = _this.$refs.upload1.uploadFiles;
  11494. // a.splice(a.length - 1, a.length);
  11495. _this.$message.error("上传失败");
  11496. } else {
  11497. let fileid = await _this.createFileid(data.Location)
  11498. if(fileid){
  11499. cfindex2++;
  11500. if(type == 14){
  11501. _this.teacherinfoisFinishSize = cfindex2;
  11502. }else if(type == 16){
  11503. _this.mubiaoinfoisFinishSize = cfindex2;
  11504. }else if(type == 17){
  11505. _this.xuanzeinfoisFinishSize = cfindex2;
  11506. }else if(type == 18){
  11507. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11508. }else if(type == 19){
  11509. _this.knowinfoisFinishSize = cfindex2;
  11510. }else if(type == 20){
  11511. _this.knowinfoisFinishSize2 = cfindex2;
  11512. }else {
  11513. _this.infoisFinishSize = cfindex2;
  11514. }
  11515. if (
  11516. cfindex2 == event.target.files.length ||
  11517. cfindex2 > event.target.files.length
  11518. ) {
  11519. if(type == 14){
  11520. _this.teacherinfoproVisible = false;
  11521. }else if(type == 16){
  11522. _this.mubiaoinfoproVisible = false;
  11523. }else if(type == 17){
  11524. _this.xuanzeinfoproVisible = false;
  11525. }else if(type == 18){
  11526. _this.pingjiainfoproVisible[tindex] = false;
  11527. }else if(type == 19){
  11528. _this.knowinfoproVisible = false;
  11529. }else if(type == 20){
  11530. _this.knowinfoproVisible2 = false;
  11531. }else{
  11532. _this.infoproVisible = false;
  11533. }
  11534. }
  11535. _this.$forceUpdate();
  11536. }
  11537. if(fileid == 1){
  11538. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  11539. return;
  11540. }
  11541. var imgA = [
  11542. "png",
  11543. "jpg",
  11544. "jpeg",
  11545. "bmp",
  11546. "gif",
  11547. "webp",
  11548. "psd",
  11549. "svg",
  11550. "tiff",
  11551. ];
  11552. var fileA = [
  11553. "PDF",
  11554. "DOC",
  11555. "DOCX",
  11556. "DOCM",
  11557. "DOTM",
  11558. "DOTX",
  11559. "PPTX",
  11560. "PPSX",
  11561. "PPT",
  11562. "PPS",
  11563. "PPTM",
  11564. "POTM",
  11565. "PPAM",
  11566. "POTX",
  11567. "PPSM",
  11568. "XLSX",
  11569. "XLS",
  11570. ];
  11571. var videoA = [
  11572. "AVI",
  11573. "NAVI",
  11574. "MPEG",
  11575. "ASF",
  11576. "MOV",
  11577. "WMV",
  11578. "3GP",
  11579. "RM",
  11580. "RMVB",
  11581. "FLV",
  11582. "F4V",
  11583. "H.264",
  11584. "H.265",
  11585. "REAL VIDEO",
  11586. "MKV",
  11587. "WebM",
  11588. "HDDVD",
  11589. "MP4",
  11590. "MPG",
  11591. "M4V",
  11592. "MGV",
  11593. "OGV",
  11594. "QTM",
  11595. "STR",
  11596. "AMC",
  11597. "DVX",
  11598. "EVO",
  11599. "DAT",
  11600. "OGG",
  11601. "OGM",
  11602. ];
  11603. let _type = 2;
  11604. if (
  11605. fileA.indexOf(
  11606. data.Location.split(".")[
  11607. data.Location.split(".").length - 1
  11608. ].toLocaleUpperCase()
  11609. ) != -1
  11610. ) {
  11611. _type = 3;
  11612. } else if (
  11613. videoA.indexOf(
  11614. data.Location.split(".")[
  11615. data.Location.split(".").length - 1
  11616. ].toLocaleUpperCase()
  11617. ) != -1
  11618. ) {
  11619. _type = 2;
  11620. } else if (
  11621. imgA.indexOf(
  11622. data.Location.split(".")[
  11623. data.Location.split(".").length - 1
  11624. ].toLocaleLowerCase()
  11625. ) != -1
  11626. ) {
  11627. _type = 13;
  11628. } else {
  11629. _type = 12;
  11630. }
  11631. if (type == 13) {
  11632. _this.infoData.push({
  11633. name: fileName,
  11634. url: data.Location,
  11635. uid: fileUid,
  11636. type: _type,
  11637. fileid: fileid == 1 ? '' : fileid,
  11638. });
  11639. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11640. name: fileName,
  11641. url: data.Location,
  11642. uid: fileUid,
  11643. type: _type,
  11644. fileid: fileid == 1 ? '' : fileid,
  11645. })
  11646. }else if (type == 14) {
  11647. _this.teacherInfoData.push({
  11648. name: fileName,
  11649. url: data.Location,
  11650. uid: fileUid,
  11651. type: _type,
  11652. fileid: fileid == 1 ? '' : fileid,
  11653. });
  11654. _this.infoData2.push({
  11655. name: fileName,
  11656. url: data.Location,
  11657. uid: fileUid,
  11658. type: _type,
  11659. fileid: fileid == 1 ? '' : fileid,
  11660. });
  11661. _this.infoData.push({
  11662. name: fileName,
  11663. url: data.Location,
  11664. uid: fileUid,
  11665. type: _type,
  11666. fileid: fileid == 1 ? '' : fileid,
  11667. });
  11668. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11669. name: fileName,
  11670. url: data.Location,
  11671. uid: fileUid,
  11672. type: _type,
  11673. fileid: fileid == 1 ? '' : fileid,
  11674. })
  11675. }else if (type == 15) {
  11676. _this.infoData2.push({
  11677. name: fileName,
  11678. url: data.Location,
  11679. uid: fileUid,
  11680. type: _type,
  11681. fileid: fileid == 1 ? '' : fileid,
  11682. });
  11683. _this.infoData.push({
  11684. name: fileName,
  11685. url: data.Location,
  11686. uid: fileUid,
  11687. type: _type,
  11688. fileid: fileid == 1 ? '' : fileid,
  11689. });
  11690. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11691. name: fileName,
  11692. url: data.Location,
  11693. uid: fileUid,
  11694. type: _type,
  11695. fileid: fileid == 1 ? '' : fileid,
  11696. })
  11697. }else if (type == 16) {
  11698. _this.mubiaoInfoData.push({
  11699. name: fileName,
  11700. url: data.Location,
  11701. uid: fileUid,
  11702. type: _type,
  11703. fileid: fileid == 1 ? '' : fileid,
  11704. });
  11705. }else if (type == 17) {
  11706. _this.xuanzeInfoData.push({
  11707. name: fileName,
  11708. url: data.Location,
  11709. uid: fileUid,
  11710. type: _type,
  11711. fileid: fileid == 1 ? '' : fileid,
  11712. });
  11713. }else if (type == 18) {
  11714. if(!_this.pingjiaInfoData[tindex]){
  11715. _this.pingjiaInfoData[tindex] = []
  11716. }
  11717. _this.pingjiaInfoData[tindex].push({
  11718. name: fileName,
  11719. url: data.Location,
  11720. uid: fileUid,
  11721. type: _type,
  11722. fileid: fileid == 1 ? '' : fileid,
  11723. });
  11724. }else if (type == 19) {
  11725. _this.knowInfoData.push({
  11726. name: fileName,
  11727. url: data.Location,
  11728. uid: fileUid,
  11729. type: _type,
  11730. fileid: fileid == 1 ? '' : fileid,
  11731. });
  11732. if(fileid != 1){
  11733. _this.knowFileids.push(fileid)
  11734. }
  11735. }else if (type == 20) {
  11736. _this.knowInfoData2.push({
  11737. name: fileName,
  11738. url: data.Location,
  11739. uid: fileUid,
  11740. type: _type,
  11741. fileid: fileid == 1 ? '' : fileid,
  11742. });
  11743. if(fileid != 1){
  11744. _this.knowFileids2.push(fileid)
  11745. }
  11746. }
  11747. console.log(data.Location);
  11748. console.log(fileName,'----------',fileid);
  11749. }
  11750. });
  11751. }
  11752. }
  11753. },
  11754. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  11755. // const loading = this.openLoading();
  11756. var file = event.target.files[0];
  11757. var credentials = {
  11758. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11759. secretAccessKey: "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",
  11760. }; //秘钥形式的登录上传
  11761. window.AWS.config.update(credentials);
  11762. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11763. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11764. var _this = this;
  11765. if (type == 3) {
  11766. var b = [
  11767. "DOC",
  11768. "DOCX",
  11769. "DOCM",
  11770. "DOTM",
  11771. "DOTX",
  11772. "PPTX",
  11773. "PPSX",
  11774. "PPT",
  11775. "PPS",
  11776. "PPTM",
  11777. "POTM",
  11778. "PPAM",
  11779. "POTX",
  11780. "PPSM",
  11781. ];
  11782. if (
  11783. b.indexOf(
  11784. file.name
  11785. .split(".")
  11786. [file.name.split(".").length - 1].toLocaleUpperCase()
  11787. ) != -1
  11788. ) {
  11789. if (file.size / 1024 / 1024 > 80) {
  11790. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11791. this.inputShow = true;
  11792. // var a = _this.$refs.upload1.uploadFiles;
  11793. // a.splice(a.length - 1, a.length);
  11794. // loading.close();
  11795. return;
  11796. }
  11797. } else if (
  11798. file.name
  11799. .split(".")
  11800. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11801. ) {
  11802. if (file.size / 1024 / 1024 > 80) {
  11803. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11804. this.inputShow = true;
  11805. // var a = _this.$refs.upload1.uploadFiles;
  11806. // a.splice(a.length - 1, a.length);
  11807. // loading.close();
  11808. return;
  11809. }
  11810. }
  11811. }
  11812. this.inputShow = false;
  11813. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11814. itemTaskIndex
  11815. ].progress = 0;
  11816. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11817. itemTaskIndex
  11818. ].proVisible = true;
  11819. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11820. itemTaskIndex
  11821. ].isFinishSize = 0;
  11822. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11823. itemTaskIndex
  11824. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11825. _this.$forceUpdate();
  11826. if (file) {
  11827. var params = {
  11828. Key:
  11829. file.name.split(".")[0] +
  11830. new Date().getTime() +
  11831. "." +
  11832. file.name.split(".")[file.name.split(".").length - 1],
  11833. ContentType: file.type,
  11834. Body: file,
  11835. "Access-Control-Allow-Credentials": "*",
  11836. ACL: "public-read",
  11837. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11838. var options = {
  11839. partSize: 2048 * 1024 * 1024,
  11840. queueSize: 2,
  11841. leavePartsOnError: true,
  11842. };
  11843. bucket
  11844. .upload(params, options)
  11845. .on("httpUploadProgress", function (evt) {
  11846. //这里可以写进度条
  11847. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11848. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11849. itemTaskIndex
  11850. ].progress = parseInt((evt.loaded / evt.total) * 100);
  11851. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11852. itemTaskIndex
  11853. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11854. _this.$forceUpdate();
  11855. })
  11856. .send(function (err, data) {
  11857. // loading.close();
  11858. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11859. itemTaskIndex
  11860. ].progress = 100;
  11861. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11862. itemTaskIndex
  11863. ].isFinishSize =
  11864. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11865. itemTaskIndex
  11866. ].isAllSize;
  11867. _this.$forceUpdate();
  11868. setTimeout(() => {
  11869. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11870. itemTaskIndex
  11871. ].proVisible = false;
  11872. _this.$forceUpdate();
  11873. }, 1000);
  11874. _this.inputShow = true;
  11875. if (err) {
  11876. // var a = _this.$refs.upload1.uploadFiles;
  11877. // a.splice(a.length - 1, a.length);
  11878. _this.$message.error("上传失败");
  11879. } else {
  11880. if (type == 2 || type == 3) {
  11881. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11882. itemTaskIndex
  11883. ].chapterData.unshift({
  11884. name: file.name,
  11885. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11886. // itemTaskIndex
  11887. // ].chapterData.length+1),
  11888. url: data.Location,
  11889. uid: file.uid,
  11890. type: type,
  11891. text: string,
  11892. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11893. // itemTaskIndex
  11894. // ].chapterData.length + 1),
  11895. });
  11896. _this.imgChange1(null, null, type, itemTaskIndex);
  11897. } else if (type == 4) {
  11898. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11899. itemTaskIndex
  11900. ].fileList1.push({
  11901. name: file.name,
  11902. url: data.Location,
  11903. uid: file.uid,
  11904. });
  11905. _this.imgChange1(null, null, type, itemTaskIndex);
  11906. } else if (type == 5) {
  11907. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11908. itemTaskIndex
  11909. ].homeworkList.push({
  11910. name: file.name,
  11911. url: data.Location,
  11912. uid: file.uid,
  11913. });
  11914. _this.imgChange1(null, null, type, itemTaskIndex);
  11915. }
  11916. console.log(data.Location);
  11917. }
  11918. });
  11919. }
  11920. },
  11921. addunit() {
  11922. this.unitJson.push({
  11923. dyName: "", //单元标题
  11924. isUpdate: 1,
  11925. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  11926. chapterInfo: [
  11927. {
  11928. isread: false,
  11929. chapterid: this.guid(),
  11930. title: "",
  11931. courseName: "",
  11932. taskJson: [
  11933. {
  11934. task: "",
  11935. taskDetail: "",
  11936. chapterData: [],
  11937. toolText: "",
  11938. toolChoose: [
  11939. {
  11940. tool: [],
  11941. toolDetail: "",
  11942. toolType: 0,
  11943. askCount: 1,
  11944. askTitle: "",
  11945. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11946. },
  11947. ],
  11948. isShowTools: false,
  11949. askCount: 1,
  11950. isFold: 1,
  11951. askTitle: "",
  11952. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11953. checkJson: [{ checkCount: [], checkPerent: [] }],
  11954. homeworkList: [],
  11955. },
  11956. ],
  11957. itemCount: 1,
  11958. fileList1: [],
  11959. video: [],
  11960. testData: [],
  11961. pData: [],
  11962. templateArray: [],
  11963. },
  11964. ],
  11965. });
  11966. this.addindex = this.unitJson.length - 1;
  11967. setTimeout(() => {
  11968. this.unitIndex = this.unitJson.length - 1;
  11969. setTimeout(() => {
  11970. console.log(this.$refs.dyInput);
  11971. this.$refs.dyInput[0].focus();
  11972. }, 100);
  11973. this.unitSet(this.unitIndex);
  11974. }, 0);
  11975. },
  11976. addToolFun(itemTaskIndex) {
  11977. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11978. itemTaskIndex
  11979. ].toolChoose.push({
  11980. tool: [],
  11981. toolDetail: "",
  11982. toolType: 0,
  11983. askCount: 1,
  11984. askTitle: "",
  11985. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11986. });
  11987. },
  11988. addTaskBorder() {
  11989. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  11990. task: "",
  11991. taskDetail: "",
  11992. chapterData: [],
  11993. toolText: "",
  11994. toolChoose: [
  11995. {
  11996. tool: [],
  11997. toolDetail: "",
  11998. toolType: 0,
  11999. askCount: 1,
  12000. askTitle: "",
  12001. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12002. },
  12003. ],
  12004. isShowTools: false,
  12005. askCount: 1,
  12006. isFold: 1, //任务收起状态
  12007. askTitle: "",
  12008. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12009. checkJson: [{ checkCount: [], checkPerent: [] }],
  12010. homeworkList: [],
  12011. });
  12012. setTimeout(() => {
  12013. this.checkEva(this.checkId);
  12014. setTimeout(() => {
  12015. this.checkEva(this.checkId);
  12016. }, 100);
  12017. }, 100);
  12018. },
  12019. addTaskBorder2(type, index) {
  12020. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  12021. this.$message({
  12022. message: "有大纲在生成请生成完之后才能使用此功能",
  12023. type: "warning"
  12024. });
  12025. return;
  12026. }
  12027. if(type == 1){
  12028. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  12029. task: "",
  12030. isTask2: true,
  12031. isTask3: true,
  12032. taskDetail: "",
  12033. chapterData: [],
  12034. toolText: "",
  12035. toolChoose: [
  12036. {
  12037. tool: [],
  12038. toolDetail: "",
  12039. toolType: 0,
  12040. askCount: 1,
  12041. askTitle: "",
  12042. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12043. },
  12044. ],
  12045. isShowTools: false,
  12046. askCount: 1,
  12047. isFold: 0, //任务收起状态
  12048. askTitle: "",
  12049. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12050. checkJson: [{ checkCount: [], checkPerent: [] }],
  12051. homeworkList: [],
  12052. })
  12053. }else if(type == 2){
  12054. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  12055. task: "",
  12056. isTask2: true,
  12057. isTask3: true,
  12058. taskDetail: "",
  12059. chapterData: [],
  12060. toolText: "",
  12061. toolChoose: [
  12062. {
  12063. tool: [],
  12064. toolDetail: "",
  12065. toolType: 0,
  12066. askCount: 1,
  12067. askTitle: "",
  12068. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12069. },
  12070. ],
  12071. isShowTools: false,
  12072. askCount: 1,
  12073. isFold: 0, //任务收起状态
  12074. askTitle: "",
  12075. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12076. checkJson: [{ checkCount: [], checkPerent: [] }],
  12077. homeworkList: [],
  12078. })
  12079. }
  12080. setTimeout(() => {
  12081. this.checkEva(this.checkId);
  12082. setTimeout(() => {
  12083. this.checkEva(this.checkId);
  12084. }, 100);
  12085. }, 100);
  12086. },
  12087. add(e, i) {
  12088. var el = e.currentTarget;
  12089. el.getElementsByTagName("input")[0].click();
  12090. },
  12091. fold(i, e) {
  12092. if (
  12093. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  12094. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  12095. ) {
  12096. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  12097. } else {
  12098. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  12099. }
  12100. },
  12101. fold2(i) {
  12102. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  12103. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12104. i
  12105. ].isFold2 = false;
  12106. } else {
  12107. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  12108. }
  12109. this.$forceUpdate();
  12110. },
  12111. foldEva(i) {
  12112. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  12113. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12114. i
  12115. ].isEvaFold = false;
  12116. } else {
  12117. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12118. i
  12119. ].isEvaFold = true;
  12120. setTimeout(() => {
  12121. this.checkEva(this.checkId);
  12122. setTimeout(() => {
  12123. this.checkEva(this.checkId);
  12124. }, 500);
  12125. }, 0);
  12126. }
  12127. this.$forceUpdate();
  12128. },
  12129. foldC(i) {
  12130. if (
  12131. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  12132. ) {
  12133. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12134. i
  12135. ].isFoldchapter = false;
  12136. } else {
  12137. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12138. i
  12139. ].isFoldchapter = true;
  12140. }
  12141. this.$forceUpdate();
  12142. },
  12143. fold3(i, ti) {
  12144. if (
  12145. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  12146. .isFold3
  12147. ) {
  12148. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12149. ti
  12150. ].isFold3 = false;
  12151. } else {
  12152. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12153. ti
  12154. ].isFold3 = true;
  12155. }
  12156. this.$forceUpdate();
  12157. },
  12158. deleteHomeworkBox(unitIndex, index, i) {
  12159. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  12160. this.taskCount
  12161. ].homeworkList.splice(i, 1);
  12162. },
  12163. getStudent() {
  12164. let params = {
  12165. oid: this.oid,
  12166. cu: "",
  12167. cn: this.searchPeople,
  12168. };
  12169. this.ajax
  12170. .get(this.$store.state.api + "selectStudentAdd", params)
  12171. .then((res) => {
  12172. this.studentJuri = res.data[0];
  12173. })
  12174. .catch((err) => {
  12175. this.isLoading = false;
  12176. console.error(err);
  12177. });
  12178. },
  12179. // 添加协同成员其他选项按钮
  12180. getTeacherCopy(){
  12181. this.CollLoading=true
  12182. this.collid = ''
  12183. this.collid = '1xpz'
  12184. let params = {
  12185. oid:
  12186. this.org && this.org != "undefined" && this.org != "null"
  12187. ? this.org
  12188. : this.oid,
  12189. cu: "",
  12190. cn: this.searchTN,
  12191. coll: ''
  12192. };
  12193. this.ajax
  12194. .get(
  12195. this.$store.state.api +
  12196. (this.org && this.org != "undefined" && this.org != "null"
  12197. ? "selectCollaborativeMembersOrg"
  12198. : "selectCollaborativeMembers"),
  12199. params
  12200. )
  12201. .then((res) => {
  12202. let teacherJuri = res.data[0];
  12203. this.CollaborativeTeaList = res.data[1];
  12204. for (var i = 0; i < teacherJuri.length; i++) {
  12205. if (teacherJuri[i].userid == this.userid) {
  12206. teacherJuri.splice(i, 1);
  12207. break;
  12208. }
  12209. }
  12210. this.teacherJuri = teacherJuri.filter((i,index)=>{
  12211. return (i.cclassid == '' || i.cclassid == null)
  12212. })
  12213. console.log(' this.teacherJuri', this.teacherJuri);
  12214. let _check = [];
  12215. let _check2 = [];
  12216. for (var i = 0; i < this.teacherJuri.length; i++) {
  12217. var gid = this.teacherJuri[i].userid;
  12218. _check.push(gid);
  12219. }
  12220. for (var i = 0; i < this.checkboxList3.length; i++) {
  12221. var _id = this.checkboxList3[i];
  12222. if (_check.indexOf(_id) !== -1) {
  12223. _check2.push(_id);
  12224. }
  12225. }
  12226. if (_check2.length==0 && _check.length==0) {
  12227. }else{
  12228. this.checkAll2 = _check2.length === _check.length;
  12229. }
  12230. this.CollLoading=false
  12231. })
  12232. .catch((err) => {
  12233. console.error(err);
  12234. this.CollLoading=false
  12235. });
  12236. },
  12237. getTeacher(val) {
  12238. this.CollLoading=true
  12239. this.collid = ''
  12240. this.collid = !val ? '' : val
  12241. let params = {
  12242. oid:
  12243. this.org && this.org != "undefined" && this.org != "null"
  12244. ? this.org
  12245. : this.oid,
  12246. cu: "",
  12247. cn: this.searchTN,
  12248. coll: this.collid
  12249. };
  12250. this.ajax
  12251. .get(
  12252. this.$store.state.api +
  12253. (this.org && this.org != "undefined" && this.org != "null"
  12254. ? "selectCollaborativeMembersOrg"
  12255. : "selectCollaborativeMembers"),
  12256. params
  12257. )
  12258. .then((res) => {
  12259. let teacherJuri = res.data[0];
  12260. this.CollaborativeTeaList = res.data[1];
  12261. for (var i = 0; i < teacherJuri.length; i++) {
  12262. if (teacherJuri[i].userid == this.userid) {
  12263. teacherJuri.splice(i, 1);
  12264. break;
  12265. }
  12266. }
  12267. this.teacherJuri = teacherJuri;
  12268. let _check = [];
  12269. let _check2 = [];
  12270. for (var i = 0; i < this.teacherJuri.length; i++) {
  12271. var gid = this.teacherJuri[i].userid;
  12272. _check.push(gid);
  12273. }
  12274. for (var i = 0; i < this.checkboxList3.length; i++) {
  12275. var _id = this.checkboxList3[i];
  12276. if (_check.indexOf(_id) !== -1) {
  12277. _check2.push(_id);
  12278. }
  12279. }
  12280. if (_check2.length==0 && _check.length==0) {
  12281. }else{
  12282. this.checkAll2 = _check2.length === _check.length;
  12283. }
  12284. this.CollLoading=false
  12285. })
  12286. .catch((err) => {
  12287. console.error(err);
  12288. this.CollLoading=false
  12289. });
  12290. },
  12291. searchStudent() {
  12292. this.getStudent();
  12293. },
  12294. selectGrage() {
  12295. let params = {
  12296. oid: this.oid,
  12297. };
  12298. this.ajax
  12299. .get(this.$store.state.api + "selectGrageBySchool", params)
  12300. .then((res) => {
  12301. this.gradeList = res.data[0];
  12302. })
  12303. .catch((err) => {
  12304. this.isLoading = false;
  12305. console.error(err);
  12306. });
  12307. },
  12308. //获取班级列表
  12309. getClass() {
  12310. let params = {
  12311. oid: this.oid,
  12312. gid: this.gradeId,
  12313. cn: this.classSearch,
  12314. };
  12315. this.ajax
  12316. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  12317. .then((res) => {
  12318. if (!this.grade.length) {
  12319. this.grade = res.data[0];
  12320. }
  12321. this.grade2 = res.data[0];
  12322. this.classJuri = res.data[0];
  12323. let _check = [];
  12324. let _check2 = [];
  12325. for (var i = 0; i < this.grade2.length; i++) {
  12326. var gid = this.grade2[i].id;
  12327. _check.push(gid);
  12328. }
  12329. for (var i = 0; i < this.checkboxList2.length; i++) {
  12330. var _id = this.checkboxList2[i];
  12331. if (_check.indexOf(_id) !== -1) {
  12332. _check2.push(_id);
  12333. }
  12334. }
  12335. this.checkAll = _check2.length === _check.length;
  12336. })
  12337. .catch((err) => {
  12338. this.isLoading = false;
  12339. console.error(err);
  12340. });
  12341. },
  12342. CourseType2Change(val) {
  12343. this.pTypeCheck = [];
  12344. for (var i = 0; i < this.CourseType2.length; i++) {
  12345. let typeA = this.CourseType2[i];
  12346. if (val.indexOf(typeA.name) != -1) {
  12347. this.pTypeCheck.push(...typeA.id);
  12348. }
  12349. }
  12350. },
  12351. arrayToArray(arrayo, arrayt) {
  12352. let array1 = arrayo;
  12353. let array2 = arrayt;
  12354. let commonElements = [];
  12355. for (let i = 0; i < array1.length; i++) {
  12356. for (let j = 0; j < array2.length; j++) {
  12357. if (array1[i] === array2[j]) {
  12358. commonElements.push(array1[i]);
  12359. }
  12360. }
  12361. }
  12362. return commonElements;
  12363. },
  12364. typeChange(){
  12365. let courseInfo = ``
  12366. let sub = []
  12367. let mclass = []
  12368. let theme = []
  12369. if (this.courseTypeId.length) {
  12370. for (var i = 0; i < this.courseTypeId.length; i++) {
  12371. let _sid = this.courseTypeId[i]
  12372. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12373. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  12374. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  12375. }
  12376. }
  12377. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12378. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  12379. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  12380. }
  12381. }
  12382. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12383. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  12384. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  12385. }
  12386. }
  12387. }
  12388. }
  12389. sub = JSON.parse(converter(JSON.stringify(sub)))
  12390. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  12391. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  12392. let _file = this.knowFileArray[fi]
  12393. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  12394. let fileS = _file.name ? converter(_file.name).split('/') : 1
  12395. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  12396. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  12397. let fileids = this.knowInfoData.map((item) => item.fileid)
  12398. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12399. this.knowInfoData.push({
  12400. name: _file.filename,
  12401. url: _file.url,
  12402. uid: '',
  12403. type: 3,
  12404. fileid: _file.fileid,
  12405. });
  12406. this.knowFileids.push(_file.fileid)
  12407. }
  12408. fileids = this.knowInfoData.map((item) => item.fileid)
  12409. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12410. this.knowInfoData.push({
  12411. name: _file.filename,
  12412. url: _file.url,
  12413. uid: '',
  12414. type: 3,
  12415. fileid: _file.fileid,
  12416. });
  12417. this.knowFileids.push(_file.fileid)
  12418. }
  12419. fileids = this.knowInfoData.map((item) => item.fileid)
  12420. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12421. this.knowInfoData.push({
  12422. name: _file.filename,
  12423. url: _file.url,
  12424. uid: '',
  12425. type: 3,
  12426. fileid: _file.fileid,
  12427. });
  12428. this.knowFileids.push(_file.fileid)
  12429. }
  12430. fileids = this.knowInfoData.map((item) => item.fileid)
  12431. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12432. this.knowInfoData.push({
  12433. name: _file.filename,
  12434. url: _file.url,
  12435. uid: '',
  12436. type: 3,
  12437. fileid: _file.fileid,
  12438. });
  12439. this.knowFileids.push(_file.fileid)
  12440. }
  12441. fileids = this.knowInfoData.map((item) => item.fileid)
  12442. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  12443. this.knowInfoData.push({
  12444. name: _file.filename,
  12445. url: _file.url,
  12446. uid: '',
  12447. type: 3,
  12448. fileid: _file.fileid,
  12449. });
  12450. this.knowFileids.push(_file.fileid)
  12451. }
  12452. }
  12453. if(mclass.length){
  12454. courseInfo += `年级:${mclass.join(',')} `
  12455. }
  12456. if(sub.length){
  12457. courseInfo += `学科:${sub.join(',')} `
  12458. }
  12459. if(theme.length){
  12460. courseInfo += `主题:${theme.join(',')} `
  12461. }
  12462. this.addCourseBehavior('courseBehavior', `点击选择分类-${courseInfo}`)
  12463. this.typeC1 = this.getTypeC(2)
  12464. this.typeC2 = this.getTypeC(1)
  12465. },
  12466. getChapterData(e, i, j, ic, type) {
  12467. e.stopPropagation();
  12468. this.updataC = true;
  12469. this.icc = ic;
  12470. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  12471. console.log("还不能下载图片喔");
  12472. }
  12473. },
  12474. deleteChapterData(e, i, j, ic, taskI) {
  12475. e.stopPropagation();
  12476. let _this = this;
  12477. _this
  12478. .$confirm("确定删除此项?", "提示", {
  12479. confirmButtonText: "确定",
  12480. cancelButtonText: "取消",
  12481. type: "warning",
  12482. })
  12483. .then(() => {
  12484. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  12485. ic,
  12486. 1
  12487. );
  12488. })
  12489. .catch(() => {
  12490. return;
  12491. });
  12492. },
  12493. checkInfoData(fileid, file){
  12494. let type = 1
  12495. let index = 0
  12496. for(let i = 0; i < this.infoData.length; i++){
  12497. if(this.infoData[i].fileid == fileid){
  12498. type = 2
  12499. index = i
  12500. }
  12501. }
  12502. if(type == 2){
  12503. this.infoData.splice(index, 1)
  12504. }else {
  12505. this.infoData.push({...file})
  12506. }
  12507. },
  12508. checkKnowInfoData(fileid){
  12509. if(this.knowFileids.indexOf(fileid) == -1){
  12510. this.knowFileids.push(fileid)
  12511. }else {
  12512. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  12513. }
  12514. },
  12515. checkKnowInfoData2(fileid){
  12516. if(!fileid){
  12517. return
  12518. }
  12519. if(this.knowFileids2.indexOf(fileid) == -1){
  12520. this.knowFileids2.push(fileid)
  12521. }else {
  12522. this.knowFileids2.splice(this.knowFileids2.indexOf(fileid), 1)
  12523. }
  12524. },
  12525. checkKnowInfoData3(fileid){
  12526. if(this.knowFileids3.indexOf(fileid) == -1){
  12527. this.knowFileids3.push(fileid)
  12528. }else {
  12529. this.knowFileids3.splice(this.knowFileids3.indexOf(fileid), 1)
  12530. }
  12531. },
  12532. checkAllKnowInfoData3(){
  12533. // let array = this.knowInfoData3;
  12534. // if(this.knowFileids3.length === array.length){
  12535. // this.knowFileids3 = []; // 取消全选
  12536. // } else {
  12537. // this.knowFileids3 = array.map(item => item.url); // 全选
  12538. // }
  12539. let files = this.allknowInfoData3();
  12540. let count = 0
  12541. for(var i = 0; i < files.length; i++){
  12542. if(this.knowFileids3.includes(files[i].url)){
  12543. count++
  12544. }
  12545. }
  12546. if (count == files.length) {
  12547. this.knowFileids3 = this.knowFileids3.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12548. } else {
  12549. this.knowFileids3 = [...new Set([...this.knowFileids3, ...files.map(file => file.url)])]; // 全选并添加新文件
  12550. }
  12551. },
  12552. checkAllKnowInfoData2(){
  12553. let array = this.knowInfoData2;
  12554. if(this.knowFileids2.length === array.length){
  12555. this.knowFileids2 = []; // 取消全选
  12556. } else {
  12557. this.knowFileids2 = array.map(item => item.fileid); // 全选
  12558. }
  12559. },
  12560. deleteCheckAllKnowInfoData2(){
  12561. let _this = this;
  12562. _this
  12563. .$confirm("确定删除所选文件么?", "提示", {
  12564. confirmButtonText: "确定",
  12565. cancelButtonText: "取消",
  12566. type: "warning",
  12567. })
  12568. .then(() => {
  12569. _this.knowInfoData2 = _this.knowInfoData2.filter(item => !_this.knowFileids2.includes(item.fileid))
  12570. _this.knowFileids2 = []
  12571. _this.$forceUpdate()
  12572. })
  12573. .catch(() => {
  12574. return;
  12575. });
  12576. },
  12577. checkAppendixFile(url){
  12578. if(this.appendixFiles.indexOf(url) == -1){
  12579. this.appendixFiles.push(url)
  12580. }else {
  12581. this.appendixFiles.splice(this.appendixFiles.indexOf(url), 1)
  12582. }
  12583. },
  12584. checkAllappendixFile(){
  12585. let files = this.allFile();
  12586. let count = 0
  12587. for(var i = 0; i < files.length; i++){
  12588. if(this.appendixFiles.includes(files[i].url)){
  12589. count++
  12590. }
  12591. }
  12592. if (count == files.length) {
  12593. this.appendixFiles = this.appendixFiles.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12594. if(this.appendixTypeCheck == 'all' && this.appendixTaskCheck == 'all'){
  12595. this.appendixFiles = []
  12596. }
  12597. } else {
  12598. this.appendixFiles = [...new Set([...this.appendixFiles, ...files.map(file => file.url)])]; // 全选并添加新文件
  12599. }
  12600. },
  12601. async exportAppendixFiles(){
  12602. let files = this.allFile(2);
  12603. let uploadFile = []
  12604. for(var i = 0; i < files.length; i++){
  12605. if(this.appendixFiles.includes(files[i].url)){
  12606. uploadFile.push(files[i])
  12607. }
  12608. }
  12609. if(!uploadFile.length){
  12610. this.$message.error('请先选需要下载的附件')
  12611. return
  12612. }
  12613. this.appendixLoading = true
  12614. const zip = new JSZip();
  12615. for(var j = 0; j < uploadFile.length; j++){
  12616. let fileZ = uploadFile[j]
  12617. let name = fileZ.name
  12618. let file = await getFile(fileZ.url)
  12619. const file_name = fileZ.name; // 获取文件名
  12620. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  12621. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  12622. // 判断是否有重复的文件名字
  12623. if (!zip.file(file_name)) {
  12624. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  12625. } else {
  12626. // 如果有重复的文件名,则在文件名后添加序号
  12627. let count = 1;
  12628. let newFileName = fileNameWithoutExt;
  12629. while (zip.file(`${newFileName}.${fileExt}`)) {
  12630. newFileName = `${fileNameWithoutExt}(${count})`;
  12631. count++;
  12632. }
  12633. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  12634. }
  12635. // zip.file(`${name}`, file.data, { binary: true })
  12636. }
  12637. zip.generateAsync({ type: "blob" }).then((content) => {
  12638. // 生成二进制流
  12639. saveAs(
  12640. content,
  12641. this.courseName + "-" + "附件.zip"
  12642. ); // 利用file-saver保存文件 自定义文件名
  12643. setTimeout(() => {
  12644. this.appendixLoading = false
  12645. }, 2000);
  12646. });
  12647. },
  12648. deleteInfoData(e, ic) {
  12649. e.stopPropagation();
  12650. let _this = this;
  12651. _this
  12652. .$confirm("确定删除此项?", "提示", {
  12653. confirmButtonText: "确定",
  12654. cancelButtonText: "取消",
  12655. type: "warning",
  12656. })
  12657. .then(() => {
  12658. _this.infoData.splice(
  12659. ic,
  12660. 1
  12661. );
  12662. })
  12663. .catch(() => {
  12664. return;
  12665. });
  12666. },
  12667. deleteInfoData2(e, ic) {
  12668. e.stopPropagation();
  12669. let _this = this;
  12670. _this
  12671. .$confirm("确定删除此项?", "提示", {
  12672. confirmButtonText: "确定",
  12673. cancelButtonText: "取消",
  12674. type: "warning",
  12675. })
  12676. .then(() => {
  12677. let fileid = _this.infoData2[ic].fileid;
  12678. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  12679. _this.infoData2.splice(
  12680. ic,
  12681. 1
  12682. );
  12683. })
  12684. .catch(() => {
  12685. return;
  12686. });
  12687. },
  12688. deleteKnowInfoData(e, ic) {
  12689. e.stopPropagation();
  12690. let _this = this;
  12691. _this
  12692. .$confirm("确定删除此项?", "提示", {
  12693. confirmButtonText: "确定",
  12694. cancelButtonText: "取消",
  12695. type: "warning",
  12696. })
  12697. .then(() => {
  12698. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12699. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  12700. }
  12701. _this.knowInfoData.splice(
  12702. ic,
  12703. 1
  12704. );
  12705. })
  12706. .catch(() => {
  12707. return;
  12708. });
  12709. },
  12710. deleteKnowInfoData2(e, ic) {
  12711. e.stopPropagation();
  12712. let _this = this;
  12713. _this
  12714. .$confirm("确定删除此项?", "提示", {
  12715. confirmButtonText: "确定",
  12716. cancelButtonText: "取消",
  12717. type: "warning",
  12718. })
  12719. .then(() => {
  12720. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12721. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  12722. }
  12723. _this.knowInfoData2.splice(
  12724. ic,
  12725. 1
  12726. );
  12727. })
  12728. .catch(() => {
  12729. return;
  12730. });
  12731. },
  12732. deletemubiaoInfoData(e, ic) {
  12733. e.stopPropagation();
  12734. let _this = this;
  12735. _this
  12736. .$confirm("确定删除此项?", "提示", {
  12737. confirmButtonText: "确定",
  12738. cancelButtonText: "取消",
  12739. type: "warning",
  12740. })
  12741. .then(() => {
  12742. _this.mubiaoInfoData.splice(
  12743. ic,
  12744. 1
  12745. );
  12746. })
  12747. .catch(() => {
  12748. return;
  12749. });
  12750. },
  12751. deletexuanzeInfoData(e, ic) {
  12752. e.stopPropagation();
  12753. let _this = this;
  12754. _this
  12755. .$confirm("确定删除此项?", "提示", {
  12756. confirmButtonText: "确定",
  12757. cancelButtonText: "取消",
  12758. type: "warning",
  12759. })
  12760. .then(() => {
  12761. _this.xuanzeInfoData.splice(
  12762. ic,
  12763. 1
  12764. );
  12765. })
  12766. .catch(() => {
  12767. return;
  12768. });
  12769. },
  12770. deletepingjiaInfoData(e, ic, tindex) {
  12771. e.stopPropagation();
  12772. let _this = this;
  12773. _this
  12774. .$confirm("确定删除此项?", "提示", {
  12775. confirmButtonText: "确定",
  12776. cancelButtonText: "取消",
  12777. type: "warning",
  12778. })
  12779. .then(() => {
  12780. _this.pingjiaInfoData[tindex].splice(
  12781. ic,
  12782. 1
  12783. );
  12784. })
  12785. .catch(() => {
  12786. return;
  12787. });
  12788. },
  12789. deleteCankaoInfoData(e, ic) {
  12790. e.stopPropagation();
  12791. let _this = this;
  12792. _this
  12793. .$confirm("确定删除此项?", "提示", {
  12794. confirmButtonText: "确定",
  12795. cancelButtonText: "取消",
  12796. type: "warning",
  12797. })
  12798. .then(() => {
  12799. _this.cankaoInfoData.splice(
  12800. ic,
  12801. 1
  12802. );
  12803. })
  12804. .catch(() => {
  12805. return;
  12806. });
  12807. },
  12808. deleteTeacherInfoData(e, ic) {
  12809. e.stopPropagation();
  12810. let _this = this;
  12811. _this
  12812. .$confirm("确定删除此项?", "提示", {
  12813. confirmButtonText: "确定",
  12814. cancelButtonText: "取消",
  12815. type: "warning",
  12816. })
  12817. .then(() => {
  12818. _this.teacherInfoData.splice(
  12819. ic,
  12820. 1
  12821. );
  12822. })
  12823. .catch(() => {
  12824. return;
  12825. });
  12826. },
  12827. updataVideoT(e, i, j, ic) {
  12828. // e.stopPropagation();
  12829. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  12830. // ic
  12831. // ].name = JSON.parse(JSON.stringify(e.target.value));
  12832. this.line =
  12833. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  12834. this.taskCount = j;
  12835. this.lineCount = ic;
  12836. this.dialogVisibleupdataVideoT = true;
  12837. this.$forceUpdate();
  12838. },
  12839. checkChpater(e, i, j, ic){
  12840. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  12841. if(type == 3){
  12842. var fileA = [
  12843. "DOC",
  12844. "DOCX",
  12845. "DOCM",
  12846. "DOTM",
  12847. "DOTX",
  12848. "PPTX",
  12849. "PPSX",
  12850. "PPT",
  12851. "PPS",
  12852. "PPTM",
  12853. "POTM",
  12854. "PPAM",
  12855. "POTX",
  12856. "PPSM",
  12857. "XLSX",
  12858. "XLS"
  12859. ];
  12860. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  12861. if (
  12862. fileA.indexOf(
  12863. url.split(".")[
  12864. url.split(".").length - 1
  12865. ].toLocaleUpperCase()
  12866. ) != -1
  12867. ) {
  12868. this.dialogVisibleOffice = true
  12869. this.wurl = url
  12870. } else if (
  12871. "pdf".indexOf(
  12872. url.split(".")[
  12873. url.split(".").length - 1
  12874. ].toLocaleLowerCase()
  12875. ) != -1
  12876. ) {
  12877. this.dialogVisiblePdf = true
  12878. this.wurl = url
  12879. }
  12880. }
  12881. },
  12882. checkChpater2(e, ic){
  12883. let type = this.infoData2[ic].type
  12884. if(type == 3){
  12885. var fileA = [
  12886. "DOC",
  12887. "DOCX",
  12888. "DOCM",
  12889. "DOTM",
  12890. "DOTX",
  12891. "PPTX",
  12892. "PPSX",
  12893. "PPT",
  12894. "PPS",
  12895. "PPTM",
  12896. "POTM",
  12897. "PPAM",
  12898. "POTX",
  12899. "PPSM",
  12900. "XLSX",
  12901. "XLS"
  12902. ];
  12903. let url = this.infoData2[ic].url
  12904. if (
  12905. fileA.indexOf(
  12906. url.split(".")[
  12907. url.split(".").length - 1
  12908. ].toLocaleUpperCase()
  12909. ) != -1
  12910. ) {
  12911. this.dialogVisibleOffice = true
  12912. this.wurl = url
  12913. } else if (
  12914. "pdf".indexOf(
  12915. url.split(".")[
  12916. url.split(".").length - 1
  12917. ].toLocaleLowerCase()
  12918. ) != -1
  12919. ) {
  12920. this.dialogVisiblePdf = true
  12921. this.wurl = url
  12922. }
  12923. }
  12924. },
  12925. checkChpater3(e, ic, item){
  12926. let type = item.type
  12927. if(type == 3){
  12928. var fileA = [
  12929. "DOC",
  12930. "DOCX",
  12931. "DOCM",
  12932. "DOTM",
  12933. "DOTX",
  12934. "PPTX",
  12935. "PPSX",
  12936. "PPT",
  12937. "PPS",
  12938. "PPTM",
  12939. "POTM",
  12940. "PPAM",
  12941. "POTX",
  12942. "PPSM",
  12943. "XLSX",
  12944. "XLS"
  12945. ];
  12946. let url = item.url
  12947. if (
  12948. fileA.indexOf(
  12949. url.split(".")[
  12950. url.split(".").length - 1
  12951. ].toLocaleUpperCase()
  12952. ) != -1
  12953. ) {
  12954. this.dialogVisibleOffice = true
  12955. this.wurl = url
  12956. } else if (
  12957. "pdf".indexOf(
  12958. url.split(".")[
  12959. url.split(".").length - 1
  12960. ].toLocaleLowerCase()
  12961. ) != -1
  12962. ) {
  12963. this.dialogVisiblePdf = true
  12964. this.wurl = url
  12965. }
  12966. }
  12967. },
  12968. updataVideoC() {
  12969. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12970. this.taskCount
  12971. ].chapterData[this.lineCount].name = JSON.parse(
  12972. JSON.stringify(this.line)
  12973. );
  12974. this.dialogVisibleupdataVideoT = false;
  12975. this.$forceUpdate();
  12976. },
  12977. upCd(e, i, j, taskCount, ic) {
  12978. e.stopPropagation();
  12979. if (ic == 0) {
  12980. return;
  12981. }
  12982. var a = JSON.parse(
  12983. JSON.stringify(
  12984. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  12985. ic - 1
  12986. ]
  12987. )
  12988. );
  12989. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  12990. JSON.parse(
  12991. JSON.stringify(
  12992. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  12993. )
  12994. );
  12995. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  12996. this.$forceUpdate();
  12997. },
  12998. downCd(e, i, j, taskCount, ic) {
  12999. e.stopPropagation();
  13000. if (
  13001. ic ==
  13002. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  13003. 1
  13004. ) {
  13005. return;
  13006. }
  13007. var a = JSON.parse(
  13008. JSON.stringify(
  13009. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  13010. ic + 1
  13011. ]
  13012. )
  13013. );
  13014. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  13015. JSON.parse(
  13016. JSON.stringify(
  13017. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  13018. )
  13019. );
  13020. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  13021. this.$forceUpdate();
  13022. },
  13023. async upTool(e, i, j, tooli) {
  13024. e.stopPropagation();
  13025. if (tooli == 0) {
  13026. return;
  13027. }
  13028. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  13029. let count2 = await this.getWorksCount(3, i, j, tooli);
  13030. if (count1 > 0 || count2 > 0) {
  13031. this.$confirm(
  13032. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  13033. "提示",
  13034. {
  13035. confirmButtonText: "确定",
  13036. cancelButtonText: "取消",
  13037. type: "warning",
  13038. }
  13039. )
  13040. .then(() => {
  13041. var a = JSON.parse(
  13042. JSON.stringify(
  13043. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  13044. tooli - 1
  13045. ]
  13046. )
  13047. );
  13048. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  13049. JSON.parse(
  13050. JSON.stringify(
  13051. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13052. )
  13053. );
  13054. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13055. this.$forceUpdate();
  13056. })
  13057. .catch(() => {
  13058. return;
  13059. });
  13060. } else {
  13061. var a = JSON.parse(
  13062. JSON.stringify(
  13063. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  13064. )
  13065. );
  13066. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  13067. JSON.parse(
  13068. JSON.stringify(
  13069. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13070. )
  13071. );
  13072. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13073. this.$forceUpdate();
  13074. }
  13075. },
  13076. async downTool(e, i, j, tooli) {
  13077. e.stopPropagation();
  13078. if (
  13079. tooli ==
  13080. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  13081. ) {
  13082. return;
  13083. }
  13084. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  13085. let count2 = await this.getWorksCount(3, i, j, tooli);
  13086. if (count1 > 0 || count2 > 0) {
  13087. this.$confirm(
  13088. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  13089. "提示",
  13090. {
  13091. confirmButtonText: "确定",
  13092. cancelButtonText: "取消",
  13093. type: "warning",
  13094. }
  13095. )
  13096. .then(() => {
  13097. var a = JSON.parse(
  13098. JSON.stringify(
  13099. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  13100. tooli + 1
  13101. ]
  13102. )
  13103. );
  13104. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13105. JSON.parse(
  13106. JSON.stringify(
  13107. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13108. )
  13109. );
  13110. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13111. this.$forceUpdate();
  13112. })
  13113. .catch(() => {
  13114. return;
  13115. });
  13116. } else {
  13117. var a = JSON.parse(
  13118. JSON.stringify(
  13119. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  13120. )
  13121. );
  13122. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13123. JSON.parse(
  13124. JSON.stringify(
  13125. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13126. )
  13127. );
  13128. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13129. this.$forceUpdate();
  13130. }
  13131. },
  13132. addWork(type) {
  13133. if(type == 2 && this.courseName == "") {
  13134. this.$message.error("请补充填写课程名称");
  13135. return;
  13136. }
  13137. let cPan = 1;
  13138. for (var i = 0; i < this.unitJson.length; i++) {
  13139. for (
  13140. var j = 0;
  13141. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13142. j++
  13143. ) {
  13144. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13145. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13146. if (
  13147. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13148. ) {
  13149. for (
  13150. var z = 0;
  13151. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13152. z++
  13153. ) {
  13154. if (
  13155. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13156. .length
  13157. ) {
  13158. this.$message.error("请把工具添加完整");
  13159. cPan = 2;
  13160. break;
  13161. }
  13162. }
  13163. }
  13164. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13165. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13166. i
  13167. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13168. return ele.value != "" || ele.detail != "" || ele.target != "";
  13169. });
  13170. }
  13171. }
  13172. }
  13173. this.inputShow = true;
  13174. if (cPan == 2) {
  13175. this.steps--;
  13176. return;
  13177. }
  13178. for (var i = 0; i < this.unitJson.length; i++) {
  13179. delete this.unitJson[i].isUpdate;
  13180. }
  13181. if(!this.targetCourseText2){
  13182. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13183. }
  13184. let params = [
  13185. {
  13186. uid: this.userid,
  13187. title: this.courseName,
  13188. brief: this.courseText,
  13189. cover:
  13190. this.cover.length > 0
  13191. ? JSON.stringify(this.cover)
  13192. : JSON.stringify([
  13193. {
  13194. name: "noBanner.jpg",
  13195. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  13196. uid: 1656409780264,
  13197. status: "success",
  13198. },
  13199. ]),
  13200. evaId: this.evalua,
  13201. astudent:
  13202. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13203. see: this.isTeacherSee == true ? 1 : 0,
  13204. chapters: JSON.stringify(this.unitJson),
  13205. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  13206. courseType: JSON.stringify(this.courseTypeId),
  13207. ateacher:
  13208. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13209. inviteCode: JSON.stringify(this.inviteCode),
  13210. refile: JSON.stringify(this.infoData),
  13211. reBrief: this.courseText2,
  13212. cpote: JSON.stringify(this.cpote),
  13213. setting: JSON.stringify({
  13214. courseJie: this.courseJie,
  13215. courseTime: this.courseTime,
  13216. teacherInfoData: this.teacherInfoData,
  13217. teacherCourseText: this.teacherCourseText,
  13218. targetCourseText: this.targetCourseText,
  13219. cankaoInfoData: this.cankaoInfoData,
  13220. mubiaoInfoData: this.mubiaoInfoData,
  13221. xuanzeInfoData: this.xuanzeInfoData,
  13222. pingjiaInfoData: this.pingjiaInfoData,
  13223. infoData2: this.infoData2,
  13224. isuseT: this.isuseT,
  13225. mode: this.mode,
  13226. targetCourseText2: this.targetCourseText2,
  13227. chatid: this.chatid,
  13228. languageSetting: this.languageSetting,
  13229. knowInfoData: this.knowInfoData,
  13230. knowFileids: this.knowFileids,
  13231. knowInfoData2: this.knowInfoData2,
  13232. knowFileids2: this.knowFileids2,
  13233. recordVideoText: this.recordVideoText,
  13234. recordAudioUrl: this.recordAudioUrl,
  13235. appendixFile: this.appendixFile,
  13236. }),
  13237. iresearch: this.isFileSearch ? 1 : 2,
  13238. },
  13239. ];
  13240. this.ajax
  13241. .post(this.$store.state.api + "addWorkNew2AI3", params)
  13242. .then((res) => {
  13243. console.log(this.steps);
  13244. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13245. this.$message({
  13246. message: "新增成功",
  13247. type: "success",
  13248. });
  13249. }
  13250. this.number = res.data.ordernumber;
  13251. this.courseId = res.data.courseId;
  13252. this.cid = res.data.courseId;
  13253. this.courseUserid = this.userid;
  13254. this.islogin = true;
  13255. // this.updateCourseState(4);
  13256. this.updateCourseState(5);
  13257. this.addtips()
  13258. if(type == 2){
  13259. this.retrunCourse()
  13260. }
  13261. if(type == 3){
  13262. this.steps = 4
  13263. }
  13264. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13265. })
  13266. .catch((err) => {
  13267. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13268. this.$message.error("网络不佳");
  13269. console.error(err);
  13270. });
  13271. },
  13272. goCourse() {
  13273. window.topU.postMessage({ cid: this.courseId, type: "1" }, "*");
  13274. },
  13275. updateWork2() {
  13276. let _unitIndex = this.unitIndex;
  13277. let cPan = 1;
  13278. for (
  13279. var j = 0;
  13280. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13281. j++
  13282. ) {
  13283. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13284. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13285. j
  13286. ].proVisible2 = false;
  13287. if (
  13288. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13289. .length > 1
  13290. ) {
  13291. for (
  13292. var z = 0;
  13293. z <
  13294. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13295. .length;
  13296. z++
  13297. ) {
  13298. if (
  13299. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13300. z
  13301. ].tool.length
  13302. ) {
  13303. this.$message.error("请把工具添加完整");
  13304. cPan = 2;
  13305. break;
  13306. }
  13307. }
  13308. }
  13309. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13310. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13311. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13312. (ele) => {
  13313. return ele.value != "" || ele.detail != "" || ele.target != "";
  13314. }
  13315. );
  13316. }
  13317. }
  13318. this.inputShow = true;
  13319. if (cPan == 2) {
  13320. this.steps--;
  13321. return;
  13322. }
  13323. let params = [
  13324. {
  13325. cid: this.cid,
  13326. chapters: JSON.stringify(this.unitJson),
  13327. uid: this.userid,
  13328. unitIndex: _unitIndex,
  13329. },
  13330. ];
  13331. this.ajax
  13332. .post(this.$store.state.api + "updateWorkNew4", params)
  13333. .then((res) => {
  13334. this.$message({
  13335. message: "修改成功",
  13336. type: "success",
  13337. });
  13338. this.courseId = this.cid;
  13339. this.addtips();
  13340. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13341. })
  13342. .catch((err) => {
  13343. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13344. this.$message.error("网络不佳");
  13345. console.error(err);
  13346. });
  13347. },
  13348. updateWork3(unitIndex) {
  13349. let _unitIndex = unitIndex;
  13350. let cPan = 1;
  13351. for (
  13352. var j = 0;
  13353. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13354. j++
  13355. ) {
  13356. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13357. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13358. j
  13359. ].proVisible2 = false;
  13360. if (
  13361. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13362. .length > 1
  13363. ) {
  13364. for (
  13365. var z = 0;
  13366. z <
  13367. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13368. .length;
  13369. z++
  13370. ) {
  13371. if (
  13372. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13373. z
  13374. ].tool.length
  13375. ) {
  13376. this.$message.error("请把工具添加完整");
  13377. cPan = 2;
  13378. break;
  13379. }
  13380. }
  13381. }
  13382. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13383. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13384. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13385. (ele) => {
  13386. return ele.value != "" || ele.detail != "" || ele.target != "";
  13387. }
  13388. );
  13389. }
  13390. }
  13391. this.inputShow = true;
  13392. if (cPan == 2) {
  13393. this.steps--;
  13394. return;
  13395. }
  13396. let params = [
  13397. {
  13398. cid: this.cid,
  13399. chapters: JSON.stringify(this.unitJson),
  13400. uid: this.userid,
  13401. unitIndex: _unitIndex,
  13402. },
  13403. ];
  13404. this.ajax
  13405. .post(this.$store.state.api + "updateWorkNew4", params)
  13406. .then((res) => {
  13407. // this.$message({
  13408. // message: "修改成功",
  13409. // type: "success",
  13410. // });
  13411. this.courseId = this.cid;
  13412. this.addtips()
  13413. })
  13414. .catch((err) => {
  13415. this.$message.error("网络不佳");
  13416. console.error(err);
  13417. });
  13418. },
  13419. updateWork() {
  13420. let cPan = 1;
  13421. for (var i = 0; i < this.unitJson.length; i++) {
  13422. for (
  13423. var j = 0;
  13424. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13425. j++
  13426. ) {
  13427. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13428. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13429. if (
  13430. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13431. ) {
  13432. for (
  13433. var z = 0;
  13434. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13435. z++
  13436. ) {
  13437. if (
  13438. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13439. .length
  13440. ) {
  13441. this.$message.error("请把工具添加完整");
  13442. cPan = 2;
  13443. break;
  13444. }
  13445. }
  13446. }
  13447. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13448. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13449. i
  13450. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13451. return ele.value != "" || ele.detail != "" || ele.target != "";
  13452. });
  13453. }
  13454. }
  13455. }
  13456. this.inputShow = true;
  13457. if (cPan == 2) {
  13458. this.steps--;
  13459. return;
  13460. }
  13461. for (var i = 0; i < this.unitJson.length; i++) {
  13462. delete this.unitJson[i].isUpdate;
  13463. }
  13464. if(!this.targetCourseText2){
  13465. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13466. }
  13467. let params = [
  13468. {
  13469. cid: this.cid,
  13470. title: this.courseName,
  13471. brief: this.courseText,
  13472. cover:
  13473. this.cover.length > 0
  13474. ? JSON.stringify(this.cover)
  13475. : JSON.stringify([
  13476. {
  13477. name: "noBanner.jpg",
  13478. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  13479. uid: 1656409780264,
  13480. status: "success",
  13481. },
  13482. ]),
  13483. evaId: this.evalua,
  13484. astudent:
  13485. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13486. see: this.isTeacherSee == true ? 1 : 0,
  13487. chapters: JSON.stringify(this.unitJson),
  13488. template: this.myWord != "undefined" ? this.myWord : [],
  13489. uid: this.userid,
  13490. courseType: JSON.stringify(this.courseTypeId),
  13491. ateacher:
  13492. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13493. inviteCode: JSON.stringify(this.inviteCode),
  13494. refile: JSON.stringify(this.infoData),
  13495. reBrief: this.courseText2,
  13496. cpote: JSON.stringify(this.cpote),
  13497. setting: JSON.stringify({
  13498. courseJie: this.courseJie,
  13499. courseTime: this.courseTime,
  13500. teacherInfoData: this.teacherInfoData,
  13501. teacherCourseText: this.teacherCourseText,
  13502. targetCourseText: this.targetCourseText,
  13503. cankaoInfoData: this.cankaoInfoData,
  13504. mubiaoInfoData: this.mubiaoInfoData,
  13505. xuanzeInfoData: this.xuanzeInfoData,
  13506. pingjiaInfoData: this.pingjiaInfoData,
  13507. infoData2: this.infoData2,
  13508. isuseT: this.isuseT,
  13509. mode: this.mode,
  13510. targetCourseText2: this.targetCourseText2,
  13511. chatid: this.chatid,
  13512. languageSetting: this.languageSetting,
  13513. knowInfoData: this.knowInfoData,
  13514. knowFileids: this.knowFileids,
  13515. knowInfoData2: this.knowInfoData2,
  13516. knowFileids2: this.knowFileids2,
  13517. recordVideoText: this.recordVideoText,
  13518. recordAudioUrl: this.recordAudioUrl,
  13519. appendixFile: this.appendixFile,
  13520. }),
  13521. iresearch: this.isFileSearch ? 1 : 2,
  13522. },
  13523. ];
  13524. this.ajax
  13525. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  13526. .then((res) => {
  13527. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13528. if (this.cidType == 1) {
  13529. this.$message({
  13530. message: "修改成功",
  13531. type: "success",
  13532. });
  13533. } else {
  13534. this.$message({
  13535. message: "新增成功",
  13536. type: "success",
  13537. });
  13538. }
  13539. }
  13540. this.number = this.nbOrder;
  13541. this.courseId = this.cid;
  13542. this.addtips()
  13543. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, "success")
  13544. })
  13545. .catch((err) => {
  13546. this.addOp3('1', "", { courseid: this.courseId ,type: "course_aiMode_clickUpload" }, err)
  13547. this.$message.error("网络不佳");
  13548. console.error(err);
  13549. });
  13550. },
  13551. insertWord() {
  13552. this.dialogVisible1 = true;
  13553. this.updateBoolean2 = false;
  13554. this.tTitle = "";
  13555. this.tdetail = "";
  13556. },
  13557. addWord() {
  13558. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  13559. name: this.tTitle,
  13560. content: this.tdetail,
  13561. uid: this.guid(),
  13562. });
  13563. this.dialogVisible1 = false;
  13564. },
  13565. upWord() { },
  13566. selectWord(uid, i, c) {
  13567. this.dialogVisible1 = true;
  13568. this.updateBoolean2 = true;
  13569. if (
  13570. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  13571. ) {
  13572. this.tTitle =
  13573. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  13574. this.tdetail =
  13575. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  13576. }
  13577. },
  13578. isAddPP() {
  13579. if (this.checkboxList.length > 0) {
  13580. this.$message({
  13581. message: "添加成功",
  13582. type: "success",
  13583. });
  13584. this.dialogVisible3 = false;
  13585. } else {
  13586. this.$message({
  13587. message: "请添加课程成员",
  13588. type: "error",
  13589. });
  13590. }
  13591. },
  13592. isAddClass() {
  13593. this.dialogVisibleClass = false;
  13594. },
  13595. isAddPPTeacher() {
  13596. this.dialogVisibleMember = false;
  13597. this.setMan();
  13598. },
  13599. getTipsTemplate(){
  13600. if(this.templateid){
  13601. let params = {
  13602. id: this.templateid
  13603. }
  13604. this.ajax
  13605. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13606. .then((res) => {
  13607. if(res.data[0].length){
  13608. this.tipsJson = res.data[0][0]
  13609. this.aiJson = JSON.parse(res.data[0][0].tips)
  13610. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13611. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13612. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13613. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13614. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13615. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13616. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13617. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13618. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13619. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13620. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13621. }
  13622. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13623. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13624. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13625. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  13626. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  13627. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  13628. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  13629. - 我们的课程主题可以如何与学生的实际生活联系起来?
  13630. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  13631. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  13632. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  13633. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  13634. - 学生个人最终要完成什么?学生小组最终要完成什么?
  13635. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  13636. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  13637. 问题:<议程和问题引导>中的问题
  13638. 讨论:<转文本内容>`
  13639. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下<讨论>,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  13640. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  13641. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  13642. // }
  13643. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  13644. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13645. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13646. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13647. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  13648. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13649. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  13650. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13651. // }
  13652. this.$forceUpdate();
  13653. this.isDialog = res.data[0][0].isDialog
  13654. }
  13655. })
  13656. .catch((err) => { });
  13657. }
  13658. },
  13659. getTipsTemplateIsDialog(){
  13660. if(this.templateid){
  13661. let params = {
  13662. id: this.templateid
  13663. }
  13664. this.ajax
  13665. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13666. .then((res) => {
  13667. if(res.data[0].length){
  13668. this.isDialog = res.data[0][0].isDialog
  13669. }
  13670. })
  13671. .catch((err) => { });
  13672. }
  13673. },
  13674. getTemplate() {
  13675. this.ajax
  13676. .get(this.$store.state.api + "getCourseTemplateT", "")
  13677. .then((res) => {
  13678. this.templateArray = res.data[0];
  13679. this.getTemplateOid();
  13680. this.$forceUpdate();
  13681. })
  13682. .catch((err) => { });
  13683. },
  13684. getTemplateOid() {
  13685. let params = {
  13686. oid: this.oid,
  13687. };
  13688. this.ajax
  13689. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13690. .then((res) => {
  13691. if (res.data[0].length) {
  13692. this.templateArray = [...res.data[0], ...this.templateArray];
  13693. }
  13694. this.getTemplateOrg();
  13695. this.$forceUpdate();
  13696. })
  13697. .catch((err) => { });
  13698. },
  13699. getTemplateOrg() {
  13700. let params = {
  13701. oid: this.org,
  13702. };
  13703. this.ajax
  13704. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13705. .then((res) => {
  13706. if (res.data[0].length) {
  13707. this.templateArray = [...res.data[0], ...this.templateArray];
  13708. }
  13709. this.$forceUpdate();
  13710. })
  13711. .catch((err) => { });
  13712. },
  13713. clearChoose() {
  13714. this.clearArray.splice(this.templateC.id, 1);
  13715. this.dialogVisible2 = false;
  13716. },
  13717. clearAttText() {
  13718. this.AttText = {
  13719. title: "",
  13720. text: "",
  13721. };
  13722. this.dialogVisible6 = false;
  13723. },
  13724. clearLine() {
  13725. this.line = "";
  13726. this.dialogVisible7 = false;
  13727. },
  13728. openTemplate() {
  13729. this.ctJson = {};
  13730. this.templateDialog = true;
  13731. },
  13732. checkctJson(json) {
  13733. if (this.ctJson.id == json.id) {
  13734. this.ctJson = {};
  13735. } else {
  13736. this.ctJson = json;
  13737. }
  13738. },
  13739. addTemplate(res) {
  13740. let _this = this;
  13741. let _res = [];
  13742. if (res.id == 1) {
  13743. _res = [
  13744. {
  13745. dyName: "", //单元标题
  13746. easy: 1,
  13747. chapterInfo: [
  13748. {
  13749. isread: false,
  13750. chapterid: this.guid(),
  13751. title: "",
  13752. courseName: "",
  13753. taskJson: [
  13754. {
  13755. task: "",
  13756. taskDetail: "",
  13757. chapterData: [],
  13758. toolText: "",
  13759. toolChoose: [
  13760. {
  13761. tool: [],
  13762. toolDetail: "",
  13763. toolType: 0,
  13764. askCount: 1,
  13765. askTitle: "",
  13766. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13767. },
  13768. ],
  13769. isShowTools: false,
  13770. askCount: 1,
  13771. isFold: 1,
  13772. askTitle: "",
  13773. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13774. checkJson: [{ checkCount: [], checkPerent: [] }],
  13775. homeworkList: [],
  13776. },
  13777. ],
  13778. itemCount: 1,
  13779. fileList1: [],
  13780. video: [],
  13781. testData: [],
  13782. pData: [],
  13783. templateArray: [],
  13784. },
  13785. ],
  13786. },
  13787. ];
  13788. this.updateCourseState(1);
  13789. } else if (res.id == 2) {
  13790. let stageData = [];
  13791. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  13792. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  13793. if (!iframe && !iframe2) {
  13794. this.$message.error("请使用AI共创生成");
  13795. return;
  13796. }
  13797. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13798. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13799. if (
  13800. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13801. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13802. ) {
  13803. this.$message.error("请使用AI共创生成");
  13804. return;
  13805. }
  13806. stageData = copyData
  13807. ? copyData.stageData
  13808. : copyData2
  13809. ? copyData2.stageData
  13810. : [""];
  13811. for (var i = 0; i < stageData.length; i++) {
  13812. _res.push({
  13813. dyName: stageData[i], //单元标题
  13814. chapterInfo: [
  13815. {
  13816. isread: false,
  13817. chapterid: this.guid(),
  13818. title: "",
  13819. courseName: "",
  13820. taskJson: [
  13821. {
  13822. task: "",
  13823. taskDetail: "",
  13824. chapterData: [],
  13825. toolText: "",
  13826. toolChoose: [
  13827. {
  13828. tool: [],
  13829. toolDetail: "",
  13830. toolType: 0,
  13831. askCount: 1,
  13832. askTitle: "",
  13833. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13834. },
  13835. ],
  13836. isShowTools: false,
  13837. askCount: 1,
  13838. isFold: 1,
  13839. askTitle: "",
  13840. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13841. checkJson: [{ checkCount: [], checkPerent: [] }],
  13842. homeworkList: [],
  13843. },
  13844. ],
  13845. itemCount: 1,
  13846. fileList1: [],
  13847. video: [],
  13848. testData: [],
  13849. pData: [],
  13850. templateArray: [],
  13851. },
  13852. ],
  13853. });
  13854. }
  13855. this.updateCourseState(1);
  13856. } else if (!Object.keys(res).length) {
  13857. this.$message.error("请选择模板");
  13858. retrun;
  13859. } else {
  13860. _res = JSON.parse(res.chapters);
  13861. this.updateCourseState(parseInt(res.state));
  13862. }
  13863. _this
  13864. .$confirm(
  13865. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13866. "提示",
  13867. {
  13868. confirmButtonText: "确定",
  13869. cancelButtonText: "取消",
  13870. type: "warning",
  13871. }
  13872. )
  13873. .then(() => {
  13874. _this.unitJson = _res;
  13875. _this.updateWork();
  13876. // _this.steps++;
  13877. _this.templateDialog = false;
  13878. setTimeout(() => {
  13879. this.checkEva(this.checkId);
  13880. setTimeout(() => {
  13881. this.checkEva(this.checkId);
  13882. }, 100);
  13883. }, 1000);
  13884. })
  13885. .catch(() => {
  13886. return;
  13887. });
  13888. },
  13889. checkTemplate(res) {
  13890. let _this = this;
  13891. _this
  13892. .$confirm(
  13893. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13894. "提示",
  13895. {
  13896. confirmButtonText: "确定",
  13897. cancelButtonText: "取消",
  13898. type: "warning",
  13899. }
  13900. )
  13901. .then(() => {
  13902. _this.unitJson = JSON.parse(res.chapters);
  13903. _this.steps++;
  13904. setTimeout(() => {
  13905. this.checkEva(this.checkId);
  13906. setTimeout(() => {
  13907. this.checkEva(this.checkId);
  13908. }, 100);
  13909. }, 1000);
  13910. })
  13911. .catch(() => {
  13912. return;
  13913. });
  13914. },
  13915. checkTemplate1(w) {
  13916. this.steps++;
  13917. },
  13918. checkTemplate2() {
  13919. let _this = this;
  13920. _this
  13921. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  13922. confirmButtonText: "确定",
  13923. cancelButtonText: "取消",
  13924. type: "warning",
  13925. })
  13926. .then(() => {
  13927. _this.unitIndex = 0;
  13928. _this.unitJson = [
  13929. {
  13930. dyName: "", //单元标题
  13931. chapterInfo: [
  13932. {
  13933. isread: false,
  13934. chapterid: this.guid(),
  13935. title: "",
  13936. courseName: "",
  13937. taskJson: [
  13938. {
  13939. task: "",
  13940. taskDetail: "",
  13941. chapterData: [],
  13942. toolText: "",
  13943. toolChoose: [
  13944. {
  13945. tool: [],
  13946. toolDetail: "",
  13947. toolType: 0,
  13948. askCount: 1,
  13949. askTitle: "",
  13950. askJson: [
  13951. { askstitle: "", askItem: 1, checkList: [] },
  13952. ],
  13953. },
  13954. ],
  13955. isShowTools: false,
  13956. askCount: 1,
  13957. isFold: 1,
  13958. askTitle: "",
  13959. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13960. checkJson: [{ checkCount: [], checkPerent: [] }],
  13961. homeworkList: [],
  13962. },
  13963. ],
  13964. itemCount: 1,
  13965. fileList1: [],
  13966. video: [],
  13967. testData: [],
  13968. pData: [],
  13969. templateArray: [],
  13970. },
  13971. ],
  13972. },
  13973. ];
  13974. this.steps++;
  13975. setTimeout(() => {
  13976. this.checkEva(this.checkId);
  13977. setTimeout(() => {
  13978. this.checkEva(this.checkId);
  13979. }, 100);
  13980. }, 1000);
  13981. this.updateWork();
  13982. })
  13983. .catch(() => {
  13984. return;
  13985. });
  13986. },
  13987. checkTemplate3() {
  13988. let _this = this;
  13989. _this
  13990. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  13991. confirmButtonText: "确定",
  13992. cancelButtonText: "取消",
  13993. type: "warning",
  13994. })
  13995. .then(() => {
  13996. _this.unitIndex = 0;
  13997. _this.unitJson = [
  13998. {
  13999. dyName: "", //单元标题
  14000. easy: 1,
  14001. chapterInfo: [
  14002. {
  14003. isread: false,
  14004. chapterid: this.guid(),
  14005. title: "",
  14006. courseName: "",
  14007. taskJson: [
  14008. {
  14009. task: "",
  14010. taskDetail: "",
  14011. chapterData: [],
  14012. toolText: "",
  14013. toolChoose: [
  14014. {
  14015. tool: [],
  14016. toolDetail: "",
  14017. toolType: 0,
  14018. askCount: 1,
  14019. askTitle: "",
  14020. askJson: [
  14021. { askstitle: "", askItem: 1, checkList: [] },
  14022. ],
  14023. },
  14024. ],
  14025. isShowTools: false,
  14026. askCount: 1,
  14027. isFold: 1,
  14028. askTitle: "",
  14029. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14030. checkJson: [{ checkCount: [], checkPerent: [] }],
  14031. homeworkList: [],
  14032. },
  14033. ],
  14034. itemCount: 1,
  14035. fileList1: [],
  14036. video: [],
  14037. testData: [],
  14038. pData: [],
  14039. templateArray: [],
  14040. },
  14041. ],
  14042. },
  14043. ];
  14044. // this.steps++;
  14045. this.updateWork();
  14046. })
  14047. .catch(() => {
  14048. return;
  14049. });
  14050. },
  14051. checkTemplate4() {
  14052. let _this = this;
  14053. _this
  14054. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  14055. confirmButtonText: "确定",
  14056. cancelButtonText: "取消",
  14057. type: "warning",
  14058. })
  14059. .then(() => {
  14060. _this.unitIndex = 0;
  14061. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  14062. this.steps++;
  14063. this.updateWork();
  14064. })
  14065. .catch(() => {
  14066. return;
  14067. });
  14068. },
  14069. wordNext() {
  14070. this.dialogVisible2 = false;
  14071. },
  14072. isAddOrUpdateAttText() {
  14073. if (this.AttTextType == 0) {
  14074. this.addAttTextMessage();
  14075. } else {
  14076. this.updateAttText();
  14077. }
  14078. },
  14079. isAddOrUpdateLine() {
  14080. if (!this.lineTitle) {
  14081. this.$message.error("请填写链接标题");
  14082. return;
  14083. }
  14084. if (this.lineType == 0) {
  14085. this.addLine();
  14086. } else {
  14087. this.updateLine();
  14088. }
  14089. },
  14090. addAttTextMessage() {
  14091. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14092. this.taskCount
  14093. ].chapterData.unshift({
  14094. name: this.AttText.title,
  14095. url: this.AttText.text,
  14096. type: 6,
  14097. });
  14098. this.imgChange1(null, null, 6, this.taskCount);
  14099. this.dialogVisible6 = false;
  14100. },
  14101. selectAttText(itemTaskIndex, i) {
  14102. this.AttText.title =
  14103. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14104. itemTaskIndex
  14105. ].chapterData[i].name;
  14106. this.AttText.text =
  14107. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14108. itemTaskIndex
  14109. ].chapterData[i].url;
  14110. this.taskCount = itemTaskIndex;
  14111. this.AttTextIndex = i;
  14112. this.AttTextType = 1;
  14113. this.dialogVisible6 = true;
  14114. },
  14115. updateAttText() {
  14116. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14117. this.taskCount
  14118. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  14119. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14120. this.taskCount
  14121. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  14122. this.dialogVisible6 = false;
  14123. },
  14124. addLine() {
  14125. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14126. this.lineCount
  14127. ].chapterData.unshift({
  14128. name: "链接",
  14129. title: this.lineTitle,
  14130. url: this.line,
  14131. type: 8,
  14132. });
  14133. this.imgChange1(null, null, 8, this.lineCount);
  14134. this.dialogVisible7 = false;
  14135. },
  14136. selectLine(itemTaskIndex, i) {
  14137. this.line =
  14138. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14139. itemTaskIndex
  14140. ].chapterData[i].url;
  14141. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14142. itemTaskIndex
  14143. ].chapterData[i].title
  14144. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14145. .chapterData[i].title
  14146. : "";
  14147. this.taskCount = itemTaskIndex;
  14148. this.lineCount = i;
  14149. this.lineType = 1;
  14150. this.dialogVisible7 = true;
  14151. },
  14152. openUpdateSource(itemTaskIndex, i) {
  14153. this.sourceData = {};
  14154. let source =
  14155. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14156. .chapterData[i];
  14157. this.sourceData[source.id] = {};
  14158. this.sourceData[source.id].name = source.title;
  14159. this.sourceData[source.id].url = source.url;
  14160. this.dialogVisibleSource = true;
  14161. this.updateSourcePan = true;
  14162. this.taskCount = itemTaskIndex;
  14163. this.lineCount = i;
  14164. },
  14165. updateLine() {
  14166. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14167. this.taskCount
  14168. ].chapterData[this.lineCount].url = this.line;
  14169. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14170. this.taskCount
  14171. ].chapterData[this.lineCount].title = this.lineTitle;
  14172. this.dialogVisible7 = false;
  14173. },
  14174. addPP() {
  14175. this.dialogVisible3 = true;
  14176. },
  14177. goTo(path) {
  14178. this.$router.push(path);
  14179. },
  14180. openTools(itemTaskIndex, i, toolIndex) {
  14181. this.toolIndex = toolIndex;
  14182. this.taskCount = itemTaskIndex;
  14183. if (i == 4) {
  14184. if (toolIndex == null) {
  14185. var a =
  14186. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14187. .chapterData;
  14188. for (var i = 0; i < a.length; i++) {
  14189. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  14190. this.askJson =
  14191. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14192. itemTaskIndex
  14193. ].chapterData[i].askJson;
  14194. }
  14195. }
  14196. } else {
  14197. this.askJson = JSON.parse(
  14198. JSON.stringify(
  14199. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14200. itemTaskIndex
  14201. ].toolChoose[toolIndex]
  14202. )
  14203. );
  14204. }
  14205. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  14206. this.dialogVisible5 = true;
  14207. } else if (i == 45) {
  14208. if (
  14209. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14210. .toolChoose[toolIndex].testJson
  14211. ) {
  14212. this.testJson = JSON.parse(
  14213. JSON.stringify(
  14214. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14215. itemTaskIndex
  14216. ].toolChoose[toolIndex].testJson
  14217. )
  14218. );
  14219. } else {
  14220. var testJson = {
  14221. testCount: 1,
  14222. testTitle: "",
  14223. testJson: [
  14224. {
  14225. teststitle: "",
  14226. testItem: 1,
  14227. checkList: [],
  14228. timuList: [],
  14229. answer: [],
  14230. type: "1",
  14231. },
  14232. ],
  14233. };
  14234. this.testJson = testJson;
  14235. }
  14236. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  14237. this.dialogVisibleChoice = true;
  14238. } else if (i == 47) {
  14239. if (
  14240. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14241. .toolChoose[toolIndex].sentenceList
  14242. ) {
  14243. this.sentenceList = JSON.parse(
  14244. JSON.stringify(
  14245. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14246. itemTaskIndex
  14247. ].toolChoose[toolIndex].sentenceList
  14248. )
  14249. );
  14250. } else {
  14251. var sentenceList = [
  14252. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14253. ];
  14254. this.sentenceList = sentenceList;
  14255. }
  14256. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  14257. this.dialogVisibleSentence = true;
  14258. } else if (i == 48) {
  14259. if (
  14260. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14261. .toolChoose[toolIndex].tableJson
  14262. ) {
  14263. this.tableJson = JSON.parse(
  14264. JSON.stringify(
  14265. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14266. itemTaskIndex
  14267. ].toolChoose[toolIndex].tableJson
  14268. )
  14269. );
  14270. } else {
  14271. var tableJson = { text: "" };
  14272. this.tableJson = tableJson;
  14273. }
  14274. this.dialogVisibleTable = true;
  14275. } else if (i == 52) {
  14276. if (
  14277. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14278. .toolChoose[toolIndex].wordJson
  14279. ) {
  14280. this.wordJson = JSON.parse(
  14281. JSON.stringify(
  14282. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14283. itemTaskIndex
  14284. ].toolChoose[toolIndex].wordJson
  14285. )
  14286. );
  14287. } else {
  14288. var wordJson = { text: "" };
  14289. this.wordJson = wordJson;
  14290. }
  14291. this.dialogVisibleWord = true;
  14292. // else if (i == 50) {
  14293. // if (
  14294. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14295. // .toolChoose[toolIndex].uploadJson
  14296. // ) {
  14297. // this.uploadJson = JSON.parse(
  14298. // JSON.stringify(
  14299. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14300. // itemTaskIndex
  14301. // ].toolChoose[toolIndex].uploadJson
  14302. // )
  14303. // );
  14304. // } else {
  14305. // var uploadJson = [];
  14306. // this.uploadJson = uploadJson;
  14307. // }
  14308. // this.dialogVisibleMoreUpload = true;
  14309. // }
  14310. } else if (i == 10) {
  14311. if (
  14312. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14313. .toolChoose[toolIndex].preTime
  14314. ) {
  14315. this.preTime = JSON.parse(
  14316. JSON.stringify(
  14317. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14318. itemTaskIndex
  14319. ].toolChoose[toolIndex].preTime
  14320. )
  14321. );
  14322. } else {
  14323. var preTime = 0;
  14324. this.preTime = preTime;
  14325. }
  14326. this.dialogVisiblePreTime = true;
  14327. } else if (i == 49) {
  14328. if (
  14329. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14330. .toolChoose[toolIndex].groupJson
  14331. ) {
  14332. this.groupJson = JSON.parse(
  14333. JSON.stringify(
  14334. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14335. itemTaskIndex
  14336. ].toolChoose[toolIndex].groupJson
  14337. )
  14338. );
  14339. } else {
  14340. var groupJson = {
  14341. group: [{ name: "第1组" }],
  14342. number: undefined,
  14343. islock: 1,
  14344. };
  14345. this.groupJson = groupJson;
  14346. }
  14347. this.dialogVisibleGroup = true;
  14348. } else if (i == 62) {
  14349. if (
  14350. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14351. .toolChoose[toolIndex].videoJson
  14352. ) {
  14353. this.videoJson = JSON.parse(
  14354. JSON.stringify(
  14355. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14356. itemTaskIndex
  14357. ].toolChoose[toolIndex].videoJson
  14358. )
  14359. );
  14360. } else {
  14361. var videoJson = {
  14362. video: "",
  14363. setting: [],
  14364. };
  14365. this.videoJson = videoJson;
  14366. }
  14367. this.dialogVisibleVideo = true;
  14368. } else if (i == 15) {
  14369. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14370. itemTaskIndex
  14371. ].toolChoose[toolIndex].answerQ
  14372. ? JSON.parse(
  14373. JSON.stringify(
  14374. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14375. itemTaskIndex
  14376. ].toolChoose[toolIndex].answerQ
  14377. )
  14378. )
  14379. : "";
  14380. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  14381. this.dialogVisible8 = true;
  14382. } else if (i == 40) {
  14383. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14384. itemTaskIndex
  14385. ].toolChoose[toolIndex].rateJson
  14386. ? JSON.parse(
  14387. JSON.stringify(
  14388. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14389. itemTaskIndex
  14390. ].toolChoose[toolIndex].rateJson
  14391. )
  14392. )
  14393. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  14394. this.selectSteps = 1;
  14395. this.dialogVisibleRate = true;
  14396. } else if (i == 42) {
  14397. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14398. itemTaskIndex
  14399. ].toolChoose[toolIndex].answerQ
  14400. ? JSON.parse(
  14401. JSON.stringify(
  14402. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14403. itemTaskIndex
  14404. ].toolChoose[toolIndex].answerQ
  14405. )
  14406. )
  14407. : "";
  14408. this.dialogVisibleMp3 = true;
  14409. } else if (i == 41) {
  14410. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14411. itemTaskIndex
  14412. ].toolChoose[toolIndex].selectJson
  14413. ? JSON.parse(
  14414. JSON.stringify(
  14415. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14416. itemTaskIndex
  14417. ].toolChoose[toolIndex].selectJson
  14418. )
  14419. )
  14420. : { url: "", select: [], answer: [] };
  14421. this.selectSteps = 1;
  14422. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  14423. this.dialogVisibleSelect = true;
  14424. } else if (i == 3) {
  14425. window.topU.postMessage(
  14426. {
  14427. tools: "3y",
  14428. cid: this.cid,
  14429. stage: this.unitIndex,
  14430. task: itemTaskIndex,
  14431. tool: toolIndex,
  14432. },
  14433. "*"
  14434. );
  14435. } else if (i == 1) {
  14436. window.topU.postMessage(
  14437. {
  14438. tools: "1y",
  14439. cid: this.cid,
  14440. stage: this.unitIndex,
  14441. task: itemTaskIndex,
  14442. tool: toolIndex,
  14443. },
  14444. "*"
  14445. );
  14446. } else if (i == 57) {
  14447. window.topU.postMessage(
  14448. {
  14449. tools: "57y",
  14450. cid: this.cid,
  14451. stage: this.unitIndex,
  14452. task: itemTaskIndex,
  14453. tool: toolIndex,
  14454. },
  14455. "*"
  14456. );
  14457. } else if (i == 69) {
  14458. this.englishList = {};
  14459. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  14460. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  14461. ? JSON.parse(
  14462. JSON.stringify(
  14463. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14464. itemTaskIndex
  14465. ].toolChoose[toolIndex].englishList
  14466. )
  14467. )
  14468. : {};
  14469. this.$forceUpdate();
  14470. this.englishDialogVisible = true;
  14471. } else if (i == 70) {
  14472. this.englishVoiceJson = {};
  14473. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  14474. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  14475. ? JSON.parse(
  14476. JSON.stringify(
  14477. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14478. itemTaskIndex
  14479. ].toolChoose[toolIndex].englishVoiceJson
  14480. )
  14481. )
  14482. : {
  14483. title: '',
  14484. detail: '',
  14485. array: []
  14486. };
  14487. // {
  14488. // time: "",
  14489. // class: "",
  14490. // difficulty: 0,
  14491. // topic: "",
  14492. // isShow: false,
  14493. // eva: 0,
  14494. // aiEva: {
  14495. // isAiEva: false,
  14496. // aiEvaChoose: [],
  14497. // },
  14498. // allfType: [],
  14499. // englishJson: {},
  14500. // };
  14501. this.$forceUpdate();
  14502. this.EnglishVoiceDialog = true;
  14503. }else if(i == 72){
  14504. let appJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14505. itemTaskIndex
  14506. ].toolChoose[toolIndex].appJson
  14507. ? JSON.parse(
  14508. JSON.stringify(
  14509. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14510. itemTaskIndex
  14511. ].toolChoose[toolIndex].appJson
  14512. )
  14513. )
  14514. : {
  14515. url:'',
  14516. };
  14517. this.$forceUpdate();
  14518. this.$refs.appDialog.openG(appJson,this.unitIndex,itemTaskIndex,toolIndex);
  14519. }
  14520. if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
  14521. && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
  14522. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
  14523. }
  14524. },
  14525. setEnglishVoiceJson(val) {
  14526. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14527. this.taskCount
  14528. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  14529. JSON.stringify(val)
  14530. );
  14531. this.$forceUpdate();
  14532. if (
  14533. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14534. .toolChoose[this.toolIndex].tool != 70
  14535. ) {
  14536. this.addTools(70, this.taskCount, this.toolIndex);
  14537. }
  14538. },
  14539. chapAddTools(i) {
  14540. if (this.chapTools[0].tools.length == 0) {
  14541. this.chapTools[0].tools.push(i);
  14542. } else {
  14543. if (this.chapTools[0].tools.indexOf(i) != -1) {
  14544. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  14545. } else {
  14546. this.chapTools[0].tools.push(i);
  14547. }
  14548. }
  14549. this.$forceUpdate();
  14550. },
  14551. addChaptersDataTools() {
  14552. if (this.chapTools[0].tools.indexOf(4) != -1) {
  14553. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14554. this.chapCount
  14555. ].chapterData.unshift({
  14556. name: this.chapTools[0].toolDetail,
  14557. url: this.chapTools[0].tools,
  14558. type: 7,
  14559. askJson: this.askJson,
  14560. });
  14561. } else {
  14562. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14563. this.chapCount
  14564. ].chapterData.unshift({
  14565. name: this.chapTools[0].toolDetail,
  14566. url: this.chapTools[0].tools,
  14567. type: 7,
  14568. });
  14569. }
  14570. this.imgChange1(null, null, 7, this.chapCount);
  14571. this.dialogVisible4 = false;
  14572. },
  14573. addTools(i, itemTaskIndex, toolIndex) {
  14574. // if (
  14575. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14576. // .toolChoose[toolIndex].tool.length == 0
  14577. // ) {
  14578. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14579. // itemTaskIndex
  14580. // ].toolChoose[toolIndex].tool.push(i);
  14581. // } else {
  14582. // if (
  14583. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14584. // itemTaskIndex
  14585. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14586. // ) {
  14587. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14588. // itemTaskIndex
  14589. // ].toolChoose[toolIndex].tool.splice(
  14590. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14591. // itemTaskIndex
  14592. // ].toolChoose[toolIndex].tool.indexOf(i),
  14593. // 1
  14594. // );
  14595. // } else {
  14596. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14597. // itemTaskIndex
  14598. // ].toolChoose[toolIndex].tool.push(i);
  14599. // }
  14600. // console.log(
  14601. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14602. // .toolChoose[toolIndex].tool
  14603. // );
  14604. // }
  14605. if (i == 4) {
  14606. if (
  14607. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14608. .toolChoose[toolIndex].askJson.askTitle == "" ||
  14609. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14610. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  14611. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14612. .toolChoose[toolIndex].askJson[0].checkList < 2
  14613. ) {
  14614. this.openTools(itemTaskIndex, 4, toolIndex);
  14615. // this.$message({
  14616. // message: "请填写完整问卷内容",
  14617. // type: "error",
  14618. // });
  14619. return;
  14620. }
  14621. }
  14622. if (i == 45) {
  14623. if (
  14624. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14625. .toolChoose[toolIndex].testJson ||
  14626. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14627. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  14628. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14629. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  14630. ) {
  14631. this.openTools(itemTaskIndex, 45, toolIndex);
  14632. // this.$message({
  14633. // message: "请填写完整问卷内容",
  14634. // type: "error",
  14635. // });
  14636. return;
  14637. }
  14638. }
  14639. if (i == 47) {
  14640. if (
  14641. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14642. .toolChoose[toolIndex].sentenceList ||
  14643. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14644. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  14645. ) {
  14646. this.openTools(itemTaskIndex, 47, toolIndex);
  14647. return;
  14648. }
  14649. }
  14650. if (i == 69) {
  14651. if (
  14652. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14653. .toolChoose[toolIndex].englishList
  14654. ) {
  14655. this.openTools(itemTaskIndex, 69, toolIndex);
  14656. return;
  14657. }
  14658. }
  14659. if (i == 70) {
  14660. if (
  14661. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14662. .toolChoose[toolIndex].englishVoiceJson
  14663. ) {
  14664. this.openTools(itemTaskIndex, 70, toolIndex);
  14665. return;
  14666. }
  14667. }
  14668. if(i == 72){
  14669. if (
  14670. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14671. .toolChoose[toolIndex].appJson || Object.keys(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14672. .toolChoose[toolIndex].appJson).length == 0
  14673. ) {
  14674. this.openTools(itemTaskIndex, 72, toolIndex);
  14675. return;
  14676. }
  14677. }
  14678. // if (i == 48) {
  14679. // if (
  14680. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14681. // .toolChoose[toolIndex].tableJson
  14682. // ) {
  14683. // this.openTools(itemTaskIndex, 48, toolIndex);
  14684. // return;
  14685. // }
  14686. // }
  14687. // if (i == 50) {
  14688. // if (
  14689. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14690. // .toolChoose[toolIndex].uploadJson
  14691. // ) {
  14692. // this.openTools(itemTaskIndex, 50, toolIndex);
  14693. // return;
  14694. // }
  14695. // }
  14696. if (i == 49) {
  14697. if (
  14698. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14699. .toolChoose[toolIndex].groupJson
  14700. ) {
  14701. this.openTools(itemTaskIndex, 49, toolIndex);
  14702. return;
  14703. }
  14704. }
  14705. if (i == 62) {
  14706. if (
  14707. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14708. .toolChoose[toolIndex].videoJson
  14709. ) {
  14710. this.openTools(itemTaskIndex, 62, toolIndex);
  14711. return;
  14712. }
  14713. }
  14714. if (i == 15) {
  14715. if (
  14716. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14717. .toolChoose[toolIndex].answerQ ||
  14718. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14719. .toolChoose[toolIndex].answerQ == ""
  14720. ) {
  14721. this.openTools(itemTaskIndex, 15, toolIndex);
  14722. // this.$message({
  14723. // message: "请填写问答内容",
  14724. // type: "error",
  14725. // });
  14726. return;
  14727. }
  14728. }
  14729. if (i == 40) {
  14730. if (
  14731. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14732. .toolChoose[toolIndex].rateJson ||
  14733. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14734. .toolChoose[toolIndex].rateJson.length
  14735. ) {
  14736. this.openTools(itemTaskIndex, 40, toolIndex);
  14737. return;
  14738. }
  14739. }
  14740. if (i == 41) {
  14741. if (
  14742. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14743. .toolChoose[toolIndex].selectJson ||
  14744. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14745. .toolChoose[toolIndex].selectJson.url == "" ||
  14746. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14747. .toolChoose[toolIndex].selectJson.select.length ||
  14748. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14749. .toolChoose[toolIndex].selectJson.answer.length
  14750. ) {
  14751. this.openTools(itemTaskIndex, 41, toolIndex);
  14752. return;
  14753. }
  14754. }
  14755. if (i == 42) {
  14756. if (
  14757. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14758. .toolChoose[toolIndex].answerQ ||
  14759. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14760. .toolChoose[toolIndex].answerQ == ""
  14761. ) {
  14762. this.openTools(itemTaskIndex, 42, toolIndex);
  14763. return;
  14764. }
  14765. }
  14766. if (
  14767. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14768. .toolChoose[toolIndex].tool.length > 0
  14769. ) {
  14770. if (
  14771. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14772. itemTaskIndex
  14773. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14774. ) {
  14775. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14776. itemTaskIndex
  14777. ].toolChoose[toolIndex].tool.splice(
  14778. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14779. itemTaskIndex
  14780. ].toolChoose[toolIndex].tool.indexOf(i),
  14781. 1
  14782. );
  14783. } else {
  14784. // this.$message({
  14785. // message: "每个工具只能添加一个",
  14786. // type: "error",
  14787. // });
  14788. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14789. itemTaskIndex
  14790. ].toolChoose[toolIndex].tool = [];
  14791. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14792. itemTaskIndex
  14793. ].toolChoose[toolIndex].tool.push(i);
  14794. }
  14795. } else {
  14796. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14797. itemTaskIndex
  14798. ].toolChoose[toolIndex].tool.push(i);
  14799. }
  14800. if(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].tool[0] != 72
  14801. && !!this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson){
  14802. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex].toolChoose[toolIndex].appJson = null
  14803. }
  14804. this.$forceUpdate();
  14805. },
  14806. addAskList(index) {
  14807. this.askJson.askJson.splice(index + 1, 0, {
  14808. askstitle: "",
  14809. askItem: 1,
  14810. checkList: [],
  14811. });
  14812. this.askJson.askCount++;
  14813. },
  14814. addTestList(index) {
  14815. this.testJson.testJson.splice(index + 1, 0, {
  14816. teststitle: "",
  14817. testItem: 1,
  14818. checkList: [],
  14819. timuList: [],
  14820. answer: [],
  14821. type: "1",
  14822. });
  14823. this.testJson.testCount++;
  14824. },
  14825. deleteAskList(index) {
  14826. if (
  14827. !this.askJson.askJson[index].askstitle &&
  14828. this.askJson.askJson[index].askItem == 1 &&
  14829. !this.askJson.askJson[index].checkList[0]
  14830. ) {
  14831. this.askJson.askJson.splice(index, 1);
  14832. this.askJson.askCount--;
  14833. } else {
  14834. let _this = this;
  14835. _this
  14836. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14837. confirmButtonText: "确定",
  14838. cancelButtonText: "取消",
  14839. type: "warning",
  14840. })
  14841. .then(() => {
  14842. _this.askJson.askJson.splice(index, 1);
  14843. _this.askJson.askCount--;
  14844. })
  14845. .catch(() => {
  14846. return;
  14847. });
  14848. }
  14849. },
  14850. deleteTestList(index) {
  14851. if (
  14852. !this.testJson.testJson[index].teststitle &&
  14853. this.testJson.testJson[index].testItem == 1 &&
  14854. !this.testJson.testJson[index].checkList[0]
  14855. ) {
  14856. this.testJson.testJson.splice(index, 1);
  14857. this.testJson.testCount--;
  14858. } else {
  14859. let _this = this;
  14860. _this
  14861. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14862. confirmButtonText: "确定",
  14863. cancelButtonText: "取消",
  14864. type: "warning",
  14865. })
  14866. .then(() => {
  14867. _this.testJson.testJson.splice(index, 1);
  14868. _this.testJson.testCount--;
  14869. })
  14870. .catch(() => {
  14871. return;
  14872. });
  14873. }
  14874. },
  14875. askMove(type, index) {
  14876. if (type == 1) {
  14877. if (index > 0) {
  14878. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  14879. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14880. this.askJson.askJson[index - 1] = b;
  14881. this.askJson.askJson[index] = a;
  14882. }
  14883. } else {
  14884. if (index < this.askJson.askJson.length - 1) {
  14885. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  14886. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14887. this.askJson.askJson[index + 1] = b;
  14888. this.askJson.askJson[index] = a;
  14889. }
  14890. }
  14891. this.$forceUpdate();
  14892. },
  14893. checkMove(type, index, checkIndex) {
  14894. if (type == 1) {
  14895. if (checkIndex > 0) {
  14896. let a = JSON.parse(
  14897. JSON.stringify(
  14898. this.askJson.askJson[index].checkList[checkIndex - 1]
  14899. )
  14900. );
  14901. let b = JSON.parse(
  14902. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14903. );
  14904. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  14905. this.askJson.askJson[index].checkList[checkIndex] = a;
  14906. }
  14907. } else {
  14908. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  14909. let a = JSON.parse(
  14910. JSON.stringify(
  14911. this.askJson.askJson[index].checkList[checkIndex + 1]
  14912. )
  14913. );
  14914. let b = JSON.parse(
  14915. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14916. );
  14917. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  14918. this.askJson.askJson[index].checkList[checkIndex] = a;
  14919. }
  14920. }
  14921. this.$forceUpdate();
  14922. },
  14923. testMove(type, index) {
  14924. if (type == 1) {
  14925. if (index > 0) {
  14926. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  14927. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14928. this.testJson.testJson[index - 1] = b;
  14929. this.testJson.testJson[index] = a;
  14930. }
  14931. } else {
  14932. if (index < this.testJson.testJson.length - 1) {
  14933. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  14934. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14935. this.testJson.testJson[index + 1] = b;
  14936. this.testJson.testJson[index] = a;
  14937. }
  14938. }
  14939. this.$forceUpdate();
  14940. },
  14941. tcheckMove(type, index, checkIndex) {
  14942. if (type == 1) {
  14943. if (checkIndex > 0) {
  14944. let a = JSON.parse(
  14945. JSON.stringify(
  14946. this.testJson.testJson[index].checkList[checkIndex - 1]
  14947. )
  14948. );
  14949. let b = JSON.parse(
  14950. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14951. );
  14952. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  14953. this.testJson.testJson[index].checkList[checkIndex] = a;
  14954. }
  14955. } else {
  14956. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  14957. let a = JSON.parse(
  14958. JSON.stringify(
  14959. this.testJson.testJson[index].checkList[checkIndex + 1]
  14960. )
  14961. );
  14962. let b = JSON.parse(
  14963. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14964. );
  14965. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  14966. this.testJson.testJson[index].checkList[checkIndex] = a;
  14967. }
  14968. }
  14969. this.$forceUpdate();
  14970. },
  14971. addcheckList(json, index) {
  14972. // json.checkList.length++;
  14973. json.checkList.splice(index + 1, 0, "");
  14974. json.askItem++;
  14975. this.$forceUpdate();
  14976. },
  14977. deletecheckList(json, index) {
  14978. // json.checkList.length--;
  14979. json.checkList.splice(index, 1);
  14980. json.askItem--;
  14981. this.$forceUpdate();
  14982. },
  14983. addTcheckList(json, index) {
  14984. // json.checkList.length++;
  14985. json.checkList.splice(index + 1, 0, "");
  14986. json.testItem++;
  14987. this.$forceUpdate();
  14988. },
  14989. deleteTcheckList(json, index) {
  14990. // json.checkList.length--;
  14991. json.checkList.splice(index, 1);
  14992. json.testItem--;
  14993. this.$forceUpdate();
  14994. },
  14995. checkTestType(type, json) {
  14996. json.type = type;
  14997. setTimeout(() => {
  14998. json.answer = [];
  14999. }, 100);
  15000. },
  15001. checkAskType(type, json) {
  15002. json.type = type;
  15003. // json.checkList = [];
  15004. this.$forceUpdate();
  15005. },
  15006. addSelectList(json) {
  15007. json.select.push("");
  15008. json.answer.push("");
  15009. },
  15010. deleteSelectList(json) {
  15011. // json.select.length--;
  15012. // json.answer.length--;
  15013. json.select.splice(json.select.length - 1, 1);
  15014. json.answer.splice(json.answer.length - 1, 1);
  15015. },
  15016. addAsk() {
  15017. if (this.askJson.askTitle === "") {
  15018. this.$message.error("标题不能为空!");
  15019. return;
  15020. }
  15021. var aj = this.askJson.askJson;
  15022. var b = 1;
  15023. for (var i = 0; i < aj.length; i++) {
  15024. if (aj[i].askstitle === "") {
  15025. var a = 1;
  15026. for (let index = 0; index < aj[i].askItem; index++) {
  15027. const element = aj[i].checkList[index]
  15028. ? aj[i].checkList[index]
  15029. : "";
  15030. if (element != "") {
  15031. b++;
  15032. this.$message.error(`请将题目${i + 1}填写完整。`);
  15033. return;
  15034. } else {
  15035. a++;
  15036. }
  15037. }
  15038. if (b == 1) {
  15039. this.$message.error("至少填写一个问题");
  15040. return;
  15041. }
  15042. } else if (aj[i].askstitle != "") {
  15043. for (let index = 0; index < aj[i].askItem; index++) {
  15044. const element = aj[i].checkList[index]
  15045. ? aj[i].checkList[index]
  15046. : "";
  15047. var index = 0;
  15048. for (var z = 0; z < aj[i].checkList.length; z++) {
  15049. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15050. if (checkC != "") {
  15051. index++;
  15052. } else {
  15053. this.$message.error(`题目${i + 1}选项不能为空!`);
  15054. return;
  15055. }
  15056. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15057. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15058. if (checkC == checkC2) {
  15059. this.$message.error(
  15060. `第${i + 1}题的选项${this.optionTypeList[z]}和选项${this.optionTypeList[z2]}重复了,请修改!`
  15061. );
  15062. return;
  15063. }
  15064. }
  15065. }
  15066. b++;
  15067. if (index < 2) {
  15068. this.$message.error("每道题目至少需要设置2个选项。");
  15069. return;
  15070. }
  15071. }
  15072. }
  15073. }
  15074. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  15075. var elc = el.checkList.filter((element) => {
  15076. return element != "";
  15077. });
  15078. return el.askstitle != "" && elc.length != 0;
  15079. });
  15080. if (!this.dialogVisible4) {
  15081. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15082. this.taskCount
  15083. ].toolChoose[this.toolIndex] = this.askJson;
  15084. }
  15085. this.dialogVisible5 = false;
  15086. if (
  15087. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15088. .toolChoose[this.toolIndex].tool != 4
  15089. ) {
  15090. this.addTools(4, this.taskCount, this.toolIndex);
  15091. }
  15092. },
  15093. addTest() {
  15094. // if (this.testJson.testTitle === "") {
  15095. // this.$message.error("标题不能为空!");
  15096. // return;
  15097. // }
  15098. var aj = this.testJson.testJson;
  15099. var b = 1;
  15100. for (var i = 0; i < aj.length; i++) {
  15101. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  15102. var a = 1;
  15103. for (let index = 0; index < aj[i].testItem; index++) {
  15104. const element = aj[i].checkList[index]
  15105. ? aj[i].checkList[index]
  15106. : "";
  15107. if (element != "") {
  15108. b++;
  15109. this.$message.error(`请将题目${i + 1}填写完整。`);
  15110. return;
  15111. } else {
  15112. a++;
  15113. }
  15114. }
  15115. if (b == 1) {
  15116. this.$message.error("至少填写一个问题");
  15117. return;
  15118. }
  15119. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  15120. for (let index = 0; index < aj[i].testItem; index++) {
  15121. const element = aj[i].checkList[index]
  15122. ? aj[i].checkList[index]
  15123. : "";
  15124. var index = 0;
  15125. for (var z = 0; z < aj[i].checkList.length; z++) {
  15126. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15127. if (checkC != "") {
  15128. index++;
  15129. } else {
  15130. this.$message.error(`题目${i + 1}选项不能为空!`);
  15131. return;
  15132. }
  15133. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15134. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15135. if (checkC == checkC2) {
  15136. this.$message.error(
  15137. `第${i + 1}题的选项${this.optionTypeList[z]}和选项${this.optionTypeList[z2]}重复了,请修改!`
  15138. );
  15139. return;
  15140. }
  15141. }
  15142. }
  15143. b++;
  15144. if (index < 2) {
  15145. this.$message.error("每道题目至少需要设置2个选项。");
  15146. return;
  15147. }
  15148. if (
  15149. (aj[i].type == "2" && !aj[i].answer.length) ||
  15150. (aj[i].type == "1" &&
  15151. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  15152. (aj[i].answer !== 0 && !aj[i].answer)))
  15153. ) {
  15154. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  15155. return;
  15156. }
  15157. }
  15158. }
  15159. }
  15160. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15161. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15162. var elc = el.checkList.filter((element) => {
  15163. return element != "";
  15164. });
  15165. return (
  15166. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  15167. );
  15168. });
  15169. isTestJson.testCount = isTestJson.testJson.length;
  15170. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15171. this.taskCount
  15172. ].toolChoose[this.toolIndex].testJson = isTestJson;
  15173. this.dialogVisibleChoice = false;
  15174. if (
  15175. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15176. .toolChoose[this.toolIndex].tool != 45
  15177. ) {
  15178. this.addTools(45, this.taskCount, this.toolIndex);
  15179. }
  15180. },
  15181. addVideoJson(videoJson) {
  15182. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15183. this.taskCount
  15184. ].toolChoose[this.toolIndex].videoJson = videoJson;
  15185. this.dialogVisibleVideo = false;
  15186. if (
  15187. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15188. .toolChoose[this.toolIndex].tool != 62
  15189. ) {
  15190. this.addTools(62, this.taskCount, this.toolIndex);
  15191. }
  15192. },
  15193. //自动获取剪贴板
  15194. pasteOption() {
  15195. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15196. if (!iframe) {
  15197. this.$message.error("请使用AI共创生成题目");
  15198. return;
  15199. }
  15200. let copyData = iframe.contentWindow.copyData;
  15201. if (!copyData || !copyData.selectData.length) {
  15202. this.$message.error("请使用AI共创生成题目");
  15203. return;
  15204. }
  15205. let selectData = copyData.selectData;
  15206. for (var i = 0; i < selectData.length; i++) {
  15207. let answer = 0;
  15208. switch (selectData[i].answer[0]) {
  15209. case "A":
  15210. answer = 0;
  15211. break;
  15212. case "B":
  15213. answer = 1;
  15214. break;
  15215. case "C":
  15216. answer = 2;
  15217. break;
  15218. case "D":
  15219. answer = 3;
  15220. break;
  15221. case "E":
  15222. answer = 4;
  15223. break;
  15224. default:
  15225. break;
  15226. }
  15227. this.testJson.testJson.push({
  15228. teststitle: selectData[i].subject,
  15229. testItem: selectData[i].options.length,
  15230. checkList: selectData[i].options,
  15231. timuList: [],
  15232. answer: answer,
  15233. type: "1",
  15234. });
  15235. this.testJson.testCount++;
  15236. }
  15237. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15238. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15239. var elc = el.checkList.filter((element) => {
  15240. return element != "";
  15241. });
  15242. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  15243. });
  15244. isTestJson.testCount = isTestJson.testJson.length;
  15245. if (!isTestJson.testCount) {
  15246. return;
  15247. }
  15248. this.testJson = isTestJson;
  15249. this.$forceUpdate();
  15250. },
  15251. pasteTask(taskJson) {
  15252. let stageTasksData = [];
  15253. if (taskJson) {
  15254. stageTasksData = taskJson;
  15255. } else {
  15256. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15257. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  15258. if (!iframe && !iframe2) {
  15259. this.$message.error("请使用AI共创生成");
  15260. return;
  15261. }
  15262. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15263. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15264. if (
  15265. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  15266. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  15267. ) {
  15268. this.$message.error("请使用AI共创生成");
  15269. return;
  15270. }
  15271. stageTasksData = copyData
  15272. ? copyData.tasksData
  15273. : copyData2
  15274. ? copyData2.tasksData
  15275. : [{ taskName: "", taskDecs: "" }];
  15276. }
  15277. let taskA = [];
  15278. let tasks = stageTasksData;
  15279. for (var j = 0; j < tasks.length; j++) {
  15280. taskA.push({
  15281. task: tasks[j].taskName,
  15282. taskDetail: tasks[j].taskDecs,
  15283. chapterData: [],
  15284. toolText: "",
  15285. toolChoose: [
  15286. {
  15287. tool: [],
  15288. toolDetail: "",
  15289. toolType: 0,
  15290. askCount: 1,
  15291. askTitle: "",
  15292. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15293. },
  15294. ],
  15295. isShowTools: false,
  15296. askCount: 1,
  15297. isFold: 1,
  15298. askTitle: "",
  15299. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15300. checkJson: [{ checkCount: [], checkPerent: [] }],
  15301. homeworkList: [],
  15302. });
  15303. }
  15304. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  15305. this.$forceUpdate();
  15306. },
  15307. pasteStage(stageJson) {
  15308. let stageData = [];
  15309. if (stageJson) {
  15310. stageData = stageJson;
  15311. } else {
  15312. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  15313. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  15314. if (!iframe && !iframe2) {
  15315. this.$message.error("请使用AI共创生成");
  15316. return;
  15317. }
  15318. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15319. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15320. if (
  15321. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  15322. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  15323. ) {
  15324. this.$message.error("请使用AI共创生成");
  15325. return;
  15326. }
  15327. stageData = copyData
  15328. ? copyData.stageData
  15329. : copyData2
  15330. ? copyData2.stageData
  15331. : [""];
  15332. }
  15333. let stage = [];
  15334. for (var i = 0; i < stageData.length; i++) {
  15335. stage.push({
  15336. dyName: stageData[i], //单元标题
  15337. chapterInfo: [
  15338. {
  15339. isread: false,
  15340. chapterid: this.guid(),
  15341. title: "",
  15342. courseName: "",
  15343. taskJson: [
  15344. {
  15345. task: "",
  15346. taskDetail: "",
  15347. chapterData: [],
  15348. toolText: "",
  15349. toolChoose: [
  15350. {
  15351. tool: [],
  15352. toolDetail: "",
  15353. toolType: 0,
  15354. askCount: 1,
  15355. askTitle: "",
  15356. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15357. },
  15358. ],
  15359. isShowTools: false,
  15360. askCount: 1,
  15361. isFold: 1,
  15362. askTitle: "",
  15363. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15364. checkJson: [{ checkCount: [], checkPerent: [] }],
  15365. homeworkList: [],
  15366. },
  15367. ],
  15368. itemCount: 1,
  15369. fileList1: [],
  15370. video: [],
  15371. testData: [],
  15372. pData: [],
  15373. templateArray: [],
  15374. },
  15375. ],
  15376. });
  15377. }
  15378. let _this = this;
  15379. if (stageJson) {
  15380. if (!_this.cid) {
  15381. _this.unitJson = stage;
  15382. } else {
  15383. _this.unitIndex = 0;
  15384. _this.unitJson = stage;
  15385. _this.updateWork();
  15386. }
  15387. } else {
  15388. _this
  15389. .$confirm(
  15390. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  15391. "提示",
  15392. {
  15393. confirmButtonText: "确定",
  15394. cancelButtonText: "取消",
  15395. type: "warning",
  15396. }
  15397. )
  15398. .then(() => {
  15399. _this.unitIndex = 0;
  15400. _this.unitJson = stage;
  15401. // _this.steps++;
  15402. _this.updateWork();
  15403. })
  15404. .catch(() => {
  15405. return;
  15406. });
  15407. }
  15408. },
  15409. openStageBox() {
  15410. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  15411. this.dialogVisibleStageChange = true;
  15412. },
  15413. updateChange() {
  15414. this.$confirm(
  15415. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  15416. "提示",
  15417. {
  15418. confirmButtonText: "确定",
  15419. cancelButtonText: "取消",
  15420. type: "warning",
  15421. }
  15422. )
  15423. .then(() => {
  15424. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  15425. this.updateWork();
  15426. this.dialogVisibleStageChange = false;
  15427. })
  15428. .catch(() => {
  15429. return;
  15430. });
  15431. },
  15432. addAnswer() {
  15433. if (this.answerQ == "") {
  15434. this.$message.error("请输入您想要问的问题");
  15435. return;
  15436. }
  15437. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15438. this.taskCount
  15439. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15440. this.dialogVisible8 = false;
  15441. if (
  15442. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15443. .toolChoose[this.toolIndex].tool != 15
  15444. ) {
  15445. this.addTools(15, this.taskCount, this.toolIndex);
  15446. }
  15447. },
  15448. addMp3Answer() {
  15449. if (this.answerQ == "") {
  15450. this.$message.error("请输入您想要回答的问题");
  15451. return;
  15452. }
  15453. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15454. this.taskCount
  15455. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15456. this.dialogVisibleMp3 = false;
  15457. },
  15458. addRateAnswer() {
  15459. var a = 1;
  15460. for (var i = 0; i < this.rateJson.length; i++) {
  15461. if (this.rateJson[i].value == "") {
  15462. a = 2;
  15463. break;
  15464. }
  15465. }
  15466. if (a == 2) {
  15467. this.$message.error("请把评价信息填写完整");
  15468. return;
  15469. }
  15470. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15471. this.taskCount
  15472. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  15473. this.dialogVisibleRate = false;
  15474. if (
  15475. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15476. .toolChoose[this.toolIndex].tool != 40
  15477. ) {
  15478. this.addTools(40, this.taskCount, this.toolIndex);
  15479. }
  15480. },
  15481. addSelectAnswer() {
  15482. if (this.selectJson.url == "") {
  15483. this.$message.error("请上传题目");
  15484. return;
  15485. }
  15486. if (!this.selectJson.select.length) {
  15487. this.$message.error("请添加选项");
  15488. return;
  15489. }
  15490. if (!this.selectJson.answer.length) {
  15491. this.$message.error("请设置答案");
  15492. return;
  15493. }
  15494. var a = 1;
  15495. for (var i = 0; i < this.selectJson.answer.length; i++) {
  15496. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  15497. a = 2;
  15498. }
  15499. }
  15500. if (a == 2) {
  15501. this.$message.error("请设置答案");
  15502. return;
  15503. }
  15504. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15505. this.taskCount
  15506. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  15507. this.dialogVisibleSelect = false;
  15508. if (
  15509. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15510. .toolChoose[this.toolIndex].tool != 41
  15511. ) {
  15512. this.addTools(41, this.taskCount, this.toolIndex);
  15513. }
  15514. },
  15515. nextSelectSteps() {
  15516. if (this.selectJson.url == "") {
  15517. this.$message.error("请上传题目");
  15518. return;
  15519. }
  15520. if (!this.selectJson.select.length) {
  15521. this.$message.error("请添加选项");
  15522. return;
  15523. } else {
  15524. for (var z = 0; z < this.selectJson.select.length; z++) {
  15525. let checkC = this.selectJson.select[z];
  15526. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  15527. let checkC2 = this.selectJson.select[z2];
  15528. if (checkC == checkC2) {
  15529. this.$message.error(
  15530. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  15531. );
  15532. return;
  15533. }
  15534. }
  15535. }
  15536. }
  15537. var a = 1;
  15538. for (var i = 0; i < this.selectJson.select.length; i++) {
  15539. if (!this.selectJson.select[i]) {
  15540. a = 2;
  15541. }
  15542. }
  15543. if (a == 2) {
  15544. this.$message.error("添加的选项不能为空");
  15545. return;
  15546. }
  15547. this.selectSteps++;
  15548. },
  15549. selectCourseDetail() {
  15550. if (this.cid == "" || this.cid == undefined) {
  15551. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  15552. this.isTeacherSee = true;
  15553. }
  15554. console.log("这是新增课程");
  15555. this.selectAllType();
  15556. this.chatid = uuidv4();
  15557. // this.courseTextB = false
  15558. } else {
  15559. this.isOutline = true
  15560. this.isOutline2 = true
  15561. this.cpoteType = 4
  15562. this.cidType = 1;
  15563. let params = {
  15564. cid: this.cid,
  15565. };
  15566. this.ajax
  15567. .get(this.$store.state.api + "select_course_detail", params)
  15568. .then((res) => {
  15569. this.unitJson = JSON.parse(res.data[0][0].chapters);
  15570. this.courseState = res.data[0][0].state;
  15571. for (var j = 0; j < this.unitJson.length; j++) {
  15572. for (
  15573. var k = 0;
  15574. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  15575. k++
  15576. ) {
  15577. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  15578. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15579. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15580. : [];
  15581. let _chapterData = [];
  15582. for (
  15583. var c = 0;
  15584. c <
  15585. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  15586. .length;
  15587. c++
  15588. ) {
  15589. if (
  15590. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15591. ) {
  15592. _chapterData.push(
  15593. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15594. );
  15595. }
  15596. }
  15597. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  15598. _chapterData;
  15599. }
  15600. }
  15601. this.$forceUpdate();
  15602. this.courseName = res.data[0][0].title;
  15603. this.searchFileName = JSON.parse(JSON.stringify(this.courseName))
  15604. this.courseText = res.data[0][0].brief;
  15605. this.courseText2 = res.data[0][0].reBrief;
  15606. this.evalua = res.data[0][0].evaId;
  15607. this.cover = JSON.parse(res.data[0][0].cover);
  15608. this.noneBtnImg = this.cover.length >= 1;
  15609. if (res.data[0][0].refile) {
  15610. this.infoData = JSON.parse(res.data[0][0].refile)
  15611. }
  15612. // this.checkboxList =
  15613. // res.data[0][0].course_student.length > 0
  15614. // ? JSON.parse(res.data[0][0].course_student)
  15615. // : [];
  15616. this.checkboxList2 = res.data[0][0].juri
  15617. ? res.data[0][0].juri.split(",")
  15618. : [];
  15619. this.inviteCode = [];
  15620. for (var i = 0; i < res.data[2].length; i++) {
  15621. this.inviteCode.push({
  15622. cid: res.data[2][i].classid,
  15623. ic: res.data[2][i].code,
  15624. });
  15625. }
  15626. this.checkboxList3 = res.data[0][0].course_teacher
  15627. ? res.data[0][0].course_teacher.split(",")
  15628. : [];
  15629. // this.isTeacherSee =
  15630. // res.data[0][0].is_teacher_look == 0 ? true : false;
  15631. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15632. this.myWord = res.data[0][0].template;
  15633. this.templateC.id = "123";
  15634. this.courseUserid = res.data[0][0].userid;
  15635. // if(this.courseUserid == this.userid){
  15636. // this.InviteChange(this.checkboxList2)
  15637. // }
  15638. this.nbOrder = res.data[0][0].ordernumber;
  15639. this.courseTypeId = [];
  15640. for (var i = 0; i < res.data[1].length; i++) {
  15641. this.courseTypeId.push(res.data[1][i].typeid);
  15642. }
  15643. console.log(this.courseTypeId);
  15644. // if (this.timer) clearInterval(this.timer);
  15645. if (this.timer) clearTimeout(this.timer);
  15646. this.timer = null;
  15647. // this.timer = setInterval(() => {
  15648. if(res.data[3].length){
  15649. try {
  15650. this.aiJson = JSON.parse(res.data[3][0].tips);
  15651. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15652. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15653. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15654. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15655. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15656. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15657. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15658. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15659. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15660. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15661. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15662. }
  15663. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15664. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15665. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15666. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15667. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15668. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15669. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15670. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15671. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15672. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15673. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15674. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15675. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15676. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15677. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15678. 讨论:<转文本内容>`
  15679. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15680. this.templateid = res.data[3][0].template;
  15681. this.getTipsTemplateIsDialog()
  15682. }catch(error){
  15683. console.error(error)
  15684. }
  15685. }
  15686. if(res.data[0][0].cpote){
  15687. try {
  15688. this.cpote = JSON.parse(res.data[0][0].cpote);
  15689. }catch(error){
  15690. console.error(error)
  15691. }
  15692. }
  15693. if(res.data[0][0].setting){
  15694. try {
  15695. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15696. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15697. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  15698. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15699. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15700. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15701. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15702. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15703. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15704. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  15705. 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;
  15706. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15707. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15708. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15709. 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;
  15710. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15711. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15712. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15713. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15714. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15715. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15716. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15717. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15718. this.courseTextBool = true
  15719. }
  15720. // if(!this.teacherCourseText && !this.targetCourseText2){
  15721. // this.isuseT = 1
  15722. // }
  15723. }catch(error){
  15724. console.error(error)
  15725. }
  15726. }
  15727. if(this.courseText){
  15728. this.courseTextB = false
  15729. }
  15730. if(this.teacherCourseText){
  15731. this.teacherCourseTextB = false
  15732. }
  15733. if(this.targetCourseText){
  15734. this.targetCourseTextB = false
  15735. }
  15736. if(this.targetCourseText2){
  15737. this.targetCourseText2B = false
  15738. }
  15739. this.isFileSearch = res.data[0][0].iresearch == 1
  15740. // this.seleteCourseUpdate();
  15741. this.setMan();
  15742. this.selectAllType();
  15743. this.unitJson[
  15744. this.unitIndex
  15745. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15746. // }, 5000);
  15747. this.$forceUpdate();
  15748. setTimeout(() => {
  15749. this.checkEva(this.evalua);
  15750. setTimeout(() => {
  15751. this.checkEva(this.evalua);
  15752. }, 100);
  15753. }, 100);
  15754. })
  15755. .catch((err) => {
  15756. console.error(err);
  15757. });
  15758. }
  15759. if(this.aiId){
  15760. let params = {
  15761. cid: this.aiId,
  15762. };
  15763. this.ajax
  15764. .get(this.$store.state.api + "select_course_detail", params)
  15765. .then((res) => {
  15766. let _unitJson = JSON.parse(res.data[0][0].chapters);
  15767. let fileInfo = []
  15768. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  15769. for(var i = 0; i < _unitJson.length; i++){
  15770. let tasks = _unitJson[i].chapterInfo[0].taskJson
  15771. for(var j = 0; j < tasks.length; j++){
  15772. let _infoData = tasks[j].chapterData.filter(el => {
  15773. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  15774. })
  15775. if(_infoData.length){
  15776. fileInfo = [...fileInfo, ..._infoData]
  15777. }
  15778. }
  15779. }
  15780. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  15781. this.$forceUpdate();
  15782. this.courseName = res.data[0][0].title;
  15783. this.courseText = res.data[0][0].brief;
  15784. this.courseText2 = res.data[0][0].reBrief;
  15785. this.cover = JSON.parse(res.data[0][0].cover);
  15786. this.noneBtnImg = this.cover.length >= 1;
  15787. this.checkboxList2 = res.data[0][0].juri
  15788. ? res.data[0][0].juri.split(",")
  15789. : [];
  15790. this.inviteCode = [];
  15791. for (var i = 0; i < res.data[2].length; i++) {
  15792. this.inviteCode.push({
  15793. cid: res.data[2][i].classid,
  15794. ic: res.data[2][i].code,
  15795. });
  15796. }
  15797. this.checkboxList3 = res.data[0][0].course_teacher
  15798. ? res.data[0][0].course_teacher.split(",")
  15799. : [];
  15800. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15801. this.myWord = res.data[0][0].template;
  15802. this.templateC.id = "123";
  15803. this.courseTypeId = [];
  15804. for (var i = 0; i < res.data[1].length; i++) {
  15805. this.courseTypeId.push(res.data[1][i].typeid);
  15806. }
  15807. console.log(this.courseTypeId);
  15808. if(res.data[3].length){
  15809. try {
  15810. this.aiJson = JSON.parse(res.data[3][0].tips);
  15811. this.templateid = res.data[3][0].template;
  15812. this.getTipsTemplateIsDialog()
  15813. }catch(error){
  15814. console.error(error)
  15815. }
  15816. }
  15817. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15818. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15819. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15820. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15821. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15822. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15823. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15824. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15825. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15826. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15827. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15828. }
  15829. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15830. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15831. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15832. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15833. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15834. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15835. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15836. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15837. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15838. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15839. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15840. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15841. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15842. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15843. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15844. 讨论:<转文本内容>`
  15845. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15846. if(res.data[0][0].cpote){
  15847. try {
  15848. this.cpote = JSON.parse(res.data[0][0].cpote);
  15849. }catch(error){
  15850. console.error(error)
  15851. }
  15852. }
  15853. if(res.data[0][0].setting){
  15854. try {
  15855. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15856. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15857. 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];
  15858. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15859. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15860. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15861. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15862. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15863. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15864. 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];
  15865. 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;
  15866. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15867. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15868. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15869. 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;
  15870. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15871. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15872. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15873. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15874. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15875. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15876. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15877. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15878. this.courseTextBool = true
  15879. }
  15880. // if(!this.teacherCourseText && !this.targetCourseText2){
  15881. // this.isuseT = 1
  15882. // }
  15883. }catch(error){
  15884. console.error(error)
  15885. }
  15886. }
  15887. if(this.teacherInfoData.length){
  15888. this.isuseT = true
  15889. }
  15890. if(this.courseText){
  15891. this.courseTextB = false
  15892. }
  15893. if(this.teacherCourseText){
  15894. this.teacherCourseTextB = false
  15895. }
  15896. if(this.targetCourseText){
  15897. this.targetCourseTextB = false
  15898. }
  15899. if(this.targetCourseText2){
  15900. this.targetCourseText2B = false
  15901. }
  15902. this.setMan();
  15903. this.unitJson[
  15904. this.unitIndex
  15905. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15906. this.$forceUpdate();
  15907. setTimeout(() => {
  15908. this.checkEva(this.evalua);
  15909. setTimeout(() => {
  15910. this.checkEva(this.evalua);
  15911. }, 100);
  15912. }, 100);
  15913. })
  15914. .catch((err) => {
  15915. console.error(err);
  15916. });
  15917. }
  15918. // if(this.cidType != 1 && this.templateid == ''){
  15919. // this.promptShow = true
  15920. // }
  15921. },
  15922. seleteCourseUpdate() {
  15923. let params = {
  15924. cid: this.cid,
  15925. };
  15926. this.ajax
  15927. .get(this.$store.state.api + "select_course_detail", params)
  15928. .then((res) => {
  15929. // console.log(this.unitJson);
  15930. let unitJson = JSON.parse(res.data[0][0].chapters);
  15931. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  15932. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  15933. let _unitJson = [];
  15934. let _chapAarry = [];
  15935. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  15936. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  15937. let index = 1;
  15938. let chapindex;
  15939. if (_unitJson2.length > unitJson.length) {
  15940. for (let c = 0; c < _unitJson2.length; c++) {
  15941. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  15942. }
  15943. for (let j = 0; j < unitJson.length; j++) {
  15944. let count = 0;
  15945. for (let k = 0; k < _unitJson2.length; k++) {
  15946. if (
  15947. unitJson[j].chapterInfo[0].chapterid ==
  15948. _unitJson2[k].chapterInfo[0].chapterid
  15949. ) {
  15950. count++;
  15951. _chapAarry.splice(
  15952. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15953. 1
  15954. );
  15955. _unitJson.push(unitJson[j]);
  15956. break;
  15957. }
  15958. }
  15959. // if(count === 0){
  15960. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  15961. // }
  15962. }
  15963. for (let k = 0; k < _unitJson2.length; k++) {
  15964. if (_unitJson2[k].isUpdate == 1) {
  15965. _chapAarry.splice(
  15966. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15967. 1
  15968. );
  15969. _unitJson.push(_unitJson2[k]);
  15970. }
  15971. }
  15972. console.log(_chapAarry);
  15973. for (let d = 0; d < _unitJson2.length; d++) {
  15974. if (
  15975. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  15976. ) {
  15977. if (_unitIndex == d) {
  15978. index = 2;
  15979. }
  15980. chapindex = d;
  15981. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  15982. }
  15983. }
  15984. } else {
  15985. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  15986. }
  15987. for (let i = 0; i < unitJson.length; i++) {
  15988. if (
  15989. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  15990. _unitJson[i].chapterInfo[0].chapterid !=
  15991. unitJson[i].chapterInfo[0].chapterid
  15992. ) {
  15993. if (i == _unitJson.length - 1) {
  15994. // this.unitIndex++
  15995. _unitIndex2++;
  15996. }
  15997. _unitJson.splice(i, 0, unitJson[i]);
  15998. } else if (i > _unitJson.length - 1) {
  15999. _unitJson.push(unitJson[i]);
  16000. } else if (
  16001. _unitJson[i].chapterInfo[0].chapterid ==
  16002. unitJson[i].chapterInfo[0].chapterid
  16003. ) {
  16004. _unitJson[i] = unitJson[i];
  16005. }
  16006. // if (i == _unitIndex) {
  16007. // continue;
  16008. // } else
  16009. }
  16010. if (_chapAarry.length && index != 2) {
  16011. if (chapindex < _unitIndex) {
  16012. this.isDelete = 2;
  16013. // this.unitIndex--;
  16014. _unitIndex2--;
  16015. } else if (
  16016. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  16017. _unitJson[_unitIndex].chapterInfo[0].chapterid
  16018. ) {
  16019. this.isDelete = 2;
  16020. for (let n = 0; n < _unitJson.length; n++) {
  16021. if (
  16022. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  16023. _unitJson[n].chapterInfo[0].chapterid
  16024. ) {
  16025. // this.unitIndex = n;
  16026. _unitIndex2 = n;
  16027. _unitJson[n] = _unitJson2[_unitIndex];
  16028. break;
  16029. }
  16030. }
  16031. }
  16032. } else if (index != 2) {
  16033. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  16034. _unitJson2[_unitIndex];
  16035. for (
  16036. var ci = 0;
  16037. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  16038. ci++
  16039. ) {
  16040. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  16041. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  16042. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16043. .toolChoose
  16044. : [];
  16045. let _chapterData = [];
  16046. for (
  16047. var c = 0;
  16048. c <
  16049. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  16050. .length;
  16051. c++
  16052. ) {
  16053. if (
  16054. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16055. .chapterData[c]
  16056. ) {
  16057. _chapterData.push(
  16058. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  16059. .chapterData[c]
  16060. );
  16061. }
  16062. }
  16063. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  16064. _chapterData;
  16065. }
  16066. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  16067. }
  16068. if (index == 1) {
  16069. this.unitJson = _unitJson;
  16070. this.$forceUpdate();
  16071. setTimeout(() => {
  16072. if (this.unitIndex != _unitIndex2) {
  16073. this.isDelete = 2;
  16074. this.unitIndex = _unitIndex2;
  16075. }
  16076. }, 0);
  16077. this.timer = setTimeout(() => {
  16078. this.seleteCourseUpdate();
  16079. }, 5000);
  16080. } else if (index == 2) {
  16081. let _this = this;
  16082. _this
  16083. .$confirm(
  16084. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  16085. "提示",
  16086. {
  16087. confirmButtonText: "需要",
  16088. cancelButtonText: "取消",
  16089. type: "warning",
  16090. }
  16091. )
  16092. .then(() => {
  16093. if (_this.time()) {
  16094. _this.restoreWork(
  16095. _chapAarry[0],
  16096. _unitJson,
  16097. chapindex,
  16098. _unitJson2,
  16099. _unitIndex2
  16100. );
  16101. }
  16102. })
  16103. .catch(() => {
  16104. _this.unitJson = _unitJson;
  16105. _this.$forceUpdate();
  16106. setTimeout(() => {
  16107. if (this.unitIndex != _unitIndex2) {
  16108. this.isDelete = 2;
  16109. this.unitIndex = _unitIndex2;
  16110. }
  16111. }, 0);
  16112. _this.timer = setTimeout(() => {
  16113. _this.seleteCourseUpdate();
  16114. }, 5000);
  16115. });
  16116. }
  16117. // 在复制操作之前记录滚动位置
  16118. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16119. // 执行复制操作
  16120. // 复制操作完成后恢复滚动位置
  16121. this.$nextTick(() => {
  16122. if (this.$refs.scrollContainer) {
  16123. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16124. }
  16125. });
  16126. })
  16127. .catch((err) => {
  16128. console.error(err);
  16129. });
  16130. },
  16131. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  16132. let params = [
  16133. {
  16134. cid: this.cid,
  16135. chapters: JSON.stringify(this.unitJson),
  16136. uid: this.userid,
  16137. chapid: chapid,
  16138. },
  16139. ];
  16140. this.ajax
  16141. .post(this.$store.state.api + "restoreWork", params)
  16142. .then((res) => {
  16143. this.$message({
  16144. message: "恢复成功",
  16145. type: "success",
  16146. });
  16147. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  16148. this.unitJson = unitJson;
  16149. this.$forceUpdate();
  16150. setTimeout(() => {
  16151. if (this.unitIndex != unitIndex2) {
  16152. this.isDelete = 2;
  16153. this.unitIndex = unitIndex2;
  16154. }
  16155. }, 0);
  16156. this.timer = setTimeout(() => {
  16157. this.seleteCourseUpdate();
  16158. }, 5000);
  16159. })
  16160. .catch((err) => {
  16161. this.$message.error("网络不佳");
  16162. console.error(err);
  16163. });
  16164. },
  16165. getTypeName() {
  16166. console.log(this.courseTypeId);
  16167. this.$forceUpdate();
  16168. },
  16169. selectAllType() {
  16170. let params = {
  16171. org: this.org && this.org != "" ? this.org : "",
  16172. oid: this.oid && this.oid != "" ? this.oid : "",
  16173. stand: "cn"
  16174. };
  16175. this.ajax
  16176. .get(this.$store.state.api + "selectAllTypeStand", params)
  16177. .then((res) => {
  16178. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16179. res.data[0] = [...res.data[0], ...res.data[4]];
  16180. }
  16181. this.CourseType = res.data;
  16182. this.CourseType2 = [
  16183. { name: "智见课程", id: [] },
  16184. { name: "智行课程", id: [] },
  16185. { name: "智创课程", id: [] },
  16186. ];
  16187. for (var cti = 0; cti < res.data[0].length; cti++) {
  16188. if (
  16189. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16190. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  16191. ) {
  16192. this.CourseType2[0].id.push(res.data[0][cti].id);
  16193. } else if (
  16194. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  16195. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16196. ) {
  16197. this.CourseType2[1].id.push(res.data[0][cti].id);
  16198. } else if (
  16199. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16200. ) {
  16201. this.CourseType2[2].id.push(res.data[0][cti].id);
  16202. }
  16203. if (
  16204. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16205. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  16206. ) {
  16207. res.data[0][cti].name = "年级";
  16208. } else if (
  16209. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  16210. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16211. ) {
  16212. res.data[0][cti].name = "学科";
  16213. } else if (
  16214. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16215. ) {
  16216. res.data[0][cti].name = "主题";
  16217. }
  16218. }
  16219. let _courseTypeId = [];
  16220. for (var i = 0; i < res.data[0].length; i++) {
  16221. if (!this.cid) {
  16222. this.courseTypeId[res.data[0][i].id] = [];
  16223. }
  16224. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  16225. // }
  16226. this.CourseTypeJson[res.data[0][i].id] = [];
  16227. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16228. if (res.data[0][i].name == "栏目") {
  16229. this.CourseType[0][i].name = "主题";
  16230. }
  16231. }
  16232. if (res.data[2].length == 0 && res.data[3].length == 0) {
  16233. for (var j = 0; j < res.data[1].length; j++) {
  16234. if (
  16235. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  16236. _courseTypeId.indexOf(res.data[1][j].id) == -1
  16237. ) {
  16238. _courseTypeId.push(res.data[1][j].id);
  16239. }
  16240. if (res.data[0][i].id == res.data[1][j].pid) {
  16241. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16242. }
  16243. }
  16244. } else {
  16245. if (res.data[2].length > 0) {
  16246. for (var j = 0; j < res.data[2].length; j++) {
  16247. if (
  16248. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  16249. _courseTypeId.indexOf(res.data[2][j].id) == -1
  16250. ) {
  16251. _courseTypeId.push(res.data[2][j].id);
  16252. }
  16253. if (res.data[0][i].id == res.data[2][j].pid) {
  16254. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16255. }
  16256. }
  16257. }
  16258. if (res.data[3].length > 0) {
  16259. for (var j = 0; j < res.data[3].length; j++) {
  16260. if (
  16261. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  16262. _courseTypeId.indexOf(res.data[3][j].id) == -1
  16263. ) {
  16264. _courseTypeId.push(res.data[3][j].id);
  16265. }
  16266. if (res.data[0][i].id == res.data[3][j].pid) {
  16267. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16268. }
  16269. }
  16270. }
  16271. }
  16272. }
  16273. this.courseTypeId = _courseTypeId;
  16274. this.typeC1 = this.getTypeC(2)
  16275. this.typeC2 = this.getTypeC(1)
  16276. })
  16277. .catch((err) => {
  16278. console.error(err);
  16279. });
  16280. },
  16281. selectType() {
  16282. this.ajax
  16283. .get(this.$store.state.api + "selectType")
  16284. .then((res) => {
  16285. this.CourseType = res.data;
  16286. for (var i = 0; i < res.data[0].length; i++) {
  16287. if (!this.cid) {
  16288. this.courseTypeId[res.data[0][i].id] = "";
  16289. }
  16290. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16291. if (res.data[0][i].name == "栏目") {
  16292. this.CourseType[0][i].name = "主题";
  16293. }
  16294. }
  16295. for (var j = 0; j < res.data[1].length; j++) {
  16296. if (res.data[0][i].id == res.data[1][j].pid) {
  16297. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16298. this.CourseTypeJson[res.data[0][i].id] = [];
  16299. }
  16300. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16301. }
  16302. }
  16303. }
  16304. this.selectTypeByOid();
  16305. this.selectTypeByOrg();
  16306. })
  16307. .catch((err) => {
  16308. console.error(err);
  16309. });
  16310. },
  16311. selectTypeByOid() {
  16312. let params = {
  16313. oid: this.oid,
  16314. };
  16315. this.ajax
  16316. .get(this.$store.state.api + "selectTypeByOid", params)
  16317. .then((res) => {
  16318. for (var i = 0; i < res.data[0].length; i++) {
  16319. for (var j = 0; j < res.data[1].length; j++) {
  16320. if (res.data[0][i].id == res.data[1][j].pid) {
  16321. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16322. this.CourseTypeJson[res.data[0][i].id] = [];
  16323. }
  16324. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16325. }
  16326. }
  16327. }
  16328. })
  16329. .catch((err) => {
  16330. console.error(err);
  16331. });
  16332. },
  16333. selectTypeByOrg() {
  16334. let params = {
  16335. oid: this.org,
  16336. };
  16337. this.ajax
  16338. .get(this.$store.state.api + "selectTypeByOrg", params)
  16339. .then((res) => {
  16340. for (var i = 0; i < res.data[0].length; i++) {
  16341. for (var j = 0; j < res.data[1].length; j++) {
  16342. if (res.data[0][i].id == res.data[1][j].pid) {
  16343. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16344. this.CourseTypeJson[res.data[0][i].id] = [];
  16345. }
  16346. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16347. }
  16348. }
  16349. }
  16350. this.$forceUpdate();
  16351. })
  16352. .catch((err) => {
  16353. console.error(err);
  16354. });
  16355. },
  16356. OtherMb(type, task) {
  16357. if (task === 0 || task) {
  16358. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16359. task
  16360. ].isEvaFold = true;
  16361. }
  16362. this.typeMode = type;
  16363. setTimeout(() => {
  16364. this.checkEva(this.checkId);
  16365. setTimeout(() => {
  16366. this.checkEva(this.checkId);
  16367. }, 100);
  16368. }, 100);
  16369. },
  16370. openMember() {
  16371. this.searchTN = "";
  16372. this.getTeacher();
  16373. this.dialogVisibleMember = true;
  16374. },
  16375. checkEva(id, type) {
  16376. this.dialogVisiblemb = false;
  16377. this.selectEva();
  16378. if (this.evalua != id && type == 2) {
  16379. this.$message.success("导入成功");
  16380. setTimeout(() => {
  16381. this.checkEva(id);
  16382. }, 100);
  16383. }
  16384. this.evalua = id;
  16385. this.checkId = id;
  16386. if (this.evalua != "") {
  16387. for (var i = 0; i < this.evaJuri.length; i++) {
  16388. if (this.evalua == this.evaJuri[i].id) {
  16389. this.eTitle = this.evaJuri[i].title;
  16390. this.eJson = JSON.parse(this.evaJuri[i].content);
  16391. }
  16392. }
  16393. this.data.data = [];
  16394. this.$forceUpdate();
  16395. setTimeout(() => {
  16396. this.setMindData();
  16397. }, 1000);
  16398. }
  16399. },
  16400. deleteEva() {
  16401. let _this = this;
  16402. if (_this.evalua == "") {
  16403. this.$message.warning("内容已经清空了,请勿重复清空");
  16404. return;
  16405. }
  16406. _this
  16407. .$confirm("确定删除此目标吗?", "提示", {
  16408. confirmButtonText: "确定",
  16409. cancelButtonText: "取消",
  16410. type: "warning",
  16411. })
  16412. .then(() => {
  16413. _this.evalua = "";
  16414. _this.checkId = "";
  16415. _this.eTitle = "";
  16416. let _unitJson = _this.unitJson;
  16417. for (var i = 0; i < _unitJson.length; i++) {
  16418. let _task = _unitJson[i].chapterInfo[0].taskJson;
  16419. for (var j = 0; j < _task.length; j++) {
  16420. let _eList = _task[j].eList;
  16421. for (var k = 0; k < _eList.length; k++) {
  16422. delete _eList[k].target;
  16423. }
  16424. }
  16425. }
  16426. _this.$forceUpdate();
  16427. if (_this.cid) {
  16428. _this.updateWork();
  16429. }
  16430. })
  16431. .catch(() => {
  16432. return;
  16433. });
  16434. },
  16435. selectEva() {
  16436. let params = {
  16437. oid: this.oid,
  16438. };
  16439. this.ajax
  16440. .get(this.$store.state.api + "selectAllEvaluation", params)
  16441. .then((res) => {
  16442. this.evaJuri = res.data[0];
  16443. // 在复制操作之前记录滚动位置
  16444. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16445. // 执行复制操作
  16446. // 复制操作完成后恢复滚动位置
  16447. this.$nextTick(() => {
  16448. if (this.$refs.scrollContainer) {
  16449. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16450. }
  16451. });
  16452. })
  16453. .catch((err) => {
  16454. console.error(err);
  16455. });
  16456. },
  16457. setMindData() {
  16458. let targetArray = [];
  16459. this.data.data = [];
  16460. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  16461. let _eJson = Object.keys(this.eJson);
  16462. let _e = this.eJson;
  16463. for (let i = 0; i < _eJson.length; i++) {
  16464. let element = _e[_eJson[i]];
  16465. this.data.data.push({
  16466. id: element.id,
  16467. parentid: "root",
  16468. topic: element.name,
  16469. });
  16470. // targetArray.push({
  16471. // id: element.id,
  16472. // parentid: "root",
  16473. // name: element.name,
  16474. // });
  16475. targetArray.push({
  16476. value: element.name,
  16477. label: element.name,
  16478. children: [],
  16479. });
  16480. let _eJsonc = Object.keys(element.child);
  16481. let _e2 = element.child;
  16482. for (let j = 0; j < _eJsonc.length; j++) {
  16483. let _ec = _e2[_eJsonc[j]];
  16484. this.data.data.push({
  16485. id: _ec.id,
  16486. parentid: element.id,
  16487. topic: _ec.name,
  16488. });
  16489. // targetArray.push({
  16490. // id: _ec.id,
  16491. // parentid: element.id,
  16492. // name: _ec.name,
  16493. // });
  16494. targetArray[i].children.push({
  16495. value: _ec.name,
  16496. label: _ec.name,
  16497. children: [],
  16498. });
  16499. let _eJsonz = Object.keys(_ec.child);
  16500. let _e3 = _ec.child;
  16501. for (let z = 0; z < _eJsonz.length; z++) {
  16502. let _ez = _e3[_eJsonz[z]];
  16503. this.data.data.push({
  16504. id: _ez.id,
  16505. parentid: _ec.id,
  16506. topic: _ez.name,
  16507. });
  16508. // targetArray.push({
  16509. // id: _ez.id,
  16510. // parentid: _ec.id,
  16511. // name: _ez.name,
  16512. // });
  16513. targetArray[i].children[j].children.push({
  16514. value: _ez.name,
  16515. label: _ez.name,
  16516. });
  16517. }
  16518. }
  16519. }
  16520. this.targetArray = targetArray;
  16521. this.$forceUpdate();
  16522. },
  16523. /*添加评价 */
  16524. addEList(index, tIndex) {
  16525. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  16526. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  16527. value: "",
  16528. detail: "",
  16529. score: 5,
  16530. isai: "1",
  16531. })
  16532. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  16533. { value: "", detail: "", score: 5,isai: "1", },
  16534. ]);
  16535. this.$forceUpdate();
  16536. },
  16537. openEList(index, tIndex) {
  16538. this.evaIndex = index;
  16539. this.evatIndex = tIndex;
  16540. this.evaBoxDialog = true;
  16541. },
  16542. addCET(index, tIndex) {
  16543. this.cetIndex = index;
  16544. this.cettIndex = tIndex;
  16545. this.selectAllType1();
  16546. },
  16547. addCETemplate() {
  16548. var array =
  16549. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  16550. .eList;
  16551. let params = [
  16552. {
  16553. uid: this.userid,
  16554. n: this.templateName,
  16555. json: JSON.stringify(array),
  16556. t: 1,
  16557. oid: this.oid,
  16558. },
  16559. ];
  16560. this.ajax
  16561. .post(this.$store.state.api + "addCETShare", params)
  16562. .then((res) => {
  16563. this.addTypeByCET(res.data[0][0].id);
  16564. })
  16565. .catch((err) => {
  16566. this.$message.error("网络不佳");
  16567. console.error(err);
  16568. });
  16569. },
  16570. addTypeByCET(id) {
  16571. if (this.setTypeJson.two == "") {
  16572. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  16573. return;
  16574. }
  16575. let params = {
  16576. cid: id,
  16577. };
  16578. this.ajax
  16579. .get(this.$store.state.api + "deleteCETLabel", params)
  16580. .then((res) => {
  16581. for (var i = 0; i < 2; i++) {
  16582. let tid = "";
  16583. if (i == 0) {
  16584. tid = this.setTypeJson.one;
  16585. } else {
  16586. tid = this.setTypeJson.two;
  16587. }
  16588. let params = [
  16589. {
  16590. cid: id,
  16591. tid: tid,
  16592. uid: this.userid,
  16593. },
  16594. ];
  16595. this.ajax
  16596. .post(this.$store.state.api + "addCETLabel", params)
  16597. .then((res) => {
  16598. this.$message({
  16599. message: "添加成功",
  16600. type: "success",
  16601. });
  16602. this.close();
  16603. })
  16604. .catch((err) => {
  16605. this.$message.error("网络不佳");
  16606. console.error(err);
  16607. });
  16608. }
  16609. })
  16610. .catch((err) => {
  16611. this.$message.error("网络不佳");
  16612. console.error(err);
  16613. });
  16614. },
  16615. updateEvaJson(array) {
  16616. array = array.filter((item) => {
  16617. item.isai = "1"
  16618. return item;
  16619. });
  16620. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  16621. this.evatIndex
  16622. ].eList = array;
  16623. },
  16624. forceUpdate() {
  16625. this.$forceUpdate();
  16626. },
  16627. forceUpdate2() {
  16628. setTimeout(() => {
  16629. this.courseText += "*0*%*";
  16630. setTimeout(() => {
  16631. this.courseText = this.courseText.replaceAll("*0*%*", "");
  16632. }, 0);
  16633. }, 100);
  16634. this.$forceUpdate();
  16635. },
  16636. deletEList(index, tIndex, eIndex) {
  16637. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  16638. eIndex,
  16639. 1
  16640. );
  16641. this.$forceUpdate();
  16642. },
  16643. getChoosePic(t) {
  16644. this.chooseType = t;
  16645. this.getAllBanner();
  16646. },
  16647. getAllBanner() {
  16648. this.sysPicVisible = true;
  16649. let params = {
  16650. t: this.chooseType,
  16651. };
  16652. this.ajax
  16653. .get(this.$store.state.api + "selectAllBanner", params)
  16654. .then((res) => {
  16655. this.sysPic = res.data[0];
  16656. })
  16657. .catch((err) => {
  16658. console.error(err);
  16659. });
  16660. },
  16661. // getClass() {
  16662. // let params = {
  16663. // oid: this.oid,
  16664. // };
  16665. // this.ajax
  16666. // .get(this.$store.state.api + "selectClassBySchool", params)
  16667. // .then((res) => {
  16668. // this.classJuri = res.data[0];
  16669. // })
  16670. // .catch((err) => {
  16671. // console.error(err);
  16672. // });
  16673. // },
  16674. deleteSysPic() {
  16675. this.cover = [];
  16676. this.isSysPic = false;
  16677. this.isSysPic2 = false;
  16678. },
  16679. deleteSelectPic() {
  16680. this.selectJson.url = "";
  16681. },
  16682. setEListStar() {
  16683. this.$forceUpdate();
  16684. },
  16685. deletRateList(i) {
  16686. this.rateJson.splice(i, 1);
  16687. },
  16688. addRateList() {
  16689. this.rateJson.push({ detail: "", score: 5, value: "" });
  16690. },
  16691. addSt() {
  16692. this.sentenceList.push({
  16693. sentenceTitle: "",
  16694. addSentence: [],
  16695. rightAnswer: [],
  16696. });
  16697. },
  16698. addSen(i) {
  16699. if (!this.sentenceList[i].sentenceTitle) {
  16700. this.$message.error("请填写卡片内容!");
  16701. return;
  16702. }
  16703. if (this.sentenceList[i].sentenceTitle.length > 10) {
  16704. this.$message.error("卡片内容字数不能超过10位");
  16705. return;
  16706. }
  16707. if (
  16708. this.sentenceList[i].addSentence.indexOf(
  16709. this.sentenceList[i].sentenceTitle
  16710. ) !== -1
  16711. ) {
  16712. this.$message.error("不能添加重复的卡片内容!");
  16713. return;
  16714. }
  16715. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  16716. // this.isPushTitleList.push(this.sentenceTitle);
  16717. this.sentenceList[i].sentenceTitle = "";
  16718. },
  16719. setRightAnswer(s, i, j) {
  16720. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  16721. this.sentenceList[i].rightAnswer.push(s);
  16722. }
  16723. },
  16724. returnCard(r, i, j) {
  16725. this.sentenceList[i].rightAnswer.splice(j, 1);
  16726. },
  16727. addSentenceTool() {
  16728. for (var i = 0; i < this.sentenceList.length; i++) {
  16729. if (this.sentenceList[i].rightAnswer.length == 0) {
  16730. this.$message.error(`请将题目${i + 1}设置完整。`);
  16731. return;
  16732. }
  16733. if (
  16734. this.sentenceList[i].addSentence.length !=
  16735. this.sentenceList[i].rightAnswer.length
  16736. ) {
  16737. this.$message.error(`请将题目${i + 1}设置完整。`);
  16738. return;
  16739. }
  16740. }
  16741. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16742. this.taskCount
  16743. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  16744. this.sentenceList = [
  16745. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  16746. ];
  16747. this.dialogVisibleSentence = false;
  16748. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16749. // itemTaskIndex
  16750. // ].toolChoose[toolIndex].tool = [];
  16751. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16752. // itemTaskIndex
  16753. // ].toolChoose[toolIndex].tool.push(i);
  16754. if (
  16755. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16756. .toolChoose[this.toolIndex].tool != 47
  16757. ) {
  16758. this.addTools(47, this.taskCount, this.toolIndex);
  16759. }
  16760. },
  16761. addTableJson() {
  16762. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  16763. // this.$message.error("请将信息填写完整!");
  16764. // return;
  16765. // }
  16766. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16767. this.taskCount
  16768. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  16769. // this.tableJson = [{ text: "" }];
  16770. // this.dialogVisibleTable = false;
  16771. this.$message.success("上传成功");
  16772. if (
  16773. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16774. .toolChoose[this.toolIndex].tool != 48
  16775. ) {
  16776. this.addTools(48, this.taskCount, this.toolIndex);
  16777. }
  16778. },
  16779. addWordJson() {
  16780. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16781. this.taskCount
  16782. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  16783. // this.wordJson = [{ text: "" }];
  16784. // this.dialogVisibleWord = false;
  16785. this.$message.success("上传成功");
  16786. if (
  16787. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16788. .toolChoose[this.toolIndex].tool != 52
  16789. ) {
  16790. this.addTools(52, this.taskCount, this.toolIndex);
  16791. }
  16792. },
  16793. addMoreUpload() {
  16794. if (this.uploadJson.length == 0) {
  16795. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16796. this.taskCount
  16797. ].toolChoose[this.toolIndex].uploadJson = [];
  16798. } else {
  16799. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16800. this.taskCount
  16801. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  16802. }
  16803. this.uploadJson = [];
  16804. this.dialogVisibleMoreUpload = false;
  16805. if (
  16806. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16807. .toolChoose[this.toolIndex].tool != 50
  16808. ) {
  16809. this.addTools(50, this.taskCount, this.toolIndex);
  16810. }
  16811. },
  16812. addPreTime() {
  16813. if (this.preTime == 0) {
  16814. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16815. this.taskCount
  16816. ].toolChoose[this.toolIndex].preTime = 0;
  16817. } else {
  16818. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16819. this.taskCount
  16820. ].toolChoose[this.toolIndex].preTime = this.preTime;
  16821. }
  16822. this.preTime = 0;
  16823. this.dialogVisiblePreTime = false;
  16824. if (
  16825. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16826. .toolChoose[this.toolIndex].tool != 10
  16827. ) {
  16828. this.addTools(10, this.taskCount, this.toolIndex);
  16829. }
  16830. },
  16831. goToTask(i) {
  16832. this.toolIndexType = "";
  16833. if (this.isClickColor == i + 1) {
  16834. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16835. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16836. // } else {
  16837. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16838. i
  16839. ].toolOpen = true;
  16840. // }
  16841. this.$forceUpdate();
  16842. return;
  16843. }
  16844. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16845. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16846. // } else {
  16847. document.querySelectorAll(".basic_box")[0].scrollTop =
  16848. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16849. this.isClickColor = i + 1;
  16850. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16851. // }
  16852. this.$forceUpdate();
  16853. },
  16854. taskScroll(){
  16855. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  16856. const sections = document.querySelectorAll('.taskBorder');
  16857. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  16858. sections.forEach((section, index) => {
  16859. const offsetTop = section.offsetTop;
  16860. const offsetHeight = section.offsetHeight;
  16861. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  16862. this.isClickColor = index +1;
  16863. }
  16864. });
  16865. },
  16866. taskOpen(i, stageIndex) {
  16867. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16868. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  16869. } else {
  16870. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16871. }
  16872. this.updateWork3(stageIndex);
  16873. this.$forceUpdate();
  16874. },
  16875. goToTask2(i, stage) {
  16876. this.toolIndexType = "";
  16877. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  16878. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16879. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16880. // } else {
  16881. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16882. i
  16883. ].toolOpen = true;
  16884. // }
  16885. this.$forceUpdate();
  16886. return;
  16887. }
  16888. if (this.unitIndex != stage) {
  16889. if (this.panUnitJson() == 2) {
  16890. return;
  16891. }
  16892. this.unitSet(stage);
  16893. }
  16894. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16895. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16896. // } else {
  16897. document.querySelectorAll(".basic_box")[0].scrollTop =
  16898. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16899. this.isClickColor = i + 1;
  16900. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16901. // }
  16902. this.$forceUpdate();
  16903. },
  16904. taskMove(type, index) {
  16905. this.$confirm(
  16906. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  16907. "提示",
  16908. {
  16909. confirmButtonText: "确定",
  16910. cancelButtonText: "取消",
  16911. type: "warning",
  16912. }
  16913. )
  16914. .then(() => {
  16915. if (type == 1) {
  16916. if (index > 0) {
  16917. let a = JSON.parse(
  16918. JSON.stringify(
  16919. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16920. index - 1
  16921. ]
  16922. )
  16923. );
  16924. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  16925. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16926. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16927. }
  16928. } else {
  16929. if (
  16930. index <
  16931. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  16932. ) {
  16933. let a = JSON.parse(
  16934. JSON.stringify(
  16935. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16936. index + 1
  16937. ]
  16938. )
  16939. );
  16940. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  16941. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16942. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16943. }
  16944. }
  16945. this.$forceUpdate();
  16946. })
  16947. .catch(() => {
  16948. return;
  16949. });
  16950. },
  16951. stageMove(type, index) {
  16952. if (type == 1) {
  16953. if (index > 0) {
  16954. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  16955. let acid = JSON.parse(
  16956. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  16957. );
  16958. let bcid = JSON.parse(
  16959. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  16960. );
  16961. this.unitJson3[index - 1] = this.unitJson3[index];
  16962. this.unitJson3[index] = a;
  16963. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  16964. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  16965. }
  16966. } else {
  16967. if (index < this.unitJson3.length - 1) {
  16968. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  16969. let acid = JSON.parse(
  16970. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  16971. );
  16972. let bcid = JSON.parse(
  16973. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  16974. );
  16975. this.unitJson3[index + 1] = this.unitJson3[index];
  16976. this.unitJson3[index] = a;
  16977. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  16978. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  16979. }
  16980. }
  16981. this.$forceUpdate();
  16982. },
  16983. addGroup(i) {
  16984. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  16985. this.groupJson.group.push({
  16986. name: "第" + (this.groupJson.group.length + 1) + "组",
  16987. });
  16988. },
  16989. deleteGroup(i) {
  16990. this.groupJson.group.splice(i, 1);
  16991. },
  16992. numberPan() {
  16993. if (
  16994. /[^\d]/.test(this.groupJson.number) ||
  16995. this.groupJson.number < 2 ||
  16996. this.groupJson.number > 10
  16997. ) {
  16998. this.$message.error("请输入2-10的数字");
  16999. this.groupJson.number = "";
  17000. }
  17001. },
  17002. numberPanJie() {
  17003. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  17004. this.$message.error('请输入大于1的数字')
  17005. this.courseJie = 1
  17006. }
  17007. },
  17008. numberPanTime() {
  17009. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  17010. this.$message.error('请输入大于1的数字')
  17011. this.courseTime = 1
  17012. }
  17013. },
  17014. addGroupJson() {
  17015. for (var i = 0; i < this.groupJson.group.length; i++) {
  17016. if (!this.groupJson.group[i].name) {
  17017. this.$message.error("请将信息填写完整!");
  17018. return;
  17019. }
  17020. }
  17021. if (!this.groupJson.number) {
  17022. this.$message.error("请将信息填写完整!");
  17023. return;
  17024. }
  17025. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17026. this.taskCount
  17027. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  17028. JSON.stringify(this.groupJson)
  17029. );
  17030. this.dialogVisibleGroup = false;
  17031. this.groupJson = {};
  17032. if (
  17033. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17034. .toolChoose[this.toolIndex].tool != 49
  17035. ) {
  17036. this.addTools(49, this.taskCount, this.toolIndex);
  17037. }
  17038. },
  17039. updateTime(preTime) {
  17040. this.preTime = preTime;
  17041. },
  17042. InviteChange(val) {
  17043. console.log(val);
  17044. let _check = [];
  17045. let _check2 = [];
  17046. for (var i = 0; i < this.grade2.length; i++) {
  17047. var gid = this.grade2[i].id;
  17048. _check.push(gid);
  17049. }
  17050. for (var i = 0; i < this.checkboxList2.length; i++) {
  17051. var _id = this.checkboxList2[i];
  17052. if (_check.indexOf(_id) !== -1) {
  17053. _check2.push(_id);
  17054. }
  17055. }
  17056. this.checkAll = _check2.length === _check.length;
  17057. return;
  17058. let array = JSON.parse(JSON.stringify(val));
  17059. this.inviteCode = this.inviteCode.filter((el) => {
  17060. if (val.indexOf(el.cid) != -1) {
  17061. array.splice(array.indexOf(el.cid), 1);
  17062. return el;
  17063. }
  17064. });
  17065. for (var i = 0; i < array.length; i++) {
  17066. this.getInviteCode(array[i]);
  17067. }
  17068. },
  17069. InviteChange2(val) {
  17070. console.log(val);
  17071. let _check = [];
  17072. let _check2 = [];
  17073. for (var i = 0; i < this.teacherJuri.length; i++) {
  17074. var gid = this.teacherJuri[i].userid;
  17075. _check.push(gid);
  17076. }
  17077. for (var i = 0; i < this.checkboxList3.length; i++) {
  17078. var _id = this.checkboxList3[i];
  17079. if (_check.indexOf(_id) !== -1) {
  17080. _check2.push(_id);
  17081. }
  17082. }
  17083. this.checkAll2 = _check2.length === _check.length;
  17084. this.setMan();
  17085. return;
  17086. let array = JSON.parse(JSON.stringify(val));
  17087. this.inviteCode = this.inviteCode.filter((el) => {
  17088. if (val.indexOf(el.cid) != -1) {
  17089. array.splice(array.indexOf(el.cid), 1);
  17090. return el;
  17091. }
  17092. });
  17093. for (var i = 0; i < array.length; i++) {
  17094. this.getInviteCode(array[i]);
  17095. }
  17096. },
  17097. handleCheckAllChange(val) {
  17098. if (val) {
  17099. for (var i = 0; i < this.grade2.length; i++) {
  17100. var gid = this.grade2[i].id;
  17101. if (this.checkboxList2.indexOf(gid) === -1) {
  17102. this.checkboxList2.push(gid);
  17103. }
  17104. }
  17105. } else {
  17106. let _check = [];
  17107. let _check2 = [];
  17108. for (var i = 0; i < this.grade2.length; i++) {
  17109. var gid = this.grade2[i].id;
  17110. _check.push(gid);
  17111. }
  17112. for (var i = 0; i < this.checkboxList2.length; i++) {
  17113. var _id = this.checkboxList2[i];
  17114. if (_check.indexOf(_id) === -1) {
  17115. _check2.push(_id);
  17116. }
  17117. }
  17118. this.checkboxList2 = _check2;
  17119. }
  17120. this.isIndeterminate = false;
  17121. },
  17122. handleCheckAllChange2(val) {
  17123. if (val) {
  17124. for (var i = 0; i < this.teacherJuri.length; i++) {
  17125. var gid = this.teacherJuri[i].userid;
  17126. if (this.checkboxList3.indexOf(gid) === -1) {
  17127. this.checkboxList3.push(gid);
  17128. }
  17129. }
  17130. } else {
  17131. let _check = [];
  17132. let _check2 = [];
  17133. for (var i = 0; i < this.teacherJuri.length; i++) {
  17134. var gid = this.teacherJuri[i].userid;
  17135. _check.push(gid);
  17136. }
  17137. for (var i = 0; i < this.checkboxList3.length; i++) {
  17138. var _id = this.checkboxList3[i];
  17139. if (_check.indexOf(_id) === -1) {
  17140. _check2.push(_id);
  17141. }
  17142. }
  17143. this.checkboxList3 = _check2;
  17144. }
  17145. this.isIndeterminate2 = false;
  17146. },
  17147. async getInviteCode(cid) {
  17148. let code = this.randomNumber();
  17149. let params = {
  17150. code: code,
  17151. oid: this.oid,
  17152. };
  17153. let type = 1;
  17154. for (var i = 0; i < this.inviteCode.length; i++) {
  17155. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  17156. type = 2;
  17157. }
  17158. }
  17159. if (type == 2) {
  17160. this.getInviteCode(cid);
  17161. return;
  17162. }
  17163. const res = await this.ajax.get(
  17164. this.$store.state.api + "selectInviteCode2",
  17165. params
  17166. );
  17167. if (
  17168. res.data.length &&
  17169. res.data[0].length &&
  17170. res.data[0][0].courseId != this.cid
  17171. ) {
  17172. this.getInviteCode(cid);
  17173. return;
  17174. }
  17175. let array = [];
  17176. for (var i = 0; i < this.inviteCode.length; i++) {
  17177. array.push(this.inviteCode[i].cid);
  17178. }
  17179. if (array.indexOf(cid) != -1) {
  17180. this.inviteCode[array.indexOf(cid)].ic = code;
  17181. } else {
  17182. this.inviteCode.push({ cid: cid, ic: code });
  17183. }
  17184. },
  17185. OpenInviteD(cid) {
  17186. let array = [];
  17187. this.icode = "";
  17188. for (var i = 0; i < this.inviteCode.length; i++) {
  17189. array.push(this.inviteCode[i].cid);
  17190. }
  17191. if (array.indexOf(cid) != -1) {
  17192. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  17193. }
  17194. this.inviteId = cid;
  17195. this.dialogVisibleInvite = true;
  17196. },
  17197. addInvite() {
  17198. let reg = /^[A-Za-z0-9]{4,}$/;
  17199. if (!reg.test(this.icode)) {
  17200. this.$message.error("请输入至少四位数字或英文组合的随机码");
  17201. return;
  17202. }
  17203. let type = 1;
  17204. for (var i = 0; i < this.inviteCode.length; i++) {
  17205. if (
  17206. this.inviteCode[i].cid != this.inviteId &&
  17207. this.icode == this.inviteCode[i].ic
  17208. ) {
  17209. type = 2;
  17210. }
  17211. }
  17212. if (type == 2) {
  17213. this.$message.error("已有此随机码,不能重复");
  17214. return;
  17215. }
  17216. let params = {
  17217. code: this.icode,
  17218. oid: this.oid,
  17219. };
  17220. this.ajax
  17221. .get(this.$store.state.api + "selectInviteCode", params)
  17222. .then((res) => {
  17223. if (
  17224. res.data.length &&
  17225. res.data[0].length &&
  17226. res.data[0][0].courseId != this.cid
  17227. ) {
  17228. this.$message.error("已有此随机码,不能重复");
  17229. return;
  17230. }
  17231. let array = [];
  17232. for (var i = 0; i < this.inviteCode.length; i++) {
  17233. array.push(this.inviteCode[i].cid);
  17234. }
  17235. if (array.indexOf(this.inviteId) != -1) {
  17236. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  17237. } else {
  17238. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  17239. }
  17240. this.icode = "";
  17241. this.dialogVisibleInvite = false;
  17242. })
  17243. .catch((err) => {
  17244. console.error(err);
  17245. });
  17246. },
  17247. randomNumber() {
  17248. // 随机生成两位数
  17249. // let num = Math.floor(Math.random() * 900) + 100;
  17250. // 生成 0 到 99 之间的随机整数
  17251. const randomNumber = Math.floor(Math.random() * 100);
  17252. // 如果随机数小于 10,补上前导零
  17253. const num =
  17254. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  17255. // 随机生成两个大写字母
  17256. let letters = "";
  17257. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  17258. for (let i = 0; i < 3; i++) {
  17259. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  17260. }
  17261. // 随机生成两位数字和字母的组合
  17262. let mix = "";
  17263. let chars =
  17264. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  17265. for (let i = 0; i < 3; i++) {
  17266. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  17267. mix += char;
  17268. }
  17269. // 随机选择一种类型
  17270. let type = Math.floor(Math.random() * 3);
  17271. return num;
  17272. // 根据类型输出结果
  17273. switch (type) {
  17274. case 0:
  17275. console.log(num); // 输出两位数
  17276. return num;
  17277. case 1:
  17278. console.log(letters); // 输出两个大写字母
  17279. return letters;
  17280. case 2:
  17281. console.log(mix); // 输出两位数字和字母的组合
  17282. return mix;
  17283. }
  17284. },
  17285. getPaste() {
  17286. let iframe = window.topU.document.querySelectorAll("#AIChat iframe")[0];
  17287. let iframe2 = window.topU.document.querySelectorAll("#AIChat aigpt")[0];
  17288. if (!iframe && !iframe2) {
  17289. return;
  17290. }
  17291. let copyData = iframe ? iframe.contentWindow.copyData : false;
  17292. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  17293. if (copyData && copyData.stageData && copyData.stageData.length) {
  17294. this.isPasteStage = true;
  17295. }
  17296. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  17297. this.isPasteStage = true;
  17298. }
  17299. if (copyData && copyData.selectData.length) {
  17300. this.isPasteChoice = true;
  17301. }
  17302. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  17303. this.isPasteTask = true;
  17304. }
  17305. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  17306. this.isPasteTask = true;
  17307. }
  17308. },
  17309. getPaste2() {
  17310. let iframe = document.querySelectorAll(".interIframe")[0];
  17311. const turndownService = new TurndownService();
  17312. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  17313. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  17314. if(confirm_next_step){
  17315. this.courseText += turndownService.turndown(confirm_next_step)
  17316. iframe.contentWindow.confirm_next_step = ''
  17317. }
  17318. if(work_area_text && work_area_text.aiContent){
  17319. this.courseText += turndownService.turndown(work_area_text.aiContent)
  17320. iframe.contentWindow.work_area_text = ''
  17321. }
  17322. },
  17323. textAreaChange(type, index){
  17324. if(type == 'courseText'){
  17325. this.addCourseBehavior('courseBehavior', `手动修改课程概况信息-${this.courseText}`)
  17326. }
  17327. if(type == 'targetCourseText2'){
  17328. this.addCourseBehavior('courseBehavior', `手动修改课程目标信息-${this.targetCourseText2}`)
  17329. }
  17330. if(type == 'taskDetail2'){
  17331. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程大纲信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2}`)
  17332. }
  17333. if(type == 'taskDetail3'){
  17334. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程教案信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3}`)
  17335. }
  17336. },
  17337. setCourseInfo(type){
  17338. let courseInfo = ''
  17339. let sub = []
  17340. let mclass = []
  17341. if (this.courseTypeId.length) {
  17342. for (var i = 0; i < this.courseTypeId.length; i++) {
  17343. let _sid = this.courseTypeId[i]
  17344. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17345. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17346. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17347. }
  17348. }
  17349. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17350. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17351. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17352. }
  17353. }
  17354. }
  17355. }
  17356. if(this.courseName){
  17357. courseInfo = `课程名称:${this.courseName} `
  17358. }
  17359. if(mclass.length){
  17360. courseInfo += `年级:${mclass.join(',')} `
  17361. }
  17362. if(sub.length){
  17363. courseInfo += `学科:${sub.join(',')} `
  17364. }
  17365. console.log(courseInfo)
  17366. window.course_info = courseInfo
  17367. this.course_info = courseInfo
  17368. window.course_lang = this.languageSetting
  17369. },
  17370. saveCourse(){
  17371. if (this.cid == "" || this.cid == undefined) {
  17372. this.addWork();
  17373. } else {
  17374. if (this.userid != this.courseUserid && this.role != "1") {
  17375. this.updateWork2();
  17376. } else {
  17377. this.updateWork();
  17378. }
  17379. }
  17380. },
  17381. setCover($event, attempts = 0) {
  17382. var _this = this;
  17383. this.addCourseBehavior('courseBehavior', `修改课程名称-${this.courseName}`)
  17384. _this.searchFileName = JSON.parse(JSON.stringify(_this.courseName))
  17385. if (_this.cover.length || attempts >= 3) {
  17386. return;
  17387. }
  17388. _this.findMatchingContents()
  17389. _this.imageloading2 = true;
  17390. _this.ajax
  17391. .post("https://gpt.cocorobo.cn/search_image", {
  17392. page: _this.ppage,
  17393. pagesize: 9,
  17394. query: _this.courseName,
  17395. })
  17396. .then(function (response) {
  17397. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  17398. if(data){
  17399. _this.cover = [];
  17400. setTimeout(() => {
  17401. _this.cover[0] = {
  17402. name: "网络图片.png",
  17403. url: data[0].thumbnail,
  17404. };
  17405. _this.imgChange1(null, null, 1, null);
  17406. _this.$forceUpdate();
  17407. _this.saveCourse()
  17408. }, 0);
  17409. _this.imageloading2 = false;
  17410. }else {
  17411. _this.imageloading2 = false;
  17412. _this.setCover($event, attempts + 1);
  17413. }
  17414. })
  17415. .catch(function (error) {
  17416. _this.imageloading2 = false;
  17417. _this.setCover($event, attempts + 1);
  17418. console.log(error);
  17419. });
  17420. },
  17421. searchImage() {
  17422. var _this = this;
  17423. _this.imageList = [];
  17424. if (!_this.searchImageValue) {
  17425. _this.sysPicVisible2 = true;
  17426. return;
  17427. }
  17428. _this.imageloading = true;
  17429. _this.ajax
  17430. .post("https://gpt.cocorobo.cn/search_image", {
  17431. page: _this.ppage,
  17432. pagesize: 9,
  17433. query: _this.searchImageValue,
  17434. })
  17435. .then(function (response) {
  17436. // console.log(response.data.data);
  17437. var data = response.data.FunctionResponse.result;
  17438. for (var i = 0; i < data.length; i++) {
  17439. _this.imageList.push({ url: data[i].thumbnail });
  17440. }
  17441. _this.imageloading = false;
  17442. })
  17443. .catch(function (error) {
  17444. console.log(error);
  17445. });
  17446. _this.sysPicVisible2 = true;
  17447. },
  17448. changePicture() {
  17449. this.ppage++;
  17450. this.searchImage();
  17451. },
  17452. resetImage() {
  17453. this.ppage = 1;
  17454. this.searchImage();
  17455. },
  17456. jumpGj(i, j) {
  17457. if (i + 1 != this.isClickColor) {
  17458. this.isClickColor = i + 1;
  17459. }
  17460. var a = document.scrollingElement;
  17461. this.toolIndexType = `gj${i}${j}`;
  17462. let target = document.querySelector(`#gj${i}${j}`);
  17463. if (target) {
  17464. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17465. setTimeout(() => {
  17466. target.scrollIntoView(true);
  17467. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17468. j
  17469. ].isFold3 = false;
  17470. setTimeout(() => {
  17471. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17472. }, 0);
  17473. }, 0);
  17474. }
  17475. },
  17476. jumpGj2(i, j, k) {
  17477. if (this.unitIndex != k) {
  17478. if (this.panUnitJson() == 2) {
  17479. return;
  17480. }
  17481. this.unitSet(k);
  17482. }
  17483. setTimeout(() => {
  17484. if (i + 1 != this.isClickColor) {
  17485. this.isClickColor = i + 1;
  17486. }
  17487. var a = document.scrollingElement;
  17488. this.toolIndexType = `gj${i}${j}${k}`;
  17489. let target = document.querySelector(`#gj${i}${j}`);
  17490. if (target) {
  17491. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17492. setTimeout(() => {
  17493. target.scrollIntoView(true);
  17494. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17495. j
  17496. ].isFold3 = false;
  17497. setTimeout(() => {
  17498. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17499. }, 0);
  17500. }, 0);
  17501. }
  17502. }, 0);
  17503. },
  17504. dragStart(val, i, j) {
  17505. console.log(this.taskCount);
  17506. this.dragType = "drag";
  17507. this.taskCount = j;
  17508. this.oldIndex = i;
  17509. this.oldData = val;
  17510. },
  17511. dragOver(i, j) {
  17512. this.typeIndex = "chapter-" + j + "-" + i;
  17513. this.newIndex = i;
  17514. },
  17515. dragEnd() {
  17516. if (this.dragType != "drag") {
  17517. this.typeIndex = "";
  17518. this.newIndex = "";
  17519. this.dragType = "";
  17520. this.isdrag = "";
  17521. return;
  17522. }
  17523. console.log(this.taskCount);
  17524. let newItems = [
  17525. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17526. .chapterData,
  17527. ];
  17528. // 删除老的节点
  17529. newItems.splice(this.oldIndex, 1);
  17530. // 在列表中目标位置增加新的节点
  17531. newItems.splice(this.newIndex, 0, this.oldData);
  17532. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17533. this.taskCount
  17534. ].chapterData = [...newItems];
  17535. this.typeIndex = "";
  17536. this.newIndex = "";
  17537. this.dragType = "";
  17538. this.isdrag = "";
  17539. this.$forceUpdate();
  17540. },
  17541. dragTaskStart(val, i, j) {
  17542. this.dragType = "task";
  17543. this.oldIndex = i;
  17544. this.oldData = val;
  17545. this.oldUnitIndex = j;
  17546. },
  17547. dragTaskOver(i, j) {
  17548. this.typeIndex = "task-" + i;
  17549. this.newIndex = i;
  17550. this.checkUnitIndex = j;
  17551. },
  17552. async dragTaskEnd() {
  17553. if (this.dragType != "task") {
  17554. this.newIndex = "";
  17555. this.dragType = "";
  17556. this.typeIndex = "";
  17557. this.checkUnitIndex = "";
  17558. this.isdrag = "";
  17559. return;
  17560. }
  17561. if (
  17562. this.newIndex == this.oldIndex &&
  17563. this.oldUnitIndex == this.checkUnitIndex
  17564. ) {
  17565. this.newIndex = "";
  17566. this.dragType = "";
  17567. this.typeIndex = "";
  17568. this.checkUnitIndex = "";
  17569. this.isdrag = "";
  17570. return;
  17571. }
  17572. let count1 = await this.getWorksCount(
  17573. 2,
  17574. this.checkUnitIndex,
  17575. this.newIndex,
  17576. 0
  17577. );
  17578. let count2 = await this.getWorksCount(
  17579. 2,
  17580. this.oldUnitIndex,
  17581. this.oldIndex,
  17582. 0
  17583. );
  17584. if (count1 > 0 || count2 > 0) {
  17585. this.$confirm(
  17586. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  17587. "提示",
  17588. {
  17589. confirmButtonText: "确定",
  17590. cancelButtonText: "取消",
  17591. type: "warning",
  17592. }
  17593. )
  17594. .then(() => {
  17595. if (this.oldUnitIndex != this.checkUnitIndex) {
  17596. let newItems = [
  17597. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17598. ];
  17599. // 删除老的节点
  17600. newItems.splice(this.oldIndex, 1);
  17601. // 在列表中目标位置增加新的节点
  17602. let newItems2 = [
  17603. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17604. ];
  17605. newItems2.splice(this.newIndex, 0, this.oldData);
  17606. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17607. ...newItems,
  17608. ];
  17609. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17610. ...newItems2,
  17611. ];
  17612. } else {
  17613. let newItems = [
  17614. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17615. ];
  17616. let chapterData = []
  17617. if (this.oldIndex == 0) {
  17618. chapterData = newItems[this.oldIndex].chapterData
  17619. newItems[this.oldIndex].chapterData = []
  17620. } else if (this.newIndex == 0) {
  17621. chapterData = newItems[this.newIndex].chapterData
  17622. newItems[this.oldIndex].chapterData = []
  17623. }
  17624. // 删除老的节点
  17625. newItems.splice(this.oldIndex, 1);
  17626. // 在列表中目标位置增加新的节点
  17627. newItems.splice(this.newIndex, 0, this.oldData);
  17628. if (this.oldIndex == 0 || this.newIndex == 0) {
  17629. newItems[0].chapterData = chapterData
  17630. }
  17631. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17632. ...newItems,
  17633. ];
  17634. }
  17635. this.typeIndex = "";
  17636. this.newIndex = "";
  17637. this.dragType = "";
  17638. this.checkUnitIndex = "";
  17639. this.isdrag = "";
  17640. this.updateWork();
  17641. this.$forceUpdate();
  17642. })
  17643. .catch(() => {
  17644. this.newIndex = "";
  17645. this.dragType = "";
  17646. this.typeIndex = "";
  17647. this.checkUnitIndex = "";
  17648. this.isdrag = "";
  17649. return;
  17650. });
  17651. } else {
  17652. if (this.oldUnitIndex != this.checkUnitIndex) {
  17653. let newItems = [
  17654. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17655. ];
  17656. // 删除老的节点
  17657. newItems.splice(this.oldIndex, 1);
  17658. // 在列表中目标位置增加新的节点
  17659. let newItems2 = [
  17660. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17661. ];
  17662. newItems2.splice(this.newIndex, 0, this.oldData);
  17663. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17664. ...newItems,
  17665. ];
  17666. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17667. ...newItems2,
  17668. ];
  17669. } else {
  17670. let newItems = [
  17671. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17672. ];
  17673. let chapterData = []
  17674. if (this.oldIndex == 0) {
  17675. chapterData = newItems[this.oldIndex].chapterData
  17676. newItems[this.oldIndex].chapterData = []
  17677. } else if (this.newIndex == 0) {
  17678. chapterData = newItems[this.newIndex].chapterData
  17679. newItems[this.oldIndex].chapterData = []
  17680. }
  17681. // 删除老的节点
  17682. newItems.splice(this.oldIndex, 1);
  17683. // 在列表中目标位置增加新的节点
  17684. newItems.splice(this.newIndex, 0, this.oldData);
  17685. if (this.oldIndex == 0 || this.newIndex == 0) {
  17686. newItems[0].chapterData = chapterData
  17687. }
  17688. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17689. ...newItems,
  17690. ];
  17691. }
  17692. this.typeIndex = "";
  17693. this.newIndex = "";
  17694. this.dragType = "";
  17695. this.checkUnitIndex = "";
  17696. this.isdrag = "";
  17697. this.updateWork();
  17698. this.$forceUpdate();
  17699. }
  17700. },
  17701. dragUnitStart(val, i) {
  17702. this.dragType = "Unit";
  17703. this.oldIndex = i;
  17704. this.oldData = val;
  17705. },
  17706. dragUnitOver(i) {
  17707. this.typeIndex = "Unit-" + i;
  17708. this.newIndex = i;
  17709. console.log(i, this.unitJson[i].toolOpen);
  17710. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  17711. this.unitJson[i].toolOpen = true;
  17712. this.updateWork();
  17713. this.$forceUpdate();
  17714. }
  17715. },
  17716. async dragUnitEnd() {
  17717. if (this.dragType != "Unit") {
  17718. this.newIndex = "";
  17719. this.dragType = "";
  17720. this.typeIndex = "";
  17721. this.isdrag = "";
  17722. return;
  17723. }
  17724. if (this.newIndex == this.oldIndex) {
  17725. this.newIndex = "";
  17726. this.dragType = "";
  17727. this.typeIndex = "";
  17728. this.isdrag = "";
  17729. return;
  17730. }
  17731. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  17732. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  17733. console.log(count1, count2);
  17734. if (count1 > 0 || count2 > 0) {
  17735. this.$confirm(
  17736. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  17737. "提示",
  17738. {
  17739. confirmButtonText: "确定",
  17740. cancelButtonText: "取消",
  17741. type: "warning",
  17742. }
  17743. )
  17744. .then(() => {
  17745. let newItems = [...this.unitJson];
  17746. // 删除老的节点
  17747. newItems.splice(this.oldIndex, 1);
  17748. // 在列表中目标位置增加新的节点
  17749. newItems.splice(this.newIndex, 0, this.oldData);
  17750. this.unitJson = [...newItems];
  17751. this.typeIndex = "";
  17752. this.newIndex = "";
  17753. this.dragType = "";
  17754. this.isdrag = "";
  17755. this.updateWork();
  17756. this.$forceUpdate();
  17757. })
  17758. .catch(() => {
  17759. this.newIndex = "";
  17760. this.dragType = "";
  17761. this.typeIndex = "";
  17762. this.isdrag = "";
  17763. return;
  17764. });
  17765. } else {
  17766. let newItems = [...this.unitJson];
  17767. // 删除老的节点
  17768. newItems.splice(this.oldIndex, 1);
  17769. // 在列表中目标位置增加新的节点
  17770. newItems.splice(this.newIndex, 0, this.oldData);
  17771. this.unitJson = [...newItems];
  17772. this.typeIndex = "";
  17773. this.newIndex = "";
  17774. this.dragType = "";
  17775. this.isdrag = "";
  17776. this.updateWork();
  17777. this.$forceUpdate();
  17778. }
  17779. },
  17780. getWorksCount(type, stage, task, tool) {
  17781. return new Promise((resolve, reject) => {
  17782. let params = [
  17783. {
  17784. cid: this.cid,
  17785. stage: stage,
  17786. task: task,
  17787. tool: tool,
  17788. type: type,
  17789. },
  17790. ];
  17791. this.ajax
  17792. .post(this.$store.state.api + "getCourseWorkCount", params)
  17793. .then((res) => {
  17794. let count = res.data[0][0].count;
  17795. resolve(count);
  17796. })
  17797. .catch((err) => {
  17798. resolve(0);
  17799. this.$message.error("网络不佳");
  17800. console.error(err);
  17801. });
  17802. });
  17803. },
  17804. getTwoType(id) {
  17805. this.twoJson = [];
  17806. var array = this.CourseTypeJson1[
  17807. "3f8eed32-aba9-11ee-b534-005056b86db5"
  17808. ].filter((e) => {
  17809. return e.ppid == id;
  17810. });
  17811. this.twoJson = array;
  17812. this.$forceUpdate();
  17813. },
  17814. ctype() {
  17815. this.oneJson =
  17816. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  17817. },
  17818. selectAllType1() {
  17819. this.CourseType1 = [];
  17820. this.CourseTypeJson1 = {};
  17821. this.courseTypeId1 = {};
  17822. this.$forceUpdate();
  17823. let params = {
  17824. org: this.org && this.org != "" ? this.org : "",
  17825. oid: this.oid && this.oid != "" ? this.oid : "",
  17826. };
  17827. this.ajax
  17828. .get(this.$store.state.api + "selectAllEvaType", params)
  17829. .then((res) => {
  17830. this.CourseType1 = res.data;
  17831. for (var i = 0; i < res.data[0].length; i++) {
  17832. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  17833. res.data[0][i].name = "一级分类";
  17834. } else if (
  17835. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  17836. ) {
  17837. res.data[0][i].name = "二级分类";
  17838. }
  17839. if (!this.cid) {
  17840. this.courseTypeId1[res.data[0][i].id] = [];
  17841. }
  17842. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  17843. this.CourseTypeJson1[res.data[0][i].id] = [];
  17844. }
  17845. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  17846. for (var j = 0; j < res.data[1].length; j++) {
  17847. if (res.data[0][i].id == res.data[1][j].pid) {
  17848. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  17849. }
  17850. }
  17851. // } else {
  17852. if (res.data[2].length > 0) {
  17853. for (var j = 0; j < res.data[2].length; j++) {
  17854. if (res.data[0][i].id == res.data[2][j].pid) {
  17855. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  17856. }
  17857. }
  17858. }
  17859. if (res.data[3].length > 0) {
  17860. for (var j = 0; j < res.data[3].length; j++) {
  17861. if (res.data[0][i].id == res.data[3][j].pid) {
  17862. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  17863. }
  17864. }
  17865. }
  17866. // }
  17867. }
  17868. this.ctype();
  17869. this.cetBoxDialog = true;
  17870. })
  17871. .catch((err) => {
  17872. console.error(err);
  17873. });
  17874. },
  17875. allEvaCan() {
  17876. if (this.taskLoading.length) {
  17877. let _pan = 1
  17878. for (var k = 0; k < this.taskLoading.length; k++) {
  17879. if (this.taskLoading[k]) {
  17880. this.$message({
  17881. message: `请等待任务${k + 1}回答完毕后再继续`,
  17882. type: "warning"
  17883. });
  17884. _pan = 2
  17885. }
  17886. }
  17887. if (_pan == 2) {
  17888. return
  17889. }
  17890. }
  17891. if (this.taskGLoading.length) {
  17892. let _pan = 1
  17893. for (var k = 0; k < this.taskGLoading.length; k++) {
  17894. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  17895. this.$message({
  17896. message: `请等待任务${k + 1}回答完毕后再继续`,
  17897. type: "warning"
  17898. });
  17899. _pan = 2
  17900. }
  17901. }
  17902. if (_pan == 2) {
  17903. return
  17904. }
  17905. }
  17906. this.$confirm("是否一键生成所有工具的评价设置?会占用您一些时间。", "提示", {
  17907. confirmButtonText: "确定",
  17908. cancelButtonText: "取消",
  17909. type: "warning",
  17910. customClass: 'custom-confirm-box'
  17911. })
  17912. .then(() => {
  17913. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17914. for (var index = 0; index < taskJson.length; index++) {
  17915. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  17916. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  17917. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  17918. }
  17919. }
  17920. }
  17921. })
  17922. .catch(() => {
  17923. });
  17924. setTimeout(() => {
  17925. this.setTipsIndex()
  17926. }, 500)
  17927. },
  17928. allEvaCan2(index) {
  17929. if (this.taskLoading.length) {
  17930. let _pan = 1
  17931. for (var k = 0; k < this.taskLoading.length; k++) {
  17932. if (this.taskLoading[k]) {
  17933. this.$message({
  17934. message: `请等待任务${k + 1}回答完毕后再继续`,
  17935. type: "warning"
  17936. });
  17937. _pan = 2
  17938. }
  17939. }
  17940. if (_pan == 2) {
  17941. return
  17942. }
  17943. }
  17944. if (this.taskGLoading.length) {
  17945. let _pan = 1
  17946. for (var k = 0; k < this.taskGLoading.length; k++) {
  17947. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  17948. this.$message({
  17949. message: `请等待任务${k + 1}回答完毕后再继续`,
  17950. type: "warning"
  17951. });
  17952. _pan = 2
  17953. }
  17954. }
  17955. if (_pan == 2) {
  17956. return
  17957. }
  17958. }
  17959. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17960. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  17961. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  17962. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  17963. }
  17964. }
  17965. this.$message({
  17966. message: `执行成功`,
  17967. type: "success"
  17968. });
  17969. },
  17970. setAiJson(pan,string,string2,string3){
  17971. if(pan == 'aiTeacher2'){
  17972. this.aiJson['teacherDetail2'] = string
  17973. }else if(pan == 'aiRateRuleA'){
  17974. this.aiJson['aiRateRule'] = string
  17975. }else if(pan == 'aiOutline2'){
  17976. this.aiJson['aiOutlineTask'] = string
  17977. this.aiJson['aiOutlineDetail'] = string2
  17978. }else if(pan == 'aiTeacher3'){
  17979. this.aiJson['aiCpoteTask'] = string
  17980. this.aiJson['teacherDetail2'] = string2
  17981. }else if(pan == 'aiTask2'){
  17982. this.aiJson['aiTask'] = string
  17983. }else if(pan == 'aiTask3'){
  17984. this.aiJson['aiTaskG1'] = string
  17985. this.aiJson['aiTaskG2'] = string2
  17986. this.aiJson['aiTaskG3'] = string3
  17987. }else if(pan == 'aiteacherTextDetail'){
  17988. this.aiJson['aiAbstract'] = string
  17989. }else if(pan == 'aitargetTextDetail'){
  17990. this.aiJson['aiTarget'] = string
  17991. }else if(pan == 'aitargetTextDetail2'){
  17992. this.aiJson['aiTarget2'] = string
  17993. }else if(pan == 'aitargetTextDetail3'){
  17994. this.aiJson['aiTargetGet'] = string
  17995. this.aiJson['aiTarget2'] = string2
  17996. }else {
  17997. this.aiJson[pan] = string
  17998. }
  17999. this.aiText2 = ''
  18000. this.aiText3 = ''
  18001. this.$forceUpdate();
  18002. },
  18003. editTask3(index){
  18004. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  18005. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  18006. }else {
  18007. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  18008. }
  18009. setTimeout(() => {
  18010. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  18011. setTimeout(() => {
  18012. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  18013. }, 0);
  18014. }, 100);
  18015. this.$forceUpdate();
  18016. },
  18017. editTask2(index){
  18018. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  18019. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  18020. }else {
  18021. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  18022. }
  18023. setTimeout(() => {
  18024. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  18025. setTimeout(() => {
  18026. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  18027. }, 0);
  18028. }, 100);
  18029. this.$forceUpdate();
  18030. },
  18031. openRule(i, k){
  18032. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  18033. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  18034. }else {
  18035. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  18036. }
  18037. setTimeout(() => {
  18038. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  18039. setTimeout(() => {
  18040. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  18041. }, 0);
  18042. }, 200);
  18043. this.$forceUpdate();
  18044. },
  18045. editCpote(index){
  18046. if(this.cpote[index]){
  18047. this.cpote[index] = false
  18048. }else {
  18049. this.cpote[index] = true
  18050. }
  18051. setTimeout(() => {
  18052. this.cpote[index.replace('s','')] += "*0*%*";
  18053. setTimeout(() => {
  18054. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  18055. }, 0);
  18056. }, 100);
  18057. this.$forceUpdate();
  18058. },
  18059. clickGenTT(){
  18060. if(!this.teacherInfoData.length){
  18061. this.$message.error("请上传教案");
  18062. return;
  18063. }
  18064. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  18065. this.openAiDialog(2, 'aiteacherTextDetail',1)
  18066. setTimeout(() => {
  18067. this.openAiDialog(2, 'aitargetTextDetail',1)
  18068. }, 500);
  18069. },
  18070. async getUserName() {
  18071. let params = { uid: this.userid };
  18072. try {
  18073. let res = await this.ajax.get(
  18074. this.$store.state.api + "getUser",
  18075. params
  18076. );
  18077. return res.data[0][0].name;
  18078. } catch (err) {
  18079. console.error(err);
  18080. }
  18081. },
  18082. getCGN(type){
  18083. let sub = [] //学科
  18084. let mclass = [] //年纪
  18085. let theme = []
  18086. if (this.courseTypeId.length) {
  18087. for (var i = 0; i < this.courseTypeId.length; i++) {
  18088. let _sid = this.courseTypeId[i]
  18089. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18090. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18091. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18092. }
  18093. }
  18094. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18095. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18096. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18097. }
  18098. }
  18099. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18100. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  18101. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  18102. }
  18103. }
  18104. }
  18105. if(type == 1){
  18106. return sub.join(",")
  18107. }else if(type == 2){
  18108. return mclass.join(",")
  18109. }else if(type == 3){
  18110. return theme.join(",")
  18111. }
  18112. }
  18113. },
  18114. async exportTeachPlan(){
  18115. this.loading = true
  18116. const zip = new JSZip();
  18117. let md = new MarkdownIt();
  18118. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18119. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18120. let String = ''
  18121. String += `<h1 style="text-align: center;">${this.courseName}</h1>`
  18122. String += `<h2>课程基本信息</h2>`
  18123. String += `<div><strong>设计者:</strong><span>${await this.getUserName()}</span></div>`
  18124. String += `<div><strong>年级:</strong><span></span>${this.getCGN(2)}</div>`
  18125. String += `<div><strong>主题:</strong><span></span>${this.getCGN(3)}</div>`
  18126. String += `<div><strong>学科:</strong><span></span>${this.getCGN(1)}</div>`
  18127. if(courseText){
  18128. String += `<h2>课程概况</h2>`
  18129. String += md.render(courseText)
  18130. }
  18131. if(target){
  18132. String += `<h2>课程目标</h2>`
  18133. String += md.render(target)
  18134. }
  18135. String += `<h2>课程教案</h2>`
  18136. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18137. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18138. // let name = _task.task+'-教案'
  18139. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  18140. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  18141. await this.generate(name, _html, i)
  18142. }
  18143. String += `<h3>任务${i+1}</h3>`
  18144. String += `<h4>${_task.task}</h4>`
  18145. String += _html
  18146. // let file = await this.generateExport(name, _html, i)
  18147. // zip.file(`${name}.docx`, file, { binary: true })
  18148. }
  18149. await this.generateExport(this.courseName, String, i)
  18150. setTimeout(() => {
  18151. this.loading = false
  18152. }, 2000);
  18153. // zip.generateAsync({ type: "blob" }).then((content) => {
  18154. // // 生成二进制流
  18155. // saveAs(
  18156. // content,
  18157. // this.courseName + "-" + "教案.zip"
  18158. // ); // 利用file-saver保存文件 自定义文件名
  18159. // setTimeout(() => {
  18160. // this.loading = false
  18161. // // if(!this.cid){
  18162. // // this.addWork(3)
  18163. // // }else{
  18164. // // this.updateWork();
  18165. // // this.steps = 4;
  18166. // // }
  18167. // }, 2000);
  18168. // });
  18169. },
  18170. async exportTaskEA(){
  18171. this.loading = true
  18172. const zip = new JSZip();
  18173. let md = new MarkdownIt();
  18174. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18175. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18176. for(var j = 0; j < _task.chapterData.length; j++){
  18177. if(_task.chapterData[j].type == 3 && _task.chapterData[j].name.includes('学历案')){
  18178. let file = await getFile(_task.chapterData[j].url)
  18179. if (file.data != 1) {
  18180. // 下载文件, 并存成ArrayBuffer对象
  18181. const file_name = _task.chapterData[j].name; // 获取文件名
  18182. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  18183. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  18184. // 判断是否有重复的文件名字
  18185. if (!zip.file(file_name)) {
  18186. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  18187. } else {
  18188. // 如果有重复的文件名,则在文件名后添加序号
  18189. let count = 1;
  18190. let newFileName = fileNameWithoutExt;
  18191. while (zip.file(`${newFileName}.${fileExt}`)) {
  18192. newFileName = `${fileNameWithoutExt}(${count})`;
  18193. count++;
  18194. }
  18195. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  18196. }
  18197. }
  18198. }
  18199. }
  18200. for(var j = 0; j < _task.toolChoose.length; j++){
  18201. let tool = _task.toolChoose[j]
  18202. if(tool.eList && tool.eList.length){
  18203. let tableContent = '| 素养 | 评价标准 | 评价细则 |\n| --- | --- | --- |\n';
  18204. tool.eList.forEach(item => {
  18205. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18206. });
  18207. let html = md.render(tableContent);
  18208. let name = `任务${i+1}工具${j+1}的评价.docx`
  18209. let file = await this.generateExport2(name, html, i)
  18210. zip.file(`${name}`, file, { binary: true })
  18211. }
  18212. }
  18213. // let file = await this.generateExport(name, _html, i)
  18214. // zip.file(`${name}.docx`, file, { binary: true })
  18215. }
  18216. zip.generateAsync({ type: "blob" }).then((content) => {
  18217. // 生成二进制流
  18218. saveAs(
  18219. content,
  18220. this.courseName + "-" + "评价和学历案.zip"
  18221. ); // 利用file-saver保存文件 自定义文件名
  18222. setTimeout(() => {
  18223. this.loading = false
  18224. }, 2000);
  18225. });
  18226. },
  18227. async downloadFile(item){
  18228. let data = await getFile(item.url)
  18229. let file = new File([data.data], item.name);
  18230. saveAs(file, item.name);
  18231. },
  18232. async addAppendixEva(i, j){
  18233. let md = new MarkdownIt();
  18234. let tool = this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose[j]
  18235. if(tool.eList && tool.eList.length){
  18236. let tableContent = '| 素养 | 评价标准 | 评价细则 |\n| --- | --- | --- |\n';
  18237. tool.eList.forEach(item => {
  18238. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18239. });
  18240. let html = md.render(tableContent);
  18241. let name = `任务${i+1}工具${j+1}的评价.docx`
  18242. let file = await this.generateExport2(name, html, i)
  18243. this.beforeUploadHtml(file, 0, "", 2)
  18244. }
  18245. },
  18246. clickGenTT2(){
  18247. if (this.courseName == "") {
  18248. this.$message.error("请补充填写课程名称");
  18249. return;
  18250. }
  18251. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  18252. let functionA = ''
  18253. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18254. // setTimeout(() => {
  18255. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18256. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18257. // }, 500);
  18258. functionA = ()=>{
  18259. this.openAiDialog(2, 'aitargetTextDetail3',1)
  18260. }
  18261. }
  18262. this.openAiDialog(2, 'aiDetail',1, functionA)
  18263. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18264. // setTimeout(() => {
  18265. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18266. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18267. // }, 500);
  18268. }
  18269. this.courseTextBool = true
  18270. },
  18271. changeIsuseT(){
  18272. if(this.isuseT == 1){
  18273. this.courseTextB = false
  18274. }else if(this.isuseT == 2){
  18275. navigator.mediaDevices.getUserMedia({ audio: true })
  18276. .then(stream => {
  18277. console.log('获取录音权限成功');
  18278. })
  18279. .catch(err => {
  18280. this.$message.error('获取录音权限失败')
  18281. console.error('获取录音权限失败:', err);
  18282. });
  18283. }else{
  18284. if(this.courseText){
  18285. this.courseTextB = false
  18286. }else{
  18287. this.courseTextB = true
  18288. }
  18289. }
  18290. this.interSetting = false
  18291. this.interPan = true
  18292. },
  18293. changeLang(){
  18294. window.course_lang = this.languageSetting
  18295. },
  18296. openInterPanSetting(){
  18297. this.interSetting = !this.interSetting
  18298. if(this.interSetting){
  18299. if(this.istemplate == 1){
  18300. this.agentid = this.aiJson.agentid
  18301. }else {
  18302. this.agentid = this.aiJson.sagentid
  18303. }
  18304. }else {
  18305. this.agentid = ''
  18306. }
  18307. },
  18308. openInterPanSetting2(){
  18309. this.interSetting = !this.interSetting
  18310. if(this.interSetting){
  18311. this.r_agentid = this.aiJson.recordAgentid
  18312. }else {
  18313. this.r_agentid = ''
  18314. }
  18315. },
  18316. setAgentid(){
  18317. if(!this.agentid.trim()){
  18318. this.$message.error('请输入工作流链接')
  18319. return;
  18320. }
  18321. if(this.istemplate == 1){
  18322. this.aiJson.agentid = this.agentid.trim()
  18323. }else {
  18324. this.aiJson.sagentid = this.agentid.trim()
  18325. }
  18326. this.interFlash = false
  18327. setTimeout(() => {
  18328. this.interFlash = true
  18329. }, 100);
  18330. this.interSetting = false
  18331. },
  18332. setAgentid2(){
  18333. if(!this.r_agentid.trim()){
  18334. this.$message.error('请输入工作流链接')
  18335. return;
  18336. }
  18337. this.aiJson.recordAgentid = this.r_agentid.trim()
  18338. this.interSetting = false
  18339. },
  18340. rebuildAgentid(){
  18341. this.aiJson.sagentid = ''
  18342. this.interFlash = false
  18343. setTimeout(() => {
  18344. this.interFlash = true
  18345. }, 100);
  18346. this.interSetting = false
  18347. },
  18348. cancelInterSetting(){
  18349. this.agentid = ''
  18350. this.interSetting = false
  18351. },
  18352. cancelInterSetting2(){
  18353. this.r_agentid = ''
  18354. this.interSetting = false
  18355. },
  18356. openAiDialog2(clickType, type, callback, index, tindex){
  18357. if (this.taskLoading.length) {
  18358. let _pan = 1
  18359. for(var k = 0; k < this.taskLoading.length; k++){
  18360. if(this.taskLoading[k]){
  18361. this.$message({
  18362. message: `请等待任务${k+1}回答完毕后再继续`,
  18363. type: "warning"
  18364. });
  18365. _pan = 2
  18366. }
  18367. }
  18368. if(_pan == 2){
  18369. return
  18370. }
  18371. }
  18372. if(this.taskGLoading.length){
  18373. let _pan = 1
  18374. for(var k = 0; k < this.taskGLoading.length; k++){
  18375. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  18376. this.$message({
  18377. message: `请等待任务${k+1}回答完毕后再继续`,
  18378. type: "warning"
  18379. });
  18380. _pan = 2
  18381. }
  18382. }
  18383. if(_pan == 2){
  18384. return
  18385. }
  18386. }
  18387. let pan2 = 1
  18388. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18389. for(var _index = 0; _index < taskJson.length; _index++){
  18390. for (var j = 0; j < taskJson[_index].toolChoose.length; j++) {
  18391. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[_index].toolChoose[j].tool[0]) != -1){
  18392. if(this.$refs['evalist'+_index+j] && this.$refs['evalist'+_index+j][0].loading){
  18393. this.$message({
  18394. message: `请等待任务${_index+1}回答完毕后再继续`,
  18395. type: "warning"
  18396. });
  18397. pan2 = 2
  18398. }
  18399. }
  18400. }
  18401. }
  18402. if(pan2 == 2){
  18403. return
  18404. }
  18405. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  18406. confirmButtonText: "确定",
  18407. cancelButtonText: "取消",
  18408. type: "warning",
  18409. customClass: 'custom-confirm-box'
  18410. })
  18411. .then(() => {
  18412. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  18413. // this.openAiDialog(clickType, 'aiTeacher')
  18414. // }else {
  18415. this.openAiDialog(clickType, type, callback, index, tindex)
  18416. // }
  18417. })
  18418. .catch(() => {
  18419. });
  18420. setTimeout(() => {
  18421. this.setTipsIndex()
  18422. }, 500)
  18423. },
  18424. async openAiDialog(clickType, type, callback, index, tindex) {
  18425. let fileid = this.isFileSearch ? [...this.fileIds] : []
  18426. fileid = [...fileid]
  18427. if (this.infoData.length) {
  18428. for (var i = 0; i < this.infoData.length; i++) {
  18429. if(this.infoData[i].fileid){
  18430. fileid.push(this.infoData[i].fileid)
  18431. }else {
  18432. let _fileid = await this.createFileid(this.infoData[i].url)
  18433. if(_fileid){
  18434. this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18435. this.$forceUpdate();
  18436. if(_fileid != 1){
  18437. fileid.push(_fileid)
  18438. }
  18439. }
  18440. }
  18441. }
  18442. }
  18443. fileid = [...fileid, ...this.knowFileids, ...this.knowFileids2]
  18444. if(fileid.length > 30){
  18445. this.$message.error('目前检索文件不能超过30个噢,请减少一些')
  18446. return;
  18447. }
  18448. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  18449. this.$message.error("您没有权限修改/查看提示词");
  18450. return;
  18451. }
  18452. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  18453. this.$message.error("请上传教案");
  18454. return;
  18455. }
  18456. if (this.courseName == "") {
  18457. this.$message.error("请补充填写课程名称");
  18458. return;
  18459. }
  18460. this.aiText2 = ''
  18461. this.clickType = clickType
  18462. let sub = []
  18463. if (this.courseTypeId.length) {
  18464. for (var i = 0; i < this.courseTypeId.length; i++) {
  18465. let _sid = this.courseTypeId[i]
  18466. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18467. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18468. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18469. }
  18470. }
  18471. }
  18472. }
  18473. let mclass = []
  18474. if (this.courseTypeId.length) {
  18475. for (var i = 0; i < this.courseTypeId.length; i++) {
  18476. let _sid = this.courseTypeId[i]
  18477. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18478. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18479. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18480. }
  18481. }
  18482. }
  18483. }
  18484. if (type == "aiDetail") {
  18485. if (this.ttextLoading) {
  18486. this.$message({
  18487. message: "请回答完毕后再次发送",
  18488. type: "warning"
  18489. });
  18490. return;
  18491. }
  18492. this.aitype = "aiDetail"
  18493. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  18494. this.aiText = this.aiJson.aiDetail
  18495. this.aiCallBack = [callback, index]
  18496. } else if (type == "aiOutline") {
  18497. this.aitype = "aiOutline"
  18498. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18499. this.aiText = this.aiJson.aiOutline
  18500. } else if (type == "aiOutline2") {
  18501. this.aitype = "aiOutline2"
  18502. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18503. this.aiText = this.aiJson.aiOutlineTask
  18504. this.aiText2 = this.aiJson.aiOutlineDetail
  18505. } else if (type == "aiOutlineDetail2") {
  18506. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  18507. this.$message({
  18508. message: "请回答完毕后再次发送",
  18509. type: "warning"
  18510. });
  18511. return;
  18512. }
  18513. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  18514. this.$message.error('请输入任务名称')
  18515. return;
  18516. }
  18517. this.aitype = type
  18518. this.aiCallBack = callback
  18519. this.aiText = this.aiJson.aiOutlineDetail2
  18520. } else if (type == "aiTask") {
  18521. this.aitype = "aiTask"
  18522. var _text = ""
  18523. for (var i = 0; i < this.teacherText.length; i++) {
  18524. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  18525. }
  18526. // this.aiText = `请根据${_text}。`
  18527. this.aiText = this.aiJson.aiTask
  18528. this.aiCallBack = callback
  18529. } else if (type == "aiTask2") {
  18530. if (this.taskLoading[callback]) {
  18531. this.$message({
  18532. message: "请回答完毕后再次发送",
  18533. type: "warning"
  18534. });
  18535. return;
  18536. }
  18537. this.aitype = "aiTask2"
  18538. this.aiText = this.aiJson.aiTask
  18539. this.aiCallBack = [callback, index]
  18540. } else if (type == "aiTask3") {
  18541. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  18542. this.$message({
  18543. message: "请回答完毕后再次发送",
  18544. type: "warning"
  18545. });
  18546. return;
  18547. }
  18548. this.aitype = type
  18549. this.aiText = this.aiJson.aiTaskG1
  18550. this.aiText2 = this.aiJson.aiTaskG2
  18551. this.aiText3 = this.aiJson.aiTaskG3
  18552. this.aiCallBack = [callback, index]
  18553. } else if (type == "aiTaskG3") {
  18554. if (this.taskGLoading[callback] && this.taskGLoading[callback][0] && (this.taskGLoading[callback][0][2])) {
  18555. this.$message({
  18556. message: "请回答完毕后再次发送",
  18557. type: "warning"
  18558. });
  18559. return;
  18560. }
  18561. this.aitype = type
  18562. this.aiText = this.aiJson.aiTaskG3
  18563. this.aiCallBack = callback
  18564. } else if (type == "aiTaskG2") {
  18565. if (this.taskGLoading[callback] && this.taskGLoading[callback][0] && (this.taskGLoading[callback][0][1])) {
  18566. this.$message({
  18567. message: "请回答完毕后再次发送",
  18568. type: "warning"
  18569. });
  18570. return;
  18571. }
  18572. if(callback != 'all' && !this.unitJson[0].chapterInfo[0].taskJson[callback].taskDetail3){
  18573. this.$message({
  18574. message: `请先生成任务${callback}的教案在执行此操作`,
  18575. type: "warning"
  18576. });
  18577. return;
  18578. }
  18579. this.aitype = type
  18580. this.aiText = this.aiJson.aiTaskG2
  18581. this.aiCallBack = callback
  18582. } else if (type == "aiDetail1") {
  18583. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  18584. this.$message({
  18585. message: "请回答完毕后再次发送",
  18586. type: "warning"
  18587. });
  18588. return;
  18589. }
  18590. this.aitype = "aiDetail1"
  18591. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  18592. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  18593. this.aiText = this.aiJson.aiDetail1
  18594. this.aiCallBack = callback
  18595. this.aiIndex = index
  18596. } else if (type == "aiDetail2") {
  18597. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  18598. this.$message({
  18599. message: "请回答完毕后再次发送",
  18600. type: "warning"
  18601. });
  18602. return;
  18603. }
  18604. this.aitype = "aiDetail2"
  18605. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  18606. this.aiText = this.aiJson.aiDetail2
  18607. this.aiCallBack = callback
  18608. this.aiIndex = index
  18609. } else if (type == "aiDetail3") {
  18610. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  18611. this.$message({
  18612. message: "请回答完毕后再次发送",
  18613. type: "warning"
  18614. });
  18615. return;
  18616. }
  18617. this.aitype = "aiDetail3"
  18618. this.aiText = this.aiJson.aiDetail3
  18619. this.aiIndex = index + '-' + tindex
  18620. } else if (type == "aiDetail4") {
  18621. var _text = ""
  18622. if(callback && callback.length){
  18623. for (var i = 0; i < callback.length; i++) {
  18624. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  18625. }
  18626. }
  18627. this.aitype = "aiDetail4"
  18628. this.aiText = this.aiJson.aiDetail4
  18629. this.aiIndex = index
  18630. } else if (type == "aiTeacher") {
  18631. this.aitype = "aiTeacher"
  18632. var _text = ""
  18633. for (var i = 0; i < this.dArray.length; i++) {
  18634. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  18635. }
  18636. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18637. this.aiText = this.aiJson.aiTeacher
  18638. this.aiCallBack = callback
  18639. } else if (type == "aiTeacher2") {
  18640. if(this.ttaskDetailLoading5.length){
  18641. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  18642. this.$message({
  18643. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  18644. type: "warning"
  18645. });
  18646. return
  18647. }
  18648. this.aitype = "aiTeacher2"
  18649. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18650. } else if (type == "aiTeacher3") {
  18651. this.aitype = type
  18652. this.aiText = this.aiJson.aiCpoteTask
  18653. this.aiText2 = this.aiJson.teacherDetail2
  18654. } else if (type == "teacherDetail") {
  18655. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18656. this.$message({
  18657. message: "请回答完毕后再次发送",
  18658. type: "warning"
  18659. });
  18660. return;
  18661. }
  18662. this.aitype = "teacherDetail"
  18663. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18664. this.aiText = this.aiJson.teacherDetail
  18665. this.aiCallBack = callback
  18666. this.aiIndex = index
  18667. } else if (type == "teacherDetail2") {
  18668. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  18669. this.$message.error('请输入任务名称')
  18670. return;
  18671. }
  18672. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18673. // this.$message({
  18674. // message: "请回答完毕后再次发送",
  18675. // type: "warning"
  18676. // });
  18677. // return;
  18678. this.$confirm("还未生成完毕,是否直接重新生成?", "提示", {
  18679. confirmButtonText: "确定重新生成",
  18680. cancelButtonText: "取消",
  18681. distinguishCancelAndClose: true,
  18682. type: "warning",
  18683. customClass: 'custom-confirm-box'
  18684. })
  18685. .then(() => {
  18686. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  18687. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  18688. this.isTeacherTaskCancelToken2[index] = null;
  18689. }
  18690. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18691. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18692. if(this.isTeacherTaskCancelSource[index]){
  18693. this.isTeacherTaskCancelSource[index].close()
  18694. this.isTeacherTaskCancelSource[index] = null
  18695. }
  18696. this.aitype = "teacherDetail2"
  18697. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18698. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18699. this.aiCallBack = callback
  18700. this.aiIndex = index
  18701. this.dialogVisibleAiD = true
  18702. }).catch((v) => {
  18703. console.log(v);
  18704. })
  18705. setTimeout(() => {
  18706. this.setTipsIndex()
  18707. }, 500)
  18708. return;
  18709. }else {
  18710. this.aitype = "teacherDetail2"
  18711. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18712. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18713. this.aiCallBack = callback
  18714. this.aiIndex = index
  18715. this.dialogVisibleAiD = true
  18716. }
  18717. } else if (type == "aiCpote1") {
  18718. if (this.cpotetLoading.cpote1) {
  18719. this.$message({
  18720. message: "请回答完毕后再次发送",
  18721. type: "warning"
  18722. });
  18723. return;
  18724. }
  18725. this.aitype = "aiCpote1"
  18726. this.aiText = this.aiJson.cpote1
  18727. this.aiCallBack = callback
  18728. } else if (type == "aiCpote2") {
  18729. if (this.cpotetLoading.cpote2) {
  18730. this.$message({
  18731. message: "请回答完毕后再次发送",
  18732. type: "warning"
  18733. });
  18734. return;
  18735. }
  18736. this.aitype = "aiCpote2"
  18737. this.aiText = this.aiJson.cpote2
  18738. this.aiCallBack = callback
  18739. } else if (type == "aiCpote3") {
  18740. if (this.cpotetLoading.cpote3) {
  18741. this.$message({
  18742. message: "请回答完毕后再次发送",
  18743. type: "warning"
  18744. });
  18745. return;
  18746. }
  18747. this.aitype = "aiCpote3"
  18748. this.aiText = this.aiJson.cpote3
  18749. this.aiCallBack = callback
  18750. } else if (type == "aiCpote4") {
  18751. if (this.cpotetLoading.cpote4) {
  18752. this.$message({
  18753. message: "请回答完毕后再次发送",
  18754. type: "warning"
  18755. });
  18756. return;
  18757. }
  18758. this.aitype = "aiCpote4"
  18759. this.aiText = this.aiJson.cpote4
  18760. this.aiCallBack = callback
  18761. } else if (type == 'aiteacherTextDetail'){
  18762. if (this.tteacherTextLoading) {
  18763. this.$message({
  18764. message: "请回答完毕后再次发送",
  18765. type: "warning"
  18766. });
  18767. return;
  18768. }
  18769. this.aitype = type
  18770. this.aiText = this.aiJson.aiAbstract
  18771. this.aiCallBack = callback
  18772. } else if (type == 'aitargetTextDetail'){
  18773. if (this.ttargetTextLoading) {
  18774. this.$message({
  18775. message: "请回答完毕后再次发送",
  18776. type: "warning"
  18777. });
  18778. return;
  18779. }
  18780. this.aitype = type
  18781. this.aiText = this.aiJson.aiTarget
  18782. this.aiCallBack = callback
  18783. } else if (type == 'aitargetTextDetail2'){
  18784. if (this.ttargetTextLoading2) {
  18785. this.$message({
  18786. message: "请回答完毕后再次发送",
  18787. type: "warning"
  18788. });
  18789. return;
  18790. }
  18791. this.aitype = type
  18792. this.aiText = this.aiJson.aiTarget2
  18793. this.aiCallBack = callback
  18794. } else if (type == 'aitargetTextDetail3'){
  18795. if (this.ttargetTextLoading2) {
  18796. this.$message({
  18797. message: "请回答完毕后再次发送",
  18798. type: "warning"
  18799. });
  18800. return;
  18801. }
  18802. if(!this.courseText){
  18803. this.$message.error("请生成简要描述后再生成目标");
  18804. return;
  18805. }
  18806. this.$nextTick(() => {
  18807. const targetDiv = this.$refs.aitargetTextDetail3;
  18808. if (targetDiv) {
  18809. targetDiv.scrollIntoView();
  18810. }
  18811. });
  18812. this.aitype = type
  18813. this.aiText = this.aiJson.aiTargetGet
  18814. this.aiText2 = this.aiJson.aiTarget2
  18815. this.aiCallBack= callback
  18816. } else if (type == 'aiSearchFile'){
  18817. if(this.fileSLoading) {
  18818. this.$message({
  18819. message: "请回答完毕后再次发送",
  18820. type: "warning"
  18821. });
  18822. return;
  18823. }
  18824. this.aitype = type
  18825. this.aiText = this.aiJson.aiSearchFile
  18826. } else if (type == 'aiSearchFile2'){
  18827. if(this.fileSLoading) {
  18828. this.$message({
  18829. message: "请回答完毕后再次发送",
  18830. type: "warning"
  18831. });
  18832. return;
  18833. }
  18834. this.aitype = type
  18835. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  18836. #输出样例
  18837. <学科1>:关键词
  18838. - 匹配到的内容1
  18839. - 匹配到的内容2
  18840. - 匹配到的内容3
  18841. - 匹配到的内容4
  18842. - 匹配到的内容5
  18843. <学科2>:关键词
  18844. - 匹配到的内容1
  18845. - 匹配到的内容2
  18846. - 匹配到的内容3
  18847. - 匹配到的内容4
  18848. - 匹配到的内容5
  18849. ...
  18850. <学科n>:关键词
  18851. - 匹配到的内容1
  18852. - 匹配到的内容2
  18853. - 匹配到的内容3
  18854. - 匹配到的内容4
  18855. - 匹配到的内容5
  18856. `
  18857. } else if (type == 'aiRateRule'){
  18858. this.aitype = type
  18859. this.aiText = this.aiJson.aiRateRule
  18860. this.aiCallBack = [callback, index]
  18861. } else if (type == 'aiRateRuleA'){
  18862. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  18863. confirmButtonText: "生成所有",
  18864. cancelButtonText: "仅生成该任务",
  18865. distinguishCancelAndClose: true,
  18866. type: "warning",
  18867. })
  18868. .then(() => {
  18869. this.aitype = type
  18870. this.aiText = this.aiJson.aiRateRule
  18871. this.aiCallBack = [1,callback]
  18872. this.dialogVisibleAiD = true
  18873. }).catch((v) => {
  18874. console.log(v);
  18875. if (v == "cancel") {
  18876. this.aitype = type
  18877. this.aiText = this.aiJson.aiRateRule
  18878. this.aiCallBack = [2,callback]
  18879. this.dialogVisibleAiD = true
  18880. }
  18881. })
  18882. }
  18883. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  18884. this.dialogVisibleAiD = true
  18885. }
  18886. },
  18887. async aiConfirm(msg,msg2,msg3) {
  18888. let sub = []
  18889. if (this.courseTypeId.length) {
  18890. for (var i = 0; i < this.courseTypeId.length; i++) {
  18891. let _sid = this.courseTypeId[i]
  18892. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18893. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18894. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18895. }
  18896. }
  18897. }
  18898. }
  18899. let mclass = []
  18900. if (this.courseTypeId.length) {
  18901. for (var i = 0; i < this.courseTypeId.length; i++) {
  18902. let _sid = this.courseTypeId[i]
  18903. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18904. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18905. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18906. }
  18907. }
  18908. }
  18909. }
  18910. let url = []
  18911. if (this.infoData.length) {
  18912. for (var i = 0; i < this.infoData.length; i++) {
  18913. url.push(this.infoData[i].url)
  18914. }
  18915. }
  18916. if (this.aitype == "aiDetail") {
  18917. this.detailYou(msg)
  18918. } else if (this.aitype == "aiOutline") {
  18919. this.loading = true
  18920. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18921. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  18922. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  18923. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18924. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18925. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18926. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18927. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18928. if(this.languageSetting == 2){
  18929. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18930. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18931. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18932. }
  18933. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18934. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18935. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18936. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18937. let message = `NOTICE
  18938. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18939. Output: Provide your output in json format.
  18940. Language: ${this.getLang()}
  18941. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18942. Instruction: Based on the context, follow "Format example", write content.
  18943. # Context
  18944. ## 要求
  18945. ${msg} 以及##参考资料
  18946. ## 参考资料
  18947. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18948. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18949. detail至少输出300tokens,markdown格式输出。
  18950. detail包含子教学目标、过程性成果、子评价标准
  18951. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18952. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18953. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  18954. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  18955. # Format example`
  18956. message = message.replaceAll('\n', ' ')
  18957. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  18958. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  18959. // detail输出不要输出成json,文本或者markdown都可以
  18960. this.aiGet2(message, () => {
  18961. this.loading = false
  18962. this.isOutline = true
  18963. })
  18964. } else if (this.aitype == "aiOutline2") {
  18965. this.loading = true
  18966. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18967. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18968. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18969. let message = `NOTICE
  18970. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18971. Language: ${this.getLang()}
  18972. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18973. Instruction: Based on the context, follow "Format example", write content.
  18974. # Context
  18975. ## 要求
  18976. ${msg} 以及##参考资料
  18977. ## 参考资料
  18978. 课程名字:${this.courseName}
  18979. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  18980. ${sub.length ? '学科:' + sub.join(",") : ''}
  18981. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18982. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18983. # Format example
  18984. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  18985. this.aiGetTask2(message, () => {
  18986. this.loading = false
  18987. this.isOutline = true
  18988. })
  18989. } else if (this.aitype == "aiOutlineDetail2") {
  18990. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  18991. } else if (this.aitype == "aiTask") {
  18992. var _text = ""
  18993. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18994. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18995. }
  18996. let message = `NOTICE
  18997. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18998. Language: ${this.getLang()}
  18999. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19000. Instruction: Based on the context, follow "Format example", write content.
  19001. # Context
  19002. ## 要求
  19003. ${msg} 为**每个教学任务分别输出**以下内容。
  19004.  
  19005. ${(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','') : ''}
  19006. ## 参考资料
  19007. 教学任务教案:${_text}
  19008. ## 格式要求
  19009. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  19010. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19011. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  19012. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19013. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19014. 出现选择题和问答题的概率提高
  19015. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  19016.  
  19017. # Format example
  19018. [{"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":"工具描述"}]}]`
  19019. this.loading = true
  19020. this.aiGet3(message, this.aiCallBack)
  19021. } else if (this.aitype == "aiTask2") {
  19022. if(this.aiCallBack[0] == 'all'){
  19023. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19024. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19025. let message = `NOTICE
  19026. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19027. Language: ${this.getLang()}
  19028. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19029. Instruction: Based on the context, follow "Format example", write content.
  19030. # Context
  19031. ## 要求
  19032. ${msg} 为教学任务分别输出以下内容。
  19033.  
  19034. ${(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','') : ''}
  19035. ## 参考资料
  19036. 教学任务教案:${_text}
  19037. ## 格式要求
  19038. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19039. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19040. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19041. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19042. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  19043.  
  19044. # Format example
  19045. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19046. this.taskLoading[_task] = true
  19047. this.aiGet32(message, _task)
  19048. }
  19049. }else{
  19050. 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`
  19051. let message = `NOTICE
  19052. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  19053. Language: ${this.getLang()}
  19054. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19055. Instruction: Based on the context, follow "Format example", write content.
  19056. # Context
  19057. ## 要求
  19058. ${msg} 为教学任务分别输出以下内容。
  19059.  
  19060. ${(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','') : ''}
  19061. ## 参考资料
  19062. 教学任务教案:${_text}
  19063. ## 格式要求
  19064. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  19065. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19066. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  19067. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  19068. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  19069.  
  19070. # Format example
  19071. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19072. this.taskLoading[this.aiCallBack[0]] = true
  19073. this.aiGet32(message, this.aiCallBack[0])
  19074. }
  19075. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19076. } else if (this.aitype == "aiTask3") {
  19077. if(this.aiCallBack[0] == 'all'){
  19078. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19079. if(!this.taskGLoading[_task]){
  19080. this.taskGLoading[_task] = []
  19081. this.ttaskGLoading[_task] = []
  19082. }
  19083. this.taskGLoading[_task][0] = true
  19084. this.ttaskGLoading[_task][0] = true
  19085. // this.taskGLoading[_task][1] = true
  19086. // this.taskGLoading[_task][2] = true
  19087. // this.aiGetG323(message3, _task)
  19088. }
  19089. let ij = 0;
  19090. let _this = this
  19091. function processNext() {
  19092. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19093. if(!_this.taskGLoading[ij][0]){
  19094. ij++;
  19095. processNext();
  19096. return;
  19097. }
  19098. let message1 = `NOTICE
  19099. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19100. Language: ${_this.getLang()}
  19101. # Context
  19102. ## 要求
  19103. ${msg}
  19104.  
  19105. ## 参考资料
  19106. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19107. # 输出格式与要求
  19108. 任务描述(告诉学生他们需要做什么):
  19109. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19110. # 范例
  19111. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19112. _this.aiGetG321L(message1, ij, (callback2) => {
  19113. // _this.aiGetG322(message2, ij, callback2);
  19114. callback2 ? callback2() : ''
  19115. }, () => {
  19116. // 回调函数,当前任务完成后执行
  19117. ij++;
  19118. processNext(); // 处理下一个任务
  19119. });
  19120. }
  19121. }
  19122. processNext(); // 启动处理
  19123. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19124. }else{
  19125. let message1 = `NOTICE
  19126. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19127. Language: ${this.getLang()}
  19128. # Context
  19129. ## 要求
  19130. ${msg}
  19131.  
  19132. ## 参考资料
  19133. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19134. # 输出格式与要求
  19135. 任务描述(告诉学生他们需要做什么):
  19136. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19137. # 范例
  19138. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19139. if(!this.taskGLoading[this.aiCallBack[0]]){
  19140. this.taskGLoading[this.aiCallBack[0]] = []
  19141. this.ttaskGLoading[this.aiCallBack[0]] = []
  19142. }
  19143. this.taskGLoading[this.aiCallBack[0]][0] = true
  19144. this.ttaskGLoading[this.aiCallBack[0]][0] = true
  19145. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19146. // this.taskGLoading[this.aiCallBack[0]][2] = true
  19147. this.aiGetG321L(message1, this.aiCallBack[0], () => {
  19148. // this.aiGetG322(message2, this.aiCallBack[0])
  19149. // this.aiCallBack[0] ? this.aiCallBack[0]() : ''
  19150. })
  19151. // this.aiGetG323(message3, this.aiCallBack[0])
  19152. }
  19153. } else if (this.aitype == "aiTaskG3") {
  19154. let message3 = `NOTICE
  19155. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19156. Language: ${this.getLang()}
  19157. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19158. Instruction: Based on the context, follow "Format example", write content.
  19159. # Context
  19160. ## 要求
  19161. ${msg3}
  19162.  
  19163. ## 参考资料
  19164. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19165. # 输出格式与要求
  19166. 核心素养:从教案中提取
  19167. 目标:从教案中提取
  19168. 评价标准:从教案中提取评价标准
  19169. # Format example
  19170. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  19171. if(!this.taskGLoading[this.aiCallBack]){
  19172. this.taskGLoading[this.aiCallBack] = []
  19173. }
  19174. this.taskGLoading[this.aiCallBack][2] = true
  19175. this.aiGetG323(message3, this.aiCallBack)
  19176. } else if (this.aitype == "aiTaskG2") {
  19177. if(this.aiCallBack == 'all'){
  19178. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19179. if(!this.taskGLoading[_task]){
  19180. this.taskGLoading[_task] = []
  19181. }
  19182. this.taskGLoading[_task][1] = true
  19183. }
  19184. let ij = 0;
  19185. let _this = this
  19186. function processNext() {
  19187. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19188. if(!_this.taskGLoading[ij][1] || !_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3){
  19189. _this.taskGLoading[ij][1] = false
  19190. ij++;
  19191. processNext();
  19192. return;
  19193. }
  19194. let message2 = `NOTICE
  19195. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19196. Language: ${_this.getLang()}
  19197. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19198. Instruction: Based on the context, follow "Format example", write content.
  19199. # Context
  19200. ## 要求
  19201. ${msg2}
  19202.  
  19203. ## 参考资料
  19204. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19205. # 输出格式与要求
  19206. 互动工具列表
  19207. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19208. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19209. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  19210. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19211. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19212. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19213. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19214. # Format example
  19215. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19216. _this.aiGetG322(message2, ij, () => {
  19217. // 回调函数,当前任务完成后执行
  19218. ij++;
  19219. processNext(); // 处理下一个任务
  19220. });
  19221. }
  19222. }
  19223. processNext(); // 启动处理
  19224. }else{
  19225. let message2 = `NOTICE
  19226. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19227. Language: ${this.getLang()}
  19228. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19229. Instruction: Based on the context, follow "Format example", write content.
  19230. # Context
  19231. ## 要求
  19232. ${msg2}
  19233.  
  19234. ## 参考资料
  19235. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19236. # 输出格式与要求
  19237. 互动工具列表
  19238. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19239. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19240. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  19241. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19242. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19243. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19244. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19245. # Format example
  19246. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19247. if(!this.taskGLoading[this.aiCallBack]){
  19248. this.taskGLoading[this.aiCallBack] = []
  19249. }
  19250. // this.taskGLoading[this.aiCallBack[0]][0] = true
  19251. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19252. this.taskGLoading[this.aiCallBack][1] = true
  19253. this.aiGetG322(message2, this.aiCallBack)
  19254. }
  19255. } else if (this.aitype == "aiDetail1") {
  19256. this.aiDetail(msg, this.aiIndex)
  19257. } else if (this.aitype == "aiDetail2") {
  19258. this.aiDetail2(msg, this.aiIndex)
  19259. } else if (this.aitype == "aiDetail3") {
  19260. let _index = this.aiIndex.split('-')
  19261. this.aiDetail3(msg, _index[0], _index[1])
  19262. } else if (this.aitype == "aiDetail4") {
  19263. this.aiDetail4(msg, this.aiIndex)
  19264. } else if (this.aitype == "teacherDetail") {
  19265. this.aiDetail5(msg, this.aiIndex)
  19266. } else if (this.aitype == "teacherDetail2") {
  19267. this.aiDetail52(msg, this.aiIndex)
  19268. } else if (this.aitype == "aiCpote1") {
  19269. this.aiCpote(msg, this.aiCallBack)
  19270. } else if (this.aitype == "aiCpote2") {
  19271. this.aiCpote(msg, this.aiCallBack)
  19272. } else if (this.aitype == "aiCpote3") {
  19273. this.aiCpote(msg, this.aiCallBack)
  19274. } else if (this.aitype == "aiCpote4") {
  19275. this.aiCpote(msg, this.aiCallBack)
  19276. } else if (this.aitype == "aiTeacher") {
  19277. this.loading = true
  19278. var _text = ""
  19279. for (var i = 0; i < this.dArray.length; i++) {
  19280. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  19281. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  19282. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19283. let message = ` NOTICE
  19284. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19285. Language: ${this.getLang()}
  19286. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19287. Instruction: Based on the context, follow "Format example", write content.
  19288. # Context
  19289. ## 要求
  19290. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  19291. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  19292. ${(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','') : ''}
  19293. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19294. ## Format example
  19295. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  19296. this.aiGet4(message, () => {
  19297. this.loading = false
  19298. this.isOutline2 = true
  19299. })
  19300. } else if (this.aitype == "aiTeacher2"){
  19301. this.isOutline2 = true
  19302. let _this = this
  19303. setTimeout(()=>{
  19304. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19305. const _tindex = 'task-' + i;
  19306. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19307. _this.taskDetailLoading5.push(_tindex)
  19308. }
  19309. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  19310. _this.ttaskDetailLoading5.push(_tindex)
  19311. }
  19312. // this.aiDetail52(msg, i)
  19313. }
  19314. let ij = 0;
  19315. function processNext() {
  19316. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19317. const _tindex = 'task-' + ij;
  19318. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19319. ij++;
  19320. processNext();
  19321. return;
  19322. }
  19323. // 处理当前任务
  19324. _this.aiDetail52(msg, ij, function () {
  19325. // 回调函数,当前任务完成后执行
  19326. ij++;
  19327. processNext(); // 处理下一个任务
  19328. });
  19329. }
  19330. }
  19331. processNext(); // 启动处理
  19332. }, 0)
  19333. } else if (this.aitype == "aiTeacher3"){
  19334. this.loading = true
  19335. let message = `NOTICE
  19336. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19337. Language: ${this.getLang()}
  19338. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19339. Instruction: Based on the context, follow "Format example", write content.
  19340. # Context
  19341. ## 要求
  19342. ${msg} 以及##参考资料
  19343. ## 参考资料
  19344. 任务簇:${this.cpote.cpote4}
  19345. # Format example
  19346. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  19347. this.aiGetTask3(message, () => {
  19348. this.loading = false
  19349. this.isOutline2 = true
  19350. })
  19351. } else if (this.aitype == "aiteacherTextDetail") {
  19352. this.aiteacherTextDetail(msg)
  19353. } else if (this.aitype == "aitargetTextDetail") {
  19354. this.aitargetTextDetail(msg)
  19355. } else if (this.aitype == "aitargetTextDetail2") {
  19356. this.aitargetTextDetail2(msg)
  19357. } else if (this.aitype == "aitargetTextDetail3") {
  19358. this.aitargetTextDetail3(msg)
  19359. } else if (this.aitype == 'aiSearchFile'){
  19360. let messages = `NOTICE
  19361. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19362. Language: ${this.getLang()}
  19363. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19364. Instruction: Based on the context, follow "Format example", write content.
  19365. ## 参考资料
  19366. 关键词:${this.courseName}
  19367. # Context
  19368. ## 要求
  19369. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  19370. # Format example
  19371. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  19372. this.fileSLoading = true
  19373. this.aiSearchFile(messages,()=>{
  19374. this.fileSLoading = false
  19375. })
  19376. } else if (this.aitype == 'aiSearchFile2'){
  19377. let messages = `${msg}
  19378. 课程名字:${this.courseName}
  19379. ${sub.length ? '学科:' + sub.join(",") : ''}
  19380. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  19381. this.fileSLoading = true
  19382. this.aiSearchFile2(messages,()=>{
  19383. this.fileSLoading = false
  19384. })
  19385. } else if (this.aitype == 'aiRateRule'){
  19386. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  19387. } else if (this.aitype == 'aiRateRuleA'){
  19388. if(this.aiCallBack[0] == 1){
  19389. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19390. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  19391. for(var k = 0; k < task.eList.length; k++){
  19392. if(!task.eList[k].rule){
  19393. this.againEva(msg, i, k)
  19394. }
  19395. }
  19396. }
  19397. }else if(this.aiCallBack[0] == 2){
  19398. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  19399. for(var k = 0; k < task.eList.length; k++){
  19400. if(!task.eList[k].rule){
  19401. this.againEva(msg, this.aiCallBack[1], k)
  19402. }
  19403. }
  19404. }
  19405. }
  19406. this.setAiJson(this.aitype, msg, msg2, msg3)
  19407. },
  19408. getLang(){
  19409. let lang = ''
  19410. if(this.languageSetting == 0){
  19411. lang = 'Chinese.'
  19412. }else if(this.languageSetting == 1){
  19413. lang = 'Traditional Chinese.'
  19414. }else if(this.languageSetting == 2){
  19415. lang = 'English.'
  19416. }
  19417. return lang
  19418. },
  19419. detailYou(message) {
  19420. this.textLoading = true
  19421. this.ttextLoading = true
  19422. let sub = []
  19423. if (this.courseTypeId.length) {
  19424. for (var i = 0; i < this.courseTypeId.length; i++) {
  19425. let _sid = this.courseTypeId[i]
  19426. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19427. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19428. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19429. }
  19430. }
  19431. }
  19432. }
  19433. let mclass = []
  19434. if (this.courseTypeId.length) {
  19435. for (var i = 0; i < this.courseTypeId.length; i++) {
  19436. let _sid = this.courseTypeId[i]
  19437. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19438. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19439. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19440. }
  19441. }
  19442. }
  19443. }
  19444. let url = []
  19445. if (this.infoData.length) {
  19446. for (var i = 0; i < this.infoData.length; i++) {
  19447. url.push(this.infoData[i].url)
  19448. }
  19449. }
  19450. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  19451. // --------
  19452. // ## 补充参考资料
  19453. // 补充资料:${url.join(",")}
  19454. // 补充描述:${this.courseText2} ##补充参考资料和
  19455. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19456. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19457. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19458. let msg = `NOTICE
  19459. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  19460. Language: ${this.getLang()}
  19461. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19462. Instruction: Based on the context, follow "Format example", write content.
  19463. #Context
  19464. ## 参考资料
  19465. 课程名字:${this.courseName}
  19466. ${sub.length ? '学科:' + sub.join(",") : ''}
  19467. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19468. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  19469. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  19470. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  19471. ## 要求
  19472. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  19473. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4' && this.templateid != '9dd4bb76-1e48-11ef-bee5-005056b86db5') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  19474. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19475. this.aiGet(msg)
  19476. },
  19477. setUnitJson() {
  19478. 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 }] }
  19479. this.$forceUpdate()
  19480. },
  19481. async aiGet(messages) {
  19482. let _this = this
  19483. let fileid = []
  19484. if(!this.yiKeTemplateArray.includes(this.templateid)){
  19485. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  19486. if(_this.cankaoInfoData[i].fileid){
  19487. fileid.push(_this.cankaoInfoData[i].fileid)
  19488. }else {
  19489. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  19490. if(_fileid){
  19491. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19492. _this.$forceUpdate();
  19493. if(_fileid != 1){
  19494. fileid.push(_fileid)
  19495. }
  19496. }
  19497. }
  19498. }
  19499. if(this.mode == 1){
  19500. for (var i = 0; i < _this.infoData.length; i++) {
  19501. if(_this.infoData[i].fileid){
  19502. fileid.push(_this.infoData[i].fileid)
  19503. }else {
  19504. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19505. if(_fileid){
  19506. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19507. _this.$forceUpdate();
  19508. if(_fileid != 1){
  19509. fileid.push(_fileid)
  19510. }
  19511. }
  19512. }
  19513. }
  19514. }
  19515. } else {
  19516. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19517. fileid = [...fileid]
  19518. if (_this.infoData.length) {
  19519. for (var i = 0; i < _this.infoData.length; i++) {
  19520. if(_this.infoData[i].fileid){
  19521. fileid.push(_this.infoData[i].fileid)
  19522. }else {
  19523. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19524. if(_fileid){
  19525. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19526. _this.$forceUpdate();
  19527. if(_fileid != 1){
  19528. fileid.push(_fileid)
  19529. }
  19530. }
  19531. }
  19532. }
  19533. }
  19534. }
  19535. _this.isTextCancelToken = _this.ajax.setCancelSource();
  19536. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19537. let _uuid = uuidv4();
  19538. // let params = JSON.stringify({
  19539. // // "model": "Chat",
  19540. // model: 'gpt-3.5-turbo',
  19541. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19542. // max_tokens: 4096,
  19543. // top_p: 1,
  19544. // frequency_penalty: 0,
  19545. // presence_penalty: 0,
  19546. // messages: [{
  19547. // content: messages,
  19548. // role: 'user'
  19549. // }],
  19550. // uid: _uuid,
  19551. // mind_map_question: "",
  19552. // })
  19553. let params = {
  19554. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19555. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19556. session_name: _uuid,
  19557. userId: _this.userid,
  19558. uid: _uuid,
  19559. file_ids: fileid.length ? [...fileid] : '',
  19560. model: 'gpt-4o-2024-11-20',
  19561. temperature: this.mode == 3 ? 0.5 : 0.1,
  19562. }
  19563. // let params = JSON.stringify({
  19564. // message: {
  19565. // anthropic_version: "bedrock-2023-05-31",
  19566. // max_tokens: 4096,
  19567. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19568. // top_p: 1,
  19569. // messages: [{
  19570. // "role": "user",
  19571. // "content": messages
  19572. // }] ,
  19573. // },
  19574. // uid: _uuid,
  19575. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19576. // });
  19577. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19578. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  19579. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19580. console.log(response);
  19581. // let data = response.data.FunctionResponse
  19582. // if (data.choices && data.choices.length && data.choices[0].message) {
  19583. // _this.courseText = data.choices[0].message.content
  19584. // }
  19585. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19586. } else {
  19587. _this.$message.warning(response.data.FunctionResponse.result);
  19588. }
  19589. _this.isTextCancelToken = null
  19590. }).catch(function (error) {
  19591. _this.textLoading = false
  19592. _this.ttextLoading = false
  19593. _this.isTextCancelToken = null
  19594. if(error && error.message != 'Request canceled by the user.'){
  19595. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19596. }
  19597. console.log(error);
  19598. });
  19599. await _this.aiGetgetAiContent(_uuid)
  19600. },
  19601. aiGetgetAiContent(_uid) {
  19602. try {
  19603. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19604. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19605. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19606. } catch(error){
  19607. console.log('EventSource error:', error);
  19608. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19609. this.textLoading = false
  19610. this.ttextLoading = false
  19611. this.isTextCancelToken = null
  19612. return;
  19613. }
  19614. let _allText = "";
  19615. let _mdText = "";
  19616. let _iindex = 0
  19617. this.isTextCancelSource.onmessage = _e => {
  19618. let _eData = JSON.parse(_e.data).content;
  19619. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19620. //对话已经完成
  19621. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19622. this.isTextCancelSource.close();
  19623. this.isTextCancelSource = null;
  19624. this.courseText = _mdText;
  19625. this.textLoading = false
  19626. this.ttextLoading = false
  19627. this.courseTextB = false
  19628. this.isTextCancelToken = null
  19629. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19630. this.saveCourse()
  19631. return;
  19632. } else {
  19633. _iindex++
  19634. //对话还在继续
  19635. let _text = "";
  19636. _text = _eData.replaceAll("'", "");
  19637. if (_allText == "") {
  19638. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19639. } else {
  19640. _allText += _text;
  19641. }
  19642. _mdText = _allText + "_";
  19643. _mdText = _mdText.replace(/\\n/g, "\n");
  19644. _mdText = _mdText.replace(/\\/g, "");
  19645. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19646. //转化返回的回复流数据
  19647. if(_iindex == 10){
  19648. this.courseText = _mdText;
  19649. _iindex = 0
  19650. }
  19651. this.textLoading = false
  19652. // 处理流数据
  19653. }
  19654. // this.$forceUpdate();
  19655. };
  19656. let _this = this
  19657. this.isTextCancelSource.onerror = function(event) {
  19658. // 处理错误,可以尝试重新连接
  19659. console.log('EventSource error:', event);
  19660. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19661. _this.textLoading = false
  19662. _this.ttextLoading = false
  19663. _this.isTextCancelToken = null
  19664. _this.isTextCancelSource.close();
  19665. _this.isTextCancelSource = null;
  19666. };
  19667. },
  19668. numberToChinese(number) {
  19669. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  19670. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  19671. let result = '';
  19672. let num = parseInt(number, 10);
  19673. let i = 0;
  19674. while (num > 0) {
  19675. result = chineseNum[num % 10] + chineseUnit[i] + result;
  19676. num = Math.floor(num / 10);
  19677. i++;
  19678. }
  19679. // 去除连续的零,保留一个零
  19680. result = result.replace(/零+/g, '零');
  19681. return result;
  19682. },
  19683. async aiGet2(messages, callback) {
  19684. let _this = this
  19685. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19686. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19687. if (_this.infoData.length) {
  19688. for (var i = 0; i < _this.infoData.length; i++) {
  19689. if(_this.infoData[i].fileid){
  19690. fileid.push(_this.infoData[i].fileid)
  19691. }else {
  19692. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19693. if(_fileid){
  19694. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19695. _this.$forceUpdate();
  19696. if(_fileid != 1){
  19697. fileid.push(_fileid)
  19698. }
  19699. }
  19700. }
  19701. }
  19702. }
  19703. console.log('fileid=========',fileid)
  19704. // let params = JSON.stringify({
  19705. // // "model": "Chat",
  19706. // model: 'gpt-3.5-turbo',
  19707. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19708. // max_tokens: 4096,
  19709. // top_p: 1,
  19710. // frequency_penalty: 0,
  19711. // presence_penalty: 0,
  19712. // messages: [{
  19713. // content: messages,
  19714. // role: 'user'
  19715. // }],
  19716. // stream: false,
  19717. // uid: this.userid,
  19718. // mind_map_question: "",
  19719. // })
  19720. // // let params = JSON.stringify({
  19721. // // message: {
  19722. // // anthropic_version: "bedrock-2023-05-31",
  19723. // // max_tokens: 4096,
  19724. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19725. // // top_p: 1,
  19726. // // messages: [{
  19727. // // content: messages,
  19728. // // role: 'user'
  19729. // // }], //
  19730. // // },
  19731. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19732. // // });
  19733. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19734. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19735. // console.log(response);
  19736. // let data = response.data.FunctionResponse
  19737. // if (data.choices && data.choices.length && data.choices[0].message) {
  19738. // console.log(data.choices[0].message.content);
  19739. // let dArray = JSON.parse(data.choices[0].message.content)
  19740. // _this.dArray = dArray
  19741. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19742. // for (var i = 0; i < dArray.length; i++) {
  19743. // let _task = dArray[i]
  19744. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19745. // task: _task.task,
  19746. // taskDetail: "",
  19747. // taskDetail2: _task.detail,
  19748. // taskDetail3: "",
  19749. // chapterData: [],
  19750. // toolText: "",
  19751. // toolChoose: [
  19752. // {
  19753. // tool: [],
  19754. // toolDetail: "",
  19755. // toolType: 0,
  19756. // askCount: 1,
  19757. // askTitle: "",
  19758. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19759. // },
  19760. // ],
  19761. // isShowTools: false,
  19762. // askCount: 1,
  19763. // isFold: 0,
  19764. // askTitle: "",
  19765. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19766. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19767. // homeworkList: [],
  19768. // })
  19769. // }
  19770. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19771. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19772. // _this.$forceUpdate();
  19773. // }
  19774. // // if (data.result) {
  19775. // // console.log(data.result);
  19776. // // let dArray = JSON.parse(data.result)
  19777. // // _this.dArray = dArray
  19778. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19779. // // for (var i = 0; i < dArray.length; i++) {
  19780. // // let _task = dArray[i]
  19781. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19782. // // task: _task.task,
  19783. // // taskDetail: "",
  19784. // // taskDetail2: _task.detail,
  19785. // // taskDetail3: "",
  19786. // // chapterData: [],
  19787. // // toolText: "",
  19788. // // toolChoose: [
  19789. // // {
  19790. // // tool: [],
  19791. // // toolDetail: "",
  19792. // // toolType: 0,
  19793. // // askCount: 1,
  19794. // // askTitle: "",
  19795. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19796. // // },
  19797. // // ],
  19798. // // isShowTools: false,
  19799. // // askCount: 1,
  19800. // // isFold: 1,
  19801. // // askTitle: "",
  19802. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19803. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19804. // // homeworkList: [],
  19805. // // })
  19806. // // }
  19807. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19808. // // _this.$forceUpdate();
  19809. // // }
  19810. // callback ? callback() : ''
  19811. // }).catch(function (error) {
  19812. // _this.loading = false
  19813. // console.log(error);
  19814. // });
  19815. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19816. let parm = {
  19817. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  19818. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  19819. session_name: uuidv4(),
  19820. userId: this.userid,
  19821. file_ids: fileid.length ? [...fileid] : '',
  19822. model: 'gpt-4o-2024-11-20',
  19823. temperature: this.mode == 3 ? 0.5 : 0.1,
  19824. }
  19825. this.ajax
  19826. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19827. .then((response) => {
  19828. console.log(response);
  19829. let data = response.data.FunctionResponse
  19830. if (data.message) {
  19831. console.log(data.message);
  19832. let dArray = {}
  19833. try {
  19834. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19835. } catch (error) {
  19836. console.log("error_________________" + error);
  19837. try {
  19838. let regex = new RegExp(/```json([\s\S]*?)```/);
  19839. let match = data.message.match(regex);
  19840. dArray = JSON.parse(match[1]);
  19841. // var message = data.message;
  19842. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19843. // var jsonEnd = message.indexOf("```", jsonStart);
  19844. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19845. // dArray = JSON.parse(jsonString);
  19846. } catch (error) {
  19847. try {
  19848. let regex = new RegExp(/```json([\s\S]*?)```/);
  19849. let match = data.message.match(regex);
  19850. // eval("var aaa = " + match[0])
  19851. if(match && match[1]){
  19852. dArray = JSON.parse(match[1].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19853. }else {
  19854. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19855. }
  19856. } catch (error) {
  19857. _this.$message.error('返回json格式不正确')
  19858. // +data.message
  19859. // _this.aiGet2(messages, callback);
  19860. _this.loading = false
  19861. _this.isOutlineCancelToken = null
  19862. console.log("error_________________" + error);
  19863. return;
  19864. }
  19865. console.log("error_________________" + error);
  19866. }
  19867. }
  19868. _this.dArray = dArray
  19869. console.log(dArray)
  19870. if(_this.panOutline() > 0){
  19871. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19872. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19873. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19874. }
  19875. for (var i = 0; i < dArray.length; i++) {
  19876. let _task = dArray[i]
  19877. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19878. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  19879. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  19880. }else {
  19881. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19882. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19883. taskDetail: "",
  19884. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19885. taskDetail3: "",
  19886. chapterData: [],
  19887. toolText: "",
  19888. toolChoose: [
  19889. {
  19890. tool: [],
  19891. toolDetail: "",
  19892. toolType: 0,
  19893. askCount: 1,
  19894. askTitle: "",
  19895. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19896. },
  19897. ],
  19898. isShowTools: false,
  19899. askCount: 1,
  19900. isFold: 0,
  19901. askTitle: "",
  19902. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19903. checkJson: [{ checkCount: [], checkPerent: [] }],
  19904. homeworkList: [],
  19905. })
  19906. }
  19907. }
  19908. }else {
  19909. _this.unitJson[0].chapterInfo[0].taskJson = []
  19910. for (var i = 0; i < dArray.length; i++) {
  19911. let _task = dArray[i]
  19912. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19913. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19914. taskDetail: "",
  19915. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19916. taskDetail3: "",
  19917. chapterData: [],
  19918. toolText: "",
  19919. toolChoose: [
  19920. {
  19921. tool: [],
  19922. toolDetail: "",
  19923. toolType: 0,
  19924. askCount: 1,
  19925. askTitle: "",
  19926. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19927. },
  19928. ],
  19929. isShowTools: false,
  19930. askCount: 1,
  19931. isFold: 0,
  19932. askTitle: "",
  19933. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19934. checkJson: [{ checkCount: [], checkPerent: [] }],
  19935. homeworkList: [],
  19936. })
  19937. }
  19938. }
  19939. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19940. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19941. _this.$forceUpdate();
  19942. _this.saveCourse()
  19943. }
  19944. callback ? callback() : ''
  19945. _this.isOutlineCancelToken = null
  19946. })
  19947. .catch((error) => {
  19948. _this.loading = false
  19949. _this.isOutlineCancelToken = null
  19950. console.log(error);
  19951. });
  19952. },
  19953. cancelAjax(type, index){
  19954. if (this.isOutlineCancelToken && type == 'outline') {
  19955. this.$message.success("已经成功停止生成课程大纲")
  19956. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  19957. this.isOutlineCancelToken = null;
  19958. this.loading = false
  19959. }
  19960. if (this.isFileCancelToken && type == 'file') {
  19961. this.$message.success("已经成功停止智能生成检索资料")
  19962. this.isFileCancelToken.cancel('Request canceled by the user.');
  19963. this.isFileCancelToken = null;
  19964. this.fileSLoading = false
  19965. }
  19966. if(this.isTextCancelToken && type == 'text'){
  19967. this.$message.success("已经成功停止AI优化")
  19968. this.isTextCancelToken.cancel('Request canceled by the user.');
  19969. this.isTextCancelToken = null;
  19970. this.textLoading = false
  19971. this.ttextLoading = true
  19972. if(this.isTextCancelSource){
  19973. this.isTextCancelSource.close()
  19974. this.isTextCancelSource = null
  19975. }
  19976. }
  19977. if(this.isTargetCancelToken2 && type == 'target2'){
  19978. this.$message.success("已经成功停止生成目标")
  19979. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  19980. this.isTargetCancelToken2 = null;
  19981. this.targetTextLoading2 = false
  19982. this.ttargetTextLoading2 = false
  19983. if(this.isTargetCancelSource2){
  19984. this.isTargetCancelSource2.close()
  19985. this.isTargetCancelSource2 = null
  19986. }
  19987. this.$nextTick(() => {
  19988. const targetDiv = this.$refs.aitargetTextDetail3;
  19989. if (targetDiv) {
  19990. targetDiv.scrollIntoView();
  19991. }
  19992. });
  19993. }
  19994. if(this.isTargetCancelToken1 && type == 'target1'){
  19995. this.$message.success("已经成功停止生成目标")
  19996. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  19997. this.isTargetCancelToken1 = null;
  19998. this.targetTextLoading = false
  19999. this.ttargetTextLoading = false
  20000. if(this.isTargetCancelSource1){
  20001. this.isTargetCancelSource1.close()
  20002. this.isTargetCancelSource1 = null
  20003. }
  20004. }
  20005. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  20006. this.$message.success("已经成功停止提取摘要")
  20007. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  20008. this.isTeacherTextCancelToken = null;
  20009. this.teacherTextLoading = false
  20010. this.tteacherTextLoading = false
  20011. if(this.isTeacherTextCancelSource){
  20012. this.isTeacherTextCancelSource.close()
  20013. this.isTeacherTextCancelSource = null
  20014. }
  20015. }
  20016. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  20017. this.$message.success("已经成功停止生成教案")
  20018. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  20019. this.isTeacherTaskCancelToken = null;
  20020. this.loading = false
  20021. }
  20022. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  20023. this.$message.success("已经成功停止生成大纲")
  20024. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  20025. this.isOutlineTaskCancelToken[index] = null;
  20026. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  20027. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  20028. if(this.isOutlineTaskCancelSource[index]){
  20029. this.isOutlineTaskCancelSource[index].close()
  20030. this.isOutlineTaskCancelSource[index] = null
  20031. }
  20032. }
  20033. if(type == 'teacherDetail2'){
  20034. this.$message.success("已经成功停止生成教案")
  20035. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  20036. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  20037. this.isTeacherTaskCancelToken2[index] = null;
  20038. }
  20039. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  20040. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  20041. }
  20042. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  20043. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  20044. }
  20045. if(this.isTeacherTaskCancelSource[index]){
  20046. this.isTeacherTaskCancelSource[index].close()
  20047. this.isTeacherTaskCancelSource[index] = null
  20048. }
  20049. }
  20050. if(type == 'aiTaskGL1'){
  20051. this.$message.success("已经成功停止生成任务概述")
  20052. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  20053. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  20054. this.taskCancelToken1[index] = null;
  20055. }
  20056. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  20057. this.taskGLoading[index][0] = false
  20058. }
  20059. if(this.isTaskCancelSource1[index]){
  20060. this.isTaskCancelSource1[index].close()
  20061. this.isTaskCancelSource1[index] = null
  20062. }
  20063. setTimeout(() => {
  20064. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  20065. this.cancelAjax('aiTaskGL2', index)
  20066. }
  20067. }, 1000)
  20068. this.$forceUpdate()
  20069. }
  20070. if(type == 'aiTaskGL2'){
  20071. this.$message.success("已经成功停止生成任务工具")
  20072. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  20073. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  20074. this.taskCancelToken2[index] = null;
  20075. }
  20076. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  20077. this.taskGLoading[index][1] = false
  20078. }
  20079. this.$forceUpdate()
  20080. }
  20081. if(type == 'taskAn'){
  20082. this.$message.success("已经成功停止生成任务概述")
  20083. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  20084. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  20085. this.taskAnCancelToken[index] = null;
  20086. }
  20087. if(this.taskAnLoading[index]){
  20088. this.taskAnLoading[index] = false
  20089. }
  20090. this.$forceUpdate()
  20091. }
  20092. if(type == 'findMatchingContents'){
  20093. this.$message.success("已经成功停止检索资料")
  20094. if(this.isfindMatchingContents){
  20095. this.isfindMatchingContents.cancel('Request canceled by the user.');
  20096. this.isfindMatchingContents = null;
  20097. }
  20098. if(this.knowInfoDataLoading){
  20099. this.knowInfoDataLoading = false
  20100. }
  20101. if(this.findMatchingContentsPage > 1){
  20102. this.findMatchingContentsPage --
  20103. }
  20104. this.$forceUpdate()
  20105. }
  20106. },
  20107. async aiGetTask2(messages, callback) {
  20108. let _this = this
  20109. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20110. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20111. if (_this.infoData.length) {
  20112. for (var i = 0; i < _this.infoData.length; i++) {
  20113. if(_this.infoData[i].fileid){
  20114. fileid.push(_this.infoData[i].fileid)
  20115. }else {
  20116. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20117. if(_fileid){
  20118. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20119. _this.$forceUpdate();
  20120. if(_fileid != 1){
  20121. fileid.push(_fileid)
  20122. }
  20123. }
  20124. }
  20125. }
  20126. }
  20127. console.log('fileid=========',fileid)
  20128. // let params = JSON.stringify({
  20129. // // "model": "Chat",
  20130. // model: 'gpt-3.5-turbo',
  20131. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20132. // max_tokens: 4096,
  20133. // top_p: 1,
  20134. // frequency_penalty: 0,
  20135. // presence_penalty: 0,
  20136. // messages: [{
  20137. // content: messages,
  20138. // role: 'user'
  20139. // }],
  20140. // stream: false,
  20141. // uid: this.userid,
  20142. // mind_map_question: "",
  20143. // })
  20144. // // let params = JSON.stringify({
  20145. // // message: {
  20146. // // anthropic_version: "bedrock-2023-05-31",
  20147. // // max_tokens: 4096,
  20148. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20149. // // top_p: 1,
  20150. // // messages: [{
  20151. // // content: messages,
  20152. // // role: 'user'
  20153. // // }], //
  20154. // // },
  20155. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20156. // // });
  20157. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20158. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20159. // console.log(response);
  20160. // let data = response.data.FunctionResponse
  20161. // if (data.choices && data.choices.length && data.choices[0].message) {
  20162. // console.log(data.choices[0].message.content);
  20163. // let dArray = JSON.parse(data.choices[0].message.content)
  20164. // _this.dArray = dArray
  20165. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20166. // for (var i = 0; i < dArray.length; i++) {
  20167. // let _task = dArray[i]
  20168. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20169. // task: _task.task,
  20170. // taskDetail: "",
  20171. // taskDetail2: _task.detail,
  20172. // taskDetail3: "",
  20173. // chapterData: [],
  20174. // toolText: "",
  20175. // toolChoose: [
  20176. // {
  20177. // tool: [],
  20178. // toolDetail: "",
  20179. // toolType: 0,
  20180. // askCount: 1,
  20181. // askTitle: "",
  20182. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20183. // },
  20184. // ],
  20185. // isShowTools: false,
  20186. // askCount: 1,
  20187. // isFold: 0,
  20188. // askTitle: "",
  20189. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20190. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20191. // homeworkList: [],
  20192. // })
  20193. // }
  20194. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20195. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20196. // _this.$forceUpdate();
  20197. // }
  20198. // // if (data.result) {
  20199. // // console.log(data.result);
  20200. // // let dArray = JSON.parse(data.result)
  20201. // // _this.dArray = dArray
  20202. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20203. // // for (var i = 0; i < dArray.length; i++) {
  20204. // // let _task = dArray[i]
  20205. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20206. // // task: _task.task,
  20207. // // taskDetail: "",
  20208. // // taskDetail2: _task.detail,
  20209. // // taskDetail3: "",
  20210. // // chapterData: [],
  20211. // // toolText: "",
  20212. // // toolChoose: [
  20213. // // {
  20214. // // tool: [],
  20215. // // toolDetail: "",
  20216. // // toolType: 0,
  20217. // // askCount: 1,
  20218. // // askTitle: "",
  20219. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20220. // // },
  20221. // // ],
  20222. // // isShowTools: false,
  20223. // // askCount: 1,
  20224. // // isFold: 1,
  20225. // // askTitle: "",
  20226. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20227. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20228. // // homeworkList: [],
  20229. // // })
  20230. // // }
  20231. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20232. // // _this.$forceUpdate();
  20233. // // }
  20234. // callback ? callback() : ''
  20235. // }).catch(function (error) {
  20236. // _this.loading = false
  20237. // console.log(error);
  20238. // });
  20239. this.isOutlineCancelToken = this.ajax.setCancelSource();
  20240. let parm = {
  20241. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20242. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20243. session_name: uuidv4(),
  20244. userId: this.userid,
  20245. file_ids: fileid.length ? [...fileid] : '',
  20246. model: 'gpt-4o-2024-11-20',
  20247. temperature: this.mode == 3 ? 0.5 : 0.1,
  20248. }
  20249. this.ajax
  20250. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  20251. .then((response) => {
  20252. console.log(response);
  20253. let data = response.data.FunctionResponse
  20254. if (data.message) {
  20255. console.log(data.message);
  20256. let dArray = {}
  20257. try {
  20258. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20259. } catch (error) {
  20260. console.log("error_________________" + error);
  20261. try {
  20262. let regex = new RegExp(/```json([\s\S]*?)```/);
  20263. let match = data.message.match(regex);
  20264. dArray = JSON.parse(match[1]);
  20265. // var message = data.message;
  20266. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20267. // var jsonEnd = message.indexOf("```", jsonStart);
  20268. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20269. // dArray = JSON.parse(jsonString);
  20270. } catch (error) {
  20271. try {
  20272. let regex = new RegExp(/```json([\s\S]*?)```/);
  20273. let match = data.message.match(regex);
  20274. // eval("var aaa = " + match[0])
  20275. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20276. } catch (error) {
  20277. console.log("error_________________" + error);
  20278. }
  20279. console.log("error_________________" + error);
  20280. }
  20281. }
  20282. _this.dArray = dArray
  20283. if(_this.panOutline() > 0){
  20284. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20285. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20286. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  20287. }
  20288. for (var i = 0; i < dArray.length; i++) {
  20289. let _task = dArray[i]
  20290. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20291. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  20292. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20293. }else {
  20294. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20295. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20296. taskDetail: "",
  20297. taskDetail2: "",
  20298. taskDetail3: "",
  20299. chapterData: [],
  20300. toolText: "",
  20301. toolChoose: [
  20302. {
  20303. tool: [],
  20304. toolDetail: "",
  20305. toolType: 0,
  20306. askCount: 1,
  20307. askTitle: "",
  20308. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20309. },
  20310. ],
  20311. isShowTools: false,
  20312. askCount: 1,
  20313. isFold: 0,
  20314. askTitle: "",
  20315. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20316. checkJson: [{ checkCount: [], checkPerent: [] }],
  20317. homeworkList: [],
  20318. })
  20319. }
  20320. }
  20321. }else {
  20322. _this.unitJson[0].chapterInfo[0].taskJson = []
  20323. for (var i = 0; i < dArray.length; i++) {
  20324. let _task = dArray[i]
  20325. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20326. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20327. taskDetail: "",
  20328. taskDetail2: "",
  20329. taskDetail3: "",
  20330. chapterData: [],
  20331. toolText: "",
  20332. toolChoose: [
  20333. {
  20334. tool: [],
  20335. toolDetail: "",
  20336. toolType: 0,
  20337. askCount: 1,
  20338. askTitle: "",
  20339. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20340. },
  20341. ],
  20342. isShowTools: false,
  20343. askCount: 1,
  20344. isFold: 0,
  20345. askTitle: "",
  20346. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20347. checkJson: [{ checkCount: [], checkPerent: [] }],
  20348. homeworkList: [],
  20349. })
  20350. }
  20351. }
  20352. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20353. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20354. _this.$forceUpdate();
  20355. _this.saveCourse()
  20356. setTimeout(()=>{
  20357. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20358. this.aiOutlineDetail('', i)
  20359. }
  20360. }, 0)
  20361. }
  20362. callback ? callback() : ''
  20363. _this.isOutlineCancelToken = null
  20364. })
  20365. .catch((error) => {
  20366. _this.loading = false
  20367. _this.isOutlineCancelToken = null
  20368. console.log(error);
  20369. });
  20370. },
  20371. async aiGetTask3(messages, callback) {
  20372. let _this = this
  20373. // let params = JSON.stringify({
  20374. // // "model": "Chat",
  20375. // model: 'gpt-3.5-turbo',
  20376. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20377. // max_tokens: 4096,
  20378. // top_p: 1,
  20379. // frequency_penalty: 0,
  20380. // presence_penalty: 0,
  20381. // messages: [{
  20382. // content: messages,
  20383. // role: 'user'
  20384. // }],
  20385. // stream: false,
  20386. // uid: this.userid,
  20387. // mind_map_question: "",
  20388. // })
  20389. // // let params = JSON.stringify({
  20390. // // message: {
  20391. // // anthropic_version: "bedrock-2023-05-31",
  20392. // // max_tokens: 4096,
  20393. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20394. // // top_p: 1,
  20395. // // messages: [{
  20396. // // content: messages,
  20397. // // role: 'user'
  20398. // // }], //
  20399. // // },
  20400. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20401. // // });
  20402. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20403. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20404. // console.log(response);
  20405. // let data = response.data.FunctionResponse
  20406. // if (data.choices && data.choices.length && data.choices[0].message) {
  20407. // console.log(data.choices[0].message.content);
  20408. // let dArray = JSON.parse(data.choices[0].message.content)
  20409. // _this.dArray = dArray
  20410. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20411. // for (var i = 0; i < dArray.length; i++) {
  20412. // let _task = dArray[i]
  20413. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20414. // task: _task.task,
  20415. // taskDetail: "",
  20416. // taskDetail2: _task.detail,
  20417. // taskDetail3: "",
  20418. // chapterData: [],
  20419. // toolText: "",
  20420. // toolChoose: [
  20421. // {
  20422. // tool: [],
  20423. // toolDetail: "",
  20424. // toolType: 0,
  20425. // askCount: 1,
  20426. // askTitle: "",
  20427. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20428. // },
  20429. // ],
  20430. // isShowTools: false,
  20431. // askCount: 1,
  20432. // isFold: 0,
  20433. // askTitle: "",
  20434. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20435. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20436. // homeworkList: [],
  20437. // })
  20438. // }
  20439. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20440. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20441. // _this.$forceUpdate();
  20442. // }
  20443. // // if (data.result) {
  20444. // // console.log(data.result);
  20445. // // let dArray = JSON.parse(data.result)
  20446. // // _this.dArray = dArray
  20447. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20448. // // for (var i = 0; i < dArray.length; i++) {
  20449. // // let _task = dArray[i]
  20450. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20451. // // task: _task.task,
  20452. // // taskDetail: "",
  20453. // // taskDetail2: _task.detail,
  20454. // // taskDetail3: "",
  20455. // // chapterData: [],
  20456. // // toolText: "",
  20457. // // toolChoose: [
  20458. // // {
  20459. // // tool: [],
  20460. // // toolDetail: "",
  20461. // // toolType: 0,
  20462. // // askCount: 1,
  20463. // // askTitle: "",
  20464. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20465. // // },
  20466. // // ],
  20467. // // isShowTools: false,
  20468. // // askCount: 1,
  20469. // // isFold: 1,
  20470. // // askTitle: "",
  20471. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20472. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20473. // // homeworkList: [],
  20474. // // })
  20475. // // }
  20476. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20477. // // _this.$forceUpdate();
  20478. // // }
  20479. // callback ? callback() : ''
  20480. // }).catch(function (error) {
  20481. // _this.loading = false
  20482. // console.log(error);
  20483. // });
  20484. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  20485. let parm = {
  20486. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20487. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20488. session_name: uuidv4(),
  20489. userId: this.userid,
  20490. file_ids: '',
  20491. model: 'gpt-4o-2024-11-20',
  20492. temperature: this.mode == 3 ? 0.5 : 0.1,
  20493. }
  20494. this.ajax
  20495. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  20496. .then((response) => {
  20497. console.log(response);
  20498. let data = response.data.FunctionResponse
  20499. if (data.message) {
  20500. console.log(data.message);
  20501. let dArray = {}
  20502. try {
  20503. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20504. } catch (error) {
  20505. console.log("error_________________" + error);
  20506. try {
  20507. let regex = new RegExp(/```json([\s\S]*?)```/);
  20508. let match = data.message.match(regex);
  20509. dArray = JSON.parse(match[1]);
  20510. // var message = data.message;
  20511. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20512. // var jsonEnd = message.indexOf("```", jsonStart);
  20513. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20514. // dArray = JSON.parse(jsonString);
  20515. } catch (error) {
  20516. try {
  20517. let regex = new RegExp(/```json([\s\S]*?)```/);
  20518. let match = data.message.match(regex);
  20519. // eval("var aaa = " + match[0])
  20520. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20521. } catch (error) {
  20522. console.log("error_________________" + error);
  20523. }
  20524. console.log("error_________________" + error);
  20525. }
  20526. }
  20527. _this.dArray = dArray
  20528. if(_this.panOutline() > 0){
  20529. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20530. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20531. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  20532. }
  20533. for (var i = 0; i < dArray.length; i++) {
  20534. let _task = dArray[i]
  20535. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20536. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  20537. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20538. }else {
  20539. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20540. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20541. taskDetail: "",
  20542. taskDetail2: "",
  20543. taskDetail3: "",
  20544. chapterData: [],
  20545. toolText: "",
  20546. toolChoose: [
  20547. {
  20548. tool: [],
  20549. toolDetail: "",
  20550. toolType: 0,
  20551. askCount: 1,
  20552. askTitle: "",
  20553. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20554. },
  20555. ],
  20556. isShowTools: false,
  20557. askCount: 1,
  20558. isFold: 0,
  20559. askTitle: "",
  20560. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20561. checkJson: [{ checkCount: [], checkPerent: [] }],
  20562. homeworkList: [],
  20563. })
  20564. }
  20565. }
  20566. }else {
  20567. _this.unitJson[0].chapterInfo[0].taskJson = []
  20568. for (var i = 0; i < dArray.length; i++) {
  20569. let _task = dArray[i]
  20570. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20571. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20572. taskDetail: "",
  20573. taskDetail2: "",
  20574. taskDetail3: "",
  20575. chapterData: [],
  20576. toolText: "",
  20577. toolChoose: [
  20578. {
  20579. tool: [],
  20580. toolDetail: "",
  20581. toolType: 0,
  20582. askCount: 1,
  20583. askTitle: "",
  20584. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20585. },
  20586. ],
  20587. isShowTools: false,
  20588. askCount: 1,
  20589. isFold: 0,
  20590. askTitle: "",
  20591. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20592. checkJson: [{ checkCount: [], checkPerent: [] }],
  20593. homeworkList: [],
  20594. })
  20595. }
  20596. }
  20597. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20598. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20599. _this.$forceUpdate();
  20600. _this.saveCourse()
  20601. // setTimeout(()=>{
  20602. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20603. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  20604. // }
  20605. // }, 0)
  20606. setTimeout(()=>{
  20607. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20608. const _tindex = 'task-' + i;
  20609. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20610. _this.taskDetailLoading5.push(_tindex)
  20611. }
  20612. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  20613. _this.ttaskDetailLoading5.push(_tindex)
  20614. }
  20615. }
  20616. let ij = 0;
  20617. function processNext() {
  20618. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  20619. const _tindex = 'task-' + ij;
  20620. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20621. ij++;
  20622. processNext();
  20623. return;
  20624. }
  20625. // 处理当前任务
  20626. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  20627. // 回调函数,当前任务完成后执行
  20628. ij++;
  20629. processNext(); // 处理下一个任务
  20630. });
  20631. }
  20632. }
  20633. processNext(); // 启动处理
  20634. }, 0)
  20635. }
  20636. callback ? callback() : ''
  20637. _this.isTeacherTaskCancelToken = null
  20638. })
  20639. .catch((error) => {
  20640. _this.loading = false
  20641. _this.isTeacherTaskCancelToken = null
  20642. console.log(error);
  20643. });
  20644. },
  20645. async aiGet3(messages, callback) {
  20646. let _this = this
  20647. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20648. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20649. if (_this.infoData.length) {
  20650. for (var i = 0; i < _this.infoData.length; i++) {
  20651. if(_this.infoData[i].fileid){
  20652. fileid.push(_this.infoData[i].fileid)
  20653. }else {
  20654. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20655. if(_fileid){
  20656. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20657. _this.$forceUpdate();
  20658. if(_fileid != 1){
  20659. fileid.push(_fileid)
  20660. }
  20661. }
  20662. }
  20663. }
  20664. }
  20665. // let params = JSON.stringify({
  20666. // // "model": "Chat",
  20667. // model: 'gpt-3.5-turbo',
  20668. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20669. // max_tokens: 4096,
  20670. // top_p: 1,
  20671. // frequency_penalty: 0,
  20672. // presence_penalty: 0,
  20673. // messages: [{
  20674. // content: messages,
  20675. // role: 'user'
  20676. // }],
  20677. // stream: false,
  20678. // uid: this.userid,
  20679. // mind_map_question: "",
  20680. // })
  20681. // // let params = JSON.stringify({
  20682. // // message: {
  20683. // // anthropic_version: "bedrock-2023-05-31",
  20684. // // max_tokens: 4096,
  20685. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20686. // // top_p: 1,
  20687. // // messages: [{
  20688. // // content: messages,
  20689. // // role: 'user'
  20690. // // }], //
  20691. // // },
  20692. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20693. // // });
  20694. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20695. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20696. // console.log(response);
  20697. // let data = response.data.FunctionResponse
  20698. // if (data.choices && data.choices.length && data.choices[0].message) {
  20699. // console.log(data.choices[0].message.content);
  20700. // let tArray = JSON.parse(data.choices[0].message.content)
  20701. // // _this.unitJson[0].chapterInfo[0].task = []
  20702. // let toolsJson = {
  20703. // "电子白板": { tool: 1, type: 1 },
  20704. // "文档": { tool: 52, type: 1 },
  20705. // "思维导图": { tool: 3, type: 1 },
  20706. // "表格": { tool: 48, type: 1 },
  20707. // "作业提交": { tool: 16, type: 2 }
  20708. // }
  20709. // for (var i = 0; i < tArray.length; i++) {
  20710. // let _task = tArray[i]
  20711. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20712. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20713. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20714. // if (_task.toolChoose.length) {
  20715. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20716. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20717. // {
  20718. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20719. // toolDetail: _task.toolChoose[j].detail,
  20720. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20721. // askCount: 1,
  20722. // askTitle: "",
  20723. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20724. // },
  20725. // )
  20726. // }
  20727. // } else {
  20728. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20729. // {
  20730. // tool: [],
  20731. // toolDetail: "",
  20732. // toolType: 0,
  20733. // askCount: 1,
  20734. // askTitle: "",
  20735. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20736. // },
  20737. // )
  20738. // }
  20739. // }
  20740. // // if (_this.infoData.length) {
  20741. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20742. // // }
  20743. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20744. // _this.$forceUpdate();
  20745. // }
  20746. // // if (data.result) {
  20747. // // console.log(data.result);
  20748. // // let tArray = JSON.parse(data.result)
  20749. // // // _this.unitJson[0].chapterInfo[0].task = []
  20750. // // let toolsJson = {
  20751. // // "电子白板": { tool: 1, type: 1 },
  20752. // // "文档": { tool: 52, type: 1 },
  20753. // // "思维导图": { tool: 3, type: 1 },
  20754. // // "表格": { tool: 48, type: 1 },
  20755. // // "作业提交": { tool: 16, type: 2 }
  20756. // // }
  20757. // // for (var i = 0; i < tArray.length; i++) {
  20758. // // let _task = tArray[i]
  20759. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20760. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20761. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20762. // // if (_task.toolChoose.length) {
  20763. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20764. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20765. // // {
  20766. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20767. // // toolDetail: _task.toolChoose[j].detail,
  20768. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20769. // // askCount: 1,
  20770. // // askTitle: "",
  20771. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20772. // // },
  20773. // // )
  20774. // // }
  20775. // // } else {
  20776. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20777. // // {
  20778. // // tool: [],
  20779. // // toolDetail: "",
  20780. // // toolType: 0,
  20781. // // askCount: 1,
  20782. // // askTitle: "",
  20783. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20784. // // },
  20785. // // )
  20786. // // }
  20787. // // }
  20788. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20789. // // _this.$forceUpdate();
  20790. // // }
  20791. // callback ? callback() : ''
  20792. // }).catch(function (error) {
  20793. // _this.loading = false
  20794. // console.log(error);
  20795. // });
  20796. let parm = {
  20797. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20798. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20799. session_name: uuidv4(),
  20800. userId: this.userid,
  20801. file_ids: fileid.length ? [...fileid] : '',
  20802. model: 'gpt-4o-2024-11-20',
  20803. temperature: this.mode == 3 ? 0.5 : 0.1,
  20804. }
  20805. this.ajax
  20806. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20807. .then(async (response) => {
  20808. console.log(response);
  20809. let data = response.data.FunctionResponse
  20810. if (data.message) {
  20811. console.log(data.message);
  20812. let tArray = {}
  20813. try {
  20814. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20815. } catch (error) {
  20816. console.log("error_________________" + error);
  20817. try {
  20818. let regex = new RegExp(/```json([\s\S]*?)```/);
  20819. let match = data.message.match(regex);
  20820. tArray = JSON.parse(match[1]);
  20821. // var message = data.message;
  20822. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20823. // var jsonEnd = message.indexOf("```", jsonStart);
  20824. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20825. // tArray = JSON.parse(jsonString);
  20826. } catch (error) {
  20827. try {
  20828. let regex = new RegExp(/```json([\s\S]*?)```/);
  20829. let match = data.message.match(regex);
  20830. // eval("var aaa = " + match[0])
  20831. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20832. } catch (error) {
  20833. console.log("error_________________" + error);
  20834. }
  20835. console.log("error_________________" + error);
  20836. }
  20837. }
  20838. let toolsJson = {
  20839. "电子白板": { tool: 1, type: 1 },
  20840. "文档": { tool: 52, type: 1 },
  20841. "思维导图": { tool: 3, type: 1 },
  20842. "表格": { tool: 48, type: 1 },
  20843. "作业提交": { tool: 16, type: 2 },
  20844. "问答": { tool: 15, type: 2 },
  20845. "选择题": { tool: 45, type: 2 },
  20846. }
  20847. // answerQ:"sssssssssssssss"
  20848. for (var i = 0; i < tArray.length; i++) {
  20849. let _task = tArray[i]
  20850. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20851. _task.elist = _task.elist.filter(el=>{
  20852. el.isai = "1"
  20853. return el
  20854. })
  20855. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20856. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20857. if (_task.toolChoose.length) {
  20858. for (var j = 0; j < _task.toolChoose.length; j++) {
  20859. let _json = {
  20860. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  20861. toolDetail: _task.toolChoose[j].detail,
  20862. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20863. askCount: 1,
  20864. askTitle: "",
  20865. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20866. }
  20867. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  20868. let answerQ = await _this.aiCreateQuestion(15, i)
  20869. _json.answerQ = answerQ.answerQ
  20870. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  20871. let testJson = await _this.aiCreateQuestion(45, i)
  20872. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20873. }
  20874. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  20875. }
  20876. } else {
  20877. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20878. {
  20879. tool: [],
  20880. toolDetail: "",
  20881. toolType: 0,
  20882. askCount: 1,
  20883. askTitle: "",
  20884. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20885. },
  20886. )
  20887. }
  20888. }
  20889. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20890. _this.$forceUpdate();
  20891. _this.createTeacherAn();
  20892. }
  20893. callback ? callback() : ''
  20894. })
  20895. .catch((error) => {
  20896. _this.loading = false
  20897. console.log(error);
  20898. });
  20899. },
  20900. async aiGet32(messages, index) {
  20901. let _this = this
  20902. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20903. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20904. if (_this.infoData.length) {
  20905. for (var i = 0; i < _this.infoData.length; i++) {
  20906. if(_this.infoData[i].fileid){
  20907. fileid.push(_this.infoData[i].fileid)
  20908. }else {
  20909. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20910. if(_fileid){
  20911. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20912. _this.$forceUpdate();
  20913. if(_fileid != 1){
  20914. fileid.push(_fileid)
  20915. }
  20916. }
  20917. }
  20918. }
  20919. }
  20920. // let params = JSON.stringify({
  20921. // // "model": "Chat",
  20922. // model: 'gpt-3.5-turbo',
  20923. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20924. // max_tokens: 4096,
  20925. // top_p: 1,
  20926. // frequency_penalty: 0,
  20927. // presence_penalty: 0,
  20928. // messages: [{
  20929. // content: messages,
  20930. // role: 'user'
  20931. // }],
  20932. // stream: false,
  20933. // uid: this.userid,
  20934. // mind_map_question: "",
  20935. // })
  20936. // // let params = JSON.stringify({
  20937. // // message: {
  20938. // // anthropic_version: "bedrock-2023-05-31",
  20939. // // max_tokens: 4096,
  20940. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20941. // // top_p: 1,
  20942. // // messages: [{
  20943. // // content: messages,
  20944. // // role: 'user'
  20945. // // }], //
  20946. // // },
  20947. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20948. // // });
  20949. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20950. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20951. // console.log(response);
  20952. // let data = response.data.FunctionResponse
  20953. // if (data.choices && data.choices.length && data.choices[0].message) {
  20954. // console.log(data.choices[0].message.content);
  20955. // let tArray = JSON.parse(data.choices[0].message.content)
  20956. // // _this.unitJson[0].chapterInfo[0].task = []
  20957. // let toolsJson = {
  20958. // "电子白板": { tool: 1, type: 1 },
  20959. // "文档": { tool: 52, type: 1 },
  20960. // "思维导图": { tool: 3, type: 1 },
  20961. // "表格": { tool: 48, type: 1 },
  20962. // "作业提交": { tool: 16, type: 2 }
  20963. // }
  20964. // for (var i = 0; i < tArray.length; i++) {
  20965. // let _task = tArray[i]
  20966. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20967. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20968. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20969. // if (_task.toolChoose.length) {
  20970. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20971. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20972. // {
  20973. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20974. // toolDetail: _task.toolChoose[j].detail,
  20975. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20976. // askCount: 1,
  20977. // askTitle: "",
  20978. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20979. // },
  20980. // )
  20981. // }
  20982. // } else {
  20983. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20984. // {
  20985. // tool: [],
  20986. // toolDetail: "",
  20987. // toolType: 0,
  20988. // askCount: 1,
  20989. // askTitle: "",
  20990. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20991. // },
  20992. // )
  20993. // }
  20994. // }
  20995. // // if (_this.infoData.length) {
  20996. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20997. // // }
  20998. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20999. // _this.$forceUpdate();
  21000. // }
  21001. // // if (data.result) {
  21002. // // console.log(data.result);
  21003. // // let tArray = JSON.parse(data.result)
  21004. // // // _this.unitJson[0].chapterInfo[0].task = []
  21005. // // let toolsJson = {
  21006. // // "电子白板": { tool: 1, type: 1 },
  21007. // // "文档": { tool: 52, type: 1 },
  21008. // // "思维导图": { tool: 3, type: 1 },
  21009. // // "表格": { tool: 48, type: 1 },
  21010. // // "作业提交": { tool: 16, type: 2 }
  21011. // // }
  21012. // // for (var i = 0; i < tArray.length; i++) {
  21013. // // let _task = tArray[i]
  21014. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  21015. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  21016. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  21017. // // if (_task.toolChoose.length) {
  21018. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  21019. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21020. // // {
  21021. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  21022. // // toolDetail: _task.toolChoose[j].detail,
  21023. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  21024. // // askCount: 1,
  21025. // // askTitle: "",
  21026. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21027. // // },
  21028. // // )
  21029. // // }
  21030. // // } else {
  21031. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  21032. // // {
  21033. // // tool: [],
  21034. // // toolDetail: "",
  21035. // // toolType: 0,
  21036. // // askCount: 1,
  21037. // // askTitle: "",
  21038. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21039. // // },
  21040. // // )
  21041. // // }
  21042. // // }
  21043. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21044. // // _this.$forceUpdate();
  21045. // // }
  21046. // callback ? callback() : ''
  21047. // }).catch(function (error) {
  21048. // _this.loading = false
  21049. // console.log(error);
  21050. // });
  21051. let parm = {
  21052. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21053. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21054. session_name: uuidv4(),
  21055. userId: this.userid,
  21056. file_ids: fileid.length ? [...fileid] : '',
  21057. model: 'gpt-4o-2024-11-20',
  21058. temperature: this.mode == 3 ? 0.5 : 0.1,
  21059. }
  21060. this.ajax
  21061. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21062. .then(async (response) => {
  21063. console.log(response);
  21064. let data = response.data.FunctionResponse
  21065. if (data.message) {
  21066. console.log(data.message);
  21067. let tArray = {}
  21068. try {
  21069. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21070. } catch (error) {
  21071. console.log("error_________________" + error);
  21072. try {
  21073. let regex = new RegExp(/```json([\s\S]*?)```/);
  21074. let match = data.message.match(regex);
  21075. tArray = JSON.parse(match[1]);
  21076. // var message = data.message;
  21077. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21078. // var jsonEnd = message.indexOf("```", jsonStart);
  21079. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21080. // tArray = JSON.parse(jsonString);
  21081. } catch (error) {
  21082. try {
  21083. let regex = new RegExp(/```json([\s\S]*?)```/);
  21084. let match = data.message.match(regex);
  21085. // eval("var aaa = " + match[0])
  21086. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21087. } catch (error) {
  21088. console.log("error_________________" + error);
  21089. }
  21090. console.log("error_________________" + error);
  21091. }
  21092. }
  21093. let toolsJson = {
  21094. "电子白板": { tool: 1, type: 1 },
  21095. "文档": { tool: 52, type: 1 },
  21096. "思维导图": { tool: 3, type: 1 },
  21097. "表格": { tool: 48, type: 1 },
  21098. "作业提交": { tool: 16, type: 2 },
  21099. "问答": { tool: 15, type: 2 },
  21100. "选择题": { tool: 45, type: 2 },
  21101. }
  21102. // answerQ:"sssssssssssssss"
  21103. // for (var i = 0; i < tArray.length; i++) {
  21104. let _task = tArray
  21105. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  21106. _task.elist = _task.elist.filter(el=>{
  21107. el.isai = 1
  21108. return el
  21109. })
  21110. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21111. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21112. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  21113. console.log("error_________________JSON不对重新生成");
  21114. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21115. _this.aiGet32(messages, index)
  21116. return;
  21117. }
  21118. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21119. if (_task.toolChoose && _task.toolChoose.length) {
  21120. for (var j = 0; j < _task.toolChoose.length; j++) {
  21121. let _json = {
  21122. tool: [],
  21123. toolDetail: _task.toolChoose[j].detail,
  21124. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21125. askCount: 1,
  21126. askTitle: "",
  21127. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21128. }
  21129. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21130. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  21131. let answerQ = await _this.aiCreateQuestion(15, index)
  21132. // _json.answerQ = answerQ.answerQ
  21133. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21134. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  21135. let testJson = await _this.aiCreateQuestion(45, index)
  21136. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21137. _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}
  21138. }
  21139. _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]
  21140. _this.$forceUpdate();
  21141. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21142. }
  21143. } else {
  21144. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21145. {
  21146. tool: [],
  21147. toolDetail: "",
  21148. toolType: 0,
  21149. askCount: 1,
  21150. askTitle: "",
  21151. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21152. },
  21153. )
  21154. }
  21155. // }
  21156. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21157. _this.$forceUpdate();
  21158. _this.createTeacherAn(index);
  21159. }
  21160. // callback ? callback() : ''
  21161. _this.taskLoading[index] = false
  21162. })
  21163. .catch((error) => {
  21164. // _this.loading = false
  21165. _this.taskLoading[index] = false
  21166. console.log(error);
  21167. });
  21168. },
  21169. async aiGetG321(messages, index, callback, callback2) {
  21170. let _this = this
  21171. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21172. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21173. if (_this.infoData.length) {
  21174. for (var i = 0; i < _this.infoData.length; i++) {
  21175. if(_this.infoData[i].fileid){
  21176. fileid.push(_this.infoData[i].fileid)
  21177. }else {
  21178. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21179. if(_fileid){
  21180. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21181. _this.$forceUpdate();
  21182. if(_fileid != 1){
  21183. fileid.push(_fileid)
  21184. }
  21185. }
  21186. }
  21187. }
  21188. }
  21189. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21190. let parm = {
  21191. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21192. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21193. session_name: uuidv4(),
  21194. userId: this.userid,
  21195. file_ids: fileid.length ? [...fileid] : '',
  21196. model: 'gpt-4o-2024-11-20',
  21197. temperature: this.mode == 3 ? 0.5 : 0.1,
  21198. }
  21199. this.ajax
  21200. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  21201. .then(async (response) => {
  21202. console.log(response);
  21203. let data = response.data.FunctionResponse
  21204. if (data.message) {
  21205. let tArray = {}
  21206. try {
  21207. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21208. } catch (error) {
  21209. console.log("error_________________" + error);
  21210. try {
  21211. let regex = new RegExp(/```json([\s\S]*?)```/);
  21212. let match = data.message.match(regex);
  21213. tArray = JSON.parse(match[1]);
  21214. } catch (error) {
  21215. try {
  21216. let regex = new RegExp(/```json([\s\S]*?)```/);
  21217. let match = data.message.match(regex);
  21218. // eval("var aaa = " + match[0])
  21219. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21220. } catch (error) {
  21221. console.log("error_________________" + error);
  21222. }
  21223. console.log("error_________________" + error);
  21224. }
  21225. }
  21226. console.log(data.message);
  21227. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  21228. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21229. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21230. _this.$forceUpdate();
  21231. _this.createTeacherAn(index);
  21232. }
  21233. callback ? callback(callback2) : ''
  21234. _this.taskGLoading[index][0] = false
  21235. _this.taskCancelToken1[index] = null
  21236. _this.$forceUpdate();
  21237. })
  21238. .catch((error) => {
  21239. // _this.loading = false
  21240. callback ? callback(callback2) : ''
  21241. _this.taskGLoading[index][0] = false
  21242. _this.taskCancelToken1[index] = null
  21243. _this.$forceUpdate();
  21244. console.log(error);
  21245. });
  21246. },
  21247. async aiGetG321L(messages, index, callback, callback2) {
  21248. let _this = this
  21249. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21250. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21251. if (_this.infoData.length) {
  21252. for (var i = 0; i < _this.infoData.length; i++) {
  21253. if(_this.infoData[i].fileid){
  21254. fileid.push(_this.infoData[i].fileid)
  21255. }else {
  21256. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21257. if(_fileid){
  21258. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21259. _this.$forceUpdate();
  21260. if(_fileid != 1){
  21261. fileid.push(_fileid)
  21262. }
  21263. }
  21264. }
  21265. }
  21266. }
  21267. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21268. let _uuid = uuidv4();
  21269. let parm = {
  21270. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21271. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21272. session_name: uuidv4(),
  21273. userId: this.userid,
  21274. file_ids: fileid.length ? [...fileid] : '',
  21275. uid: _uuid,
  21276. // model: 'gpt-4o-2024-11-20',
  21277. model: 'gpt-4o-mini',
  21278. temperature: this.mode == 3 ? 0.5 : 0.1,
  21279. }
  21280. this.ajax
  21281. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", parm, _this.taskCancelToken1[index])
  21282. .then(async (response) => {
  21283. console.log(response);
  21284. // }
  21285. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21286. } else {
  21287. _this.$message.warning(response.data.FunctionResponse.result);
  21288. callback ? callback(callback2) : ''
  21289. _this.taskGLoading[index][0] = false
  21290. _this.ttaskGLoading[index][0] = false
  21291. _this.taskCancelToken1[index] = null
  21292. }
  21293. _this.taskCancelToken1[index] = null
  21294. _this.$forceUpdate();
  21295. })
  21296. .catch((error) => {
  21297. // _this.loading = false
  21298. callback ? callback(callback2) : ''
  21299. _this.taskGLoading[index][0] = false
  21300. _this.ttaskGLoading[index][0] = false
  21301. _this.taskCancelToken1[index] = null
  21302. _this.$forceUpdate();
  21303. console.log(error);
  21304. });
  21305. await _this.aiGetG321LgetAiContent(_uuid, index, callback, callback2)
  21306. },
  21307. aiGetG321LgetAiContent(_uid, index, callback, callback2) {
  21308. try {
  21309. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21310. this.isTaskCancelSource1[index] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21311. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21312. } catch(error){
  21313. console.log('EventSource error:', error);
  21314. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21315. callback ? callback(callback2) : ''
  21316. this.taskGLoading[index][0] = false
  21317. this.ttaskGLoading[index][0] = false
  21318. this.taskCancelToken1[index][0] = null
  21319. return;
  21320. }
  21321. let _allText = "";
  21322. let _mdText = "";
  21323. let _iindex = 0
  21324. this.isTaskCancelSource1[index].onmessage = _e => {
  21325. let _eData = JSON.parse(_e.data).content;
  21326. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21327. //对话已经完成
  21328. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21329. callback ? callback(callback2) : ''
  21330. this.isTaskCancelSource1[index].close();
  21331. this.isTaskCancelSource1[index] = null;
  21332. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21333. this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21334. this.createTeacherAn(index);
  21335. this.taskGLoading[index][0] = false
  21336. this.ttaskGLoading[index][0] = false
  21337. this.taskCancelToken1[index][0] = null
  21338. return;
  21339. } else {
  21340. _iindex++
  21341. //对话还在继续
  21342. let _text = "";
  21343. _text = _eData.replaceAll("'", "");
  21344. if (_allText == "") {
  21345. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21346. } else {
  21347. _allText += _text;
  21348. }
  21349. _mdText = _allText + "_";
  21350. _mdText = _mdText.replace(/\\n/g, "\n");
  21351. _mdText = _mdText.replace(/\\/g, "");
  21352. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21353. //转化返回的回复流数据.
  21354. if(_iindex == 10){
  21355. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21356. _iindex = 0
  21357. }
  21358. this.taskGLoading[index][0] = false
  21359. // 处理流数据
  21360. }
  21361. // this.$forceUpdate();
  21362. };
  21363. let _this = this
  21364. this.isTaskCancelSource1[index].onerror = function(event) {
  21365. // 处理错误,可以尝试重新连接
  21366. console.log('EventSource error:', event);
  21367. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21368. callback ? callback(callback2) : ''
  21369. _this.taskGLoading[index][0] = false
  21370. _this.ttaskGLoading[index][0] = false
  21371. _this.isTaskCancelSource1[index].close();
  21372. _this.isTaskCancelSource1[index] = null;
  21373. _this.taskCancelToken1[index][0] = null
  21374. };
  21375. },
  21376. async aiGetG322(messages, index, callback) {
  21377. let _this = this
  21378. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21379. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21380. if (_this.infoData.length) {
  21381. for (var i = 0; i < _this.infoData.length; i++) {
  21382. if(_this.infoData[i].fileid){
  21383. fileid.push(_this.infoData[i].fileid)
  21384. }else {
  21385. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21386. if(_fileid){
  21387. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21388. _this.$forceUpdate();
  21389. if(_fileid != 1){
  21390. fileid.push(_fileid)
  21391. }
  21392. }
  21393. }
  21394. }
  21395. }
  21396. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  21397. let parm = {
  21398. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21399. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21400. session_name: uuidv4(),
  21401. userId: this.userid,
  21402. file_ids: fileid.length ? [...fileid] : '',
  21403. model: 'gpt-4o-2024-11-20',
  21404. temperature: this.mode == 3 ? 0.5 : 0.1,
  21405. }
  21406. this.ajax
  21407. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  21408. .then(async (response) => {
  21409. console.log(response);
  21410. let data = response.data.FunctionResponse
  21411. if (data.message) {
  21412. console.log(data.message);
  21413. let tArray = {}
  21414. try {
  21415. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21416. } catch (error) {
  21417. console.log("error_________________" + error);
  21418. try {
  21419. let regex = new RegExp(/```json([\s\S]*?)```/);
  21420. let match = data.message.match(regex);
  21421. tArray = JSON.parse(match[1]);
  21422. } catch (error) {
  21423. try {
  21424. let regex = new RegExp(/```json([\s\S]*?)```/);
  21425. let match = data.message.match(regex);
  21426. // eval("var aaa = " + match[0])
  21427. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21428. } catch (error) {
  21429. console.log("error_________________" + error);
  21430. }
  21431. console.log("error_________________" + error);
  21432. }
  21433. }
  21434. let toolsJson = {
  21435. "电子白板": { tool: 1, type: 1 },
  21436. "文档": { tool: 52, type: 1 },
  21437. "思维导图": { tool: 3, type: 1 },
  21438. "表格": { tool: 48, type: 1 },
  21439. "作业提交": { tool: 16, type: 2 },
  21440. "问答": { tool: 15, type: 2 },
  21441. "选择题": { tool: 45, type: 2 },
  21442. }
  21443. if(_this.languageSetting == 1){
  21444. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  21445. }else if(_this.languageSetting == 2){
  21446. toolsJson = {
  21447. "Mind Map Tool": { tool: 1, type: 1 },
  21448. "Document tool": { tool: 52, type: 1 },
  21449. "Diagram Tool": { tool: 3, type: 1 },
  21450. "Spreadsheet tool": { tool: 48, type: 1 },
  21451. "作业提交": { tool: 16, type: 2 },
  21452. "Q&A Tool": { tool: 15, type: 2 },
  21453. "Choice tool": { tool: 45, type: 2 },
  21454. }
  21455. }
  21456. let _task = tArray
  21457. if(!_task.toolChoose){
  21458. console.log("error_________________JSON不对重新生成");
  21459. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21460. _this.aiGetG322(messages, index)
  21461. return;
  21462. }
  21463. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21464. if (_task.toolChoose && _task.toolChoose.length) {
  21465. for (var j = 0; j < _task.toolChoose.length; j++) {
  21466. let _json = {
  21467. tool: [],
  21468. toolDetail: _task.toolChoose[j].detail,
  21469. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21470. askCount: 1,
  21471. askTitle: "",
  21472. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21473. }
  21474. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21475. if(converter(_task.toolChoose[j].tool) == converter('问答') || _task.toolChoose[j].tool == 'Q&A Tool'){
  21476. let answerQ = await _this.aiCreateQuestion(15, index)
  21477. // _json.answerQ = answerQ.answerQ
  21478. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21479. }else if(converter(_task.toolChoose[j].tool) == converter('选择题') || _task.toolChoose[j].tool == 'Choice tool'){
  21480. let testJson = await _this.aiCreateQuestion(45, index)
  21481. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21482. _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}
  21483. }
  21484. _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]
  21485. _this.$forceUpdate();
  21486. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21487. }
  21488. } else {
  21489. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21490. {
  21491. tool: [],
  21492. toolDetail: "",
  21493. toolType: 0,
  21494. askCount: 1,
  21495. askTitle: "",
  21496. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21497. },
  21498. )
  21499. }
  21500. //
  21501. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21502. _this.$forceUpdate();
  21503. // _this.$nextTick(()=>{
  21504. // setTimeout(() => {
  21505. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21506. // if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  21507. // _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  21508. // }
  21509. // }
  21510. // }, 2000);
  21511. // })
  21512. }
  21513. callback ? callback() : ''
  21514. _this.taskGLoading[index][1] = false
  21515. _this.taskCancelToken2[index] = null
  21516. _this.$forceUpdate();
  21517. })
  21518. .catch((error) => {
  21519. // _this.loading = false
  21520. callback ? callback() : ''
  21521. _this.taskGLoading[index][1] = false
  21522. _this.taskCancelToken2[index] = null
  21523. _this.$forceUpdate();
  21524. console.log(error);
  21525. });
  21526. },
  21527. async aiGetG323(messages, index) {
  21528. let _this = this
  21529. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21530. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21531. if (_this.infoData.length) {
  21532. for (var i = 0; i < _this.infoData.length; i++) {
  21533. if(_this.infoData[i].fileid){
  21534. fileid.push(_this.infoData[i].fileid)
  21535. }else {
  21536. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21537. if(_fileid){
  21538. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21539. _this.$forceUpdate();
  21540. if(_fileid != 1){
  21541. fileid.push(_fileid)
  21542. }
  21543. }
  21544. }
  21545. }
  21546. }
  21547. let parm = {
  21548. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21549. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21550. session_name: uuidv4(),
  21551. userId: this.userid,
  21552. file_ids: fileid.length ? [...fileid] : '',
  21553. model: 'gpt-4o-2024-11-20',
  21554. temperature: this.mode == 3 ? 0.5 : 0.1,
  21555. }
  21556. this.ajax
  21557. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21558. .then(async (response) => {
  21559. console.log(response);
  21560. let data = response.data.FunctionResponse
  21561. if (data.message) {
  21562. console.log(data.message);
  21563. let tArray = {}
  21564. try {
  21565. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21566. } catch (error) {
  21567. console.log("error_________________" + error);
  21568. try {
  21569. let regex = new RegExp(/```json([\s\S]*?)```/);
  21570. let match = data.message.match(regex);
  21571. tArray = JSON.parse(match[1]);
  21572. } catch (error) {
  21573. try {
  21574. let regex = new RegExp(/```json([\s\S]*?)```/);
  21575. let match = data.message.match(regex);
  21576. // eval("var aaa = " + match[0])
  21577. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21578. } catch (error) {
  21579. console.log("error_________________" + error);
  21580. }
  21581. console.log("error_________________" + error);
  21582. }
  21583. }
  21584. let _task = tArray
  21585. if(!_task.elist){
  21586. console.log("error_________________JSON不对重新生成");
  21587. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21588. _this.aiGetG322(messages, index)
  21589. return;
  21590. }
  21591. _task.elist = _task.elist.filter(el=>{
  21592. el.isai = "1"
  21593. return el
  21594. })
  21595. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21596. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21597. _this.$forceUpdate();
  21598. }
  21599. // callback ? callback() : ''
  21600. _this.taskGLoading[index][2] = false
  21601. })
  21602. .catch((error) => {
  21603. // _this.loading = false
  21604. _this.taskGLoading[index][2] = false
  21605. console.log(error);
  21606. });
  21607. },
  21608. async aiCreateQuestion(type, task) {
  21609. let _this = this
  21610. return new Promise((resolve, reject) => {
  21611. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21612. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21613. if (_this.infoData.length) {
  21614. for (var i = 0; i < _this.infoData.length; i++) {
  21615. if(_this.infoData[i].fileid){
  21616. fileid.push(_this.infoData[i].fileid)
  21617. }
  21618. }
  21619. }
  21620. let sub = []
  21621. let mclass = []
  21622. if (this.courseTypeId.length) {
  21623. for (var i = 0; i < this.courseTypeId.length; i++) {
  21624. let _sid = this.courseTypeId[i]
  21625. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21626. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21627. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21628. }
  21629. }
  21630. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21631. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21632. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21633. }
  21634. }
  21635. }
  21636. }
  21637. let messages = ""
  21638. if(type == 15){
  21639. messages = `NOTICE
  21640. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21641. Language: ${this.getLang()}
  21642. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21643. Instruction: Based on the context, follow "Format example", write content.
  21644. # Context
  21645. ## 任务
  21646. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21647. ## 限制
  21648. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21649. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21650. ## 课程简介
  21651. 课程名字:${_this.courseName}
  21652. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21653. ${sub.length ? '学科:' + sub.join(",") : ''}
  21654. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21655. ## 教案
  21656. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21657. # Format example
  21658. {"answerQ":"问题"}
  21659. `
  21660. }else if(type == 45){
  21661. messages = `NOTICE
  21662. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21663. Language: ${this.getLang()}
  21664. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21665. Instruction: Based on the context, follow "Format example", write content.
  21666. # Context
  21667. ## 任务
  21668. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21669. ## 限制
  21670. - 生成题目禁止重复。
  21671. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21672. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21673. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21674. ## 课程简介
  21675. 课程名字:${_this.courseName}
  21676. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21677. ${sub.length ? '学科:' + sub.join(",") : ''}
  21678. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21679. ## 教案
  21680. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21681. # Format example
  21682. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21683. `
  21684. }
  21685. let parm = {
  21686. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21687. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21688. session_name: uuidv4(),
  21689. userId: this.userid,
  21690. file_ids: fileid.length ? [...fileid] : '',
  21691. model: 'gpt-4o-2024-11-20',
  21692. temperature: this.mode == 3 ? 0.5 : 0.1,
  21693. }
  21694. this.ajax
  21695. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21696. .then((response) => {
  21697. console.log(response);
  21698. let data = response.data.FunctionResponse
  21699. if (data.message) {
  21700. console.log(data.message);
  21701. try {
  21702. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21703. let tArray = {}
  21704. try {
  21705. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21706. } catch (error) {
  21707. console.log("error_________________" + error);
  21708. try {
  21709. let regex = new RegExp(/```json([\s\S]*?)```/);
  21710. let match = data.message.match(regex);
  21711. tArray = JSON.parse(match[1]);
  21712. // var message = data.message;
  21713. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21714. // var jsonEnd = message.indexOf("```", jsonStart);
  21715. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21716. // tArray = JSON.parse(jsonString);
  21717. } catch (error) {
  21718. try {
  21719. let regex = new RegExp(/```json([\s\S]*?)```/);
  21720. let match = data.message.match(regex);
  21721. // eval("var aaa = " + match[0])
  21722. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21723. } catch (error) {
  21724. try {
  21725. let regex = new RegExp(/```json([\s\S]*?)```/);
  21726. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21727. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21728. // eval("var aaa = " + match[0])
  21729. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21730. } catch (error) {
  21731. console.log("error_________________" + error);
  21732. }
  21733. console.log("error_________________" + error);
  21734. }
  21735. console.log("error_________________" + error);
  21736. }
  21737. }
  21738. resolve(tArray)
  21739. } catch (error) {
  21740. if(type == 15){
  21741. resolve({answerQ: "题目"})
  21742. }else if(type == 45){
  21743. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21744. }
  21745. }
  21746. }else if(type == 15){
  21747. resolve({answerQ: "题目"})
  21748. }else if(type == 45){
  21749. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21750. }
  21751. })
  21752. .catch((error) => {
  21753. if(type == 15){
  21754. resolve({answerQ: "题目"})
  21755. }else if(type == 45){
  21756. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21757. }
  21758. console.log(error);
  21759. });
  21760. });
  21761. },
  21762. async aiChoice(type){
  21763. if(type == 45){
  21764. this.choiceLoading = true
  21765. }
  21766. let _this = this
  21767. let fileid = []
  21768. if (_this.xuanzeInfoData.length) {
  21769. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  21770. if(_this.xuanzeInfoData[i].fileid){
  21771. fileid.push(_this.xuanzeInfoData[i].fileid)
  21772. }
  21773. }
  21774. }else{
  21775. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21776. if (_this.infoData.length) {
  21777. for (var i = 0; i < _this.infoData.length; i++) {
  21778. if(_this.infoData[i].fileid){
  21779. fileid.push(_this.infoData[i].fileid)
  21780. }
  21781. }
  21782. }
  21783. }
  21784. let sub = []
  21785. let mclass = []
  21786. if (this.courseTypeId.length) {
  21787. for (var i = 0; i < this.courseTypeId.length; i++) {
  21788. let _sid = this.courseTypeId[i]
  21789. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21790. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21791. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21792. }
  21793. }
  21794. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21795. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21796. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21797. }
  21798. }
  21799. }
  21800. }
  21801. let messages = ""
  21802. if(type == 15){
  21803. messages = `NOTICE
  21804. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21805. Language: ${this.getLang()}
  21806. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21807. Instruction: Based on the context, follow "Format example", write content.
  21808. # Context
  21809. ## 任务
  21810. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21811. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21812. ## 限制
  21813. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21814. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21815. ## 课程简介
  21816. 课程名字:${_this.courseName}
  21817. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21818. ${sub.length ? '学科:' + sub.join(",") : ''}
  21819. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21820. ## 教案
  21821. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21822. # Format example
  21823. {"answerQ":"问题"}
  21824. `
  21825. }else if(type == 45){
  21826. messages = `NOTICE
  21827. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21828. Language: ${this.getLang()}
  21829. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21830. Instruction: Based on the context, follow "Format example", write content.
  21831. # Context
  21832. ## 任务
  21833. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21834. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21835. ## 限制
  21836. - 生成题目禁止重复。
  21837. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21838. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21839. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21840. ## 课程简介
  21841. 课程名字:${_this.courseName}
  21842. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21843. ${sub.length ? '学科:' + sub.join(",") : ''}
  21844. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21845. ## 教案
  21846. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21847. # Format example
  21848. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21849. `
  21850. }
  21851. let parm = {
  21852. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21853. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21854. session_name: uuidv4(),
  21855. userId: this.userid,
  21856. file_ids: fileid.length ? [...fileid] : '',
  21857. model: 'gpt-4o-2024-11-20',
  21858. temperature: this.mode == 3 ? 0.5 : 0.1,
  21859. }
  21860. this.ajax
  21861. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21862. .then((response) => {
  21863. console.log(response);
  21864. let data = response.data.FunctionResponse
  21865. if (data.message) {
  21866. console.log(data.message);
  21867. try {
  21868. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21869. let tArray = {}
  21870. try {
  21871. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21872. } catch (error) {
  21873. console.log("error_________________" + error);
  21874. try {
  21875. let regex = new RegExp(/```json([\s\S]*?)```/);
  21876. let match = data.message.match(regex);
  21877. tArray = JSON.parse(match[1]);
  21878. // var message = data.message;
  21879. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21880. // var jsonEnd = message.indexOf("```", jsonStart);
  21881. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21882. // tArray = JSON.parse(jsonString);
  21883. } catch (error) {
  21884. try {
  21885. let regex = new RegExp(/```json([\s\S]*?)```/);
  21886. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21887. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21888. // eval("var aaa = " + match[0])
  21889. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21890. } catch (error) {
  21891. console.log("error_________________" + error);
  21892. }
  21893. console.log("error_________________" + error);
  21894. }
  21895. }
  21896. if(type == 45){
  21897. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  21898. }
  21899. } catch (error) {
  21900. if(type == 15){
  21901. {answerQ: "题目"}
  21902. }else if(type == 45){
  21903. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21904. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21905. }
  21906. _this.choiceLoading = false
  21907. }
  21908. }else if(type == 15){
  21909. {answerQ: "题目"}
  21910. }else if(type == 45){
  21911. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21912. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21913. }
  21914. _this.choiceLoading = false
  21915. }).catch((error) => {
  21916. if(type == 15){
  21917. {answerQ: "题目"}
  21918. }else if(type == 45){
  21919. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21920. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21921. }
  21922. console.log(error);
  21923. _this.choiceLoading = false
  21924. });
  21925. },
  21926. async aiGet4(messages, callback, clickType) {
  21927. let _this = this
  21928. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21929. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21930. if (_this.infoData.length) {
  21931. for (var i = 0; i < _this.infoData.length; i++) {
  21932. if(_this.infoData[i].fileid){
  21933. fileid.push(_this.infoData[i].fileid)
  21934. }else {
  21935. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21936. if(_fileid){
  21937. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21938. _this.$forceUpdate();
  21939. if(_fileid != 1){
  21940. fileid.push(_fileid)
  21941. }
  21942. }
  21943. }
  21944. }
  21945. }
  21946. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  21947. if(_this.cankaoInfoData[i].fileid){
  21948. fileid.push(_this.cankaoInfoData[i].fileid)
  21949. }else {
  21950. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  21951. if(_fileid){
  21952. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21953. _this.$forceUpdate();
  21954. if(_fileid != 1){
  21955. fileid.push(_fileid)
  21956. }
  21957. }
  21958. }
  21959. }
  21960. // let params = JSON.stringify({
  21961. // // "model": "Chat",
  21962. // model: 'gpt-3.5-turbo',
  21963. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21964. // max_tokens: 4096,
  21965. // top_p: 1,
  21966. // frequency_penalty: 0,
  21967. // presence_penalty: 0,
  21968. // messages: [{
  21969. // content: messages,
  21970. // role: 'user'
  21971. // }],
  21972. // stream: false,
  21973. // uid: this.userid,
  21974. // mind_map_question: "",
  21975. // })
  21976. // // let params = JSON.stringify({
  21977. // // message: {
  21978. // // anthropic_version: "bedrock-2023-05-31",
  21979. // // max_tokens: 4096,
  21980. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  21981. // // top_p: 1,
  21982. // // messages: [{
  21983. // // content: messages,
  21984. // // role: 'user'
  21985. // // }], //
  21986. // // },
  21987. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21988. // // });
  21989. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21990. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', 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. // let dArray = JSON.parse(data.choices[0].message.content)
  21996. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  21997. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  21998. // _this.unitJson[0].chapterInfo[0].taskJson = []
  21999. // for (var i = 0; i < dArray.length; i++) {
  22000. // let _task = dArray[i]
  22001. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  22002. // task: _task.task,
  22003. // taskDetail: "",
  22004. // taskDetail2: "",
  22005. // taskDetail3: _task.detail,
  22006. // chapterData: [],
  22007. // toolText: "",
  22008. // toolChoose: [
  22009. // {
  22010. // tool: [],
  22011. // toolDetail: "",
  22012. // toolType: 0,
  22013. // askCount: 1,
  22014. // askTitle: "",
  22015. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22016. // },
  22017. // ],
  22018. // isShowTools: false,
  22019. // askCount: 1,
  22020. // isFold: 0,
  22021. // askTitle: "",
  22022. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22023. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22024. // homeworkList: [],
  22025. // })
  22026. // }
  22027. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  22028. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22029. // _this.$forceUpdate();
  22030. // } else {
  22031. // for (var i = 0; i < dArray.length; i++) {
  22032. // let _task = dArray[i]
  22033. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22034. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22035. // }else {
  22036. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22037. // task: _task.task,
  22038. // taskDetail: "",
  22039. // taskDetail2: "",
  22040. // taskDetail3: _task.detail,
  22041. // chapterData: [],
  22042. // toolText: "",
  22043. // toolChoose: [
  22044. // {
  22045. // tool: [],
  22046. // toolDetail: "",
  22047. // toolType: 0,
  22048. // askCount: 1,
  22049. // askTitle: "",
  22050. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22051. // },
  22052. // ],
  22053. // isShowTools: false,
  22054. // askCount: 1,
  22055. // isFold: 0,
  22056. // askTitle: "",
  22057. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22058. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22059. // homeworkList: [],
  22060. // }
  22061. // }
  22062. // }
  22063. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22064. // _this.$forceUpdate();
  22065. // }
  22066. // }
  22067. // // if (data.result) {
  22068. // // console.log(data.result);
  22069. // // let dArray = JSON.parse(data.result)
  22070. // // _this.teacherText = JSON.parse(data.result)
  22071. // // for (var i = 0; i < dArray.length; i++) {
  22072. // // let _task = dArray[i]
  22073. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22074. // // }
  22075. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22076. // // _this.$forceUpdate();
  22077. // // }
  22078. // callback ? callback() : ''
  22079. // _this.loading = false
  22080. // }).catch(function (error) {
  22081. // _this.loading = false
  22082. // console.log(error);
  22083. // });
  22084. let parm = {
  22085. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22086. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22087. session_name: uuidv4(),
  22088. userId: this.userid,
  22089. file_ids: fileid.length ? [...fileid] : '',
  22090. model: 'gpt-4o-2024-11-20',
  22091. temperature: this.mode == 3 ? 0.5 : 0.1,
  22092. }
  22093. this.ajax
  22094. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  22095. .then((response) => {
  22096. console.log(response);
  22097. let data = response.data.FunctionResponse
  22098. if (data.message) {
  22099. console.log(data.message);
  22100. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  22101. let dArray = []
  22102. try {
  22103. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  22104. } catch (error) {
  22105. console.log("error_________________" + error);
  22106. try {
  22107. let regex = new RegExp(/```json([\s\S]*?)```/);
  22108. let match = data.message.match(regex);
  22109. dArray = JSON.parse(match[1]);
  22110. // var message = data.message;
  22111. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  22112. // var jsonEnd = message.indexOf("```", jsonStart);
  22113. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  22114. // dArray = JSON.parse(jsonString);
  22115. } catch (error) {
  22116. _this.aiGet4(messages, callback)
  22117. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  22118. console.log("error_________________" + error);
  22119. return;
  22120. console.log("error_________________" + error);
  22121. _this.loading = false
  22122. }
  22123. }
  22124. try {
  22125. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  22126. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  22127. if(_this.panTeacher() > 0){
  22128. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  22129. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  22130. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  22131. }
  22132. for (var i = 0; i < dArray.length; i++) {
  22133. let _task = dArray[i]
  22134. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22135. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  22136. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22137. }else {
  22138. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22139. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  22140. taskDetail: "",
  22141. taskDetail2: "",
  22142. taskDetail3: _task.detail,
  22143. chapterData: [],
  22144. toolText: "",
  22145. toolChoose: [
  22146. {
  22147. tool: [],
  22148. toolDetail: "",
  22149. toolType: 0,
  22150. askCount: 1,
  22151. askTitle: "",
  22152. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22153. },
  22154. ],
  22155. isShowTools: false,
  22156. askCount: 1,
  22157. isFold: 0,
  22158. askTitle: "",
  22159. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22160. checkJson: [{ checkCount: [], checkPerent: [] }],
  22161. homeworkList: [],
  22162. })
  22163. }
  22164. }
  22165. }else {
  22166. _this.unitJson[0].chapterInfo[0].taskJson = []
  22167. for (var i = 0; i < dArray.length; i++) {
  22168. let _task = dArray[i]
  22169. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22170. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  22171. taskDetail: "",
  22172. taskDetail2: "",
  22173. taskDetail3: _task.detail,
  22174. chapterData: [],
  22175. toolText: "",
  22176. toolChoose: [
  22177. {
  22178. tool: [],
  22179. toolDetail: "",
  22180. toolType: 0,
  22181. askCount: 1,
  22182. askTitle: "",
  22183. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22184. },
  22185. ],
  22186. isShowTools: false,
  22187. askCount: 1,
  22188. isFold: 0,
  22189. askTitle: "",
  22190. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22191. checkJson: [{ checkCount: [], checkPerent: [] }],
  22192. homeworkList: [],
  22193. })
  22194. }
  22195. }
  22196. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  22197. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22198. _this.$forceUpdate();
  22199. } else {
  22200. for (var i = 0; i < dArray.length; i++) {
  22201. let _task = dArray[i]
  22202. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22203. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22204. }else {
  22205. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22206. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  22207. taskDetail: "",
  22208. taskDetail2: "",
  22209. taskDetail3: _task.detail,
  22210. chapterData: [],
  22211. toolText: "",
  22212. toolChoose: [
  22213. {
  22214. tool: [],
  22215. toolDetail: "",
  22216. toolType: 0,
  22217. askCount: 1,
  22218. askTitle: "",
  22219. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22220. },
  22221. ],
  22222. isShowTools: false,
  22223. askCount: 1,
  22224. isFold: 0,
  22225. askTitle: "",
  22226. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22227. checkJson: [{ checkCount: [], checkPerent: [] }],
  22228. homeworkList: [],
  22229. }
  22230. }
  22231. }
  22232. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22233. _this.$forceUpdate();
  22234. }
  22235. } catch (error) {
  22236. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  22237. _this.aiGet4(messages, callback)
  22238. console.log("error_________________" + error);
  22239. return;
  22240. // _this.loading = false
  22241. }
  22242. }
  22243. callback ? callback() : ''
  22244. })
  22245. .catch((error) => {
  22246. _this.loading = false
  22247. console.log(error);
  22248. });
  22249. },
  22250. async aiDetail(msg, index) {
  22251. let _this = this
  22252. const _tindex = 'task-' + index
  22253. const _tindex2 = index
  22254. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22255. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22256. if (_this.infoData.length) {
  22257. for (var i = 0; i < _this.infoData.length; i++) {
  22258. if(_this.infoData[i].fileid){
  22259. fileid.push(_this.infoData[i].fileid)
  22260. }else {
  22261. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22262. if(_fileid){
  22263. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22264. _this.$forceUpdate();
  22265. if(_fileid != 1){
  22266. fileid.push(_fileid)
  22267. }
  22268. }
  22269. }
  22270. }
  22271. }
  22272. let url = []
  22273. if (this.infoData.length) {
  22274. for (var i = 0; i < this.infoData.length; i++) {
  22275. url.push(this.infoData[i].url)
  22276. }
  22277. }
  22278. let messages = `NOTICE
  22279. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22280. Language: ${this.getLang()}
  22281. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22282. Instruction: Based on the context, follow "Format example", write content.
  22283. #Context
  22284. ## 要求
  22285. ${msg}
  22286. ## 参考信息
  22287. 任务名称:${_this.aiCallBack.task}
  22288. ## 优化内容
  22289. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  22290. // -------- #补充参考资料和
  22291. // ## 补充参考资料
  22292. // - 补充资料:${url.join(",")}
  22293. // - 补充描述:${_this.courseText2}
  22294. _this.taskDetailLoading.push(_tindex)
  22295. _this.ttaskDetailLoading.push(_tindex)
  22296. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22297. let _uuid = uuidv4();
  22298. // let params = JSON.stringify({
  22299. // // "model": "Chat",
  22300. // model: 'gpt-3.5-turbo',
  22301. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22302. // max_tokens: 4096,
  22303. // top_p: 1,
  22304. // frequency_penalty: 0,
  22305. // presence_penalty: 0,
  22306. // messages: [{
  22307. // content: messages,
  22308. // role: 'user'
  22309. // }],
  22310. // uid: _uuid,
  22311. // mind_map_question: "",
  22312. // })
  22313. let params = {
  22314. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22315. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  22316. session_name: _uuid,
  22317. userId: _this.userid,
  22318. uid: _uuid,
  22319. file_ids: fileid.length ? [...fileid] : '',
  22320. model: 'gpt-4o-2024-11-20',
  22321. temperature: this.mode == 3 ? 0.5 : 0.1,
  22322. }
  22323. // let params = JSON.stringify({
  22324. // message: {
  22325. // anthropic_version: "bedrock-2023-05-31",
  22326. // max_tokens: 4096,
  22327. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22328. // top_p: 1,
  22329. // messages: [{
  22330. // "role": "user",
  22331. // "content": messages
  22332. // }] ,
  22333. // },
  22334. // uid: _uuid,
  22335. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22336. // });
  22337. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22338. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22339. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22340. console.log(response);
  22341. // let data = response.data.FunctionResponse
  22342. // if (data.choices && data.choices.length && data.choices[0].message) {
  22343. // console.log(data.choices[0].message.content);
  22344. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22345. // _this.$forceUpdate()
  22346. // }
  22347. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22348. } else {
  22349. _this.$message.warning(response.data.FunctionResponse.result);
  22350. }
  22351. _this.isOutlineTaskCancelToken[index] = null
  22352. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22353. }).catch(function (error) {
  22354. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22355. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22356. _this.isOutlineTaskCancelToken[index] = null
  22357. if(error && error.message != 'Request canceled by the user.'){
  22358. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22359. }
  22360. console.log(error);
  22361. });
  22362. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  22363. },
  22364. aiDetailgetAiContent(_uid, loading, _tindex2) {
  22365. try {
  22366. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22367. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22368. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22369. } catch(error){
  22370. console.log('EventSource error:', error);
  22371. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22372. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22373. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22374. this.isOutlineTaskCancelToken[_tindex2] = null
  22375. return;
  22376. }
  22377. let _allText = "";
  22378. let _mdText = "";
  22379. let _iindex = 0
  22380. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22381. let _eData = JSON.parse(_e.data).content;
  22382. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22383. //对话已经完成
  22384. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22385. this.isOutlineTaskCancelSource[_tindex2].close();
  22386. this.isOutlineTaskCancelSource[_tindex2] = null;
  22387. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22388. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22389. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22390. this.isOutlineTaskCancelToken[_tindex2] = null
  22391. return;
  22392. } else {
  22393. _iindex++
  22394. //对话还在继续
  22395. let _text = "";
  22396. _text = _eData.replaceAll("'", "");
  22397. if (_allText == "") {
  22398. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22399. } else {
  22400. _allText += _text;
  22401. }
  22402. _mdText = _allText + "_";
  22403. _mdText = _mdText.replace(/\\n/g, "\n");
  22404. _mdText = _mdText.replace(/\\/g, "");
  22405. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22406. //转化返回的回复流数据.
  22407. if(_iindex == 10){
  22408. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22409. _iindex = 0
  22410. }
  22411. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22412. // 处理流数据
  22413. }
  22414. // this.$forceUpdate();
  22415. };
  22416. let _this = this
  22417. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22418. // 处理错误,可以尝试重新连接
  22419. console.log('EventSource error:', event);
  22420. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22421. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22422. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22423. _this.isOutlineTaskCancelToken[_tindex2] = null
  22424. _this.isOutlineTaskCancelSource[_tindex2].close();
  22425. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22426. };
  22427. },
  22428. async aiOutlineDetail(msg, index) {
  22429. let _this = this
  22430. const _tindex = 'task-' + index
  22431. const _tindex2 = index
  22432. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22433. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22434. if (_this.infoData.length) {
  22435. for (var i = 0; i < _this.infoData.length; i++) {
  22436. if(_this.infoData[i].fileid){
  22437. fileid.push(_this.infoData[i].fileid)
  22438. }else {
  22439. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22440. if(_fileid){
  22441. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22442. _this.$forceUpdate();
  22443. if(_fileid != 1){
  22444. fileid.push(_fileid)
  22445. }
  22446. }
  22447. }
  22448. }
  22449. }
  22450. let url = []
  22451. if (this.infoData.length) {
  22452. for (var i = 0; i < this.infoData.length; i++) {
  22453. url.push(this.infoData[i].url)
  22454. }
  22455. }
  22456. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22457. let messages = `NOTICE
  22458. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22459. Language: ${this.getLang()}
  22460. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22461. Instruction: Based on the context, follow "Format example", write content.
  22462. #Context
  22463. ## 要求
  22464. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  22465. ## 参考信息
  22466. 课程名字:${_this.courseName}
  22467. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22468. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22469. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22470. # Format example
  22471. 子任务名称:名称应该总结了该任务是在做什么,
  22472. 子任务设计:任务设计。
  22473. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  22474. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  22475. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  22476. `
  22477. // 教学目标:教学目标。
  22478. // 任务设计:任务设计。
  22479. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22480. // -------- #补充参考资料和
  22481. // ## 补充参考资料
  22482. // - 补充资料:${url.join(",")}
  22483. // - 补充描述:${_this.courseText2}
  22484. _this.taskDetailLoading.push(_tindex)
  22485. _this.ttaskDetailLoading.push(_tindex)
  22486. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22487. let _uuid = uuidv4();
  22488. // let params = JSON.stringify({
  22489. // // "model": "Chat",
  22490. // model: 'gpt-3.5-turbo',
  22491. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22492. // max_tokens: 4096,
  22493. // top_p: 1,
  22494. // frequency_penalty: 0,
  22495. // presence_penalty: 0,
  22496. // messages: [{
  22497. // content: messages,
  22498. // role: 'user'
  22499. // }],
  22500. // uid: _uuid,
  22501. // mind_map_question: "",
  22502. // })
  22503. let params = {
  22504. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22505. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22506. session_name: _uuid,
  22507. userId: _this.userid,
  22508. uid: _uuid,
  22509. file_ids: fileid.length ? [...fileid] : '',
  22510. model: 'gpt-4o-2024-11-20',
  22511. temperature: this.mode == 3 ? 0.5 : 0.1,
  22512. }
  22513. // let params = JSON.stringify({
  22514. // message: {
  22515. // anthropic_version: "bedrock-2023-05-31",
  22516. // max_tokens: 4096,
  22517. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22518. // top_p: 1,
  22519. // messages: [{
  22520. // "role": "user",
  22521. // "content": messages
  22522. // }] ,
  22523. // },
  22524. // uid: _uuid,
  22525. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22526. // });
  22527. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22528. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22529. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22530. console.log(response);
  22531. // let data = response.data.FunctionResponse
  22532. // if (data.choices && data.choices.length && data.choices[0].message) {
  22533. // console.log(data.choices[0].message.content);
  22534. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22535. // _this.$forceUpdate()
  22536. // }
  22537. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22538. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22539. } else {
  22540. _this.$message.warning(response.data.FunctionResponse.result);
  22541. }
  22542. _this.isOutlineTaskCancelToken[index] = null
  22543. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22544. }).catch(function (error) {
  22545. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22546. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22547. _this.isOutlineTaskCancelToken[index] = null
  22548. if(error && error.message != 'Request canceled by the user.'){
  22549. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22550. }
  22551. console.log(error);
  22552. });
  22553. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22554. },
  22555. async aiOutlineDetail2(msg, index) {
  22556. let _this = this
  22557. const _tindex = 'task-' + index
  22558. const _tindex2 = index
  22559. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22560. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22561. if (_this.infoData.length) {
  22562. for (var i = 0; i < _this.infoData.length; i++) {
  22563. if(_this.infoData[i].fileid){
  22564. fileid.push(_this.infoData[i].fileid)
  22565. }else {
  22566. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22567. if(_fileid){
  22568. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22569. _this.$forceUpdate();
  22570. if(_fileid != 1){
  22571. fileid.push(_fileid)
  22572. }
  22573. }
  22574. }
  22575. }
  22576. }
  22577. let url = []
  22578. if (this.infoData.length) {
  22579. for (var i = 0; i < this.infoData.length; i++) {
  22580. url.push(this.infoData[i].url)
  22581. }
  22582. }
  22583. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22584. let taskArray = []
  22585. let taskArrayD = []
  22586. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  22587. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  22588. if(k != index){
  22589. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  22590. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  22591. }
  22592. }
  22593. let messages = `NOTICE
  22594. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22595. Language: ${this.getLang()}
  22596. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22597. Instruction: Based on the context, follow "Format example", write content.
  22598. #Context
  22599. ## 要求
  22600. ${msg}
  22601. ## 参考信息
  22602. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22603. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22604. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22605. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  22606. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  22607. # Format example
  22608. **子任务标题**:环节+子任务名称
  22609. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  22610. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  22611. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  22612. `
  22613. // 教学目标:教学目标。
  22614. // 任务设计:任务设计。
  22615. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22616. // -------- #补充参考资料和
  22617. // ## 补充参考资料
  22618. // - 补充资料:${url.join(",")}
  22619. // - 补充描述:${_this.courseText2}
  22620. _this.taskDetailLoading.push(_tindex)
  22621. _this.ttaskDetailLoading.push(_tindex)
  22622. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22623. let _uuid = uuidv4();
  22624. // let params = JSON.stringify({
  22625. // // "model": "Chat",
  22626. // model: 'gpt-3.5-turbo',
  22627. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22628. // max_tokens: 4096,
  22629. // top_p: 1,
  22630. // frequency_penalty: 0,
  22631. // presence_penalty: 0,
  22632. // messages: [{
  22633. // content: messages,
  22634. // role: 'user'
  22635. // }],
  22636. // uid: _uuid,
  22637. // mind_map_question: "",
  22638. // })
  22639. let params = {
  22640. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22641. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  22642. session_name: _uuid,
  22643. userId: _this.userid,
  22644. uid: _uuid,
  22645. file_ids: fileid.length ? [...fileid] : '',
  22646. model: 'gpt-4o-2024-11-20',
  22647. temperature: this.mode == 3 ? 0.5 : 0.1,
  22648. }
  22649. // let params = JSON.stringify({
  22650. // message: {
  22651. // anthropic_version: "bedrock-2023-05-31",
  22652. // max_tokens: 4096,
  22653. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22654. // top_p: 1,
  22655. // messages: [{
  22656. // "role": "user",
  22657. // "content": messages
  22658. // }] ,
  22659. // },
  22660. // uid: _uuid,
  22661. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22662. // });
  22663. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22664. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22665. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22666. console.log(response);
  22667. // let data = response.data.FunctionResponse
  22668. // if (data.choices && data.choices.length && data.choices[0].message) {
  22669. // console.log(data.choices[0].message.content);
  22670. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22671. // _this.$forceUpdate()
  22672. // }
  22673. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22674. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22675. } else {
  22676. _this.$message.warning(response.data.FunctionResponse.result);
  22677. }
  22678. _this.isOutlineTaskCancelToken[index] = null
  22679. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22680. }).catch(function (error) {
  22681. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22682. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22683. _this.isOutlineTaskCancelToken[index] = null
  22684. if(error && error.message != 'Request canceled by the user.'){
  22685. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22686. }
  22687. console.log(error);
  22688. });
  22689. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22690. },
  22691. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  22692. try {
  22693. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22694. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22695. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22696. } catch(error) {
  22697. console.log('EventSource error:', error);
  22698. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22699. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22700. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22701. this.isOutlineTaskCancelToken[_tindex2] = null
  22702. return;
  22703. }
  22704. let _allText = "";
  22705. let _mdText = "";
  22706. let _iindex = 0
  22707. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22708. let _eData = JSON.parse(_e.data).content;
  22709. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22710. //对话已经完成
  22711. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22712. this.isOutlineTaskCancelSource[_tindex2].close();
  22713. this.isOutlineTaskCancelSource[_tindex2] = null;
  22714. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22715. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  22716. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  22717. }
  22718. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22719. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22720. this.isOutlineTaskCancelToken[_tindex2] = null
  22721. return;
  22722. } else {
  22723. _iindex++
  22724. //对话还在继续
  22725. let _text = "";
  22726. _text = _eData.replaceAll("'", "");
  22727. if (_allText == "") {
  22728. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22729. } else {
  22730. _allText += _text;
  22731. }
  22732. _mdText = _allText + "_";
  22733. _mdText = _mdText.replace(/\\n/g, "\n");
  22734. _mdText = _mdText.replace(/\\/g, "");
  22735. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22736. //转化返回的回复流数据.
  22737. if(_iindex == 10){
  22738. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22739. _iindex = 0
  22740. }
  22741. if(this.taskDetailLoading.indexOf(loading) !== -1){
  22742. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22743. }
  22744. // 处理流数据
  22745. }
  22746. // this.$forceUpdate();
  22747. };
  22748. let _this = this
  22749. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22750. // 处理错误,可以尝试重新连接
  22751. console.log('EventSource error:', event);
  22752. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22753. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22754. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22755. _this.isOutlineTaskCancelToken[_tindex2] = null
  22756. _this.isOutlineTaskCancelSource[_tindex2].close();
  22757. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22758. };
  22759. },
  22760. async aiDetail2(msg, index) {
  22761. let _this = this
  22762. const _tindex = 'task-' + index
  22763. const _tindex2 = index
  22764. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22765. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22766. if (_this.infoData.length) {
  22767. for (var i = 0; i < _this.infoData.length; i++) {
  22768. if(_this.infoData[i].fileid){
  22769. fileid.push(_this.infoData[i].fileid)
  22770. }else {
  22771. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22772. if(_fileid){
  22773. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22774. _this.$forceUpdate();
  22775. if(_fileid != 1){
  22776. fileid.push(_fileid)
  22777. }
  22778. }
  22779. }
  22780. }
  22781. }
  22782. let messages = `NOTICE
  22783. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22784. Language: ${this.getLang()}
  22785. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22786. Instruction: Based on the context, follow "Format example", write content.
  22787. #Context
  22788. ## 要求
  22789. ${msg}
  22790. ## 参考资料
  22791. 任务名字: ${_this.aiCallBack.task}
  22792. ## 优化信息
  22793. ${_this.aiCallBack.taskDetail}
  22794. # Format example
  22795. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  22796. _this.taskDetailLoading2.push(_tindex)
  22797. _this.ttaskDetailLoading2.push(_tindex)
  22798. let _uuid = uuidv4();
  22799. // let params = JSON.stringify({
  22800. // // "model": "Chat",
  22801. // model: 'gpt-3.5-turbo',
  22802. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22803. // max_tokens: 4096,
  22804. // top_p: 1,
  22805. // frequency_penalty: 0,
  22806. // presence_penalty: 0,
  22807. // messages: [{
  22808. // content: messages,
  22809. // role: 'user'
  22810. // }],
  22811. // uid: _uuid,
  22812. // mind_map_question: "",
  22813. // })
  22814. let params = {
  22815. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22816. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  22817. session_name: _uuid,
  22818. userId: _this.userid,
  22819. uid: _uuid,
  22820. file_ids: fileid.length ? [...fileid] : '',
  22821. model: 'gpt-4o-2024-11-20',
  22822. temperature: this.mode == 3 ? 0.5 : 0.1,
  22823. }
  22824. // let params = JSON.stringify({
  22825. // message: {
  22826. // anthropic_version: "bedrock-2023-05-31",
  22827. // max_tokens: 4096,
  22828. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22829. // top_p: 1,
  22830. // messages: [{
  22831. // "role": "user",
  22832. // "content": messages
  22833. // }] ,
  22834. // },
  22835. // uid: _uuid,
  22836. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22837. // });
  22838. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22839. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22840. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22841. console.log(response);
  22842. // let data = response.data.FunctionResponse
  22843. // if (data.choices && data.choices.length && data.choices[0].message) {
  22844. // console.log(data.choices[0].message.content);
  22845. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22846. // _this.$forceUpdate()
  22847. // }
  22848. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22849. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22850. } else {
  22851. _this.$message.warning(response.data.FunctionResponse.result);
  22852. }
  22853. }).catch(function (error) {
  22854. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  22855. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  22856. if(error && error.message != 'Request canceled by the user.'){
  22857. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22858. }
  22859. console.log(error);
  22860. });
  22861. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  22862. },
  22863. aiDetail2getAiContent(_uid, loading, _tindex2) {
  22864. let _source;
  22865. try {
  22866. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22867. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22868. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22869. } catch(error) {
  22870. console.log('EventSource error:', error);
  22871. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22872. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22873. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22874. return;
  22875. }
  22876. let _allText = "";
  22877. let _mdText = "";
  22878. let _iindex = 0
  22879. _source.onmessage = _e => {
  22880. let _eData = JSON.parse(_e.data).content;
  22881. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22882. //对话已经完成
  22883. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22884. _source.close();
  22885. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22886. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22887. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22888. return;
  22889. } else {
  22890. _iindex++
  22891. //对话还在继续
  22892. let _text = "";
  22893. _text = _eData.replaceAll("'", "");
  22894. if (_allText == "") {
  22895. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22896. } else {
  22897. _allText += _text;
  22898. }
  22899. _mdText = _allText + "_";
  22900. _mdText = _mdText.replace(/\\n/g, "\n");
  22901. _mdText = _mdText.replace(/\\/g, "");
  22902. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22903. //转化返回的回复流数据
  22904. if(_iindex == 10){
  22905. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22906. _iindex = 0
  22907. }
  22908. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22909. // 处理流数据
  22910. }
  22911. // this.$forceUpdate();
  22912. };
  22913. let _this = this
  22914. _source.onerror = function(event) {
  22915. // 处理错误,可以尝试重新连接
  22916. console.log('EventSource error:', event);
  22917. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22918. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  22919. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  22920. _source.close();
  22921. };
  22922. },
  22923. async aiDetail3(msg, index, tindex) {
  22924. let _this = this
  22925. const _tindex = 'task-' + index + tindex
  22926. const _tindex2 = index
  22927. const _tindex3 = tindex
  22928. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22929. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22930. if (_this.infoData.length) {
  22931. for (var i = 0; i < _this.infoData.length; i++) {
  22932. if(_this.infoData[i].fileid){
  22933. fileid.push(_this.infoData[i].fileid)
  22934. }else {
  22935. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22936. if(_fileid){
  22937. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22938. _this.$forceUpdate();
  22939. if(_fileid != 1){
  22940. fileid.push(_fileid)
  22941. }
  22942. }
  22943. }
  22944. }
  22945. }
  22946. let tool = _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]
  22947. let appJson = _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].appJson
  22948. // **重点考虑该任务及工具名和工具内容的情况下*
  22949. let messages = `NOTICE
  22950. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22951. Language: ${this.getLang()}
  22952. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22953. Instruction: Based on the context, follow "Format example", write content.
  22954. #Context
  22955. ## 参考内容
  22956. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22957. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22958. 工具名称:${_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 : '无'}
  22959. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  22960. ${tool == 72 && appJson && appJson.name && `应用名称:${appJson.name}`}
  22961. ${tool == 72 && appJson && appJson.detail && `应用描述:${appJson.detail}`}
  22962. ## 要求
  22963. ${msg} 输出格式和内容要求参考#格式与要求
  22964. # Format example
  22965. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  22966. _this.taskDetailLoading3.push(_tindex)
  22967. _this.ttaskDetailLoading3.push(_tindex)
  22968. let _uuid = uuidv4();
  22969. // let params = JSON.stringify({
  22970. // // "model": "Chat",
  22971. // model: 'gpt-3.5-turbo',
  22972. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22973. // max_tokens: 4096,
  22974. // top_p: 1,
  22975. // frequency_penalty: 0,
  22976. // presence_penalty: 0,
  22977. // messages: [{
  22978. // content: messages,
  22979. // role: 'user'
  22980. // }],
  22981. // uid: _uuid,
  22982. // mind_map_question: "",
  22983. // })
  22984. let params = {
  22985. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22986. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22987. session_name: _uuid,
  22988. userId: _this.userid,
  22989. uid: _uuid,
  22990. file_ids: fileid.length ? [...fileid] : '',
  22991. model: 'gpt-4o-2024-11-20',
  22992. temperature: this.mode == 3 ? 0.5 : 0.1,
  22993. }
  22994. // let params = JSON.stringify({
  22995. // message: {
  22996. // anthropic_version: "bedrock-2023-05-31",
  22997. // max_tokens: 4096,
  22998. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22999. // top_p: 1,
  23000. // messages: [{
  23001. // "role": "user",
  23002. // "content": messages
  23003. // }] ,
  23004. // },
  23005. // uid: _uuid,
  23006. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23007. // });
  23008. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23009. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23010. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23011. console.log(response);
  23012. let data = response.data.FunctionResponse
  23013. // if (data.choices && data.choices.length && data.choices[0].message) {
  23014. // console.log(data.choices[0].message.content);
  23015. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  23016. // _this.$forceUpdate()
  23017. // }
  23018. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  23019. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23020. } else {
  23021. _this.$message.warning(response.data.FunctionResponse.result);
  23022. }
  23023. }).catch(function (error) {
  23024. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  23025. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  23026. if(error && error.message != 'Request canceled by the user.'){
  23027. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23028. }
  23029. console.log(error);
  23030. });
  23031. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  23032. },
  23033. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  23034. let _source;
  23035. try {
  23036. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23037. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23038. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23039. } catch(error) {
  23040. console.log('EventSource error:', event);
  23041. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23042. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23043. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  23044. return;
  23045. }
  23046. let _allText = "";
  23047. let _mdText = "";
  23048. let _iindex = 0
  23049. _source.onmessage = _e => {
  23050. let _eData = JSON.parse(_e.data).content;
  23051. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23052. //对话已经完成
  23053. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23054. _source.close();
  23055. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  23056. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  23057. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  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.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  23076. _iindex = 0
  23077. }
  23078. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  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.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  23089. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  23090. _source.close();
  23091. };
  23092. },
  23093. async aiDetail4(msg, index) {
  23094. if (!msg.length) {
  23095. this.$message.error("请添加评价后才能优化")
  23096. return
  23097. }
  23098. let _this = this
  23099. const _tindex = 'task-' + index
  23100. const _tindex2 = index
  23101. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23102. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23103. if (_this.infoData.length) {
  23104. for (var i = 0; i < _this.infoData.length; i++) {
  23105. if(_this.infoData[i].fileid){
  23106. fileid.push(_this.infoData[i].fileid)
  23107. }else {
  23108. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23109. if(_fileid){
  23110. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23111. _this.$forceUpdate();
  23112. if(_fileid != 1){
  23113. fileid.push(_fileid)
  23114. }
  23115. }
  23116. }
  23117. }
  23118. }
  23119. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  23120. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  23121. if(_this.pingjiaInfoData[index][i].fileid){
  23122. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  23123. }
  23124. }
  23125. }
  23126. var _text = ""
  23127. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  23128. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  23129. // _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 : ''} `
  23130. _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 : ''} `
  23131. }
  23132. }
  23133. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  23134. // **重点考虑该任务详情**
  23135. // let messages = `
  23136. // Language: ${this.getLang()}
  23137. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23138. // #Context
  23139. // ## 参考内容
  23140. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23141. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23142. // 评价设计:${_text}
  23143. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23144. // ## 要求
  23145. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  23146. // # 格式与要求
  23147. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  23148. // # Format example
  23149. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  23150. let messages = `
  23151. Language: ${this.getLang()}
  23152. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23153. #Context
  23154. ## 参考内容
  23155. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23156. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23157. ${_text ? '评价设计:'+_text : ''}
  23158. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23159. ## 要求
  23160. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  23161. # 格式与要求
  23162. 核心素养:从教案中提取
  23163. 目标:从教案中提取
  23164. 评价标准:从教案中提取评价标准
  23165. # Format example
  23166. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  23167. _this.taskDetailLoading4.push(_tindex)
  23168. // let params = JSON.stringify({
  23169. // // "model": "Chat",
  23170. // model: 'gpt-3.5-turbo',
  23171. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23172. // max_tokens: 4096,
  23173. // top_p: 1,
  23174. // frequency_penalty: 0,
  23175. // presence_penalty: 0,
  23176. // messages: [{
  23177. // content: messages,
  23178. // role: 'user'
  23179. // }],
  23180. // stream: false,
  23181. // uid: this.userid,
  23182. // mind_map_question: "",
  23183. // })
  23184. let params = {
  23185. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  23186. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23187. session_name: uuidv4(),
  23188. userId: _this.userid,
  23189. file_ids: fileid.length ? [...fileid] : '',
  23190. model: 'gpt-4o-2024-11-20',
  23191. temperature: this.mode == 3 ? 0.5 : 0.1,
  23192. }
  23193. // let params = JSON.stringify({
  23194. // message: {
  23195. // anthropic_version: "bedrock-2023-05-31",
  23196. // max_tokens: 4096,
  23197. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23198. // top_p: 1,
  23199. // messages: [{
  23200. // content: messages,
  23201. // role: 'user'
  23202. // }], //
  23203. // },
  23204. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23205. // });
  23206. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23207. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  23208. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  23209. console.log(response);
  23210. let data = response.data.FunctionResponse
  23211. // if (data.choices && data.choices.length && data.choices[0].message) {
  23212. // console.log(data.choices[0].message.content);
  23213. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  23214. // _this.$forceUpdate()
  23215. // }
  23216. if (data.message) {
  23217. console.log(data.message);
  23218. try {
  23219. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  23220. } catch (e) {
  23221. console.log("error_________________" + e);
  23222. // _this.$message.error(data.message)
  23223. try {
  23224. let regex = new RegExp(/```json([\s\S]*?)```/);
  23225. let match = data.message.match(regex);
  23226. let elist = JSON.parse(match[1])
  23227. elist = elist.filter(el=>{
  23228. el.isai = 1
  23229. return el
  23230. })
  23231. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  23232. // var message = data.message;
  23233. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  23234. // var jsonEnd = message.indexOf("```", jsonStart);
  23235. // if (jsonStart !== -1 && jsonEnd !== -1) {
  23236. // var jsonString = message
  23237. // .substring(jsonStart, jsonEnd)
  23238. // .trim();
  23239. // var _data2 = JSON.parse(jsonString);
  23240. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  23241. // }
  23242. } catch (error) {
  23243. }
  23244. }
  23245. _this.$forceUpdate()
  23246. }
  23247. // if (data.result) {
  23248. // console.log(data.result);
  23249. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  23250. // _this.$forceUpdate()
  23251. // }
  23252. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23253. }).catch(function (error) {
  23254. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23255. if(error && error.message != 'Request canceled by the user.'){
  23256. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23257. }
  23258. console.log(error);
  23259. });
  23260. },
  23261. async aiDetail5(msg, index) {
  23262. let _this = this
  23263. const _tindex = 'task-' + index
  23264. const _tindex2 = index
  23265. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23266. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23267. if (_this.infoData.length) {
  23268. for (var i = 0; i < _this.infoData.length; i++) {
  23269. if(_this.infoData[i].fileid){
  23270. fileid.push(_this.infoData[i].fileid)
  23271. }else {
  23272. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23273. if(_fileid){
  23274. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23275. _this.$forceUpdate();
  23276. if(_fileid != 1){
  23277. fileid.push(_fileid)
  23278. }
  23279. }
  23280. }
  23281. }
  23282. }
  23283. let url = []
  23284. if (this.infoData.length) {
  23285. for (var i = 0; i < this.infoData.length; i++) {
  23286. url.push(this.infoData[i].url)
  23287. }
  23288. }
  23289. var _text = ""
  23290. var _text2 = ""
  23291. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  23292. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23293. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23294. }
  23295. let messages = `
  23296. Language: ${this.getLang()}
  23297. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23298. --------
  23299. ## 要求
  23300. ${msg}
  23301. -------
  23302. ## 本教案描述
  23303. ${_this.aiCallBack}
  23304. -------
  23305. ## 课程大纲
  23306. ${_text}
  23307. -------
  23308. ## 其他教学任务教案
  23309. ${_text2}`
  23310. // ## 补充参考资料
  23311. // - 补充资料:${url.join(",")}
  23312. // - 补充描述:${this.courseText2}
  23313. _this.taskDetailLoading5.push(_tindex)
  23314. _this.ttaskDetailLoading5.push(_tindex)
  23315. let _uuid = uuidv4();
  23316. // let params = JSON.stringify({
  23317. // // "model": "Chat",
  23318. // model: 'gpt-3.5-turbo',
  23319. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23320. // max_tokens: 4096,
  23321. // top_p: 1,
  23322. // frequency_penalty: 0,
  23323. // presence_penalty: 0,
  23324. // messages: [{
  23325. // content: messages,
  23326. // role: 'user'
  23327. // }],
  23328. // uid: _uuid,
  23329. // mind_map_question: "",
  23330. // })
  23331. let params = {
  23332. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23333. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23334. session_name: _uuid,
  23335. userId: _this.userid,
  23336. uid: _uuid,
  23337. file_ids: fileid.length ? [...fileid] : '',
  23338. model: 'gpt-4o-2024-11-20',
  23339. temperature: this.mode == 3 ? 0.5 : 0.1,
  23340. }
  23341. // let params = JSON.stringify({
  23342. // message: {
  23343. // anthropic_version: "bedrock-2023-05-31",
  23344. // max_tokens: 4096,
  23345. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23346. // top_p: 1,
  23347. // messages: [{
  23348. // "role": "user",
  23349. // "content": messages
  23350. // }] ,
  23351. // },
  23352. // uid: _uuid,
  23353. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23354. // });
  23355. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23356. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23357. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23358. console.log(response);
  23359. // let data = response.data.FunctionResponse
  23360. // if (data.choices && data.choices.length && data.choices[0].message) {
  23361. // console.log(data.choices[0].message.content);
  23362. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23363. // _this.$forceUpdate()
  23364. // }
  23365. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23366. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23367. } else {
  23368. _this.$message.warning(response.data.FunctionResponse.result);
  23369. }
  23370. }).catch(function (error) {
  23371. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23372. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23373. }
  23374. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23375. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23376. }
  23377. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23378. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23379. if(error && error.message != 'Request canceled by the user.'){
  23380. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23381. }
  23382. console.log(error);
  23383. });
  23384. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  23385. },
  23386. aiDetail5getAiContent(_uid, loading, _tindex2) {
  23387. let _source;
  23388. try {
  23389. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23390. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23391. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23392. } catch(error){
  23393. console.log('EventSource error:', error);
  23394. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23395. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23396. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23397. }
  23398. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23399. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23400. }
  23401. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23402. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23403. return;
  23404. }
  23405. let _allText = "";
  23406. let _mdText = "";
  23407. let _iindex = 0
  23408. _source.onmessage = _e => {
  23409. let _eData = JSON.parse(_e.data).content;
  23410. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23411. //对话已经完成
  23412. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23413. _source.close();
  23414. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23415. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23416. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23417. }
  23418. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23419. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23420. }
  23421. return;
  23422. } else {
  23423. _iindex++
  23424. //对话还在继续
  23425. let _text = "";
  23426. _text = _eData.replaceAll("'", "");
  23427. if (_allText == "") {
  23428. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23429. } else {
  23430. _allText += _text;
  23431. }
  23432. _mdText = _allText + "_";
  23433. _mdText = _mdText.replace(/\\n/g, "\n");
  23434. _mdText = _mdText.replace(/\\/g, "");
  23435. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23436. //转化返回的回复流数据
  23437. if(_iindex == 10){
  23438. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23439. _iindex = 0
  23440. }
  23441. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23442. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23443. }
  23444. // 处理流数据
  23445. }
  23446. // this.$forceUpdate();
  23447. };
  23448. let _this = this
  23449. _source.onerror = function(event) {
  23450. // 处理错误,可以尝试重新连接
  23451. console.log('EventSource error:', event);
  23452. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23453. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23454. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23455. }
  23456. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23457. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23458. }
  23459. _source.close();
  23460. };
  23461. },
  23462. async aiDetail52(msg, index, callback) {
  23463. let _this = this
  23464. const _tindex = 'task-' + index
  23465. const _tindex2 = index
  23466. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23467. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23468. if (_this.infoData.length) {
  23469. for (var i = 0; i < _this.infoData.length; i++) {
  23470. if(_this.infoData[i].fileid){
  23471. fileid.push(_this.infoData[i].fileid)
  23472. }else {
  23473. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23474. if(_fileid){
  23475. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23476. _this.$forceUpdate();
  23477. if(_fileid != 1){
  23478. fileid.push(_fileid)
  23479. }
  23480. }
  23481. }
  23482. }
  23483. }
  23484. let url = []
  23485. if (this.infoData.length) {
  23486. for (var i = 0; i < this.infoData.length; i++) {
  23487. url.push(this.infoData[i].url)
  23488. }
  23489. }
  23490. let taskN = []
  23491. let taskD = []
  23492. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  23493. if(_tindex2 != ti){
  23494. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  23495. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  23496. }
  23497. }
  23498. let messages = `NOTICE
  23499. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23500. Language: ${this.getLang()}
  23501. ATTENTION: follow "Language"
  23502. #Context
  23503. ## 要求
  23504. ${msg}
  23505. ## 补充描述
  23506. 课程简要描述:${_this.courseText}
  23507. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23508. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  23509. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  23510. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23511. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  23512. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23513. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23514. `
  23515. // ## 补充参考资料
  23516. // - 补充资料:${url.join(",")}
  23517. // - 补充描述:${this.courseText2}
  23518. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  23519. _this.taskDetailLoading5.push(_tindex)
  23520. }
  23521. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  23522. _this.ttaskDetailLoading5.push(_tindex)
  23523. }
  23524. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  23525. let _uuid = uuidv4();
  23526. // let params = JSON.stringify({
  23527. // // "model": "Chat",
  23528. // model: 'gpt-3.5-turbo',
  23529. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23530. // max_tokens: 4096,
  23531. // top_p: 1,
  23532. // frequency_penalty: 0,
  23533. // presence_penalty: 0,
  23534. // messages: [{
  23535. // content: messages,
  23536. // role: 'user'
  23537. // }],
  23538. // uid: _uuid,
  23539. // mind_map_question: "",
  23540. // })
  23541. let params = {
  23542. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23543. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23544. session_name: _uuid,
  23545. userId: _this.userid,
  23546. uid: _uuid,
  23547. file_ids: fileid.length ? [...fileid] : '',
  23548. model: 'gpt-4o-2024-11-20',
  23549. temperature: this.mode == 3 ? 0.5 : 0.1,
  23550. }
  23551. // let params = JSON.stringify({
  23552. // message: {
  23553. // anthropic_version: "bedrock-2023-05-31",
  23554. // max_tokens: 4096,
  23555. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23556. // top_p: 1,
  23557. // messages: [{
  23558. // "role": "user",
  23559. // "content": messages
  23560. // }] ,
  23561. // },
  23562. // uid: _uuid,
  23563. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23564. // });
  23565. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23566. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  23567. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23568. console.log(response);
  23569. // let data = response.data.FunctionResponse
  23570. // if (data.choices && data.choices.length && data.choices[0].message) {
  23571. // console.log(data.choices[0].message.content);
  23572. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23573. // _this.$forceUpdate()
  23574. // }
  23575. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23576. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23577. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  23578. } else {
  23579. _this.$message.warning(response.data.FunctionResponse.result);
  23580. }
  23581. _this.isTeacherTaskCancelToken2[index] = null
  23582. }).catch(function (error) {
  23583. if(error && error.message != 'Request canceled by the user.'){
  23584. _this.isTeacherTaskCancelToken2[index] = null
  23585. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23586. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23587. }
  23588. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23589. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23590. }
  23591. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23592. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23593. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23594. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23595. confirmButtonText: "确定",
  23596. cancelButtonText: "取消",
  23597. distinguishCancelAndClose: true,
  23598. type: "warning",
  23599. customClass: 'custom-confirm-box'
  23600. })
  23601. .then(() => {
  23602. _this.aiDetail52(msg, index, callback)
  23603. }).catch((v) => {
  23604. console.log(v);
  23605. callback ? callback() : ''
  23606. })
  23607. setTimeout(() => {
  23608. _this.setTipsIndex()
  23609. }, 500)
  23610. }
  23611. console.log(error);
  23612. });
  23613. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  23614. },
  23615. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  23616. try {
  23617. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23618. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23619. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23620. } catch(error) {
  23621. console.log('EventSource error:', error);
  23622. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23623. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23624. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23625. }
  23626. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23627. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23628. }
  23629. this.isTeacherTaskCancelToken2[_tindex2] = null
  23630. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23631. confirmButtonText: "确定",
  23632. cancelButtonText: "取消",
  23633. distinguishCancelAndClose: true,
  23634. type: "warning",
  23635. customClass: 'custom-confirm-box'
  23636. })
  23637. .then(() => {
  23638. _this.aiDetail52(msg, _tindex2, callback)
  23639. }).catch((v) => {
  23640. console.log(v);
  23641. callback ? callback() : ''
  23642. })
  23643. setTimeout(() => {
  23644. _this.setTipsIndex()
  23645. }, 500)
  23646. return;
  23647. }
  23648. let _allText = "";
  23649. let _mdText = "";
  23650. this.allTextArray[_tindex2] = ""
  23651. let _iindex = 0
  23652. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  23653. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  23654. let _eData = JSON.parse(_e.data).content;
  23655. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23656. //对话已经完成
  23657. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23658. this.isTeacherTaskCancelSource[_tindex2].close();
  23659. this.isTeacherTaskCancelSource[_tindex2] = null;
  23660. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23661. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23662. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23663. }
  23664. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23665. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23666. }
  23667. this.isTeacherTaskCancelToken2[_tindex2] = null
  23668. callback ? callback() : ''
  23669. // this.createTeacherAn(_tindex2, 2);
  23670. this.saveCourse()
  23671. return;
  23672. } else {
  23673. _iindex++
  23674. //对话还在继续
  23675. let _text = "";
  23676. _text = _eData.replaceAll("'", "");
  23677. if (_allText == "") {
  23678. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23679. } else {
  23680. _allText += _text;
  23681. }
  23682. _mdText = _allText + "_";
  23683. _mdText = _mdText.replace(/\\n/g, "\n");
  23684. _mdText = _mdText.replace(/\\/g, "");
  23685. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23686. //转化返回的回复流数据
  23687. if(_iindex == 10){
  23688. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23689. _iindex = 0
  23690. }
  23691. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23692. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23693. }
  23694. // 处理流数据
  23695. }
  23696. };
  23697. let _this = this
  23698. _this.isTeacherTaskCancelSource.onerror = function(event) {
  23699. // 处理错误,可以尝试重新连接
  23700. console.log('EventSource error:', event);
  23701. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23702. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23703. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23704. }
  23705. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23706. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23707. }
  23708. _this.isTeacherTaskCancelSource[_tindex2].close();
  23709. _this.isTeacherTaskCancelSource[_tindex2] = null;
  23710. _this.isTeacherTaskCancelToken2[_tindex2] = null
  23711. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23712. confirmButtonText: "确定",
  23713. cancelButtonText: "取消",
  23714. distinguishCancelAndClose: true,
  23715. type: "warning",
  23716. customClass: 'custom-confirm-box'
  23717. })
  23718. .then(() => {
  23719. _this.aiDetail52(msg, _tindex2, callback)
  23720. }).catch((v) => {
  23721. console.log(v);
  23722. callback ? callback() : ''
  23723. })
  23724. setTimeout(() => {
  23725. _this.setTipsIndex()
  23726. }, 500)
  23727. };
  23728. },
  23729. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  23730. let _mdText = "";
  23731. let _eData = JSON.parse(_e.data).content;
  23732. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23733. //对话已经完成
  23734. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23735. _source.close();
  23736. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23737. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23738. return;
  23739. } else {
  23740. //对话还在继续
  23741. let _text = "";
  23742. _text = _eData.replaceAll("'", "");
  23743. if (this.allTextArray[_tindex2] == "") {
  23744. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23745. } else {
  23746. this.allTextArray[_tindex2] += _text;
  23747. }
  23748. _mdText = this.allTextArray[_tindex2] + "_";
  23749. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  23750. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  23751. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  23752. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  23753. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23754. // 处理流数据
  23755. }
  23756. },
  23757. async aiCpote(msg, callback) {
  23758. let _this = this
  23759. let _index = _this.aitype.replace("aiC","c")
  23760. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23761. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23762. if (_this.infoData.length) {
  23763. for (var i = 0; i < _this.infoData.length; i++) {
  23764. if(_this.infoData[i].fileid){
  23765. fileid.push(_this.infoData[i].fileid)
  23766. }else {
  23767. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23768. if(_fileid){
  23769. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23770. _this.$forceUpdate();
  23771. if(_fileid != 1){
  23772. fileid.push(_fileid)
  23773. }
  23774. }
  23775. }
  23776. }
  23777. }
  23778. let sub = []
  23779. if (this.courseTypeId.length) {
  23780. for (var i = 0; i < this.courseTypeId.length; i++) {
  23781. let _sid = this.courseTypeId[i]
  23782. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23783. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23784. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23785. }
  23786. }
  23787. }
  23788. }
  23789. let mclass = []
  23790. if (this.courseTypeId.length) {
  23791. for (var i = 0; i < this.courseTypeId.length; i++) {
  23792. let _sid = this.courseTypeId[i]
  23793. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23794. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23795. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23796. }
  23797. }
  23798. }
  23799. }
  23800. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  23801. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  23802. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  23803. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  23804. let messages = `NOTICE
  23805. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23806. Language: ${this.getLang()}
  23807. ATTENTION: follow "Language"
  23808. ${msg}
  23809. ## 课程简介
  23810. 课程名字:${this.courseName}
  23811. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23812. ${sub.length ? '学科:' + sub.join(",") : ''}
  23813. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23814. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23815. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  23816. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  23817. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  23818. _this.cpoteLoading[_index] = true
  23819. _this.cpotetLoading[_index] = true
  23820. let _uuid = uuidv4();
  23821. // let params = JSON.stringify({
  23822. // // "model": "Chat",
  23823. // model: 'gpt-3.5-turbo',
  23824. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23825. // max_tokens: 4096,
  23826. // top_p: 1,
  23827. // frequency_penalty: 0,
  23828. // presence_penalty: 0,
  23829. // messages: [{
  23830. // content: messages,
  23831. // role: 'user'
  23832. // }],
  23833. // uid: _uuid,
  23834. // mind_map_question: "",
  23835. // })
  23836. let params = {
  23837. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23838. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23839. session_name: _uuid,
  23840. userId: _this.userid,
  23841. uid: _uuid,
  23842. file_ids: fileid.length ? [...fileid] : '',
  23843. model: 'gpt-4o-2024-11-20',
  23844. temperature: this.mode == 3 ? 0.5 : 0.1,
  23845. }
  23846. // let params = JSON.stringify({
  23847. // message: {
  23848. // anthropic_version: "bedrock-2023-05-31",
  23849. // max_tokens: 4096,
  23850. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23851. // top_p: 1,
  23852. // messages: [{
  23853. // "role": "user",
  23854. // "content": messages
  23855. // }] ,
  23856. // },
  23857. // uid: _uuid,
  23858. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23859. // });
  23860. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23861. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23862. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23863. console.log(response);
  23864. // let data = response.data.FunctionResponse
  23865. // if (data.choices && data.choices.length && data.choices[0].message) {
  23866. // console.log(data.choices[0].message.content);
  23867. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23868. // _this.$forceUpdate()
  23869. // }
  23870. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23871. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23872. } else {
  23873. _this.$message.warning(response.data.FunctionResponse.result);
  23874. }
  23875. }).catch(function (error) {
  23876. _this.cpoteLoading[_index] = false
  23877. _this.cpotetLoading[_index] = false
  23878. callback ? callback() : ''
  23879. if(error && error.message != 'Request canceled by the user.'){
  23880. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23881. }
  23882. console.log(error);
  23883. });
  23884. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  23885. },
  23886. aiCpotegetAiContent(_uid, loading, callback) {
  23887. let _source;
  23888. try {
  23889. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23890. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23891. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23892. } catch(error){
  23893. console.log('EventSource error:', error);
  23894. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23895. this.cpoteLoading[loading] = false
  23896. this.cpotetLoading[loading] = false
  23897. return;
  23898. }
  23899. let _allText = "";
  23900. let _mdText = "";
  23901. let _iindex = 0
  23902. _source.onmessage = _e => {
  23903. let _eData = JSON.parse(_e.data).content;
  23904. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23905. //对话已经完成
  23906. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23907. _source.close();
  23908. this.cpote[loading] = _mdText;
  23909. this.cpoteLoading[loading] = false
  23910. this.cpotetLoading[loading] = false
  23911. callback ? callback() : ''
  23912. this.saveCourse()
  23913. return;
  23914. } else {
  23915. _iindex++
  23916. //对话还在继续
  23917. let _text = "";
  23918. _text = _eData.replaceAll("'", "");
  23919. if (_allText == "") {
  23920. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23921. } else {
  23922. _allText += _text;
  23923. }
  23924. _mdText = _allText + "_";
  23925. _mdText = _mdText.replace(/\\n/g, "\n");
  23926. _mdText = _mdText.replace(/\\/g, "");
  23927. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23928. //转化返回的回复流数据
  23929. if(_iindex == 10){
  23930. this.cpote[loading] = _mdText;
  23931. _iindex = 0
  23932. }
  23933. this.cpoteLoading[loading] = false
  23934. // 处理流数据
  23935. }
  23936. // this.$forceUpdate();
  23937. };
  23938. let _this = this
  23939. _source.onerror = function(event) {
  23940. // 处理错误,可以尝试重新连接
  23941. console.log('EventSource error:', event);
  23942. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23943. _this.cpoteLoading[loading] = false
  23944. _this.cpotetLoading[loading] = false
  23945. _source.close();
  23946. };
  23947. },
  23948. async aiteacherTextDetail(msg) {
  23949. let _this = this
  23950. let fileid = []
  23951. if (_this.teacherInfoData.length) {
  23952. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  23953. if(_this.teacherInfoData[i].fileid){
  23954. fileid.push(_this.teacherInfoData[i].fileid)
  23955. }else {
  23956. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  23957. if(_fileid){
  23958. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23959. _this.$forceUpdate();
  23960. if(_fileid != 1){
  23961. fileid.push(_fileid)
  23962. }
  23963. }
  23964. }
  23965. }
  23966. }
  23967. _this.teacherTextLoading = true
  23968. _this.tteacherTextLoading = true
  23969. let sub = []
  23970. if (_this.courseTypeId.length) {
  23971. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23972. let _sid = _this.courseTypeId[i]
  23973. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23974. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23975. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23976. }
  23977. }
  23978. }
  23979. }
  23980. let mclass = []
  23981. if (_this.courseTypeId.length) {
  23982. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23983. let _sid = _this.courseTypeId[i]
  23984. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23985. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23986. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23987. }
  23988. }
  23989. }
  23990. }
  23991. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  23992. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  23993. let messages = `NOTICE
  23994. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23995. Language: ${this.getLang()}
  23996. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23997. Instruction: Based on the context, follow "Format example", write content.
  23998. #Context
  23999. ## 参考资料
  24000. 课程名字:${this.courseName}
  24001. ${sub.length ? '学科:' + sub.join(",") : ''}
  24002. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24003. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  24004. ## 要求
  24005. ${msg}
  24006. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24007. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  24008. let _uuid = uuidv4();
  24009. // let params = JSON.stringify({
  24010. // // "model": "Chat",
  24011. // model: 'gpt-3.5-turbo',
  24012. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24013. // max_tokens: 4096,
  24014. // top_p: 1,
  24015. // frequency_penalty: 0,
  24016. // presence_penalty: 0,
  24017. // messages: [{
  24018. // content: messages,
  24019. // role: 'user'
  24020. // }],
  24021. // uid: _uuid,
  24022. // mind_map_question: "",
  24023. // })
  24024. let params = {
  24025. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24026. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24027. session_name: _uuid,
  24028. userId: _this.userid,
  24029. uid: _uuid,
  24030. file_ids: fileid.length ? [...fileid] : '',
  24031. model: 'gpt-4o-2024-11-20',
  24032. temperature: this.mode == 3 ? 0.5 : 0.1,
  24033. }
  24034. // let params = JSON.stringify({
  24035. // message: {
  24036. // anthropic_version: "bedrock-2023-05-31",
  24037. // max_tokens: 4096,
  24038. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24039. // top_p: 1,
  24040. // messages: [{
  24041. // "role": "user",
  24042. // "content": messages
  24043. // }] ,
  24044. // },
  24045. // uid: _uuid,
  24046. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24047. // });
  24048. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24049. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  24050. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24051. console.log(response);
  24052. // let data = response.data.FunctionResponse
  24053. // if (data.choices && data.choices.length && data.choices[0].message) {
  24054. // _this.courseText = data.choices[0].message.content
  24055. // }
  24056. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24057. } else {
  24058. _this.$message.warning(response.data.FunctionResponse.result);
  24059. }
  24060. _this.isTeacherTextCancelToken = null
  24061. }).catch(function (error) {
  24062. _this.teacherTextLoading = false
  24063. _this.tteacherTextLoading = false
  24064. _this.isTeacherTextCancelToken = null
  24065. if(error && error.message != 'Request canceled by the user.'){
  24066. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24067. }
  24068. console.log(error);
  24069. });
  24070. await _this.aiteacherTextDetailgetAiContent(_uuid)
  24071. },
  24072. aiteacherTextDetailgetAiContent(_uid) {
  24073. try {
  24074. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24075. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24076. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24077. } catch(error) {
  24078. console.log('EventSource error:', event);
  24079. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24080. this.teacherTextLoading = false
  24081. this.tteacherTextLoading = false
  24082. this.isTeacherTextCancelToken = null
  24083. return;
  24084. }
  24085. let _allText = "";
  24086. let _mdText = "";
  24087. let _iindex = 0
  24088. this.isTeacherTextCancelSource.onmessage = _e => {
  24089. let _eData = JSON.parse(_e.data).content;
  24090. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24091. //对话已经完成
  24092. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24093. this.isTeacherTextCancelSource.close();
  24094. this.isTeacherTextCancelSource = null;
  24095. this.teacherCourseText = _mdText;
  24096. this.teacherTextLoading = false
  24097. this.tteacherTextLoading = false
  24098. this.teacherCourseTextB = false
  24099. this.isTeacherTextCancelToken = null
  24100. return;
  24101. } else {
  24102. _iindex++
  24103. //对话还在继续
  24104. let _text = "";
  24105. _text = _eData.replaceAll("'", "");
  24106. if (_allText == "") {
  24107. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24108. } else {
  24109. _allText += _text;
  24110. }
  24111. _mdText = _allText + "_";
  24112. _mdText = _mdText.replace(/\\n/g, "\n");
  24113. _mdText = _mdText.replace(/\\/g, "");
  24114. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24115. //转化返回的回复流数据
  24116. if(_iindex == 10){
  24117. this.teacherCourseText = _mdText;
  24118. _iindex = 0
  24119. }
  24120. if(this.teacherTextLoading){
  24121. this.teacherTextLoading = false
  24122. }
  24123. // 处理流数据
  24124. }
  24125. // this.$forceUpdate();
  24126. };
  24127. let _this = this
  24128. this.isTeacherTextCancelSource.onerror = function(event) {
  24129. // 处理错误,可以尝试重新连接
  24130. console.log('EventSource error:', event);
  24131. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24132. _this.teacherTextLoading = false
  24133. _this.tteacherTextLoading = false
  24134. _this.isTeacherTextCancelToken = null
  24135. _this.isTeacherTextCancelSource.close();
  24136. _this.isTeacherTextCancelSource = null;
  24137. };
  24138. },
  24139. async aitargetTextDetail(msg) {
  24140. let _this = this
  24141. let fileid = []
  24142. if (_this.teacherInfoData.length) {
  24143. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  24144. if(_this.teacherInfoData[i].fileid){
  24145. fileid.push(_this.teacherInfoData[i].fileid)
  24146. }else {
  24147. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  24148. if(_fileid){
  24149. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24150. _this.$forceUpdate();
  24151. if(_fileid != 1){
  24152. fileid.push(_fileid)
  24153. }
  24154. }
  24155. }
  24156. }
  24157. }
  24158. _this.targetTextLoading = true
  24159. _this.ttargetTextLoading = true
  24160. let sub = []
  24161. if (_this.courseTypeId.length) {
  24162. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24163. let _sid = _this.courseTypeId[i]
  24164. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24165. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24166. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24167. }
  24168. }
  24169. }
  24170. }
  24171. let mclass = []
  24172. if (_this.courseTypeId.length) {
  24173. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24174. let _sid = _this.courseTypeId[i]
  24175. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24176. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24177. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24178. }
  24179. }
  24180. }
  24181. }
  24182. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  24183. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  24184. let messages = `NOTICE
  24185. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24186. Language: ${this.getLang()}
  24187. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24188. Instruction: Based on the context, follow "Format example", write content.
  24189. #Context
  24190. ## 参考资料
  24191. 课程名字:${this.courseName}
  24192. ${sub.length ? '学科:' + sub.join(",") : ''}
  24193. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24194. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24195. ## 要求
  24196. ${msg}
  24197. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24198. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  24199. let _uuid = uuidv4();
  24200. // let params = JSON.stringify({
  24201. // // "model": "Chat",
  24202. // model: 'gpt-3.5-turbo',
  24203. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24204. // max_tokens: 4096,
  24205. // top_p: 1,
  24206. // frequency_penalty: 0,
  24207. // presence_penalty: 0,
  24208. // messages: [{
  24209. // content: messages,
  24210. // role: 'user'
  24211. // }],
  24212. // uid: _uuid,
  24213. // mind_map_question: "",
  24214. // })
  24215. let params = {
  24216. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24217. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24218. session_name: _uuid,
  24219. userId: _this.userid,
  24220. uid: _uuid,
  24221. file_ids: fileid.length ? [...fileid] : '',
  24222. model: 'gpt-4o-2024-11-20',
  24223. temperature: this.mode == 3 ? 0.5 : 0.1,
  24224. }
  24225. // let params = JSON.stringify({
  24226. // message: {
  24227. // anthropic_version: "bedrock-2023-05-31",
  24228. // max_tokens: 4096,
  24229. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24230. // top_p: 1,
  24231. // messages: [{
  24232. // "role": "user",
  24233. // "content": messages
  24234. // }] ,
  24235. // },
  24236. // uid: _uuid,
  24237. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24238. // });
  24239. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24240. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  24241. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24242. console.log(response);
  24243. // let data = response.data.FunctionResponse
  24244. // if (data.choices && data.choices.length && data.choices[0].message) {
  24245. // _this.courseText = data.choices[0].message.content
  24246. // }
  24247. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24248. } else {
  24249. _this.$message.warning(response.data.FunctionResponse.result);
  24250. }
  24251. _this.isTargetCancelToken1 = null
  24252. }).catch(function (error) {
  24253. _this.targetTextLoading = false
  24254. _this.ttargetTextLoading = false
  24255. _this.isTargetCancelToken1 = null
  24256. if(error && error.message != 'Request canceled by the user.'){
  24257. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24258. }
  24259. console.log(error);
  24260. });
  24261. await _this.aitargetTextDetailgetAiContent(_uuid)
  24262. },
  24263. aitargetTextDetailgetAiContent(_uid) {
  24264. try {
  24265. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24266. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24267. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24268. } catch (error) {
  24269. console.log('EventSource error:', error);
  24270. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24271. this.targetTextLoading = false
  24272. this.ttargetTextLoading = false
  24273. this.isTargetCancelToken1 = null
  24274. return;
  24275. }
  24276. let _allText = "";
  24277. let _mdText = "";
  24278. let _iindex = 0
  24279. this.isTargetCancelSource1.onmessage = _e => {
  24280. let _eData = JSON.parse(_e.data).content;
  24281. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24282. //对话已经完成
  24283. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24284. this.isTargetCancelSource1.close();
  24285. this.isTargetCancelSource1 = null;
  24286. this.targetCourseText = _mdText;
  24287. this.targetTextLoading = false
  24288. this.ttargetTextLoading = false
  24289. this.targetCourseTextB = false
  24290. this.isTargetCancelToken1 = null
  24291. return;
  24292. } else {
  24293. _iindex++
  24294. //对话还在继续
  24295. let _text = "";
  24296. _text = _eData.replaceAll("'", "");
  24297. if (_allText == "") {
  24298. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24299. } else {
  24300. _allText += _text;
  24301. }
  24302. _mdText = _allText + "_";
  24303. _mdText = _mdText.replace(/\\n/g, "\n");
  24304. _mdText = _mdText.replace(/\\/g, "");
  24305. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24306. //转化返回的回复流数据
  24307. if(_iindex == 10){
  24308. this.targetCourseText = _mdText;
  24309. _iindex = 0
  24310. }
  24311. if(this.targetTextLoading){
  24312. this.targetTextLoading = false
  24313. }
  24314. // 处理流数据
  24315. }
  24316. // this.$forceUpdate();
  24317. };
  24318. let _this = this
  24319. this.isTargetCancelSource1.onerror = function(event) {
  24320. // 处理错误,可以尝试重新连接
  24321. console.log('EventSource error:', event);
  24322. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24323. _this.targetTextLoading = false
  24324. _this.ttargetTextLoading = false
  24325. _this.isTargetCancelToken1 = null
  24326. _this.isTargetCancelSource1.close();
  24327. _this.isTargetCancelSource1 = null;
  24328. };
  24329. },
  24330. async aitargetTextDetail2(msg) {
  24331. let _this = this
  24332. let fileid = []
  24333. if(_this.mubiaoInfoData.length){
  24334. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24335. if(_this.mubiaoInfoData[i].fileid){
  24336. fileid.push(_this.mubiaoInfoData[i].fileid)
  24337. }else {
  24338. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24339. if(_fileid){
  24340. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24341. _this.$forceUpdate();
  24342. if(_fileid != 1){
  24343. fileid.push(_fileid)
  24344. }
  24345. }
  24346. }
  24347. }
  24348. }
  24349. _this.targetTextLoading2 = true
  24350. _this.ttargetTextLoading2 = true
  24351. let sub = []
  24352. if (_this.courseTypeId.length) {
  24353. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24354. let _sid = _this.courseTypeId[i]
  24355. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24356. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24357. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24358. }
  24359. }
  24360. }
  24361. }
  24362. let mclass = []
  24363. if (_this.courseTypeId.length) {
  24364. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24365. let _sid = _this.courseTypeId[i]
  24366. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24367. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24368. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24369. }
  24370. }
  24371. }
  24372. }
  24373. if(sub.length){
  24374. let _fileid = _this.importFileid(sub)
  24375. fileid = [...fileid, ..._fileid]
  24376. }
  24377. let messages = `NOTICE
  24378. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24379. Language: ${this.getLang()}
  24380. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24381. Instruction: Based on the context, follow "Format example", write content.
  24382. #Context
  24383. ## 参考资料
  24384. 课程标题:${this.courseName}
  24385. ${sub.length ? '学科:' + sub.join(",") : ''}
  24386. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24387. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24388. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24389. ## 要求
  24390. ${msg}
  24391. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24392. let _uuid = uuidv4();
  24393. // let params = JSON.stringify({
  24394. // // "model": "Chat",
  24395. // model: 'gpt-3.5-turbo',
  24396. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24397. // max_tokens: 4096,
  24398. // top_p: 1,
  24399. // frequency_penalty: 0,
  24400. // presence_penalty: 0,
  24401. // messages: [{
  24402. // content: messages,
  24403. // role: 'user'
  24404. // }],
  24405. // uid: _uuid,
  24406. // mind_map_question: "",
  24407. // })
  24408. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24409. let params = {
  24410. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24411. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24412. session_name: _uuid,
  24413. userId: _this.userid,
  24414. uid: _uuid,
  24415. file_ids: fileid.length ? [...fileid] : '',
  24416. model: 'gpt-4o-2024-11-20',
  24417. temperature: this.mode == 3 ? 0.5 : 0.1,
  24418. }
  24419. // let params = JSON.stringify({
  24420. // message: {
  24421. // anthropic_version: "bedrock-2023-05-31",
  24422. // max_tokens: 4096,
  24423. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24424. // top_p: 1,
  24425. // messages: [{
  24426. // "role": "user",
  24427. // "content": messages
  24428. // }] ,
  24429. // },
  24430. // uid: _uuid,
  24431. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24432. // });
  24433. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24434. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24435. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24436. console.log(response);
  24437. // let data = response.data.FunctionResponse
  24438. // if (data.choices && data.choices.length && data.choices[0].message) {
  24439. // _this.courseText = data.choices[0].message.content
  24440. // }
  24441. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24442. } else {
  24443. _this.$message.warning(response.data.FunctionResponse.result);
  24444. }
  24445. _this.isTargetCancelToken2 = null
  24446. }).catch(function (error) {
  24447. _this.targetTextLoading2 = false
  24448. _this.ttargetTextLoading2 = false
  24449. _this.isTargetCancelToken2 = null
  24450. if(error && error.message != 'Request canceled by the user.'){
  24451. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24452. }
  24453. console.log(error);
  24454. });
  24455. await _this.aitargetTextDetail2getAiContent(_uuid)
  24456. },
  24457. importFileid(sub){
  24458. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  24459. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  24460. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  24461. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  24462. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  24463. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  24464. let _sub = converter(sub.join(","))
  24465. let fileid = []
  24466. for(var i = 0; i < this.fileidArray.length; i++){
  24467. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  24468. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  24469. fileid.push(this.fileidArray[i].fileid)
  24470. }
  24471. }
  24472. }
  24473. return fileid
  24474. },
  24475. selectFileid(){
  24476. let params = {
  24477. oid: this.oid,
  24478. };
  24479. this.ajax
  24480. .get(this.$store.state.api + "selectFileid", params)
  24481. .then((res) => {
  24482. this.fileidArray = res.data[0]
  24483. if(res.data[1].length){
  24484. this.fileidArray = res.data[1]
  24485. }
  24486. if(res.data[2].length){
  24487. this.fileidArray = res.data[2]
  24488. }
  24489. })
  24490. .catch((err) => {
  24491. console.error(err);
  24492. });
  24493. },
  24494. selectAiFileid(){
  24495. let params = {
  24496. oid: this.oid,
  24497. };
  24498. this.ajax
  24499. .get(this.$store.state.api + "selectAiFileid", params)
  24500. .then((res) => {
  24501. let fileIds = []
  24502. for(var i = 0; i < res.data[0].length; i++){
  24503. fileIds.push(res.data[0][i].fileid)
  24504. }
  24505. this.fileIds = fileIds
  24506. if(res.data[1].length){
  24507. fileIds = []
  24508. for(var i = 0; i < res.data[1].length; i++){
  24509. fileIds.push(res.data[0][i].fileid)
  24510. }
  24511. this.fileIds = fileIds
  24512. }
  24513. if(res.data[2].length){
  24514. fileIds = []
  24515. for(var i = 0; i < res.data[2].length; i++){
  24516. fileIds.push(res.data[0][i].fileid)
  24517. }
  24518. this.fileIds = fileIds
  24519. }
  24520. })
  24521. .catch((err) => {
  24522. console.error(err);
  24523. });
  24524. },
  24525. selectKnowFileid(){
  24526. let params = {
  24527. oid: this.oid,
  24528. sta: 'cn'
  24529. };
  24530. this.ajax
  24531. .get(this.$store.state.api + "selectKnowFileid", params)
  24532. .then((res) => {
  24533. this.knowFileArray = res.data[0]
  24534. if(res.data[1].length){
  24535. this.knowFileArray = res.data[1]
  24536. }
  24537. if(res.data[2].length){
  24538. this.knowFileArray = res.data[2]
  24539. }
  24540. })
  24541. .catch((err) => {
  24542. console.error(err);
  24543. });
  24544. },
  24545. async aitargetTextDetail22(msg,msg2) {
  24546. let _this = this
  24547. let fileid = []
  24548. _this.targetTextLoading2 = true
  24549. _this.ttargetTextLoading2 = true
  24550. let sub = []
  24551. if (_this.courseTypeId.length) {
  24552. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24553. let _sid = _this.courseTypeId[i]
  24554. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24555. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24556. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24557. }
  24558. }
  24559. }
  24560. }
  24561. let mclass = []
  24562. if (_this.courseTypeId.length) {
  24563. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24564. let _sid = _this.courseTypeId[i]
  24565. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24566. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24567. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24568. }
  24569. }
  24570. }
  24571. }
  24572. if(!msg2 && sub.length){
  24573. // let _fileid = _this.importFileid(sub)
  24574. // fileid = [...fileid, ..._fileid]
  24575. }
  24576. let messages = `NOTICE
  24577. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24578. Language: ${this.getLang()}
  24579. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24580. Instruction: Based on the context, follow "Format example", write content.
  24581. #Context
  24582. ## 参考资料
  24583. 课程标题:${this.courseName}
  24584. ${sub.length ? '学科:' + sub.join(",") : ''}
  24585. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24586. 课程目标:${msg2}
  24587. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24588. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24589. ## 要求
  24590. ${msg}
  24591. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24592. let _uuid = uuidv4();
  24593. // let params = JSON.stringify({
  24594. // // "model": "Chat",
  24595. // model: 'gpt-3.5-turbo',
  24596. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24597. // max_tokens: 4096,
  24598. // top_p: 1,
  24599. // frequency_penalty: 0,
  24600. // presence_penalty: 0,
  24601. // messages: [{
  24602. // content: messages,
  24603. // role: 'user'
  24604. // }],
  24605. // uid: _uuid,
  24606. // mind_map_question: "",
  24607. // })
  24608. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24609. let params = {
  24610. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  24611. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24612. session_name: _uuid,
  24613. userId: _this.userid,
  24614. uid: _uuid,
  24615. file_ids: fileid.length ? [...fileid] : '',
  24616. model: 'gpt-4o-2024-11-20',
  24617. temperature: this.mode == 3 ? 0.5 : 0.1,
  24618. }
  24619. // let params = JSON.stringify({
  24620. // message: {
  24621. // anthropic_version: "bedrock-2023-05-31",
  24622. // max_tokens: 4096,
  24623. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24624. // top_p: 1,
  24625. // messages: [{
  24626. // "role": "user",
  24627. // "content": messages
  24628. // }] ,
  24629. // },
  24630. // uid: _uuid,
  24631. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24632. // });
  24633. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24634. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24635. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24636. console.log(response);
  24637. // let data = response.data.FunctionResponse
  24638. // if (data.choices && data.choices.length && data.choices[0].message) {
  24639. // _this.courseText = data.choices[0].message.content
  24640. // }
  24641. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24642. } else {
  24643. _this.$message.warning(response.data.FunctionResponse.result);
  24644. }
  24645. _this.isTargetCancelToken2 = null
  24646. }).catch(function (error) {
  24647. _this.targetTextLoading2 = false
  24648. _this.ttargetTextLoading2 = false
  24649. _this.isTargetCancelToken2 = null
  24650. if(error && error.message != 'Request canceled by the user.'){
  24651. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24652. }
  24653. console.log(error);
  24654. });
  24655. await _this.aitargetTextDetail2getAiContent(_uuid)
  24656. },
  24657. aitargetTextDetail2getAiContent(_uid) {
  24658. try {
  24659. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24660. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24661. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24662. } catch(error) {
  24663. console.log('EventSource error:', error);
  24664. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24665. this.targetTextLoading2 = false
  24666. this.ttargetTextLoading2 = false
  24667. this.isTargetCancelToken2 = null
  24668. return;
  24669. }
  24670. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  24671. let _allText = "";
  24672. let _mdText = "";
  24673. let _iindex = 0
  24674. this.isTargetCancelSource2.onmessage = _e => {
  24675. let _eData = JSON.parse(_e.data).content;
  24676. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24677. //对话已经完成
  24678. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24679. this.isTargetCancelSource2.close();
  24680. this.isTargetCancelSource2 = null;
  24681. this.targetCourseText2 = text1+' \n '+_mdText;
  24682. this.targetTextLoading2 = false
  24683. this.ttargetTextLoading2 = false
  24684. this.targetCourseText2B = false
  24685. this.isTargetCancelToken2 = null
  24686. this.saveCourse()
  24687. return;
  24688. } else {
  24689. _iindex++
  24690. //对话还在继续
  24691. let _text = "";
  24692. _text = _eData.replaceAll("'", "");
  24693. if (_allText == "") {
  24694. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24695. } else {
  24696. _allText += _text;
  24697. }
  24698. _mdText = _allText + "_";
  24699. _mdText = _mdText.replace(/\\n/g, "\n");
  24700. _mdText = _mdText.replace(/\\/g, "");
  24701. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24702. //转化返回的回复流数据
  24703. if(_iindex == 10){
  24704. this.targetCourseText2 = text1+' \n '+_mdText;
  24705. _iindex = 0
  24706. }
  24707. if(this.targetTextLoading2){
  24708. this.targetTextLoading2 = false
  24709. }
  24710. // 处理流数据
  24711. }
  24712. // this.$forceUpdate();
  24713. };
  24714. let _this = this
  24715. this.isTargetCancelSource2.onerror = function(event) {
  24716. // 处理错误,可以尝试重新连接
  24717. console.log('EventSource error:', event);
  24718. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24719. _this.targetTextLoading2 = false
  24720. _this.ttargetTextLoading2 = false
  24721. _this.isTargetCancelToken2 = null
  24722. _this.isTargetCancelSource2.close();
  24723. _this.isTargetCancelSource2 = null;
  24724. };
  24725. },
  24726. async aitargetTextDetail3(msg) {
  24727. let _this = this
  24728. let fileid = []
  24729. if(_this.mubiaoInfoData.length){
  24730. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24731. if(_this.mubiaoInfoData[i].fileid){
  24732. fileid.push(_this.mubiaoInfoData[i].fileid)
  24733. }else {
  24734. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24735. if(_fileid){
  24736. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24737. _this.$forceUpdate();
  24738. if(_fileid != 1){
  24739. fileid.push(_fileid)
  24740. }
  24741. }
  24742. }
  24743. }
  24744. }
  24745. _this.targetTextLoading2 = true
  24746. _this.ttargetTextLoading2 = true
  24747. let sub = []
  24748. if (_this.courseTypeId.length) {
  24749. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24750. let _sid = _this.courseTypeId[i]
  24751. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24752. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24753. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24754. }
  24755. }
  24756. }
  24757. }
  24758. let mclass = []
  24759. if (_this.courseTypeId.length) {
  24760. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24761. let _sid = _this.courseTypeId[i]
  24762. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24763. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24764. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24765. }
  24766. }
  24767. }
  24768. }
  24769. // if(sub.length){
  24770. // let _fileid = _this.importFileid(sub)
  24771. // fileid = [...fileid, ..._fileid]
  24772. // }
  24773. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24774. if (_this.infoData.length) {
  24775. for (var i = 0; i < _this.infoData.length; i++) {
  24776. if(_this.infoData[i].fileid){
  24777. fileid.push(_this.infoData[i].fileid)
  24778. }else {
  24779. let _fileid = await _this.createFileid(_this.infoData[i].url)
  24780. if(_fileid){
  24781. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  24782. _this.$forceUpdate();
  24783. if(_fileid != 1){
  24784. fileid.push(_fileid)
  24785. }
  24786. }
  24787. }
  24788. }
  24789. }
  24790. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24791. let messages = `Language: ${this.getLang()}
  24792. ${msg}
  24793. ## 课程信息
  24794. 课程名字:${this.courseName}
  24795. 课程概况:${this.courseText}
  24796. ${sub.length ? '学科:' + sub.join(",") : ''}
  24797. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  24798. let _uuid = uuidv4();
  24799. // let params = JSON.stringify({
  24800. // // "model": "Chat",
  24801. // model: 'gpt-3.5-turbo',
  24802. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24803. // max_tokens: 4096,
  24804. // top_p: 1,
  24805. // frequency_penalty: 0,
  24806. // presence_penalty: 0,
  24807. // messages: [{
  24808. // content: messages,
  24809. // role: 'user'
  24810. // }],
  24811. // uid: _uuid,
  24812. // mind_map_question: "",
  24813. // })
  24814. let params = {
  24815. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24816. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24817. session_name: _uuid,
  24818. userId: _this.userid,
  24819. uid: _uuid,
  24820. file_ids: fileid.length ? [...fileid] : '',
  24821. model: 'gpt-4o-2024-11-20',
  24822. temperature: this.mode == 3 ? 0.5 : 0.1,
  24823. }
  24824. // let params = JSON.stringify({
  24825. // message: {
  24826. // anthropic_version: "bedrock-2023-05-31",
  24827. // max_tokens: 4096,
  24828. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24829. // top_p: 1,
  24830. // messages: [{
  24831. // "role": "user",
  24832. // "content": messages
  24833. // }] ,
  24834. // },
  24835. // uid: _uuid,
  24836. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24837. // });
  24838. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24839. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  24840. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24841. console.log(response);
  24842. // let data = response.data.FunctionResponse
  24843. // if (data.choices && data.choices.length && data.choices[0].message) {
  24844. // _this.courseText = data.choices[0].message.content
  24845. // }
  24846. console.log(response);
  24847. let data = response.data.FunctionResponse
  24848. // if (data.choices && data.choices.length && data.choices[0].message) {
  24849. // console.log(data.choices[0].message.content);
  24850. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  24851. // _this.$forceUpdate()
  24852. // }
  24853. if (data.message) {
  24854. console.log('返回回来的目标:',data.message);
  24855. _this.targetCourseText2 = data.message
  24856. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  24857. }
  24858. _this.isTargetCancelToken2 = null
  24859. }).catch(function (error) {
  24860. _this.targetTextLoading2 = false
  24861. _this.ttargetTextLoading2 = false
  24862. _this.isTargetCancelToken2 = null
  24863. if(error && error.message != 'Request canceled by the user.'){
  24864. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24865. }
  24866. console.log(error);
  24867. });
  24868. },
  24869. againEva(msg, i, k) {
  24870. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  24871. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  24872. return;
  24873. }
  24874. if (this.ruleLoading[i]) {
  24875. this.ruleLoading[i][k] = true
  24876. } else {
  24877. this.ruleLoading[i] = []
  24878. this.ruleLoading[i][k] = true
  24879. }
  24880. let message = `NOTICE
  24881. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  24882. Language: ${this.getLang()}
  24883. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24884. Instruction: Based on the context, follow "Format example", write content.
  24885. #Context
  24886. ##要求
  24887. ${msg}
  24888. ##制定标准资料
  24889. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  24890. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  24891. # Format example
  24892. ==
  24893. 0 星,作业内容与作业要求无关;
  24894. 1 星,没有识别问题和需求;
  24895. 2 星,问题或需求没有被清晰理解或准确识别;
  24896. 3 星,问题或需求的一部分被识别;
  24897. 4 星,问题或需求的大部分被识别;
  24898. 5 星,问题或需求都被识别。
  24899. ==
  24900. `
  24901. // let params = {
  24902. // // "model": "Chat",
  24903. // model: 'gpt-4o-2024-11-20',
  24904. // // model: "gpt-4o",
  24905. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24906. // max_tokens: 4096,
  24907. // top_p: 1,
  24908. // frequency_penalty: 0,
  24909. // presence_penalty: 0,
  24910. // messages: [
  24911. // {
  24912. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  24913. // role: "user"
  24914. // }
  24915. // ],
  24916. // stream: false,
  24917. // uid: this.userid,
  24918. // mind_map_question: ""
  24919. // };
  24920. // this.ajax
  24921. // .post("https://gpt4.cocorobo.cn/chat", params)
  24922. // .then(response => {
  24923. // let data = response.data.FunctionResponse;
  24924. // console.log("data", data);
  24925. // if (data.choices && data.choices.length && data.choices[0].message) {
  24926. // let content = data.choices[0].message.content;
  24927. // var regex = new RegExp('==([^=]+)==');
  24928. // let match = content.match(regex);
  24929. // if (match) {
  24930. // content = match[1].trim().replaceAll(' ', '');
  24931. // // 获取匹配到的内容并去除两端空格
  24932. // console.log('contentInsideDoubleEquals', content);
  24933. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24934. // console.log("未有星级。");
  24935. // this.againEva(msg, i, k)
  24936. // return
  24937. // }
  24938. // //  return
  24939. // } else {
  24940. // console.log("未找到匹配的内容。");
  24941. // this.againEva(msg, i, k)
  24942. // return
  24943. // }
  24944. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  24945. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24946. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24947. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  24948. // this.$forceUpdate();
  24949. // this.ruleLoading[i][k] = false
  24950. // }else{
  24951. // this.ruleLoading[i][k] = false
  24952. // }
  24953. // })
  24954. // .catch(error => {
  24955. // console.log(error);
  24956. // this.ruleLoading[i][k] = false
  24957. // });
  24958. let parm = {
  24959. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24960. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  24961. session_name: uuidv4(),
  24962. userId: this.userid,
  24963. file_ids: [],
  24964. model: 'gpt-4o-2024-11-20',
  24965. temperature: this.mode == 3 ? 0.5 : 0.1,
  24966. }
  24967. this.ajax
  24968. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  24969. .then(async (response) => {
  24970. console.log(response);
  24971. let data = response.data.FunctionResponse
  24972. if (data.message) {
  24973. console.log(data.message);
  24974. let content = data.message;
  24975. var regex = new RegExp('==([^=]+)==');
  24976. let match = content.match(regex);
  24977. if (match) {
  24978. content = match[1].trim().replaceAll(' ', '');
  24979. // 获取匹配到的内容并去除两端空格
  24980. console.log('contentInsideDoubleEquals', content);
  24981. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24982. console.log("未有星级。");
  24983. this.againEva(msg, i, k)
  24984. return
  24985. }
  24986. //  return
  24987. } else {
  24988. console.log("未找到匹配的内容。");
  24989. this.againEva(msg, i, k)
  24990. return
  24991. }
  24992. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  24993. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24994. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24995. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  24996. this.$forceUpdate();
  24997. this.ruleLoading[i][k] = false
  24998. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  24999. }else {
  25000. this.ruleLoading[i][k] = false
  25001. }
  25002. })
  25003. .catch((error) => {
  25004. this.ruleLoading[i][k] = false
  25005. console.log(error);
  25006. });
  25007. },
  25008. async aiSearchFile(messages, callback) {
  25009. let _this = this
  25010. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  25011. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  25012. console.log('fileid=========',fileid)
  25013. // let params = JSON.stringify({
  25014. // // "model": "Chat",
  25015. // model: 'gpt-3.5-turbo',
  25016. // temperature: this.mode == 3 ? 0.5 : 0.1,
  25017. // max_tokens: 4096,
  25018. // top_p: 1,
  25019. // frequency_penalty: 0,
  25020. // presence_penalty: 0,
  25021. // messages: [{
  25022. // content: messages,
  25023. // role: 'user'
  25024. // }],
  25025. // stream: false,
  25026. // uid: this.userid,
  25027. // mind_map_question: "",
  25028. // })
  25029. // // let params = JSON.stringify({
  25030. // // message: {
  25031. // // anthropic_version: "bedrock-2023-05-31",
  25032. // // max_tokens: 4096,
  25033. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  25034. // // top_p: 1,
  25035. // // messages: [{
  25036. // // content: messages,
  25037. // // role: 'user'
  25038. // // }], //
  25039. // // },
  25040. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  25041. // // });
  25042. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  25043. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  25044. // console.log(response);
  25045. // let data = response.data.FunctionResponse
  25046. // if (data.choices && data.choices.length && data.choices[0].message) {
  25047. // console.log(data.choices[0].message.content);
  25048. // let dArray = JSON.parse(data.choices[0].message.content)
  25049. // _this.dArray = dArray
  25050. // _this.unitJson[0].chapterInfo[0].taskJson = []
  25051. // for (var i = 0; i < dArray.length; i++) {
  25052. // let _task = dArray[i]
  25053. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  25054. // task: _task.task,
  25055. // taskDetail: "",
  25056. // taskDetail2: _task.detail,
  25057. // taskDetail3: "",
  25058. // chapterData: [],
  25059. // toolText: "",
  25060. // toolChoose: [
  25061. // {
  25062. // tool: [],
  25063. // toolDetail: "",
  25064. // toolType: 0,
  25065. // askCount: 1,
  25066. // askTitle: "",
  25067. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25068. // },
  25069. // ],
  25070. // isShowTools: false,
  25071. // askCount: 1,
  25072. // isFold: 0,
  25073. // askTitle: "",
  25074. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25075. // checkJson: [{ checkCount: [], checkPerent: [] }],
  25076. // homeworkList: [],
  25077. // })
  25078. // }
  25079. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  25080. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  25081. // _this.$forceUpdate();
  25082. // }
  25083. // // if (data.result) {
  25084. // // console.log(data.result);
  25085. // // let dArray = JSON.parse(data.result)
  25086. // // _this.dArray = dArray
  25087. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  25088. // // for (var i = 0; i < dArray.length; i++) {
  25089. // // let _task = dArray[i]
  25090. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  25091. // // task: _task.task,
  25092. // // taskDetail: "",
  25093. // // taskDetail2: _task.detail,
  25094. // // taskDetail3: "",
  25095. // // chapterData: [],
  25096. // // toolText: "",
  25097. // // toolChoose: [
  25098. // // {
  25099. // // tool: [],
  25100. // // toolDetail: "",
  25101. // // toolType: 0,
  25102. // // askCount: 1,
  25103. // // askTitle: "",
  25104. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25105. // // },
  25106. // // ],
  25107. // // isShowTools: false,
  25108. // // askCount: 1,
  25109. // // isFold: 1,
  25110. // // askTitle: "",
  25111. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  25112. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  25113. // // homeworkList: [],
  25114. // // })
  25115. // // }
  25116. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  25117. // // _this.$forceUpdate();
  25118. // // }
  25119. // callback ? callback() : ''
  25120. // }).catch(function (error) {
  25121. // _this.loading = false
  25122. // console.log(error);
  25123. // });
  25124. this.isFileCancelToken = this.ajax.setCancelSource();
  25125. let parm = {
  25126. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  25127. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25128. session_name: uuidv4(),
  25129. userId: this.userid,
  25130. file_ids: fileid.length ? [...fileid] : '',
  25131. model: 'gpt-4o-2024-11-20',
  25132. temperature: this.mode == 3 ? 0.5 : 0.1,
  25133. }
  25134. this.ajax
  25135. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25136. .then((response) => {
  25137. console.log(response);
  25138. let data = response.data.FunctionResponse
  25139. if (data.message) {
  25140. console.log(data.message);
  25141. let dArray = []
  25142. try {
  25143. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  25144. let regex3 = new RegExp('(?<!")content(?!")','g')
  25145. //
  25146. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  25147. } catch (error) {
  25148. // callback ? callback() : ''
  25149. console.log("error_________________" + error);
  25150. try {
  25151. let regex = new RegExp(/```json([\s\S]*?)```/);
  25152. let match = data.message.match(regex);
  25153. dArray = JSON.parse(match[1]);
  25154. } catch (error) {
  25155. // callback ? callback() : ''
  25156. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  25157. console.log("error_________________" + error);
  25158. _this.isFileCancelToken = null;
  25159. _this.aiSearchFile(messages, callback)
  25160. return
  25161. }
  25162. }
  25163. for(let i = 0; i < dArray.length; i++){
  25164. let content = dArray[i].content
  25165. let name = '参考资料'+(i+1)
  25166. let md = new MarkdownIt();
  25167. let _html = content ? md.render(content) : ''
  25168. setTimeout(()=>{
  25169. if(i == (dArray.length - 1)){
  25170. _this.generate2(name, _html, i, callback)
  25171. }else {
  25172. _this.generate2(name, _html, i)
  25173. }
  25174. }, 500 * i)
  25175. }
  25176. _this.isFileCancelToken = null
  25177. _this.$forceUpdate();
  25178. }
  25179. })
  25180. .catch((error) => {
  25181. callback ? callback() : ''
  25182. _this.isFileCancelToken = null
  25183. console.log(error);
  25184. });
  25185. },
  25186. async aiSearchFile2(messages, callback) {
  25187. let _this = this
  25188. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  25189. console.log('fileid=========',fileid)
  25190. this.isFileCancelToken = this.ajax.setCancelSource();
  25191. let parm = {
  25192. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  25193. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25194. session_name: uuidv4(),
  25195. userId: this.userid,
  25196. file_ids: fileid.length ? [...fileid] : '',
  25197. model: 'gpt-4o-2024-11-20',
  25198. temperature: this.mode == 3 ? 0.5 : 0.1,
  25199. }
  25200. this.ajax
  25201. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25202. .then((response) => {
  25203. console.log(response);
  25204. let data = response.data.FunctionResponse
  25205. if (data.message) {
  25206. console.log(data.message);
  25207. let content = data.message
  25208. let name = '参考资料'
  25209. let md = new MarkdownIt();
  25210. let _html = content ? md.render(content) : ''
  25211. _this.generate2(name, _html, 0, callback)
  25212. _this.isFileCancelToken = null
  25213. _this.$forceUpdate();
  25214. }
  25215. })
  25216. .catch((error) => {
  25217. callback ? callback() : ''
  25218. _this.isFileCancelToken = null
  25219. console.log(error);
  25220. });
  25221. },
  25222. createFileid(url) {
  25223. let _this = this
  25224. return new Promise((resolve, reject) => {
  25225. try {
  25226. _this.ajax
  25227. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  25228. url: url,
  25229. })
  25230. .then((res) => {
  25231. let _data = res.data.FunctionResponse;
  25232. if (_data.result && _data.result.id) {
  25233. resolve(_data.result.id)
  25234. }else {
  25235. resolve(1)
  25236. }
  25237. }).catch(function (error) {
  25238. resolve(1)
  25239. });
  25240. }catch (e){
  25241. resolve(1)
  25242. }
  25243. });
  25244. },
  25245. handleSwitchChange(string){
  25246. // let area = ''
  25247. // let text = ''
  25248. // if(string == 'aiteacherTextDetail'){
  25249. // area = '已有教案摘要'
  25250. // text = this.teacherCourseText
  25251. // }else if(string == 'aitargetTextDetail'){
  25252. // area = '课程目标'
  25253. // text = this.targetCourseText
  25254. // }else if(string == 'aiDetail'){
  25255. // area = '课程简要描述'
  25256. // text = this.courseText
  25257. // }else if(string == 'aitargetTextDetail2'){
  25258. // area = '课程目标'
  25259. // text = this.targetCourseText2
  25260. // }else if(string.indexOf('aiDetail1') != -1){
  25261. // let index = parseInt(string.split('aiDetail1-')[1])
  25262. // area = `任务${index+1}课程大纲`
  25263. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  25264. // }else if(string == 'aiCpote1'){
  25265. // area = '概念群'
  25266. // text = this.cpote.cpote1
  25267. // }else if(string == 'aiCpote2'){
  25268. // area = '问题链'
  25269. // text = this.cpote.cpote2
  25270. // }else if(string == 'aiCpote3'){
  25271. // area = '目标层'
  25272. // text = this.cpote.cpote3
  25273. // }else if(string == 'aiCpote4'){
  25274. // area = '任务簇'
  25275. // text = this.cpote.cpote4
  25276. // }else if(string.indexOf('teacherDetail2') != -1){
  25277. // let index = parseInt(string.split('teacherDetail2-')[1])
  25278. // area = `任务${index+1}教案`
  25279. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  25280. // }else if(string.indexOf('aiDetail2') != -1){
  25281. // let index = parseInt(string.split('aiDetail2-')[1])
  25282. // area = `任务${index+1}任务描述`
  25283. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  25284. // }else if(string.indexOf('aiDetail3') != -1){
  25285. // let index = parseInt(string.split('-')[1])
  25286. // let index2 = parseInt(string.split('-')[2])
  25287. // area = `任务${index+1}工具${index2+1}的工具描述`
  25288. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  25289. // }
  25290. // if(this.isQuote[string] && text){
  25291. // this.quoteArray.push({
  25292. // string,
  25293. // area,
  25294. // value: text
  25295. // })
  25296. // }
  25297. console.log(this.isQuote)
  25298. },
  25299. setIsQuote(string){
  25300. this.isQuote[string] = false
  25301. },
  25302. setEvaList(task, tool, elist){
  25303. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  25304. this.$forceUpdate()
  25305. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  25306. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  25307. }
  25308. },
  25309. closeRight(){
  25310. this.isDisplay = !this.isDisplay;
  25311. },
  25312. addCourseBehavior(type, _html) { // 保存行为操作
  25313. let params = [{
  25314. uid: this.userid,
  25315. courseId: '',
  25316. type: type,
  25317. content: _html,
  25318. }];
  25319. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  25320. if (res.data == 1) {
  25321. console.log('保存操作成功');
  25322. } else {
  25323. console.log('保存操作失败');
  25324. }
  25325. }).catch(e => {
  25326. console.log('保存操作失败');
  25327. console.log(e);
  25328. });
  25329. },
  25330. async useUrl(){
  25331. if(!this.knowFileids3.length){
  25332. this.$message.error('请选择要使用的检索资料')
  25333. return
  25334. }
  25335. let array = []
  25336. for(var i = 0; i < this.knowFileids3.length; i++){
  25337. let item = this.knowFileids3[i]
  25338. for(var j = 0; j < this.knowInfoData3.length; j++){
  25339. if(item == this.knowInfoData3[j].url){
  25340. let isExist = this.knowInfoData2.some(item => item.name === this.knowInfoData3[j].name);
  25341. if (!isExist) {
  25342. this.knowInfoData2.push(this.knowInfoData3[j]);
  25343. }
  25344. }
  25345. }
  25346. }
  25347. this.$nextTick(() => {
  25348. this.$refs.rightKnow.scrollTop = this.$refs.rightKnow.scrollHeight;
  25349. });
  25350. this.knowFileids3 = []
  25351. for (let i = 0; i < this.knowInfoData2.length; i++) {
  25352. if (!this.knowInfoData2[i].fileid) {
  25353. let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25354. this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25355. console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25356. if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25357. this.knowFileids2.push(fileid)
  25358. }
  25359. }
  25360. }
  25361. },
  25362. panFind(event) {
  25363. // if(!this.findMatchingContentsFinish){
  25364. // const { scrollTop, clientHeight, scrollHeight } = event.target;
  25365. // // 判断是否触底
  25366. // if (scrollTop + clientHeight >= scrollHeight - 5 && !this.knowInfoDataLoading) {
  25367. // this.findMatchingContentsPage++
  25368. // this.findMatchingContents(); // 调用下拉刷新方法
  25369. // }
  25370. // }
  25371. if(!this.findMatchingContentsFinish){
  25372. this.findMatchingContentsPage++
  25373. this.findMatchingContents(); // 调用下拉刷新方法
  25374. }else{
  25375. this.$message.error('已获取全部数据')
  25376. }
  25377. },
  25378. startFindMatchingContents(){
  25379. if(!this.searchFileName){
  25380. this.$message.error('请输入检索关键词')
  25381. return
  25382. }
  25383. if(this.knowInfoDataLoading){
  25384. this.$message.error('检索中请稍后')
  25385. return
  25386. }
  25387. if(this.isfindMatchingContents && this.findMatchingContentsPage < 10){
  25388. this.isfindMatchingContents.cancel('Request canceled by the user.');
  25389. this.isfindMatchingContents = null;
  25390. }else if(this.isfindMatchingContents){
  25391. this.$message.error('检索中请稍后')
  25392. return
  25393. }
  25394. this.findMatchingContentsFinish = false
  25395. this.findMatchingContentsPage = 1
  25396. this.knowInfoData3 = []
  25397. this.knowFileType1 = ''
  25398. this.knowFileType2 = ''
  25399. this.knowFileType = ''
  25400. this.findMatchingContents(); // 调用下拉刷新方法
  25401. },
  25402. findMatchingContents(){
  25403. if(!this.searchFileName){
  25404. this.$message.error('请输入检索关键词')
  25405. return
  25406. }
  25407. if(this.isfindMatchingContents){
  25408. this.$message.error('检索中请稍后')
  25409. return
  25410. }
  25411. let sub = []
  25412. let grade = []
  25413. if (this.courseTypeId.length) {
  25414. for (var i = 0; i < this.courseTypeId.length; i++) {
  25415. let _sid = this.courseTypeId[i]
  25416. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25417. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  25418. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  25419. }
  25420. }
  25421. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25422. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  25423. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  25424. }
  25425. }
  25426. }
  25427. }
  25428. if(this.findMatchingContentsPage < 2){
  25429. this.knowInfoDataLoading = true
  25430. }
  25431. let params = {
  25432. type: this.typeC2.join(","),
  25433. string: this.searchFileName,
  25434. grade: this.typeC1.join(","),
  25435. page: this.findMatchingContentsPage
  25436. };
  25437. let md = new MarkdownIt();
  25438. this.isfindMatchingContents = this.ajax.setCancelSource()
  25439. this.ajax.get(this.$store.state.api + 'findMatchingContentsPage2', params, this.isfindMatchingContents).then(async res => {
  25440. console.log(res)
  25441. this.isfindMatchingContents = null
  25442. this.knowInfoDataLoading = false
  25443. if(res.data.length){
  25444. let files = []
  25445. // let knowFile = JSON.parse(JSON.stringify(this.knowFileids2))
  25446. for (var i = 0; i < res.data.length; i++) {
  25447. // files.push(await this.generateExport2(el.title, md.render(el.content)));
  25448. let el = res.data[i];
  25449. let url = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn' + el.file_url;
  25450. let extension = url.split('.').pop().toLowerCase();
  25451. let _type = 2; // 默认类型为2
  25452. // 定义文件类型数组
  25453. let imgA = ["png", "jpg", "jpeg", "bmp", "gif", "webp", "psd", "svg", "tiff"];
  25454. let fileA = ["PDF", "DOC", "DOCX", "DOCM", "DOTM", "DOTX", "PPTX", "PPSX", "PPT", "PPS", "PPTM", "POTM", "PPAM", "POTX", "PPSM", "XLSX", "XLS"];
  25455. 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"];
  25456. // 根据文件扩展名判断文件类型
  25457. if (fileA.includes(extension.toUpperCase())) {
  25458. _type = 3;
  25459. } else if (videoA.includes(extension.toUpperCase())) {
  25460. _type = 2;
  25461. } else if (imgA.includes(extension)) {
  25462. _type = 13;
  25463. } else {
  25464. _type = 12;
  25465. }
  25466. let isExist = this.knowInfoData3.some(item => item.name === el.title);
  25467. if (!isExist) {
  25468. // let fileid = await this.createFileid(url)
  25469. this.knowInfoData3.push({
  25470. name: el.title,
  25471. url: url,
  25472. uid: '',
  25473. type: _type,
  25474. fileid: '',
  25475. file_type: el.file_type
  25476. // fileid == 1 ? '' : fileid
  25477. });
  25478. // if(fileid != 1){
  25479. // this.knowFileids2.push(fileid)
  25480. // }
  25481. }
  25482. }
  25483. // for (let i = 0; i < this.knowInfoData3.length; i++) {
  25484. // if (!this.knowInfoData2[i].fileid) {
  25485. // let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25486. // this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25487. // console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25488. // if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25489. // this.knowFileids2.push(fileid)
  25490. // }
  25491. // }
  25492. // }
  25493. // let data = {
  25494. // target:{
  25495. // files: files
  25496. // }
  25497. // }
  25498. // console.log(data)
  25499. // this.beforeUploadInfo2(data, 20)
  25500. if(this.findMatchingContentsPage < 10){
  25501. this.panFind()
  25502. }
  25503. }else{
  25504. if(this.findMatchingContentsPage == 1){
  25505. this.$message.error('未检索出内容')
  25506. }else {
  25507. this.findMatchingContentsFinish = true
  25508. }
  25509. }
  25510. }).catch(e => {
  25511. console.log('查询失败');
  25512. this.isfindMatchingContents = null
  25513. this.knowInfoDataLoading = false
  25514. console.log(e);
  25515. });
  25516. },
  25517. openCodeEditor(type,val, unitIndex,itemTaskIndex,index1){
  25518. console.log('openCodeEditor',type,val,unitIndex,itemTaskIndex,index1);
  25519. this.$refs.CodeEditorRef.open(type,val, unitIndex,itemTaskIndex, index1)
  25520. },
  25521. addHtmlSuccess({Tname,url,type,unitIndex,itemTaskIndex,index1}){
  25522. console.log('addHtmlSuccess',Tname,url,'type:',type,'unitIndex',unitIndex,'itemTaskIndex',itemTaskIndex,'index1',index1);
  25523. if (type == 1) {
  25524. this.unitJson[unitIndex].chapterInfo[0].taskJson[
  25525. itemTaskIndex
  25526. ].chapterData.splice(index1,1,{
  25527. name: Tname,
  25528. url: url,
  25529. type: 16
  25530. })
  25531. }else{
  25532. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25533. itemTaskIndex
  25534. ].chapterData.push({
  25535. name: Tname,
  25536. url: url,
  25537. type: 16
  25538. });
  25539. }
  25540. },
  25541. openAddApp(i) {
  25542. this.lineCount = i;
  25543. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25544. this.lineCount
  25545. ].chapterData.findIndex(i => i.type == 15);
  25546. let _obj = {}
  25547. if (_index != -1) {
  25548. _obj = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25549. this.lineCount
  25550. ].chapterData[_index]
  25551. }
  25552. this.$refs.appDialog.openG(_obj, "", "", "", 2);
  25553. },
  25554. selectAppSuccess({ data, type }) {
  25555. let _index = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25556. this.lineCount
  25557. ].chapterData.findIndex(i => i.type == 15);
  25558. if (_index != -1) {
  25559. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25560. this.lineCount
  25561. ].chapterData.splice(_index, 1);
  25562. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25563. this.lineCount
  25564. ].chapterData.push({
  25565. name: data.name,
  25566. title: data.name,
  25567. id:data.id,
  25568. url: data.url,
  25569. type: 15
  25570. });
  25571. } else {
  25572. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  25573. this.lineCount
  25574. ].chapterData.push({
  25575. name: data.name,
  25576. title: data.name,
  25577. id:data.id,
  25578. url: data.url,
  25579. type: 15
  25580. });
  25581. }
  25582. this.imgChange1(null, null, 8, this.lineCount);
  25583. this.dialogVisible7 = false;
  25584. }
  25585. },
  25586. beforeDestroy() {
  25587. // clearTimeout(this.timer);
  25588. // this.timer = null;
  25589. // clearInterval(this.timer2);
  25590. // this.timer2 = null;
  25591. clearInterval(this.pasteTimer);
  25592. this.pasteTimer = null;
  25593. },
  25594. beforeRouteLeave(to, from, next) {
  25595. // clearTimeout(this.timer);
  25596. // this.timer = null;
  25597. // clearInterval(this.timer2);
  25598. // this.timer2 = null;
  25599. clearInterval(this.pasteTimer);
  25600. this.pasteTimer = null;
  25601. next();
  25602. },
  25603. mounted(){
  25604. let _this = this
  25605. // 监听浏览器后退或者刷新等离开页面的操作
  25606. window.onbeforeunload = function(event) {
  25607. // 检查是否有未保存的更改
  25608. const message = "你有未保存的更改,确定要离开吗?";
  25609. // 现代浏览器通常会显示一个默认的提示信息,不能完全自定义提示内容
  25610. event.returnValue = message; // 兼容大部分浏览器
  25611. console.log(message)
  25612. return message; // 兼容部分浏览器
  25613. };
  25614. const resizable = this.$el.querySelector('.resizable');
  25615. const resizer = this.$el.querySelector('.resizer');
  25616. const maxWidth = document.body.offsetWidth / 2;
  25617. const maxWidth2 = window.innerWidth / 2;
  25618. let startX, startWidth;
  25619. const mouseMoveHandler = (e) => {
  25620. e.preventDefault(); // 添加此行以防止选中其他文本
  25621. const dx = startX - e.clientX;
  25622. const newWidth = startWidth + dx;
  25623. if (newWidth >= 350 && newWidth <= maxWidth) {
  25624. resizable.style.minWidth = `${newWidth}px`;
  25625. }
  25626. };
  25627. const mouseUpHandler = () => {
  25628. document.removeEventListener('mousemove', mouseMoveHandler);
  25629. document.removeEventListener('mouseup', mouseUpHandler);
  25630. document.body.style.cursor = 'default';
  25631. };
  25632. const mouseDownHandler = (e) => {
  25633. e.preventDefault(); // 添加此行以防止选中其他文本
  25634. startX = e.clientX;
  25635. startWidth = resizable.getBoundingClientRect().width;
  25636. document.addEventListener('mousemove', mouseMoveHandler);
  25637. document.addEventListener('mouseup', mouseUpHandler);
  25638. document.body.style.cursor = 'ew-resize';
  25639. };
  25640. resizer.addEventListener('mousedown', mouseDownHandler);
  25641. const touchMoveHandler = (e) => {
  25642. e.preventDefault(); // 添加此行以防止选中其他文本
  25643. const dx = startX - e.touches[0].clientX;
  25644. const newWidth = startWidth + dx;
  25645. if (newWidth >= 350 && newWidth <= maxWidth2) {
  25646. resizable.style.minWidth = `${newWidth}px`;
  25647. }
  25648. };
  25649. const touchEndHandler = () => {
  25650. document.removeEventListener('touchmove', touchMoveHandler);
  25651. document.removeEventListener('touchend', touchEndHandler);
  25652. document.body.style.cursor = 'default';
  25653. };
  25654. const touchStartHandler = (e) => {
  25655. e.preventDefault(); // 添加此行以防止选中其他文本
  25656. startX = e.touches[0].clientX;
  25657. startWidth = resizable.getBoundingClientRect().width;
  25658. document.addEventListener('touchmove', touchMoveHandler);
  25659. document.addEventListener('touchend', touchEndHandler);
  25660. document.body.style.cursor = 'ew-resize';
  25661. };
  25662. resizer.addEventListener('touchstart', touchStartHandler);
  25663. },
  25664. created() {
  25665. this.selectFileid();
  25666. // this.selectAiFileid();
  25667. this.selectKnowFileid();
  25668. this.getStudent();
  25669. this.getTeacher();
  25670. this.getClass();
  25671. this.selectGrage();
  25672. this.getTemplate();
  25673. this.getTipsTemplate();
  25674. // this.selectType();
  25675. this.selectEva();
  25676. if(this.istemplate == 1){
  25677. this.isOutline = true
  25678. this.isOutline2 = true
  25679. this.courseTextBool = true
  25680. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  25681. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  25682. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25683. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  25684. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  25685. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25686. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  25687. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  25688. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  25689. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  25690. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  25691. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  25692. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  25693. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  25694. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  25695. - 我们的课程主题可以如何与学生的实际生活联系起来?
  25696. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  25697. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  25698. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  25699. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  25700. - 学生个人最终要完成什么?学生小组最终要完成什么?
  25701. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  25702. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  25703. 讨论:<转文本内容>`
  25704. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  25705. }
  25706. this.loading = false;
  25707. // this.timer2 = setInterval(() => {
  25708. // this.selectEva();
  25709. // }, 5000);
  25710. // this.pasteTimer = setInterval(() => {
  25711. // this.getPaste();
  25712. // }, 1000);
  25713. this.pasteTimer = setInterval(() => {
  25714. this.getPaste2();
  25715. }, 500);
  25716. setTimeout(() => {
  25717. // this.selectAllType();
  25718. this.selectCourseDetail();
  25719. }, 500);
  25720. let _this = this;
  25721. window.pasteStage = function (json) {
  25722. _this.pasteStage(json);
  25723. };
  25724. window.pasteTask = function (json) {
  25725. _this.pasteTask(json);
  25726. };
  25727. },
  25728. };
  25729. </script>
  25730. <style scoped>
  25731. @media screen and (max-width: 1280px) {
  25732. .mbCss {
  25733. flex-direction: column !important;
  25734. }
  25735. .pjCss {
  25736. width: 100% !important;
  25737. }
  25738. .evaCss {
  25739. width: 100% !important;
  25740. margin-top: 10px;
  25741. }
  25742. }
  25743. .el-table>>>.even_row {
  25744. background-color: #f1f1f1 !important;
  25745. }
  25746. .dialog_diy>>>.el-dialog__header {
  25747. background: #3c3c3c !important;
  25748. padding: 15px 20px;
  25749. }
  25750. .dialog_diy>>>.el-dialog__title {
  25751. color: #fff;
  25752. }
  25753. .dialog_diy>>>.el-dialog__headerbtn {
  25754. top: 19px;
  25755. }
  25756. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  25757. color: #fff;
  25758. }
  25759. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  25760. color: #fff;
  25761. }
  25762. .dialog_diy>>>.el-dialog__body,
  25763. .dialog_diy>>>.el-dialog__footer {
  25764. background: #fafafa;
  25765. }
  25766. .dialog_diy3>>>.el-dialog__body,
  25767. .dialog_diy3>>>.el-dialog__footer {
  25768. background: #eee !important;
  25769. }
  25770. .dialog_diy3>>>.el-dialog__body {
  25771. padding: 20px 20px;
  25772. }
  25773. .dialog_diyStage>>>.el-dialog__body {
  25774. padding: 10px;
  25775. }
  25776. .source_diy>>>.el-dialog {
  25777. height: 100% !important;
  25778. margin: 0 auto !important;
  25779. }
  25780. .source_diy>>>.el-dialog__body {
  25781. height: calc(100% - 185px);
  25782. overflow: auto;
  25783. background: #e6eaf0;
  25784. }
  25785. .source_diy>>>.el-dialog__footer {
  25786. background: #e6eaf0 !important;
  25787. }
  25788. .left {
  25789. border-right: 1px solid rgb(60, 94, 143);
  25790. display: flex;
  25791. flex-direction: column;
  25792. align-items: center;
  25793. min-height: 600px;
  25794. width: 385px;
  25795. height: 80%;
  25796. }
  25797. .tips {
  25798. color: rgb(128, 128, 128);
  25799. font-size: 12px;
  25800. width: 270px;
  25801. margin: 40px;
  25802. }
  25803. .pb_content {
  25804. height: 100% !important;
  25805. /* margin: 0 20px 0 20px; */
  25806. }
  25807. .pb_content_body {
  25808. width: 100% !important;
  25809. height: 100%;
  25810. display: flex;
  25811. }
  25812. .info_solid {
  25813. width: 270px;
  25814. height: 30px;
  25815. border-left: 1px solid #bdbdbd;
  25816. margin: 10px 0px 10px 30px;
  25817. }
  25818. .info_steps {
  25819. width: 270px;
  25820. font-size: 0.875rem;
  25821. display: flex;
  25822. align-items: center;
  25823. }
  25824. .info_steps span:nth-child(1) {
  25825. width: 30px;
  25826. height: 30px;
  25827. background: rgba(0, 0, 0, 0.38);
  25828. display: block;
  25829. color: #fff;
  25830. border-radius: 40px;
  25831. text-align: center;
  25832. line-height: 30px;
  25833. }
  25834. .steps_active {
  25835. background: #3d67bc !important;
  25836. }
  25837. .info_steps span:nth-child(2) {
  25838. margin-left: 5px;
  25839. }
  25840. .right {
  25841. height: 100%;
  25842. width: 100%;
  25843. display: flex;
  25844. overflow: hidden;
  25845. flex-direction: column;
  25846. }
  25847. .leftBar{
  25848. width: 290px;
  25849. height: calc(100% - 50px);
  25850. overflow: auto;
  25851. border-radius: 5px;
  25852. margin: 25px auto;
  25853. box-sizing: border-box;
  25854. margin-right: 10px;
  25855. }
  25856. .leftBar2{
  25857. width: 400px;
  25858. min-width: 400px;
  25859. height: calc(100% - 50px);
  25860. overflow: auto;
  25861. border-radius: 5px;
  25862. margin: 25px auto;
  25863. box-sizing: border-box;
  25864. margin-right: 10px;
  25865. background: #fff;
  25866. padding: 5px;
  25867. border-radius: 5px;
  25868. }
  25869. .basic_box {
  25870. margin: 0 auto;
  25871. position: relative;
  25872. padding: 0 20px 0 20px;
  25873. }
  25874. .basic_box_success {
  25875. width: 100%;
  25876. min-height: 455px;
  25877. padding: 50px 0;
  25878. position: relative;
  25879. text-align: center;
  25880. border-bottom: 1px solid #bfbfbf;
  25881. box-sizing: border-box;
  25882. display: flex;
  25883. align-items: center;
  25884. flex-direction: column;
  25885. justify-content: center;
  25886. }
  25887. .info_title {
  25888. font-size: 1.5em;
  25889. margin-right: 25px;
  25890. /* margin: 20px 30px 20px 30px; */
  25891. }
  25892. .bInfo_title {
  25893. text-align: left;
  25894. margin: 10px 0;
  25895. }
  25896. .small_title {
  25897. font-size: 14px;
  25898. line-height: 40px;
  25899. }
  25900. .chapter_beizhu {
  25901. font-size: 12px;
  25902. font-weight: bold;
  25903. float: right;
  25904. color: rgb(128, 128, 128);
  25905. margin-top: 5px;
  25906. }
  25907. .chapter_uploadBox1 {
  25908. text-align: left;
  25909. background-color: rgb(242, 242, 242);
  25910. width: 100%;
  25911. height: 67px;
  25912. padding: 0px 15px;
  25913. border-radius: 8px;
  25914. overflow: hidden;
  25915. font-size: 16px;
  25916. box-sizing: border-box;
  25917. position: relative;
  25918. }
  25919. .chapter_add {
  25920. width: 100%;
  25921. height: 32px;
  25922. margin-top: 15px;
  25923. cursor: pointer;
  25924. }
  25925. .chapter_add_l {
  25926. margin-left: 5px;
  25927. width: 30px;
  25928. height: 30px;
  25929. float: left;
  25930. border: 1px solid #aaa;
  25931. color: #aaa;
  25932. border-radius: 50%;
  25933. font-size: 25px;
  25934. text-align: center;
  25935. }
  25936. .chapter_add_r {
  25937. font-size: 18px;
  25938. height: 40px;
  25939. line-height: 30px;
  25940. text-indent: 10px;
  25941. color: #aaa;
  25942. }
  25943. .chapter_add_r span {
  25944. font-size: 12px;
  25945. color: rgb(204, 204, 204);
  25946. }
  25947. .chapter_add_input {
  25948. display: none;
  25949. }
  25950. .line {
  25951. width: 85%;
  25952. margin: 0 auto;
  25953. border-top: 1px solid #e5e5e5;
  25954. margin-top: 20px;
  25955. }
  25956. .info_btnBox {
  25957. width: calc(100%);
  25958. display: flex;
  25959. justify-content: center;
  25960. height: 80px;
  25961. align-items: center;
  25962. background: #fff;
  25963. margin: 0 auto;
  25964. border-top: 2px solid rgb(228, 232, 237);
  25965. box-sizing: border-box;
  25966. }
  25967. .info_btnBox2 {
  25968. width: calc(100%);
  25969. display: flex;
  25970. justify-content: center;
  25971. height: 20px;
  25972. align-items: center;
  25973. background: #fff;
  25974. margin: 0 auto;
  25975. border-top: 2px solid rgb(228, 232, 237);
  25976. box-sizing: border-box;
  25977. overflow: hidden;
  25978. cursor: pointer;
  25979. }
  25980. .info_btnBox3 {
  25981. width: calc(100%);
  25982. display: flex;
  25983. justify-content: flex-end;
  25984. padding: 0 20px;
  25985. height: 60px;
  25986. align-items: center;
  25987. background: unset;
  25988. margin: 0 auto;
  25989. /* border-top: 1px solid rgb(228, 232, 237); */
  25990. box-sizing: border-box;
  25991. overflow: hidden;
  25992. cursor: pointer;
  25993. background: #fff;
  25994. border-radius: 10px;
  25995. }
  25996. .info_btn+.info_btn {
  25997. margin-left: 15px;
  25998. }
  25999. .info_btn,
  26000. .teacherWord {
  26001. color: #fff;
  26002. background-color: #0f7eff;
  26003. padding: 8px 24px;
  26004. font-size: 0.9375rem;
  26005. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  26006. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  26007. min-width: 64px;
  26008. font-weight: 500;
  26009. border-radius: 4px;
  26010. box-sizing: border-box;
  26011. border: none;
  26012. cursor: pointer;
  26013. }
  26014. .teacherWord {
  26015. width: 105px !important;
  26016. text-align: center !important;
  26017. line-height: 36px !important;
  26018. padding: 0 !important;
  26019. font-size: 14px !important;
  26020. margin: 10px 0 !important;
  26021. }
  26022. .template_box {
  26023. display: flex;
  26024. flex-wrap: wrap;
  26025. }
  26026. .wordTeacher {
  26027. display: flex;
  26028. flex-direction: column;
  26029. width: 100px;
  26030. height: 100px;
  26031. text-align: center;
  26032. font-size: 13px;
  26033. margin: 0 20px 20px 0;
  26034. background: #f0f4fa;
  26035. position: relative;
  26036. border-radius: 5px;
  26037. align-items: center;
  26038. justify-content: center;
  26039. border: 1px solid #cad1dc;
  26040. color: #0e1e33;
  26041. /* padding: 25px 0px; */
  26042. cursor: pointer;
  26043. }
  26044. .wordTeacher::after {
  26045. content: "";
  26046. display: block;
  26047. position: absolute;
  26048. width: 15px;
  26049. height: 15px;
  26050. right: 10px;
  26051. top: 10px;
  26052. background-image: url(../../../assets/icon/new/choose_a.png);
  26053. background-size: 100% 100%;
  26054. }
  26055. .wordTeacherA::after {
  26056. background-image: url(../../../assets/icon/new/choose_b.png);
  26057. }
  26058. .wordTeacher:nth-child(5n) {
  26059. margin-right: 0px;
  26060. }
  26061. .wordPic {
  26062. margin: 0 auto;
  26063. width: 30px;
  26064. height: 30px;
  26065. cursor: pointer;
  26066. }
  26067. .deleteWord {
  26068. width: 22px;
  26069. height: 22px;
  26070. position: absolute;
  26071. right: 5px;
  26072. top: -15px;
  26073. cursor: pointer;
  26074. display: none;
  26075. z-index: 999;
  26076. }
  26077. .wordPic>img,
  26078. .deleteWord>img,
  26079. .addToolImg>img {
  26080. width: 100%;
  26081. height: 100%;
  26082. }
  26083. .info_btn:hover {
  26084. background-color: #4f7cd5 !important;
  26085. }
  26086. .cru_selectBox {
  26087. display: flex;
  26088. margin: 15px 0;
  26089. flex-wrap: nowrap;
  26090. white-space: nowrap;
  26091. overflow: auto;
  26092. position: relative;
  26093. height: 40px;
  26094. max-width: calc(100% - 175px);
  26095. }
  26096. .cru_selectBox::-webkit-scrollbar {
  26097. /*滚动条整体样式*/
  26098. width: 6px;
  26099. /*高宽分别对应横竖滚动条的尺寸*/
  26100. height: 6px;
  26101. }
  26102. /*定义滚动条轨道 内阴影+圆角*/
  26103. .cru_selectBox::-webkit-scrollbar-track {
  26104. border-radius: 10px;
  26105. background-color: #eee;
  26106. }
  26107. /*定义滑块 内阴影+圆角*/
  26108. .cru_selectBox::-webkit-scrollbar-thumb {
  26109. border-radius: 10px;
  26110. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  26111. background-color: rgba(0, 0, 0, 0.1);
  26112. }
  26113. .cru_line {
  26114. position: absolute;
  26115. bottom: 0px;
  26116. transition: all 0.5s;
  26117. left: 0px;
  26118. width: 50px;
  26119. height: 4px;
  26120. left: 10px;
  26121. border-radius: 2px;
  26122. background: #3681fc;
  26123. }
  26124. .cru_select {
  26125. font-size: 18px;
  26126. margin-right: 20px;
  26127. margin-left: 5px;
  26128. cursor: pointer;
  26129. color: #0e1e33;
  26130. }
  26131. .cru_select:hover {
  26132. color: #3681fc !important;
  26133. }
  26134. .cru_selected {
  26135. color: #3681fc !important;
  26136. font-weight: bold;
  26137. }
  26138. .chapter_box {
  26139. margin-top: 10px;
  26140. width: 100%;
  26141. padding: 10px 20px;
  26142. background: #fff;
  26143. border-radius: 8px;
  26144. box-sizing: border-box;
  26145. }
  26146. .chapter_contentbox {
  26147. display: flex;
  26148. align-items: center;
  26149. /* margin-top: 15px; */
  26150. }
  26151. .chapter_contentbox .cc_title {
  26152. margin: 0px;
  26153. color: black;
  26154. display: block;
  26155. white-space: nowrap;
  26156. overflow: hidden;
  26157. text-overflow: ellipsis;
  26158. margin-right: 20px;
  26159. font-size: 18px;
  26160. height: 20px;
  26161. line-height: 22px;
  26162. min-width: fit-content;
  26163. display: flex;
  26164. }
  26165. .chapter_contentbox .cc_title::before {
  26166. content: "";
  26167. height: 100%;
  26168. width: 3px;
  26169. background: #3681fc;
  26170. border-radius: 3px;
  26171. opacity: 1;
  26172. display: block;
  26173. margin-right: 10px;
  26174. }
  26175. .chapter_contentbox .cc_input {
  26176. width: 100%;
  26177. display: flex;
  26178. }
  26179. .show_taskD {
  26180. min-width: fit-content;
  26181. margin-left: 10px;
  26182. display: flex;
  26183. align-items: center;
  26184. font-size: 14px;
  26185. cursor: pointer;
  26186. color: #717c8d;
  26187. }
  26188. .show_taskD>img {
  26189. width: 15px;
  26190. margin-right: 5px;
  26191. transition: 0.2s all;
  26192. transform: rotate(-90deg);
  26193. }
  26194. .show_taskD.show>img {
  26195. transform: rotate(0deg);
  26196. }
  26197. .show_toolD {
  26198. min-width: fit-content;
  26199. margin-left: 10px;
  26200. display: flex;
  26201. align-items: center;
  26202. font-size: 14px;
  26203. cursor: pointer;
  26204. color: #717c8d;
  26205. /* position: absolute;
  26206. right: 45px;
  26207. top: 5px; */
  26208. }
  26209. .show_toolD>img {
  26210. width: 15px;
  26211. margin-right: 5px;
  26212. transition: 0.2s all;
  26213. transform: rotate(-90deg);
  26214. }
  26215. .show_toolD.show>img {
  26216. transform: rotate(0deg);
  26217. }
  26218. .remove {
  26219. background-image: url("../../../assets/icon/new/delete_u.png");
  26220. cursor: pointer;
  26221. opacity: 0.5;
  26222. width: 30px;
  26223. min-width: 30px;
  26224. height: 30px;
  26225. background-size: 100% 100%;
  26226. background-repeat: no-repeat;
  26227. margin-left: 10px;
  26228. }
  26229. .remove1 {
  26230. background-image: url("../../../assets/remove1.png");
  26231. background-repeat: no-repeat;
  26232. background-position: 5px 10px;
  26233. width: 40px;
  26234. height: 50px;
  26235. cursor: pointer;
  26236. margin-left: 10px;
  26237. }
  26238. .binfo_input {
  26239. width: 100%;
  26240. margin: 0;
  26241. padding: 12px 14px;
  26242. display: block;
  26243. min-width: 0;
  26244. outline: none;
  26245. box-sizing: border-box;
  26246. background: none;
  26247. border: none;
  26248. border-radius: 4px;
  26249. background: #fff;
  26250. font-size: 16px;
  26251. resize: none;
  26252. font-family: "Microsoft YaHei";
  26253. min-height: 48px;
  26254. /* border: 1px solid #3682fc00; */
  26255. border: 1.5px solid #cad1dc;
  26256. }
  26257. .binfo_textarea {
  26258. border: 1.5px solid #cad1dc;
  26259. font-size: 16px;
  26260. resize: none;
  26261. /* background: #f6f6f6; */
  26262. font-family: "Microsoft YaHei";
  26263. }
  26264. .binfo_input:focus-visible {
  26265. border: 1.5px solid #3681fc !important;
  26266. }
  26267. .time {
  26268. display: flex;
  26269. margin: 35px 0 80px 0;
  26270. }
  26271. .chapter_btnbox {
  26272. width: 160px;
  26273. border-radius: 5px;
  26274. border: 2px dashed gray;
  26275. display: flex;
  26276. padding: 8px 50px;
  26277. align-items: center;
  26278. justify-content: center;
  26279. margin: 30px auto 0;
  26280. cursor: pointer;
  26281. }
  26282. .icon_add {
  26283. position: relative;
  26284. width: 24px;
  26285. padding-top: 20px;
  26286. border-radius: 100%;
  26287. border-width: 2px;
  26288. border-style: solid;
  26289. border-color: gray;
  26290. }
  26291. .icon_add i:nth-child(1) {
  26292. position: absolute;
  26293. left: 50%;
  26294. top: 50%;
  26295. height: 60%;
  26296. transform: translate(-50%, -50%);
  26297. border-width: 1px;
  26298. border-style: solid;
  26299. border-color: inherit;
  26300. }
  26301. .icon_add i:nth-child(2) {
  26302. position: absolute;
  26303. top: 50%;
  26304. left: 50%;
  26305. width: 60%;
  26306. transform: translate(-50%, -50%);
  26307. border-width: 1px;
  26308. border-style: solid;
  26309. border-color: inherit;
  26310. }
  26311. .chapter_btn_w {
  26312. font-size: 0.9375rem;
  26313. font-weight: bold;
  26314. color: gray;
  26315. margin-left: 20px;
  26316. }
  26317. .disUoloadSty>>>.el-icon-plus {
  26318. display: none !important;
  26319. /* 上传按钮隐藏 */
  26320. }
  26321. .imgLeft {
  26322. margin: 15px 0;
  26323. }
  26324. .add_info_box {
  26325. margin: 0 0 0 auto;
  26326. display: flex;
  26327. flex-wrap: wrap;
  26328. }
  26329. .add_info_box button {
  26330. margin: 0 5px 10px 0;
  26331. }
  26332. .add_info_box2 {
  26333. display: flex;
  26334. align-items: center;
  26335. flex-wrap: wrap;
  26336. }
  26337. .add_info_box2::after {
  26338. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  26339. color: red;
  26340. font-size: 14px;
  26341. margin-bottom: 10px;
  26342. }
  26343. .add_chapters_box {
  26344. text-align: left;
  26345. background-color: #fff;
  26346. width: 100%;
  26347. border-radius: 4px;
  26348. font-size: 16px;
  26349. box-sizing: border-box;
  26350. position: relative;
  26351. padding: 0 15px;
  26352. height: auto;
  26353. overflow-y: auto;
  26354. overflow-x: hidden;
  26355. border: 1px solid #cad1dc;
  26356. }
  26357. .add_chapters_box.add_c_none {
  26358. display: flex;
  26359. justify-content: center;
  26360. align-items: center;
  26361. padding: 15px;
  26362. }
  26363. .add_c_none>img {
  26364. width: 25px;
  26365. }
  26366. .add_chapters_box.add_c_none>span {
  26367. font-size: 14px;
  26368. font-weight: 400;
  26369. margin: 0 0 5px 5px;
  26370. }
  26371. .homework_box {
  26372. display: flex;
  26373. align-items: flex-start;
  26374. flex-wrap: wrap;
  26375. margin: 15px 0 0 0;
  26376. flex-direction: column;
  26377. align-content: flex-start;
  26378. }
  26379. .course_homework {
  26380. display: flex;
  26381. justify-content: center;
  26382. flex-direction: row;
  26383. align-items: center;
  26384. margin: 0 10px 0 0;
  26385. }
  26386. .course_homework>>>.el-input__inner {
  26387. width: 140px;
  26388. margin-left: 15px;
  26389. }
  26390. .chapter_upload_move {
  26391. position: relative;
  26392. background-color: #fff;
  26393. position: absolute;
  26394. width: 100%;
  26395. top: 0px;
  26396. left: 0px;
  26397. border: 1px solid #eee;
  26398. border-radius: 5px;
  26399. transition: width 2s;
  26400. -moz-transition: width 2s;
  26401. -webkit-transition: width 2s;
  26402. -o-transition: width 2s;
  26403. }
  26404. .chapter_upload_l_i {
  26405. background-image: url("../../../assets/icon.png");
  26406. background-position: 3px -165px;
  26407. width: 30px;
  26408. height: 30px;
  26409. margin: 10px auto 0 auto;
  26410. }
  26411. .course_input_box {
  26412. display: flex;
  26413. margin-right: 20px;
  26414. min-width: 400px;
  26415. width: calc(100% - 350px);
  26416. align-items: center;
  26417. position: relative;
  26418. margin-bottom: 15px;
  26419. }
  26420. .course_input_box2 {
  26421. display: flex;
  26422. width: 100%;
  26423. align-items: center;
  26424. position: relative;
  26425. flex-wrap: wrap;
  26426. }
  26427. .course_input_box>.binfo_input {
  26428. width: calc(100%);
  26429. margin: 0;
  26430. border: 1.5px solid rgb(202, 209, 220);
  26431. border-radius: 5px;
  26432. font-weight: 600;
  26433. padding: 12px 14px 12px 71px;
  26434. }
  26435. .bb_courseIcon {
  26436. width: 57px;
  26437. height: 45px;
  26438. background: #f0f4fa;
  26439. border-radius: 5px 0px 0px 5px;
  26440. display: flex;
  26441. align-items: center;
  26442. justify-content: center;
  26443. border-right: 1.5px solid rgb(202, 209, 220);
  26444. box-sizing: border-box;
  26445. position: absolute;
  26446. left: 1.5px;
  26447. }
  26448. .bb_courseIcon>img {
  26449. width: 25px;
  26450. height: auto;
  26451. }
  26452. .big_box {
  26453. /* margin-top: 20px; */
  26454. display: flex;
  26455. justify-content: space-between;
  26456. /* border-bottom: 1px solid #E0E2ED; */
  26457. }
  26458. .left_first {
  26459. display: flex;
  26460. flex-direction: column;
  26461. flex-wrap: nowrap;
  26462. width: calc(100% - 310px);
  26463. padding: 20px;
  26464. box-sizing: border-box;
  26465. background: #fff;
  26466. border-radius: 5px;
  26467. }
  26468. .right_first {
  26469. width: 300px;
  26470. display: flex;
  26471. align-items: center;
  26472. justify-content: center;
  26473. /* border-left: 1px solid #E0E2ED; */
  26474. box-sizing: border-box;
  26475. padding: 20px;
  26476. flex-direction: column;
  26477. background: #fff;
  26478. border-radius: 5px;
  26479. }
  26480. .ai_box {
  26481. width: 204px;
  26482. display: flex;
  26483. justify-content: flex-end;
  26484. margin-bottom: 15px;
  26485. }
  26486. .ai_content {
  26487. display: flex;
  26488. align-items: center;
  26489. font-size: 14px;
  26490. padding: 7px 20px;
  26491. box-sizing: border-box;
  26492. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  26493. border-radius: 12px;
  26494. font-weight: 700;
  26495. cursor: pointer;
  26496. }
  26497. .ai_content>img {
  26498. width: 40px;
  26499. margin-right: 5px;
  26500. }
  26501. .c_info_title {
  26502. padding: 15px 0 15px 0;
  26503. font-size: 16px;
  26504. font-weight: bold;
  26505. margin: 0 0 0 20px;
  26506. box-sizing: border-box;
  26507. display: flex;
  26508. align-items: center;
  26509. line-height: 20px;
  26510. }
  26511. .c_info_title::before {
  26512. content: "";
  26513. display: block;
  26514. width: 3px;
  26515. height: 20px;
  26516. background: #0061ff;
  26517. border-radius: 3px;
  26518. margin: 0 5px 0 0;
  26519. }
  26520. .right_title {
  26521. height: 30px;
  26522. padding: 15px 0 15px 20px;
  26523. border-bottom: 1px solid #f2f2f2;
  26524. font-size: 1.5em;
  26525. font-weight: bold;
  26526. color: #0f7eff;
  26527. margin: 0 auto;
  26528. }
  26529. .people {
  26530. border: 1px solid rgb(229 229 229);
  26531. /* height: 495px; */
  26532. height: 350px;
  26533. border-radius: 5px;
  26534. width: 100%;
  26535. overflow: auto;
  26536. }
  26537. .people_top {
  26538. display: flex;
  26539. width: 100%;
  26540. /* justify-content: space-between; */
  26541. /* align-items: center; */
  26542. flex-direction: column;
  26543. padding: 10px 10px 0;
  26544. box-sizing: border-box;
  26545. }
  26546. .people_nav,
  26547. .people_top_right {
  26548. /* padding: 20px 0 0 20px; */
  26549. }
  26550. .people_top_right {
  26551. height: 40px;
  26552. margin-bottom: 10px;
  26553. }
  26554. .people_search {
  26555. display: flex;
  26556. position: relative;
  26557. }
  26558. .people_search>>>.el-input__inner {
  26559. /* height: 25px; */
  26560. width: 100%;
  26561. }
  26562. .search_img {
  26563. width: 20px;
  26564. height: 20px;
  26565. position: absolute;
  26566. right: 10px;
  26567. top: 50%;
  26568. transform: translateY(-50%);
  26569. }
  26570. .search_img>img {
  26571. width: 100%;
  26572. height: 100%;
  26573. }
  26574. .people_name {
  26575. display: flex;
  26576. justify-content: flex-start;
  26577. padding: 20px 10px;
  26578. flex-direction: column;
  26579. flex-wrap: wrap;
  26580. }
  26581. .p_box {
  26582. position: relative;
  26583. }
  26584. .people_name>>>.el-checkbox {
  26585. width: 100%;
  26586. display: flex;
  26587. align-items: center;
  26588. margin-bottom: 10px;
  26589. }
  26590. .people_name>>>.el-checkbox__label {
  26591. text-overflow: ellipsis;
  26592. overflow: hidden;
  26593. width: calc(100%);
  26594. }
  26595. .people_name2>>>.el-checkbox__label {
  26596. width: calc(100% - 130px);
  26597. }
  26598. .inviteCode {
  26599. position: absolute;
  26600. right: 30px;
  26601. color: #237ade;
  26602. top: 0;
  26603. cursor: pointer;
  26604. font-size: 13px;
  26605. }
  26606. .noneInvite {
  26607. color: #a8a8a8;
  26608. }
  26609. .inviteImg {
  26610. position: absolute;
  26611. right: 5px;
  26612. top: 0;
  26613. width: 20px;
  26614. }
  26615. .right_img {
  26616. width: 150px;
  26617. height: 150px;
  26618. margin: 0 auto;
  26619. }
  26620. .right_img>img {
  26621. width: 100%;
  26622. height: 100%;
  26623. }
  26624. .number {
  26625. margin-top: 20px;
  26626. color: #4aa6ff;
  26627. text-decoration: underline;
  26628. }
  26629. .success_button {
  26630. display: flex;
  26631. text-align: center;
  26632. margin: 5% 0 auto;
  26633. flex-direction: row;
  26634. justify-content: center;
  26635. }
  26636. .look_course {
  26637. margin-right: 40px;
  26638. background: #3d67bc;
  26639. width: 200px;
  26640. height: 35px;
  26641. line-height: 35px;
  26642. color: #fff;
  26643. text-align: center;
  26644. font-size: 14px;
  26645. border-radius: 5px;
  26646. cursor: pointer;
  26647. }
  26648. .attend_others {
  26649. width: 250px;
  26650. background: #4fb13c;
  26651. height: 35px;
  26652. line-height: 35px;
  26653. color: #fff;
  26654. text-align: center;
  26655. font-size: 14px;
  26656. border-radius: 5px;
  26657. cursor: pointer;
  26658. }
  26659. .dialog_diy2>>>.el-dialog__body {
  26660. text-align: center;
  26661. }
  26662. .write_togother {
  26663. position: absolute;
  26664. right: 45px;
  26665. display: flex;
  26666. top: 5%;
  26667. }
  26668. .write_people {
  26669. font-size: 14px;
  26670. line-height: 50px;
  26671. padding-right: 10px;
  26672. }
  26673. .end_write {
  26674. background: #3d67bc;
  26675. color: #fff;
  26676. width: 100px;
  26677. height: 35px;
  26678. line-height: 35px;
  26679. text-align: center;
  26680. font-size: 14px;
  26681. border-radius: 5px;
  26682. cursor: pointer;
  26683. }
  26684. .chapter_upload+.chapter_upload {
  26685. /* margin-top: 15px; */
  26686. border-top: 1px solid #e7ebf1;
  26687. }
  26688. .chapter_upload {
  26689. height: 45px;
  26690. position: relative;
  26691. display: flex;
  26692. align-items: center;
  26693. width: 100%;
  26694. min-height: 45px;
  26695. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  26696. /* border-radius: 4px; */
  26697. /* overflow: hidden; */
  26698. box-sizing: border-box;
  26699. }
  26700. .chapter_upload_drag {
  26701. position: absolute;
  26702. cursor: pointer;
  26703. width: 16px;
  26704. height: 16px;
  26705. left: -9px;
  26706. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  26707. background-size: 100% 100%;
  26708. z-index: 10;
  26709. display: none;
  26710. }
  26711. .isNavStage>.chapter_upload_drag {
  26712. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  26713. }
  26714. .chapter_upload_t {
  26715. background-color: #fff;
  26716. position: absolute;
  26717. height: 100%;
  26718. top: 0px;
  26719. left: 0px;
  26720. box-sizing: border-box;
  26721. }
  26722. .chapter_upload_o {
  26723. width: 100%;
  26724. height: 100%;
  26725. position: relative;
  26726. z-index: 1;
  26727. }
  26728. .chapter_upload_ic {
  26729. margin: 0 15px 0px auto;
  26730. display: flex;
  26731. align-items: center;
  26732. }
  26733. .chapter_upload_type{
  26734. width: 80px;
  26735. min-width: 80px;
  26736. text-align: center;
  26737. font-size: 14px;
  26738. }
  26739. .chapter_upload_box_file{
  26740. height: calc(100% - 45px);
  26741. overflow: auto;
  26742. border-top: 1px solid #e7ebf1;
  26743. box-sizing: border-box;
  26744. }
  26745. .chapter_upload_ic_l {
  26746. width: 50px;
  26747. height: 50px;
  26748. float: left;
  26749. }
  26750. .chapter_upload_ic_l div {
  26751. width: 30px;
  26752. height: 35px;
  26753. background: url("../../../assets/icon/icon.png");
  26754. }
  26755. .chapter_upload_ic_edit {
  26756. height: 100%;
  26757. display: flex;
  26758. align-items: center;
  26759. cursor: pointer;
  26760. margin: 0 10px 0 0;
  26761. }
  26762. .chapter_upload_ic_edit div {
  26763. width: 18px;
  26764. height: 18px;
  26765. background-image: url("../../../assets/icon/new/edit_u.png");
  26766. background-size: 100% 100%;
  26767. }
  26768. .chapter_upload_ic_download {
  26769. height: 100%;
  26770. display: flex;
  26771. align-items: center;
  26772. cursor: pointer;
  26773. margin: 0;
  26774. }
  26775. .chapter_upload_ic_download div {
  26776. width: 18px;
  26777. height: 18px;
  26778. background-image: url("../../../assets/icon/course/download.svg");
  26779. background-size: 100% 100%;
  26780. }
  26781. .chapter_upload_ic_check {
  26782. height: 100%;
  26783. display: flex;
  26784. align-items: center;
  26785. cursor: pointer;
  26786. margin: 0 10px 0 0;
  26787. }
  26788. .chapter_upload_ic_check div {
  26789. width: 18px;
  26790. height: 18px;
  26791. background-image: url("../../../assets/icon/course/lookeye.svg");
  26792. background-size: 100% 100%;
  26793. }
  26794. .chapter_upload_ic_r {
  26795. height: 100%;
  26796. display: flex;
  26797. align-items: center;
  26798. cursor: pointer;
  26799. }
  26800. .chapter_upload_ic_r div {
  26801. width: 18px;
  26802. height: 18px;
  26803. background-image: url("../../../assets/icon/new/delete_u.png");
  26804. background-size: 100% 100%;
  26805. }
  26806. .chapter_upload_n {
  26807. display: flex;
  26808. text-indent: 10px;
  26809. text-decoration: none;
  26810. text-overflow: ellipsis;
  26811. white-space: nowrap;
  26812. overflow: hidden;
  26813. width: 55%;
  26814. margin-left: 10px;
  26815. cursor: pointer;
  26816. margin-top: 2px;
  26817. align-items: center;
  26818. }
  26819. .chapter_upload_n > .chapter_upload_box{
  26820. border: none;
  26821. outline: none;
  26822. max-width: 100%;
  26823. z-index: 99;
  26824. font-size: 14px;
  26825. white-space: nowrap;
  26826. overflow: hidden;
  26827. text-overflow: ellipsis;
  26828. color: #757575;
  26829. }
  26830. .chapter_upload_l_i2,
  26831. .chapter_upload_l_i3,
  26832. .chapter_upload_l_i8,
  26833. .chapter_upload_l_i6,
  26834. .chapter_upload_l_i12,
  26835. .chapter_upload_l_i14,
  26836. .chapter_upload_l_i15 {
  26837. width: 15px;
  26838. height: 15px;
  26839. background-size: 100% 100%;
  26840. }
  26841. .chapter_upload_l_i2 {
  26842. background-image: url("../../../assets/icon/new/u_word.png");
  26843. }
  26844. .chapter_upload_l_i3 {
  26845. background-image: url("../../../assets/icon/new/u_video.png");
  26846. }
  26847. .chapter_upload_l_i8 {
  26848. background-image: url("../../../assets/icon/new/u_url.png");
  26849. }
  26850. .chapter_upload_l_i14 {
  26851. background-image: url("../../../assets/icon/new/u_source.png");
  26852. }
  26853. .chapter_upload_l_i15 {
  26854. background-image: url("../../../assets/icon/new/appStore.png");
  26855. }
  26856. .chapter_upload_l_i6 {
  26857. background-image: url("../../../assets/icon/new/u_picture.png");
  26858. }
  26859. .chapter_upload_l_i12 {
  26860. background-image: url("../../../assets/icon/new/u_word.png");
  26861. }
  26862. .chapter_upload_l_i13 {
  26863. background-image: url("../../../assets/icon/new/u_img.png");
  26864. }
  26865. .chapter_upload_noSee {
  26866. background-image: url("../../../assets/icon/new/u_noUpload.png");
  26867. width: 18px;
  26868. height: 18px;
  26869. background-size: 100% 100%;
  26870. display: block;
  26871. margin-right: 10px;
  26872. }
  26873. .chapter_upload_ud {
  26874. display: flex;
  26875. flex-direction: row;
  26876. justify-content: center;
  26877. margin: 0 10px 0 0;
  26878. }
  26879. .chapter_upload_ud>.chapter_upload_up {
  26880. margin-bottom: 0;
  26881. margin-right: 10px;
  26882. }
  26883. .chapter_upload_down,
  26884. .chapter_upload_up {
  26885. width: 20px;
  26886. height: 20px;
  26887. background: #e4eaf2;
  26888. cursor: pointer;
  26889. margin: 0 auto;
  26890. border-radius: 5px;
  26891. display: flex;
  26892. justify-content: center;
  26893. align-items: center;
  26894. }
  26895. .chapter_upload_up::after,
  26896. .chapter_upload_down::after {
  26897. content: "";
  26898. background-image: url("../../../assets/icon/new/downBtn.png");
  26899. width: 13px;
  26900. height: 13px;
  26901. background-size: 100% 100%;
  26902. display: block;
  26903. }
  26904. .chapter_upload_up::after {
  26905. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  26906. }
  26907. .chapter_upload_up {
  26908. margin-bottom: 5px;
  26909. }
  26910. .chapter_upload_ud2 {
  26911. display: flex;
  26912. flex-direction: row;
  26913. justify-content: center;
  26914. margin: 0 10px 0 0;
  26915. }
  26916. .chapter_upload_ud2>.chapter_upload_up2 {
  26917. margin-bottom: 0;
  26918. margin-right: 10px;
  26919. }
  26920. .chapter_upload_down2,
  26921. .chapter_upload_up2 {
  26922. cursor: pointer;
  26923. margin: 0 auto;
  26924. border-radius: 5px;
  26925. display: flex;
  26926. justify-content: center;
  26927. align-items: center;
  26928. color: #717c8d;
  26929. font-size: 14px;
  26930. }
  26931. .chapter_upload_up2 {
  26932. margin-right: 10px;
  26933. }
  26934. .chapter_upload_up2::before,
  26935. .chapter_upload_down2::before {
  26936. content: "";
  26937. background-image: url("../../../assets/icon/new/c_down.png");
  26938. width: 14px;
  26939. height: 14px;
  26940. background-size: 100% 100%;
  26941. display: block;
  26942. margin-right: 5px;
  26943. }
  26944. .chapter_upload_up2::before {
  26945. background-image: url("../../../assets/icon/new/c_up.png") !important;
  26946. }
  26947. .addWordStyle {
  26948. display: flex;
  26949. flex-direction: row;
  26950. justify-content: flex-start;
  26951. overflow-x: auto;
  26952. white-space: nowrap;
  26953. flex-wrap: wrap;
  26954. }
  26955. /* table 样式 */
  26956. .cont>>>table {
  26957. border-top: 1px solid #ccc;
  26958. border-left: 1px solid #ccc;
  26959. }
  26960. .cont>>>table td,
  26961. .cont>>>table th {
  26962. border-bottom: 1px solid #ccc;
  26963. border-right: 1px solid #ccc;
  26964. /* padding: 20px 5px; */
  26965. padding: 5px 10px;
  26966. max-width: 0px;
  26967. height: 30px;
  26968. vertical-align: baseline;
  26969. }
  26970. .cont>>>table th {
  26971. border-bottom: 2px solid #ccc;
  26972. text-align: center;
  26973. }
  26974. /* blockquote 样式 */
  26975. .cont>>>blockquote {
  26976. display: block;
  26977. border-left: 8px solid #d0e5f2;
  26978. padding: 5px 10px;
  26979. margin: 10px 0;
  26980. line-height: 1.4;
  26981. font-size: 100%;
  26982. background-color: #f1f1f1;
  26983. }
  26984. /* code 样式 */
  26985. .cont>>>code {
  26986. display: inline-block;
  26987. /* *display: inline; */
  26988. zoom: 1;
  26989. background-color: #f1f1f1;
  26990. border-radius: 3px;
  26991. padding: 3px 5px;
  26992. margin: 0 3px;
  26993. }
  26994. .cont>>>pre code {
  26995. display: block;
  26996. }
  26997. /* ul ol 样式 */
  26998. .cont>>>ul,
  26999. ol {
  27000. margin: 10px 0 10px 20px;
  27001. }
  27002. .wordbox {
  27003. display: flex;
  27004. flex-wrap: wrap;
  27005. cursor: pointer;
  27006. width: 100%;
  27007. }
  27008. .checkword {
  27009. width: 22px;
  27010. height: 22px;
  27011. margin: 10px auto 0;
  27012. cursor: pointer;
  27013. }
  27014. .checkword img {
  27015. width: 100%;
  27016. }
  27017. .stepBg {
  27018. display: flex;
  27019. justify-content: space-between;
  27020. align-items: center;
  27021. background: #fff;
  27022. width: calc(100%);
  27023. margin: 0 auto;
  27024. }
  27025. .stepBorder {
  27026. height: 3px !important;
  27027. background: #cad1dc;
  27028. width: 100px !important;
  27029. margin: 0 15px !important;
  27030. position: relative;
  27031. }
  27032. .border-active {
  27033. background: #3681fc !important;
  27034. }
  27035. .border-active::before,
  27036. .border-active::after {
  27037. border-color: #3681fc !important;
  27038. }
  27039. .stepBorder::before,
  27040. .stepBorder::after {
  27041. content: "";
  27042. width: 9px;
  27043. height: 9px;
  27044. background: #ffffff;
  27045. opacity: 1;
  27046. border: 2px solid #acb4bf;
  27047. display: block;
  27048. box-sizing: border-box;
  27049. border-radius: 50%;
  27050. position: absolute;
  27051. top: 50%;
  27052. transform: translateY(-50%);
  27053. }
  27054. .stepBorder::after {
  27055. right: -9px;
  27056. }
  27057. .stepTop {
  27058. width: 100%;
  27059. /* border-radius: 10px; */
  27060. display: flex;
  27061. justify-content: center;
  27062. align-items: center;
  27063. flex-wrap: nowrap;
  27064. background: #fff;
  27065. /* top: 18%; */
  27066. height: 80px;
  27067. border-bottom: 2px solid rgb(228, 232, 237);
  27068. box-sizing: border-box;
  27069. }
  27070. .stepTop2 {
  27071. width: 100%;
  27072. /* border-radius: 10px; */
  27073. display: flex;
  27074. justify-content: center;
  27075. align-items: center;
  27076. flex-wrap: nowrap;
  27077. background: #fff;
  27078. /* top: 18%; */
  27079. height: 20px;
  27080. border-bottom: 2px solid rgb(228, 232, 237);
  27081. box-sizing: border-box;
  27082. overflow: hidden;
  27083. cursor: pointer;
  27084. }
  27085. .stepTop>div img {
  27086. width: 100%;
  27087. }
  27088. .stepTop>div {
  27089. height: 50px;
  27090. width: 180px;
  27091. cursor: pointer;
  27092. margin: 10px 0;
  27093. border-radius: 10px;
  27094. }
  27095. .first,
  27096. .second,
  27097. .third,
  27098. .four {
  27099. background: #3681fc;
  27100. height: 90px;
  27101. color: #fff;
  27102. display: flex;
  27103. flex-direction: row;
  27104. align-items: center;
  27105. justify-content: center;
  27106. }
  27107. .first>div:nth-child(1),
  27108. .second>div:nth-child(1),
  27109. .third>div:nth-child(1),
  27110. .four>div:nth-child(1) {
  27111. margin: 5px 10px 0 0;
  27112. width: 2rem;
  27113. }
  27114. .firstNo,
  27115. .secondNo,
  27116. .thirdNo,
  27117. .fourNo {
  27118. background: #e7e7e7;
  27119. color: #adadad;
  27120. display: flex;
  27121. flex-direction: row;
  27122. align-items: center;
  27123. justify-content: center;
  27124. }
  27125. .firstNo>div:nth-child(1),
  27126. .secondNo>div:nth-child(1),
  27127. .thirdNo>div:nth-child(1),
  27128. .fourNo>div:nth-child(1) {
  27129. margin: 5px 10px 0 0;
  27130. width: 2rem;
  27131. }
  27132. .uploadWidth>>>.el-upload {
  27133. width: 60px;
  27134. height: 60px;
  27135. position: relative;
  27136. }
  27137. .addPeople {
  27138. background: #fa6060;
  27139. width: 150px;
  27140. height: 40px;
  27141. color: #fff;
  27142. border-radius: 5px;
  27143. text-align: center;
  27144. line-height: 40px;
  27145. font-size: 14px;
  27146. cursor: pointer;
  27147. }
  27148. .kcImg {
  27149. width: 60px;
  27150. margin-left: 10px;
  27151. }
  27152. .zyImg {
  27153. width: 55px;
  27154. margin: 0 10px;
  27155. }
  27156. .deleteZy {
  27157. width: 20px;
  27158. position: absolute;
  27159. top: 5px;
  27160. right: 5px;
  27161. cursor: pointer;
  27162. }
  27163. .kcImg>img,
  27164. .zyImg>img,
  27165. .deleteZy>img {
  27166. width: 100%;
  27167. height: 100%;
  27168. }
  27169. .zyBox {
  27170. display: flex;
  27171. flex-direction: row;
  27172. align-items: center;
  27173. background: #67d37d;
  27174. color: #fff;
  27175. width: 210px;
  27176. margin: 20px 20px 0 0;
  27177. border-radius: 10px;
  27178. height: 70px;
  27179. position: relative;
  27180. }
  27181. .upCss {
  27182. display: flex;
  27183. flex-direction: row;
  27184. justify-content: flex-start;
  27185. }
  27186. .upCss>>>.el-icon-plus {
  27187. position: none !important;
  27188. width: 200px;
  27189. height: 100px;
  27190. display: flex;
  27191. flex-wrap: nowrap;
  27192. flex-direction: column;
  27193. align-items: center;
  27194. justify-content: center;
  27195. border: 1px dashed #ccc;
  27196. min-width: 78px;
  27197. min-height: 100px;
  27198. z-index: 999;
  27199. }
  27200. .upCss>>>.el-upload-list__item-name {
  27201. width: 100px;
  27202. white-space: nowrap;
  27203. overflow: hidden;
  27204. text-overflow: ellipsis;
  27205. }
  27206. .upCss>>>.el-upload-list__item .el-icon-close {
  27207. font-size: 20px;
  27208. z-index: 9999;
  27209. }
  27210. .addStageImg {
  27211. min-width: 20px;
  27212. min-height: 20px;
  27213. width: 20px;
  27214. height: 20px;
  27215. cursor: pointer;
  27216. }
  27217. .addHW {
  27218. width: 28px;
  27219. height: 28px;
  27220. cursor: pointer;
  27221. }
  27222. .addStageImg>img,
  27223. .addHW>img {
  27224. width: 100%;
  27225. height: 100%;
  27226. }
  27227. .addNewPP>>>.el-dialog__body {
  27228. padding: 5px 20px;
  27229. }
  27230. .addNewPP>>>.el-dialog {
  27231. margin-top: 5vh !important;
  27232. }
  27233. .addNewPP2>>>.el-dialog__body {
  27234. padding: 5px 0;
  27235. }
  27236. .addNewPP2>>>.el-dialog {
  27237. margin-top: 5vh !important;
  27238. }
  27239. .isHeight {
  27240. height: 680px;
  27241. }
  27242. .toolChoose {
  27243. display: flex;
  27244. /* width: 100%; */
  27245. flex-direction: row;
  27246. flex-wrap: wrap;
  27247. }
  27248. .tool,
  27249. .isToolChoose {
  27250. display: flex;
  27251. flex-direction: column;
  27252. flex-wrap: nowrap;
  27253. width: fit-content;
  27254. margin: 10px 0 10px 0;
  27255. align-items: center;
  27256. border: 2px solid #dbdbdb00;
  27257. padding: 10px 20px;
  27258. border-radius: 5px;
  27259. cursor: pointer;
  27260. /* box-shadow: 0 0 2px 0px #dedede; */
  27261. position: relative;
  27262. box-sizing: border-box;
  27263. }
  27264. .tool:hover {
  27265. border: 2px solid #a5c7ff;
  27266. }
  27267. .tool:hover>.noCTool {
  27268. display: block;
  27269. opacity: 0.5;
  27270. }
  27271. .isToolChoose {
  27272. border: 2px solid #438aff !important;
  27273. box-shadow: 0 0 2px 0px #438aff;
  27274. opacity: 1 !important;
  27275. }
  27276. .isCTool,
  27277. .noCTool {
  27278. width: 30px;
  27279. height: 30px;
  27280. position: absolute;
  27281. top: -4px;
  27282. right: -4px;
  27283. }
  27284. .noCTool {
  27285. display: none;
  27286. }
  27287. .isCTool>img,
  27288. .noCTool>img {
  27289. width: 100%;
  27290. height: 100%;
  27291. }
  27292. .tool+.tool {
  27293. margin-right: 10px;
  27294. }
  27295. .whiteBIcon {
  27296. width: 60px;
  27297. cursor: pointer;
  27298. display: flex;
  27299. flex-direction: column;
  27300. flex-wrap: nowrap;
  27301. align-items: center;
  27302. font-size: 14px;
  27303. }
  27304. .whiteBIcon>img,
  27305. .toolIcon>img,
  27306. .arrow>img {
  27307. width: 100%;
  27308. height: 100%;
  27309. }
  27310. .check img {
  27311. width: 20px;
  27312. height: 20px;
  27313. }
  27314. .whiteBIcon>img {
  27315. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  27316. border-radius: 15px;
  27317. }
  27318. .whiteBIcon>div:nth-child(2) {
  27319. height: 20px;
  27320. line-height: 20px;
  27321. text-align: center;
  27322. }
  27323. .check {
  27324. /* width: 20px;
  27325. height: 20px; */
  27326. cursor: pointer;
  27327. margin: 10px 0 0;
  27328. }
  27329. .checkDiv {
  27330. display: flex;
  27331. align-items: center;
  27332. }
  27333. .checkDiv span {
  27334. margin-left: 5px;
  27335. color: #858585;
  27336. }
  27337. .customWidth>>>.el-dialog {
  27338. min-width: 600px !important;
  27339. }
  27340. .CollaborativeCss {
  27341. width: 100%;
  27342. display: flex;
  27343. justify-content: center;
  27344. align-items: center;
  27345. box-sizing: border-box;
  27346. padding: 10px 0;
  27347. cursor: pointer;
  27348. }
  27349. .CollaborativeCss >>> .el-tooltip {
  27350. overflow: hidden;
  27351. white-space: nowrap;
  27352. text-overflow: ellipsis;
  27353. }
  27354. .CollaborativeCss2 {
  27355. background: #e0eafb;
  27356. color: #3681fc;
  27357. font-weight: 700;
  27358. border-radius: 5px;
  27359. }
  27360. .a_addBox {
  27361. margin: 10px 0;
  27362. background: #fff;
  27363. padding: 15px;
  27364. /* max-height: 600px; */
  27365. overflow: auto;
  27366. }
  27367. .a_add_box {
  27368. border-bottom: 2px solid #eee;
  27369. padding-bottom: 25px;
  27370. }
  27371. .a_add_head {
  27372. display: flex;
  27373. align-items: center;
  27374. justify-content: space-between;
  27375. margin: 10px 0 0 0;
  27376. font-size: 18px;
  27377. }
  27378. .a_add_checkType {
  27379. margin-top: 10px;
  27380. display: flex;
  27381. font-size: 14px;
  27382. align-items: center;
  27383. }
  27384. .a_add_checkType span {
  27385. box-sizing: border-box;
  27386. padding: 0 0 5px 0;
  27387. cursor: pointer;
  27388. }
  27389. .a_add_checkType span+span {
  27390. margin-left: 10px;
  27391. }
  27392. .a_add_checkType .active {
  27393. border-bottom: 2px solid #409eff;
  27394. color: #409eff;
  27395. }
  27396. .a_add_head .a_add_head_input {
  27397. /* width: 540px; */
  27398. width: 100%;
  27399. }
  27400. .a_add_head .a_add_head_div {
  27401. display: flex;
  27402. align-items: center;
  27403. justify-content: space-between;
  27404. }
  27405. .a_add_body {
  27406. display: flex;
  27407. /* align-items: center; */
  27408. align-items: flex-end;
  27409. }
  27410. .a_add_input {
  27411. display: flex;
  27412. align-items: center;
  27413. flex-wrap: wrap;
  27414. }
  27415. .a_add_input_choice {
  27416. flex-direction: column;
  27417. margin-right: 10px;
  27418. }
  27419. .a_add_input_choice>>>.el-radio {
  27420. display: flex;
  27421. align-items: center;
  27422. flex-direction: row-reverse;
  27423. margin: 30px 0 0 0;
  27424. position: relative;
  27425. }
  27426. .a_add_input_choice>>>.el-checkbox {
  27427. display: flex;
  27428. align-items: center;
  27429. flex-direction: row-reverse;
  27430. margin: 30px 0 0 0;
  27431. position: relative;
  27432. }
  27433. .width100 {
  27434. width: 100%;
  27435. }
  27436. .a_add_input .a_add_persent {
  27437. width: 100%;
  27438. }
  27439. .a_add_persent_div {
  27440. width: 100%;
  27441. display: flex;
  27442. align-items: center;
  27443. }
  27444. .a_add_persent_div span {
  27445. margin: 5px 0;
  27446. }
  27447. .a_add_persent_div span:nth-child(1) {
  27448. width: 30%;
  27449. }
  27450. .a_add_persent_div span:nth-child(2) {
  27451. width: 7%;
  27452. }
  27453. .a_add_persent_div span:nth-child(3) {
  27454. width: 40%;
  27455. }
  27456. .a_add_body_div {
  27457. display: flex;
  27458. align-items: center;
  27459. justify-content: center;
  27460. /* flex-direction: column; */
  27461. position: absolute;
  27462. right: -20px;
  27463. transform: translateX(100%);
  27464. }
  27465. .a_add_body_div>>>.el-button--primary {
  27466. background: #466b99;
  27467. border: none;
  27468. }
  27469. .all_choose {
  27470. display: flex;
  27471. flex-direction: row;
  27472. align-items: flex-start;
  27473. width: 100%;
  27474. }
  27475. .all_choose+.all_choose {
  27476. /* margin-top: 10px */
  27477. }
  27478. .all_choose>span {
  27479. min-width: fit-content;
  27480. display: block;
  27481. white-space: nowrap;
  27482. overflow: hidden;
  27483. text-overflow: ellipsis;
  27484. margin-right: 20px;
  27485. font-weight: bold;
  27486. font-size: 14px;
  27487. }
  27488. .all_choose>>>.el-checkbox-group {
  27489. display: flex;
  27490. flex-direction: row;
  27491. width: 100%;
  27492. flex-wrap: wrap;
  27493. align-content: center;
  27494. justify-content: flex-start;
  27495. align-items: center;
  27496. margin-top: 3px;
  27497. }
  27498. .all_choose>.el-checkbox-group>>>.el-checkbox {
  27499. margin-bottom: 10px;
  27500. display: flex;
  27501. flex-direction: row;
  27502. align-items: center;
  27503. margin-right: 10px;
  27504. }
  27505. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  27506. min-width: 80px;
  27507. overflow: hidden;
  27508. width: 80px;
  27509. text-overflow: ellipsis;
  27510. white-space: nowrap;
  27511. }
  27512. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  27513. width: auto;
  27514. }
  27515. .choose>div:nth-child(3)>span {
  27516. /* letter-spacing: 0 !important; */
  27517. }
  27518. .choose {
  27519. display: flex;
  27520. flex-direction: column;
  27521. flex-wrap: nowrap;
  27522. height: 100%;
  27523. justify-content: space-evenly;
  27524. align-items: flex-start;
  27525. }
  27526. .both {
  27527. display: flex;
  27528. flex-direction: row;
  27529. flex-wrap: wrap;
  27530. width: 100%;
  27531. align-items: center;
  27532. justify-content: flex-start;
  27533. margin: 0 0 15px;
  27534. }
  27535. .notice>>>.el-dialog {
  27536. width: 500px !important;
  27537. text-align: center;
  27538. }
  27539. .notice>>>.el-button {
  27540. margin-top: 20px;
  27541. }
  27542. .whiteBg {
  27543. /* background: #fff; */
  27544. border-radius: 10px;
  27545. }
  27546. .wb_j_box {
  27547. display: flex;
  27548. width: 100%;
  27549. padding: 0 20px 0;
  27550. box-sizing: border-box;
  27551. }
  27552. .wb_j_box_content {
  27553. width: calc(100% - 55% - 100px);
  27554. display: flex;
  27555. align-items: center;
  27556. }
  27557. .wb_j_box_p_box {
  27558. max-width: calc(100% - 200px);
  27559. word-break: break-all;
  27560. overflow: hidden;
  27561. margin: 0 0 0 10px;
  27562. font-size: 14px;
  27563. color: #6e6e6e;
  27564. z-index: 999;
  27565. }
  27566. .chooseWho {
  27567. display: flex;
  27568. width: 410px;
  27569. flex-direction: row;
  27570. flex-wrap: nowrap;
  27571. justify-content: space-between;
  27572. padding-bottom: 10px;
  27573. }
  27574. .chooseWho>div {
  27575. cursor: pointer;
  27576. padding-bottom: 10px;
  27577. font-weight: bold;
  27578. }
  27579. .isChooseActive {
  27580. color: #3e88f4;
  27581. border-bottom: 2px solid #2f80f3;
  27582. }
  27583. .toolSort {
  27584. display: flex;
  27585. flex-direction: row;
  27586. flex-wrap: wrap;
  27587. justify-content: flex-start;
  27588. align-items: flex-start;
  27589. }
  27590. .toolSort>div {
  27591. margin-right: 10px;
  27592. }
  27593. .tools {
  27594. width: 100%;
  27595. display: flex;
  27596. flex-direction: column;
  27597. flex-wrap: nowrap;
  27598. align-items: flex-start;
  27599. }
  27600. .leftTools,
  27601. .rightTools {
  27602. width: 50%;
  27603. }
  27604. .leftTools+.leftTools {
  27605. border-top: 1px solid #dbdbdb;
  27606. padding-top: 30px;
  27607. }
  27608. .rightTools {
  27609. display: flex;
  27610. flex-direction: row;
  27611. flex-wrap: nowrap;
  27612. justify-content: space-around;
  27613. }
  27614. .firstToolList {
  27615. display: flex;
  27616. flex-direction: column;
  27617. flex-wrap: nowrap;
  27618. align-items: center;
  27619. }
  27620. .iconList {
  27621. display: flex;
  27622. flex-direction: row;
  27623. flex-wrap: wrap;
  27624. justify-content: flex-start;
  27625. align-items: center;
  27626. margin: 20px 0 5px 0;
  27627. width: 240px;
  27628. min-width: 240px;
  27629. }
  27630. .iconTool {
  27631. display: flex;
  27632. flex-direction: column;
  27633. flex-wrap: nowrap;
  27634. align-items: center;
  27635. justify-content: flex-start;
  27636. margin: 15px 10px;
  27637. }
  27638. .toolIcon {
  27639. width: 50px;
  27640. }
  27641. .taskBorder {
  27642. /* border: 1px solid #CAD1DC; */
  27643. border-radius: 10px;
  27644. margin-top: 10px;
  27645. min-height: 670px;
  27646. position: relative;
  27647. background: #fff;
  27648. padding: 20px;
  27649. overflow: hidden;
  27650. box-sizing: border-box;
  27651. }
  27652. .smallTaskBorder {
  27653. height: 405px;
  27654. min-height: 405px !important;
  27655. overflow: hidden;
  27656. }
  27657. /* .taskBorder>div {
  27658. padding: 30px 30px 10px;
  27659. } */
  27660. .addTaskBorder {
  27661. /* border: 2px solid #5E9AFC; */
  27662. border-radius: 8px;
  27663. margin-top: 10px;
  27664. cursor: pointer;
  27665. /* height: 50px;
  27666. line-height: 50px; */
  27667. background: #fff;
  27668. padding: 15px 0;
  27669. display: flex;
  27670. align-items: center;
  27671. justify-content: center;
  27672. }
  27673. /* .addTaskBorder>div {
  27674. margin: 0 auto;
  27675. display: flex;
  27676. align-items: center;
  27677. justify-content: center;
  27678. }
  27679. .addTaskBorder>div>img {
  27680. width: 20px;
  27681. }
  27682. .addTaskBorder>div>span {
  27683. font-size: 16px;
  27684. margin-left: 10px;
  27685. color: #5E9AFC;
  27686. } */
  27687. .funBlock {
  27688. display: flex;
  27689. padding: 15px 0;
  27690. flex-direction: row;
  27691. justify-content: center;
  27692. align-items: center;
  27693. position: absolute;
  27694. right: 0;
  27695. bottom: 0;
  27696. background: #fff;
  27697. width: 100%;
  27698. height: 60px;
  27699. z-index: 9;
  27700. }
  27701. .fold {
  27702. display: flex;
  27703. margin: 0 20px;
  27704. flex-direction: row;
  27705. align-items: center;
  27706. cursor: pointer;
  27707. color: #2b7bff;
  27708. }
  27709. .arrow {
  27710. margin-right: 8px;
  27711. width: 16px;
  27712. height: 16px;
  27713. min-width: 16px;
  27714. min-height: 16px;
  27715. background-size: 100% 100%;
  27716. display: block;
  27717. background-image: url(../../../assets/icon/new/u_up.png);
  27718. /* border-left: 7px solid transparent;
  27719. border-bottom: 7px solid #717C8D;
  27720. border-top: 0px solid transparent;
  27721. border-right: 7px solid transparent; */
  27722. /* box-sizing: border-box; */
  27723. transition: all 0.3s;
  27724. }
  27725. .arrowZ {
  27726. transform: rotate(180deg);
  27727. }
  27728. .addToolFun {
  27729. display: flex;
  27730. width: 150px;
  27731. flex-direction: row;
  27732. align-items: center;
  27733. justify-content: center;
  27734. border: 2px dashed #cad1dc;
  27735. border-radius: 5px;
  27736. height: 50px;
  27737. margin: 35px auto 0;
  27738. cursor: pointer;
  27739. }
  27740. .addToolFun2 {
  27741. display: flex;
  27742. width: 150px;
  27743. border: 2px dashed #cad1dc;
  27744. flex-direction: row;
  27745. align-items: center;
  27746. justify-content: center;
  27747. border-radius: 5px;
  27748. height: 50px;
  27749. margin: 0 auto 0;
  27750. cursor: pointer;
  27751. }
  27752. .addToolFun2>div,
  27753. .addToolFun>div {
  27754. display: flex;
  27755. line-height: 50px;
  27756. }
  27757. .addToolImg {
  27758. width: 20px;
  27759. height: 20px;
  27760. margin-right: 10px;
  27761. }
  27762. .addToolsDia>>>.el-dialog__body {
  27763. padding: 20px;
  27764. }
  27765. .addToolsDia>>>.el-dialog__body>.toolChoose {
  27766. padding: 0;
  27767. }
  27768. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  27769. padding: 0;
  27770. border-bottom: none;
  27771. margin-bottom: 0;
  27772. }
  27773. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  27774. width: 100%;
  27775. }
  27776. .lineCss>>>.el-form-item__label {
  27777. width: auto !important;
  27778. }
  27779. .lineCss>>>.el-form-item__content {
  27780. margin-left: 50px !important;
  27781. }
  27782. .newSteps {
  27783. display: flex;
  27784. width: 100% !important;
  27785. /* height: 80px; */
  27786. cursor: pointer;
  27787. margin: 10px 0;
  27788. border-radius: 10px;
  27789. flex-direction: row;
  27790. align-content: center;
  27791. justify-content: center;
  27792. align-items: center;
  27793. margin: 0 !important;
  27794. }
  27795. /* 评价样式 */
  27796. .elist_css {
  27797. padding-bottom: 75px !important;
  27798. }
  27799. .elist_title {
  27800. margin-bottom: 10px;
  27801. }
  27802. .elist_input {
  27803. width: 100%;
  27804. }
  27805. .elist_input_box {
  27806. display: flex;
  27807. align-items: center;
  27808. flex-wrap: wrap;
  27809. }
  27810. .elist_input_box+.elist_input_box {
  27811. margin-top: 30px;
  27812. }
  27813. .elist_input .elist_input_box input {
  27814. font: inherit;
  27815. color: currentColor;
  27816. width: 100%;
  27817. /* max-width: calc(100% - 385px); */
  27818. max-width: calc(100% - 150px);
  27819. padding: 8px 14px;
  27820. display: block;
  27821. min-width: 0;
  27822. outline: none;
  27823. border: 1px solid rgba(0, 0, 0, 0.23);
  27824. border-radius: 4px;
  27825. box-sizing: border-box;
  27826. background: #fff;
  27827. margin: 0 20px 0 0;
  27828. }
  27829. .elist_input .elist_input_box span {
  27830. height: 36px;
  27831. line-height: 36px;
  27832. color: rgb(82, 82, 82);
  27833. min-width: 80px;
  27834. }
  27835. .elist_input .elist_input_box .remove {
  27836. height: 20px;
  27837. width: 20px;
  27838. min-height: 20px;
  27839. min-width: 20px;
  27840. background-size: 100% 100%;
  27841. background-position: unset;
  27842. margin-left: 5px;
  27843. }
  27844. .elist_input_box>>>.el-rate {
  27845. display: flex;
  27846. height: 36px;
  27847. align-items: center;
  27848. }
  27849. .elist_input_box .elist_inptu_text {
  27850. width: 100%;
  27851. display: flex;
  27852. align-items: center;
  27853. margin-top: 10px;
  27854. }
  27855. .elist_input_box .elist_inptu_text input {
  27856. /* width: 500px; */
  27857. width: 100%;
  27858. max-width: unset;
  27859. }
  27860. .elist_input_box>>>.el-rate__icon {
  27861. font-size: 24px;
  27862. }
  27863. .elist_btn {
  27864. margin-top: 10px;
  27865. }
  27866. .lineTitle {
  27867. /* margin-top: 15px; */
  27868. width: 110px;
  27869. font-size: 16px;
  27870. display: flex;
  27871. align-items: center;
  27872. line-height: 20px;
  27873. }
  27874. .lineTitle::before {
  27875. content: "";
  27876. display: block;
  27877. width: 3px;
  27878. height: 20px;
  27879. background: #0061ff;
  27880. border-radius: 3px;
  27881. margin: 0 5px 0 0;
  27882. }
  27883. .clineTitle::before {
  27884. content: "";
  27885. display: block;
  27886. min-width: 10px;
  27887. width: 10px;
  27888. height: 10px;
  27889. background: #0061ff;
  27890. border-radius: 50%;
  27891. margin: 0 5px 0 0;
  27892. }
  27893. .courseTop {
  27894. display: flex;
  27895. flex-direction: row;
  27896. justify-content: space-between;
  27897. align-items: center;
  27898. width: calc(100%);
  27899. margin: 0 auto;
  27900. padding: 10px 20px;
  27901. box-sizing: border-box;
  27902. position: absolute;
  27903. top: 0;
  27904. }
  27905. .stepsNav {
  27906. display: flex;
  27907. flex-direction: row;
  27908. justify-content: flex-start;
  27909. align-items: center;
  27910. }
  27911. .stepsWord {
  27912. font-size: 18px;
  27913. color: #fff;
  27914. font-weight: bold;
  27915. margin-left: auto;
  27916. background: rgb(15, 126, 255);
  27917. border-radius: 5px;
  27918. padding: 3px 25px;
  27919. box-sizing: border-box;
  27920. }
  27921. .stepBox {
  27922. width: calc(100% - 40px);
  27923. height: calc(100%);
  27924. overflow: hidden;
  27925. border-radius: 5px;
  27926. margin: 0 auto;
  27927. }
  27928. .rightBox {
  27929. width: calc(100%);
  27930. background: #f0f2f5;
  27931. /* border-radius: 10px; */
  27932. overflow: auto;
  27933. height: calc(100% - 150px);
  27934. margin: 0 auto;
  27935. position: relative;
  27936. box-sizing: border-box;
  27937. }
  27938. .e_add_top {
  27939. display: flex;
  27940. justify-content: space-between;
  27941. background: #fff;
  27942. position: absolute;
  27943. right: 20px;
  27944. height: 50px;
  27945. align-items: center;
  27946. }
  27947. .e_add_title2 {
  27948. display: flex;
  27949. align-items: center;
  27950. }
  27951. .e_add_title2 span {
  27952. width: 40px;
  27953. }
  27954. .e_add_title {
  27955. display: flex;
  27956. align-items: center;
  27957. color: #b8b8b8;
  27958. font-size: 18px;
  27959. position: relative;
  27960. height: 40px;
  27961. }
  27962. .e_add_title span {
  27963. margin-right: 10px;
  27964. }
  27965. .e_add_title .el_input {
  27966. width: 300px;
  27967. }
  27968. .e_add_title>>>.el-input__inner {
  27969. width: 400px;
  27970. }
  27971. .e_add_btn {}
  27972. .e_add_content {
  27973. display: flex;
  27974. width: 100%;
  27975. }
  27976. .e_add_list {
  27977. background: #fff;
  27978. height: 500px;
  27979. width: 210px;
  27980. position: relative;
  27981. margin: 15px 5px 0 0;
  27982. flex-shrink: 0;
  27983. display: flex;
  27984. flex-direction: column;
  27985. }
  27986. .e_add_list_title {
  27987. font-size: 20px;
  27988. width: 100%;
  27989. box-sizing: border-box;
  27990. padding: 15px 40px;
  27991. text-align: center;
  27992. border-bottom: 1px solid #eaeaea;
  27993. position: relative;
  27994. display: flex;
  27995. align-items: center;
  27996. justify-content: center;
  27997. height: 57px;
  27998. background: #f6f6f6;
  27999. }
  28000. .e_add_list_title span {
  28001. overflow: hidden;
  28002. white-space: nowrap;
  28003. text-overflow: ellipsis;
  28004. }
  28005. .e_add_list_title img {
  28006. position: absolute;
  28007. right: 15px;
  28008. width: 25px;
  28009. cursor: pointer;
  28010. top: 50%;
  28011. transform: translateY(-50%);
  28012. }
  28013. .e_add_list_body {
  28014. height: calc(100% - 187px);
  28015. overflow: auto;
  28016. }
  28017. .e_add_list_child {
  28018. width: 100%;
  28019. display: flex;
  28020. align-items: center;
  28021. justify-content: center;
  28022. position: relative;
  28023. box-sizing: border-box;
  28024. padding: 15px 40px;
  28025. text-align: center;
  28026. }
  28027. .e_add_list_child span {
  28028. overflow: hidden;
  28029. white-space: nowrap;
  28030. text-overflow: ellipsis;
  28031. cursor: pointer;
  28032. }
  28033. .e_add_list_child img {
  28034. position: absolute;
  28035. right: 10px;
  28036. width: 21px;
  28037. cursor: pointer;
  28038. top: 50%;
  28039. transform: translateY(-50%);
  28040. }
  28041. .e_add_list_child+.e_add_list_child {
  28042. border-top: 1px solid #eaeaea;
  28043. }
  28044. .e_add_list_child .active {
  28045. color: #409eff;
  28046. }
  28047. .e_add_list_btn {
  28048. position: absolute;
  28049. bottom: 0;
  28050. height: 50px;
  28051. background: rgb(120, 120, 254);
  28052. width: 100%;
  28053. color: #fff;
  28054. font-size: 16px;
  28055. text-align: center;
  28056. line-height: 50px;
  28057. cursor: pointer;
  28058. }
  28059. .e_add_list_detail {
  28060. position: absolute;
  28061. bottom: 0;
  28062. height: 130px;
  28063. background: rgb(120, 120, 254);
  28064. width: 100%;
  28065. color: #fff;
  28066. font-size: 16px;
  28067. display: flex;
  28068. align-items: center;
  28069. justify-content: center;
  28070. }
  28071. .e_add_list_detail textarea {
  28072. height: 90%;
  28073. width: 95%;
  28074. border: none;
  28075. resize: none;
  28076. outline: none;
  28077. padding: 5px;
  28078. box-sizing: border-box;
  28079. }
  28080. .e_add_list_pbox {
  28081. width: 100%;
  28082. }
  28083. .e_add_list_pbox_title {
  28084. height: 50px;
  28085. background: #fff;
  28086. display: flex;
  28087. align-items: center;
  28088. width: 100%;
  28089. box-sizing: border-box;
  28090. padding: 0 20px;
  28091. flex-direction: row;
  28092. flex-wrap: wrap;
  28093. }
  28094. .type_title {
  28095. font-size: 18px;
  28096. font-weight: 700;
  28097. }
  28098. .type_content {
  28099. font-size: 16px;
  28100. margin-left: 30px;
  28101. }
  28102. .type_content span+span {
  28103. margin-left: 20px;
  28104. }
  28105. .type_content span {
  28106. cursor: pointer;
  28107. padding-bottom: 5px;
  28108. box-sizing: border-box;
  28109. }
  28110. .type_content .active {
  28111. color: #409eff;
  28112. border-bottom: 2px solid #409eff;
  28113. }
  28114. .e_add_list_pbox_content {
  28115. height: calc(100% - 50px);
  28116. display: flex;
  28117. align-items: center;
  28118. width: 100%;
  28119. background: #fff;
  28120. }
  28121. .mbCss {
  28122. width: 100%;
  28123. display: flex;
  28124. flex-direction: row;
  28125. flex-wrap: nowrap;
  28126. align-content: center;
  28127. align-items: flex-start;
  28128. justify-content: flex-start;
  28129. }
  28130. .pjCss {
  28131. /* width: 42%; */
  28132. width: calc(100% - 55%);
  28133. display: flex;
  28134. flex-direction: column;
  28135. flex-wrap: nowrap;
  28136. align-items: flex-start;
  28137. }
  28138. .e_box {
  28139. /* display: flex; */
  28140. flex-wrap: wrap;
  28141. max-height: 500px;
  28142. align-items: flex-start;
  28143. overflow: auto;
  28144. width: 100%;
  28145. }
  28146. .e_card {
  28147. border: 1px solid #ccc;
  28148. background: #fff;
  28149. margin-right: 20px;
  28150. width: 270px;
  28151. display: flex;
  28152. flex-direction: column;
  28153. align-items: center;
  28154. border-radius: 5px;
  28155. margin-top: 10px;
  28156. text-align: center;
  28157. }
  28158. .e_card_picture {
  28159. margin: 10px 0;
  28160. }
  28161. .e_card_picture>img {
  28162. width: 50px;
  28163. }
  28164. .e_card_name {
  28165. width: 100%;
  28166. padding: 0 10px;
  28167. box-sizing: border-box;
  28168. margin-bottom: 10px;
  28169. overflow: hidden;
  28170. text-overflow: ellipsis;
  28171. white-space: nowrap;
  28172. }
  28173. .e_card_time {
  28174. width: 100%;
  28175. padding: 0 10px;
  28176. box-sizing: border-box;
  28177. font-size: 15px;
  28178. color: #c3c3c3;
  28179. margin-bottom: 10px;
  28180. }
  28181. .e_card_btn {
  28182. height: 40px;
  28183. display: flex;
  28184. align-items: center;
  28185. width: 100%;
  28186. background: rgb(244, 244, 244);
  28187. }
  28188. .e_card_btn:hover {
  28189. background: rgb(221 221 221);
  28190. }
  28191. .e_card_btn span {
  28192. flex: 1 1 auto;
  28193. text-align: center;
  28194. cursor: pointer;
  28195. }
  28196. .addEva {
  28197. border: 1px solid #ccc;
  28198. background: #fff;
  28199. margin-right: 20px;
  28200. width: 270px;
  28201. height: 149px;
  28202. display: flex;
  28203. flex-direction: column;
  28204. align-items: center;
  28205. border-radius: 5px;
  28206. margin-top: 10px;
  28207. text-align: center;
  28208. cursor: pointer;
  28209. justify-content: center;
  28210. }
  28211. .addEva>img {
  28212. width: 50px;
  28213. object-fit: cover;
  28214. }
  28215. .uploadFm {
  28216. border: 1px dashed #ccc;
  28217. width: 100%;
  28218. height: 140px;
  28219. position: relative;
  28220. cursor: pointer;
  28221. display: flex;
  28222. flex-direction: column;
  28223. justify-content: center;
  28224. align-items: center;
  28225. font-size: 14px;
  28226. color: #6e6e6e;
  28227. position: relative;
  28228. }
  28229. .cover_p {
  28230. width: 100% !important;
  28231. height: 100%;
  28232. object-fit: cover;
  28233. }
  28234. .uploadFm2:hover .cover_mask {
  28235. display: flex !important;
  28236. }
  28237. .cover_mask {
  28238. display: none;
  28239. width: 100%;
  28240. height: 100%;
  28241. position: absolute;
  28242. background: #00000054;
  28243. align-items: center;
  28244. justify-content: center;
  28245. flex-direction: column;
  28246. }
  28247. .cover_mask>img {
  28248. width: 30px;
  28249. }
  28250. .cover_mask>span {
  28251. color: #fff;
  28252. font-size: 12px;
  28253. }
  28254. .uploadFm>img {
  28255. width: 50px;
  28256. }
  28257. .fileCss {
  28258. width: 100%;
  28259. display: flex;
  28260. flex-direction: row;
  28261. flex-wrap: nowrap;
  28262. justify-content: space-around;
  28263. align-items: center;
  28264. padding-top: 15px;
  28265. }
  28266. .fileCss>div {
  28267. display: flex;
  28268. flex-direction: column;
  28269. align-items: center;
  28270. }
  28271. .fileCss .spanName {
  28272. margin-top: 10px;
  28273. }
  28274. .sysPicBox {
  28275. display: flex;
  28276. flex-direction: row;
  28277. flex-wrap: wrap;
  28278. align-content: flex-start;
  28279. height: 435px;
  28280. overflow: auto;
  28281. position: relative;
  28282. }
  28283. .picNone {
  28284. position: absolute;
  28285. left: 50%;
  28286. top: 45%;
  28287. transform: translate(-50%, -50%);
  28288. width: fit-content;
  28289. color: #9c9c9c;
  28290. }
  28291. .sysPic {
  28292. width: 200px;
  28293. height: 115px;
  28294. margin: 0 20px 20px 0;
  28295. cursor: pointer;
  28296. }
  28297. .sysPic>img,
  28298. .isSysPic>img,
  28299. .deletePic>img {
  28300. width: 100%;
  28301. height: 100%;
  28302. object-fit: cover;
  28303. }
  28304. .isSysPic {
  28305. width: 200px;
  28306. height: 115px;
  28307. position: relative;
  28308. }
  28309. .deletePic {
  28310. width: 20px;
  28311. height: 20px;
  28312. position: absolute;
  28313. top: 0;
  28314. right: 0;
  28315. cursor: pointer;
  28316. }
  28317. .select_box1 {
  28318. height: 100%;
  28319. }
  28320. .select_box1_img {
  28321. background: #fff;
  28322. border-radius: 5px;
  28323. padding: 15px;
  28324. box-sizing: border-box;
  28325. margin-bottom: 20px;
  28326. }
  28327. .select_box1_title {
  28328. padding: 0 0 15px 0;
  28329. border-bottom: 1px solid #eee;
  28330. margin-bottom: 15px;
  28331. }
  28332. .select_box1_title span:nth-child(1) {
  28333. font-size: 16px;
  28334. margin-right: 20px;
  28335. color: #000;
  28336. }
  28337. .select_box1_title span:nth-child(2) {
  28338. font-size: 14px;
  28339. color: rgb(112, 112, 112);
  28340. }
  28341. .select_box1_add_img {}
  28342. .select_box1_select {
  28343. background: #fff;
  28344. border-radius: 5px;
  28345. padding: 15px;
  28346. box-sizing: border-box;
  28347. height: calc(100% - 200px);
  28348. overflow: auto;
  28349. }
  28350. .select_box2 {
  28351. height: 100%;
  28352. }
  28353. .select_box2_title {
  28354. background: #fff;
  28355. border-radius: 5px;
  28356. padding: 5px 10px;
  28357. box-sizing: border-box;
  28358. margin-bottom: 10px;
  28359. }
  28360. .select_box2_box {
  28361. display: flex;
  28362. height: calc(100% - 30px);
  28363. }
  28364. .select_box2_img {
  28365. width: calc(100% - 310px);
  28366. height: 100%;
  28367. overflow: auto;
  28368. background: #fff;
  28369. border-radius: 5px;
  28370. }
  28371. .select_box2_img img {
  28372. width: 100%;
  28373. }
  28374. .select_box2_answer {
  28375. background: #fff;
  28376. margin-left: 10px;
  28377. border-radius: 5px;
  28378. width: 300px;
  28379. overflow: auto;
  28380. height: 100%;
  28381. display: flex;
  28382. flex-direction: column;
  28383. align-items: center;
  28384. padding-top: 10px;
  28385. box-sizing: border-box;
  28386. }
  28387. .select_box2_answer_box {
  28388. margin: 0 0 10px 0;
  28389. width: 85%;
  28390. }
  28391. .rate_textarea {
  28392. font: inherit;
  28393. color: currentColor;
  28394. width: 100%;
  28395. padding: 8px 14px;
  28396. display: block;
  28397. min-width: 0;
  28398. outline: none;
  28399. border: 1px solid rgba(0, 0, 0, 0.23);
  28400. border-radius: 4px;
  28401. box-sizing: border-box;
  28402. background: #fff;
  28403. margin: 0 20px 0 0;
  28404. resize: none;
  28405. }
  28406. .select_answer_title {
  28407. text-align: left;
  28408. width: 85%;
  28409. margin-bottom: 10px;
  28410. font-size: 18px;
  28411. color: #8e8e8e;
  28412. }
  28413. .mask {
  28414. background-color: rgb(0 0 0 / 30%);
  28415. /* position: fixed; */
  28416. position: absolute;
  28417. top: 0;
  28418. left: 0;
  28419. width: 100%;
  28420. height: 100%;
  28421. z-index: 90;
  28422. display: flex;
  28423. align-items: center;
  28424. justify-content: center;
  28425. }
  28426. .progressBox {
  28427. width: 300px;
  28428. height: 150px;
  28429. background: #fff;
  28430. border-radius: 10px;
  28431. box-shadow: 0 0 6px 1px #bfbfbf;
  28432. display: flex;
  28433. align-items: center;
  28434. justify-content: center;
  28435. flex-direction: column;
  28436. position: relative;
  28437. color: #6c6c6c;
  28438. }
  28439. .progressBox>>>.el-progress-bar__outer {
  28440. background-color: #d1dfff !important;
  28441. }
  28442. .progressBox .lbox {
  28443. height: 50px;
  28444. font-size: 19px;
  28445. display: flex;
  28446. align-items: center;
  28447. color: #747474;
  28448. }
  28449. .progressBox .lbox img {
  28450. width: 40px;
  28451. margin-right: 20px;
  28452. }
  28453. .closeCss {
  28454. position: absolute;
  28455. top: 8px;
  28456. right: 8px;
  28457. cursor: pointer;
  28458. width: 20px;
  28459. height: 20px;
  28460. }
  28461. .closeCss>img {
  28462. width: 100%;
  28463. height: 100%;
  28464. }
  28465. .updateTips::before {
  28466. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  28467. font-size: 14px;
  28468. margin-left: 20px;
  28469. font-weight: 400;
  28470. color: #ff3a3a;
  28471. margin-bottom: 10px;
  28472. display: block;
  28473. }
  28474. .updateMask {
  28475. width: 100%;
  28476. z-index: 3;
  28477. top: 0;
  28478. position: absolute;
  28479. /* background-color: rgba(0,0,0,.3); */
  28480. }
  28481. .t_j_box {
  28482. display: flex;
  28483. }
  28484. .t_j_box span:nth-child(1) {
  28485. width: 15%;
  28486. overflow: hidden;
  28487. margin-right: 10px;
  28488. text-overflow: ellipsis;
  28489. white-space: nowrap;
  28490. }
  28491. .t_j_box span:nth-child(2) {
  28492. width: 30%;
  28493. overflow: hidden;
  28494. text-overflow: ellipsis;
  28495. margin-right: 10px;
  28496. }
  28497. .t_j_box span:nth-child(3) {
  28498. max-width: calc(55% - 20px);
  28499. overflow: hidden;
  28500. text-overflow: ellipsis;
  28501. }
  28502. .sentenBox {
  28503. background: #fff;
  28504. height: 600px;
  28505. overflow: auto;
  28506. background-image: url("../../../assets/icon/conSentences/csBg.png");
  28507. background-position: 102%;
  28508. background-repeat: no-repeat;
  28509. background-size: 60%;
  28510. }
  28511. .sentenBox>.sentenContent {
  28512. padding-bottom: 10px;
  28513. width: 97%;
  28514. margin: 0 auto;
  28515. }
  28516. .sentenBox>.sentenContent+.sentenContent {
  28517. border-top: 1px solid #cbcbcb;
  28518. }
  28519. .addSen {
  28520. background: #409efe;
  28521. width: 90px;
  28522. color: #fff;
  28523. height: 35px;
  28524. text-align: center;
  28525. line-height: 35px;
  28526. border-radius: 5px;
  28527. float: right;
  28528. margin: 10px 20px 0 0;
  28529. cursor: pointer;
  28530. }
  28531. .sentenTop {
  28532. display: flex;
  28533. flex-direction: row;
  28534. flex-wrap: nowrap;
  28535. align-items: center;
  28536. }
  28537. .sentenTop::before {
  28538. content: attr(index);
  28539. background: #3681fc;
  28540. border-radius: 50%;
  28541. color: #fff;
  28542. width: 25px;
  28543. height: 25px;
  28544. min-width: 25px;
  28545. min-height: 25px;
  28546. text-align: center;
  28547. line-height: 25px;
  28548. margin-right: 5px;
  28549. }
  28550. .sentenTop>div:nth-child(2) {
  28551. width: 300px;
  28552. margin: 0 15px;
  28553. }
  28554. .sentenTop>div:nth-child(3) {
  28555. background: #409efe;
  28556. color: #fff;
  28557. width: 65px;
  28558. height: 35px;
  28559. text-align: center;
  28560. line-height: 35px;
  28561. border-radius: 5px;
  28562. cursor: pointer;
  28563. }
  28564. .cardList {
  28565. padding: 30px 0 20px 0;
  28566. display: flex;
  28567. flex-direction: row;
  28568. flex-wrap: wrap;
  28569. align-items: center;
  28570. box-sizing: border-box;
  28571. border-bottom: 1px solid #f4f4f4;
  28572. width: 98%;
  28573. margin: 0 auto;
  28574. }
  28575. .rightCardList {
  28576. display: flex;
  28577. flex-wrap: wrap;
  28578. }
  28579. .cardBox {
  28580. display: flex;
  28581. flex-direction: row;
  28582. flex-wrap: wrap;
  28583. align-items: center;
  28584. align-content: center;
  28585. }
  28586. .isCard,
  28587. .isCard1 {
  28588. width: auto;
  28589. padding: 0 20px;
  28590. height: 65px;
  28591. text-align: center;
  28592. line-height: 65px;
  28593. font-size: 14px;
  28594. cursor: pointer;
  28595. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  28596. background-size: 100% 100%;
  28597. position: relative;
  28598. z-index: 99;
  28599. }
  28600. .isCard1 {
  28601. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  28602. }
  28603. .isCard:hover .deleteWord {
  28604. display: block;
  28605. }
  28606. .isCard>div:nth-child(1),
  28607. .isCard1>div:nth-child(1) {
  28608. white-space: nowrap;
  28609. overflow: hidden;
  28610. text-overflow: ellipsis;
  28611. width: 100%;
  28612. margin: 0 auto;
  28613. }
  28614. .card {
  28615. width: 140px;
  28616. height: 65px;
  28617. }
  28618. .card>img {
  28619. width: 100%;
  28620. height: 100%;
  28621. }
  28622. .rightCardBox {
  28623. width: 98%;
  28624. margin: 10px auto 0;
  28625. }
  28626. .rightCardBox>div:nth-child(1) {
  28627. margin-bottom: 10px;
  28628. }
  28629. .cardCss {
  28630. display: flex;
  28631. flex-direction: column;
  28632. flex-wrap: nowrap;
  28633. align-items: center;
  28634. border-bottom: 3px solid #b4c3d3;
  28635. padding: 0 0 5px 0;
  28636. /* margin-right: 10px; */
  28637. }
  28638. .cardCss>div:nth-child(2) {
  28639. background: #5b7b9d;
  28640. color: #fff;
  28641. width: 20px;
  28642. height: 20px;
  28643. border-radius: 50%;
  28644. text-align: center;
  28645. line-height: 20px;
  28646. }
  28647. .sentenTopBox {
  28648. display: flex;
  28649. flex-direction: row;
  28650. flex-wrap: nowrap;
  28651. align-items: center;
  28652. justify-content: space-between;
  28653. padding: 55px 0 0 20px;
  28654. box-sizing: border-box;
  28655. width: 85%;
  28656. }
  28657. .rb_c_ai_box,
  28658. .stepsBottom {
  28659. width: 100%;
  28660. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  28661. /* background: #f7f7f7; */
  28662. border-radius: 10px;
  28663. overflow: hidden;
  28664. /* height: 100%; */
  28665. height: calc(100% - 55px);
  28666. }
  28667. .navTop {
  28668. background: #53749b;
  28669. color: #fff;
  28670. height: 40px;
  28671. line-height: 40px;
  28672. padding-left: 15px;
  28673. font-size: 18px;
  28674. }
  28675. .navBottom {
  28676. /* background: #6b91b7; */
  28677. height: 100%;
  28678. overflow: auto;
  28679. padding: 10px 0;
  28680. }
  28681. .navStage {
  28682. display: flex;
  28683. flex-direction: row;
  28684. flex-wrap: nowrap;
  28685. align-items: center;
  28686. padding: 10px 10px 10px 0;
  28687. cursor: pointer;
  28688. background: #ffffff;
  28689. width: 95%;
  28690. margin: 5px auto 5px;
  28691. box-sizing: border-box;
  28692. border-radius: 5px;
  28693. flex-wrap: wrap;
  28694. position: relative;
  28695. }
  28696. .navStage:hover>.chapter_upload_drag {
  28697. display: block;
  28698. }
  28699. .navTask:hover>.chapter_upload_drag {
  28700. display: block;
  28701. }
  28702. .chapter_upload:hover>.chapter_upload_drag {
  28703. display: block;
  28704. }
  28705. .navStage::before {
  28706. content: "";
  28707. display: block;
  28708. width: 16px;
  28709. height: 16px;
  28710. background-image: url(../../../assets/icon/new/icon_stage.png);
  28711. background-size: 100%;
  28712. margin-left: 25px;
  28713. }
  28714. .navStage .chapter_unit_open {
  28715. content: "";
  28716. display: block;
  28717. width: 16px;
  28718. height: 16px;
  28719. background-image: url(../../../assets/icon/new/down.png);
  28720. transform: rotate(-90deg);
  28721. background-size: 100%;
  28722. margin-left: 10px;
  28723. transition: all 0.5s;
  28724. }
  28725. .isNavStageOpen .chapter_unit_open {
  28726. transform: rotate(0deg);
  28727. }
  28728. .isNavStage {
  28729. background: #0061ff;
  28730. }
  28731. .isNavStage::before {
  28732. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  28733. }
  28734. .isNavStage .chapter_unit_open {
  28735. background-image: url(../../../assets/icon/new/downC.png);
  28736. }
  28737. .isNavStage .nt_taskName {
  28738. font-weight: bold !important;
  28739. color: #ffffff !important;
  28740. }
  28741. .isNavStage .nt_taskTitle {
  28742. font-weight: bold !important;
  28743. color: #fff !important;
  28744. }
  28745. .navStage .nt_taskBox {
  28746. width: calc(100% - 68px);
  28747. padding: 0 0 0 5px;
  28748. box-sizing: border-box;
  28749. box-sizing: border-box;
  28750. display: flex;
  28751. flex-direction: row;
  28752. flex-wrap: nowrap;
  28753. align-items: baseline;
  28754. }
  28755. .navStage .nt_taskTitle {
  28756. color: #060e17;
  28757. line-height: 25px;
  28758. font-size: 16px;
  28759. }
  28760. .navStage .nt_taskName {
  28761. max-width: calc(100% - 82px);
  28762. white-space: nowrap;
  28763. overflow: hidden;
  28764. text-overflow: ellipsis;
  28765. font-size: 16px;
  28766. color: #060e17;
  28767. }
  28768. .navTask {
  28769. display: flex;
  28770. flex-direction: row;
  28771. flex-wrap: nowrap;
  28772. align-items: center;
  28773. padding: 10px 10px 10px 0;
  28774. cursor: pointer;
  28775. background: #ffffff;
  28776. width: 95%;
  28777. margin: 5px auto 5px;
  28778. box-sizing: border-box;
  28779. border-radius: 5px;
  28780. flex-wrap: wrap;
  28781. position: relative;
  28782. }
  28783. .navTask .chapter_upload_open {
  28784. content: "";
  28785. display: block;
  28786. width: 16px;
  28787. height: 16px;
  28788. background-image: url(../../../assets/icon/new/icon_arrow.png);
  28789. background-size: 100%;
  28790. margin-left: 23px;
  28791. }
  28792. .noImage .chapter_upload_open {
  28793. display: none;
  28794. background-image: unset !important;
  28795. }
  28796. .isNavOpen .chapter_upload_open {
  28797. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  28798. transform: rotate(90deg);
  28799. }
  28800. .isNavTask .chapter_upload_open {
  28801. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  28802. transform: rotate(-90deg);
  28803. }
  28804. .isNavTask.isNavOpen .chapter_upload_open {
  28805. transform: rotate(0deg);
  28806. }
  28807. .dragOverTop {
  28808. border-top: 2px solid #0061ff !important;
  28809. border-radius: 0 !important;
  28810. margin-top: 10px;
  28811. }
  28812. .dragOverBottom {
  28813. border-bottom: 2px solid #0061ff !important;
  28814. border-radius: 0 !important;
  28815. margin-top: 10px;
  28816. }
  28817. .dragOverTop2 {
  28818. border-top: 2px solid #0061ff !important;
  28819. border-radius: 0 !important;
  28820. }
  28821. .dragOverBottom2 {
  28822. border-bottom: 2px solid #0061ff !important;
  28823. border-radius: 0 !important;
  28824. }
  28825. .isNavTask {
  28826. /* background: #3681FC; */
  28827. background: #eef3fb;
  28828. }
  28829. .isNavTask>.chapter_upload_drag {
  28830. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  28831. }
  28832. .isNavTask .nt_taskName {
  28833. /* color: #fff !important; */
  28834. font-weight: bold !important;
  28835. color: #0061ff !important;
  28836. }
  28837. .isNavTask .nt_taskTitle {
  28838. /* color: #AECCFE !important; */
  28839. font-weight: bold !important;
  28840. color: #0061ff !important;
  28841. }
  28842. .navTask .nt_taskBox {
  28843. width: calc(100% - 40px);
  28844. padding: 0 0 0 5px;
  28845. box-sizing: border-box;
  28846. box-sizing: border-box;
  28847. display: flex;
  28848. flex-direction: row;
  28849. flex-wrap: nowrap;
  28850. align-items: baseline;
  28851. }
  28852. .navTask .nt_taskTitle {
  28853. /* color: #717C8D; */
  28854. color: #060e17;
  28855. line-height: 25px;
  28856. font-size: 16px;
  28857. /* min-width: 66px; */
  28858. }
  28859. .navTask .nt_taskName {
  28860. /* color: #fff; */
  28861. /* max-width: 130px; */
  28862. /* width: 100%; */
  28863. max-width: calc(100% - 66px);
  28864. font-size: 16px;
  28865. color: #060e17;
  28866. /* color: #0E1E33; */
  28867. }
  28868. .navTask .nt_taskName span {
  28869. width: 100%;
  28870. white-space: nowrap;
  28871. overflow: hidden;
  28872. text-overflow: ellipsis;
  28873. display: block;
  28874. }
  28875. .gjBox {
  28876. width: calc(100% - 25px);
  28877. padding: 0 0 0 0;
  28878. box-sizing: border-box;
  28879. border-left: 1px solid #cad1dc;
  28880. margin-left: 25px;
  28881. }
  28882. .gjBox>div {
  28883. display: flex;
  28884. align-items: center;
  28885. }
  28886. .gjBox>div::before {
  28887. content: "";
  28888. height: 1px;
  28889. width: 10px;
  28890. background: #cad1dc;
  28891. display: block;
  28892. margin-right: 5px;
  28893. }
  28894. .gjCss {
  28895. display: flex;
  28896. flex-direction: row;
  28897. flex-wrap: nowrap;
  28898. align-items: center;
  28899. padding: 15px 0;
  28900. box-sizing: border-box;
  28901. font-size: 14px;
  28902. cursor: pointer;
  28903. }
  28904. .isGjCss {
  28905. color: #0061ff;
  28906. }
  28907. .groupBox {}
  28908. .groupContent+.groupContent {
  28909. margin-top: 30px;
  28910. }
  28911. .groupTitle {
  28912. font-size: 24px;
  28913. color: rgb(80, 80, 80);
  28914. margin-bottom: 20px;
  28915. }
  28916. .groupName {
  28917. display: flex;
  28918. align-items: center;
  28919. }
  28920. .groupn {
  28921. font-size: 15px;
  28922. margin-right: 10px;
  28923. }
  28924. .groupName+.groupName {
  28925. margin-top: 15px;
  28926. }
  28927. .groupBtn {
  28928. margin-left: 10px;
  28929. }
  28930. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  28931. text-align: left;
  28932. }
  28933. .radioBox>div {
  28934. margin: 10px 0 0 10px;
  28935. }
  28936. .radioBox>>>.el-radio__input,
  28937. .radioBox>>>.el-checkbox__inner {
  28938. margin-left: 10px;
  28939. }
  28940. .radioBox>>>.el-radio__label,
  28941. .radioBox>>>.el-checkbox__label {
  28942. display: flex;
  28943. align-items: center;
  28944. }
  28945. .inImg {
  28946. width: 50px;
  28947. }
  28948. .inImg>img {
  28949. width: 100%;
  28950. height: 100%;
  28951. object-fit: cover;
  28952. }
  28953. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  28954. height: auto;
  28955. padding: 10px;
  28956. margin: 0;
  28957. }
  28958. .upCss>>>.el-upload-list {
  28959. width: 100%;
  28960. }
  28961. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  28962. width: 100%;
  28963. height: 120px;
  28964. object-fit: contain;
  28965. background: unset;
  28966. margin-left: 0;
  28967. }
  28968. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  28969. display: none;
  28970. }
  28971. .tcMember+.tcMember::before {
  28972. content: "、";
  28973. }
  28974. .xzUpImg {
  28975. width: 25px;
  28976. height: 25px;
  28977. min-width: 25px;
  28978. min-height: 25px;
  28979. cursor: pointer;
  28980. margin: 0 10px;
  28981. }
  28982. .xzUpImg>img {
  28983. width: 100%;
  28984. height: 100%;
  28985. }
  28986. .closeCss {
  28987. position: absolute;
  28988. top: 8px;
  28989. right: 8px;
  28990. cursor: pointer;
  28991. width: 20px;
  28992. height: 20px;
  28993. }
  28994. .closeCss>img {
  28995. width: 100%;
  28996. height: 100%;
  28997. }
  28998. .moveBtn {
  28999. display: flex;
  29000. flex-direction: row;
  29001. flex-wrap: nowrap;
  29002. align-items: center;
  29003. width: 55px;
  29004. }
  29005. .timuUpImg {
  29006. display: flex;
  29007. flex-direction: row;
  29008. align-items: center;
  29009. width: 100%;
  29010. margin-right: 10px;
  29011. }
  29012. .timuUpImg>div:nth-child(1) {
  29013. margin-right: 10px;
  29014. display: flex;
  29015. align-items: center;
  29016. width: 100%;
  29017. }
  29018. .timuImgBox {
  29019. margin: 10px 0;
  29020. display: flex;
  29021. flex-direction: column;
  29022. flex-wrap: wrap;
  29023. align-items: flex-start;
  29024. }
  29025. .timuImg {
  29026. width: 100px;
  29027. margin: 5px 0;
  29028. cursor: pointer;
  29029. position: relative;
  29030. }
  29031. .timuImg:hover .deleteWord {
  29032. display: block;
  29033. }
  29034. .deleteWord {
  29035. width: 25px;
  29036. height: 25px;
  29037. position: absolute;
  29038. right: -5px;
  29039. top: -5px;
  29040. cursor: pointer;
  29041. display: none;
  29042. }
  29043. .timuImg>img,
  29044. .deleteWord>img {
  29045. width: 100%;
  29046. height: 100%;
  29047. object-fit: cover;
  29048. }
  29049. .e_add_delete {
  29050. cursor: pointer;
  29051. margin-left: 10px;
  29052. }
  29053. .pType_box {
  29054. margin: 15px 0;
  29055. align-items: flex-end;
  29056. }
  29057. .noneBox {
  29058. height: 200px;
  29059. width: 100%;
  29060. display: flex;
  29061. align-items: center;
  29062. justify-content: center;
  29063. flex-direction: column;
  29064. /* margin-top: 150px; */
  29065. }
  29066. .noneBox>img {
  29067. width: 95px;
  29068. }
  29069. .noneBox>span {
  29070. margin-top: 10px;
  29071. color: #717c8d;
  29072. }
  29073. .rb_c_box {
  29074. width: 100%;
  29075. height: 100%;
  29076. display: flex;
  29077. /* padding: 20px; */
  29078. box-sizing: border-box;
  29079. justify-content: space-between;
  29080. }
  29081. .rb_c_box_left {
  29082. height: 100%;
  29083. background: #fff;
  29084. width: 270px;
  29085. min-width: 270px;
  29086. border-radius: 8px;
  29087. margin-right: 10px;
  29088. }
  29089. .rb_c_box_right {
  29090. height: 100%;
  29091. width: calc(100%);
  29092. overflow: hidden;
  29093. }
  29094. .rb_c_box_btn {
  29095. display: flex;
  29096. justify-content: flex-start;
  29097. height: 50px;
  29098. align-items: center;
  29099. background: #fff;
  29100. padding: 0 20px;
  29101. border-radius: 10px 10px 0px 0px;
  29102. border-bottom: 1px solid #cad1dc;
  29103. }
  29104. .rb_c_box_btn > .title{
  29105. font-size: 24px;
  29106. font-weight: bold;
  29107. display: flex;
  29108. align-items: center;
  29109. }
  29110. .rb_c_box_btn > .title:before{
  29111. content: '';
  29112. background-image: url(../../../assets/icon/course/courseName.png);
  29113. width: 24px;
  29114. height: 24px;
  29115. background-size: 100% 100%;
  29116. margin-right: 10px;
  29117. }
  29118. .rb_c_box_right>.basic_box {
  29119. /* background: #fff; */
  29120. border-radius: 0;
  29121. height: calc(100% - 50px);
  29122. overflow: auto;
  29123. padding: 0;
  29124. }
  29125. .textarea_css {
  29126. display: block;
  29127. resize: none;
  29128. padding: 10px 15px;
  29129. line-height: 1.5;
  29130. box-sizing: border-box;
  29131. width: 100%;
  29132. font-size: 14px;
  29133. color: #606266;
  29134. background-color: #fff;
  29135. background-image: none;
  29136. border: 1px solid #dcdfe6;
  29137. border-radius: 4px;
  29138. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  29139. outline: none;
  29140. overflow: hidden;
  29141. height: 46px;
  29142. font-family: "Microsoft YaHei";
  29143. }
  29144. .textarea_css::-webkit-input-placeholder {
  29145. color: #c0c4cc;
  29146. }
  29147. .textarea_css:focus {
  29148. border-color: #409eff;
  29149. outline: 0;
  29150. }
  29151. .addEditor>>>.text {
  29152. height: auto;
  29153. min-height: 100px;
  29154. }
  29155. .addEditor>>>.w-e-text-container {
  29156. min-height: 100px;
  29157. }
  29158. .moveBtn2 {
  29159. flex-direction: column;
  29160. width: fit-content;
  29161. margin: 0 10px 0 10px;
  29162. }
  29163. .moveBtn2 .chapter_upload_down,
  29164. .moveBtn2 .chapter_upload_up {
  29165. width: 16px;
  29166. height: 16px;
  29167. }
  29168. .moveBtn2 .chapter_upload_up::after,
  29169. .moveBtn2 .chapter_upload_down::after {
  29170. width: 10px;
  29171. height: 10px;
  29172. }
  29173. .fullStyle>>>.el-dialog__body {
  29174. height: calc(100% - 125px) !important;
  29175. box-sizing: border-box;
  29176. }
  29177. .fullStyle1>>>.el-dialog__body {
  29178. height: auto !important;
  29179. }
  29180. .fullStyle>>>.el-dialog {
  29181. width: 100% !important;
  29182. max-width: 100% !important;
  29183. height: 100% !important;
  29184. margin: 0 !important;
  29185. }
  29186. .fullStyle {
  29187. width: 100% !important;
  29188. max-width: 100% !important;
  29189. height: 100% !important;
  29190. margin: 0 auto !important;
  29191. }
  29192. .wb_j_box_btn {
  29193. width: calc(100% - 30px);
  29194. display: flex;
  29195. height: 40px;
  29196. border: 1.5px solid #cad1dc;
  29197. border-radius: 4px;
  29198. box-sizing: border-box;
  29199. align-items: center;
  29200. font-size: 14px;
  29201. cursor: pointer;
  29202. overflow: hidden;
  29203. }
  29204. .wb_j_box_btn:hover {
  29205. border: 1.5px solid #0061ff;
  29206. }
  29207. .wb_j_box_title {
  29208. background: #f0f4fa;
  29209. height: 100%;
  29210. line-height: 40px;
  29211. width: 90px;
  29212. text-align: center;
  29213. color: #060e17;
  29214. border-right: 1.5px solid #cad1dc;
  29215. box-sizing: border-box;
  29216. }
  29217. .wb_j_box_btn_c {
  29218. width: calc(100% - 90px);
  29219. padding: 0 35px 0 10px;
  29220. box-sizing: border-box;
  29221. position: relative;
  29222. }
  29223. .wb_j_box_span {
  29224. width: 100%;
  29225. overflow: hidden;
  29226. white-space: nowrap;
  29227. text-overflow: ellipsis;
  29228. word-wrap: break-word;
  29229. color: #717c8d;
  29230. }
  29231. .wb_j_box_arrow {
  29232. content: "";
  29233. width: 14px;
  29234. height: 14px;
  29235. background: url(../../../assets/icon/new/u_arrow.png);
  29236. background-size: 100% 100%;
  29237. position: absolute;
  29238. right: 12px;
  29239. top: 50%;
  29240. transform: translateY(-50%);
  29241. }
  29242. .check_classBox {
  29243. height: 400px;
  29244. display: flex;
  29245. border-top: 1.5px solid #e7ebf1;
  29246. border-bottom: 1.5px solid #e7ebf1;
  29247. }
  29248. .check_class_right {
  29249. width: 130px;
  29250. border-right: 1px solid #e7ebf1;
  29251. display: flex;
  29252. align-items: center;
  29253. flex-direction: column;
  29254. height: 100%;
  29255. overflow: auto;
  29256. padding: 15px 0;
  29257. box-sizing: border-box;
  29258. }
  29259. .check_class {
  29260. width: 85%;
  29261. border-radius: 5px;
  29262. height: 30px;
  29263. min-height: 30px;
  29264. line-height: 30px;
  29265. text-align: center;
  29266. padding: 0 10px;
  29267. box-sizing: border-box;
  29268. cursor: pointer;
  29269. white-space: nowrap;
  29270. overflow: hidden;
  29271. text-overflow: ellipsis;
  29272. }
  29273. .check_class.activeX {
  29274. background: #e0eafb;
  29275. color: #3681fc;
  29276. font-weight: 700;
  29277. }
  29278. .check_class+.check_class {
  29279. margin-top: 15px;
  29280. }
  29281. .check_class_left {
  29282. background: #fafafa;
  29283. width: calc(100% - 130px);
  29284. padding: 15px;
  29285. box-sizing: border-box;
  29286. }
  29287. .check_class_all_box {
  29288. display: flex;
  29289. margin-bottom: 10px;
  29290. }
  29291. .all_check {
  29292. display: flex;
  29293. align-items: center;
  29294. padding: 2px 0 0;
  29295. margin-left: 10px;
  29296. }
  29297. .all_check>>>.el-checkbox__label {
  29298. line-height: 18px;
  29299. }
  29300. .check_class_left_title {
  29301. font-size: 16px;
  29302. font-weight: 700;
  29303. }
  29304. .check_class_item {
  29305. display: flex;
  29306. flex-wrap: wrap;
  29307. height: calc(100% - 45px);
  29308. overflow: auto;
  29309. justify-content: flex-start;
  29310. align-items: flex-start;
  29311. align-content: flex-start;
  29312. }
  29313. .class_item:first-child {
  29314. /* margin: 0 15px 15px 67px; */
  29315. }
  29316. .class_item {
  29317. margin: 0 15px 15px 0;
  29318. }
  29319. .class_item:hover>>>.el-checkbox__label {
  29320. color: #409eff;
  29321. }
  29322. .class_item>>>.el-checkbox__label {
  29323. color: #0e1e33;
  29324. }
  29325. .class_item:hover>>>.el-checkbox__inner {
  29326. border-color: #409eff;
  29327. }
  29328. .class_item>>>.el-checkbox,
  29329. .class_item>>>.el-checkbox__input {
  29330. display: flex;
  29331. align-items: center;
  29332. }
  29333. .taskTitle {
  29334. font-size: 20px;
  29335. font-weight: bold;
  29336. margin-bottom: 35px;
  29337. }
  29338. .taskTitle:after {
  29339. content: "";
  29340. width: 100%;
  29341. display: block;
  29342. height: 1px;
  29343. background: #cad1dc;
  29344. position: absolute;
  29345. left: 0;
  29346. margin: 15px 0 0;
  29347. }
  29348. .eva_btn_box {
  29349. margin: 20px 0px 0 0;
  29350. display: flex;
  29351. flex-direction: row;
  29352. flex-wrap: nowrap;
  29353. align-items: center;
  29354. justify-content: space-between;
  29355. width: 100%;
  29356. }
  29357. .eva_btn_left_box {
  29358. display: flex;
  29359. flex-direction: row;
  29360. flex-wrap: nowrap;
  29361. align-items: center;
  29362. }
  29363. .addTypeChoose {
  29364. display: flex;
  29365. flex-direction: row;
  29366. flex-wrap: nowrap;
  29367. align-items: center;
  29368. margin: 15px 0;
  29369. }
  29370. .addTypeBox {
  29371. display: flex;
  29372. flex-direction: column;
  29373. flex-wrap: nowrap;
  29374. align-items: center;
  29375. }
  29376. .addTypeChoose {
  29377. display: flex;
  29378. flex-direction: row;
  29379. flex-wrap: nowrap;
  29380. align-items: center;
  29381. margin: 15px 0;
  29382. }
  29383. .buchong_box {
  29384. background: #E0EAFB66;
  29385. width: calc(100% - 20px);
  29386. min-height: 50px;
  29387. display: flex;
  29388. align-items: center;
  29389. justify-content: center;
  29390. margin: 0 auto;
  29391. }
  29392. .outline {
  29393. width: calc(100% - 40px);
  29394. margin: 0 auto;
  29395. }
  29396. .task_outline {
  29397. width: calc(100% - 40px);
  29398. margin: 0 auto;
  29399. }
  29400. .outline_box+.outline_box {
  29401. margin: 30px 0 0px;
  29402. }
  29403. .outline_task {
  29404. display: flex;
  29405. align-items: center;
  29406. margin-bottom: 10px;
  29407. }
  29408. .outline_btn{
  29409. display: flex;
  29410. align-items: center;
  29411. min-width: fit-content;
  29412. margin-left: 10px;
  29413. }
  29414. .outline_task .title {
  29415. font-size: 18px;
  29416. font-weight: bold;
  29417. min-width: 80px;
  29418. }
  29419. .op_task_box,
  29420. .op_tool_box,
  29421. .outline_detail {
  29422. position: relative;
  29423. }
  29424. .op_task_box:hover .op_box,
  29425. .op_tool_box:hover .op_box,
  29426. .outline_detail:hover .op_box {
  29427. display: flex
  29428. }
  29429. .op_box {
  29430. position: absolute;
  29431. bottom: 10px;
  29432. display: none;
  29433. align-items: center;
  29434. justify-content: space-between;
  29435. width: calc(100% - 20px);
  29436. left: 50%;
  29437. transform: translateX(-50%);
  29438. }
  29439. .op_box .op_remark {
  29440. color: #8E8E8E;
  29441. font-size: 14px;
  29442. }
  29443. .op_box_right{
  29444. display: flex;
  29445. }
  29446. .op_box_isquote{
  29447. display: flex;
  29448. }
  29449. .op_box_isquote *{
  29450. display: none;
  29451. }
  29452. .op_box_isquote .op_box_right,
  29453. .op_box_isquote .custom-switch{
  29454. display: flex;
  29455. margin-left: auto;
  29456. }
  29457. .op_task_box:hover .op_box_isquote *{
  29458. display: flex;
  29459. }
  29460. .op_task_box:hover .op_box_isquote .op_box_right,
  29461. .op_task_box:hover .op_box_isquote .custom-switch{
  29462. display: flex;
  29463. margin-left: unset;
  29464. }
  29465. .rb_c_nav {
  29466. width: calc(100% - 20px);
  29467. margin: 15px auto 0;
  29468. font-size: 18px;
  29469. display: flex;
  29470. align-items: center;
  29471. }
  29472. .rb_c_nav span {
  29473. cursor: pointer;
  29474. }
  29475. .rb_c_nav span+span {
  29476. margin-left: 10px;
  29477. }
  29478. .rb_c_nav span.active {
  29479. color: #0061FF
  29480. }
  29481. .text_panel>>>.text {
  29482. height: 400px;
  29483. }
  29484. .markBox{
  29485. padding: 20px 14px;
  29486. line-height: 29px;
  29487. font-size: 16px;
  29488. background: #f4f4f4;
  29489. border-radius: 5px;
  29490. word-break: break-word;
  29491. }
  29492. .info_box_t {
  29493. display: flex;
  29494. align-items: center;
  29495. flex-wrap: wrap;
  29496. }
  29497. .info_box_t + .info_box_t {
  29498. margin-top: 10px;
  29499. }
  29500. .info_box_t_box {
  29501. display: flex;
  29502. align-items: center;
  29503. flex-wrap: wrap;
  29504. margin-bottom: 5px;
  29505. }
  29506. .info_box_t_box + .info_box_t_box{
  29507. margin-left: 10px;
  29508. }
  29509. .info_box_t_box > span{
  29510. width: fit-content;
  29511. font-weight: bold;
  29512. font-size: 14px;
  29513. }
  29514. .info_box_t_box > input{
  29515. width: 150px !important;
  29516. margin: 0 5px 0 0;
  29517. }
  29518. .info_radio >>> .el-radio, .el-radio__input{
  29519. line-height: 18px;
  29520. height: 18px;
  29521. }
  29522. .mode_box{
  29523. display: flex;
  29524. align-items: center;
  29525. }
  29526. .mode_box > span{
  29527. padding: 0px 5px;
  29528. cursor: pointer;
  29529. }
  29530. .mode_box > span.active{
  29531. color: #409eff;
  29532. }
  29533. .chapter_upload_check {
  29534. width: 15px;
  29535. height: 15px;
  29536. min-width: 15px;
  29537. min-height: 15px;
  29538. cursor: pointer;
  29539. background-image: url('../../../assets/icon/check.png');
  29540. background-size: 100% 100%;
  29541. }
  29542. .chapter_upload_check.checked{
  29543. background-image: url('../../../assets/icon/checked.png');
  29544. }
  29545. .ruleBtn {
  29546. width: fit-content;
  29547. height: 36px;
  29548. line-height: 36px;
  29549. cursor: pointer;
  29550. color: #0061FF;
  29551. }
  29552. .stopBtn{
  29553. z-index: 999999;
  29554. position: absolute;
  29555. left: 50%;
  29556. top: calc(50% + 70px);
  29557. transform: translateX(-50%);
  29558. }
  29559. .rateSwitch >>> .el-switch__label.is-active {
  29560. color: #0061FF;
  29561. }
  29562. .rateSwitch >>> .el-switch__label--right{
  29563. display: flex;
  29564. align-items: center;
  29565. }
  29566. .rateSwitch >>> .el-switch__label--right::before{
  29567. content: "";
  29568. width: 14px;
  29569. height: 14px;
  29570. min-width: 14px;
  29571. min-height: 14px;
  29572. background-size: 100% 100%;
  29573. display: block;
  29574. margin-right: 7px;
  29575. background-image: url(../../../assets/icon/new/u_op2.png);
  29576. }
  29577. .rateSwitch >>> .el-switch__label--right.is-active::before{
  29578. background-image: url(../../../assets/icon/new/u_op.png);
  29579. }
  29580. .inter_box{
  29581. min-width: calc(50%);
  29582. min-height: 500px;
  29583. margin-right: 10px;
  29584. border: 1px solid #c7c7c7;
  29585. border-radius: 0px 5px 5px 5px;
  29586. overflow: hidden;
  29587. position: relative;
  29588. box-sizing: border-box;
  29589. }
  29590. .inter_box::before{
  29591. content:'对话区';
  29592. position: absolute;
  29593. left: 0;
  29594. top: 0;
  29595. display: block;
  29596. padding: 8px 10px;
  29597. background: #e0eafb;
  29598. color: #98a0ac;
  29599. font-size: 14px;
  29600. border-radius: 0 15px 15px 0;
  29601. }
  29602. .inter_voiceBox,
  29603. .inter_Detailbox{
  29604. border: 1px solid #c7c7c7;
  29605. border-radius: 0px 5px 5px 5px;
  29606. overflow: hidden;
  29607. position: relative;
  29608. box-sizing: border-box;
  29609. }
  29610. .inter_Detailbox::before{
  29611. content:'编辑区';
  29612. position: absolute;
  29613. left: 0;
  29614. top: 0;
  29615. display: block;
  29616. padding: 8px 10px;
  29617. background: #e0eafb;
  29618. color: #98a0ac;
  29619. font-size: 14px;
  29620. border-radius: 0 15px 15px 0;
  29621. }
  29622. .inter_voiceBox::before{
  29623. content:'录音区';
  29624. position: absolute;
  29625. left: 0;
  29626. top: 0;
  29627. display: block;
  29628. padding: 8px 10px;
  29629. background: #e0eafb;
  29630. color: #98a0ac;
  29631. font-size: 14px;
  29632. border-radius: 0 15px 15px 0;
  29633. z-index: 999;
  29634. }
  29635. .inter_box > iframe{
  29636. width: 100%;
  29637. height: 100%;
  29638. border: none;
  29639. }
  29640. .inter_setting{
  29641. display: block;
  29642. background-image: url(../../../assets/icon/course/setting.svg);
  29643. background-size: 100% 100%;
  29644. width: 20px;
  29645. height: 20px;
  29646. cursor: pointer;
  29647. margin-left: 10px;
  29648. }
  29649. .inter_setting_panel{
  29650. position: absolute;
  29651. left: 110px;
  29652. top: 30px;
  29653. background: #fff;
  29654. border-radius: 5px;
  29655. box-shadow: 0px 0px 2px 1px #00000017;
  29656. padding: 10px;
  29657. z-index: 999;
  29658. }
  29659. .panel_title{
  29660. text-align: center;
  29661. font-size: 18px;
  29662. margin-bottom: 10px;
  29663. }
  29664. .panel_tips{
  29665. font-weight: 500;
  29666. font-size: 14px;
  29667. text-align: center;
  29668. margin-bottom: 10px;
  29669. color: #6d6d6d;
  29670. }
  29671. .panel_input{
  29672. margin-bottom: 10px;
  29673. }
  29674. .panel_button{
  29675. display: flex;
  29676. justify-content: space-between;
  29677. }
  29678. .panel_input_record {
  29679. margin-top: 10px;
  29680. }
  29681. .panel_input_record > span{
  29682. margin-bottom: 5px;
  29683. display: block;
  29684. }
  29685. .custom-switch >>> .el-switch__label.is-active {
  29686. color: #0061FF;
  29687. }
  29688. .close_btn{
  29689. position: absolute;
  29690. top: 40px;
  29691. right: 10px;
  29692. box-shadow: 0 0 4px 2px #00000033;
  29693. border-radius: 70px 0 0 70px;
  29694. display: flex;
  29695. align-items: center;
  29696. padding-left: 5px;
  29697. padding: 10px 7px 10px 12px;
  29698. background: #fff;
  29699. cursor: pointer;
  29700. }
  29701. .close_btn > img {
  29702. width: 15px;
  29703. transition: 0.3s;
  29704. transform: rotate(0deg);
  29705. }
  29706. .close_btn_voice > img{
  29707. transform: rotate(180deg);
  29708. }
  29709. .resizable {
  29710. position: relative;
  29711. min-width: 350px; /* 最小宽度 */
  29712. max-width: 50%; /* 最大宽度 */
  29713. }
  29714. .resizer {
  29715. width: 12.8px;
  29716. height: 28.8px;
  29717. /* background: #ccc; */
  29718. position: absolute;
  29719. top: 50%;
  29720. left: 0;
  29721. cursor: ew-resize;
  29722. transform: translateY(-50%);
  29723. /* border-radius: 43px; */
  29724. background-image: url(../../../assets/icon/course/course_slide.png);
  29725. background-size: 100% 100%;
  29726. }
  29727. .pptBox{
  29728. position: fixed;
  29729. bottom: 10px;
  29730. left: 20px;
  29731. padding: 10px;
  29732. }
  29733. .pptBox > .box > div + div{
  29734. margin-top: 10px;
  29735. }
  29736. .ppClass{
  29737. background: #fff;
  29738. border-radius: 5px;
  29739. box-shadow: 0 0 6px 3px #00000030;
  29740. overflow: hidden;
  29741. }
  29742. .file-loading-class >>> .el-loading-spinner{
  29743. margin-top: -10px;
  29744. }
  29745. .file-loading-class >>> .el-loading-spinner .circular{
  29746. height: 20px;
  29747. width: 20px;
  29748. }
  29749. .button-toggle {
  29750. color: #007bff; /* 文本颜色 */
  29751. cursor: pointer; /* 鼠标悬停时显示手型 */
  29752. transition: color 0.2s; /* 文字颜色过渡效果 */
  29753. font-size: 14px;
  29754. }
  29755. .button-toggle:hover {
  29756. color: #0056b3; /* 悬停时的文字颜色 */
  29757. }
  29758. .button-toggle:focus {
  29759. outline: none; /* 去掉聚焦时的边框 */
  29760. }
  29761. .right_icon{
  29762. width: 12px;
  29763. height: 12px;
  29764. margin-left: 5px;
  29765. }
  29766. .buttonBoxB{
  29767. position: relative;
  29768. margin: 0 0 0 10px;
  29769. }
  29770. .buttonBoxB::after{
  29771. content: '';
  29772. display: block;
  29773. background-image: url(../../../assets/icon/course/downArrow.svg);
  29774. background-size: 100% 100%;
  29775. width: 15px;
  29776. height: 15px;
  29777. cursor: pointer;
  29778. margin-left: 5px;
  29779. }
  29780. .buttonBoxB:hover .buttonBox{
  29781. display: block;
  29782. }
  29783. .buttonBox {
  29784. position: absolute;
  29785. bottom: -0;
  29786. left: 0;
  29787. transform: translateY(100%);
  29788. background: #fff;
  29789. border-radius: 5px;
  29790. box-shadow: 0 0 3px 1px #e3e3e3;
  29791. width: 155px;
  29792. display: none;
  29793. z-index: 99999;
  29794. }
  29795. .buttonBox>div {
  29796. height: 40px;
  29797. line-height: 40px;
  29798. width: 100%;
  29799. text-align: center;
  29800. color: #000;
  29801. box-sizing: border-box;
  29802. }
  29803. .buttonBox>div+div {
  29804. border-top: 1px solid #e0e0e0;
  29805. }
  29806. .buttonBox>div:hover {
  29807. background: #f6f8ff;
  29808. }
  29809. .appendix_info_title {
  29810. padding: 15px 0 15px 0;
  29811. font-size: 20px;
  29812. font-weight: bold;
  29813. margin: 0 0 0 20px;
  29814. box-sizing: border-box;
  29815. display: flex;
  29816. align-items: center;
  29817. line-height: 20px;
  29818. }
  29819. .appendix_file_box{
  29820. width: 100%
  29821. }
  29822. .appendix_check_box{}
  29823. .appendix_check_box > div + div{
  29824. margin-top: 10px;
  29825. }
  29826. .appendix_check_task{
  29827. display: flex;
  29828. align-items: center;
  29829. }
  29830. .appendix_check_type{
  29831. display: flex;
  29832. align-items: center;
  29833. }
  29834. .appendix_check_task > span,
  29835. .appendix_check_type > span{
  29836. width: 100px;
  29837. }
  29838. .appendix_check_task > .checkButton,
  29839. .appendix_check_type > .checkButton{
  29840. border: 1px solid #1684fc;
  29841. color: #1684fc;
  29842. padding: 5px 10px;
  29843. border-radius: 5px;
  29844. margin-right: 10px;
  29845. cursor: pointer;
  29846. }
  29847. .appendix_check_task > .checkButton.checked,
  29848. .appendix_check_type > .checkButton.checked{
  29849. background: #1684fc;
  29850. color: #fff;
  29851. }
  29852. .appendix_check_all_box{
  29853. display: flex;
  29854. align-items: center;
  29855. margin-bottom: 5px;
  29856. }
  29857. .appendix_check_all{
  29858. display: flex;
  29859. align-items: center;
  29860. cursor: pointer;
  29861. }
  29862. .appendix_check_all_text{
  29863. margin-left: 5px;
  29864. }
  29865. .know_serach_box{
  29866. margin-bottom: 20px;
  29867. display: flex;
  29868. align-items: center;
  29869. }
  29870. .know_serach_box > span{
  29871. min-width: 100px;
  29872. }
  29873. .know_serach_box > .c_pub_button_add{
  29874. min-width: fit-content;
  29875. }
  29876. .add_chapters_check_box{
  29877. display: flex;
  29878. align-items: center;
  29879. height: 50px;
  29880. }
  29881. .add_chapters_check{
  29882. display: flex;
  29883. align-items: center;
  29884. cursor: pointer;
  29885. }
  29886. .Ovh{
  29887. width: 4em;
  29888. -webkit-line-clamp: 2;
  29889. text-align: center;
  29890. display: -webkit-box;
  29891. -webkit-box-orient: vertical;
  29892. overflow: hidden;
  29893. text-overflow: ellipsis;
  29894. }
  29895. </style>