addCourse.vue 1.2 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading"
  3. element-loading-text="小可正在努力生成中,请稍等...">
  4. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止
  5. </div>
  6. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken"
  7. @click="cancelAjax('teacherTask')">停止</div>
  8. <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
  9. <div class="courseTop">
  10. <!-- <div class="stepsNav">
  11. <el-breadcrumb separator-class="el-icon-arrow-right">
  12. <el-breadcrumb-item :to="{
  13. path:
  14. '/course?userid=' +
  15. userid +
  16. '&oid=' +
  17. oid +
  18. '&org=' +
  19. org +
  20. '&role=' +
  21. role,
  22. }">课程管理</el-breadcrumb-item>
  23. <el-breadcrumb-item>
  24. <span style="color: rgb(15, 126, 255)">添加课程</span>
  25. </el-breadcrumb-item>
  26. </el-breadcrumb>
  27. </div> -->
  28. <div class="r_pub_button_retrun" style="margin-left: auto" @click="retrunCourse">返回</div>
  29. </div>
  30. <div class="right" style="height: calc(100% - 36px); margin-top: 36px;"
  31. :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  32. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  33. <!-- @mouseenter="stepDisplay(true)"
  34. @mouseleave="stepDisplay(false)" -->
  35. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  36. <div class="stepBg" v-if="false">
  37. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  38. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  39. <div>
  40. <img src="../../../assets/icon/first.png" alt />
  41. </div>
  42. <div>填写基本信息</div>
  43. </div>
  44. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  45. <div>
  46. <img src="../../../assets/icon/firstNo.png" alt />
  47. </div>
  48. <div>填写基本信息</div>
  49. </div>
  50. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  51. </div>
  52. <!-- <div
  53. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  54. class="second"
  55. @click="navSteps(2)"
  56. >
  57. <div style="margin: 5px 10px 0 0; width: 2rem">
  58. <img src="../../../assets/icon/second.png" alt />
  59. </div>
  60. <div>选择课程模板</div>
  61. </div>
  62. <div
  63. v-else-if="cidType === 0 && isStepDisplay"
  64. class="secondNo"
  65. @click="navSteps(2)"
  66. >
  67. <div>
  68. <img src="../../../assets/icon/secondNo.png" alt />
  69. </div>
  70. <div>选择课程模板</div>
  71. </div> -->
  72. <!-- <div
  73. v-if="isStepDisplay"
  74. class="stepBorder"
  75. :class="{ 'border-active': steps > 2 }"
  76. ></div> -->
  77. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  78. <div>
  79. <img src="../../../assets/icon/third.png" alt />
  80. </div>
  81. <div>上传课程内容</div>
  82. </div>
  83. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  84. <div>
  85. <img src="../../../assets/icon/thirdNo.png" alt />
  86. </div>
  87. <div>上传课程内容</div>
  88. </div>
  89. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  90. <div v-if="steps > 3 && isStepDisplay" class="four">
  91. <div>
  92. <img src="../../../assets/icon/four.png" alt />
  93. </div>
  94. <div>上传完成</div>
  95. </div>
  96. <div v-else-if="isStepDisplay" class="fourNo">
  97. <div>
  98. <img src="../../../assets/icon/fourNo.png" alt />
  99. </div>
  100. <div>上传完成</div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  105. style="padding: 0" :style="{
  106. height:
  107. !isStepDisplay && !isBtnDisplay
  108. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  109. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  110. }">
  111. <!-- <div class="updateMask" :style="{
  112. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  113. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  114. <div class="whiteBg" style="background: unset; padding: 0">
  115. <div>
  116. <div class="basic_box" style="padding: 0">
  117. <div class="big_box">
  118. <div class="left_first">
  119. <div :class="{
  120. updateTips:
  121. cid && userid != courseUserid && role != '1',
  122. }">
  123. <div style="width: 100%">
  124. <div class="course_input_box2">
  125. <div class="course_input_box">
  126. <div class="bb_courseIcon">
  127. <img src="../../../assets/icon/new/course.png" />
  128. </div>
  129. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName"
  130. @change="setCover" />
  131. </div>
  132. <div style=" margin-bottom: 15px; display:flex;">
  133. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  134. style="justify-content: center; min-width: 150px;"></el-switch>
  135. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  136. style="justify-content: center; min-width: 175px"></el-switch>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  142. <span>类型</span>
  143. <!-- 学科+ 主题+ 未来+ -->
  144. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  145. style="display: flex; align-items: center">
  146. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  147. :key="index">
  148. <el-radio :label="item.name">{{
  149. item.name
  150. }}</el-radio>
  151. </div>
  152. </el-radio-group>
  153. </div>
  154. <div class="both">
  155. <div class="choose">
  156. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  157. <span v-if="
  158. CourseTypeJson[item.id].length > 0 &&
  159. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  160. ? pTypeCheck.indexOf(item.id) != -1
  161. : true)
  162. ">{{ item.name }}:</span>
  163. <el-checkbox-group v-model="courseTypeId" @change="typeChange" v-if="
  164. CourseTypeJson[item.id].length > 0 &&
  165. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  166. ? pTypeCheck.indexOf(item.id) != -1
  167. : true)
  168. ">
  169. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  170. item1.name }}</el-checkbox>
  171. </el-checkbox-group>
  172. <!-- <div
  173. v-else
  174. style="font-size: 14px; margin-left: -8px"
  175. >
  176. 暂无
  177. </div> -->
  178. </div>
  179. </div>
  180. </div>
  181. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  182. <div class="info_box_t_box">
  183. <span>输出语言:</span>
  184. <el-radio-group v-model="languageSetting" style="display: flex; align-items: center"
  185. @change="changeLang">
  186. <div class="all_choose info_radio">
  187. <el-radio :label="0">简体中文</el-radio>
  188. </div>
  189. <div class="all_choose info_radio" style="margin-left: 10px">
  190. <el-radio :label="1">繁体中文</el-radio>
  191. </div>
  192. <div class="all_choose info_radio" style="margin-left: 10px">
  193. <el-radio :label="2">English</el-radio>
  194. </div>
  195. </el-radio-group>
  196. </div>
  197. </div>
  198. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  199. <div class="info_box_t_box">
  200. <!-- <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  201. style="justify-content: center; min-width: 175px"></el-switch> -->
  202. <span>生成模式:</span>
  203. <el-radio-group v-model="isuseT" style="display: flex; align-items: center"
  204. @change="changeIsuseT">
  205. <div class="all_choose info_radio">
  206. <el-radio :label="false">从零开始生成</el-radio>
  207. </div>
  208. <div class="all_choose info_radio" style="margin-left: 10px">
  209. <el-radio :label="true">从已有教案生成</el-radio>
  210. </div>
  211. <div class="all_choose info_radio" style="margin-left: 10px">
  212. <el-radio :label="1">对话模式生成</el-radio>
  213. </div>
  214. <div class="all_choose info_radio" style="margin-left: 10px">
  215. <el-radio :label="2">头脑风暴模式生成</el-radio>
  216. </div>
  217. </el-radio-group>
  218. </div>
  219. </div>
  220. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  221. <div class="info_box_t_box">
  222. <span>生成风格:</span>
  223. <div class="mode_box">
  224. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  225. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  226. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  227. </div>
  228. </div>
  229. </div>
  230. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  231. <div class="info_box_t_box">
  232. <span>课程节数:</span>
  233. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  234. <span>节</span>
  235. </div>
  236. <div class="info_box_t_box">
  237. <span>课程时长:</span>
  238. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  239. <span>min</span>
  240. </div>
  241. </div> -->
  242. </div>
  243. <div class="right_first" v-loading="imageloading2">
  244. <!-- <div class="ai_box">
  245. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  246. </div> -->
  247. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  248. 上传封面
  249. </div>
  250. <div style="width: 100%">
  251. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  252. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  253. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  254. <div v-if="cover.length == 0">点击添加封面</div>
  255. <div class="cover_mask">
  256. <img src="../../../assets/icon/new/cover_update.png" /><span
  257. style="margin-top: 5px">修改封面</span>
  258. </div>
  259. </div>
  260. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  261. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  262. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  263. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  264. <i class="el-icon-plus"></i>
  265. </el-upload> -->
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  273. <div class="whiteBg" style="border-radius: 0">
  274. <div class="c_info_title">
  275. 课程权限设置
  276. </div>
  277. <div class="wb_j_box">
  278. <div class="wb_j_box_content">
  279. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  280. (dialogVisibleClass = true),
  281. (classSearch = ''),
  282. (gradeId = ''),
  283. getClass()
  284. ">添加班级</button>
  285. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  286. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  287. getClassC(tc) }}</span>
  288. </div> -->
  289. <div class="wb_j_box_btn" @click="
  290. (dialogVisibleClass = true),
  291. (classSearch = ''),
  292. (gradeId = ''),
  293. getClass()
  294. ">
  295. <div class="wb_j_box_title">授课班级</div>
  296. <div class="wb_j_box_btn_c">
  297. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  298. v-if="checkboxList2.length" popper-class="text_tooltip2">
  299. <div class="wb_j_box_span">
  300. {{ getListClassC(checkboxList2) }}
  301. </div>
  302. </el-tooltip>
  303. <div v-else class="wb_j_box_span">请选择授课班级</div>
  304. <div class="wb_j_box_arrow"></div>
  305. </div>
  306. </div>
  307. </div>
  308. <div class="wb_j_box_content">
  309. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  310. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  311. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  312. checkBoolean
  313. ? checkboxList3
  314. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  315. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  316. </div> -->
  317. <div class="wb_j_box_btn" @click="openMember">
  318. <div class="wb_j_box_title">协同人员</div>
  319. <div class="wb_j_box_btn_c">
  320. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  321. v-if="checkboxList3.length" popper-class="text_tooltip2">
  322. <div class="wb_j_box_span">
  323. {{ getListMan2(checkboxList3) }}
  324. </div>
  325. </el-tooltip>
  326. <div v-else class="wb_j_box_span">请选择协同人员</div>
  327. <div class="wb_j_box_arrow"></div>
  328. </div>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  334. <div class="c_info_title">目标管理</div>
  335. <div style="margin: 0 auto; padding: 0 20px">
  336. <div style="
  337. width: 95%;
  338. min-height: 200px;
  339. border: 1px solid #cad1dc;
  340. border-radius: 4px;
  341. position: relative;
  342. ">
  343. <div class="e_add_top">
  344. <div class="e_add_title">
  345. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  346. 清除
  347. </button>
  348. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  349. 添加
  350. </button>
  351. <!-- <span>当前使用目标管理</span>
  352. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  353. <img
  354. src="../../../assets/line.png"
  355. class="cru_line"
  356. style="
  357. width: 125px;
  358. height: 20px;
  359. bottom: -10px;
  360. left: 155px;
  361. "
  362. /> -->
  363. </div>
  364. <div style="
  365. display: flex;
  366. flex-direction: row;
  367. align-items: center;
  368. ">
  369. <!-- <el-button
  370. type="primary"
  371. size="small"
  372. @click="dialogVisiblemb = true"
  373. >添加目标管理</el-button
  374. >
  375. <el-button
  376. type="primary"
  377. size="small"
  378. @click="deleteEva()"
  379. >清除内容</el-button
  380. > -->
  381. <!-- <div class="e_add_delete" @click="deleteEva()">
  382. <img src="../../../assets/icon/delete.png" alt="" />
  383. </div> -->
  384. </div>
  385. </div>
  386. <div v-if="evalua == ''">
  387. <div class="noneBox">
  388. <img src="../../../assets/icon/new/eva_none.png" />
  389. <span>请添加目标管理</span>
  390. </div>
  391. </div>
  392. <div class="e_add_content" v-else>
  393. <div class="e_add_list_pbox">
  394. <div class="e_add_list_pbox_title">
  395. <span class="type_title">切换模式</span>
  396. <div class="type_content">
  397. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  398. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  399. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  400. </div>
  401. </div>
  402. <div class="e_add_list_pbox_content">
  403. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  404. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  405. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  406. v-if="typeMode == 3">
  407. </SeeBoard>
  408. </div>
  409. </div>
  410. </div>
  411. </div>
  412. </div>
  413. </div>
  414. </div>
  415. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  416. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  417. <div style="position: relative;
  418. background: #fff;
  419. box-sizing: border-box;
  420. padding: 1px 20px 10px;
  421. width: 100%;
  422. border-radius: 10px;">
  423. <div style="
  424. display: flex;
  425. flex-direction: row;
  426. justify-content: space-between;
  427. align-items: center;
  428. " :style="{
  429. margin: true
  430. ? '20px 0 10px'
  431. : '20px 0 0',
  432. }">
  433. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  434. 已有教案
  435. <div class="add_info_box" style="margin: 0 0 0 auto">
  436. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  437. 上传已有教案
  438. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  439. style="display: none" v-if="inputShow" @change="
  440. beforeUploadInfo2(
  441. $event,
  442. 14
  443. )
  444. " />
  445. </button>
  446. <button class="c_pub_button_add" @click="clickGenTT"
  447. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  448. 一键智能总结生成
  449. </button>
  450. </div>
  451. </div>
  452. </div>
  453. <div>
  454. <div class="add_chapters_box add_c_none" v-if="
  455. teacherInfoData &&
  456. teacherInfoData.length == 0
  457. ">
  458. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  459. <span>暂时还没有内容,快去添加吧</span>
  460. </div>
  461. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  462. <div @dragstart="
  463. dragStart(item1, index1, 0)
  464. " @dragover.prevent="
  465. dragOver(index1, 0)
  466. " @dragend="dragEnd()" :draggable="isdrag ==
  467. 'chapter-' + 0 + '-' + index1
  468. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  469. getChapterData(
  470. $event,
  471. index1,
  472. item1.type
  473. )
  474. " :class="{
  475. dragOverTop2:
  476. newIndex === index1 &&
  477. typeIndex ==
  478. 'chapter-' +
  479. 0 +
  480. '-' +
  481. index1 &&
  482. oldIndex > index1 &&
  483. dragType == 'drag',
  484. dragOverBottom2:
  485. newIndex === index1 &&
  486. typeIndex ==
  487. 'chapter-' +
  488. 0 +
  489. '-' +
  490. index1 &&
  491. oldIndex < index1 &&
  492. dragType == 'drag',
  493. }">
  494. <div class="chapter_upload_o" style="
  495. position: relative;
  496. display: flex;
  497. align-items: center;
  498. ">
  499. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  500. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  501. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  502. </div>
  503. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  504. </div>
  505. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  506. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  507. </div>
  508. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  509. </div>
  510. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  511. </div>
  512. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  513. </div>
  514. </div>
  515. <div class="chapter_upload_n">
  516. <input readonly="true" v-if="
  517. item1.type == 2 ||
  518. item1.type == 3 ||
  519. item1.type == 12 ||
  520. item1.type == 13 ||
  521. item1.type == 7
  522. " :placeholder="item1.name" style="
  523. border: none;
  524. outline: none;
  525. width: 80%;
  526. minwidth: 215px;
  527. z-index: 99;
  528. font-size: 14px;
  529. white-space: nowrap;
  530. overflow: hidden;
  531. text-overflow: ellipsis;
  532. " />
  533. </div>
  534. <div class="chapter_upload_ic">
  535. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  536. <div class="chapter_upload_ic_r" @click.stop="
  537. deleteTeacherInfoData(
  538. $event,
  539. index1
  540. )
  541. ">
  542. <div></div>
  543. </div>
  544. </div>
  545. </div>
  546. </div>
  547. </div>
  548. </div>
  549. <div v-if="
  550. teacherinfoproVisible
  551. " class="mask">
  552. <div class="progressBox">
  553. <div class="lbox">
  554. <img src="../../../assets/loading.gif" />上传中,请稍后
  555. </div>
  556. <div style="margin-bottom: 10px">
  557. <span>{{
  558. teacherinfoisFinishSize
  559. }}</span>
  560. /
  561. <span>{{
  562. teacherinfoisAllSize
  563. }}</span>
  564. </div>
  565. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  566. ? teacherinfoprogress
  567. : 0
  568. " style="width: 80%"></el-progress> -->
  569. </div>
  570. </div>
  571. </div>
  572. </div>
  573. <div class="whiteBg" :style="{ minHeight: teacherTextLoading ? '250px' : 'auto'}"
  574. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;position: relative"
  575. v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..."
  576. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  577. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken"
  578. @click="cancelAjax('teacherText')">停止</div>
  579. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  580. <div class="c_info_title">
  581. 已有教案摘要
  582. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  583. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  584. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '右键已有教案摘要-提取摘要按钮')"
  585. @click="openAiDialog(2, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '点击已有教案摘要-提取摘要按钮')">提取摘要</button>
  586. </el-tooltip>
  587. </div>
  588. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  589. <div style="width: calc(100%);" class='op_task_box'>
  590. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  591. v-model="teacherCourseText" placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  592. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText"
  593. v-else-if="teacherTextLoading"></div>
  594. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  595. <div class="op_box" :class="{op_box_isquote: isQuote['aiteacherTextDetail']}">
  596. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  597. <div class="op_box_right">
  598. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  599. <div class="r_pub_button_op"
  600. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '右键已有教案摘要-智能优化按钮')"
  601. @click="openAiDialog(2, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '点击已有教案摘要-智能优化按钮')">
  602. 智能优化</div>
  603. </el-tooltip>
  604. <div class="r_pub_button_edit" style="margin-left:10px"
  605. @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击已有教案摘要-确定/编辑按钮')">
  606. {{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  607. <el-switch style="margin-left: 10px" v-model="isQuote['aiteacherTextDetail']" active-text="引用"
  608. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  609. @change="handleSwitchChange('aiteacherTextDetail'), addCourseBehavior('courseBehavior', '点击已有教案摘要-引用按钮')"></el-switch>
  610. </div>
  611. </div>
  612. </div>
  613. </div>
  614. </div>
  615. </div>
  616. <div class="whiteBg" :style="{ minHeight: targetTextLoading ? '250px' : 'auto'}"
  617. style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading"
  618. element-loading-text="小可正在努力生成中,请稍等..."
  619. v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  620. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1"
  621. @click="cancelAjax('target1')">停止</div>
  622. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  623. <div class="c_info_title">
  624. 课程目标
  625. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  626. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  627. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '右键课程目标-提取目标按钮')"
  628. @click="openAiDialog(2, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '点击课程目标-提取目标按钮')">提取目标</button>
  629.                   </el-tooltip>
  630. </div>
  631. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  632. <div style="width: calc(100%);" class='op_task_box'>
  633. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  634. v-model="targetCourseText" placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  635. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText"
  636. v-else-if="targetTextLoading"></div>
  637. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  638. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail']}">
  639. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  640. <div class="op_box_right">
  641. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  642. <div class="r_pub_button_op"
  643. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  644. @click="openAiDialog(2, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">
  645. 智能优化</div>
  646. </el-tooltip>
  647. <div class="r_pub_button_edit" style="margin-left:10px"
  648. @click="targetCourseTextB = !targetCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">
  649. {{ targetCourseTextB ? '确定' : '编辑'}}</div>
  650. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail']" active-text="引用"
  651. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  652. @change="handleSwitchChange('aitargetTextDetail'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  653. </div>
  654. </div>
  655. </div>
  656. </div>
  657. </div>
  658. </div>
  659. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  660. <div style="position: relative;
  661. background: #fff;
  662. box-sizing: border-box;
  663. padding: 1px 20px 10px;
  664. width: 100%;
  665. border-radius: 10px;">
  666. <div style="
  667. display: flex;
  668. flex-direction: row;
  669. justify-content: space-between;
  670. align-items: center;
  671. " :style="{
  672. margin: true
  673. ? '20px 0 10px'
  674. : '20px 0 0',
  675. }">
  676. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  677. 系统推荐参考资料
  678. <div class="add_info_box" style="margin: 0 0 0 auto">
  679. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  680. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  681. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  682. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  683.  </el-tooltip>
  684. </div>
  685. </div>
  686. </div>
  687. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  688. <div class="add_chapters_box add_c_none" v-if="
  689. cankaoInfoData &&
  690. cankaoInfoData.length == 0
  691. ">
  692. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  693. <span>暂时还没有内容,快去添加吧</span>
  694. </div>
  695. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  696. <div @dragstart="
  697. dragStart(item1, index1, 0)
  698. " @dragover.prevent="
  699. dragOver(index1, 0)
  700. " @dragend="dragEnd()" :draggable="isdrag ==
  701. 'chapter-' + 0 + '-' + index1
  702. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  703. getChapterData(
  704. $event,
  705. index1,
  706. item1.type
  707. )
  708. " :class="{
  709. dragOverTop2:
  710. newIndex === index1 &&
  711. typeIndex ==
  712. 'chapter-' +
  713. 0 +
  714. '-' +
  715. index1 &&
  716. oldIndex > index1 &&
  717. dragType == 'drag',
  718. dragOverBottom2:
  719. newIndex === index1 &&
  720. typeIndex ==
  721. 'chapter-' +
  722. 0 +
  723. '-' +
  724. index1 &&
  725. oldIndex < index1 &&
  726. dragType == 'drag',
  727. }">
  728. <div class="chapter_upload_o" style="
  729. position: relative;
  730. display: flex;
  731. align-items: center;
  732. ">
  733. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  734. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  735. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  736. </div>
  737. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  738. </div>
  739. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  740. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  741. </div>
  742. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  743. </div>
  744. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  745. </div>
  746. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  747. </div>
  748. </div>
  749. <div class="chapter_upload_n">
  750. <input readonly="true" v-if="
  751. item1.type == 2 ||
  752. item1.type == 3 ||
  753. item1.type == 12 ||
  754. item1.type == 13 ||
  755. item1.type == 7
  756. " :placeholder="item1.name" style="
  757. border: none;
  758. outline: none;
  759. width: 80%;
  760. minwidth: 215px;
  761. z-index: 99;
  762. font-size: 14px;
  763. white-space: nowrap;
  764. overflow: hidden;
  765. text-overflow: ellipsis;
  766. " />
  767. </div>
  768. <div class="chapter_upload_ic">
  769. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  770. <div class="chapter_upload_ic_r" @click.stop="
  771. deleteCankaoInfoData(
  772. $event,
  773. index1
  774. )
  775. ">
  776. <div></div>
  777. </div>
  778. </div>
  779. </div>
  780. </div>
  781. </div>
  782. </div>
  783. </div>
  784. </div>
  785. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;"
  786. v-if="(!yiKeTemplateArray.includes(templateid))">
  787. <div style="position: relative;
  788. background: #fff;
  789. box-sizing: border-box;
  790. padding: 1px 20px 10px;
  791. width: 100%;
  792. border-radius: 10px;">
  793. <div style="
  794. display: flex;
  795. flex-direction: row;
  796. justify-content: space-between;
  797. align-items: center;
  798. " :style="{
  799. margin: true
  800. ? '20px 0 10px'
  801. : '20px 0 0',
  802. }">
  803. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  804. 参考标准
  805. <div class="add_info_box" style="margin: 0 0 0 auto">
  806. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  807. 上传参考标准
  808. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  809. style="display: none" v-if="inputShow" @change="
  810. beforeUploadInfo2(
  811. $event,
  812. 19
  813. )
  814. " />
  815. </button>
  816. </div>
  817. </div>
  818. </div>
  819. <div>
  820. <div class="add_chapters_box add_c_none" v-if="
  821. knowInfoData &&
  822. knowInfoData.length == 0
  823. ">
  824. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  825. <span>暂时还没有内容,快去添加吧</span>
  826. </div>
  827. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  828. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
  829. getChapterData(
  830. $event,
  831. index1,
  832. item1.type
  833. )
  834. ">
  835. <div class="chapter_upload_o" style="
  836. position: relative;
  837. display: flex;
  838. align-items: center;
  839. ">
  840. <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }"
  841. @click="checkKnowInfoData(item1.fileid)"></div>
  842. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  843. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  844. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  845. </div>
  846. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  847. </div>
  848. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  849. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  850. </div>
  851. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  852. </div>
  853. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  854. </div>
  855. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  856. </div>
  857. </div>
  858. <div class="chapter_upload_n">
  859. <input readonly="true" v-if="
  860. item1.type == 2 ||
  861. item1.type == 3 ||
  862. item1.type == 12 ||
  863. item1.type == 13 ||
  864. item1.type == 7
  865. " :placeholder="item1.name" @click.stop="
  866. checkChpater3($event, index1, item1)
  867. " style="
  868. border: none;
  869. outline: none;
  870. width: 80%;
  871. minwidth: 215px;
  872. z-index: 99;
  873. font-size: 14px;
  874. white-space: nowrap;
  875. overflow: hidden;
  876. text-overflow: ellipsis;
  877. " />
  878. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  879. border: none;
  880. outline: none;
  881. width: 80%;
  882. white-space: nowrap;
  883. overflow: hidden;
  884. text-overflow: ellipsis;
  885. " readonly="true" @click="
  886. selectAttText(index1)
  887. " />
  888. <input :placeholder="item1.title ? item1.title : '链接'
  889. " v-if="item1.type == 8" style="
  890. border: none;
  891. outline: none;
  892. width: 80%;
  893. white-space: nowrap;
  894. overflow: hidden;
  895. text-overflow: ellipsis;
  896. " readonly="true" @click="selectLine(index1)" />
  897. <input :placeholder="item1.title ? item1.title : '链接'
  898. " v-if="item1.type == 14" style="
  899. border: none;
  900. outline: none;
  901. width: 80%;
  902. white-space: nowrap;
  903. overflow: hidden;
  904. text-overflow: ellipsis;
  905. " readonly="true" @click="
  906. openUpdateSource(index1)
  907. " />
  908. </div>
  909. <div class="chapter_upload_ic">
  910. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  911. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  912. checkChpater3($event, index1, item1)
  913. ">
  914. <div></div>
  915. </div>
  916. <div class="chapter_upload_ic_r" @click.stop="
  917. deleteKnowInfoData(
  918. $event,
  919. index1
  920. )
  921. ">
  922. <div></div>
  923. </div>
  924. </div>
  925. </div>
  926. </div>
  927. </div>
  928. </div>
  929. <div v-if="
  930. knowinfoproVisible
  931. " class="mask">
  932. <div class="progressBox">
  933. <div class="lbox">
  934. <img src="../../../assets/loading.gif" />上传中,请稍后
  935. </div>
  936. <div style="margin-bottom: 10px">
  937. <span>{{
  938. knowinfoisFinishSize
  939. }}</span>
  940. /
  941. <span>{{
  942. knowinfoisAllSize
  943. }}</span>
  944. </div>
  945. </div>
  946. </div>
  947. </div>
  948. </div>
  949. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;"
  950. v-if="(!yiKeTemplateArray.includes(templateid))" :style="{padding: interFindPan ? '0 0 15px' : '0 0 0'}">
  951. <div style="position: relative;
  952. background: #fff;
  953. box-sizing: border-box;
  954. width: 100%;
  955. border-radius: 10px;" :style="{padding: interFindPan ? '1px 20px 10px' : '1px 20px 1px'}">
  956. <div style="
  957. display: flex;
  958. flex-direction: row;
  959. justify-content: space-between;
  960. align-items: center;
  961. " :style="{
  962. margin: true
  963. ? '20px 0 10px'
  964. : '20px 0 0',
  965. }">
  966. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  967. 检索资料
  968. <div class="add_info_box" style="margin: 0 0 0 auto;align-items:center">
  969. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  970. @click="interFindPan = !interFindPan,forceUpdate2()">{{ interFindPan ? '折叠' : '展开'}}</button>
  971. </div>
  972. </div>
  973. </div>
  974. <div class="know_serach" v-show="interFindPan">
  975. <div class="know_serach_box" v-if="getTypeC(2).length || getTypeC(1).length">
  976. <span>检索项:</span>
  977. <el-select v-if="getTypeC(2).length" v-model="typeC1" placeholder="请选择年级" @change="forceUpdate()" style="width: 150px;margin-right: 10px;" clearable multiple :collapse-tags="true" :collapse-tags-tooltip="true">
  978. <el-option v-for="(e, eIndex) in getTypeC(2)" :key="eIndex" :label="e" :value="e">
  979. </el-option>
  980. </el-select>
  981. <el-select v-if="getTypeC(1).length" v-model="typeC2" placeholder="请选择学科" @change="forceUpdate()" style="width: 150px;margin-right: 10px;" clearable multiple :collapse-tags="true" :collapse-tags-tooltip="true">
  982. <el-option v-for="(e, eIndex) in getTypeC(1)" :key="eIndex" :label="e" :value="e">
  983. </el-option>
  984. </el-select>
  985. </div>
  986. <div class="know_serach_box">
  987. <span>检索关键词:</span>
  988. <input type="text" placeholder="请输入检索关键词" class="binfo_input" v-model="searchFileName"
  989. style="width: 100%;margin: 0 5px 0 0;min-height: 36px;box-sizing: border-box;height: 36px;" />
  990. <button class="c_pub_button_add" @click="startFindMatchingContents">点击检索资料</button>
  991. </div>
  992. <!-- <div class="know_serach_box" v-if="getTypeC(2)">
  993. <span>筛选年级:</span>
  994. <div>{{getTypeC(2)}}</div>
  995. </div>
  996. <div class="know_serach_box" v-if="getTypeC(1)">
  997. <span>筛选学科:</span>
  998. <div>{{getTypeC(1)}}</div>
  999. </div> -->
  1000. <div class="know_serach_box" v-if="this.knowInfoData3.length">
  1001. <span>筛选项:</span>
  1002. <el-select v-model="knowFileType1" placeholder="请选择册数" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1003. <el-option v-for="(e, eIndex) in knowFileTypeArray1" :key="eIndex" :label="e" :value="e">
  1004. </el-option>
  1005. </el-select>
  1006. <el-select v-model="knowFileType2" placeholder="请选择单元" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1007. <el-option v-for="(e, eIndex) in 10" :key="eIndex" :label="`第${e}单元`" :value="e">
  1008. </el-option>
  1009. </el-select>
  1010. <el-select v-model="knowFileType" placeholder="请选择类型" @change="forceUpdate()" style="width: 125px;margin-right: 10px;" clearable>
  1011. <el-option v-for="(e, eIndex) in 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" class="chapter_upload_l_i3" style="margin-left: 1px">
  3433. </div>
  3434. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3435. </div>
  3436. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3437. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3438. </div>
  3439. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3440. </div>
  3441. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3442. </div>
  3443. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3444. </div>
  3445. </div>
  3446. <div class="chapter_upload_n">
  3447. <input readonly="true" v-if="
  3448. item1.type == 2 ||
  3449. item1.type == 3 ||
  3450. item1.type == 12 ||
  3451. item1.type == 13 ||
  3452. item1.type == 7
  3453. " :placeholder="item1.name" @click="
  3454. updataVideoT(
  3455. $event,
  3456. unitIndex,
  3457. itemTaskIndex,
  3458. index1
  3459. )
  3460. " style="
  3461. border: none;
  3462. outline: none;
  3463. width: 80%;
  3464. minwidth: 215px;
  3465. z-index: 99;
  3466. font-size: 14px;
  3467. white-space: nowrap;
  3468. overflow: hidden;
  3469. text-overflow: ellipsis;
  3470. " />
  3471. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3472. border: none;
  3473. outline: none;
  3474. width: 80%;
  3475. white-space: nowrap;
  3476. overflow: hidden;
  3477. text-overflow: ellipsis;
  3478. " readonly="true" @click="
  3479. selectAttText(itemTaskIndex, index1)
  3480. " />
  3481. <input :placeholder="
  3482. item1.title ? item1.title : '链接'
  3483. " v-if="item1.type == 8" style="
  3484. border: none;
  3485. outline: none;
  3486. width: 80%;
  3487. white-space: nowrap;
  3488. overflow: hidden;
  3489. text-overflow: ellipsis;
  3490. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3491. <input :placeholder="
  3492. item1.title ? item1.title : '链接'
  3493. " v-if="item1.type == 14" style="
  3494. border: none;
  3495. outline: none;
  3496. width: 80%;
  3497. white-space: nowrap;
  3498. overflow: hidden;
  3499. text-overflow: ellipsis;
  3500. " readonly="true" @click="
  3501. openUpdateSource(itemTaskIndex, index1)
  3502. " />
  3503. </div>
  3504. <div class="chapter_upload_ic">
  3505. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3506. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3507. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  3508. ">
  3509. <div></div>
  3510. </div>
  3511. <div class="chapter_upload_ud" style="z-index: 99">
  3512. <div class="chapter_upload_up" @click="
  3513. upCd(
  3514. $event,
  3515. unitIndex,
  3516. index,
  3517. itemTaskIndex,
  3518. index1
  3519. )
  3520. "></div>
  3521. <div class="chapter_upload_down" @click="
  3522. downCd(
  3523. $event,
  3524. unitIndex,
  3525. index,
  3526. itemTaskIndex,
  3527. index1
  3528. )
  3529. "></div>
  3530. </div>
  3531. <div class="chapter_upload_ic_edit" v-if="
  3532. item1.type == 2 ||
  3533. item1.type == 3 ||
  3534. item1.type == 12 ||
  3535. item1.type == 13 ||
  3536. item1.type == 7
  3537. " @click.stop="
  3538. updataVideoT(
  3539. $event,
  3540. unitIndex,
  3541. itemTaskIndex,
  3542. index1
  3543. )
  3544. ">
  3545. <div></div>
  3546. </div>
  3547. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3548. selectAttText(itemTaskIndex, index1)
  3549. ">
  3550. <div></div>
  3551. </div>
  3552. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3553. @click="selectLine(itemTaskIndex, index1)">
  3554. <div></div>
  3555. </div>
  3556. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3557. openUpdateSource(itemTaskIndex, index1)
  3558. ">
  3559. <div></div>
  3560. </div>
  3561. <div class="chapter_upload_ic_r" @click.stop="
  3562. deleteChapterData(
  3563. $event,
  3564. unitIndex,
  3565. index,
  3566. index1,
  3567. itemTaskIndex
  3568. )
  3569. ">
  3570. <div></div>
  3571. </div>
  3572. </div>
  3573. </div>
  3574. </div>
  3575. </div>
  3576. </div>
  3577. <!-- v-if="!itemTask.isFoldchapter" -->
  3578. <div class="add_info_box" style="margin: 10px 0 0">
  3579. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3580. 文件
  3581. <input type="file" accept="*" style="display: none" multiple="multiple" v-if="inputShow"
  3582. @change="
  3583. beforeUpload2(
  3584. $event,
  3585. unitIndex,
  3586. 13,
  3587. itemTaskIndex
  3588. )
  3589. " />
  3590. </button>
  3591. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(itemTaskIndex)">
  3592. 图文
  3593. </button>
  3594. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(itemTaskIndex)">
  3595. 链接
  3596. </button>
  3597. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(itemTaskIndex)">
  3598. 代码
  3599. </button>
  3600. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(itemTaskIndex)">
  3601. 资源
  3602. </button>
  3603. <button class="c_pub_button_add pub_btn_add_img"
  3604. @click="openAiCreate(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成PPT按钮`)">
  3605. AI生成PPT
  3606. </button>
  3607. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3608. AI生成教案
  3609. </button> -->
  3610. <button class="c_pub_button_add pub_btn_add_img"
  3611. @click="createTaskAn(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成学历案按钮`)">
  3612. {{ taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex] == true ? '停止生成学历案' :
  3613. 'AI生成学历案'}}
  3614. </button>
  3615. <button class="c_pub_button_add pub_btn_add_img"
  3616. @click="openAiCreateVideo(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-智能检索视频按钮`)">
  3617. 智能检索视频
  3618. </button>
  3619. </div>
  3620. <div v-if="
  3621. unitJson[unitIndex].chapterInfo[0].taskJson[
  3622. itemTaskIndex
  3623. ].proVisible
  3624. " class="mask">
  3625. <div class="progressBox">
  3626. <!-- <div id="closePro" class="closeCss">
  3627. <img src="../../../../assets/icon/close.png" alt />
  3628. </div> -->
  3629. <div class="lbox">
  3630. <img src="../../../assets/loading.gif" />上传中,请稍后
  3631. </div>
  3632. <div style="margin-bottom: 10px">
  3633. <span>{{
  3634. unitJson[unitIndex].chapterInfo[0].taskJson[
  3635. itemTaskIndex
  3636. ].isFinishSize
  3637. }}</span>
  3638. /
  3639. <span>{{
  3640. unitJson[unitIndex].chapterInfo[0].taskJson[
  3641. itemTaskIndex
  3642. ].isAllSize
  3643. }}</span>
  3644. </div>
  3645. <!-- <el-progress
  3646. :text-inside="true"
  3647. :stroke-width="20"
  3648. :percentage="
  3649. unitJson[unitIndex].chapterInfo[0].taskJson[
  3650. itemTaskIndex
  3651. ].progress
  3652. ? unitJson[unitIndex].chapterInfo[0]
  3653. .taskJson[itemTaskIndex].progress
  3654. : 0
  3655. "
  3656. style="width: 80%"
  3657. ></el-progress> -->
  3658. </div>
  3659. </div>
  3660. </div>
  3661. <div v-if="
  3662. unitJson[unitIndex].easy == 1 ||
  3663. (unitJson[unitIndex].easy == 5 &&
  3664. itemTask.taskType == 2)
  3665. ">
  3666. <div>
  3667. <div class="add_chapters_box add_c_none" v-if="
  3668. itemTask.chapterData &&
  3669. itemTask.chapterData.length == 0
  3670. ">
  3671. <img src="../../../assets/icon/new/c_none.png" alt />
  3672. </div>
  3673. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3674. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3675. dragOver(index1, itemTaskIndex)
  3676. " @dragend="dragEnd()" :draggable="isdrag ==
  3677. 'chapter-' + itemTaskIndex + '-' + index1
  3678. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3679. :key="item1.id" @click="
  3680. getChapterData(
  3681. $event,
  3682. unitIndex,
  3683. index,
  3684. index1,
  3685. item1.type
  3686. )
  3687. " :class="{
  3688. dragOverTop2:
  3689. newIndex === index1 &&
  3690. typeIndex ==
  3691. 'chapter-' +
  3692. itemTaskIndex +
  3693. '-' +
  3694. index1 &&
  3695. oldIndex > index1,
  3696. dragOverBottom2:
  3697. newIndex === index1 &&
  3698. typeIndex ==
  3699. 'chapter-' +
  3700. itemTaskIndex +
  3701. '-' +
  3702. index1 &&
  3703. oldIndex < index1,
  3704. }">
  3705. <div @mousedown="
  3706. isdrag =
  3707. 'chapter-' + itemTaskIndex + '-' + index1
  3708. " @mouseup="isdrag = ''" @touchstart="
  3709. isdrag =
  3710. 'chapter-' + itemTaskIndex + '-' + index1
  3711. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3712. <div class="chapter_upload_t" style="width: 100%"></div>
  3713. <div class="chapter_upload_o" style="
  3714. position: relative;
  3715. display: flex;
  3716. align-items: center;
  3717. ">
  3718. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3719. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3720. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3721. </div>
  3722. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3723. </div>
  3724. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3725. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3726. </div>
  3727. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3728. </div>
  3729. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3730. </div>
  3731. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3732. </div>
  3733. </div>
  3734. <div class="chapter_upload_n">
  3735. <span style="
  3736. font-size: 14px;
  3737. color: rgb(109, 109, 109);
  3738. height: 14px;
  3739. line-height: 14px;
  3740. " v-if="
  3741. item1.type == 2 ||
  3742. item1.type == 3 ||
  3743. item1.type == 7
  3744. ">{{ item1.text }}-</span>
  3745. <input readonly="true" v-if="
  3746. item1.type == 2 ||
  3747. item1.type == 3 ||
  3748. item1.type == 7
  3749. " :placeholder="item1.name" @click="
  3750. updataVideoT(
  3751. $event,
  3752. unitIndex,
  3753. itemTaskIndex,
  3754. index1
  3755. )
  3756. " style="
  3757. border: none;
  3758. outline: none;
  3759. width: 80%;
  3760. minwidth: 215px;
  3761. z-index: 99;
  3762. font-size: 14px;
  3763. white-space: nowrap;
  3764. overflow: hidden;
  3765. text-overflow: ellipsis;
  3766. " />
  3767. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3768. border: none;
  3769. outline: none;
  3770. width: 80%;
  3771. white-space: nowrap;
  3772. overflow: hidden;
  3773. text-overflow: ellipsis;
  3774. " readonly="true" @click="
  3775. selectAttText(itemTaskIndex, index1)
  3776. " />
  3777. <input :placeholder="item1.title ? item1.title : '链接'
  3778. " v-if="item1.type == 8 || item1.type == 14" style="
  3779. border: none;
  3780. outline: none;
  3781. width: 80%;
  3782. white-space: nowrap;
  3783. overflow: hidden;
  3784. text-overflow: ellipsis;
  3785. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3786. </div>
  3787. <div class="chapter_upload_ic">
  3788. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3789. <div class="chapter_upload_ud" style="z-index: 99">
  3790. <div class="chapter_upload_up" @click="
  3791. upCd(
  3792. $event,
  3793. unitIndex,
  3794. index,
  3795. itemTaskIndex,
  3796. index1
  3797. )
  3798. "></div>
  3799. <div class="chapter_upload_down" @click="
  3800. downCd(
  3801. $event,
  3802. unitIndex,
  3803. index,
  3804. itemTaskIndex,
  3805. index1
  3806. )
  3807. "></div>
  3808. </div>
  3809. <div class="chapter_upload_ic_edit" v-if="
  3810. item1.type == 2 ||
  3811. item1.type == 3 ||
  3812. item1.type == 12 ||
  3813. item1.type == 13 ||
  3814. item1.type == 7
  3815. " @click.stop="
  3816. updataVideoT(
  3817. $event,
  3818. unitIndex,
  3819. itemTaskIndex,
  3820. index1
  3821. )
  3822. ">
  3823. <div></div>
  3824. </div>
  3825. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3826. selectAttText(itemTaskIndex, index1)
  3827. ">
  3828. <div></div>
  3829. </div>
  3830. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3831. @click="selectLine(itemTaskIndex, index1)">
  3832. <div></div>
  3833. </div>
  3834. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3835. openUpdateSource(itemTaskIndex, index1)
  3836. ">
  3837. <div></div>
  3838. </div>
  3839. <div class="chapter_upload_ic_r" @click.stop="
  3840. deleteChapterData(
  3841. $event,
  3842. unitIndex,
  3843. index,
  3844. index1,
  3845. itemTaskIndex
  3846. )
  3847. ">
  3848. <div></div>
  3849. </div>
  3850. </div>
  3851. </div>
  3852. </div>
  3853. </div>
  3854. </div>
  3855. <div class="add_info_box" style="margin: 10px 0 0">
  3856. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3857. <span style="color: red">*</span>
  3858. 教学设计
  3859. <input type="file"
  3860. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3861. style="display: none" v-if="inputShow" @change="
  3862. beforeUpload3(
  3863. $event,
  3864. unitIndex,
  3865. 3,
  3866. itemTaskIndex,
  3867. '教学设计'
  3868. )
  3869. " />
  3870. </button>
  3871. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3872. <span style="color: red">*</span>
  3873. 教学课件
  3874. <input type="file"
  3875. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3876. style="display: none" v-if="inputShow" @change="
  3877. beforeUpload3(
  3878. $event,
  3879. unitIndex,
  3880. 3,
  3881. itemTaskIndex,
  3882. '教学课件'
  3883. )
  3884. " />
  3885. </button>
  3886. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3887. 教学视频
  3888. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3889. style="display: none" v-if="inputShow" @change="
  3890. beforeUpload3(
  3891. $event,
  3892. unitIndex,
  3893. 2,
  3894. itemTaskIndex,
  3895. '教学视频'
  3896. )
  3897. " />
  3898. </button>
  3899. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3900. 教学音频
  3901. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3902. beforeUpload3(
  3903. $event,
  3904. unitIndex,
  3905. 2,
  3906. itemTaskIndex,
  3907. '教学音频'
  3908. )
  3909. " />
  3910. </button>
  3911. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3912. 学习单
  3913. <input type="file"
  3914. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3915. style="display: none" v-if="inputShow" @change="
  3916. beforeUpload3(
  3917. $event,
  3918. unitIndex,
  3919. 3,
  3920. itemTaskIndex,
  3921. '学习单'
  3922. )
  3923. " />
  3924. </button>
  3925. </div>
  3926. <div v-if="
  3927. unitJson[unitIndex].chapterInfo[0].taskJson[
  3928. itemTaskIndex
  3929. ].proVisible
  3930. " class="mask">
  3931. <div class="progressBox">
  3932. <!-- <div id="closePro" class="closeCss">
  3933. <img src="../../../../assets/icon/close.png" alt />
  3934. </div> -->
  3935. <div class="lbox">
  3936. <img src="../../../assets/loading.gif" />上传中,请稍后
  3937. </div>
  3938. <div style="margin-bottom: 10px">
  3939. <span>{{
  3940. unitJson[unitIndex].chapterInfo[0].taskJson[
  3941. itemTaskIndex
  3942. ].isFinishSize
  3943. }}M</span>
  3944. /
  3945. <span>{{
  3946. unitJson[unitIndex].chapterInfo[0].taskJson[
  3947. itemTaskIndex
  3948. ].isAllSize
  3949. }}M</span>
  3950. </div>
  3951. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3952. itemTaskIndex
  3953. ].progress
  3954. ? unitJson[unitIndex].chapterInfo[0]
  3955. .taskJson[itemTaskIndex].progress
  3956. : 0
  3957. " style="width: 80%"></el-progress>
  3958. </div>
  3959. </div>
  3960. </div>
  3961. </div>
  3962. <!-- padding: 20px; -->
  3963. <div style="
  3964. background: #fff;
  3965. border-radius: 5px;
  3966. margin-top: 15px;
  3967. " :style="{paddingBottom: panTaskElist() == 0?'75px':''}">
  3968. <div v-if="
  3969. unitJson[unitIndex].easy == 6 ||
  3970. !unitJson[unitIndex].easy
  3971. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]"
  3972. element-loading-text="小可正在努力生成中,请稍等...">
  3973. <div class="c_pub_button_confirm stopBtn"
  3974. v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]"
  3975. @click="cancelAjax('aiTaskGL2', itemTaskIndex)">停止</div>
  3976. <div style="width: 100%">
  3977. <div style="
  3978. display: flex;
  3979. flex-direction: row;
  3980. align-items: center;
  3981. margin: 5px 0 20px;
  3982. width: 100%
  3983. ">
  3984. <div class="lineTitle clineTitle" style="width: 100%">
  3985. <span>练习内容</span>
  3986. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3987. <div class="r_pub_button_op" style="margin-left:auto;"
  3988. @contextmenu.prevent="openAiDialog(1, 'aiTaskG2', itemTaskIndex)"
  3989. @click="openAiDialog(2, 'aiTaskG2', itemTaskIndex)">{{ panDanTool(itemTask) > 0 ?
  3990. '重新生成工具' : '生成工具' }}</div>
  3991. </el-tooltip>
  3992. <div class="r_pub_button_op" style="margin-left:10px;" @click="allEvaCan2(itemTaskIndex)" v-if="panDanTool(itemTask) > 0">{{ panDanToolEva(itemTask) > 0 ?
  3993. '重新生成工具评价' : '生成工具评价' }}</div>
  3994. </div>
  3995. <!-- <div class="line" style="width: 90%"></div> -->
  3996. </div>
  3997. </div>
  3998. <div class="tools">
  3999. <div class="leftTools" style="width: 100%" v-for="(
  4000. itemTool, toolIndex
  4001. ) in itemTask.toolChoose" :key="toolIndex">
  4002. <div style="
  4003. display: flex;
  4004. flex-direction: row;
  4005. align-items: baseline;
  4006. flex-wrap: nowrap;
  4007. justify-content: flex-start;
  4008. position: relative;
  4009. ">
  4010. <div style="margin-right: 20px; font-weight: bold"
  4011. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4012. 工具 {{ toolIndex + 1 }} :
  4013. </div>
  4014. <div class="chooseWho">
  4015. <div :class="itemTool.toolType == 0
  4016. ? 'isChooseActive'
  4017. : ''
  4018. " @click="
  4019. (itemTool.toolType = 0),
  4020. (itemTool.isFold3 = false),
  4021. $forceUpdate()
  4022. ">
  4023. 互动类
  4024. </div>
  4025. <div :class="itemTool.toolType == 1
  4026. ? 'isChooseActive'
  4027. : ''
  4028. " @click="
  4029. (itemTool.toolType = 1),
  4030. (itemTool.isFold3 = false),
  4031. $forceUpdate()
  4032. ">
  4033. 思维类
  4034. </div>
  4035. <div :class="itemTool.toolType == 6
  4036. ? 'isChooseActive'
  4037. : ''
  4038. " @click="
  4039. (itemTool.toolType = 6),
  4040. (itemTool.isFold3 = false),
  4041. $forceUpdate()
  4042. ">
  4043. 协作类
  4044. </div>
  4045. <div :class="itemTool.toolType == 2
  4046. ? 'isChooseActive'
  4047. : ''
  4048. " @click="
  4049. (itemTool.toolType = 2),
  4050. (itemTool.isFold3 = false),
  4051. $forceUpdate()
  4052. ">
  4053. 测评类
  4054. </div>
  4055. <div :class="itemTool.toolType == 7
  4056. ? 'isChooseActive'
  4057. : ''
  4058. " @click="
  4059. (itemTool.toolType = 7),
  4060. (itemTool.isFold3 = false),
  4061. $forceUpdate()
  4062. ">
  4063. 评价类
  4064. </div>
  4065. <div :class="itemTool.toolType == 3
  4066. ? 'isChooseActive'
  4067. : ''
  4068. " @click="
  4069. (itemTool.toolType = 3),
  4070. (itemTool.isFold3 = false),
  4071. $forceUpdate()
  4072. ">
  4073. 编程类
  4074. </div>
  4075. <div :class="itemTool.toolType == 5
  4076. ? 'isChooseActive'
  4077. : ''
  4078. " @click="
  4079. (itemTool.toolType = 5),
  4080. (itemTool.isFold3 = false),
  4081. $forceUpdate()
  4082. ">
  4083. 学科类
  4084. </div>
  4085. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  4086. " @click="(itemTool.toolType = 4), $forceUpdate()">
  4087. 其他
  4088. </div> -->
  4089. </div>
  4090. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  4091. margin:
  4092. itemTask.toolChoose.length > 1
  4093. ? '0px 35px 0px auto'
  4094. : '0 0 0 auto',
  4095. }" v-if="itemTask.toolChoose.length > 1">
  4096. <div class="chapter_upload_up2" @click.stop="
  4097. upTool(
  4098. $event,
  4099. unitIndex,
  4100. itemTaskIndex,
  4101. toolIndex
  4102. )
  4103. ">
  4104. 上移
  4105. </div>
  4106. <div class="chapter_upload_down2" @click.stop="
  4107. downTool(
  4108. $event,
  4109. unitIndex,
  4110. itemTaskIndex,
  4111. toolIndex
  4112. )
  4113. ">
  4114. 下移
  4115. </div>
  4116. </div>
  4117. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  4118. @click="fold3(itemTaskIndex, toolIndex)"
  4119. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4120. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  4121. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  4122. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4123. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  4124. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4125. v-if="itemTask.toolChoose.length > 1" style="
  4126. position: absolute;
  4127. right: 0;
  4128. top: -5px;
  4129. "></div>
  4130. </div>
  4131. <!-- v-show="!itemTool.isFold3" -->
  4132. <div style="min-height: 163px">
  4133. <div class="toolSort" v-if="itemTool.toolType == 0">
  4134. <!-- <div class="tool">
  4135. <div
  4136. class="whiteBIcon"
  4137. @click="addTools(8, itemTaskIndex, toolIndex)"
  4138. >
  4139. <img src="../../../assets/icon/secondToolList/library.png" alt />
  4140. <div style="margin: 5px 0">素材库</div>
  4141. </div>
  4142. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  4143. <img
  4144. src="../../../assets/icon/checkNo.png"
  4145. alt
  4146. v-if="itemTool.tool.indexOf(8) == -1"
  4147. />
  4148. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  4149. alt /><span>已选择</span></div>
  4150. </div>
  4151. </div>-->
  4152. <!-- <div class="tool">
  4153. <div
  4154. class="whiteBIcon"
  4155. @click="addTools(17, itemTaskIndex, toolIndex)"
  4156. >
  4157. <img
  4158. src="../../../assets/icon/secondToolList/library.png"
  4159. alt
  4160. />
  4161. <div style="margin: 5px 0">学习资料</div>
  4162. </div>
  4163. <div
  4164. class="check"
  4165. @click="addTools(17, itemTaskIndex, toolIndex)"
  4166. >
  4167. <img
  4168. src="../../../assets/icon/checkNo.png"
  4169. alt
  4170. v-if="itemTool.tool.indexOf(17) == -1"
  4171. />
  4172. <img
  4173. src="../../../assets/icon/checkedIs.png"
  4174. alt
  4175. v-else
  4176. />
  4177. </div>10
  4178. </div> -->
  4179. <div class="tool" :class="{
  4180. isToolChoose:
  4181. itemTool.tool.indexOf(10) != -1,
  4182. }" @click="
  4183. addTools(10, itemTaskIndex, toolIndex)
  4184. ">
  4185. <div class="whiteBIcon" @click.stop="
  4186. openTools(itemTaskIndex, 10, toolIndex)
  4187. ">
  4188. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  4189. <div style="margin: 5px 0">倒计时</div>
  4190. </div>
  4191. <div class="noCTool">
  4192. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4193. </div>
  4194. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  4195. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4196. </div>
  4197. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  4198. <img src="../../../assets/icon/checkNo.png" alt
  4199. v-if="itemTool.tool.indexOf(10) == -1" />
  4200. <div class="checkDiv" v-else>
  4201. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4202. </div>
  4203. </div> -->
  4204. </div>
  4205. <div class="tool" :class="{
  4206. isToolChoose:
  4207. itemTool.tool.indexOf(65) != -1,
  4208. }" @click="
  4209. addTools(65, itemTaskIndex, toolIndex)
  4210. ">
  4211. <div class="whiteBIcon" @click.stop="
  4212. addTools(65, itemTaskIndex, toolIndex)
  4213. ">
  4214. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  4215. <div style="margin: 5px 0">挑人</div>
  4216. </div>
  4217. <div class="noCTool">
  4218. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4219. </div>
  4220. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  4221. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4222. </div>
  4223. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  4224. <img src="../../../assets/icon/checkNo.png" alt
  4225. v-if="itemTool.tool.indexOf(65) == -1" />
  4226. <div class="checkDiv" v-else>
  4227. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4228. </div>
  4229. </div> -->
  4230. </div>
  4231. <!-- <div class="tool">
  4232. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  4233. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4234. <div style="margin: 5px 0">学生分组</div>
  4235. </div>
  4236. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4237. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  4238. <div class="checkDiv" v-else>
  4239. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4240. </div>
  4241. </div>
  4242. </div> -->
  4243. <!-- <div class="tool">
  4244. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  4245. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  4246. <div style="margin: 5px 0">交互视频</div>
  4247. </div>
  4248. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  4249. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  4250. <div class="checkDiv" v-else>
  4251. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4252. </div>
  4253. </div>
  4254. </div> -->
  4255. <div class="tool" :class="{
  4256. isToolChoose:
  4257. itemTool.tool.indexOf(72) != -1,
  4258. }" @click="
  4259. addTools(72, itemTaskIndex, toolIndex)
  4260. ">
  4261. <div class="whiteBIcon" @click.stop="
  4262. openTools(itemTaskIndex, 72, toolIndex)
  4263. ">
  4264. <img src="../../../assets/icon/firstToolList/appStore.png" alt />
  4265. <div style="margin: 5px 0">应用中心</div>
  4266. </div>
  4267. <div class="noCTool">
  4268. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4269. </div>
  4270. <div class="isCTool" v-if="itemTool.tool.indexOf(72) != -1">
  4271. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4272. </div>
  4273. </div>
  4274. </div>
  4275. <div class="toolSort" v-if="itemTool.toolType == 1">
  4276. <div class="tool" :class="{
  4277. isToolChoose:
  4278. itemTool.tool.indexOf(7) != -1,
  4279. }" @click="
  4280. addTools(7, itemTaskIndex, toolIndex)
  4281. ">
  4282. <div class="whiteBIcon" @click.stop="
  4283. addTools(7, itemTaskIndex, toolIndex)
  4284. ">
  4285. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  4286. <div style="margin: 5px 0">思维网格</div>
  4287. </div>
  4288. <div class="noCTool">
  4289. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4290. </div>
  4291. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  4292. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4293. </div>
  4294. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  4295. <img src="../../../assets/icon/checkNo.png" alt
  4296. v-if="itemTool.tool.indexOf(7) == -1" />
  4297. <div class="checkDiv" v-else>
  4298. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4299. </div>
  4300. </div> -->
  4301. </div>
  4302. <div class="tool" :class="{
  4303. isToolChoose:
  4304. itemTool.tool.indexOf(1) != -1,
  4305. }" @click="
  4306. addTools(1, itemTaskIndex, toolIndex)
  4307. ">
  4308. <div class="whiteBIcon" @click.stop="
  4309. openTools(itemTaskIndex, 1, toolIndex)
  4310. ">
  4311. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4312. <div style="margin: 5px 0">电子白板</div>
  4313. </div>
  4314. <div class="noCTool">
  4315. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4316. </div>
  4317. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  4318. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4319. </div>
  4320. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  4321. <img src="../../../assets/icon/checkNo.png" alt
  4322. v-if="itemTool.tool.indexOf(1) == -1" />
  4323. <div class="checkDiv" v-else>
  4324. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4325. </div>
  4326. </div> -->
  4327. </div>
  4328. <!-- <div class="tool">
  4329. <div
  4330. class="whiteBIcon"
  4331. @click="addTools(2, itemTaskIndex, toolIndex)"
  4332. >
  4333. <img
  4334. src="../../../assets/icon/secondToolList/note.png"
  4335. alt
  4336. />
  4337. <div style="margin: 5px 0">便签</div>
  4338. </div>
  4339. <div
  4340. class="check"
  4341. @click="addTools(2, itemTaskIndex, toolIndex)"
  4342. >
  4343. <img
  4344. src="../../../assets/icon/checkNo.png"
  4345. alt
  4346. v-if="itemTool.tool.indexOf(2) == -1"
  4347. />
  4348. <div class="checkDiv" v-else>
  4349. <img
  4350. src="../../../assets/icon/checkedIs.png"
  4351. alt
  4352. /><span>已选择</span>
  4353. </div>
  4354. </div>
  4355. </div> -->
  4356. <!-- <div class="tool">
  4357. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  4358. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4359. <div style="margin: 5px 0">协同文档</div>
  4360. </div>
  4361. <div
  4362. class="check"
  4363. @click="addTools(6, itemTaskIndex, toolIndex)"
  4364. >
  4365. <img
  4366. src="../../../assets/icon/checkNo.png"
  4367. alt
  4368. v-if="itemTool.tool.indexOf(6) == -1"
  4369. />
  4370. <div class="checkDiv" v-else>
  4371. <img
  4372. src="../../../assets/icon/checkedIs.png"
  4373. alt
  4374. /><span>已选择</span>
  4375. </div>
  4376. </div>
  4377. </div> -->
  4378. <div class="tool" :class="{
  4379. isToolChoose:
  4380. itemTool.tool.indexOf(52) != -1,
  4381. }" @click="
  4382. addTools(52, itemTaskIndex, toolIndex)
  4383. ">
  4384. <div class="whiteBIcon" @click.stop="
  4385. openTools(itemTaskIndex, 52, toolIndex)
  4386. ">
  4387. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4388. <div style="margin: 5px 0">文档</div>
  4389. </div>
  4390. <div class="noCTool">
  4391. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4392. </div>
  4393. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  4394. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4395. </div>
  4396. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  4397. <img src="../../../assets/icon/checkNo.png" alt
  4398. v-if="itemTool.tool.indexOf(52) == -1" />
  4399. <div class="checkDiv" v-else>
  4400. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4401. </div>
  4402. </div> -->
  4403. </div>
  4404. <div class="tool" :class="{
  4405. isToolChoose:
  4406. itemTool.tool.indexOf(3) != -1,
  4407. }" @click="
  4408. addTools(3, itemTaskIndex, toolIndex)
  4409. ">
  4410. <div class="whiteBIcon" @click.stop="
  4411. openTools(itemTaskIndex, 3, toolIndex)
  4412. ">
  4413. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4414. <div style="margin: 5px 0">思维导图</div>
  4415. </div>
  4416. <div class="noCTool">
  4417. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4418. </div>
  4419. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  4420. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4421. </div>
  4422. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  4423. <img src="../../../assets/icon/checkNo.png" alt
  4424. v-if="itemTool.tool.indexOf(3) == -1" />
  4425. <div class="checkDiv" v-else>
  4426. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4427. </div>
  4428. </div> -->
  4429. </div>
  4430. <div class="tool" :class="{
  4431. isToolChoose:
  4432. itemTool.tool.indexOf(48) != -1,
  4433. }" @click="
  4434. addTools(48, itemTaskIndex, toolIndex)
  4435. ">
  4436. <div class="whiteBIcon" @click.stop="
  4437. openTools(itemTaskIndex, 48, toolIndex)
  4438. ">
  4439. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4440. <div style="margin: 5px 0">表格</div>
  4441. </div>
  4442. <div class="noCTool">
  4443. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4444. </div>
  4445. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  4446. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4447. </div>
  4448. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  4449. <img src="../../../assets/icon/checkNo.png" alt
  4450. v-if="itemTool.tool.indexOf(48) == -1" />
  4451. <div class="checkDiv" v-else>
  4452. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4453. </div>
  4454. </div> -->
  4455. </div>
  4456. </div>
  4457. <div class="toolSort" v-if="itemTool.toolType == 6">
  4458. <div class="tool" :class="{
  4459. isToolChoose:
  4460. itemTool.tool.indexOf(49) != -1,
  4461. }" @click="
  4462. addTools(49, itemTaskIndex, toolIndex)
  4463. ">
  4464. <div class="whiteBIcon" @click.stop="
  4465. openTools(itemTaskIndex, 49, toolIndex)
  4466. ">
  4467. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4468. <div style="margin: 5px 0">学生分组</div>
  4469. </div>
  4470. <div class="noCTool">
  4471. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4472. </div>
  4473. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  4474. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4475. </div>
  4476. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4477. <img src="../../../assets/icon/checkNo.png" alt
  4478. v-if="itemTool.tool.indexOf(49) == -1" />
  4479. <div class="checkDiv" v-else>
  4480. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4481. </div>
  4482. </div> -->
  4483. </div>
  4484. </div>
  4485. <div class="toolSort" v-if="itemTool.toolType == 2">
  4486. <!-- <div class="tool">
  4487. <div
  4488. class="whiteBIcon"
  4489. @click="addTools(5, itemTaskIndex, toolIndex)"
  4490. >
  4491. <img
  4492. src="../../../assets/icon/thirdToolList/score.png"
  4493. alt
  4494. />
  4495. <div style="margin: 5px 0">量规评分</div>
  4496. </div>
  4497. <div
  4498. class="check"
  4499. @click="addTools(5, itemTaskIndex, toolIndex)"
  4500. >
  4501. <img
  4502. src="../../../assets/icon/checkNo.png"
  4503. alt
  4504. v-if="itemTool.tool.indexOf(5) == -1"
  4505. />
  4506. <img
  4507. src="../../../assets/icon/checkedIs.png"
  4508. alt
  4509. v-else
  4510. />
  4511. </div>
  4512. </div>-->
  4513. <div class="tool" :class="{
  4514. isToolChoose:
  4515. itemTool.tool.indexOf(4) != -1,
  4516. }" @click="
  4517. addTools(4, itemTaskIndex, toolIndex)
  4518. ">
  4519. <div class="whiteBIcon" @click.stop="
  4520. openTools(itemTaskIndex, 4, toolIndex)
  4521. ">
  4522. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4523. <div style="margin: 5px 0">问卷调查</div>
  4524. </div>
  4525. <div class="noCTool">
  4526. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4527. </div>
  4528. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4529. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4530. </div>
  4531. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4532. <img src="../../../assets/icon/checkNo.png" alt
  4533. v-if="itemTool.tool.indexOf(4) == -1" />
  4534. <div class="checkDiv" v-else>
  4535. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4536. </div>
  4537. </div> -->
  4538. </div>
  4539. <div class="tool" :class="{
  4540. isToolChoose:
  4541. itemTool.tool.indexOf(45) != -1,
  4542. }" @click="
  4543. addTools(45, itemTaskIndex, toolIndex)
  4544. ">
  4545. <div class="whiteBIcon" @click="
  4546. openTools(itemTaskIndex, 45, toolIndex)
  4547. ">
  4548. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4549. <div style="margin: 5px 0">选择题</div>
  4550. </div>
  4551. <div class="noCTool">
  4552. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4553. </div>
  4554. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4555. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4556. </div>
  4557. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4558. <img src="../../../assets/icon/checkNo.png" alt
  4559. v-if="itemTool.tool.indexOf(45) == -1" />
  4560. <div class="checkDiv" v-else>
  4561. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4562. </div>
  4563. </div> -->
  4564. </div>
  4565. <div class="tool" :class="{
  4566. isToolChoose:
  4567. itemTool.tool.indexOf(15) != -1,
  4568. }" @click="
  4569. addTools(15, itemTaskIndex, toolIndex)
  4570. ">
  4571. <div class="whiteBIcon" @click.stop="
  4572. openTools(itemTaskIndex, 15, toolIndex)
  4573. ">
  4574. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4575. <div style="margin: 5px 0">问答</div>
  4576. </div>
  4577. <div class="noCTool">
  4578. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4579. </div>
  4580. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4581. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4582. </div>
  4583. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4584. <img src="../../../assets/icon/checkNo.png" alt
  4585. v-if="itemTool.tool.indexOf(15) == -1" />
  4586. <div class="checkDiv" v-else>
  4587. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4588. </div>
  4589. </div> -->
  4590. </div>
  4591. <div class="tool" :class="{
  4592. isToolChoose:
  4593. itemTool.tool.indexOf(16) != -1,
  4594. }" @click="
  4595. addTools(16, itemTaskIndex, toolIndex)
  4596. ">
  4597. <div class="whiteBIcon" @click.stop="
  4598. addTools(16, itemTaskIndex, toolIndex)
  4599. ">
  4600. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4601. <div style="margin: 5px 0">作业提交</div>
  4602. </div>
  4603. <div class="noCTool">
  4604. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4605. </div>
  4606. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4607. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4608. </div>
  4609. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4610. <img src="../../../assets/icon/checkNo.png" alt
  4611. v-if="itemTool.tool.indexOf(16) == -1" />
  4612. <div class="checkDiv" v-else>
  4613. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4614. </div>
  4615. </div> -->
  4616. </div>
  4617. <div class="tool" :class="{
  4618. isToolChoose:
  4619. itemTool.tool.indexOf(50) != -1,
  4620. }" @click="
  4621. addTools(50, itemTaskIndex, toolIndex)
  4622. ">
  4623. <div class="whiteBIcon" @click.stop="
  4624. addTools(50, itemTaskIndex, toolIndex)
  4625. ">
  4626. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4627. <div style="margin: 5px 0">批量上传</div>
  4628. </div>
  4629. <div class="noCTool">
  4630. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4631. </div>
  4632. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4633. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4634. </div>
  4635. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4636. <img src="../../../assets/icon/checkNo.png" alt
  4637. v-if="itemTool.tool.indexOf(50) == -1" />
  4638. <div class="checkDiv" v-else>
  4639. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4640. </div>
  4641. </div> -->
  4642. </div>
  4643. <!-- <div class="tool">
  4644. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4645. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4646. <div style="margin: 5px 0">个人评价</div>
  4647. </div>
  4648. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4649. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4650. <div class="checkDiv" v-else>
  4651. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4652. </div>
  4653. </div>
  4654. </div> -->
  4655. <div class="tool" :class="{
  4656. isToolChoose:
  4657. itemTool.tool.indexOf(41) != -1,
  4658. }" @click="
  4659. addTools(41, itemTaskIndex, toolIndex)
  4660. ">
  4661. <div class="whiteBIcon" @click.stop="
  4662. openTools(itemTaskIndex, 41, toolIndex)
  4663. ">
  4664. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4665. <div style="margin: 5px 0">选择匹配</div>
  4666. </div>
  4667. <div class="noCTool">
  4668. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4669. </div>
  4670. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4671. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4672. </div>
  4673. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4674. <img src="../../../assets/icon/checkNo.png" alt
  4675. v-if="itemTool.tool.indexOf(41) == -1" />
  4676. <div class="checkDiv" v-else>
  4677. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4678. </div>
  4679. </div> -->
  4680. </div>
  4681. <div class="tool" :class="{
  4682. isToolChoose:
  4683. itemTool.tool.indexOf(47) != -1,
  4684. }" @click="
  4685. addTools(47, itemTaskIndex, toolIndex)
  4686. ">
  4687. <div class="whiteBIcon" @click.stop="
  4688. openTools(itemTaskIndex, 47, toolIndex)
  4689. ">
  4690. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4691. <div style="margin: 5px 0">排序</div>
  4692. </div>
  4693. <div class="noCTool">
  4694. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4695. </div>
  4696. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4697. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4698. </div>
  4699. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4700. <img src="../../../assets/icon/checkNo.png" alt
  4701. v-if="itemTool.tool.indexOf(47) == -1" />
  4702. <div class="checkDiv" v-else>
  4703. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4704. </div>
  4705. </div> -->
  4706. </div>
  4707. <!-- <div class="tool">
  4708. <div
  4709. class="whiteBIcon"
  4710. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4711. >
  4712. <img
  4713. src="../../../assets/icon/thirdToolList/mp3.png"
  4714. alt
  4715. />
  4716. <div style="margin: 5px 0">上传音频</div>
  4717. </div>
  4718. <div
  4719. class="check"
  4720. @click="addTools(42, itemTaskIndex, toolIndex)"
  4721. >
  4722. <img
  4723. src="../../../assets/icon/checkNo.png"
  4724. alt
  4725. v-if="itemTool.tool.indexOf(42) == -1"
  4726. />
  4727. <img
  4728. src="../../../assets/icon/checkedIs.png"
  4729. alt
  4730. v-else
  4731. />
  4732. </div>
  4733. </div> -->
  4734. </div>
  4735. <div class="toolSort" v-if="itemTool.toolType == 3">
  4736. <div class="tool" :class="{
  4737. isToolChoose:
  4738. itemTool.tool.indexOf(18) != -1,
  4739. }" @click="
  4740. addTools(18, itemTaskIndex, toolIndex)
  4741. ">
  4742. <div class="whiteBIcon" @click.stop="
  4743. addTools(18, itemTaskIndex, toolIndex)
  4744. ">
  4745. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4746. <div style="margin: 5px 0">训练平台</div>
  4747. </div>
  4748. <div class="noCTool">
  4749. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4750. </div>
  4751. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4752. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4753. </div>
  4754. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4755. <img src="../../../assets/icon/checkNo.png" alt
  4756. v-if="itemTool.tool.indexOf(18) == -1" />
  4757. <div class="checkDiv" v-else>
  4758. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4759. </div>
  4760. </div> -->
  4761. </div>
  4762. <div class="tool" :class="{
  4763. isToolChoose:
  4764. itemTool.tool.indexOf(21) != -1,
  4765. }" @click="
  4766. addTools(21, itemTaskIndex, toolIndex)
  4767. ">
  4768. <div class="whiteBIcon" @click.stop="
  4769. addTools(21, itemTaskIndex, toolIndex)
  4770. ">
  4771. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4772. <div style="margin: 5px 0">
  4773. AIoT Blockly
  4774. </div>
  4775. </div>
  4776. <div class="noCTool">
  4777. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4778. </div>
  4779. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4780. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4781. </div>
  4782. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4783. <img src="../../../assets/icon/checkNo.png" alt
  4784. v-if="itemTool.tool.indexOf(21) == -1" />
  4785. <div class="checkDiv" v-else>
  4786. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4787. </div>
  4788. </div> -->
  4789. </div>
  4790. <!-- <div class="tool">
  4791. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4792. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4793. <div style="margin: 5px 0">AI体验</div>
  4794. </div>
  4795. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4796. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4797. <div class="checkDiv" v-else>
  4798. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4799. </div>
  4800. </div>
  4801. </div> -->
  4802. <div class="tool" :class="{
  4803. isToolChoose:
  4804. itemTool.tool.indexOf(23) != -1,
  4805. }" @click="
  4806. addTools(23, itemTaskIndex, toolIndex)
  4807. ">
  4808. <div class="whiteBIcon" @click.stop="
  4809. addTools(23, itemTaskIndex, toolIndex)
  4810. ">
  4811. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4812. <div style="margin: 5px 0">AI Python</div>
  4813. </div>
  4814. <div class="noCTool">
  4815. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4816. </div>
  4817. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4818. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4819. </div>
  4820. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4821. <img src="../../../assets/icon/checkNo.png" alt
  4822. v-if="itemTool.tool.indexOf(23) == -1" />
  4823. <div class="checkDiv" v-else>
  4824. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4825. </div>
  4826. </div> -->
  4827. </div>
  4828. <div class="tool" :class="{
  4829. isToolChoose:
  4830. itemTool.tool.indexOf(24) != -1,
  4831. }" @click="
  4832. addTools(24, itemTaskIndex, toolIndex)
  4833. ">
  4834. <div class="whiteBIcon" @click.stop="
  4835. addTools(24, itemTaskIndex, toolIndex)
  4836. ">
  4837. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4838. <div style="margin: 5px 0">
  4839. AI Blockly
  4840. </div>
  4841. </div>
  4842. <div class="noCTool">
  4843. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4844. </div>
  4845. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4846. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4847. </div>
  4848. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4849. <img src="../../../assets/icon/checkNo.png" alt
  4850. v-if="itemTool.tool.indexOf(24) == -1" />
  4851. <div class="checkDiv" v-else>
  4852. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4853. </div>
  4854. </div> -->
  4855. </div>
  4856. <div class="tool" :class="{
  4857. isToolChoose:
  4858. itemTool.tool.indexOf(32) != -1,
  4859. }" @click="
  4860. addTools(32, itemTaskIndex, toolIndex)
  4861. ">
  4862. <div class="whiteBIcon" @click.stop="
  4863. addTools(32, itemTaskIndex, toolIndex)
  4864. ">
  4865. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4866. <div style="margin: 5px 0">源码编辑</div>
  4867. </div>
  4868. <div class="noCTool">
  4869. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4870. </div>
  4871. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4872. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4873. </div>
  4874. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4875. <img src="../../../assets/icon/checkNo.png" alt
  4876. v-if="itemTool.tool.indexOf(32) == -1" />
  4877. <div class="checkDiv" v-else>
  4878. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4879. </div>
  4880. </div> -->
  4881. </div>
  4882. <div class="tool" :class="{
  4883. isToolChoose:
  4884. itemTool.tool.indexOf(57) != -1,
  4885. }" @click="
  4886. addTools(57, itemTaskIndex, toolIndex)
  4887. ">
  4888. <div class="whiteBIcon" @click.stop="
  4889. openTools(itemTaskIndex, 57, toolIndex)
  4890. ">
  4891. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4892. <div style="margin: 5px 0">CocoPi</div>
  4893. </div>
  4894. <div class="noCTool">
  4895. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4896. </div>
  4897. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4898. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4899. </div>
  4900. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4901. <img src="../../../assets/icon/checkNo.png" alt
  4902. v-if="itemTool.tool.indexOf(57) == -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(63) != -1,
  4911. }" @click="
  4912. addTools(63, itemTaskIndex, toolIndex)
  4913. ">
  4914. <div class="whiteBIcon" @click.stop="
  4915. addTools(63, itemTaskIndex, toolIndex)
  4916. ">
  4917. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4918. <div style="margin: 5px 0">海龟编程</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(63) != -1">
  4924. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4925. </div>
  4926. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4927. <img src="../../../assets/icon/checkNo.png" alt
  4928. v-if="itemTool.tool.indexOf(63) == -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(71) != -1,
  4937. }" @click="
  4938. addTools(71, itemTaskIndex, toolIndex)
  4939. ">
  4940. <div class="whiteBIcon" @click.stop="
  4941. addTools(71, itemTaskIndex, toolIndex)
  4942. ">
  4943. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4944. <div style="margin: 5px 0">AI智能体</div>
  4945. </div>
  4946. <div class="noCTool">
  4947. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4948. </div>
  4949. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4950. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4951. </div>
  4952. </div>
  4953. </div>
  4954. <div class="toolSort" v-if="itemTool.toolType == 7">
  4955. <div class="tool" :class="{
  4956. isToolChoose:
  4957. itemTool.tool.indexOf(40) != -1,
  4958. }" @click.stop="
  4959. addTools(40, itemTaskIndex, toolIndex)
  4960. ">
  4961. <div class="whiteBIcon" @click.stop="
  4962. openTools(itemTaskIndex, 40, toolIndex)
  4963. ">
  4964. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4965. <div style="margin: 5px 0">个人评价</div>
  4966. </div>
  4967. <div class="noCTool">
  4968. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4969. </div>
  4970. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4971. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4972. </div>
  4973. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4974. <img src="../../../assets/icon/checkNo.png" alt
  4975. v-if="itemTool.tool.indexOf(40) == -1" />
  4976. <div class="checkDiv" v-else>
  4977. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4978. </div>
  4979. </div> -->
  4980. </div>
  4981. </div>
  4982. <div class="toolSort" v-if="itemTool.toolType == 5">
  4983. <div class="tool" :class="{
  4984. isToolChoose:
  4985. itemTool.tool.indexOf(28) != -1,
  4986. }" @click="
  4987. addTools(28, itemTaskIndex, toolIndex)
  4988. ">
  4989. <div class="whiteBIcon" @click.stop="
  4990. addTools(28, itemTaskIndex, toolIndex)
  4991. ">
  4992. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4993. <div style="margin: 5px 0">翻译</div>
  4994. </div>
  4995. <div class="noCTool">
  4996. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4997. </div>
  4998. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4999. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5000. </div>
  5001. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5002. <img src="../../../assets/icon/checkNo.png" alt
  5003. v-if="itemTool.tool.indexOf(28) == -1" />
  5004. <div class="checkDiv" v-else>
  5005. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5006. </div>
  5007. </div> -->
  5008. </div>
  5009. <div class="tool" :class="{
  5010. isToolChoose:
  5011. itemTool.tool.indexOf(31) != -1,
  5012. }" @click="
  5013. addTools(31, itemTaskIndex, toolIndex)
  5014. ">
  5015. <div class="whiteBIcon" @click.stop="
  5016. addTools(31, itemTaskIndex, toolIndex)
  5017. ">
  5018. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5019. <div style="margin: 5px 0">数字画板</div>
  5020. </div>
  5021. <div class="noCTool">
  5022. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5023. </div>
  5024. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  5025. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5026. </div>
  5027. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5028. <img src="../../../assets/icon/checkNo.png" alt
  5029. v-if="itemTool.tool.indexOf(31) == -1" />
  5030. <div class="checkDiv" v-else>
  5031. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5032. </div>
  5033. </div> -->
  5034. </div>
  5035. <div class="tool" :class="{
  5036. isToolChoose:
  5037. itemTool.tool.indexOf(39) != -1,
  5038. }" @click="
  5039. addTools(39, itemTaskIndex, toolIndex)
  5040. ">
  5041. <div class="whiteBIcon" @click.stop="
  5042. addTools(39, itemTaskIndex, toolIndex)
  5043. ">
  5044. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5045. <div style="margin: 5px 0">GeoGebra</div>
  5046. </div>
  5047. <div class="noCTool">
  5048. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5049. </div>
  5050. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  5051. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5052. </div>
  5053. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5054. <img src="../../../assets/icon/checkNo.png" alt
  5055. v-if="itemTool.tool.indexOf(39) == -1" />
  5056. <div class="checkDiv" v-else>
  5057. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5058. </div>
  5059. </div> -->
  5060. </div>
  5061. <div class="tool" :class="{
  5062. isToolChoose:
  5063. itemTool.tool.indexOf(66) != -1,
  5064. }" @click="
  5065. addTools(66, itemTaskIndex, toolIndex)
  5066. ">
  5067. <div class="whiteBIcon" @click.stop="
  5068. addTools(66, itemTaskIndex, toolIndex)
  5069. ">
  5070. <img src="../../../assets/icon/secondToolList/formulaEdi.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(66) != -1">
  5077. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5078. </div>
  5079. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  5080. <img src="../../../assets/icon/checkNo.png" alt
  5081. v-if="itemTool.tool.indexOf(66) == -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 class="tool">
  5088. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  5089. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  5090. <div style="margin: 5px 0">分子结构</div>
  5091. </div>
  5092. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  5093. <img src="../../../assets/icon/checkNo.png" alt
  5094. v-if="itemTool.tool.indexOf(67) == -1" />
  5095. <div class="checkDiv" v-else>
  5096. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5097. </div>
  5098. </div>
  5099. </div> -->
  5100. <!-- <div class="tool" :class="{
  5101. isToolChoose:
  5102. itemTool.tool.indexOf(68) != -1,
  5103. }" @click="
  5104. addTools(68, itemTaskIndex, toolIndex)
  5105. ">
  5106. <div class="whiteBIcon" @click.stop="
  5107. addTools(68, itemTaskIndex, toolIndex)
  5108. ">
  5109. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  5110. <div style="margin: 5px 0">时间轴</div>
  5111. </div>
  5112. <div class="noCTool">
  5113. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5114. </div>
  5115. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  5116. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5117. </div> -->
  5118. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  5119. <img src="../../../assets/icon/checkNo.png" alt
  5120. v-if="itemTool.tool.indexOf(68) == -1" />
  5121. <div class="checkDiv" v-else>
  5122. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5123. </div>
  5124. </div> -->
  5125. <!-- </div> -->
  5126. <div class="tool" :class="{
  5127. isToolChoose:
  5128. itemTool.tool.indexOf(69) != -1,
  5129. }" @click="
  5130. addTools(69, itemTaskIndex, toolIndex)
  5131. ">
  5132. <div class="whiteBIcon" @click.stop="
  5133. openTools(itemTaskIndex, 69, toolIndex)
  5134. ">
  5135. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  5136. <div style="margin: 5px 0">英语写作</div>
  5137. </div>
  5138. <div class="noCTool">
  5139. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5140. </div>
  5141. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  5142. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5143. </div>
  5144. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  5145. <img src="../../../assets/icon/checkNo.png" alt
  5146. v-if="itemTool.tool.indexOf(4) == -1" />
  5147. <div class="checkDiv" v-else>
  5148. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5149. </div>
  5150. </div> -->
  5151. </div>
  5152. <div class="tool" :class="{
  5153. isToolChoose:
  5154. itemTool.tool.indexOf(70) != -1,
  5155. }" @click="
  5156. addTools(70, itemTaskIndex, toolIndex)
  5157. ">
  5158. <div class="whiteBIcon" @click.stop="
  5159. openTools(itemTaskIndex, 70, toolIndex)
  5160. ">
  5161. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  5162. <div style="margin: 5px 0">英语口语</div>
  5163. </div>
  5164. <div class="noCTool">
  5165. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5166. </div>
  5167. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  5168. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5169. </div>
  5170. </div>
  5171. <!-- <div class="tool">
  5172. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  5173. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  5174. <div style="margin: 5px 0">翻译</div>
  5175. </div>
  5176. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5177. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  5178. <div class="checkDiv" v-else>
  5179. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5180. </div>
  5181. </div>
  5182. </div>
  5183. <div class="tool">
  5184. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  5185. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  5186. <div style="margin: 5px 0">魔盒识字</div>
  5187. </div>
  5188. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  5189. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  5190. <div class="checkDiv" v-else>
  5191. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5192. </div>
  5193. </div>
  5194. </div>
  5195. <div class="tool">
  5196. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  5197. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  5198. <div style="margin: 5px 0">24点</div>
  5199. </div>
  5200. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  5201. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  5202. <div class="checkDiv" v-else>
  5203. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5204. </div>
  5205. </div>
  5206. </div>
  5207. <div class="tool">
  5208. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  5209. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5210. <div style="margin: 5px 0">数学画板</div>
  5211. </div>
  5212. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5213. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  5214. <div class="checkDiv" v-else>
  5215. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5216. </div>
  5217. </div>
  5218. </div>
  5219. <div class="tool">
  5220. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  5221. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5222. <div style="margin: 5px 0">GeoGebra</div>
  5223. </div>
  5224. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5225. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  5226. <div class="checkDiv" v-else>
  5227. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5228. </div>
  5229. </div>
  5230. </div>
  5231. <div class="tool">
  5232. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  5233. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  5234. <div style="margin: 5px 0">模拟驾驶</div>
  5235. </div>
  5236. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  5237. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  5238. <div class="checkDiv" v-else>
  5239. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5240. </div>
  5241. </div>
  5242. </div>
  5243. <div class="tool">
  5244. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  5245. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  5246. <div style="margin: 5px 0">路径搜索</div>
  5247. </div>
  5248. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  5249. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  5250. <div class="checkDiv" v-else>
  5251. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5252. </div>
  5253. </div>
  5254. </div>
  5255. <div class="tool">
  5256. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  5257. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  5258. <div style="margin: 5px 0">深度学习</div>
  5259. </div>
  5260. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  5261. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  5262. <div class="checkDiv" v-else>
  5263. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5264. </div>
  5265. </div>
  5266. </div>
  5267. <div class="tool">
  5268. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  5269. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  5270. <div style="margin: 5px 0">全历史</div>
  5271. </div>
  5272. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  5273. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  5274. <div class="checkDiv" v-else>
  5275. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5276. </div>
  5277. </div>
  5278. </div>
  5279. </div>
  5280. <div class="toolSort" v-if="itemTool.toolType == 4">
  5281. <div class="tool">
  5282. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  5283. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  5284. <div style="margin: 5px 0">课程设计</div>
  5285. </div>
  5286. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  5287. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  5288. <div class="checkDiv" v-else>
  5289. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5290. </div>
  5291. </div>
  5292. </div>
  5293. <div class="tool">
  5294. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  5295. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  5296. <div style="margin: 5px 0">目标管理</div>
  5297. </div>
  5298. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  5299. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  5300. <div class="checkDiv" v-else>
  5301. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5302. </div>
  5303. </div>
  5304. </div> -->
  5305. <!-- <div class="tool">
  5306. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  5307. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  5308. <div style="margin: 5px 0">汉字宫</div>
  5309. </div>
  5310. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  5311. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  5312. <div class="checkDiv" v-else>
  5313. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5314. </div>
  5315. </div>
  5316. </div> -->
  5317. </div>
  5318. </div>
  5319. <!-- v-show="!itemTool.isFold3" -->
  5320. <div class="op_tool_box"
  5321. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1"
  5322. element-loading-text="小可正在努力生成中,请稍等...">
  5323. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  5324. class="binfo_input" style="
  5325. margin: 0 0 20px 0;
  5326. width: 100% !important;
  5327. " v-model="itemTool.toolDetail"></textarea>
  5328. <div class="op_box"
  5329. :class="{op_box_isquote: isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]}">
  5330. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  5331. <div class="op_box_right">
  5332. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5333. <div class="r_pub_button_op"
  5334. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)"
  5335. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)">
  5336. 智能优化</div>
  5337. </el-tooltip>
  5338. <el-switch style="margin-left: 10px"
  5339. v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" active-text="引用"
  5340. active-color="#0061FF" class="custom-switch" v-if="isDialog == 1"
  5341. @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  5342. </div>
  5343. </div>
  5344. </div>
  5345. <evaList :toolsData="toolsData" :unitJson="unitJson" :itemTaskIndex="itemTaskIndex"
  5346. :toolIndex="toolIndex" :knowFileids="knowFileids" :languageSetting="languageSetting"
  5347. :userid="userid" :aiJson="aiJson" @addAppendixEva="addAppendixEva"
  5348. @setEvaList="setEvaList" @addCourseBehavior="addCourseBehavior"
  5349. v-if="panTaskElist() == 0 && pjIndex.indexOf(itemTool.tool[0]) != -1"
  5350. :ref="'evalist'+itemTaskIndex+toolIndex"></evaList>
  5351. </div>
  5352. <button class="c_pub_button_add pub_btn_tool_img"
  5353. @click="addToolFun(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具描述-添加按钮`)"
  5354. style="
  5355. margin: 0 auto;
  5356. padding: 0 30px;
  5357. height: 45px;
  5358. ">
  5359. 添加工具
  5360. </button>
  5361. </div>
  5362. </div>
  5363. <div class="elist_css" v-if="panElist(itemTask) > 0">
  5364. <div class="elist_title">
  5365. <div style=" display: flex; flex-direction: row; align-items: center; margin: 20px 0; ">
  5366. <div class="lineTitle clineTitle" style="width: auto">任务评价体系</div>
  5367. </div>
  5368. <div>
  5369. <MindTask :showBar="false" :mindData="itemTask" style="width: 100%"
  5370. :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' "
  5371. :ref="unitIndex + '-' + itemTaskIndex + 'mindTask'"></MindTask>
  5372. </div>
  5373. </div>
  5374. </div>
  5375. <div class="elist_css" v-if="panTaskElist() > 0"
  5376. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])"
  5377. element-loading-text="小可正在努力生成中,请稍等...">
  5378. <div class="elist_title">
  5379. <div style="
  5380. display: flex;
  5381. flex-direction: row;
  5382. align-items: center;
  5383. margin: 20px 0;
  5384. ">
  5385. <div class="lineTitle clineTitle">评价设置</div>
  5386. <div style="margin-left:auto;display: flex;">
  5387. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  5388. v-if="itemTask.eList && itemTask.eList.length">
  5389. <div class="r_pub_button_op"
  5390. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  5391. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  5392. </el-tooltip>
  5393. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom"
  5394. v-if="itemTask.eList && itemTask.eList.length">
  5395. <div class="r_pub_button_op" style="margin-left:10px;"
  5396. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  5397. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  5398. </el-tooltip>
  5399. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5400. <div class="r_pub_button_op" style="margin-left:10px;"
  5401. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  5402. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList &&
  5403. itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
  5404. </el-tooltip>
  5405. </div>
  5406. <!-- <div class="line" style="width: 90%"></div> -->
  5407. </div>
  5408. </div>
  5409. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5410. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5411. 上传补充资料
  5412. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple"
  5413. style="display: none" v-if="inputShow" @change="
  5414. beforeUploadInfo2(
  5415. $event,
  5416. 18,
  5417. itemTaskIndex
  5418. )
  5419. " />
  5420. </button>
  5421. <div style="margin-top: 10px;width:100%"
  5422. v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  5423. <div class="add_chapters_box add_c_none" v-if="
  5424. pingjiaInfoData[itemTaskIndex] &&
  5425. pingjiaInfoData[itemTaskIndex].length == 0
  5426. ">
  5427. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5428. <span>暂时还没有内容,快去添加吧</span>
  5429. </div>
  5430. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5431. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]"
  5432. :key="item1.id" @click="
  5433. getChapterData(
  5434. $event,
  5435. index1,
  5436. item1.type
  5437. )
  5438. ">
  5439. <div class="chapter_upload_o" style="
  5440. position: relative;
  5441. display: flex;
  5442. align-items: center;
  5443. ">
  5444. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5445. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5446. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5447. </div>
  5448. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5449. </div>
  5450. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5451. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5452. </div>
  5453. <div v-if="item1.type == 14" class="chapter_upload_l_i14"
  5454. style="margin-left: 1px">
  5455. </div>
  5456. <div v-if="item1.type == 12" class="chapter_upload_l_i12"
  5457. style="margin-left: 1px">
  5458. </div>
  5459. <div v-if="item1.type == 13" class="chapter_upload_l_i13"
  5460. style="margin-left: 1px">
  5461. </div>
  5462. </div>
  5463. <div class="chapter_upload_n">
  5464. <input readonly="true" v-if="
  5465. item1.type == 2 ||
  5466. item1.type == 3 ||
  5467. item1.type == 12 ||
  5468. item1.type == 13 ||
  5469. item1.type == 7
  5470. " :placeholder="item1.name" @click.stop="
  5471. checkChpater3($event, index1, item1)
  5472. " style="
  5473. border: none;
  5474. outline: none;
  5475. width: 80%;
  5476. minwidth: 215px;
  5477. z-index: 99;
  5478. font-size: 14px;
  5479. white-space: nowrap;
  5480. overflow: hidden;
  5481. text-overflow: ellipsis;
  5482. " />
  5483. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5484. border: none;
  5485. outline: none;
  5486. width: 80%;
  5487. white-space: nowrap;
  5488. overflow: hidden;
  5489. text-overflow: ellipsis;
  5490. " readonly="true" @click="
  5491. selectAttText(index1)
  5492. " />
  5493. <input :placeholder="item1.title ? item1.title : '链接'
  5494. " v-if="item1.type == 8" style="
  5495. border: none;
  5496. outline: none;
  5497. width: 80%;
  5498. white-space: nowrap;
  5499. overflow: hidden;
  5500. text-overflow: ellipsis;
  5501. " readonly="true" @click="selectLine(index1)" />
  5502. <input :placeholder="item1.title ? item1.title : '链接'
  5503. " v-if="item1.type == 14" style="
  5504. border: none;
  5505. outline: none;
  5506. width: 80%;
  5507. white-space: nowrap;
  5508. overflow: hidden;
  5509. text-overflow: ellipsis;
  5510. " readonly="true" @click="
  5511. openUpdateSource(index1)
  5512. " />
  5513. </div>
  5514. <div class="chapter_upload_ic">
  5515. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5516. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5517. checkChpater3($event, index1, item1)
  5518. ">
  5519. <div></div>
  5520. </div>
  5521. <div class="chapter_upload_ic_r" @click.stop="
  5522. deletepingjiaInfoData(
  5523. $event,
  5524. index1,
  5525. itemTaskIndex
  5526. )
  5527. ">
  5528. <div></div>
  5529. </div>
  5530. </div>
  5531. </div>
  5532. </div>
  5533. </div>
  5534. </div>
  5535. <div v-if="
  5536. pingjiainfoproVisible[itemTaskIndex]
  5537. " class="mask">
  5538. <div class="progressBox">
  5539. <div class="lbox">
  5540. <img src="../../../assets/loading.gif" />上传中,请稍后
  5541. </div>
  5542. <div style="margin-bottom: 10px">
  5543. <span>{{
  5544. pingjiainfoisFinishSize[itemTaskIndex]
  5545. }}</span>
  5546. /
  5547. <span>{{
  5548. pingjiainfoisAllSize[itemTaskIndex]
  5549. }}</span>
  5550. </div>
  5551. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5552. ? pingjiainfoprogress[itemTaskIndex]
  5553. : 0
  5554. " style="width: 80%"></el-progress> -->
  5555. </div>
  5556. </div>
  5557. </div>
  5558. <div class="mbCss">
  5559. <div class="pjCss" :style="{
  5560. width: itemTask.isEvaFold
  5561. ? 'calc(100% - 55%)'
  5562. : 'calc(100% - 120px)',
  5563. }">
  5564. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5565. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5566. <div class="elist_inptu_text">
  5567. <span>目标:</span>
  5568. <!-- <span>核心素养:</span> -->
  5569. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标"
  5570. style="width: calc(100% - 280px);" />
  5571. <el-switch @change="forceUpdate" class="rateSwitch" style="margin-left: auto;"
  5572. v-model="itemTask.eList[eIndex].isai" active-color="#0061FF" active-text="AI评分"
  5573. inactive-text="" active-value="1" inactive-value="2">
  5574. </el-switch>
  5575. </div>
  5576. <div class="elist_inptu_text" v-show="false">
  5577. <!-- <span>评价维度:</span> -->
  5578. <span>能力:</span>
  5579. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5580. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5581. <!-- </el-tooltip> -->
  5582. <!-- <span>评星等级:</span>
  5583. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5584. disabled></el-rate> -->
  5585. <div class="remove" @click="
  5586. deletEList(
  5587. unitIndex,
  5588. itemTaskIndex,
  5589. eIndex
  5590. )
  5591. "></div>
  5592. </div>
  5593. <div class="elist_inptu_text">
  5594. <!-- <span>维度描述:</span> -->
  5595. <span>评价标准:</span>
  5596. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5597. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5598. <div class="remove" @click="
  5599. deletEList(
  5600. unitIndex,
  5601. itemTaskIndex,
  5602. eIndex
  5603. )
  5604. "></div>
  5605. <!-- </el-tooltip> -->
  5606. </div>
  5607. <div class="elist_inptu_text" v-if="evalua">
  5608. <span>目标:</span>
  5609. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5610. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5611. @change="forceUpdate()">
  5612. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5613. :value="e.name">
  5614. </el-option>
  5615. </el-select> -->
  5616. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5617. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5618. </div>
  5619. <div class="elist_inptu_text" style="align-items: flex-start;"
  5620. v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]"
  5621. element-loading-text="小可正在努力生成中,请稍等...">
  5622. <span>评价细则:</span>
  5623. <div style="width: calc(100%);">
  5624. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn"
  5625. v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' :
  5626. '展开细则'}}</div>
  5627. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5628. <div class="ruleBtn"
  5629. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5630. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5631. </el-tooltip>
  5632. <div style="width: calc(100%);" class='op_task_box'
  5633. v-if="itemTask.eList[eIndex].isrule">
  5634. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  5635. v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5636. <div class="op_box">
  5637. <div class="op_remark"></div>
  5638. <div class="op_box_right">
  5639. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5640. <div class="r_pub_button_op"
  5641. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5642. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">
  5643. {{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5644. </el-tooltip>
  5645. </div>
  5646. </div>
  5647. </div>
  5648. </div>
  5649. </div>
  5650. </div>
  5651. </div>
  5652. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5653. style="margin: 35px 35px 0 0">
  5654. <div class="addToolImg">
  5655. <img src="../../../assets/icon/add.png" alt />
  5656. </div>
  5657. <div>添加</div>
  5658. </div> -->
  5659. <div class="eva_btn_box">
  5660. <div class="eva_btn_left_box">
  5661. <button class="c_pub_button_add pub_btn_eval_img"
  5662. @click="addEList(unitIndex, itemTaskIndex)">
  5663. 添加
  5664. </button>
  5665. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5666. @click="openEList(unitIndex, itemTaskIndex)">
  5667. 资源
  5668. </button> -->
  5669. </div>
  5670. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5671. v-if="itemTask.eList && itemTask.eList.length">
  5672. 添加资源模板
  5673. </button>
  5674. </div>
  5675. </div>
  5676. <div v-if="evalua" style="
  5677. border: 1px solid #e5e5e5;
  5678. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5679. " :style="{
  5680. width: itemTask.isEvaFold ? '55%' : '116px',
  5681. }" class="evaCss">
  5682. <!-- <div class="e_add_top">
  5683. <div class="e_add_title">
  5684. <span>当前使用目标管理</span>
  5685. <span>{{ eTitle }}</span>
  5686. <img src="../../../assets/line.png" class="cru_line" style="
  5687. width: 125px;
  5688. height: 20px;
  5689. bottom: -10px;
  5690. left: 155px;
  5691. " />
  5692. </div>
  5693. </div> -->
  5694. <div class="e_add_content" style="width: 100%">
  5695. <div class="e_add_list_pbox" style="width: 100%">
  5696. <div class="e_add_list_pbox_title">
  5697. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5698. <div class="type_content" v-if="itemTask.isEvaFold">
  5699. <span :class="{ active: typeMode == 1 }"
  5700. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5701. <span :class="{ active: typeMode == 2 }"
  5702. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5703. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5704. </div>
  5705. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5706. @click="foldEva(itemTaskIndex)">
  5707. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5708. </div>
  5709. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5710. @click="foldEva(itemTaskIndex)">
  5711. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5712. </div>
  5713. </div>
  5714. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5715. style="min-height: 200px">
  5716. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5717. " v-if="typeMode == 1"></Mind>
  5718. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5719. </Sunburst>
  5720. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5721. v-if="typeMode == 3"></SeeBoard>
  5722. </div>
  5723. </div>
  5724. </div>
  5725. </div>
  5726. </div>
  5727. </div>
  5728. <div class="funBlock" style="padding: 0">
  5729. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5730. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5731. <div>
  5732. {{
  5733. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5734. }}
  5735. </div>
  5736. </div>
  5737. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5738. <div>展开</div>
  5739. <div class="arrow">
  5740. <img src="../../../assets/icon/expand.png" alt />
  5741. </div>
  5742. </div> -->
  5743. </div>
  5744. </div>
  5745. </div>
  5746. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5747. <!-- <div>
  5748. <img src="../../../../assets/icon/new/addStage.png" alt />
  5749. <span>添加任务</span>
  5750. </div> -->
  5751. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5752. 添加任务
  5753. </button>
  5754. </div>
  5755. <div class="appendixBox whiteBg taskBorder" style="background: #fff; margin: 10px 0 10px;"
  5756. :style="{ paddingBottom: appendixPan ? '10px' : '0px', minHeight: appendixPan ? '670px' : 'unset' }" v-if="(appendixTaskCheck != 'all' || appendixTypeCheck != 'all') || allFile().length" v-loading="appendixLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5757. <div class="whiteBg" style="border-radius: 0; ">
  5758. <div class="appendix_info_title" style="margin: 0 20px 0 20px;position:relative; padding: 0 0 15px;">
  5759. <span>附件</span>
  5760. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  5761. @click="appendixPan = !appendixPan">{{ appendixPan ? '折叠' : '展开' }}</button>
  5762. </div>
  5763. <div style="width: 100%; box-sizing: border-box;"
  5764. v-show="appendixPan">
  5765. <div class="appendix_check_box">
  5766. <div class="appendix_check_task">
  5767. <span>任务:</span>
  5768. <div class="checkButton" :class="{ checked: appendixTaskCheck == 'all' }" @click="appendixTaskCheck = 'all'">全部</div>
  5769. <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>
  5770. </div>
  5771. <div class="appendix_check_type">
  5772. <span>文件类型:</span>
  5773. <div class="checkButton" :class="{ checked: appendixTypeCheck == 'all' }" @click="appendixTypeCheck = 'all'">全部</div>
  5774. <div class="checkButton" :class="{ checked: appendixTypeCheck == tIndex }" @click="appendixTypeCheck = t.value" v-for="(t, tIndex) in appendixType" :key="tIndex">{{ t.label }}</div>
  5775. </div>
  5776. <div class="appendix_check_all_box">
  5777. <div class="appendix_check_all" v-if="allFile().length" @click="checkAllappendixFile()">
  5778. <div class="chapter_upload_check" :class="{ checked: panAppendixCheckAll() }"></div>
  5779. <div class="appendix_check_all_text">全选</div>
  5780. </div>
  5781. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="exportAppendixFiles">批量下载</button>
  5782. </div>
  5783. </div>
  5784. <div class="appendix_file_box">
  5785. <div class="add_chapters_box" style="display: flex; flex-direction: column">
  5786. <div style="height: 50px; display: flex ; align-items: center; justify-content: center;" v-if="allFile().length == 0 ">
  5787. <span>暂时还没有内容,快去添加吧</span>
  5788. </div>
  5789. <div class="chapter_upload" v-for="(item1, index1) in allFile()" :key="item1.id">
  5790. <div class="chapter_upload_o"
  5791. style=" position: relative; display: flex; align-items: center; ">
  5792. <div class="chapter_upload_check"
  5793. :class="{ checked: appendixFiles.indexOf(item1.url) != -1 }"
  5794. @click="checkAppendixFile(item1.url)"></div>
  5795. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5796. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5797. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5798. </div>
  5799. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5800. </div>
  5801. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5802. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5803. </div>
  5804. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5805. </div>
  5806. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5807. </div>
  5808. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5809. </div>
  5810. </div>
  5811. <div class="chapter_upload_n" style="width: 100%;">
  5812. <div @click.stop="
  5813. checkChpater3($event, index1, item1)
  5814. " v-if="
  5815. item1.type == 2 ||
  5816. item1.type == 3 ||
  5817. item1.type == 12 ||
  5818. item1.type == 13 ||
  5819. item1.type == 7
  5820. " class="chapter_upload_box">{{ item1.name }}</div>
  5821. <div v-if="item1.type == 6" class="chapter_upload_box" @click="
  5822. selectAttText(0, index1)
  5823. ">{{ item1.name }}</div>
  5824. <div v-if="item1.type == 8" class="chapter_upload_box"
  5825. @click="selectLine(0, index1)">{{ item1.title ? item1.title : '链接' }}</div>
  5826. <div v-if="item1.type == 14" class="chapter_upload_box" @click="
  5827. openUpdateSource(0, index1)
  5828. ">{{ item1.title ? item1.title : '链接' }}</div>
  5829. </div>
  5830. <div class="chapter_upload_ic">
  5831. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5832. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5833. checkChpater3($event, index1, item1)
  5834. ">
  5835. <div></div>
  5836. </div>
  5837. <div class="chapter_upload_ic_download" @click.stop="downloadFile(item1)">
  5838. <div></div>
  5839. </div>
  5840. </div>
  5841. </div>
  5842. </div>
  5843. </div>
  5844. </div>
  5845. </div>
  5846. </div>
  5847. </div>
  5848. </div>
  5849. <div class="info_btnBox3" v-show="istemplate == 1">
  5850. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5851. goTo(
  5852. '/course?userid=' +
  5853. userid +
  5854. '&oid=' +
  5855. oid +
  5856. '&org=' +
  5857. org +
  5858. '&role=' +
  5859. role
  5860. )
  5861. ">
  5862. 返回课程
  5863. </button>
  5864. <button class="c_pub_button_return pub_btn_last_img"
  5865. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5866. {{ steps == 4 ? "返回课程" : "上一步" }}
  5867. </button>
  5868. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5869. pub_btn_next_img: steps != 3,
  5870. pub_btn_finish_img: steps == 3,
  5871. }">
  5872. {{ steps == 3 ? "确认上传" : "下一步" }}
  5873. </button>
  5874. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5875. '修改模板' : '保存模板'}}</button>
  5876. </div>
  5877. </div>
  5878. </div>
  5879. </div>
  5880. </div>
  5881. <div style="
  5882. width: calc(100% - 20px);
  5883. background: rgb(255, 255, 255);
  5884. border-radius: 10px;
  5885. " v-if="steps == 4">
  5886. <div class="basic_box_success">
  5887. <div class="right_img">
  5888. <img src="../../../assets/icon/right.png" alt />
  5889. </div>
  5890. <div style="font-weight: bold">成功</div>
  5891. <!-- <div>您的课程编号</div>
  5892. <div class="number">{{ number }}</div>-->
  5893. <!-- <div class="success_button">
  5894. <div class="look_course" @click="isNoFinsh">
  5895. 邀请老师协同编辑
  5896. </div>
  5897. <div class="attend_others" @click="goCourse">预览课程</div>
  5898. </div> -->
  5899. </div>
  5900. </div>
  5901. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5902. @mouseleave="btnDisplay(false)" v-if="false">
  5903. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5904. goTo(
  5905. '/course?userid=' +
  5906. userid +
  5907. '&oid=' +
  5908. oid +
  5909. '&org=' +
  5910. org +
  5911. '&role=' +
  5912. role
  5913. )
  5914. ">
  5915. 返回课程
  5916. </button>
  5917. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5918. @click="lastSteps">
  5919. {{ steps == 4 ? "返回课程" : "上一步" }}
  5920. </button>
  5921. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5922. pub_btn_next_img: steps != 3,
  5923. pub_btn_finish_img: steps == 3,
  5924. }">
  5925. {{ steps == 3 ? "确认上传" : "下一步" }}
  5926. </button>
  5927. </div>
  5928. </div>
  5929. </div>
  5930. <div class="leftBar" style="height: calc(100% - 36px - 20px);margin-top: 36px;" v-if="istemplate == 1">
  5931. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson"
  5932. v-if="!yiKeTemplateArray.includes(templateid)" />
  5933. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson"
  5934. v-if="!yiKeTemplateArray.includes(templateid)" />
  5935. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson"
  5936. v-if="!yiKeTemplateArray.includes(templateid)" />
  5937. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5938. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson"
  5939. v-if="!yiKeTemplateArray.includes(templateid)" />
  5940. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson"
  5941. v-if="!yiKeTemplateArray.includes(templateid)" />
  5942. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson"
  5943. v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5944. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson"
  5945. v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'" />
  5946. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2"
  5947. @setAiJson="setAiJson" />
  5948. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson"
  5949. v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5950. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson"
  5951. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5952. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson"
  5953. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5954. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson"
  5955. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5956. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson"
  5957. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5958. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson"
  5959. v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'" />
  5960. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5961. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5962. @setAiJson="setAiJson" /> -->
  5963. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5964. @setAiJson="setAiJson" />
  5965. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5966. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5967. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5968. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5969. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5970. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5971. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5972. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson" />
  5973. </div>
  5974. <div class="leftBar2 resizable" style="height: calc(100% - 36px - 20px);margin-top: 36px;"
  5975. v-show="istemplate != 1 && isDialog == 1 && chatid && isDisplay">
  5976. <div class="resizer"></div>
  5977. <aiBoxRight :languageSetting="languageSetting" :courseId="chatid" :unitJson="unitJson" :quoteArray="isQuote"
  5978. :teacherCourseText="teacherCourseText" :targetCourseText="targetCourseText" :courseText2="courseText"
  5979. :targetCourseText2="targetCourseText2" :cpote="cpote" @addCourseBehavior="addCourseBehavior"
  5980. :fileids='[...knowFileids, ...knowFileids2]' @setIsQuote="setIsQuote" @addChatAppendixFile="addChatAppendixFile"></aiBoxRight>
  5981. </div>
  5982. <div class="close_btn" @click="closeRight" :class="!isDisplay ? 'close_btn_voice' : ''"
  5983. v-show="istemplate != 1 && isDialog == 1 && chatid">
  5984. <img src="../../../assets/icon/course/arrow.svg">
  5985. </div>
  5986. </div>
  5987. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5988. class="dialog_diy2 customWidth">
  5989. <div>请复制该链接邀请协同编辑</div>
  5990. <div>http://www.boomyon.com/index-zhang.com</div>
  5991. <span slot="footer" class="dialog-footer">
  5992. <el-button type="primary">复制链接分享</el-button>
  5993. <el-button @click="dialogVisible = false">取消</el-button>
  5994. </span>
  5995. </el-dialog>
  5996. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5997. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5998. <el-form>
  5999. <el-form-item label="文档标题">
  6000. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  6001. </el-form-item>
  6002. <div>文档简介</div>
  6003. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  6004. </el-form>
  6005. <span slot="footer" class="dialog-footer">
  6006. <el-button @click="dialogVisible1 = false">取 消</el-button>
  6007. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  6008. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  6009. </span>
  6010. </el-dialog>
  6011. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  6012. :before-close="handleClose" class="dialog_diy">
  6013. <el-form>
  6014. <el-form-item label="文档标题">
  6015. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  6016. </el-form-item>
  6017. <div>文档内容</div>
  6018. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  6019. </el-form>
  6020. <span slot="footer" class="dialog-footer">
  6021. <el-button @click="clearChoose">取 消</el-button>
  6022. <el-button type="primary" @click="wordNext()">确定</el-button>
  6023. </span>
  6024. </el-dialog>
  6025. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  6026. :before-close="handleClose" class="dialog_diy">
  6027. <el-form>
  6028. <el-form-item label="文本标题">
  6029. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  6030. placeholder="请输入文本标题..."></el-input>
  6031. </el-form-item>
  6032. <!-- <div>富文本内容</div> -->
  6033. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  6034. </el-form>
  6035. <span slot="footer" class="dialog-footer">
  6036. <el-button @click="clearAttText">取 消</el-button>
  6037. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  6038. </span>
  6039. </el-dialog>
  6040. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  6041. :before-close="handleClose" class="dialog_diy lineCss">
  6042. <el-form>
  6043. <el-form-item label="标题" :label-width="formLabelWidth">
  6044. <span>
  6045. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  6046. </span>
  6047. </el-form-item>
  6048. <el-form-item label="链接" :label-width="formLabelWidth">
  6049. <span>
  6050. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  6051. </span>
  6052. </el-form-item>
  6053. </el-form>
  6054. <span slot="footer" class="dialog-footer">
  6055. <el-button @click="clearLine">取 消</el-button>
  6056. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  6057. </span>
  6058. </el-dialog>
  6059. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  6060. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  6061. <div>
  6062. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  6063. </div>
  6064. <span slot="footer" class="dialog-footer">
  6065. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  6066. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  6067. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  6068. </span>
  6069. </el-dialog>
  6070. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  6071. :before-close="handleClose" class="addNewPP customWidth">
  6072. <div class="people">
  6073. <div class="people_top">
  6074. <div class="people_nav">选择成员</div>
  6075. <div class="people_top_right">
  6076. <div class="people_search">
  6077. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  6078. <div class="search_img" @click="searchStudent">
  6079. <img src="../../../assets/icon/search.png" alt />
  6080. </div>
  6081. </div>
  6082. </div>
  6083. </div>
  6084. <el-checkbox-group v-model="checkboxList" class="people_name">
  6085. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  6086. "暂无学生可选" }}</el-checkbox>
  6087. </el-checkbox-group>
  6088. </div>
  6089. <span slot="footer" class="dialog-footer">
  6090. <el-button @click="dialogVisible3 = false">取 消</el-button>
  6091. <el-button type="primary" @click="isAddPP">确定</el-button>
  6092. </span>
  6093. </el-dialog>
  6094. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  6095. :before-close="handleClose" class="addNewPP2">
  6096. <div class="check_classBox">
  6097. <div class="check_class_right">
  6098. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  6099. 全部
  6100. </div>
  6101. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  6102. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  6103. {{ item.name }}
  6104. </div>
  6105. </el-tooltip>
  6106. </div>
  6107. <div class="check_class_left">
  6108. <div class="check_class_all_box">
  6109. <div class="check_class_left_title">选择班级</div>
  6110. <div style="display: flex; align-items: center; margin-left: auto">
  6111. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  6112. </div>
  6113. </div>
  6114. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  6115. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  6116. </div> -->
  6117. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  6118. v-if="grade2.length">
  6119. <div v-for="item in grade2" :key="item.id" class="class_item">
  6120. <el-checkbox :label="item.id">
  6121. {{ item.name }}
  6122. </el-checkbox>
  6123. </div>
  6124. </el-checkbox-group>
  6125. <div v-if="!grade2.length">暂无数据</div>
  6126. </div>
  6127. </div>
  6128. <span slot="footer" class="dialog-footer">
  6129. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  6130. <el-button type="primary" @click="isAddClass">确定</el-button>
  6131. </span>
  6132. </el-dialog>
  6133. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  6134. :before-close="handleClose" class="addNewPP customWidth">
  6135. <div style="display: flex;justify-content: space-between;">
  6136. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  6137. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  6138. 全部
  6139. </div>
  6140. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  6141. v-for="(i) in CollaborativeTeaList" :key="i.id">
  6142. <el-tooltip placement="top" :content="i.name">
  6143. <span>{{i.name}}</span>
  6144. </el-tooltip>
  6145. </div>
  6146. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  6147. 其他
  6148. </div>
  6149. </div>
  6150. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  6151. <div class="people">
  6152. <div class="people_top">
  6153. <div class="people_top_right">
  6154. <div class="people_search">
  6155. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  6156. <div class="search_img" @click="getTeacher(collid)">
  6157. <img src="../../../assets/icon/search.png" alt />
  6158. </div>
  6159. </div>
  6160. </div>
  6161. <div class="people_nav" style="display: flex; align-items: center">
  6162. <div class="check_class_left_title">选择成员</div>
  6163. <div style="display: flex; align-items: center; margin-left: auto">
  6164. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  6165. </div>
  6166. </div>
  6167. </div>
  6168. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  6169. @change="InviteChange2">
  6170. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  6171. <div class="t_j_box">
  6172. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  6173. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  6174. </el-tooltip>
  6175. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  6176. <span>{{ item.username.split('@')[0] }}</span>
  6177. </el-tooltip>
  6178. <el-tooltip placement="top" :content="item.school">
  6179. <span>{{ item.school }}</span>
  6180. </el-tooltip>
  6181. </div>
  6182. </el-checkbox>
  6183. </el-checkbox-group>
  6184. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  6185. </div>
  6186. </div>
  6187. </div>
  6188. <span slot="footer" class="dialog-footer">
  6189. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  6190. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  6191. </span>
  6192. </el-dialog>
  6193. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  6194. closePan(4);
  6195. }
  6196. " class="dialog_diy fullStyle">
  6197. <div style="height: 100%">
  6198. <div class="a_add_title" style="
  6199. display: flex;
  6200. flex-direction: row;
  6201. align-items: center;
  6202. justify-content: center;
  6203. ">
  6204. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  6205. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6206. </div>
  6207. <div class="a_addBox" style="height: calc(100% - 50px)">
  6208. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  6209. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  6210. <div class="a_add_checkType">
  6211. <span :class="{
  6212. active:
  6213. askJson.askJson[index1].type == '1' ||
  6214. !askJson.askJson[index1].type,
  6215. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  6216. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  6217. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  6218. </div>
  6219. <div class="a_add_head">
  6220. <div style="
  6221. display: flex;
  6222. align-items: center;
  6223. width: 100%;
  6224. margin-right: 20px;
  6225. ">
  6226. <span style="min-width: fit-content">{{
  6227. index1 + 1 + "、"
  6228. }}</span>
  6229. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6230. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  6231. $forceUpdate();
  6232. }
  6233. "></textarea>
  6234. </div>
  6235. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  6236. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  6237. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  6238. </div>
  6239. <div class="a_add_head_div">
  6240. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  6241. </el-button>
  6242. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  6243. </div>
  6244. </div>
  6245. <div class="a_add_body">
  6246. <div class="a_add_input" style="flex-direction: column">
  6247. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  6248. margin: 20px 10px 0 0;
  6249. display: flex;
  6250. align-items: center;
  6251. position: relative;
  6252. ">
  6253. <div style="margin-right: 10px">{{ optionTypeList[checkIndex] }}.</div>
  6254. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6255. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  6256. @change="() => {
  6257. $forceUpdate();
  6258. }
  6259. "></textarea>
  6260. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  6261. v-if="askJson.askJson[index1].askItem != 1">
  6262. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  6263. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  6264. </div>
  6265. <div class="a_add_body_div">
  6266. <el-button type="primary" size="small"
  6267. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  6268. <el-button type="primary" size="small" @click="
  6269. deletecheckList(askJson.askJson[index1], checkIndex)
  6270. " v-if="askJson.askJson[index1].askItem != 1">删除
  6271. </el-button>
  6272. </div>
  6273. </div>
  6274. </div>
  6275. <!-- <div class="a_add_body_div">
  6276. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  6277. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  6278. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  6279. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  6280. </el-button>
  6281. </div> -->
  6282. </div>
  6283. </div>
  6284. </div>
  6285. </div>
  6286. <span slot="footer" class="dialog-footer">
  6287. <el-button @click="closePan(4)">取 消</el-button>
  6288. <el-button type="primary" @click="addAsk">确 定</el-button>
  6289. </span>
  6290. </el-dialog>
  6291. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  6292. closePan(45);
  6293. }
  6294. " class="dialog_diy fullStyle">
  6295. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  6296. <!-- <div class="a_add_title" style="
  6297. display: flex;
  6298. flex-direction: row;
  6299. align-items: center;
  6300. justify-content: center;
  6301. ">
  6302. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  6303. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6304. </div> -->
  6305. <div class="a_addBox" style="height: 100%">
  6306. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  6307. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  6308. 上传补充资料
  6309. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none"
  6310. v-if="inputShow" @change="
  6311. beforeUploadInfo2(
  6312. $event,
  6313. 17
  6314. )
  6315. " />
  6316. </button>
  6317. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  6318. <div class="add_chapters_box add_c_none" v-if="
  6319. xuanzeInfoData &&
  6320. xuanzeInfoData.length == 0
  6321. ">
  6322. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  6323. <span>暂时还没有内容,快去添加吧</span>
  6324. </div>
  6325. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  6326. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  6327. getChapterData(
  6328. $event,
  6329. index1,
  6330. item1.type
  6331. )
  6332. ">
  6333. <div class="chapter_upload_o" style="
  6334. position: relative;
  6335. display: flex;
  6336. align-items: center;
  6337. ">
  6338. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  6339. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  6340. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  6341. </div>
  6342. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  6343. </div>
  6344. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  6345. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  6346. </div>
  6347. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  6348. </div>
  6349. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  6350. </div>
  6351. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  6352. </div>
  6353. </div>
  6354. <div class="chapter_upload_n">
  6355. <input readonly="true" v-if="
  6356. item1.type == 2 ||
  6357. item1.type == 3 ||
  6358. item1.type == 12 ||
  6359. item1.type == 13 ||
  6360. item1.type == 7
  6361. " :placeholder="item1.name" @click.stop="
  6362. checkChpater3($event, index1, item1)
  6363. " style="
  6364. border: none;
  6365. outline: none;
  6366. width: 80%;
  6367. minwidth: 215px;
  6368. z-index: 99;
  6369. font-size: 14px;
  6370. white-space: nowrap;
  6371. overflow: hidden;
  6372. text-overflow: ellipsis;
  6373. " />
  6374. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  6375. border: none;
  6376. outline: none;
  6377. width: 80%;
  6378. white-space: nowrap;
  6379. overflow: hidden;
  6380. text-overflow: ellipsis;
  6381. " readonly="true" @click="
  6382. selectAttText(index1)
  6383. " />
  6384. <input :placeholder="item1.title ? item1.title : '链接'
  6385. " v-if="item1.type == 8" style="
  6386. border: none;
  6387. outline: none;
  6388. width: 80%;
  6389. white-space: nowrap;
  6390. overflow: hidden;
  6391. text-overflow: ellipsis;
  6392. " readonly="true" @click="selectLine(index1)" />
  6393. <input :placeholder="item1.title ? item1.title : '链接'
  6394. " v-if="item1.type == 14" style="
  6395. border: none;
  6396. outline: none;
  6397. width: 80%;
  6398. white-space: nowrap;
  6399. overflow: hidden;
  6400. text-overflow: ellipsis;
  6401. " readonly="true" @click="
  6402. openUpdateSource(index1)
  6403. " />
  6404. </div>
  6405. <div class="chapter_upload_ic">
  6406. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  6407. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  6408. checkChpater3($event, index1, item1)
  6409. ">
  6410. <div></div>
  6411. </div>
  6412. <div class="chapter_upload_ic_r" @click.stop="
  6413. deletexuanzeInfoData(
  6414. $event,
  6415. index1
  6416. )
  6417. ">
  6418. <div></div>
  6419. </div>
  6420. </div>
  6421. </div>
  6422. </div>
  6423. </div>
  6424. </div>
  6425. <div v-if="
  6426. xuanzeinfoproVisible
  6427. " class="mask">
  6428. <div class="progressBox">
  6429. <div class="lbox">
  6430. <img src="../../../assets/loading.gif" />上传中,请稍后
  6431. </div>
  6432. <div style="margin-bottom: 10px">
  6433. <span>{{
  6434. xuanzeinfoisFinishSize
  6435. }}</span>
  6436. /
  6437. <span>{{
  6438. xuanzeinfoisAllSize
  6439. }}</span>
  6440. </div>
  6441. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  6442. ? xuanzeinfoprogress
  6443. : 0
  6444. " style="width: 80%"></el-progress> -->
  6445. </div>
  6446. </div>
  6447. </div>
  6448. <div style="
  6449. font-size: 16px;
  6450. color: #c7c7c7;
  6451. display: flex;
  6452. align-items: center;
  6453. justify-content: flex-end;
  6454. ">
  6455. <!-- 请输入题目内容 -->
  6456. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  6457. 智能生成
  6458. </button>
  6459. <!-- 请输入题目内容 -->
  6460. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  6461. v-if="isPasteChoice">
  6462. 智能粘贴
  6463. </button>
  6464. </div>
  6465. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  6466. <div class="a_add_checkType">
  6467. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  6468. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  6469. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  6470. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  6471. </div>
  6472. <div class="a_add_head">
  6473. <div class="timuUpImg">
  6474. <div style="display: flex; align-items: center">
  6475. <span style="min-width: fit-content">{{
  6476. index1 + 1 + "、"
  6477. }}</span>
  6478. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  6479. placeholder="请输入题目">
  6480. </el-input> -->
  6481. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6482. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  6483. $forceUpdate();
  6484. }
  6485. "></textarea>
  6486. </div>
  6487. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  6488. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  6489. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  6490. </div>
  6491. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  6492. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6493. <input type="file" accept="image/*" style="display: none"
  6494. @change="beforeUploadTiMu($event, index1)" />
  6495. </div>
  6496. </div>
  6497. <div class="a_add_head_div">
  6498. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  6499. </el-button>
  6500. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  6501. </div>
  6502. </div>
  6503. <div class="timuImgBox" v-if="
  6504. testJson.testJson[index1].timuList &&
  6505. testJson.testJson[index1].timuList.length
  6506. ">
  6507. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  6508. @click.stop="previewImg(timg.src)">
  6509. <img :src="timg.src" alt="" />
  6510. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  6511. <img src="../../../assets/icon/delete.png" alt="" />
  6512. </div>
  6513. </div>
  6514. </div>
  6515. <div class="a_add_body">
  6516. <div class="a_add_input a_add_input_choice">
  6517. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  6518. @change="() => {
  6519. $forceUpdate();
  6520. }
  6521. ">
  6522. <div class="radioBox">
  6523. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  6524. .testItem" :key="checkIndex" :label="checkIndex">
  6525. <div style="margin-right: 10px">
  6526. {{ optionTypeList[checkIndex] }}.
  6527. </div>
  6528. <div style="margin-right: 10px; width: 300px" v-if="
  6529. testJson.testJson[index1].checkList[checkIndex] &&
  6530. testJson.testJson[index1].checkList[checkIndex]
  6531. .imgType &&
  6532. testJson.testJson[index1].checkList[checkIndex]
  6533. .imgType == 1
  6534. ">
  6535. <div class="inImg" @click.stop="
  6536. previewImg(
  6537. testJson.testJson[index1].checkList[checkIndex]
  6538. .src
  6539. )
  6540. ">
  6541. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  6542. .src
  6543. " lazy />
  6544. <!-- <img :src="
  6545. testJson.testJson[index1].checkList[checkIndex]
  6546. .src
  6547. " alt="" /> -->
  6548. </div>
  6549. </div>
  6550. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  6551. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6552. $forceUpdate();
  6553. }
  6554. "></textarea>
  6555. <div class="xzUpImg" @click.stop="addImg($event)">
  6556. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6557. <input type="file" accept="image/*" style="display: none"
  6558. @change="beforeUploadTi($event, index1, checkIndex)" />
  6559. </div>
  6560. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6561. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  6562. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  6563. </div>
  6564. <div class="a_add_body_div">
  6565. <el-button type="primary" size="small" @click.stop="
  6566. addTcheckList(testJson.testJson[index1], checkIndex)
  6567. ">添加</el-button>
  6568. <el-button type="primary" size="small" @click.stop="
  6569. deleteTcheckList(
  6570. testJson.testJson[index1],
  6571. checkIndex
  6572. )
  6573. " v-if="testJson.testJson[index1].testItem != 1">删除
  6574. </el-button>
  6575. </div>
  6576. </el-radio>
  6577. </div>
  6578. </el-radio-group>
  6579. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6580. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6581. $forceUpdate();
  6582. }
  6583. ">
  6584. <div class="radioBox">
  6585. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6586. .testItem" :key="checkIndex1" :label="checkIndex1">
  6587. <div style="margin-right: 10px">
  6588. {{ optionTypeList[checkIndex1] }}.
  6589. </div>
  6590. <div style="margin-right: 10px; width: 300px" v-if="
  6591. testJson.testJson[index1].checkList[checkIndex1] &&
  6592. testJson.testJson[index1].checkList[checkIndex1]
  6593. .imgType &&
  6594. testJson.testJson[index1].checkList[checkIndex1]
  6595. .imgType == 1
  6596. ">
  6597. <div class="inImg" @click.stop="
  6598. previewImg(
  6599. testJson.testJson[index1].checkList[checkIndex1]
  6600. .src
  6601. )
  6602. ">
  6603. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6604. .src
  6605. " lazy />
  6606. <!-- <img :src="
  6607. testJson.testJson[index1].checkList[checkIndex1]
  6608. .src
  6609. " alt="" /> -->
  6610. </div>
  6611. </div>
  6612. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6613. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6614. $forceUpdate();
  6615. }
  6616. "></textarea>
  6617. <div class="xzUpImg" @click.stop="addImg($event)">
  6618. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6619. <input type="file" accept="image/*" style="display: none"
  6620. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6621. </div>
  6622. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6623. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6624. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6625. </div>
  6626. <div class="a_add_body_div">
  6627. <el-button type="primary" size="small" @click.stop="
  6628. addTcheckList(
  6629. testJson.testJson[index1],
  6630. checkIndex1
  6631. )
  6632. ">添加</el-button>
  6633. <el-button type="primary" size="small" @click.stop="
  6634. deleteTcheckList(
  6635. testJson.testJson[index1],
  6636. checkIndex1
  6637. )
  6638. " v-if="testJson.testJson[index1].testItem != 1">删除
  6639. </el-button>
  6640. </div>
  6641. </el-checkbox>
  6642. </div>
  6643. </el-checkbox-group>
  6644. </div>
  6645. <!-- <div class="a_add_body_div">
  6646. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6647. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6648. v-if="testJson.testJson[index1].testItem != 1">删除
  6649. </el-button>
  6650. </div> -->
  6651. </div>
  6652. </div>
  6653. </div>
  6654. </div>
  6655. <span slot="footer" class="dialog-footer">
  6656. <el-button @click="closePan(45)">取 消</el-button>
  6657. <el-button type="primary" @click="addTest">确 定</el-button>
  6658. </span>
  6659. </el-dialog>
  6660. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6661. :before-close="handleClose" class="dialog_diy addToolsDia">
  6662. <div class="toolChoose">
  6663. <div class="tools">
  6664. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6665. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6666. <div style="
  6667. display: flex;
  6668. flex-direction: row;
  6669. align-items: baseline;
  6670. flex-wrap: nowrap;
  6671. justify-content: flex-start;
  6672. position: relative;
  6673. ">
  6674. <div class="chooseWho">
  6675. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6676. 互动类
  6677. </div>
  6678. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6679. 思维类
  6680. </div>
  6681. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6682. 评价类
  6683. </div>
  6684. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6685. 其他
  6686. </div>
  6687. </div>
  6688. </div>
  6689. <div style="min-height: 163px">
  6690. <div class="toolSort" v-if="chapToolsType == 0">
  6691. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6692. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6693. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6694. <div style="margin: 5px 0">素材库</div>
  6695. </div>
  6696. <div class="noCTool">
  6697. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6698. </div>
  6699. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6700. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6701. </div>
  6702. <!-- <div class="check" @click="chapAddTools(8)">
  6703. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6704. <div class="checkDiv" v-else>
  6705. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6706. </div>
  6707. </div> -->
  6708. </div>
  6709. </div>
  6710. <div class="toolSort" v-if="chapToolsType == 1">
  6711. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6712. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6713. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6714. <div style="margin: 5px 0">思维网格</div>
  6715. </div>
  6716. <div class="noCTool">
  6717. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6718. </div>
  6719. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6720. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6721. </div>
  6722. <!-- <div class="check" @click="chapAddTools(7)">
  6723. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6724. <div class="checkDiv" v-else>
  6725. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6726. </div>
  6727. </div> -->
  6728. </div>
  6729. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6730. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6731. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6732. <div style="margin: 5px 0">电子白板</div>
  6733. </div>
  6734. <div class="noCTool">
  6735. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6736. </div>
  6737. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6738. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6739. </div>
  6740. <!-- <div class="check" @click="chapAddTools(1)">
  6741. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6742. <div class="checkDiv" v-else>
  6743. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6744. </div>
  6745. </div> -->
  6746. </div>
  6747. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6748. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6749. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6750. <div style="margin: 5px 0">便签</div>
  6751. </div>
  6752. <div class="noCTool">
  6753. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6754. </div>
  6755. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6756. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6757. </div>
  6758. <!-- <div class="check" @click="chapAddTools(2)">
  6759. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6760. <div class="checkDiv" v-else>
  6761. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6762. </div>
  6763. </div> -->
  6764. </div>
  6765. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6766. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6767. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6768. <div style="margin: 5px 0">协同文档</div>
  6769. </div>
  6770. <div class="noCTool">
  6771. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6772. </div>
  6773. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6774. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6775. </div>
  6776. <!-- <div class="check" @click="chapAddTools(6)">
  6777. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6778. <div class="checkDiv" v-else>
  6779. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6780. </div>
  6781. </div> -->
  6782. </div>
  6783. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6784. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6785. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6786. <div style="margin: 5px 0">思维导图</div>
  6787. </div>
  6788. <div class="noCTool">
  6789. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6790. </div>
  6791. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6792. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6793. </div>
  6794. <!-- <div class="check" @click="chapAddTools(3)">
  6795. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6796. <div class="checkDiv" v-else>
  6797. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6798. </div>
  6799. </div> -->
  6800. </div>
  6801. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6802. @click="chapAddTools(31)">
  6803. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6804. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6805. <div style="margin: 5px 0">数学画板</div>
  6806. </div>
  6807. <div class="noCTool">
  6808. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6809. </div>
  6810. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6811. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6812. </div>
  6813. <!-- <div class="check" @click="chapAddTools(31)">
  6814. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6815. <div class="checkDiv" v-else>
  6816. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6817. </div>
  6818. </div> -->
  6819. </div>
  6820. </div>
  6821. <div class="toolSort" v-if="chapToolsType == 2">
  6822. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6823. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6824. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6825. <div style="margin: 5px 0">量规评分</div>
  6826. </div>
  6827. <div class="noCTool">
  6828. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6829. </div>
  6830. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6831. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6832. </div>
  6833. <!-- <div class="check" @click="chapAddTools(5)">
  6834. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6835. <div class="checkDiv" v-else>
  6836. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6837. </div>
  6838. </div> -->
  6839. </div>
  6840. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6841. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6842. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6843. <div style="margin: 5px 0">问卷调查</div>
  6844. </div>
  6845. <div class="noCTool">
  6846. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6847. </div>
  6848. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6849. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6850. </div>
  6851. <!-- <div class="check" @click="chapAddTools(4)">
  6852. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6853. <div class="checkDiv" v-else>
  6854. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6855. </div>
  6856. </div> -->
  6857. </div>
  6858. </div>
  6859. </div>
  6860. <div>
  6861. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6862. v-model="itemTools.toolDetail" />
  6863. </div>
  6864. </div>
  6865. </div>
  6866. </div>
  6867. <span slot="footer" class="dialog-footer">
  6868. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6869. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6870. </span>
  6871. </el-dialog>
  6872. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6873. closePan(15);
  6874. }
  6875. " class="dialog_diy">
  6876. <div>
  6877. <div class="a_add_title" style="
  6878. display: flex;
  6879. flex-direction: column;
  6880. align-items: flex-start;
  6881. justify-content: center;
  6882. ">
  6883. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6884. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6885. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6886. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6887. </div>
  6888. </div>
  6889. <span slot="footer" class="dialog-footer">
  6890. <el-button @click="closePan(15)">取 消</el-button>
  6891. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6892. </span>
  6893. </el-dialog>
  6894. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6895. :before-close="handleClose" class="dialog_diy">
  6896. <div>
  6897. <div class="a_add_title" style="
  6898. display: flex;
  6899. flex-direction: column;
  6900. align-items: flex-start;
  6901. justify-content: center;
  6902. ">
  6903. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6904. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6905. </div>
  6906. </div>
  6907. <span slot="footer" class="dialog-footer">
  6908. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6909. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6910. </span>
  6911. </el-dialog>
  6912. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6913. :before-close="handleClose" class="dialog_diy">
  6914. <div>
  6915. <div class="fileCss" style="padding-top: 20px">
  6916. <div>
  6917. <button class="info_btn" @click="addImg($event)">
  6918. 选择本地文件
  6919. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6920. </button>
  6921. <div class="spanName">选择本地文件</div>
  6922. </div>
  6923. <!-- <div>
  6924. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6925. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6926. <img :src="cover[0].url" alt="" />
  6927. <div class="deletePic" @click="deleteSysPic">
  6928. <img src="../../../assets/icon/delete.png" alt="" />
  6929. </div>
  6930. </div>
  6931. <div class="spanName">选择系统文件</div>
  6932. </div> -->
  6933. <div>
  6934. <el-button @click="(searchImageValue = courseName), resetImage()"
  6935. v-if="isSysPic2 == false">选择网络文件</el-button>
  6936. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6937. <img :src="cover[0].url" alt="" />
  6938. <div class="deletePic" @click="deleteSysPic">
  6939. <img src="../../../assets/icon/delete.png" alt="" />
  6940. </div>
  6941. </div>
  6942. <div class="spanName">选择网络文件</div>
  6943. </div>
  6944. </div>
  6945. <!-- <div class="fileCss">
  6946. </div> -->
  6947. </div>
  6948. <span slot="footer" class="dialog-footer">
  6949. <el-button @click="choosePicVisible = false">取 消</el-button>
  6950. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6951. </span>
  6952. </el-dialog>
  6953. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6954. :before-close="handleClose" class="dialog_diy">
  6955. <div class="cru_selectBox" style="margin: 0">
  6956. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6957. 绘画
  6958. </div>
  6959. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6960. 科技
  6961. </div>
  6962. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6963. 人文
  6964. </div>
  6965. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6966. 艺术
  6967. </div>
  6968. </div>
  6969. <div class="sysPicBox">
  6970. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6971. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6972. </div>
  6973. </div>
  6974. </el-dialog>
  6975. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6976. :before-close="handleClose" class="dialog_diy">
  6977. <div>
  6978. <div class="people_top_right" style="display: flex; align-items: center">
  6979. <div style="position: relative; width: 100%">
  6980. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6981. @keyup.enter.native="resetImage()"></el-input>
  6982. <div class="search_img" @click="resetImage" style="right: 10px">
  6983. <img src="../../../assets/icon/search.png" alt />
  6984. </div>
  6985. </div>
  6986. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6987. </div>
  6988. <div class="sysPicBox" v-loading="imageloading">
  6989. <div class="picNone" v-if="!imageList.length">
  6990. 请输入关键词搜索图片
  6991. </div>
  6992. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6993. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6994. </div>
  6995. </div>
  6996. </div>
  6997. </el-dialog>
  6998. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6999. closePan(41);
  7000. }
  7001. " class="dialog_diy dialog_diy3 fullStyle">
  7002. <div v-if="selectJson" style="height: 100%">
  7003. <div class="select_box1" v-if="selectSteps == 1">
  7004. <div class="select_box1_img">
  7005. <div class="select_box1_title">
  7006. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  7007. </div>
  7008. <div class="select_box1_add_img">
  7009. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  7010. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  7011. <img src="../../../assets/icon/addPoster.png" alt="" />
  7012. </div>
  7013. <div class="isSysPic" v-else>
  7014. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  7015. <div class="deletePic" @click="deleteSelectPic">
  7016. <img src="../../../assets/icon/delete.png" alt="" />
  7017. </div>
  7018. </div>
  7019. </div>
  7020. </div>
  7021. <div class="select_box1_select">
  7022. <div class="select_box1_title">
  7023. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  7024. </div>
  7025. <div class="select_box1_select_box">
  7026. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  7027. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  7028. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  7029. <div class="select_box1_select_box_add">
  7030. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  7031. 添加</el-button>
  7032. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  7033. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  7034. </div>
  7035. </div>
  7036. </div>
  7037. </div>
  7038. <div v-if="selectSteps == 2" style="height: 100%">
  7039. <div class="select_box2">
  7040. <div class="select_box2_title">设置每道题目的正确选项</div>
  7041. <div class="select_box2_box">
  7042. <div class="select_box2_img">
  7043. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  7044. </div>
  7045. <div class="select_box2_answer">
  7046. <div class="select_answer_title">根据题目选择对应答案</div>
  7047. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  7048. <span>{{ checkIndex + 1 }}、</span>
  7049. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  7050. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  7051. </el-option>
  7052. </el-select>
  7053. </div>
  7054. </div>
  7055. </div>
  7056. </div>
  7057. </div>
  7058. </div>
  7059. <span slot="footer" class="dialog-footer">
  7060. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  7061. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  7062. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  7063. </span>
  7064. </el-dialog>
  7065. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  7066. :before-close="handleClose" class="dialog_diy">
  7067. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  7068. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  7069. <div class="pjCss" style="width: 100%">
  7070. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  7071. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  7072. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  7073. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  7074. <div class="remove" @click="deletRateList(eIndex)"></div>
  7075. <div style="width: 100%; display: flex">
  7076. <span style="min-width: 100px; text-align: right">评星等级:</span>
  7077. <el-rate v-model="eItem.score" disabled></el-rate>
  7078. </div>
  7079. <div class="elist_inptu_text" style="align-items: flex-start">
  7080. <span style="min-width: 100px; text-align: right">描述:</span>
  7081. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  7082. </div>
  7083. </div>
  7084. </div>
  7085. <div class="addToolFun" @click="addRateList()">
  7086. <div class="addToolImg">
  7087. <img src="../../../assets/icon/add.png" alt />
  7088. </div>
  7089. <div>添加</div>
  7090. </div>
  7091. </div>
  7092. </div>
  7093. <span slot="footer" class="dialog-footer">
  7094. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  7095. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  7096. </span>
  7097. </el-dialog>
  7098. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  7099. closePan(47);
  7100. }
  7101. " class="dialog_diy dialog_diy3 fullStyle">
  7102. <div style="height: 100%">
  7103. <div class="sentenBox" style="height: 100%">
  7104. <div class="addSen" @click="addSt">添加题目</div>
  7105. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  7106. <div class="sentenTopBox">
  7107. <div class="sentenTop" :index="stIndex + 1">
  7108. <div>题目设置</div>
  7109. <div>
  7110. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  7111. </div>
  7112. <div @click="addSen(stIndex)">添加</div>
  7113. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  7114. </div>
  7115. </div>
  7116. <div class="cardList">
  7117. <div v-if="st.addSentence.length > 0" class="cardBox">
  7118. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  7119. @click="setRightAnswer(s, stIndex, sIndex)">
  7120. <el-tooltip class="item" effect="light" :content="s" placement="top">
  7121. <div>{{ s }}</div>
  7122. </el-tooltip>
  7123. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  7124. <img src="../../../assets/icon/delete.png" alt="" />
  7125. </div>
  7126. </div>
  7127. </div>
  7128. <div class="card">
  7129. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  7130. </div>
  7131. </div>
  7132. <div class="rightCardBox">
  7133. <div>正确顺序</div>
  7134. <div class="rightCardList">
  7135. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  7136. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  7137. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  7138. <el-tooltip class="item" effect="light" :content="r" placement="top">
  7139. <div>{{ r }}</div>
  7140. </el-tooltip>
  7141. </div>
  7142. <div>{{ rIndex + 1 }}</div>
  7143. </div>
  7144. </div>
  7145. <div class="card" v-if="st.rightAnswer.length == 0">
  7146. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  7147. </div>
  7148. <div class="card" v-else>
  7149. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  7150. </div>
  7151. </div>
  7152. </div>
  7153. </div>
  7154. </div>
  7155. </div>
  7156. <span slot="footer" class="dialog-footer">
  7157. <el-button @click="closePan(47)">取 消</el-button>
  7158. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  7159. </span>
  7160. </el-dialog>
  7161. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  7162. :before-close="handleClose" class="dialog_diy">
  7163. <el-form>
  7164. <!-- <el-form-item label="文本标题">
  7165. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7166. </el-form-item> -->
  7167. <div>表格内容</div>
  7168. <Table v-model="tableJson.text" @change="change"></Table>
  7169. </el-form>
  7170. <span slot="footer" class="dialog-footer">
  7171. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  7172. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  7173. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  7174. </span>
  7175. </el-dialog>
  7176. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  7177. :before-close="handleClose" class="dialog_diy">
  7178. <el-form>
  7179. <!-- <el-form-item label="文本标题">
  7180. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  7181. </el-form-item> -->
  7182. <div>文档内容</div>
  7183. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  7184. </el-form>
  7185. <span slot="footer" class="dialog-footer">
  7186. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  7187. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  7188. </span>
  7189. </el-dialog>
  7190. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  7191. :before-close="handleClose" class="dialog_diy">
  7192. <div style="
  7193. width: 100%;
  7194. display: flex;
  7195. flex-direction: row;
  7196. flex-wrap: nowrap;
  7197. align-items: center;
  7198. justify-content: center;
  7199. ">
  7200. <div>班级:</div>
  7201. <el-select multiple v-model="uploadJson" placeholder="请选择">
  7202. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  7203. </el-option>
  7204. </el-select>
  7205. </div>
  7206. <span slot="footer" class="dialog-footer">
  7207. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  7208. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  7209. </span>
  7210. </el-dialog>
  7211. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  7212. :before-close="handleClose" class="dialog_diy">
  7213. <div style="
  7214. width: 100%;
  7215. display: flex;
  7216. flex-direction: row;
  7217. flex-wrap: nowrap;
  7218. align-items: center;
  7219. justify-content: center;
  7220. ">
  7221. <div>随机码:</div>
  7222. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  7223. </div>
  7224. <span slot="footer" class="dialog-footer">
  7225. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  7226. <el-button type="primary" @click="addInvite">确定</el-button>
  7227. </span>
  7228. </el-dialog>
  7229. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  7230. :before-close="handleClose" class="dialog_diy">
  7231. <div>
  7232. <div style="margin-bottom: 20px; color: #999">
  7233. 提示:点击“+”或“-”修改倒计时时长。
  7234. </div>
  7235. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  7236. </div>
  7237. <span slot="footer" class="dialog-footer">
  7238. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  7239. <el-button type="primary" @click="addPreTime">确定</el-button>
  7240. </span>
  7241. </el-dialog>
  7242. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  7243. :before-close="handleClose" class="dialog_diy">
  7244. <div>
  7245. <div style="
  7246. width: 100%;
  7247. display: flex;
  7248. flex-direction: row;
  7249. flex-wrap: nowrap;
  7250. align-content: center;
  7251. align-items: center;
  7252. justify-content: space-between;
  7253. ">
  7254. <div style="
  7255. display: flex;
  7256. flex-flow: row nowrap;
  7257. align-items: flex-start;
  7258. width: 100%;
  7259. flex-direction: column;
  7260. flex-wrap: nowrap;
  7261. position: relative;
  7262. ">
  7263. <div class="e_box">
  7264. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  7265. <div class="e_card_picture">
  7266. <img src="../../../assets/e_picture.png" />
  7267. </div>
  7268. <div class="e_card_name">
  7269. <span>{{ item.title }}</span>
  7270. </div>
  7271. <div class="e_card_btn">
  7272. <span @click="checkEva(item.id, 2)">导入</span>
  7273. </div>
  7274. </div> -->
  7275. <!-- <div class="addEva" @click="openT">
  7276. <img src="../../../assets/icon/addEva.png" alt="" />
  7277. </div> -->
  7278. <div style="
  7279. display: flex;
  7280. justify-content: flex-end;
  7281. margin-bottom: 10px;
  7282. ">
  7283. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  7284. </div>
  7285. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  7286. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  7287. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  7288. </el-table-column>
  7289. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  7290. </el-table-column>
  7291. <el-table-column label="操作" width="250px">
  7292. <template slot-scope="scope">
  7293. <div class="btnBox">
  7294. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  7295. </div>
  7296. </template>
  7297. </el-table-column>
  7298. </el-table>
  7299. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  7300. 暂无数据
  7301. </div>
  7302. </div>
  7303. </div>
  7304. </div>
  7305. </div>
  7306. <span slot="footer" class="dialog-footer">
  7307. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  7308. </span>
  7309. </el-dialog>
  7310. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  7311. :before-close="handleClose" class="dialog_diy">
  7312. <div class="groupBox">
  7313. <div v-if="groupJson.group" class="groupContent">
  7314. <div class="groupTitle">请设置小组数量及名称</div>
  7315. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  7316. <span class="groupn">第{{ index + 1 }}组名称:</span>
  7317. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  7318. <div class="groupBtn">
  7319. <el-button type="primary" size="small" @click="addGroup(index)"
  7320. v-if="groupJson.group.length - 1 == index">
  7321. 添加</el-button>
  7322. <el-button type="primary" size="small" @click="deleteGroup(index)"
  7323. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  7324. </div>
  7325. </div>
  7326. </div>
  7327. <div class="groupContent">
  7328. <div class="groupTitle">请设置每组人数</div>
  7329. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  7330. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  7331. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  7332. @change="numberPan"></el-input>
  7333. </div>
  7334. </div>
  7335. <span slot="footer" class="dialog-footer">
  7336. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  7337. <el-button type="primary" @click="addGroupJson">确定</el-button>
  7338. </span>
  7339. </el-dialog>
  7340. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  7341. :before-close="handleClose" class="dialog_diy">
  7342. <div style="
  7343. width: 100%;
  7344. display: flex;
  7345. flex-direction: row;
  7346. flex-wrap: nowrap;
  7347. align-items: center;
  7348. justify-content: center;
  7349. ">
  7350. <div style="min-width: fit-content">文件名称:</div>
  7351. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  7352. </div>
  7353. <span slot="footer" class="dialog-footer">
  7354. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  7355. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  7356. </span>
  7357. </el-dialog>
  7358. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  7359. closePan(69);
  7360. }
  7361. " class="dialog_diy fullStyle fullStyle1">
  7362. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  7363. <span slot="footer" class="dialog-footer">
  7364. <el-button @click="englishDialogVisible = false">取 消</el-button>
  7365. <el-button type="primary" @click="addEnglish">确 定</el-button>
  7366. </span>
  7367. </el-dialog>
  7368. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  7369. :before-close="handleClose" class="dialog_diy">
  7370. <div class="template_box">
  7371. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  7372. :class="{ wordTeacherA: ctJson.id == aa.id }">
  7373. <div class="wordPic">
  7374. <img src="../../../assets/icon/new/course_template.png" alt />
  7375. </div>
  7376. <el-tooltip effect="dark" :content="aa.title" placement="top">
  7377. <div style="
  7378. margin-top: 10px;
  7379. line-height: 19px;
  7380. overflow: hidden;
  7381. text-overflow: ellipsis;
  7382. white-space: nowrap;
  7383. padding: 0 10px;
  7384. box-sizing: border-box;
  7385. width: 100%;
  7386. ">
  7387. {{ aa.title }}
  7388. </div>
  7389. </el-tooltip>
  7390. </div>
  7391. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  7392. :class="{ wordTeacherA: ctJson.id == 1 }">
  7393. <div class="wordPic">
  7394. <img src="../../../assets/icon/new/course_template.png" alt />
  7395. </div>
  7396. <div style="
  7397. margin-top: 10px;
  7398. line-height: 19px;
  7399. overflow: hidden;
  7400. text-overflow: ellipsis;
  7401. white-space: nowrap;
  7402. padding: 0 20px;
  7403. ">
  7404. 简易模板
  7405. </div>
  7406. </div>
  7407. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  7408. :class="{ wordTeacherA: ctJson.id == 2 }">
  7409. <div class="wordPic">
  7410. <img src="../../../assets/icon/new/course_template.png" alt />
  7411. </div>
  7412. <div style="
  7413. margin-top: 10px;
  7414. line-height: 19px;
  7415. overflow: hidden;
  7416. text-overflow: ellipsis;
  7417. white-space: nowrap;
  7418. padding: 0 20px;
  7419. ">
  7420. 智能粘贴模式
  7421. </div>
  7422. </div>
  7423. </div>
  7424. <span slot="footer" class="dialog-footer">
  7425. <el-button @click="templateDialog = false">取 消</el-button>
  7426. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  7427. </span>
  7428. </el-dialog>
  7429. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  7430. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  7431. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  7432. <div class="change_stageBox">
  7433. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  7434. <div class="nt_taskBox">
  7435. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  7436. <div class="nt_taskName">
  7437. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7438. <span>{{ t.dyName }}</span>
  7439. </el-tooltip>
  7440. </div>
  7441. </div>
  7442. <div class="moveBtn" v-if="unitJson3.length > 1">
  7443. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7444. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7445. </div>
  7446. </div>
  7447. </div>
  7448. <span slot="footer" class="dialog-footer">
  7449. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  7450. <el-button type="primary" @click="updateChange">确定</el-button>
  7451. </span>
  7452. </el-dialog>
  7453. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7454. :before-close="handleClose" class="dialog_diy">
  7455. <div class="addTypeChoose" style="justify-content: center">
  7456. <div style="min-width: 100px">模板名称:</div>
  7457. <el-input v-model="templateName" style="width: 200px"></el-input>
  7458. </div>
  7459. <div class="addTypeBox">
  7460. <div class="addTypeChoose">
  7461. <div style="min-width: 100px">选择一级分类:</div>
  7462. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  7463. style="width: 200px">
  7464. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7465. </el-option>
  7466. </el-select>
  7467. </div>
  7468. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7469. <div style="min-width: 100px">选择二级分类:</div>
  7470. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  7471. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7472. </el-option>
  7473. </el-select>
  7474. </div>
  7475. </div>
  7476. <span slot="footer" class="dialog-footer">
  7477. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  7478. <el-button @click="close()">关 闭</el-button>
  7479. </span>
  7480. </el-dialog>
  7481. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7482. </evaBox>
  7483. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7484. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7485. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3"
  7486. @aiConfirm="aiConfirm" :clickType="clickType">
  7487. </aiDialog>
  7488. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7489. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7490. <div class="pptBox" :class="{'ppClass': pptBoxDialog && panPptCount() > 0 && pptCount.length}">
  7491. <div class="box" v-show="pptBoxDialog">
  7492. <aiCreateDialog v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson" :key="index"
  7493. :languageSetting="languageSetting" :dialogVisibleAiCreate="dialogVisibleAiCreate2.includes(index)"
  7494. :courseName="courseName" @createAiPpt="createAiPpt" @closeAiPpt="closeAiPpt" :infoData="infoData"
  7495. :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="index"
  7496. :unitJson="unitJson" :ref="'ppt'+index"
  7497. v-show="dialogVisibleAiCreate2.includes(index) && pptCount.includes(index)"></aiCreateDialog>
  7498. </div>
  7499. <span v-show="panPptCount() > 0 && pptCount.length" class="r_pub_button_edit"
  7500. :style="{marginTop: panPptCount() > 0 ? '10px' : '0'}" style="justify-content: flex-start;"
  7501. @click="pptBoxDialog = !pptBoxDialog">{{ pptBoxDialog ? "收缩" : "展开" }}</span>
  7502. </div>
  7503. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName"
  7504. @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson">
  7505. </aiCreateVideoDialog>
  7506. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7507. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl"></wOffice>
  7508. <appDialog ref="appDialog"></appDialog>
  7509. </div>
  7510. </template>
  7511. <script>
  7512. import "../../../common/aws-sdk-2.235.1.min.js";
  7513. import { tools as toolsData } from "../../../common/tools.js";
  7514. // import "../../../common/aws-sdk-2.99.0.min.js";
  7515. import $ from "jquery";
  7516. import EditorBar from "../../../components/tools/wangEnduit";
  7517. import Table from "../../../components/tools/table";
  7518. import Mind from "../../tools/jsmind2";
  7519. import Time from "../../tools/time.vue";
  7520. import Sunburst from "../../tools/sunburst";
  7521. import SeeBoard from "../../tools/seeBoard";
  7522. import weilaiData from "../components/weilai.js";
  7523. import sourceDialog from "../teacherSource/dialog.vue";
  7524. import interVideo from "../interVideo/index.vue";
  7525. import englishRight from "../components/englishRight.vue";
  7526. import evaBox from "../evaBox/index.vue";
  7527. import EnglishVoice from "../EnglishVoice/index.vue";
  7528. import aiBox from './aiBox.vue'
  7529. import aiBoxRight from './aiBoxRight.vue'
  7530. import aiBoxCourseDetail from './aiBoxCourseDetail.vue'
  7531. import recordV from './record.vue'
  7532. import aiDialog from './aiDialog'
  7533. import aiTips from './aiTips.vue'
  7534. import tipsDialog from './tipsDialog.vue'
  7535. import { v4 as uuidv4 } from "uuid";
  7536. import MarkdownIt from "markdown-it";
  7537. import aiCreateDialog from './aiCreateDialog.vue'
  7538. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7539. import wpdf from "../test/file/wPdf2.vue";
  7540. import wOffice from "../test/file/wOffice.vue";
  7541. import htmlDocx from "html-docx-js/dist/html-docx";
  7542. import TurndownService from 'turndown';
  7543. import JSZip from "jszip";
  7544. import evaList from "./evaList.vue";
  7545. import MindTask from "./jsmind2";
  7546. import ConvertApi from 'convertapi-js'
  7547. let convertApi = ConvertApi.auth('secret_U1EO5rhgMCnoBnBT')
  7548. import appDialog from '../components/appDialog.vue'
  7549. var OpenCC = require("opencc-js");
  7550. let converter = OpenCC.Converter({
  7551. from:'hk',
  7552. to:'cn'
  7553. })
  7554. let converter2 = OpenCC.Converter({
  7555. from:'cn',
  7556. to:'hk'
  7557. })
  7558. const getFile = (url) => {
  7559. return new Promise((resolve, reject) => {
  7560. var credentials = {
  7561. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7562. secretAccessKey: "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",
  7563. }; //秘钥形式的登录上传
  7564. window.AWS.config.update(credentials);
  7565. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7566. let url2 = url;
  7567. let _url2 = "";
  7568. if (
  7569. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  7570. ) {
  7571. _url2 = url2.split(
  7572. "https://view.officeapps.live.com/op/view.aspx?src="
  7573. )[1];
  7574. } else {
  7575. _url2 = url2;
  7576. }
  7577. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  7578. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  7579. var params = {
  7580. Bucket: "ccrb",
  7581. Key: name
  7582. };
  7583. s3.getObject(params, function (err, data) {
  7584. if (err) {
  7585. console.log(err, err.stack)
  7586. resolve({ data: 1 });
  7587. }else {
  7588. resolve({ data: data.Body });
  7589. console.log(data);
  7590. } // sxuccessful response
  7591. });
  7592. });
  7593. };
  7594. export default {
  7595. components: {
  7596. EditorBar,
  7597. Mind,
  7598. Time,
  7599. Sunburst,
  7600. SeeBoard,
  7601. Table,
  7602. sourceDialog,
  7603. interVideo,
  7604. englishRight,
  7605. evaBox,
  7606. EnglishVoice,
  7607. aiBox,
  7608. aiBoxRight,
  7609. aiBoxCourseDetail,
  7610. aiDialog,
  7611. aiTips,
  7612. tipsDialog,
  7613. aiCreateDialog,
  7614. aiCreateVideoDialog,
  7615. wpdf,
  7616. wOffice,
  7617. evaList,
  7618. MindTask,
  7619. recordV,
  7620. appDialog
  7621. },
  7622. data() {
  7623. return {
  7624. checkAll: false,
  7625. checkAll2: false,
  7626. chooseType: 1,
  7627. checkedCities: [],
  7628. isIndeterminate: true,
  7629. isIndeterminate2: true,
  7630. isSysPic: false,
  7631. isSysPic2: false,
  7632. steps: 1,
  7633. stepsNav: 1,
  7634. nbOrder: 0,
  7635. courseId: "",
  7636. chapToolsType: 0,
  7637. chapTools: [
  7638. {
  7639. tools: [],
  7640. toolDetail: "",
  7641. },
  7642. ],
  7643. line: "",
  7644. lineTitle: "",
  7645. sysPic: [],
  7646. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7647. sentenceList2: [],
  7648. isPushTitleList: [],
  7649. lineCount: 0,
  7650. lineType: 0,
  7651. chapCount: 0,
  7652. courseName: "",
  7653. isTeacherSee: false,
  7654. courseText: "",
  7655. textLoading: false,
  7656. ttextLoading: false,
  7657. courseText2: "",
  7658. preTime: 0,
  7659. formLabelWidth: "100px",
  7660. choosePicVisible: false,
  7661. sysPicVisible: false,
  7662. sysPicVisible2: false,
  7663. uploadLoading1: false,
  7664. noneBtnImg: false,
  7665. updateBoolean2: false,
  7666. unitIndex: 0,
  7667. taskCount: 0,
  7668. dialogVisible: false,
  7669. dialogVisible1: false,
  7670. dialogVisible2: false,
  7671. dialogVisible3: false,
  7672. dialogVisible4: false,
  7673. dialogVisible5: false,
  7674. dialogVisible6: false,
  7675. dialogVisible7: false,
  7676. dialogVisible8: false,
  7677. dialogVisible9: false,
  7678. dialogVisibleClass: false,
  7679. dialogVisibleMember: false,
  7680. dialogVisibleMp3: false,
  7681. dialogVisibleSelect: false,
  7682. dialogVisibleSentence: false,
  7683. dialogVisibleRate: false,
  7684. dialogVisibleChoice: false,
  7685. dialogVisiblemb: false,
  7686. dialogVisibleInvite: false,
  7687. dialogVisibleSource: false,
  7688. dialogVisibleVideo: false,
  7689. dialogVisibleStageChange: false,
  7690. dialogVisibleupdataVideoT: false,
  7691. englishDialogVisible: false,
  7692. templateDialog: false,
  7693. ctJson: {},
  7694. isClickColor: 1,
  7695. toolIndexType: "",
  7696. publicTool: 0,
  7697. searchPeople: "",
  7698. searchTN: "",
  7699. collid: '',
  7700. CollLoading: false,
  7701. userid: this.$route.query.userid,
  7702. oid: this.$route.query.oid,
  7703. org: this.$route.query.org,
  7704. role: this.$route.query.role,
  7705. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7706. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7707. dialogVisibleTable: false,
  7708. dialogVisibleWord: false,
  7709. tableJson: { text: "" },
  7710. wordJson: { text: "" },
  7711. dialogVisibleMoreUpload: false,
  7712. dialogVisiblePreTime: false,
  7713. uploadJson: [],
  7714. classJuri: [],
  7715. gradeList: [],
  7716. cover: [], //课程封面
  7717. myWord: [],
  7718. evaJuri: [],
  7719. evalua: "",
  7720. targetArray: [],
  7721. eTitle: "",
  7722. eJson: {},
  7723. fid: "", //一级
  7724. sid: "", //二级
  7725. tid: "", //二级
  7726. typeMode: 3,
  7727. eJSONNum: 0,
  7728. data: {
  7729. meta: {
  7730. name: "example",
  7731. author: "dd@163.com",
  7732. version: "0.2",
  7733. },
  7734. format: "node_array",
  7735. data: [{ id: "root", isroot: true, topic: "" }],
  7736. },
  7737. askJson: {
  7738. askCount: 1,
  7739. askTitle: "",
  7740. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7741. },
  7742. askJson2: {},
  7743. testJson: {},
  7744. testJson2: {},
  7745. selectJson: {},
  7746. selectJson2: {},
  7747. rateJson: [],
  7748. unitJson2: [],
  7749. unitJson3: [],
  7750. unitJson: [
  7751. {
  7752. dyName: "", //单元标题
  7753. chapterInfo: [
  7754. {
  7755. isread: false,
  7756. chapterid: this.guid(),
  7757. title: "",
  7758. courseName: "",
  7759. taskJson: [
  7760. {
  7761. task: "",
  7762. taskDetail: "",
  7763. chapterData: [],
  7764. toolText: "",
  7765. toolChoose: [
  7766. {
  7767. tool: [],
  7768. toolDetail: "",
  7769. toolType: 0,
  7770. askCount: 1,
  7771. askTitle: "",
  7772. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7773. },
  7774. ],
  7775. isShowTools: false,
  7776. askCount: 1,
  7777. isFold: 1,
  7778. askTitle: "",
  7779. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7780. checkJson: [{ checkCount: [], checkPerent: [] }],
  7781. homeworkList: [],
  7782. },
  7783. ],
  7784. itemCount: 1,
  7785. fileList1: [],
  7786. video: [],
  7787. testData: [],
  7788. pData: [],
  7789. templateArray: [],
  7790. },
  7791. ],
  7792. },
  7793. ],
  7794. templateArray: [],
  7795. studentJuri: [],
  7796. teacherJuri: [],
  7797. CollaborativeTeaList: [],
  7798. checkboxList: [],
  7799. checkboxList2: [],
  7800. checkboxList3: [],
  7801. classSearch: "",
  7802. gradeId: "",
  7803. number: "",
  7804. tTitle: "",
  7805. tdetail: "",
  7806. templateC: {},
  7807. AttText: {},
  7808. AttTextType: 0,
  7809. AttTextIndex: 0,
  7810. cTemplate: "",
  7811. CourseType: [],
  7812. CourseType1: [],
  7813. CourseType2: [],
  7814. CourseTypeJson: {},
  7815. CourseTypeJson1: {},
  7816. courseTypeId: [],
  7817. courseTypeId1: [],
  7818. courseTypeSon: [],
  7819. clearArray: [],
  7820. pTypeCheck: [],
  7821. pTypeCheckName: [],
  7822. loading: false,
  7823. toolType: 0,
  7824. inputShow: true,
  7825. inputShow2: true,
  7826. toolIndex: 0,
  7827. cidType: 0,
  7828. answerQ: "",
  7829. answerQ2: "",
  7830. grade: [],
  7831. grade2: [],
  7832. courseUserid: "",
  7833. timer: null,
  7834. timer2: null,
  7835. pasteTimer: null,
  7836. checkId: "",
  7837. isDelete: 1,
  7838. addindex: 0,
  7839. selectSteps: 1,
  7840. groupJson: {},
  7841. dialogVisibleGroup: false,
  7842. rightBoxHeight: 0,
  7843. ManAarray: [],
  7844. checkBoolean: false,
  7845. inviteCode: [],
  7846. inviteId: "",
  7847. icode: "",
  7848. easyArray: [2, 4],
  7849. sourceData: {},
  7850. updateSourcePan: false,
  7851. videoJson: {},
  7852. isBtnDisplay: false,
  7853. isStepDisplay: false,
  7854. isPasteStage: false,
  7855. isPasteTask: false,
  7856. isPasteChoice: false,
  7857. imageList: [],
  7858. imageloading: false,
  7859. imageloading2: false,
  7860. searchImageValue: "",
  7861. ppage: 1,
  7862. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7863. oldIndex: 0,
  7864. dragType: "",
  7865. oldUnitIndex: 0,
  7866. oldData: null,
  7867. newIndex: "",
  7868. englishList: {},
  7869. typeIndex: "",
  7870. courseState: 5,
  7871. taskJSONa: [
  7872. {
  7873. task: "",
  7874. taskDetail: "",
  7875. chapterData: [],
  7876. toolText: "",
  7877. toolChoose: [
  7878. {
  7879. tool: [],
  7880. toolDetail: "",
  7881. toolType: 0,
  7882. askCount: 1,
  7883. askTitle: "",
  7884. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7885. },
  7886. ],
  7887. isShowTools: false,
  7888. askCount: 1,
  7889. isFold: 1,
  7890. askTitle: "",
  7891. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7892. checkJson: [{ checkCount: [], checkPerent: [] }],
  7893. homeworkList: [],
  7894. },
  7895. ],
  7896. checkUnitIndex: 0,
  7897. isdrag: "",
  7898. evaIndex: "",
  7899. evatIndex: "",
  7900. evaBoxDialog: false,
  7901. EnglishVoiceDialog: false,
  7902. englishVoiceJson: {},
  7903. cetIndex: "",
  7904. cettIndex: "",
  7905. cetBoxDialog: false,
  7906. templateName: "",
  7907. setTypeJson: {
  7908. one: "",
  7909. two: "",
  7910. },
  7911. twoJson: [],
  7912. oneJson: [],
  7913. updateKey: 1,
  7914. isOutline: false,
  7915. isOutline2: false,
  7916. infoData: [],
  7917. infoproVisible: false,
  7918. infoisFinishSize: 0,
  7919. infoisAllSize: 0,
  7920. infoprogress: 0,
  7921. taskDetailLoading: [],
  7922. ttaskDetailLoading: [],
  7923. taskDetailLoading2: [],
  7924. ttaskDetailLoading2: [],
  7925. taskDetailLoading3: [],
  7926. ttaskDetailLoading3: [],
  7927. taskDetailLoading4: [],
  7928. taskDetailLoading5: [],
  7929. ttaskDetailLoading5: [],
  7930. dArray: [],
  7931. dialogVisibleAiD: false,
  7932. aitype: "",
  7933. aiJson: {
  7934. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7935. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7936. "aiTask": "请根据<教学任务教案>。",
  7937. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7938. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7939. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7940. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7941. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7942. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7943. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7944. },
  7945. aiText: "",
  7946. aiText2: "",
  7947. aiText3: "",
  7948. aiCallBack: "",
  7949. aiIndex: "",
  7950. clickType: 1,
  7951. promptShow: false,
  7952. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7953. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7954. dialogVisibleTips: false,
  7955. tipsJson: {},
  7956. cpote:{
  7957. cpote1: '',
  7958. cpote2: '',
  7959. cpote3: '',
  7960. cpote4: '',
  7961. },
  7962. cpoteLoading:{
  7963. cpote1: false,
  7964. cpote2: false,
  7965. cpote3: false,
  7966. cpote4: false,
  7967. },
  7968. cpotetLoading:{
  7969. cpote1: false,
  7970. cpote2: false,
  7971. cpote3: false,
  7972. cpote4: false,
  7973. },
  7974. cpoteType: 0,
  7975. dialogVisibleAiCreate: false,
  7976. dialogVisibleAiCreate2: [],
  7977. pptBoxDialog: true,
  7978. pptCount: [],
  7979. dialogVisibleAiCreateVideo: false,
  7980. teacherText: [],
  7981. isFileSearch: true,
  7982. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  7983. 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'],
  7984. courseJie:1,
  7985. courseTime:45,
  7986. allTextArray: [],
  7987. dialogVisiblePdf: false,
  7988. dialogVisibleOffice: false,
  7989. wurl: "",
  7990. choiceLoading: false,
  7991. teacherInfoData: [],
  7992. teacherinfoproVisible: false,
  7993. teacherinfoisFinishSize: 0,
  7994. teacherinfoisAllSize: 0,
  7995. teacherinfoprogress: 0,
  7996. teacherCourseText: "",
  7997. teacherTextLoading: false,
  7998. tteacherTextLoading: false,
  7999. targetCourseText: "",
  8000. targetTextLoading: false,
  8001. ttargetTextLoading: false,
  8002. cankaoInfoData: [],
  8003. fileSLoading: false,
  8004. infoData2: [],
  8005. isuseT: false,
  8006. mode: 1,
  8007. targetCourseText2: "",
  8008. targetTextLoading2: false,
  8009. ttargetTextLoading2: false,
  8010. courseTextBool: false,
  8011. teacherCourseTextB: true,
  8012. targetCourseTextB: true,
  8013. courseTextB: true,
  8014. targetCourseText2B: true,
  8015. // 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'],
  8016. yiKeTemplateArray:[],
  8017. taskLoading: [],
  8018. ruleLoading: [],
  8019. mubiaoInfoData: [],
  8020. mubiaoinfoproVisible: false,
  8021. mubiaoinfoisFinishSize: 0,
  8022. mubiaoinfoisAllSize: 0,
  8023. mubiaoinfoprogress: 0,
  8024. xuanzeInfoData: [],
  8025. xuanzeinfoproVisible: false,
  8026. xuanzeinfoisFinishSize: 0,
  8027. xuanzeinfoisAllSize: 0,
  8028. xuanzeinfoprogress: 0,
  8029. pingjiaInfoData: [],
  8030. pingjiainfoproVisible: [],
  8031. pingjiainfoisFinishSize: [],
  8032. pingjiainfoisAllSize: [],
  8033. pingjiainfoprogress: [],
  8034. taskGLoading: [],
  8035. ttaskGLoading: [],
  8036. isOutlineCancelToken: null,
  8037. isFileCancelToken: null,
  8038. isTargetCancelToken1: null,
  8039. isTargetCancelToken2: null,
  8040. isTextCancelToken: null,
  8041. isTeacherTextCancelToken: null,
  8042. isTeacherTaskCancelToken: null,
  8043. isOutlineTaskCancelToken: [],
  8044. isTeacherTaskCancelToken2: [],
  8045. isTeacherTaskCancelSource: [],
  8046. isTextCancelSource: null,
  8047. isOutlineTaskCancelSource: [],
  8048. isTeacherTextCancelSource: null,
  8049. isTargetCancelSource1: null,
  8050. isTargetCancelSource2: null,
  8051. fileidArray: [],
  8052. interPan: true,
  8053. interFlash: true,
  8054. agentid: "",
  8055. interSetting: false,
  8056. chatid: "",
  8057. languageSetting: 0, //0中文 1繁体 2英文
  8058. isQuote: {},
  8059. knowFileArray: [],
  8060. knowInfoData: [],
  8061. knowinfoproVisible: false,
  8062. knowinfoisFinishSize: 0,
  8063. knowinfoisAllSize: 0,
  8064. knowinfoprogress: 0,
  8065. knowFileids: [],
  8066. searchFileName: "",
  8067. knowInfoDataLoading: false,
  8068. isfindMatchingContents: null,
  8069. findMatchingContentsPage: 1,
  8070. findMatchingContentsFinish: false,
  8071. knowInfoData2: [],
  8072. knowinfoproVisible2: false,
  8073. knowinfoisFinishSize2: 0,
  8074. knowinfoisAllSize2: 0,
  8075. knowinfoprogress2: 0,
  8076. knowFileids2: [],
  8077. knowInfoData3: [],
  8078. knowFileids3: [],
  8079. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8080. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41],
  8081. taskAnLoading: [],
  8082. taskAnCancelToken: [],
  8083. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  8084. taskCancelToken1: [],
  8085. isTaskCancelSource1: [],
  8086. taskCancelToken2: [],
  8087. isDisplay: false,
  8088. isDialog: 0,
  8089. recordVideoText: "",
  8090. recordAudioUrl: "",
  8091. r_agentid: "",
  8092. course_info: "",
  8093. stepShow: true,
  8094. anLoading: [],
  8095. appendixFile: [],
  8096. appendixPan: true,
  8097. appendixFiles: [],
  8098. appendixTypeCheck: 'all',
  8099. appendixTaskCheck: 'all',
  8100. appendixType: [
  8101. {
  8102. label: "教案",
  8103. value: 0,
  8104. },
  8105. {
  8106. label: "PPT",
  8107. value: 1,
  8108. },
  8109. {
  8110. label: "学历案",
  8111. value: 2,
  8112. },
  8113. {
  8114. label: "量规",
  8115. value: 3,
  8116. },
  8117. {
  8118. label: "聊天栏记录",
  8119. value: 4,
  8120. },
  8121. ],
  8122. appendixLoading: false,
  8123. interFindPan: true,
  8124. typeC1: [],
  8125. typeC2: [],
  8126. knowFileType1: "",
  8127. knowFileType2: "",
  8128. knowFileType: "",
  8129. knowFileTypeArray1: ['上册', '下册'],
  8130. knowFileTypeArray: ['作业', '教案', '其他'],
  8131. 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']
  8132. };
  8133. },
  8134. directives: {
  8135. autoHeight: {
  8136. update(el, binding) {
  8137. const { value } = binding;
  8138. if (value && typeof value === "number") {
  8139. el.style.height = `${value}px`;
  8140. } else {
  8141. el.style.height = "auto";
  8142. }
  8143. },
  8144. componentUpdated(el) {
  8145. el.style.height = `${el.scrollHeight + 25}px`;
  8146. },
  8147. },
  8148. },
  8149. computed: {
  8150. // rightBoxHeight: function () {
  8151. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  8152. // },
  8153. offsetLetfPx: function () {
  8154. //addnum可以直接在模板语法里面用,相当于data内的值
  8155. return (
  8156. $(".cru_select")[this.unitIndex] &&
  8157. $(".cru_select")[this.unitIndex].offsetLeft + 5
  8158. );
  8159. },
  8160. getMan2() {
  8161. return function (people) {
  8162. let _people = people;
  8163. let _people2 = "";
  8164. if (this.ManAarray.length) {
  8165. for (var i = 0; i < this.ManAarray.length; i++) {
  8166. if (this.ManAarray[i].userid == people) {
  8167. _people2 = this.ManAarray[i].name;
  8168. break;
  8169. }
  8170. }
  8171. }
  8172. if (people == this.courseUserid) {
  8173. return "";
  8174. }
  8175. return this.ManAarray.length ? _people2 : "";
  8176. };
  8177. },
  8178. getListMan2() {
  8179. return function (list) {
  8180. let _people2 = [];
  8181. if (this.ManAarray.length) {
  8182. for (var j = 0; j < list.length; j++) {
  8183. let people = list[j];
  8184. for (var i = 0; i < this.ManAarray.length; i++) {
  8185. if (
  8186. this.ManAarray[i].userid == people &&
  8187. people != this.courseUserid
  8188. ) {
  8189. _people2.push(this.ManAarray[i].name);
  8190. break;
  8191. }
  8192. }
  8193. }
  8194. }
  8195. return this.ManAarray.length ? _people2.join("、") : "";
  8196. };
  8197. },
  8198. isInvite() {
  8199. return function (cid) {
  8200. let array = [];
  8201. for (var i = 0; i < this.inviteCode.length; i++) {
  8202. array.push(this.inviteCode[i].cid);
  8203. }
  8204. return array.indexOf(cid) != -1;
  8205. };
  8206. },
  8207. getInviteCodeC() {
  8208. return function (cid) {
  8209. let array = [];
  8210. for (var i = 0; i < this.inviteCode.length; i++) {
  8211. array.push(this.inviteCode[i].cid);
  8212. }
  8213. return this.inviteCode[array.indexOf(cid)].ic;
  8214. };
  8215. },
  8216. getClassC() {
  8217. return function (c) {
  8218. let _c2 = "";
  8219. if (this.grade.length) {
  8220. for (var i = 0; i < this.grade.length; i++) {
  8221. if (this.grade[i].id == c) {
  8222. _c2 = this.grade[i].name;
  8223. break;
  8224. }
  8225. }
  8226. }
  8227. return this.grade.length ? _c2 : "";
  8228. };
  8229. },
  8230. getListClassC() {
  8231. return function (list) {
  8232. let _c2 = [];
  8233. if (this.grade.length) {
  8234. for (var j = 0; j < list.length; j++) {
  8235. let c = list[j];
  8236. for (var i = 0; i < this.grade.length; i++) {
  8237. if (this.grade[i].id == c) {
  8238. _c2.push(this.grade[i].name);
  8239. break;
  8240. }
  8241. }
  8242. }
  8243. }
  8244. return this.grade.length ? _c2.join("、") : "";
  8245. };
  8246. },
  8247. MarkdownT() {
  8248. return function (c) {
  8249. let md = new MarkdownIt();
  8250. return c
  8251. ? md.render(c) : "";
  8252. };
  8253. },
  8254. panOutline(){
  8255. return function () {
  8256. let count = 0;
  8257. for(var i = 0; i < this.unitJson.length; i++){
  8258. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8259. for(var j = 0; j < _task.length; j++){
  8260. if(_task[j].taskDetail2){
  8261. count++
  8262. }
  8263. }
  8264. }
  8265. return count;
  8266. };
  8267. },
  8268. panTeacher(){
  8269. return function () {
  8270. let count = 0;
  8271. for(var i = 0; i < this.unitJson.length; i++){
  8272. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8273. for(var j = 0; j < _task.length; j++){
  8274. if(_task[j].taskDetail3){
  8275. count++
  8276. }
  8277. }
  8278. }
  8279. return count;
  8280. };
  8281. },
  8282. panTask(){
  8283. return function () {
  8284. let count = 0;
  8285. for(var i = 0; i < this.unitJson.length; i++){
  8286. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8287. for(var j = 0; j < _task.length; j++){
  8288. if(_task[j].taskDetail){
  8289. count++
  8290. }
  8291. }
  8292. }
  8293. return count;
  8294. };
  8295. },
  8296. panElist(){
  8297. return function (array) {
  8298. let count = 0;
  8299. for(var i = 0; i < array.toolChoose.length; i++){
  8300. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  8301. count++
  8302. }
  8303. }
  8304. return count;
  8305. };
  8306. },
  8307. panTaskElist(){
  8308. return function () {
  8309. let count = 0;
  8310. for(var i = 0; i < this.unitJson.length; i++){
  8311. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8312. for(var j = 0; j < _task.length; j++){
  8313. if(_task[j].eList && _task[j].eList.length){
  8314. count++
  8315. }
  8316. }
  8317. }
  8318. return count;
  8319. };
  8320. },
  8321. panEvaCont(){
  8322. return function () {
  8323. let count = 0;
  8324. for(var i = 0; i < this.unitJson.length; i++){
  8325. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8326. for(var j = 0; j < _task.length; j++){
  8327. let tool = _task[j].toolChoose
  8328. for(var k = 0; k < tool.length; k++){
  8329. if(tool[k].eList && tool[k].eList.length){
  8330. count++
  8331. }
  8332. }
  8333. }
  8334. }
  8335. return count;
  8336. };
  8337. },
  8338. dataCheckPan(){
  8339. return function (fileid) {
  8340. for(let i = 0; i < this.infoData.length; i++){
  8341. if(this.infoData[i].fileid == fileid){
  8342. return true
  8343. }
  8344. }
  8345. return false;
  8346. };
  8347. },
  8348. interUrl: function () {
  8349. let agentid = this.aiJson.agentid
  8350. let sagentid = this.aiJson.sagentid
  8351. let url = ''
  8352. if(sagentid){
  8353. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${sagentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8354. }else{
  8355. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8356. }
  8357. return url;
  8358. },
  8359. panPptCount(){
  8360. return function () {
  8361. let ppts = 0
  8362. for(var i = 0; i < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; i++){
  8363. let ppt = this.$refs['ppt'+i]
  8364. if(ppt && ppt[0].tanDialog){
  8365. ppts++
  8366. }
  8367. }
  8368. if(!this.pptCount.length){
  8369. this.pptBoxDialog = false
  8370. }
  8371. return ppts;
  8372. };
  8373. },
  8374. panDanTool(){
  8375. return function (array) {
  8376. let count = 0;
  8377. for(var i = 0; i < array.toolChoose.length; i++){
  8378. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8379. count++
  8380. }
  8381. }
  8382. return count;
  8383. };
  8384. },
  8385. panDanToolEva(){
  8386. return function (array) {
  8387. let count = 0;
  8388. let tool = array.toolChoose
  8389. for(var k = 0; k < tool.length; k++){
  8390. if(tool[k].eList && tool[k].eList.length){
  8391. count++
  8392. }
  8393. }
  8394. return count;
  8395. };
  8396. },
  8397. panTool(){
  8398. return function () {
  8399. let count = 0;
  8400. for(var j = 0; j < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; j++){
  8401. let array = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[j]
  8402. for(var i = 0; i < array.toolChoose.length; i++){
  8403. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8404. count++
  8405. }
  8406. }
  8407. }
  8408. return count;
  8409. };
  8410. },
  8411. allFile(){
  8412. return function (type) {
  8413. let file = [...this.knowInfoData, ...this.infoData, ...this.knowInfoData2, ...this.appendixFile];
  8414. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8415. let _task = this.unitJson[0].chapterInfo[0].taskJson[i];
  8416. for(var j = 0; j < _task.chapterData.length; j++){
  8417. if(_task.chapterData[j].type == 3){
  8418. file.push({..._task.chapterData[j], tool:j, task:i});
  8419. }
  8420. }
  8421. }
  8422. let uniqueUrls = new Set(file.map(item => item.url)); // 使用Set去重
  8423. let uniqueFile = Array.from(uniqueUrls).map(url => file.find(item => item.url === url)); // 根据url获取唯一文件
  8424. if(this.appendixTaskCheck != 'all' && type != '2'){
  8425. uniqueFile = uniqueFile.filter(file => file.task+1 == this.appendixTaskCheck || file.name.includes('任务'+this.appendixTaskCheck) || file.name.includes('任务'+this.numberToChinese(this.appendixTaskCheck)));
  8426. }
  8427. if(this.appendixTypeCheck != 'all' && type != '2'){
  8428. if(this.appendixTypeCheck == 0){
  8429. uniqueFile = uniqueFile.filter(file => file.name.includes('教案'));
  8430. }else if(this.appendixTypeCheck == 1){
  8431. uniqueFile = uniqueFile.filter(file => file.name.toUpperCase().includes('PPT') || file.name.toUpperCase().includes('PPTX'));
  8432. }else if(this.appendixTypeCheck == 2){
  8433. uniqueFile = uniqueFile.filter(file => file.name.includes('学历案'));
  8434. }else if(this.appendixTypeCheck == 3){
  8435. uniqueFile = uniqueFile.filter(file => file.name.includes('的评价'));
  8436. }else if(this.appendixTypeCheck == 4){
  8437. uniqueFile = uniqueFile.filter(file => file.task == 'dialog');
  8438. }
  8439. }
  8440. return uniqueFile;
  8441. };
  8442. },
  8443. panAppendixCheckAll(){
  8444. return function(){
  8445. let files = this.allFile();
  8446. let count = 0
  8447. for(var i = 0; i < files.length; i++){
  8448. if(this.appendixFiles.includes(files[i].url)){
  8449. count++
  8450. }
  8451. }
  8452. if (count == files.length) {
  8453. return true
  8454. }else {
  8455. false
  8456. }
  8457. }
  8458. },
  8459. getTypeC(){
  8460. return function(index){
  8461. let sub = []
  8462. let grade = []
  8463. if (this.courseTypeId.length) {
  8464. for (var i = 0; i < this.courseTypeId.length; i++) {
  8465. let _sid = this.courseTypeId[i]
  8466. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8467. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  8468. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  8469. }
  8470. }
  8471. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  8472. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  8473. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  8474. }
  8475. }
  8476. }
  8477. }
  8478. if(index == 1){
  8479. return sub
  8480. }else if(index == 2){
  8481. return grade
  8482. }
  8483. }
  8484. },
  8485. getFileType(){
  8486. return function (name) {
  8487. let fileType = this.getKnowType();
  8488. for (let type of fileType) {
  8489. if (converter(name).includes(type)) {
  8490. return type; // 判断name中是否包含对应的文件类型
  8491. }
  8492. }
  8493. return '其他';
  8494. };
  8495. },
  8496. allknowInfoData3(){
  8497. return function () {
  8498. let knowInfoData = this.knowInfoData3;
  8499. if(this.knowFileType){
  8500. // if(converter(this.knowFileType) == '其他'){
  8501. // let fileType = this.getKnowType().filter(item => item != '其他');
  8502. // knowInfoData = knowInfoData.filter(item => {
  8503. // return !fileType.some(type => converter(item.name).includes(type));
  8504. // });
  8505. // }else{
  8506. knowInfoData = knowInfoData.filter(item => converter(item.file_type).includes(this.knowFileType))
  8507. // }
  8508. }
  8509. if(this.knowFileType1){
  8510. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(this.knowFileType1))
  8511. }
  8512. if(this.knowFileType2){
  8513. knowInfoData = knowInfoData.filter(item => converter(item.name).includes(converter(`第${this.knowFileType2}单元`)) || converter(item.name).includes(converter(`第${this.numberToChinese(this.knowFileType2)}单元`)))
  8514. }
  8515. return knowInfoData;
  8516. };
  8517. },
  8518. getKnowType(){
  8519. return function () {
  8520. let knowInfoData = this.knowInfoData3;
  8521. let array = []
  8522. for(var i = 0; i < knowInfoData.length; i++){
  8523. if(array.indexOf(knowInfoData[i].file_type) == -1){
  8524. array.push(knowInfoData[i].file_type)
  8525. }
  8526. }
  8527. return array;
  8528. };
  8529. },
  8530. panknowInfoData3CheckAll(){
  8531. return function(){
  8532. let files = this.allknowInfoData3();
  8533. let count = 0
  8534. for(var i = 0; i < files.length; i++){
  8535. if(this.knowFileids3.includes(files[i].url)){
  8536. count++
  8537. }
  8538. }
  8539. if (count == files.length) {
  8540. return true
  8541. }else {
  8542. false
  8543. }
  8544. }
  8545. },
  8546. },
  8547. watch: {
  8548. unitIndex(newValue, oldValue) {
  8549. // return;
  8550. if (this.isDelete == 2) {
  8551. this.isDelete = 1;
  8552. return;
  8553. }
  8554. if (this.cid != "") {
  8555. let _unitIndex = oldValue;
  8556. if (
  8557. JSON.stringify(this.unitJson2[_unitIndex]) ==
  8558. JSON.stringify(this.unitJson[_unitIndex])
  8559. ) {
  8560. this.$refs.rightboxR.scrollTop = 0;
  8561. return;
  8562. }
  8563. let cPan = 1;
  8564. for (
  8565. var j = 0;
  8566. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8567. j++
  8568. ) {
  8569. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8570. j
  8571. ].proVisible = false;
  8572. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8573. j
  8574. ].proVisible2 = false;
  8575. if (
  8576. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8577. .length > 1
  8578. ) {
  8579. for (
  8580. var z = 0;
  8581. z <
  8582. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8583. .length;
  8584. z++
  8585. ) {
  8586. if (
  8587. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  8588. .toolChoose[z].tool.length
  8589. ) {
  8590. this.$message.error("请把工具添加完整");
  8591. cPan = 2;
  8592. break;
  8593. }
  8594. }
  8595. }
  8596. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8597. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8598. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8599. (ele) => {
  8600. return ele.value != "" || ele.detail != "" || ele.target != "";
  8601. }
  8602. );
  8603. }
  8604. }
  8605. if (cPan == 2) {
  8606. this.unitIndex = oldValue;
  8607. return;
  8608. }
  8609. for (var i = 0; i < this.unitJson.length; i++) {
  8610. if (this.addindex != i) {
  8611. delete this.unitJson[i].isUpdate;
  8612. }
  8613. }
  8614. this.$refs.rightboxR.scrollTop = 0;
  8615. this.addindex = -1;
  8616. let params = [
  8617. {
  8618. cid: this.cid,
  8619. chapters: JSON.stringify(this.unitJson),
  8620. uid: this.userid,
  8621. unitIndex: _unitIndex,
  8622. },
  8623. ];
  8624. this.ajax
  8625. .post(this.$store.state.api + "updateWorkNew4", params)
  8626. .then((res) => {
  8627. // this.$message({
  8628. // message: "修改成功",
  8629. // type: "success",
  8630. // });
  8631. // this.courseId = this.cid;
  8632. this.addtips()
  8633. })
  8634. .catch((err) => {
  8635. this.$message.error("网络不佳");
  8636. console.error(err);
  8637. });
  8638. }
  8639. },
  8640. steps(newValue, old) {
  8641. if(newValue == 2){
  8642. this.steps = old
  8643. }
  8644. if (newValue == 4) {
  8645. let cPan = 1;
  8646. for (var i = 0; i < this.unitJson.length; i++) {
  8647. for (
  8648. var j = 0;
  8649. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8650. j++
  8651. ) {
  8652. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8653. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8654. if (
  8655. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8656. ) {
  8657. for (
  8658. var z = 0;
  8659. z <
  8660. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8661. z++
  8662. ) {
  8663. if (
  8664. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  8665. .tool.length
  8666. ) {
  8667. this.$message.error("请把工具添加完整");
  8668. cPan = 2;
  8669. break;
  8670. }
  8671. }
  8672. }
  8673. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8674. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8675. i
  8676. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8677. return ele.value != "" || ele.detail != "" || ele.target != "";
  8678. });
  8679. }
  8680. }
  8681. }
  8682. this.inputShow = true;
  8683. if (cPan == 2) {
  8684. this.steps = old;
  8685. return;
  8686. }
  8687. this.goTo(
  8688. "/course?userid=" +
  8689. this.userid +
  8690. "&oid=" +
  8691. this.oid +
  8692. "&org=" +
  8693. this.org +
  8694. "&role=" +
  8695. this.role
  8696. );
  8697. }
  8698. },
  8699. courseName(newVal, oldVal) {
  8700. this.setCourseInfo();
  8701. },
  8702. courseTypeId: {
  8703. immediate: true,
  8704. deep: true,
  8705. handler(newValue, oldValue) {
  8706. this.setCourseInfo();
  8707. }
  8708. },
  8709. knowFileids(newVal, oldVal) {
  8710. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8711. },
  8712. knowFileids2(newVal, oldVal) {
  8713. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8714. },
  8715. },
  8716. methods: {
  8717. tableRowClassName({ row, rowIndex }) {
  8718. if ((rowIndex + 1) % 2 === 0) {
  8719. return "even_row";
  8720. } else {
  8721. return "";
  8722. }
  8723. },
  8724. close() {
  8725. this.cetIndex = "";
  8726. this.cettIndex = "";
  8727. this.templateName = "";
  8728. this.cetBoxDialog = false;
  8729. },
  8730. openAI() {
  8731. top.postMessage({ tools: "64" }, "*");
  8732. },
  8733. setMan() {
  8734. // let teacherJuri = this.teacherJuri2;
  8735. this.ManAarray = [];
  8736. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  8737. if (_user.indexOf(this.userid) == -1) {
  8738. _user.push(this.userid);
  8739. }
  8740. if (_user.indexOf(this.courseUserid) == -1) {
  8741. _user.push(this.courseUserid);
  8742. }
  8743. let params = [{
  8744. uid: _user.join(","),
  8745. }];
  8746. this.ajax
  8747. .post(this.$store.state.api + "getAllUserByIdP", params)
  8748. .then((res) => {
  8749. let teacherJuri = res.data[0];
  8750. this.ManAarray = teacherJuri;
  8751. })
  8752. .catch((err) => {
  8753. console.error(err);
  8754. });
  8755. },
  8756. previewImg(url) {
  8757. this.$hevueImgPreview(url);
  8758. },
  8759. btnDisplay(bool) {
  8760. this.isBtnDisplay = bool;
  8761. },
  8762. stepDisplay(bool) {
  8763. this.isStepDisplay = bool;
  8764. },
  8765. scrollChange() {
  8766. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8767. },
  8768. addHw(e) {
  8769. var el = e.currentTarget;
  8770. el.getElementsByTagName("input")[0].click();
  8771. },
  8772. change(val) {
  8773. if (this.dialogVisible1) {
  8774. this.tdetail = val;
  8775. } else if (this.dialogVisible6) {
  8776. this.AttText.text = val;
  8777. } else if (this.dialogVisible2) {
  8778. this.cTemplate = val;
  8779. } else if (this.dialogVisibleTable) {
  8780. this.tableJson.text = val;
  8781. }
  8782. this.$forceUpdate();
  8783. console.log(val);
  8784. },
  8785. change2(val) {
  8786. console.log(val);
  8787. this.$forceUpdate();
  8788. },
  8789. handleClose(done) {
  8790. done();
  8791. },
  8792. closePan(tool) {
  8793. if (tool == 15) {
  8794. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8795. this.dialogVisible8 = false;
  8796. } else {
  8797. this.closeConfirm(tool);
  8798. }
  8799. } else if (tool == 4) {
  8800. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8801. this.dialogVisible5 = false;
  8802. } else {
  8803. this.closeConfirm(tool);
  8804. }
  8805. } else if (tool == 45) {
  8806. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8807. this.dialogVisibleChoice = false;
  8808. } else {
  8809. this.closeConfirm(tool);
  8810. }
  8811. } else if (tool == 41) {
  8812. if (
  8813. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8814. ) {
  8815. this.dialogVisibleSelect = false;
  8816. } else {
  8817. this.closeConfirm(tool);
  8818. }
  8819. } else if (tool == 47) {
  8820. if (
  8821. JSON.stringify(this.sentenceList) ==
  8822. JSON.stringify(this.sentenceList2)
  8823. ) {
  8824. this.dialogVisibleSentence = false;
  8825. } else {
  8826. this.closeConfirm(tool);
  8827. }
  8828. } else if (tool == 69) {
  8829. if (
  8830. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8831. ) {
  8832. this.englishDialogVisible = false;
  8833. } else {
  8834. this.closeConfirm(tool);
  8835. }
  8836. }
  8837. },
  8838. closeConfirm(tool) {
  8839. this.$confirm("是否保存已编辑内容?", "提示", {
  8840. confirmButtonText: "保存",
  8841. cancelButtonText: "不保存",
  8842. type: "warning",
  8843. })
  8844. .then(() => {
  8845. if (tool == 15) {
  8846. this.addAnswer();
  8847. } else if (tool == 4) {
  8848. this.addAsk();
  8849. } else if (tool == 45) {
  8850. this.addTest();
  8851. } else if (tool == 41) {
  8852. this.addSelectAnswer();
  8853. } else if (tool == 47) {
  8854. this.addSentenceTool();
  8855. } else if (tool == 69) {
  8856. this.addEnglish();
  8857. }
  8858. })
  8859. .catch(() => {
  8860. if (tool == 15) {
  8861. this.dialogVisible8 = false;
  8862. } else if (tool == 4) {
  8863. this.dialogVisible5 = false;
  8864. } else if (tool == 45) {
  8865. this.dialogVisibleChoice = false;
  8866. } else if (tool == 41) {
  8867. this.dialogVisibleSelect = false;
  8868. } else if (tool == 47) {
  8869. this.dialogVisibleSentence = false;
  8870. } else if (tool == 69) {
  8871. this.englishDialogVisible = false;
  8872. }
  8873. });
  8874. },
  8875. addEnglish(jsonType) {
  8876. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  8877. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  8878. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  8879. if (
  8880. this.englishList.engTitle == "" ||
  8881. this.englishList.englishText == ""
  8882. ) {
  8883. this.$message.error("请将内容填写完整!");
  8884. return;
  8885. }
  8886. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8887. this.taskCount
  8888. ].toolChoose[this.toolIndex].englishList = this.englishList;
  8889. this.englishList = {};
  8890. if (jsonType && jsonType == 1) {
  8891. this.englishDialogVisible = true;
  8892. } else {
  8893. this.englishDialogVisible = false;
  8894. }
  8895. if (
  8896. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  8897. .toolChoose[this.toolIndex].tool != 69
  8898. ) {
  8899. this.addTools(69, this.taskCount, this.toolIndex);
  8900. }
  8901. },
  8902. imgChange2(i, j) {
  8903. var _tmp = this.testJson.testJson[i].checkList[j];
  8904. this.noneBtnImg = _tmp.length >= 1;
  8905. },
  8906. imgChange3(i) {
  8907. var _tmp = this.testJson.testJson[i];
  8908. this.noneBtnImg = _tmp.length >= 1;
  8909. },
  8910. imgChange1(file, fileList, type, itemTaskIndex) {
  8911. if (type == 1) {
  8912. var _tmp = this.cover;
  8913. } else if (
  8914. type == 2 ||
  8915. type == 3 ||
  8916. type == 6 ||
  8917. type == 7 ||
  8918. type == 8
  8919. ) {
  8920. var _tmp =
  8921. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8922. .chapterData;
  8923. } else if (type == 4) {
  8924. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  8925. } else {
  8926. var _tmp =
  8927. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8928. .homeworkList;
  8929. }
  8930. this.noneBtnImg = _tmp.length >= 1;
  8931. },
  8932. goTo(path) {
  8933. this.$router.push(path);
  8934. },
  8935. guid() {
  8936. var _num,
  8937. i,
  8938. _guid = "";
  8939. for (i = 0; i < 32; i++) {
  8940. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  8941. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  8942. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  8943. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  8944. _guid += "-";
  8945. }
  8946. }
  8947. return _guid;
  8948. },
  8949. retrunCourse() {
  8950. if(this.istemplate == 1){
  8951. this.goTo(
  8952. "/course?userid=" +
  8953. this.userid +
  8954. "&oid=" +
  8955. this.oid +
  8956. "&org=" +
  8957. this.org +
  8958. "&role=" +
  8959. this.role
  8960. );
  8961. return
  8962. }
  8963. this.$confirm("是否保存已编辑内容?", "提示", {
  8964. confirmButtonText: "保存",
  8965. cancelButtonText: "不保存",
  8966. distinguishCancelAndClose: true,
  8967. type: "warning",
  8968. customClass: 'custom-confirm-box'
  8969. })
  8970. .then(() => {
  8971. if (this.taskLoading.length) {
  8972. let _pan = 1
  8973. for(var k = 0; k < this.taskLoading.length; k++){
  8974. if(this.taskLoading[k]){
  8975. this.$message({
  8976. message: `请等待任务${k+1}回答完毕后再保存`,
  8977. type: "warning"
  8978. });
  8979. _pan = 2
  8980. }
  8981. }
  8982. if(_pan == 2){
  8983. return
  8984. }
  8985. }
  8986. if(this.taskGLoading.length){
  8987. let _pan = 1
  8988. for(var k = 0; k < this.taskGLoading.length; k++){
  8989. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8990. this.$message({
  8991. message: `请等待任务${k+1}回答完毕后再保存`,
  8992. type: "warning"
  8993. });
  8994. _pan = 2
  8995. }
  8996. }
  8997. if(_pan == 2){
  8998. return
  8999. }
  9000. }
  9001. let pan2 = 1
  9002. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9003. for(var index = 0; index < taskJson.length; index++){
  9004. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9005. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9006. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9007. this.$message({
  9008. message: `请等待任务${index+1}回答完毕后再继续`,
  9009. type: "warning"
  9010. });
  9011. pan2 = 2
  9012. }
  9013. }
  9014. }
  9015. }
  9016. if(pan2 == 2){
  9017. return
  9018. }
  9019. if (this.cid == "" || this.cid == undefined) {
  9020. if (this.courseName == "") {
  9021. this.$message.error("请补充填写课程名称");
  9022. return;
  9023. } else {
  9024. this.addWork();
  9025. }
  9026. this.steps = 4;
  9027. } else {
  9028. if (this.courseName == "") {
  9029. this.$message.error("请补充填写课程名称");
  9030. return;
  9031. } else {
  9032. if (this.userid != this.courseUserid && this.role != "1") {
  9033. this.updateWork2();
  9034. } else {
  9035. this.updateWork();
  9036. }
  9037. this.steps = 4;
  9038. }
  9039. }
  9040. })
  9041. .catch((v) => {
  9042. console.log(v);
  9043. if (v == "cancel") {
  9044. this.goTo(
  9045. "/course?userid=" +
  9046. this.userid +
  9047. "&oid=" +
  9048. this.oid +
  9049. "&org=" +
  9050. this.org +
  9051. "&role=" +
  9052. this.role
  9053. );
  9054. }
  9055. });
  9056. setTimeout(() => {
  9057. this.setTipsIndex()
  9058. }, 500)
  9059. },
  9060. lastSteps() {
  9061. if (this.steps == 4) {
  9062. this.goTo(
  9063. "/course?userid=" +
  9064. this.userid +
  9065. "&oid=" +
  9066. this.oid +
  9067. "&org=" +
  9068. this.org +
  9069. "&role=" +
  9070. this.role
  9071. );
  9072. } else {
  9073. // if (this.cidType == 0) {
  9074. // this.steps--;
  9075. // if (this.steps == 1) {
  9076. // setTimeout(() => {
  9077. // this.checkEva(this.checkId);
  9078. // setTimeout(() => {
  9079. // this.checkEva(this.checkId);
  9080. // }, 100);
  9081. // }, 100);
  9082. // }
  9083. // } else {
  9084. if (this.steps == 3) {
  9085. this.steps = 1;
  9086. setTimeout(() => {
  9087. this.checkEva(this.checkId);
  9088. setTimeout(() => {
  9089. this.checkEva(this.checkId);
  9090. }, 100);
  9091. }, 100);
  9092. }
  9093. // }
  9094. }
  9095. },
  9096. navSteps(s) {
  9097. if (this.courseName == "") {
  9098. this.$message.error("请补充填写课程名称");
  9099. return;
  9100. }
  9101. if (this.cidType == 0) {
  9102. if (this.steps == 1) {
  9103. if (this.cid == "" || this.cid == undefined) {
  9104. this.addWork();
  9105. } else {
  9106. if (this.userid != this.courseUserid && this.role != "1") {
  9107. this.updateWork2();
  9108. } else {
  9109. this.updateWork();
  9110. }
  9111. }
  9112. }
  9113. if (s == 1) {
  9114. this.steps = 1;
  9115. setTimeout(() => {
  9116. this.checkEva(this.checkId);
  9117. setTimeout(() => {
  9118. this.checkEva(this.checkId);
  9119. }, 100);
  9120. }, 100);
  9121. }
  9122. if (s == 2) {
  9123. this.steps = 2;
  9124. }
  9125. if (s == 3) {
  9126. this.cTemplate = this.templateC.content;
  9127. this.dialogVisible2 = false;
  9128. this.steps = 3;
  9129. this.isClickColor = 1;
  9130. this.unitJson[
  9131. this.unitIndex
  9132. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9133. this.$forceUpdate();
  9134. setTimeout(() => {
  9135. this.checkEva(this.checkId);
  9136. setTimeout(() => {
  9137. this.checkEva(this.checkId);
  9138. }, 100);
  9139. }, 1000);
  9140. }
  9141. } else {
  9142. if (this.steps == 1) {
  9143. if (this.cid == "" || this.cid == undefined) {
  9144. this.addWork();
  9145. } else {
  9146. if (this.userid != this.courseUserid && this.role != "1") {
  9147. this.updateWork2();
  9148. } else {
  9149. this.updateWork();
  9150. }
  9151. }
  9152. }
  9153. if (s == 1) {
  9154. this.steps = 1;
  9155. setTimeout(() => {
  9156. this.checkEva(this.checkId);
  9157. setTimeout(() => {
  9158. this.checkEva(this.checkId);
  9159. }, 100);
  9160. }, 100);
  9161. }
  9162. if (s == 3) {
  9163. this.cTemplate = this.templateC.content;
  9164. this.dialogVisible2 = false;
  9165. this.steps = 3;
  9166. this.isClickColor = 1;
  9167. this.unitJson[
  9168. this.unitIndex
  9169. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9170. this.$forceUpdate();
  9171. setTimeout(() => {
  9172. this.checkEva(this.checkId);
  9173. setTimeout(() => {
  9174. this.checkEva(this.checkId);
  9175. }, 100);
  9176. }, 1000);
  9177. }
  9178. }
  9179. this.$refs.stepBox.scrollTop = 0;
  9180. },
  9181. setTipsIndex(){
  9182. // 使用 setTimeout 确保对话框已经渲染完成
  9183. this.$nextTick(() => {
  9184. const dialog = document.querySelector('.custom-confirm-box');
  9185. if (dialog) {
  9186. const parent = dialog.parentElement;
  9187. if (parent) {
  9188. parent.style.zIndex = 9999999;
  9189. const adjacentElement = parent.nextElementSibling;
  9190. if (adjacentElement) {
  9191. adjacentElement.style.zIndex = 9999998;
  9192. }
  9193. }
  9194. }
  9195. });
  9196. },
  9197. nextSteps(clickType, ttype) {
  9198. if(!this.time()){
  9199. return
  9200. }
  9201. // if (this.cidType == 1) {
  9202. if (this.steps == 1) {
  9203. if (this.courseName != "") {
  9204. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  9205. // this.$message({
  9206. // message: "请回答完毕后再次发送",
  9207. // type: "warning"
  9208. // });
  9209. if(this.ttaskDetailLoading.length){
  9210. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  9211. this.$message({
  9212. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9213. type: "warning"
  9214. });
  9215. }
  9216. if(this.cpotetLoading.cpote1){
  9217. this.$message({
  9218. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  9219. type: "warning"
  9220. });
  9221. }
  9222. if(this.cpotetLoading.cpote2){
  9223. this.$message({
  9224. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  9225. type: "warning"
  9226. });
  9227. }
  9228. if(this.cpotetLoading.cpote3){
  9229. this.$message({
  9230. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  9231. type: "warning"
  9232. });
  9233. }
  9234. if(this.cpotetLoading.cpote4){
  9235. this.$message({
  9236. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  9237. type: "warning"
  9238. });
  9239. }
  9240. return;
  9241. }
  9242. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  9243. if(!this.courseText && !this.teacherCourseText){
  9244. this.$message.error("请生成简要描述后再生成大纲");
  9245. return;
  9246. }
  9247. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  9248. this.openAiDialog(clickType, 'aiOutline2')
  9249. if(clickType == 1){
  9250. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9251. }else {
  9252. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9253. }
  9254. }else {
  9255. this.openAiDialog(clickType, 'aiOutline')
  9256. if(clickType == 1){
  9257. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  9258. }else {
  9259. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  9260. }
  9261. }
  9262. return;
  9263. }
  9264. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  9265. let _type = ''
  9266. if(this.cpoteType == 0){
  9267. _type = 'aiCpote1'
  9268. if(clickType == 1){
  9269. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  9270. }else {
  9271. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  9272. }
  9273. }else if(this.cpoteType == 1){
  9274. _type = 'aiCpote2'
  9275. if(clickType == 1){
  9276. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  9277. }else {
  9278. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  9279. }
  9280. }else if(this.cpoteType == 2){
  9281. _type = 'aiCpote3'
  9282. if(clickType == 1){
  9283. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  9284. }else {
  9285. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  9286. }
  9287. }else if(this.cpoteType == 3){
  9288. _type = 'aiCpote4'
  9289. if(clickType == 1){
  9290. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  9291. }else {
  9292. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  9293. }
  9294. }
  9295. this.cpoteType++
  9296. this.openAiDialog(clickType, _type)
  9297. return;
  9298. }
  9299. // if (!this.isOutline2) {
  9300. // this.openAiDialog(clickType, 'aiTeacher')
  9301. // return;
  9302. // }
  9303. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  9304. this.openAiDialog(clickType, 'aiTeacher3')
  9305. if(clickType == 1){
  9306. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9307. }else {
  9308. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9309. }
  9310. return;
  9311. }
  9312. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  9313. this.openAiDialog(clickType, 'aiTeacher2')
  9314. if(clickType == 1){
  9315. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  9316. }else {
  9317. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  9318. }
  9319. return;
  9320. }
  9321. let _pan2 = 1
  9322. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  9323. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  9324. _pan2 = 2
  9325. this.$message.error(`请完善任务${k+1}的课程大纲`)
  9326. break;
  9327. }
  9328. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  9329. _pan2 = 2
  9330. this.$message.error(`请完善任务${k+1}的课程教案`)
  9331. break;
  9332. }
  9333. }
  9334. if(_pan2 == 2){
  9335. return;
  9336. }
  9337. const functionA = () => {
  9338. setTimeout(() => {
  9339. this.loading = false
  9340. this.steps = 3;
  9341. }, 0)
  9342. this.isClickColor = 1;
  9343. this.unitJson[
  9344. this.unitIndex
  9345. ].chapterInfo[0].taskJson[0].toolOpen = true;
  9346. this.$forceUpdate();
  9347. setTimeout(() => {
  9348. this.checkEva(this.checkId);
  9349. setTimeout(() => {
  9350. this.checkEva(this.checkId);
  9351. }, 100);
  9352. }, 1000);
  9353. if (this.cid == "" || this.cid == undefined) {
  9354. this.addWork();
  9355. } else {
  9356. if (this.userid != this.courseUserid && this.role != "1") {
  9357. this.updateWork2();
  9358. } else {
  9359. this.updateWork();
  9360. }
  9361. }
  9362. }
  9363. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  9364. if(this.ttaskDetailLoading5.length){
  9365. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  9366. // this.$message({
  9367. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  9368. // type: "warning"
  9369. // });
  9370. this.$confirm("还有教案描述未生成完毕,是否直接下一步?", "提示", {
  9371. confirmButtonText: "确定",
  9372. cancelButtonText: "取消",
  9373. distinguishCancelAndClose: true,
  9374. type: "warning",
  9375. customClass: 'custom-confirm-box'
  9376. })
  9377. .then(() => {
  9378. if(this.isTeacherTaskCancelToken2){
  9379. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  9380. if(this.isTeacherTaskCancelToken2[i]){
  9381. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  9382. this.isTeacherTaskCancelToken2[i] = null;
  9383. }
  9384. }
  9385. }
  9386. this.taskDetailLoading5 = []
  9387. this.ttaskDetailLoading5 = []
  9388. if(this.isTeacherTaskCancelSource){
  9389. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  9390. if(this.isTeacherTaskCancelSource[i]){
  9391. this.isTeacherTaskCancelSource[i].close()
  9392. this.isTeacherTaskCancelSource[i] = null
  9393. }
  9394. }
  9395. }
  9396. if (this.cid) {
  9397. this.loading = true
  9398. functionA()
  9399. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9400. } else {
  9401. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9402. if(clickType == 1){
  9403. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  9404. }else {
  9405. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  9406. }
  9407. }
  9408. }).catch((v) => {
  9409. console.log(v);
  9410. })
  9411. setTimeout(() => {
  9412. this.setTipsIndex()
  9413. }, 500)
  9414. }
  9415. return;
  9416. }
  9417. if (this.cid && this.panTask() > 0) {
  9418. this.loading = true
  9419. functionA()
  9420. } else {
  9421. // if(ttype == 2){
  9422. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9423. // }else {
  9424. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  9425. // }
  9426. }
  9427. } else {
  9428. this.$message.error("请补充填写课程名称");
  9429. return;
  9430. }
  9431. } else if (this.steps == 3) {
  9432. if (this.taskLoading.length) {
  9433. let _pan = 1
  9434. for(var k = 0; k < this.taskLoading.length; k++){
  9435. if(this.taskLoading[k]){
  9436. this.$message({
  9437. message: `请等待任务${k+1}回答完毕后再上传`,
  9438. type: "warning"
  9439. });
  9440. _pan = 2
  9441. }
  9442. }
  9443. if(_pan == 2){
  9444. return
  9445. }
  9446. }
  9447. if(this.taskGLoading.length){
  9448. let _pan = 1
  9449. for(var k = 0; k < this.taskGLoading.length; k++){
  9450. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9451. this.$message({
  9452. message: `请等待任务${k+1}回答完毕后再保存`,
  9453. type: "warning"
  9454. });
  9455. _pan = 2
  9456. }
  9457. }
  9458. if(_pan == 2){
  9459. return
  9460. }
  9461. }
  9462. let pan2 = 1
  9463. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9464. for(var index = 0; index < taskJson.length; index++){
  9465. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9466. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9467. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9468. this.$message({
  9469. message: `请等待任务${index+1}回答完毕后再继续`,
  9470. type: "warning"
  9471. });
  9472. pan2 = 2
  9473. }
  9474. }
  9475. }
  9476. }
  9477. if(pan2 == 2){
  9478. return
  9479. }
  9480. if (this.cid == "" || this.cid == undefined) {
  9481. if (this.courseName == "") {
  9482. this.$message.error("请补充填写课程名称");
  9483. return;
  9484. } else {
  9485. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9486. this.addWork();
  9487. this.steps++;
  9488. }
  9489. } else {
  9490. if (this.courseName == "") {
  9491. this.$message.error("请补充填写课程名称");
  9492. return;
  9493. } else {
  9494. if (this.userid != this.courseUserid && this.role != "1") {
  9495. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9496. this.updateWork2();
  9497. } else {
  9498. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9499. this.updateWork();
  9500. }
  9501. this.steps++;
  9502. }
  9503. }
  9504. }
  9505. // } else {
  9506. // if (this.steps == 1) {
  9507. // if (this.courseName != "") {
  9508. // if (this.cid == "" || this.cid == undefined) {
  9509. // this.addWork();
  9510. // } else {
  9511. // if (this.userid != this.courseUserid && this.role != "1") {
  9512. // // this.updateWork2();
  9513. // } else {
  9514. // this.updateWork();
  9515. // }
  9516. // }
  9517. // this.steps++;
  9518. // } else {
  9519. // this.$message.error("请补充填写课程名称");
  9520. // return;
  9521. // }
  9522. // } else if (this.steps == 2) {
  9523. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  9524. // this.cTemplate = this.templateC.content;
  9525. // }
  9526. // this.dialogVisible2 = false;
  9527. // this.steps++;
  9528. // setTimeout(() => {
  9529. // this.checkEva(this.checkId);
  9530. // setTimeout(() => {
  9531. // this.checkEva(this.checkId);
  9532. // }, 100);
  9533. // }, 1000);
  9534. // } else if (this.steps == 3) {
  9535. // if (this.cid == "" || this.cid == undefined) {
  9536. // if (this.courseName == "") {
  9537. // this.$message.error("请补充填写课程名称");
  9538. // return;
  9539. // } else {
  9540. // this.addWork();
  9541. // this.steps++;
  9542. // }
  9543. // } else {
  9544. // if (this.courseName == "") {
  9545. // this.$message.error("请补充填写课程名称");
  9546. // return;
  9547. // } else {
  9548. // if (this.userid != this.courseUserid && this.role != "1") {
  9549. // this.updateWork2();
  9550. // } else {
  9551. // this.updateWork();
  9552. // }
  9553. // this.steps++;
  9554. // }
  9555. // }
  9556. // }
  9557. // }
  9558. this.$refs.stepBox.scrollTop = 0;
  9559. },
  9560. unitSet(i) {
  9561. if (this.unitIndex == i) {
  9562. return;
  9563. }
  9564. this.unitIndex = i;
  9565. this.isClickColor = 1;
  9566. // this.$refs.rightboxR.scrollTop = 0;
  9567. this.$refs.unitBox.scrollTop = 0;
  9568. },
  9569. panUnitJson() {
  9570. let _unitIndex = this.unitIndex;
  9571. let cPan = 1;
  9572. for (
  9573. var j = 0;
  9574. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9575. j++
  9576. ) {
  9577. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9578. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9579. j
  9580. ].proVisible2 = false;
  9581. if (
  9582. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9583. .length > 1
  9584. ) {
  9585. for (
  9586. var z = 0;
  9587. z <
  9588. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9589. .length;
  9590. z++
  9591. ) {
  9592. if (
  9593. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9594. z
  9595. ].tool.length
  9596. ) {
  9597. this.$message.error("请把工具添加完整");
  9598. cPan = 2;
  9599. break;
  9600. }
  9601. }
  9602. }
  9603. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9604. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9605. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9606. (ele) => {
  9607. return ele.value != "" || ele.detail != "" || ele.target != "";
  9608. }
  9609. );
  9610. }
  9611. }
  9612. return cPan;
  9613. },
  9614. unitOpen(i) {
  9615. if (this.unitJson[i].toolOpen) {
  9616. this.unitJson[i].toolOpen = false;
  9617. } else {
  9618. this.unitJson[i].toolOpen = true;
  9619. }
  9620. this.updateWork();
  9621. this.$forceUpdate();
  9622. },
  9623. unitSet2(i) {
  9624. if (this.panUnitJson() == 2) {
  9625. return;
  9626. }
  9627. // if(this.unitJson[i].toolOpen){
  9628. // this.unitJson[i].toolOpen = false
  9629. // this.updateWork()
  9630. // this.$forceUpdate()
  9631. // return
  9632. // }else {
  9633. this.unitJson[i].toolOpen = true;
  9634. // }
  9635. this.$forceUpdate();
  9636. if (this.unitIndex == i) {
  9637. return;
  9638. }
  9639. this.unitIndex = i;
  9640. this.isClickColor = 1;
  9641. // this.$refs.rightboxR.scrollTop = 0;
  9642. this.$refs.unitBox.scrollTop = 0;
  9643. },
  9644. updateCourseState(i) {
  9645. let params = [
  9646. {
  9647. cid: this.cid,
  9648. state: i,
  9649. },
  9650. ];
  9651. this.ajax
  9652. .post(this.$store.state.api + "updateCourseMode", params)
  9653. .then((res) => {
  9654. this.courseState = i;
  9655. })
  9656. .catch((err) => {
  9657. this.$message.error("网络不佳");
  9658. console.error(err);
  9659. });
  9660. },
  9661. addtips(){
  9662. let params = [
  9663. {
  9664. cid: this.cid,
  9665. tips: JSON.stringify(this.aiJson),
  9666. tid: this.templateid
  9667. },
  9668. ];
  9669. this.ajax
  9670. .post(this.$store.state.api + "addTips", params)
  9671. .then((res) => {
  9672. })
  9673. .catch((err) => {
  9674. this.$message.error("网络不佳");
  9675. console.error(err);
  9676. });
  9677. },
  9678. openSaveTips(){
  9679. this.dialogVisibleTips = true
  9680. },
  9681. time() {
  9682. if (!this.now) {
  9683. this.now = new Date().getTime();
  9684. return true;
  9685. } else {
  9686. let time = new Date().getTime();
  9687. if (time - this.now > 1000) {
  9688. this.now = time;
  9689. return true;
  9690. } else {
  9691. return false;
  9692. }
  9693. }
  9694. },
  9695. deleteUnit(i) {
  9696. var _this = this;
  9697. if (i == 0 && _this.unitJson.length == 1) {
  9698. _this
  9699. .$confirm("确定切换成任务模式吗?", "提示", {
  9700. confirmButtonText: "确定",
  9701. cancelButtonText: "取消",
  9702. type: "warning",
  9703. })
  9704. .then(() => {
  9705. _this.unitJson[i].dyName = "";
  9706. // _this.updateCourseState(2);
  9707. })
  9708. .catch(() => {
  9709. return;
  9710. });
  9711. } else {
  9712. _this
  9713. .$confirm("确定删除此阶段吗?", "提示", {
  9714. confirmButtonText: "确定",
  9715. cancelButtonText: "取消",
  9716. type: "warning",
  9717. })
  9718. .then(() => {
  9719. _this.isDelete = 2;
  9720. // _this.unitIndex = _this.unitIndex - 1;
  9721. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  9722. // _this.$message.success("删除成功");
  9723. })
  9724. .catch(() => {
  9725. return;
  9726. });
  9727. }
  9728. },
  9729. deleteWork(chapid) {
  9730. let params = [
  9731. {
  9732. cid: this.cid,
  9733. chapters: JSON.stringify(this.unitJson),
  9734. uid: this.userid,
  9735. chapid: chapid,
  9736. },
  9737. ];
  9738. this.ajax
  9739. .post(this.$store.state.api + "deleteWork", params)
  9740. .then((res) => {
  9741. this.$message({
  9742. message: "删除成功",
  9743. type: "success",
  9744. });
  9745. let task = JSON.parse(
  9746. JSON.stringify(
  9747. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  9748. )
  9749. );
  9750. this.unitJson.splice(this.unitIndex, 1);
  9751. if (this.unitIndex == 0) {
  9752. this.unitIndex = 0;
  9753. } else {
  9754. this.unitIndex = this.unitIndex - 1;
  9755. }
  9756. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  9757. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  9758. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  9759. ...task,
  9760. ];
  9761. }
  9762. })
  9763. .catch((err) => {
  9764. this.$message.error("网络不佳");
  9765. console.error(err);
  9766. });
  9767. },
  9768. deleteTool(itemTaskIndex, i) {
  9769. var _this = this;
  9770. if (_this.time()) {
  9771. _this
  9772. .$confirm("确定删除此工具吗?", "提示", {
  9773. confirmButtonText: "确定",
  9774. cancelButtonText: "取消",
  9775. type: "warning",
  9776. })
  9777. .then(() => {
  9778. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9779. itemTaskIndex
  9780. ].toolChoose.splice(i, 1);
  9781. _this.$message.success("删除成功");
  9782. })
  9783. .catch(() => {
  9784. return;
  9785. });
  9786. }
  9787. },
  9788. deleteSentence(i) {
  9789. var _this = this;
  9790. _this
  9791. .$confirm("确定删除此题目吗?", "提示", {
  9792. confirmButtonText: "确定",
  9793. cancelButtonText: "取消",
  9794. type: "warning",
  9795. })
  9796. .then(() => {
  9797. _this.sentenceList.splice(i, 1);
  9798. _this.$message.success("删除成功");
  9799. })
  9800. .catch(() => {
  9801. return;
  9802. });
  9803. },
  9804. deleteS(s, i, j) {
  9805. this.sentenceList[i].addSentence.splice(j, 1);
  9806. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9807. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9808. this.sentenceList[i].rightAnswer.splice(a, 1);
  9809. }
  9810. },
  9811. openT() {
  9812. top.postMessage({ tools: "25" }, "*");
  9813. },
  9814. deleteTask(i) {
  9815. var _this = this;
  9816. if (_this.time()) {
  9817. _this
  9818. .$confirm(
  9819. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9820. 1 ==
  9821. i
  9822. ? "确定删除此任务吗?"
  9823. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  9824. "提示",
  9825. {
  9826. confirmButtonText: "确定",
  9827. cancelButtonText: "取消",
  9828. type: "warning",
  9829. }
  9830. )
  9831. .then(() => {
  9832. if (i == 0 && _this.courseState == 4) {
  9833. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9834. i + 1
  9835. ].chapterData = JSON.parse(
  9836. JSON.stringify(
  9837. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9838. .chapterData
  9839. )
  9840. );
  9841. }
  9842. _this.$forceUpdate();
  9843. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9844. i,
  9845. 1
  9846. );
  9847. _this.$message.success("删除成功");
  9848. })
  9849. .catch(() => {
  9850. return;
  9851. });
  9852. }
  9853. },
  9854. deleteTask2(i) {
  9855. var _this = this;
  9856. if (_this.time()) {
  9857. _this
  9858. .$confirm(
  9859. "确定删除此任务吗?",
  9860. "提示",
  9861. {
  9862. confirmButtonText: "确定",
  9863. cancelButtonText: "取消",
  9864. type: "warning",
  9865. }
  9866. )
  9867. .then(() => {
  9868. if (i == 0 && _this.courseState == 4) {
  9869. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9870. i + 1
  9871. ].chapterData = JSON.parse(
  9872. JSON.stringify(
  9873. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9874. .chapterData
  9875. )
  9876. );
  9877. }
  9878. _this.$forceUpdate();
  9879. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9880. i,
  9881. 1
  9882. );
  9883. _this.$message.success("删除成功");
  9884. })
  9885. .catch(() => {
  9886. return;
  9887. });
  9888. }
  9889. },
  9890. handlePictureCardPreview(file) {
  9891. this.dialogImageUrl = file.url;
  9892. },
  9893. clean(i, c) {
  9894. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  9895. },
  9896. handle_remove1(file, fileList, type) {
  9897. var _tmp = this.cover;
  9898. // for (var i = 0, len = _tmp.length; i < len; i++) {
  9899. // if (_tmp[i].uid == file.uid) {
  9900. // _tmp.splice(i, 1);
  9901. // break;
  9902. // }
  9903. // this.cover = _tmp;
  9904. // }
  9905. this.cover = [];
  9906. this.noneBtnImg = this.cover.length >= 1;
  9907. this.isSysPic = false;
  9908. this.isSysPic2 = false;
  9909. this.$forceUpdate();
  9910. },
  9911. addImg(e) {
  9912. var el = e.currentTarget;
  9913. el.getElementsByTagName("input")[0].click();
  9914. e.target.value = "";
  9915. },
  9916. addChaptersTools(i) {
  9917. this.chapTools = [
  9918. {
  9919. tools: [],
  9920. toolDetail: "",
  9921. },
  9922. ];
  9923. this.chapCount = i;
  9924. this.dialogVisible4 = true;
  9925. },
  9926. isNoFinsh() {
  9927. this.$message.warning("功能正在开发中");
  9928. },
  9929. addAttText(i) {
  9930. this.AttText = {
  9931. title: "",
  9932. text: "",
  9933. };
  9934. this.taskCount = i;
  9935. this.AttTextType = 0;
  9936. this.$forceUpdate();
  9937. this.dialogVisible6 = true;
  9938. setTimeout(() => {
  9939. this.$refs["fuInput"].focus();
  9940. }, 100);
  9941. },
  9942. openLine(i) {
  9943. this.line = "";
  9944. this.lineCount = i;
  9945. this.lineType = 0;
  9946. this.$forceUpdate();
  9947. this.dialogVisible7 = true;
  9948. },
  9949. pasteLine(i) {
  9950. navigator.clipboard
  9951. .readText()
  9952. .then((v) => {
  9953. console.log("获取剪贴板成功:", v);
  9954. const html = v;
  9955. const regex = /src="(.*?)"/g;
  9956. const match = regex.exec(html);
  9957. if (match && match[1]) {
  9958. console.log(match[1]);
  9959. this.$message.success("粘贴成功");
  9960. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9961. i
  9962. ].chapterData.unshift({
  9963. name: "链接",
  9964. title: "嵌入代码",
  9965. url: match[1],
  9966. type: 8,
  9967. });
  9968. } else {
  9969. // console.log("未找到包含 src 属性的 iframe");
  9970. this.$message.error(
  9971. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  9972. );
  9973. }
  9974. })
  9975. .catch((v) => {
  9976. console.log("获取剪贴板失败: ", v);
  9977. });
  9978. },
  9979. openSource(i) {
  9980. this.lineCount = i;
  9981. this.sourceData = {};
  9982. this.dialogVisibleSource = true;
  9983. this.updateSourcePan = false;
  9984. },
  9985. openAiCreate(i){
  9986. // this.lineCount = i;
  9987. // this.dialogVisibleAiCreate = true;
  9988. if(!this.pptCount.includes(i)){
  9989. this.pptCount.push(i)
  9990. this.dialogVisibleAiCreate2.push(i);
  9991. }else{
  9992. this.$refs['ppt'+i][0].tanDialog = false
  9993. this.$refs['ppt'+i][0].dialogVisibleAiCreate2 = true
  9994. }
  9995. this.pptBoxDialog = true
  9996. },
  9997. createAiPpt(json, i){
  9998. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9999. // this.dialogVisibleAiCreate = false;
  10000. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10001. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10002. },
  10003. closeAiPpt(i){
  10004. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  10005. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  10006. },
  10007. openAiCreateVideo(i){
  10008. this.lineCount = i;
  10009. this.dialogVisibleAiCreateVideo = true;
  10010. },
  10011. createAiVideo(json){
  10012. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  10013. // this.dialogVisibleAiCreateVideo = false;
  10014. },
  10015. async createTeacherAn(index, type){
  10016. // this.lineCount = index;
  10017. let md = new MarkdownIt();
  10018. if(this.courseState == 4){
  10019. this.anLoading[0] = true
  10020. // if(index == 0 || index){
  10021. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10022. // let name = _task.task+'-教案'
  10023. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10024. // await this.generate(name, _html, 0)
  10025. // }else {
  10026. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10027. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10028. let name = `任务${i+1}`+_task.task+'-教案'
  10029. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10030. await this.generate(name, _html, 0)
  10031. }
  10032. // }
  10033. }else if(this.courseState == 5){
  10034. if(type != 2){
  10035. this.anLoading[index] = true
  10036. }
  10037. if(index == 0 || index){
  10038. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  10039. let name = `任务${index+1}`+_task.task+'-教案'
  10040. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10041. await this.generate(name, _html, index,"", type)
  10042. }else {
  10043. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  10044. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  10045. let name = `任务${i+1}`+_task.task+'-教案'
  10046. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  10047. await this.generate(name, _html, i)
  10048. }
  10049. }
  10050. }
  10051. },
  10052. async createTaskAn(index){
  10053. // this.lineCount = index;
  10054. if(this.taskAnLoading[index]){
  10055. // this.$message.error('请等待当前学历案生成完成')
  10056. this.cancelAjax('taskAn', index)
  10057. return
  10058. }
  10059. this.taskAnLoading[index] = true
  10060. this.$forceUpdate()
  10061. let _this = this
  10062. let md = new MarkdownIt();
  10063. let messages = ""
  10064. messages = `NOTICE
  10065. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  10066. Language: ${this.getLang()}
  10067. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  10068. ## 任务教案
  10069. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  10070. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  10071. let parm = {
  10072. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  10073. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  10074. session_name: uuidv4(),
  10075. userId: this.userid,
  10076. file_ids: [],
  10077. model: 'gpt-4o-2024-11-20',
  10078. temperature: this.mode == 3 ? 0.5 : 0.1,
  10079. }
  10080. this.ajax
  10081. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  10082. .then(async (response) => {
  10083. console.log(response);
  10084. let data = response.data.FunctionResponse
  10085. if (data.message) {
  10086. console.log(data.message);
  10087. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  10088. let name = _task.task+'-学历案'
  10089. 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) => {
  10090. // 去除内容为空的<li>标签
  10091. if (!content.trim()) {
  10092. return ''; // 如果<li>标签内容为空,删除该标签
  10093. }
  10094. // 去掉<li>中的标签,保留纯文本内容
  10095. return `<li>${content.replace(/<[^>]+>/g, '')}</li>`;
  10096. }); // 去掉 <ol> 和 </ol> 标签
  10097. console.log(_html)
  10098. await _this.generate(name, _html, index, ()=>{
  10099. _this.taskAnLoading[index] = false
  10100. _this.taskAnCancelToken[index] = null
  10101. })
  10102. }else{
  10103. _this.taskAnLoading[index] = false
  10104. _this.taskAnCancelToken[index] = null
  10105. }
  10106. }).catch((error) => {
  10107. console.log(error);
  10108. _this.taskAnLoading[index] = false
  10109. _this.taskAnCancelToken[index] = null
  10110. });
  10111. },
  10112. async generate(a, html, index, callback, type) {
  10113. // <html lang="en">
  10114. // 将html文件中需要用到的数据挂载到store上
  10115. const content = `<!DOCTYPE html>
  10116. <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'>
  10117. <head>
  10118. <!--[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]-->
  10119. <meta charset="UTF-8">
  10120. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10121. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10122. <title>${a}</title>
  10123. <style>
  10124. table {
  10125. border-collapse: collapse; /* 折叠边框 */
  10126. width: 100%;
  10127. }
  10128. th, td {
  10129. border: 1px solid black; /* 线条样式 */
  10130. padding: 8px;
  10131. text-align: left;
  10132. }
  10133. </style>
  10134. </head>
  10135. <body>
  10136. ${html}
  10137. </body>
  10138. </html>`;
  10139. // debugger
  10140. const blob = htmlDocx.asBlob(content)
  10141. // debugger
  10142. let dname = a + ".docx";
  10143. // 创建文件流
  10144. // 创建bolb实例时,内容一定要放在[]中
  10145. // const blob = new Blob([content], {
  10146. // type: "text/plain;charset='utf-8'",
  10147. // });
  10148. // const file = new File([blob], dname, { type: 'application/msword' });
  10149. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10150. // let params = convertApi.createParams()
  10151. // params.add('file', file)
  10152. // try {
  10153. // let result = await convertApi.convert('docx', 'docx', params)
  10154. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10155. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10156. // });
  10157. // await this.beforeUploadHtml(file, index, callback)
  10158. // } catch (error) {
  10159. // console.log('=================','报错')
  10160. // await this.beforeUploadHtml(file, index, callback)
  10161. // return
  10162. // }
  10163. await this.beforeUploadHtml(file, index, callback, type)
  10164. },
  10165. async generateExport(a, html, index) {
  10166. // <html lang="en">
  10167. // 将html文件中需要用到的数据挂载到store上
  10168. const content = `<!DOCTYPE html>
  10169. <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'>
  10170. <head>
  10171. <!--[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]-->
  10172. <meta charset="UTF-8">
  10173. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10174. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10175. <title>${a}</title>
  10176. <style>
  10177. table {
  10178. border-collapse: collapse; /* 折叠边框 */
  10179. width: 100%;
  10180. }
  10181. th, td {
  10182. border: 1px solid black; /* 线条样式 */
  10183. padding: 8px;
  10184. text-align: left;
  10185. }
  10186. </style>
  10187. </head>
  10188. <body>
  10189. ${html}
  10190. </body>
  10191. </html>`;
  10192. // debugger
  10193. const blob = htmlDocx.asBlob(content)
  10194. // debugger
  10195. const dname = `${a}.docx`;
  10196. // 创建文件流
  10197. // const file = new File([blob], dname, { type: 'application/msword' });
  10198. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10199. // let params = convertApi.createParams()
  10200. // params.add('file', file)
  10201. // try {
  10202. // let result = await convertApi.convert('docx', 'docx', params)
  10203. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10204. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10205. // });
  10206. // // 执行下载
  10207. // saveAs(file, dname);
  10208. // } catch (error) {
  10209. // saveAs(file, dname);
  10210. // // this.$message.error('导出失败')
  10211. // }
  10212. saveAs(file, dname);
  10213. // return file
  10214. },
  10215. async generateExport2(a, html, index) {
  10216. return new Promise(async (resolve) => {
  10217. // <html lang="en">
  10218. // 将html文件中需要用到的数据挂载到store上
  10219. const content = `<!DOCTYPE html>
  10220. <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'>
  10221. <head>
  10222. <!--[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]-->
  10223. <meta charset="UTF-8">
  10224. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10225. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10226. <title>${a}</title>
  10227. <style>
  10228. table {
  10229. border-collapse: collapse; /* 折叠边框 */
  10230. width: 100%;
  10231. }
  10232. th, td {
  10233. border: 1px solid black; /* 线条样式 */
  10234. padding: 8px;
  10235. text-align: left;
  10236. }
  10237. </style>
  10238. </head>
  10239. <body>
  10240. ${html}
  10241. </body>
  10242. </html>`;
  10243. // debugger
  10244. const blob = htmlDocx.asBlob(content)
  10245. // debugger
  10246. const dname = `${a}`;
  10247. // 创建文件流
  10248. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10249. let params = convertApi.createParams()
  10250. params.add('file', file)
  10251. resolve(file); // 通过 Promise 返回 File 对象
  10252. // try {
  10253. // let result = await convertApi.convert('docx', 'docx', params)
  10254. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10255. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10256. // });
  10257. // resolve(file); // 通过 Promise 返回 File 对象
  10258. // } catch (error) {
  10259. // resolve(''); // 通过 Promise 返回 File 对象
  10260. // }
  10261. });
  10262. },
  10263. async addChatAppendixFile(name, html){
  10264. await this.generate(name, html, 0,"", 3)
  10265. },
  10266. beforeUploadHtml(event, index, callback, type) {
  10267. var file = event;
  10268. var credentials = {
  10269. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10270. secretAccessKey: "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",
  10271. }; //秘钥形式的登录上传
  10272. window.AWS.config.update(credentials);
  10273. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10274. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10275. var _this = this;
  10276. if (file) {
  10277. var params = {
  10278. Key:
  10279. file.name.split(".")[0] +
  10280. new Date().getTime() +
  10281. "." +
  10282. file.name.split(".")[file.name.split(".").length - 1],
  10283. ContentType: file.type,
  10284. Body: file,
  10285. "Access-Control-Allow-Credentials": "*",
  10286. ACL: "public-read",
  10287. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10288. var options = {
  10289. partSize: 2048 * 1024 * 1024,
  10290. queueSize: 2,
  10291. leavePartsOnError: true,
  10292. };
  10293. bucket
  10294. .upload(params, options)
  10295. .on("httpUploadProgress", function (evt) {
  10296. //这里可以写进度条
  10297. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10298. })
  10299. .send(function (err, data) {
  10300. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  10301. _this.anLoading[0] = false
  10302. }
  10303. if(_this.courseState == 5){
  10304. _this.anLoading[index] = false
  10305. }
  10306. callback ? callback() : ''
  10307. _this.$forceUpdate();
  10308. if (err) {
  10309. _this.$message.error("上传失败");
  10310. } else {
  10311. let _index = 0
  10312. // if(_this.lineCount == 0 || _this.lineCount){
  10313. // _index = _this.lineCount
  10314. // }else {
  10315. _index = index
  10316. // }
  10317. if(type != 2 && type != 3){
  10318. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  10319. name: file.name,
  10320. url: data.Location,
  10321. type: 3,
  10322. })
  10323. }else{
  10324. let fileName = file.name;
  10325. let baseName = fileName.split('.').slice(0, -1).join('.'); // 获取不带扩展名的文件名
  10326. let extension = fileName.split('.').pop(); // 获取文件扩展名
  10327. let count = 1;
  10328. // 检查文件名是否已存在
  10329. while (_this.appendixFile.some(item => item.name === fileName)) {
  10330. fileName = `${baseName} (${count}).${extension}`; // 修改文件名
  10331. count++;
  10332. }
  10333. if(type == 3){
  10334. _this.$message.success('保存到附件成功')
  10335. _this.appendixFile.unshift({
  10336. name: fileName,
  10337. url: data.Location,
  10338. type: 3,
  10339. task: 'dialog'
  10340. })
  10341. }else{
  10342. _this.appendixFile.unshift({
  10343. name: fileName,
  10344. url: data.Location,
  10345. type: 3,
  10346. })
  10347. }
  10348. }
  10349. console.log(data.Location);
  10350. }
  10351. });
  10352. }
  10353. },
  10354. async generate2(a, html, index, callback) {
  10355. // 将html文件中需要用到的数据挂载到store上
  10356. const content = `<!DOCTYPE html>
  10357. <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'>
  10358. <head>
  10359. <!--[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]-->
  10360. <meta charset="UTF-8">
  10361. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10362. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10363. <title>${a}</title>
  10364. <style>
  10365. table {
  10366. border-collapse: collapse; /* 折叠边框 */
  10367. width: 100%;
  10368. }
  10369. th, td {
  10370. border: 1px solid black; /* 线条样式 */
  10371. padding: 8px;
  10372. text-align: left;
  10373. }
  10374. </style>
  10375. </head>
  10376. <body>
  10377. ${html}
  10378. </body>
  10379. </html>`;
  10380. const blob = htmlDocx.asBlob(content)
  10381. // debugger
  10382. let dname = a + ".docx";
  10383. // 创建文件流
  10384. // 创建bolb实例时,内容一定要放在[]中
  10385. // const blob = new Blob([content], {
  10386. // type: "text/plain;charset='utf-8'",
  10387. // });
  10388. // const file = new File([blob], dname, { type: 'application/msword' });
  10389. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  10390. // let params = convertApi.createParams()
  10391. // params.add('file', file)
  10392. // try {
  10393. // let result = await convertApi.convert('docx', 'docx', params)
  10394. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10395. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10396. // });
  10397. // await this.beforeUploadHtml2(file, index, callback)
  10398. // } catch (error) {
  10399. // await this.beforeUploadHtml2(file, index, callback)
  10400. // return;
  10401. // }
  10402. await this.beforeUploadHtml2(file, index, callback)
  10403. },
  10404. beforeUploadHtml2(event, index, callback) {
  10405. var file = event;
  10406. var credentials = {
  10407. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10408. secretAccessKey: "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",
  10409. }; //秘钥形式的登录上传
  10410. window.AWS.config.update(credentials);
  10411. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10412. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10413. var _this = this;
  10414. if (file) {
  10415. var params = {
  10416. Key:
  10417. file.name.split(".")[0] +
  10418. new Date().getTime() +
  10419. "." +
  10420. file.name.split(".")[file.name.split(".").length - 1],
  10421. ContentType: file.type,
  10422. Body: file,
  10423. "Access-Control-Allow-Credentials": "*",
  10424. ACL: "public-read",
  10425. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10426. var options = {
  10427. partSize: 2048 * 1024 * 1024,
  10428. queueSize: 2,
  10429. leavePartsOnError: true,
  10430. };
  10431. bucket
  10432. .upload(params, options)
  10433. .on("httpUploadProgress", function (evt) {
  10434. //这里可以写进度条
  10435. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10436. })
  10437. .send(async function (err, data) {
  10438. if(_this.courseState == 5){
  10439. _this.loading = false
  10440. }
  10441. if (err) {
  10442. callback ? callback() : ''
  10443. _this.$message.error("上传失败");
  10444. } else {
  10445. let fileid = await _this.createFileid(data.Location)
  10446. // _this.cankaoInfoData.push({
  10447. //                   name: file.name,
  10448. //                   url: data.Location,
  10449. //                   type: 3,
  10450. // fileid: fileid,
  10451. //   })
  10452. _this.infoData2.push({
  10453.                   name: file.name,
  10454.                   url: data.Location,
  10455.                   type: 3,
  10456. fileid: fileid == 1 ? '' : fileid,
  10457.   })
  10458. _this.infoData.push({
  10459. name: file.name,
  10460. url: data.Location,
  10461. type: 3,
  10462. fileid: fileid == 1 ? '' : fileid,
  10463. });
  10464. console.log(data.Location);
  10465. callback ? callback() : ''
  10466. }
  10467. });
  10468. }
  10469. },
  10470. addSource() {
  10471. if (!Object.keys(this.sourceData).length) {
  10472. this.$message.error("请选择要上传的资源");
  10473. return;
  10474. }
  10475. let keys = Object.keys(this.sourceData);
  10476. for (var i = 0; i < keys.length; i++) {
  10477. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10478. this.lineCount
  10479. ].chapterData.unshift({
  10480. name: "链接",
  10481. title: this.sourceData[keys[i]].name,
  10482. url: this.sourceData[keys[i]].url,
  10483. type: 14,
  10484. id: keys[i],
  10485. });
  10486. }
  10487. this.$forceUpdate();
  10488. this.dialogVisibleSource = false;
  10489. },
  10490. updateSource() {
  10491. if (!Object.keys(this.sourceData).length) {
  10492. this.$message.error("请选择要上传的资源");
  10493. return;
  10494. }
  10495. let keys = Object.keys(this.sourceData);
  10496. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10497. this.taskCount
  10498. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  10499. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10500. this.taskCount
  10501. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  10502. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10503. this.taskCount
  10504. ].chapterData[this.lineCount].id = keys[0];
  10505. this.updateSourcePan = false;
  10506. this.$forceUpdate();
  10507. this.dialogVisibleSource = false;
  10508. },
  10509. deleteM(i, j) {
  10510. this.testJson.testJson[i].timuList.splice(j, 1);
  10511. },
  10512. beforeUploadTiMu(event, i) {
  10513. const loading = this.openLoading();
  10514. var file = event.target.files[0];
  10515. var credentials = {
  10516. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10517. secretAccessKey: "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",
  10518. }; //秘钥形式的登录上传
  10519. window.AWS.config.update(credentials);
  10520. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10521. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10522. var _this = this;
  10523. if (file) {
  10524. var params = {
  10525. Key:
  10526. file.name.split(".")[0] +
  10527. new Date().getTime() +
  10528. "." +
  10529. file.name.split(".")[file.name.split(".").length - 1],
  10530. ContentType: file.type,
  10531. Body: file,
  10532. "Access-Control-Allow-Credentials": "*",
  10533. ACL: "public-read",
  10534. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10535. var options = {
  10536. partSize: 2048 * 1024 * 1024,
  10537. queueSize: 2,
  10538. leavePartsOnError: true,
  10539. };
  10540. bucket
  10541. .upload(params, options)
  10542. .on("httpUploadProgress", function (evt) {
  10543. //这里可以写进度条
  10544. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10545. })
  10546. .send(function (err, data) {
  10547. loading.close();
  10548. if (err) {
  10549. _this.$message.error("上传失败");
  10550. } else {
  10551. if (_this.testJson.testJson[i].timuList) {
  10552. _this.testJson.testJson[i].timuList.push({
  10553. src: data.Location,
  10554. });
  10555. } else {
  10556. _this.testJson.testJson[i].timuList = [];
  10557. _this.testJson.testJson[i].timuList.push({
  10558. src: data.Location,
  10559. });
  10560. }
  10561. _this.imgChange3(i);
  10562. _this.$forceUpdate();
  10563. }
  10564. });
  10565. }
  10566. },
  10567. beforeUploadTi(event, i, j) {
  10568. const loading = this.openLoading();
  10569. var file = event.target.files[0];
  10570. var credentials = {
  10571. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10572. secretAccessKey: "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",
  10573. }; //秘钥形式的登录上传
  10574. window.AWS.config.update(credentials);
  10575. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10576. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10577. var _this = this;
  10578. if (file) {
  10579. var params = {
  10580. Key:
  10581. file.name.split(".")[0] +
  10582. new Date().getTime() +
  10583. "." +
  10584. file.name.split(".")[file.name.split(".").length - 1],
  10585. ContentType: file.type,
  10586. Body: file,
  10587. "Access-Control-Allow-Credentials": "*",
  10588. ACL: "public-read",
  10589. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10590. var options = {
  10591. partSize: 2048 * 1024 * 1024,
  10592. queueSize: 2,
  10593. leavePartsOnError: true,
  10594. };
  10595. bucket
  10596. .upload(params, options)
  10597. .on("httpUploadProgress", function (evt) {
  10598. //这里可以写进度条
  10599. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10600. })
  10601. .send(function (err, data) {
  10602. loading.close();
  10603. if (err) {
  10604. _this.$message.error("上传失败");
  10605. } else {
  10606. _this.testJson.testJson[i].checkList[j] = {};
  10607. _this.testJson.testJson[i].checkList[j].src = data.Location;
  10608. _this.testJson.testJson[i].checkList[j].imgType = 1;
  10609. _this.imgChange2(i, j);
  10610. _this.$forceUpdate();
  10611. }
  10612. });
  10613. }
  10614. },
  10615. beforeUpload1(event, type) {
  10616. // const loading = this.openLoading();
  10617. var file = event.target.files[0];
  10618. var credentials = {
  10619. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10620. secretAccessKey: "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",
  10621. }; //秘钥形式的登录上传
  10622. window.AWS.config.update(credentials);
  10623. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10624. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10625. var _this = this;
  10626. if (file) {
  10627. var params = {
  10628. Key:
  10629. file.name.split(".")[0] +
  10630. new Date().getTime() +
  10631. "." +
  10632. file.name.split(".")[file.name.split(".").length - 1],
  10633. ContentType: file.type,
  10634. Body: file,
  10635. "Access-Control-Allow-Credentials": "*",
  10636. ACL: "public-read",
  10637. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10638. var options = {
  10639. partSize: 2048 * 1024 * 1024,
  10640. queueSize: 2,
  10641. leavePartsOnError: true,
  10642. };
  10643. bucket
  10644. .upload(params, options)
  10645. .on("httpUploadProgress", function (evt) {
  10646. //这里可以写进度条
  10647. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10648. })
  10649. .send(function (err, data) {
  10650. // loading.close();
  10651. if (err) {
  10652. // var a = _this.$refs.upload1.uploadFiles;
  10653. // a.splice(a.length - 1, a.length);
  10654. _this.$message.error("上传失败");
  10655. } else {
  10656. // _this.cover.push({
  10657. // name: file.name,
  10658. // url: data.Location,
  10659. // uid: file.uid,
  10660. // });
  10661. _this.cover = [
  10662. {
  10663. name: file.name,
  10664. url: data.Location,
  10665. uid: file.uid,
  10666. },
  10667. ];
  10668. _this.imgChange1(null, null, 1, null);
  10669. _this.choosePicVisible = false;
  10670. console.log(data.Location);
  10671. }
  10672. });
  10673. }
  10674. },
  10675. beforeUploadSelect(event, type) {
  10676. // const loading = this.openLoading();
  10677. var file = event.target.files[0];
  10678. var credentials = {
  10679. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10680. secretAccessKey: "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",
  10681. }; //秘钥形式的登录上传
  10682. window.AWS.config.update(credentials);
  10683. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10684. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10685. var _this = this;
  10686. if (file) {
  10687. var params = {
  10688. Key:
  10689. file.name.split(".")[0] +
  10690. new Date().getTime() +
  10691. "." +
  10692. file.name.split(".")[file.name.split(".").length - 1],
  10693. ContentType: file.type,
  10694. Body: file,
  10695. "Access-Control-Allow-Credentials": "*",
  10696. ACL: "public-read",
  10697. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10698. var options = {
  10699. partSize: 2048 * 1024 * 1024,
  10700. queueSize: 2,
  10701. leavePartsOnError: true,
  10702. };
  10703. bucket
  10704. .upload(params, options)
  10705. .on("httpUploadProgress", function (evt) {
  10706. //这里可以写进度条
  10707. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10708. })
  10709. .send(function (err, data) {
  10710. // loading.close();
  10711. if (err) {
  10712. _this.$message.error("上传失败");
  10713. } else {
  10714. _this.selectJson.url = data.Location;
  10715. console.log(data.Location);
  10716. }
  10717. });
  10718. }
  10719. },
  10720. chooseSysPic(p) {
  10721. this.cover = [];
  10722. setTimeout(() => {
  10723. this.cover[0] = {
  10724. name: "系统图片.png",
  10725. url: p,
  10726. };
  10727. this.imgChange1(null, null, 1, null);
  10728. this.$forceUpdate();
  10729. }, 0);
  10730. this.isSysPic = true;
  10731. this.isSysPic2 = false;
  10732. this.sysPicVisible = false;
  10733. this.$forceUpdate();
  10734. },
  10735. chooseSysPic2(p) {
  10736. this.cover = [];
  10737. setTimeout(() => {
  10738. this.cover[0] = {
  10739. name: "网络图片.png",
  10740. url: p,
  10741. };
  10742. this.imgChange1(null, null, 1, null);
  10743. this.$forceUpdate();
  10744. }, 0);
  10745. this.isSysPic2 = true;
  10746. this.isSysPic = false;
  10747. this.sysPicVisible2 = false;
  10748. this.$forceUpdate();
  10749. },
  10750. beforeUpload(data) {
  10751. this.$refs.upload1.uploadFiles;
  10752. this.uploadLoading1 = true;
  10753. var file = data.file;
  10754. var credentials = {
  10755. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10756. secretAccessKey: "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",
  10757. }; //秘钥形式的登录上传
  10758. window.AWS.config.update(credentials);
  10759. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10760. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10761. var _this = this;
  10762. if (file) {
  10763. var params = {
  10764. Key:
  10765. file.name.split(".")[0] +
  10766. new Date().getTime() +
  10767. "." +
  10768. file.name.split(".")[file.name.split(".").length - 1],
  10769. ContentType: file.type,
  10770. Body: file,
  10771. "Access-Control-Allow-Credentials": "*",
  10772. ACL: "public-read",
  10773. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10774. var options = {
  10775. partSize: 2048 * 1024 * 1024,
  10776. queueSize: 2,
  10777. leavePartsOnError: true,
  10778. };
  10779. bucket
  10780. .upload(params, options)
  10781. .on("httpUploadProgress", function (evt) {
  10782. //这里可以写进度条
  10783. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10784. })
  10785. .send(function (err, data) {
  10786. _this.uploadLoading1 = false;
  10787. if (err) {
  10788. // var a = _this.$refs.upload1.uploadFiles;
  10789. // a.splice(a.length - 1, a.length);
  10790. _this.$message.error("上传失败");
  10791. } else {
  10792. //上传成功处理
  10793. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  10794. name: file.name,
  10795. url: data.Location,
  10796. uid: file.uid,
  10797. });
  10798. _this.imgChange();
  10799. console.log(data.Location);
  10800. }
  10801. });
  10802. }
  10803. },
  10804. onExceed() {
  10805. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  10806. },
  10807. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  10808. let file = "";
  10809. let cfindex2 = 0;
  10810. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10811. // var file = event.target.files[0];
  10812. file = event.target.files[cfindex];
  10813. let fileName = file.name
  10814. let fileUid = file.uid
  10815. // const loading = this.openLoading();
  10816. // var file = event.target.files[0];
  10817. var credentials = {
  10818. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10819. secretAccessKey: "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",
  10820. }; //秘钥形式的登录上传
  10821. window.AWS.config.update(credentials);
  10822. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10823. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10824. var _this = this;
  10825. if (type == 3) {
  10826. var b = [
  10827. "DOC",
  10828. "DOCX",
  10829. "DOCM",
  10830. "DOTM",
  10831. "DOTX",
  10832. "PPTX",
  10833. "PPSX",
  10834. "PPT",
  10835. "PPS",
  10836. "PPTM",
  10837. "POTM",
  10838. "PPAM",
  10839. "POTX",
  10840. "PPSM",
  10841. ];
  10842. if (
  10843. b.indexOf(
  10844. file.name
  10845. .split(".")
  10846. [file.name.split(".").length - 1].toLocaleUpperCase()
  10847. ) != -1
  10848. ) {
  10849. if (file.size / 1024 / 1024 > 80) {
  10850. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10851. this.inputShow = true;
  10852. // var a = _this.$refs.upload1.uploadFiles;
  10853. // a.splice(a.length - 1, a.length);
  10854. // loading.close();
  10855. return;
  10856. }
  10857. } else if (
  10858. file.name
  10859. .split(".")
  10860. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10861. ) {
  10862. if (file.size / 1024 / 1024 > 80) {
  10863. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10864. this.inputShow = true;
  10865. // var a = _this.$refs.upload1.uploadFiles;
  10866. // a.splice(a.length - 1, a.length);
  10867. // loading.close();
  10868. return;
  10869. }
  10870. }
  10871. }
  10872. this.inputShow = false;
  10873. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10874. // itemTaskIndex
  10875. // ].progress = 0;
  10876. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10877. itemTaskIndex
  10878. ].proVisible = true;
  10879. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10880. itemTaskIndex
  10881. ].isFinishSize = 0;
  10882. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10883. itemTaskIndex
  10884. ].isAllSize = event.target.files.length;
  10885. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10886. // itemTaskIndex
  10887. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10888. _this.$forceUpdate();
  10889. if (file) {
  10890. var params = {
  10891. Key:
  10892. file.name.split(".")[0] +
  10893. new Date().getTime() +
  10894. "." +
  10895. file.name.split(".")[file.name.split(".").length - 1],
  10896. ContentType: file.type,
  10897. Body: file,
  10898. "Access-Control-Allow-Credentials": "*",
  10899. ACL: "public-read",
  10900. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10901. var options = {
  10902. partSize: 2048 * 1024 * 1024,
  10903. queueSize: 2,
  10904. leavePartsOnError: true,
  10905. };
  10906. bucket
  10907. .upload(params, options)
  10908. .on("httpUploadProgress", function (evt) {
  10909. //这里可以写进度条
  10910. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10911. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10912. // itemTaskIndex
  10913. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  10914. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10915. // itemTaskIndex
  10916. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10917. // _this.$forceUpdate();
  10918. })
  10919. .send(function (err, data) {
  10920. cfindex2++
  10921. // loading.close();
  10922. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10923. // itemTaskIndex
  10924. // ].progress = 100;
  10925. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10926. itemTaskIndex
  10927. ].isFinishSize = cfindex2
  10928. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10929. // itemTaskIndex
  10930. // ].isAllSize;
  10931. _this.$forceUpdate();
  10932. setTimeout(() => {
  10933. if (
  10934. cfindex2 == event.target.files.length ||
  10935. cfindex2 > event.target.files.length
  10936. ) {
  10937. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10938. itemTaskIndex
  10939. ].proVisible = false;
  10940. }
  10941. _this.$forceUpdate();
  10942. }, 1000);
  10943. _this.inputShow = true;
  10944. if (err) {
  10945. // var a = _this.$refs.upload1.uploadFiles;
  10946. // a.splice(a.length - 1, a.length);
  10947. _this.$message.error("上传失败");
  10948. } else {
  10949. if (type == 13) {
  10950. let _type = 2;
  10951. var imgA = [
  10952. "png",
  10953. "jpg",
  10954. "jpeg",
  10955. "bmp",
  10956. "gif",
  10957. "webp",
  10958. "psd",
  10959. "svg",
  10960. "tiff",
  10961. ];
  10962. var fileA = [
  10963. "PDF",
  10964. "DOC",
  10965. "DOCX",
  10966. "DOCM",
  10967. "DOTM",
  10968. "DOTX",
  10969. "PPTX",
  10970. "PPSX",
  10971. "PPT",
  10972. "PPS",
  10973. "PPTM",
  10974. "POTM",
  10975. "PPAM",
  10976. "POTX",
  10977. "PPSM",
  10978. "XLSX",
  10979. "XLS",
  10980. ];
  10981. var videoA = [
  10982. "AVI",
  10983. "NAVI",
  10984. "MPEG",
  10985. "ASF",
  10986. "MOV",
  10987. "WMV",
  10988. "3GP",
  10989. "RM",
  10990. "RMVB",
  10991. "FLV",
  10992. "F4V",
  10993. "H.264",
  10994. "H.265",
  10995. "REAL VIDEO",
  10996. "MKV",
  10997. "WebM",
  10998. "HDDVD",
  10999. "MP4",
  11000. "MPG",
  11001. "M4V",
  11002. "MGV",
  11003. "OGV",
  11004. "QTM",
  11005. "STR",
  11006. "AMC",
  11007. "DVX",
  11008. "EVO",
  11009. "DAT",
  11010. "OGG",
  11011. "OGM",
  11012. ];
  11013. if (
  11014. fileA.indexOf(
  11015. data.Location.split(".")[
  11016. data.Location.split(".").length - 1
  11017. ].toLocaleUpperCase()
  11018. ) != -1
  11019. ) {
  11020. _type = 3;
  11021. } else if (
  11022. videoA.indexOf(
  11023. data.Location.split(".")[
  11024. data.Location.split(".").length - 1
  11025. ].toLocaleUpperCase()
  11026. ) != -1
  11027. ) {
  11028. _type = 2;
  11029. } else if (
  11030. imgA.indexOf(
  11031. data.Location.split(".")[
  11032. data.Location.split(".").length - 1
  11033. ].toLocaleLowerCase()
  11034. ) != -1
  11035. ) {
  11036. _type = 13;
  11037. } else {
  11038. _type = 12;
  11039. }
  11040. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11041. itemTaskIndex
  11042. ].chapterData.unshift({
  11043. name: fileName,
  11044. url: data.Location,
  11045. uid: fileUid,
  11046. type: _type,
  11047. });
  11048. _this.imgChange1(null, null, _type, itemTaskIndex);
  11049. } else if (type == 2 || type == 3 || type == 12) {
  11050. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11051. itemTaskIndex
  11052. ].chapterData.unshift({
  11053. name: fileName,
  11054. url: data.Location,
  11055. uid: fileUid,
  11056. type: type,
  11057. });
  11058. _this.imgChange1(null, null, type, itemTaskIndex);
  11059. } else if (type == 4) {
  11060. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11061. itemTaskIndex
  11062. ].fileList1.push({
  11063. name: fileName,
  11064. url: data.Location,
  11065. uid: fileUid,
  11066. });
  11067. _this.imgChange1(null, null, type, itemTaskIndex);
  11068. } else if (type == 5) {
  11069. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11070. itemTaskIndex
  11071. ].homeworkList.push({
  11072. name: fileName,
  11073. url: data.Location,
  11074. uid: fileUid,
  11075. });
  11076. _this.imgChange1(null, null, type, itemTaskIndex);
  11077. }
  11078. console.log(data.Location);
  11079. }
  11080. });
  11081. }
  11082. }
  11083. },
  11084. async beforeUploadInfo2(event, type, tindex) {
  11085. // const loading = this.openLoading();
  11086. let file = "";
  11087. let cfindex2 = 0;
  11088. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  11089. // var file = event.target.files[0];
  11090. file = event.target.files[cfindex];
  11091. let fileName = file.name
  11092. let fileUid = file.uid
  11093. var credentials = {
  11094. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11095. secretAccessKey: "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",
  11096. }; //秘钥形式的登录上传
  11097. window.AWS.config.update(credentials);
  11098. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11099. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11100. var _this = this;
  11101. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  11102. if (
  11103. xianObj.indexOf(
  11104. file.name
  11105. .split(".")
  11106. [file.name.split(".").length - 1].toLocaleUpperCase()
  11107. ) == -1
  11108. ) {
  11109. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  11110. this.inputShow = true;
  11111. // var a = _this.$refs.upload1.uploadFiles;
  11112. // a.splice(a.length - 1, a.length);
  11113. // loading.close();
  11114. return;
  11115. }
  11116. // if (
  11117. // ['DOC'].indexOf(
  11118. // file.name
  11119. // .split(".")
  11120. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11121. // ) !== -1
  11122. // ) {
  11123. // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11124. // this.inputShow = true;
  11125. // return;
  11126. // }
  11127. if (type == 3) {
  11128. var b = [
  11129. "DOC",
  11130. "DOCX",
  11131. "DOCM",
  11132. "DOTM",
  11133. "DOTX",
  11134. "PPTX",
  11135. "PPSX",
  11136. "PPT",
  11137. "PPS",
  11138. "PPTM",
  11139. "POTM",
  11140. "PPAM",
  11141. "POTX",
  11142. "PPSM",
  11143. ];
  11144. if (
  11145. b.indexOf(
  11146. file.name
  11147. .split(".")
  11148. [file.name.split(".").length - 1].toLocaleUpperCase()
  11149. ) != -1
  11150. ) {
  11151. if (file.size / 1024 / 1024 > 80) {
  11152. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11153. this.inputShow = true;
  11154. // var a = _this.$refs.upload1.uploadFiles;
  11155. // a.splice(a.length - 1, a.length);
  11156. // loading.close();
  11157. return;
  11158. }
  11159. } else if (
  11160. file.name
  11161. .split(".")
  11162. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11163. ) {
  11164. if (file.size / 1024 / 1024 > 80) {
  11165. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11166. this.inputShow = true;
  11167. // var a = _this.$refs.upload1.uploadFiles;
  11168. // a.splice(a.length - 1, a.length);
  11169. // loading.close();
  11170. return;
  11171. }
  11172. }
  11173. }
  11174. this.inputShow = false;
  11175. if(type == 14){
  11176. // _this.teacherinfoprogress = 0;
  11177. _this.teacherinfoproVisible = true;
  11178. _this.teacherinfoisFinishSize = 0;
  11179. _this.teacherinfoisAllSize = event.target.files.length;
  11180. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  11181. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11182. }else if(type == 16){
  11183. _this.mubiaoinfoprogress = 0;
  11184. _this.mubiaoinfoproVisible = true;
  11185. _this.mubiaoinfoisFinishSize = 0;
  11186. _this.mubiaoinfoisAllSize = event.target.files.length;
  11187. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  11188. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11189. }else if(type == 17){
  11190. _this.xuanzeinfoprogress = 0;
  11191. _this.xuanzeinfoproVisible = true;
  11192. _this.xuanzeinfoisFinishSize = 0;
  11193. _this.xuanzeinfoisAllSize = event.target.files.length;
  11194. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11195. }else if(type == 18){
  11196. _this.pingjiainfoprogress[tindex] = 0;
  11197. _this.pingjiainfoproVisible[tindex] = true;
  11198. _this.pingjiainfoisFinishSize[tindex] = 0;
  11199. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  11200. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  11201. }else if(type == 19){
  11202. _this.knowinfoprogress = 0;
  11203. _this.knowinfoproVisible = true;
  11204. _this.knowinfoisFinishSize = 0;
  11205. _this.knowinfoisAllSize = event.target.files.length;
  11206. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11207. }else if(type == 20){
  11208. _this.knowinfoprogress2 = 0;
  11209. _this.knowinfoproVisible2 = true;
  11210. _this.knowinfoisFinishSize2 = 0;
  11211. _this.knowinfoisAllSize2 = event.target.files.length;
  11212. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  11213. }else{
  11214. _this.infoprogress = 0;
  11215. _this.infoproVisible = true;
  11216. _this.infoisFinishSize = 0;
  11217. _this.infoisAllSize = event.target.files.length;
  11218. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  11219. }
  11220. // if (
  11221. // ['DOC'].indexOf(
  11222. // file.name
  11223. // .split(".")
  11224. // [file.name.split(".").length - 1].toLocaleUpperCase()
  11225. // ) !== -1
  11226. // ) {
  11227. // // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11228. // // this.inputShow = true;
  11229. // let params = convertApi.createParams()
  11230. // params.add('file', file)
  11231. // try {
  11232. // let result = await convertApi.convert('doc', 'docx', params);
  11233. // // Get result file URL
  11234. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  11235. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  11236. // });
  11237. // console.log(result)
  11238. // console.log(file)
  11239. // } catch (error) {
  11240. // cfindex2++;
  11241. // if(type == 14){
  11242. // _this.teacherinfoisFinishSize = cfindex2;
  11243. // }else if(type == 16){
  11244. // _this.mubiaoinfoisFinishSize = cfindex2;
  11245. // }else if(type == 17){
  11246. // _this.xuanzeinfoisFinishSize = cfindex2;
  11247. // }else if(type == 18){
  11248. // _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11249. // }else if(type == 19){
  11250. // _this.knowinfoisFinishSize = cfindex2;
  11251. // }else if(type == 20){
  11252. // _this.knowinfoisFinishSize2 = cfindex2;
  11253. // }else {
  11254. // _this.infoisFinishSize = cfindex2;
  11255. // }
  11256. // setTimeout(() => {
  11257. // if (
  11258. // cfindex2 == event.target.files.length ||
  11259. // cfindex2 > event.target.files.length
  11260. // ) {
  11261. // if(type == 14){
  11262. // _this.teacherinfoproVisible = false;
  11263. // }else if(type == 16){
  11264. // _this.mubiaoinfoproVisible = false;
  11265. // }else if(type == 17){
  11266. // _this.xuanzeinfoproVisible = false;
  11267. // }else if(type == 18){
  11268. // _this.pingjiainfoproVisible[tindex] = false;
  11269. // }else if(type == 19){
  11270. // _this.knowinfoproVisible = false;
  11271. // }else if(type == 20){
  11272. // _this.knowinfoproVisible2 = false;
  11273. // }else{
  11274. // _this.infoproVisible = false;
  11275. // }
  11276. // }
  11277. // _this.$forceUpdate();
  11278. // }, 1000);
  11279. // _this.inputShow = true;
  11280. // _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  11281. // // 捕捉到这个convertApi.convert报错就不要往下走了
  11282. // return; // 直接返回,不继续执行后续代码
  11283. // }
  11284. // // return;
  11285. // }
  11286. _this.$forceUpdate();
  11287. if (file) {
  11288. var params = {
  11289. Key:
  11290. file.name.split(".")[0] +
  11291. new Date().getTime() +
  11292. "." +
  11293. file.name.split(".")[file.name.split(".").length - 1],
  11294. ContentType: file.type,
  11295. Body: file,
  11296. "Access-Control-Allow-Credentials": "*",
  11297. ACL: "public-read",
  11298. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11299. var options = {
  11300. partSize: 2048 * 1024 * 1024,
  11301. queueSize: 2,
  11302. leavePartsOnError: true,
  11303. };
  11304. bucket
  11305. .upload(params, options)
  11306. .on("httpUploadProgress", function (evt) {
  11307. //这里可以写进度条
  11308. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11309. // if(type == 14){
  11310. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11311. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11312. // }else if(type == 16){
  11313. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11314. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11315. // }else if(type == 17){
  11316. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  11317. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11318. // }else if(type == 18){
  11319. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  11320. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  11321. // }else {
  11322. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  11323. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11324. // }
  11325. _this.$forceUpdate();
  11326. })
  11327. .send(async function (err, data) {
  11328. // loading.close();
  11329. // if(type == 14){
  11330. // _this.teacherinfoprogress = 100;
  11331. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  11332. // }else if(type == 16){
  11333. // _this.mubiaoinfoprogress = 100;
  11334. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  11335. // }else if(type == 17){
  11336. // _this.xuanzeinfoprogress = 100;
  11337. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  11338. // }else if(type == 18){
  11339. // _this.pingjiainfoprogress[tindex] = 100;
  11340. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  11341. // }else {
  11342. // _this.infoprogress = 100;
  11343. // _this.infoisFinishSize = _this.infoisAllSize;
  11344. // }
  11345. _this.$forceUpdate();
  11346. _this.inputShow = true;
  11347. if (err) {
  11348. cfindex2++;
  11349. if(type == 14){
  11350. _this.teacherinfoisFinishSize = cfindex2;
  11351. }else if(type == 16){
  11352. _this.mubiaoinfoisFinishSize = cfindex2;
  11353. }else if(type == 17){
  11354. _this.xuanzeinfoisFinishSize = cfindex2;
  11355. }else if(type == 18){
  11356. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11357. }else if(type == 19){
  11358. _this.knowinfoisFinishSize = cfindex2;
  11359. }else if(type == 20){
  11360. _this.knowinfoisFinishSize2 = cfindex2;
  11361. }else {
  11362. _this.infoisFinishSize = cfindex2;
  11363. }
  11364. setTimeout(() => {
  11365. if (
  11366. cfindex2 == event.target.files.length ||
  11367. cfindex2 > event.target.files.length
  11368. ) {
  11369. if(type == 14){
  11370. _this.teacherinfoproVisible = false;
  11371. }else if(type == 16){
  11372. _this.mubiaoinfoproVisible = false;
  11373. }else if(type == 17){
  11374. _this.xuanzeinfoproVisible = false;
  11375. }else if(type == 18){
  11376. _this.pingjiainfoproVisible[tindex] = false;
  11377. }else if(type == 19){
  11378. _this.knowinfoproVisible = false;
  11379. }else if(type == 20){
  11380. _this.knowinfoproVisible2 = false;
  11381. }else{
  11382. _this.infoproVisible = false;
  11383. }
  11384. }
  11385. _this.$forceUpdate();
  11386. }, 1000);
  11387. // var a = _this.$refs.upload1.uploadFiles;
  11388. // a.splice(a.length - 1, a.length);
  11389. _this.$message.error("上传失败");
  11390. } else {
  11391. let fileid = await _this.createFileid(data.Location)
  11392. if(fileid){
  11393. cfindex2++;
  11394. if(type == 14){
  11395. _this.teacherinfoisFinishSize = cfindex2;
  11396. }else if(type == 16){
  11397. _this.mubiaoinfoisFinishSize = cfindex2;
  11398. }else if(type == 17){
  11399. _this.xuanzeinfoisFinishSize = cfindex2;
  11400. }else if(type == 18){
  11401. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  11402. }else if(type == 19){
  11403. _this.knowinfoisFinishSize = cfindex2;
  11404. }else if(type == 20){
  11405. _this.knowinfoisFinishSize2 = cfindex2;
  11406. }else {
  11407. _this.infoisFinishSize = cfindex2;
  11408. }
  11409. if (
  11410. cfindex2 == event.target.files.length ||
  11411. cfindex2 > event.target.files.length
  11412. ) {
  11413. if(type == 14){
  11414. _this.teacherinfoproVisible = false;
  11415. }else if(type == 16){
  11416. _this.mubiaoinfoproVisible = false;
  11417. }else if(type == 17){
  11418. _this.xuanzeinfoproVisible = false;
  11419. }else if(type == 18){
  11420. _this.pingjiainfoproVisible[tindex] = false;
  11421. }else if(type == 19){
  11422. _this.knowinfoproVisible = false;
  11423. }else if(type == 20){
  11424. _this.knowinfoproVisible2 = false;
  11425. }else{
  11426. _this.infoproVisible = false;
  11427. }
  11428. }
  11429. _this.$forceUpdate();
  11430. }
  11431. if(fileid == 1){
  11432. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  11433. return;
  11434. }
  11435. var imgA = [
  11436. "png",
  11437. "jpg",
  11438. "jpeg",
  11439. "bmp",
  11440. "gif",
  11441. "webp",
  11442. "psd",
  11443. "svg",
  11444. "tiff",
  11445. ];
  11446. var fileA = [
  11447. "PDF",
  11448. "DOC",
  11449. "DOCX",
  11450. "DOCM",
  11451. "DOTM",
  11452. "DOTX",
  11453. "PPTX",
  11454. "PPSX",
  11455. "PPT",
  11456. "PPS",
  11457. "PPTM",
  11458. "POTM",
  11459. "PPAM",
  11460. "POTX",
  11461. "PPSM",
  11462. "XLSX",
  11463. "XLS",
  11464. ];
  11465. var videoA = [
  11466. "AVI",
  11467. "NAVI",
  11468. "MPEG",
  11469. "ASF",
  11470. "MOV",
  11471. "WMV",
  11472. "3GP",
  11473. "RM",
  11474. "RMVB",
  11475. "FLV",
  11476. "F4V",
  11477. "H.264",
  11478. "H.265",
  11479. "REAL VIDEO",
  11480. "MKV",
  11481. "WebM",
  11482. "HDDVD",
  11483. "MP4",
  11484. "MPG",
  11485. "M4V",
  11486. "MGV",
  11487. "OGV",
  11488. "QTM",
  11489. "STR",
  11490. "AMC",
  11491. "DVX",
  11492. "EVO",
  11493. "DAT",
  11494. "OGG",
  11495. "OGM",
  11496. ];
  11497. let _type = 2;
  11498. if (
  11499. fileA.indexOf(
  11500. data.Location.split(".")[
  11501. data.Location.split(".").length - 1
  11502. ].toLocaleUpperCase()
  11503. ) != -1
  11504. ) {
  11505. _type = 3;
  11506. } else if (
  11507. videoA.indexOf(
  11508. data.Location.split(".")[
  11509. data.Location.split(".").length - 1
  11510. ].toLocaleUpperCase()
  11511. ) != -1
  11512. ) {
  11513. _type = 2;
  11514. } else if (
  11515. imgA.indexOf(
  11516. data.Location.split(".")[
  11517. data.Location.split(".").length - 1
  11518. ].toLocaleLowerCase()
  11519. ) != -1
  11520. ) {
  11521. _type = 13;
  11522. } else {
  11523. _type = 12;
  11524. }
  11525. if (type == 13) {
  11526. _this.infoData.push({
  11527. name: fileName,
  11528. url: data.Location,
  11529. uid: fileUid,
  11530. type: _type,
  11531. fileid: fileid == 1 ? '' : fileid,
  11532. });
  11533. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11534. name: fileName,
  11535. url: data.Location,
  11536. uid: fileUid,
  11537. type: _type,
  11538. fileid: fileid == 1 ? '' : fileid,
  11539. })
  11540. }else if (type == 14) {
  11541. _this.teacherInfoData.push({
  11542. name: fileName,
  11543. url: data.Location,
  11544. uid: fileUid,
  11545. type: _type,
  11546. fileid: fileid == 1 ? '' : fileid,
  11547. });
  11548. _this.infoData2.push({
  11549. name: fileName,
  11550. url: data.Location,
  11551. uid: fileUid,
  11552. type: _type,
  11553. fileid: fileid == 1 ? '' : fileid,
  11554. });
  11555. _this.infoData.push({
  11556. name: fileName,
  11557. url: data.Location,
  11558. uid: fileUid,
  11559. type: _type,
  11560. fileid: fileid == 1 ? '' : fileid,
  11561. });
  11562. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11563. name: fileName,
  11564. url: data.Location,
  11565. uid: fileUid,
  11566. type: _type,
  11567. fileid: fileid == 1 ? '' : fileid,
  11568. })
  11569. }else if (type == 15) {
  11570. _this.infoData2.push({
  11571. name: fileName,
  11572. url: data.Location,
  11573. uid: fileUid,
  11574. type: _type,
  11575. fileid: fileid == 1 ? '' : fileid,
  11576. });
  11577. _this.infoData.push({
  11578. name: fileName,
  11579. url: data.Location,
  11580. uid: fileUid,
  11581. type: _type,
  11582. fileid: fileid == 1 ? '' : fileid,
  11583. });
  11584. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11585. name: fileName,
  11586. url: data.Location,
  11587. uid: fileUid,
  11588. type: _type,
  11589. fileid: fileid == 1 ? '' : fileid,
  11590. })
  11591. }else if (type == 16) {
  11592. _this.mubiaoInfoData.push({
  11593. name: fileName,
  11594. url: data.Location,
  11595. uid: fileUid,
  11596. type: _type,
  11597. fileid: fileid == 1 ? '' : fileid,
  11598. });
  11599. }else if (type == 17) {
  11600. _this.xuanzeInfoData.push({
  11601. name: fileName,
  11602. url: data.Location,
  11603. uid: fileUid,
  11604. type: _type,
  11605. fileid: fileid == 1 ? '' : fileid,
  11606. });
  11607. }else if (type == 18) {
  11608. if(!_this.pingjiaInfoData[tindex]){
  11609. _this.pingjiaInfoData[tindex] = []
  11610. }
  11611. _this.pingjiaInfoData[tindex].push({
  11612. name: fileName,
  11613. url: data.Location,
  11614. uid: fileUid,
  11615. type: _type,
  11616. fileid: fileid == 1 ? '' : fileid,
  11617. });
  11618. }else if (type == 19) {
  11619. _this.knowInfoData.push({
  11620. name: fileName,
  11621. url: data.Location,
  11622. uid: fileUid,
  11623. type: _type,
  11624. fileid: fileid == 1 ? '' : fileid,
  11625. });
  11626. if(fileid != 1){
  11627. _this.knowFileids.push(fileid)
  11628. }
  11629. }else if (type == 20) {
  11630. _this.knowInfoData2.push({
  11631. name: fileName,
  11632. url: data.Location,
  11633. uid: fileUid,
  11634. type: _type,
  11635. fileid: fileid == 1 ? '' : fileid,
  11636. });
  11637. if(fileid != 1){
  11638. _this.knowFileids2.push(fileid)
  11639. }
  11640. }
  11641. console.log(data.Location);
  11642. console.log(fileName,'----------',fileid);
  11643. }
  11644. });
  11645. }
  11646. }
  11647. },
  11648. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  11649. // const loading = this.openLoading();
  11650. var file = event.target.files[0];
  11651. var credentials = {
  11652. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11653. secretAccessKey: "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",
  11654. }; //秘钥形式的登录上传
  11655. window.AWS.config.update(credentials);
  11656. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11657. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11658. var _this = this;
  11659. if (type == 3) {
  11660. var b = [
  11661. "DOC",
  11662. "DOCX",
  11663. "DOCM",
  11664. "DOTM",
  11665. "DOTX",
  11666. "PPTX",
  11667. "PPSX",
  11668. "PPT",
  11669. "PPS",
  11670. "PPTM",
  11671. "POTM",
  11672. "PPAM",
  11673. "POTX",
  11674. "PPSM",
  11675. ];
  11676. if (
  11677. b.indexOf(
  11678. file.name
  11679. .split(".")
  11680. [file.name.split(".").length - 1].toLocaleUpperCase()
  11681. ) != -1
  11682. ) {
  11683. if (file.size / 1024 / 1024 > 80) {
  11684. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11685. this.inputShow = true;
  11686. // var a = _this.$refs.upload1.uploadFiles;
  11687. // a.splice(a.length - 1, a.length);
  11688. // loading.close();
  11689. return;
  11690. }
  11691. } else if (
  11692. file.name
  11693. .split(".")
  11694. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11695. ) {
  11696. if (file.size / 1024 / 1024 > 80) {
  11697. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11698. this.inputShow = true;
  11699. // var a = _this.$refs.upload1.uploadFiles;
  11700. // a.splice(a.length - 1, a.length);
  11701. // loading.close();
  11702. return;
  11703. }
  11704. }
  11705. }
  11706. this.inputShow = false;
  11707. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11708. itemTaskIndex
  11709. ].progress = 0;
  11710. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11711. itemTaskIndex
  11712. ].proVisible = true;
  11713. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11714. itemTaskIndex
  11715. ].isFinishSize = 0;
  11716. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11717. itemTaskIndex
  11718. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11719. _this.$forceUpdate();
  11720. if (file) {
  11721. var params = {
  11722. Key:
  11723. file.name.split(".")[0] +
  11724. new Date().getTime() +
  11725. "." +
  11726. file.name.split(".")[file.name.split(".").length - 1],
  11727. ContentType: file.type,
  11728. Body: file,
  11729. "Access-Control-Allow-Credentials": "*",
  11730. ACL: "public-read",
  11731. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11732. var options = {
  11733. partSize: 2048 * 1024 * 1024,
  11734. queueSize: 2,
  11735. leavePartsOnError: true,
  11736. };
  11737. bucket
  11738. .upload(params, options)
  11739. .on("httpUploadProgress", function (evt) {
  11740. //这里可以写进度条
  11741. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11742. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11743. itemTaskIndex
  11744. ].progress = parseInt((evt.loaded / evt.total) * 100);
  11745. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11746. itemTaskIndex
  11747. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11748. _this.$forceUpdate();
  11749. })
  11750. .send(function (err, data) {
  11751. // loading.close();
  11752. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11753. itemTaskIndex
  11754. ].progress = 100;
  11755. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11756. itemTaskIndex
  11757. ].isFinishSize =
  11758. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11759. itemTaskIndex
  11760. ].isAllSize;
  11761. _this.$forceUpdate();
  11762. setTimeout(() => {
  11763. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11764. itemTaskIndex
  11765. ].proVisible = false;
  11766. _this.$forceUpdate();
  11767. }, 1000);
  11768. _this.inputShow = true;
  11769. if (err) {
  11770. // var a = _this.$refs.upload1.uploadFiles;
  11771. // a.splice(a.length - 1, a.length);
  11772. _this.$message.error("上传失败");
  11773. } else {
  11774. if (type == 2 || type == 3) {
  11775. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11776. itemTaskIndex
  11777. ].chapterData.unshift({
  11778. name: file.name,
  11779. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11780. // itemTaskIndex
  11781. // ].chapterData.length+1),
  11782. url: data.Location,
  11783. uid: file.uid,
  11784. type: type,
  11785. text: string,
  11786. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11787. // itemTaskIndex
  11788. // ].chapterData.length + 1),
  11789. });
  11790. _this.imgChange1(null, null, type, itemTaskIndex);
  11791. } else if (type == 4) {
  11792. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11793. itemTaskIndex
  11794. ].fileList1.push({
  11795. name: file.name,
  11796. url: data.Location,
  11797. uid: file.uid,
  11798. });
  11799. _this.imgChange1(null, null, type, itemTaskIndex);
  11800. } else if (type == 5) {
  11801. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11802. itemTaskIndex
  11803. ].homeworkList.push({
  11804. name: file.name,
  11805. url: data.Location,
  11806. uid: file.uid,
  11807. });
  11808. _this.imgChange1(null, null, type, itemTaskIndex);
  11809. }
  11810. console.log(data.Location);
  11811. }
  11812. });
  11813. }
  11814. },
  11815. addunit() {
  11816. this.unitJson.push({
  11817. dyName: "", //单元标题
  11818. isUpdate: 1,
  11819. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  11820. chapterInfo: [
  11821. {
  11822. isread: false,
  11823. chapterid: this.guid(),
  11824. title: "",
  11825. courseName: "",
  11826. taskJson: [
  11827. {
  11828. task: "",
  11829. taskDetail: "",
  11830. chapterData: [],
  11831. toolText: "",
  11832. toolChoose: [
  11833. {
  11834. tool: [],
  11835. toolDetail: "",
  11836. toolType: 0,
  11837. askCount: 1,
  11838. askTitle: "",
  11839. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11840. },
  11841. ],
  11842. isShowTools: false,
  11843. askCount: 1,
  11844. isFold: 1,
  11845. askTitle: "",
  11846. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11847. checkJson: [{ checkCount: [], checkPerent: [] }],
  11848. homeworkList: [],
  11849. },
  11850. ],
  11851. itemCount: 1,
  11852. fileList1: [],
  11853. video: [],
  11854. testData: [],
  11855. pData: [],
  11856. templateArray: [],
  11857. },
  11858. ],
  11859. });
  11860. this.addindex = this.unitJson.length - 1;
  11861. setTimeout(() => {
  11862. this.unitIndex = this.unitJson.length - 1;
  11863. setTimeout(() => {
  11864. console.log(this.$refs.dyInput);
  11865. this.$refs.dyInput[0].focus();
  11866. }, 100);
  11867. this.unitSet(this.unitIndex);
  11868. }, 0);
  11869. },
  11870. addToolFun(itemTaskIndex) {
  11871. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11872. itemTaskIndex
  11873. ].toolChoose.push({
  11874. tool: [],
  11875. toolDetail: "",
  11876. toolType: 0,
  11877. askCount: 1,
  11878. askTitle: "",
  11879. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11880. });
  11881. },
  11882. addTaskBorder() {
  11883. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  11884. task: "",
  11885. taskDetail: "",
  11886. chapterData: [],
  11887. toolText: "",
  11888. toolChoose: [
  11889. {
  11890. tool: [],
  11891. toolDetail: "",
  11892. toolType: 0,
  11893. askCount: 1,
  11894. askTitle: "",
  11895. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11896. },
  11897. ],
  11898. isShowTools: false,
  11899. askCount: 1,
  11900. isFold: 1, //任务收起状态
  11901. askTitle: "",
  11902. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11903. checkJson: [{ checkCount: [], checkPerent: [] }],
  11904. homeworkList: [],
  11905. });
  11906. setTimeout(() => {
  11907. this.checkEva(this.checkId);
  11908. setTimeout(() => {
  11909. this.checkEva(this.checkId);
  11910. }, 100);
  11911. }, 100);
  11912. },
  11913. addTaskBorder2(type, index) {
  11914. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  11915. this.$message({
  11916. message: "有大纲在生成请生成完之后才能使用此功能",
  11917. type: "warning"
  11918. });
  11919. return;
  11920. }
  11921. if(type == 1){
  11922. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  11923. task: "",
  11924. isTask2: true,
  11925. isTask3: true,
  11926. taskDetail: "",
  11927. chapterData: [],
  11928. toolText: "",
  11929. toolChoose: [
  11930. {
  11931. tool: [],
  11932. toolDetail: "",
  11933. toolType: 0,
  11934. askCount: 1,
  11935. askTitle: "",
  11936. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11937. },
  11938. ],
  11939. isShowTools: false,
  11940. askCount: 1,
  11941. isFold: 0, //任务收起状态
  11942. askTitle: "",
  11943. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11944. checkJson: [{ checkCount: [], checkPerent: [] }],
  11945. homeworkList: [],
  11946. })
  11947. }else if(type == 2){
  11948. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  11949. task: "",
  11950. isTask2: true,
  11951. isTask3: true,
  11952. taskDetail: "",
  11953. chapterData: [],
  11954. toolText: "",
  11955. toolChoose: [
  11956. {
  11957. tool: [],
  11958. toolDetail: "",
  11959. toolType: 0,
  11960. askCount: 1,
  11961. askTitle: "",
  11962. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11963. },
  11964. ],
  11965. isShowTools: false,
  11966. askCount: 1,
  11967. isFold: 0, //任务收起状态
  11968. askTitle: "",
  11969. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11970. checkJson: [{ checkCount: [], checkPerent: [] }],
  11971. homeworkList: [],
  11972. })
  11973. }
  11974. setTimeout(() => {
  11975. this.checkEva(this.checkId);
  11976. setTimeout(() => {
  11977. this.checkEva(this.checkId);
  11978. }, 100);
  11979. }, 100);
  11980. },
  11981. add(e, i) {
  11982. var el = e.currentTarget;
  11983. el.getElementsByTagName("input")[0].click();
  11984. },
  11985. fold(i, e) {
  11986. if (
  11987. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  11988. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  11989. ) {
  11990. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  11991. } else {
  11992. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  11993. }
  11994. },
  11995. fold2(i) {
  11996. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  11997. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11998. i
  11999. ].isFold2 = false;
  12000. } else {
  12001. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  12002. }
  12003. this.$forceUpdate();
  12004. },
  12005. foldEva(i) {
  12006. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  12007. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12008. i
  12009. ].isEvaFold = false;
  12010. } else {
  12011. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12012. i
  12013. ].isEvaFold = true;
  12014. setTimeout(() => {
  12015. this.checkEva(this.checkId);
  12016. setTimeout(() => {
  12017. this.checkEva(this.checkId);
  12018. }, 500);
  12019. }, 0);
  12020. }
  12021. this.$forceUpdate();
  12022. },
  12023. foldC(i) {
  12024. if (
  12025. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  12026. ) {
  12027. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12028. i
  12029. ].isFoldchapter = false;
  12030. } else {
  12031. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12032. i
  12033. ].isFoldchapter = true;
  12034. }
  12035. this.$forceUpdate();
  12036. },
  12037. fold3(i, ti) {
  12038. if (
  12039. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  12040. .isFold3
  12041. ) {
  12042. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12043. ti
  12044. ].isFold3 = false;
  12045. } else {
  12046. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12047. ti
  12048. ].isFold3 = true;
  12049. }
  12050. this.$forceUpdate();
  12051. },
  12052. deleteHomeworkBox(unitIndex, index, i) {
  12053. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  12054. this.taskCount
  12055. ].homeworkList.splice(i, 1);
  12056. },
  12057. getStudent() {
  12058. let params = {
  12059. oid: this.oid,
  12060. cu: "",
  12061. cn: this.searchPeople,
  12062. };
  12063. this.ajax
  12064. .get(this.$store.state.api + "selectStudentAdd", params)
  12065. .then((res) => {
  12066. this.studentJuri = res.data[0];
  12067. })
  12068. .catch((err) => {
  12069. this.isLoading = false;
  12070. console.error(err);
  12071. });
  12072. },
  12073. // 添加协同成员其他选项按钮
  12074. getTeacherCopy(){
  12075. this.CollLoading=true
  12076. this.collid = ''
  12077. this.collid = '1xpz'
  12078. let params = {
  12079. oid:
  12080. this.org && this.org != "undefined" && this.org != "null"
  12081. ? this.org
  12082. : this.oid,
  12083. cu: "",
  12084. cn: this.searchTN,
  12085. coll: ''
  12086. };
  12087. this.ajax
  12088. .get(
  12089. this.$store.state.api +
  12090. (this.org && this.org != "undefined" && this.org != "null"
  12091. ? "selectCollaborativeMembersOrg"
  12092. : "selectCollaborativeMembers"),
  12093. params
  12094. )
  12095. .then((res) => {
  12096. let teacherJuri = res.data[0];
  12097. this.CollaborativeTeaList = res.data[1];
  12098. for (var i = 0; i < teacherJuri.length; i++) {
  12099. if (teacherJuri[i].userid == this.userid) {
  12100. teacherJuri.splice(i, 1);
  12101. break;
  12102. }
  12103. }
  12104. this.teacherJuri = teacherJuri.filter((i,index)=>{
  12105. return (i.cclassid == '' || i.cclassid == null)
  12106. })
  12107. console.log(' this.teacherJuri', this.teacherJuri);
  12108. let _check = [];
  12109. let _check2 = [];
  12110. for (var i = 0; i < this.teacherJuri.length; i++) {
  12111. var gid = this.teacherJuri[i].userid;
  12112. _check.push(gid);
  12113. }
  12114. for (var i = 0; i < this.checkboxList3.length; i++) {
  12115. var _id = this.checkboxList3[i];
  12116. if (_check.indexOf(_id) !== -1) {
  12117. _check2.push(_id);
  12118. }
  12119. }
  12120. if (_check2.length==0 && _check.length==0) {
  12121. }else{
  12122. this.checkAll2 = _check2.length === _check.length;
  12123. }
  12124. this.CollLoading=false
  12125. })
  12126. .catch((err) => {
  12127. console.error(err);
  12128. this.CollLoading=false
  12129. });
  12130. },
  12131. getTeacher(val) {
  12132. this.CollLoading=true
  12133. this.collid = ''
  12134. this.collid = !val ? '' : val
  12135. let params = {
  12136. oid:
  12137. this.org && this.org != "undefined" && this.org != "null"
  12138. ? this.org
  12139. : this.oid,
  12140. cu: "",
  12141. cn: this.searchTN,
  12142. coll: this.collid
  12143. };
  12144. this.ajax
  12145. .get(
  12146. this.$store.state.api +
  12147. (this.org && this.org != "undefined" && this.org != "null"
  12148. ? "selectCollaborativeMembersOrg"
  12149. : "selectCollaborativeMembers"),
  12150. params
  12151. )
  12152. .then((res) => {
  12153. let teacherJuri = res.data[0];
  12154. this.CollaborativeTeaList = res.data[1];
  12155. for (var i = 0; i < teacherJuri.length; i++) {
  12156. if (teacherJuri[i].userid == this.userid) {
  12157. teacherJuri.splice(i, 1);
  12158. break;
  12159. }
  12160. }
  12161. this.teacherJuri = teacherJuri;
  12162. let _check = [];
  12163. let _check2 = [];
  12164. for (var i = 0; i < this.teacherJuri.length; i++) {
  12165. var gid = this.teacherJuri[i].userid;
  12166. _check.push(gid);
  12167. }
  12168. for (var i = 0; i < this.checkboxList3.length; i++) {
  12169. var _id = this.checkboxList3[i];
  12170. if (_check.indexOf(_id) !== -1) {
  12171. _check2.push(_id);
  12172. }
  12173. }
  12174. if (_check2.length==0 && _check.length==0) {
  12175. }else{
  12176. this.checkAll2 = _check2.length === _check.length;
  12177. }
  12178. this.CollLoading=false
  12179. })
  12180. .catch((err) => {
  12181. console.error(err);
  12182. this.CollLoading=false
  12183. });
  12184. },
  12185. searchStudent() {
  12186. this.getStudent();
  12187. },
  12188. selectGrage() {
  12189. let params = {
  12190. oid: this.oid,
  12191. };
  12192. this.ajax
  12193. .get(this.$store.state.api + "selectGrageBySchool", params)
  12194. .then((res) => {
  12195. this.gradeList = res.data[0];
  12196. })
  12197. .catch((err) => {
  12198. this.isLoading = false;
  12199. console.error(err);
  12200. });
  12201. },
  12202. //获取班级列表
  12203. getClass() {
  12204. let params = {
  12205. oid: this.oid,
  12206. gid: this.gradeId,
  12207. cn: this.classSearch,
  12208. };
  12209. this.ajax
  12210. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  12211. .then((res) => {
  12212. if (!this.grade.length) {
  12213. this.grade = res.data[0];
  12214. }
  12215. this.grade2 = res.data[0];
  12216. this.classJuri = res.data[0];
  12217. let _check = [];
  12218. let _check2 = [];
  12219. for (var i = 0; i < this.grade2.length; i++) {
  12220. var gid = this.grade2[i].id;
  12221. _check.push(gid);
  12222. }
  12223. for (var i = 0; i < this.checkboxList2.length; i++) {
  12224. var _id = this.checkboxList2[i];
  12225. if (_check.indexOf(_id) !== -1) {
  12226. _check2.push(_id);
  12227. }
  12228. }
  12229. this.checkAll = _check2.length === _check.length;
  12230. })
  12231. .catch((err) => {
  12232. this.isLoading = false;
  12233. console.error(err);
  12234. });
  12235. },
  12236. CourseType2Change(val) {
  12237. this.pTypeCheck = [];
  12238. for (var i = 0; i < this.CourseType2.length; i++) {
  12239. let typeA = this.CourseType2[i];
  12240. if (val.indexOf(typeA.name) != -1) {
  12241. this.pTypeCheck.push(...typeA.id);
  12242. }
  12243. }
  12244. },
  12245. arrayToArray(arrayo, arrayt) {
  12246. let array1 = arrayo;
  12247. let array2 = arrayt;
  12248. let commonElements = [];
  12249. for (let i = 0; i < array1.length; i++) {
  12250. for (let j = 0; j < array2.length; j++) {
  12251. if (array1[i] === array2[j]) {
  12252. commonElements.push(array1[i]);
  12253. }
  12254. }
  12255. }
  12256. return commonElements;
  12257. },
  12258. typeChange(){
  12259. let courseInfo = ``
  12260. let sub = []
  12261. let mclass = []
  12262. let theme = []
  12263. if (this.courseTypeId.length) {
  12264. for (var i = 0; i < this.courseTypeId.length; i++) {
  12265. let _sid = this.courseTypeId[i]
  12266. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12267. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  12268. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  12269. }
  12270. }
  12271. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12272. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  12273. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  12274. }
  12275. }
  12276. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12277. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  12278. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  12279. }
  12280. }
  12281. }
  12282. }
  12283. sub = JSON.parse(converter(JSON.stringify(sub)))
  12284. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  12285. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  12286. let _file = this.knowFileArray[fi]
  12287. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  12288. let fileS = _file.name ? converter(_file.name).split('/') : 1
  12289. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  12290. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  12291. let fileids = this.knowInfoData.map((item) => item.fileid)
  12292. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12293. this.knowInfoData.push({
  12294. name: _file.filename,
  12295. url: _file.url,
  12296. uid: '',
  12297. type: 3,
  12298. fileid: _file.fileid,
  12299. });
  12300. this.knowFileids.push(_file.fileid)
  12301. }
  12302. fileids = this.knowInfoData.map((item) => item.fileid)
  12303. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12304. this.knowInfoData.push({
  12305. name: _file.filename,
  12306. url: _file.url,
  12307. uid: '',
  12308. type: 3,
  12309. fileid: _file.fileid,
  12310. });
  12311. this.knowFileids.push(_file.fileid)
  12312. }
  12313. fileids = this.knowInfoData.map((item) => item.fileid)
  12314. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12315. this.knowInfoData.push({
  12316. name: _file.filename,
  12317. url: _file.url,
  12318. uid: '',
  12319. type: 3,
  12320. fileid: _file.fileid,
  12321. });
  12322. this.knowFileids.push(_file.fileid)
  12323. }
  12324. fileids = this.knowInfoData.map((item) => item.fileid)
  12325. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  12326. this.knowInfoData.push({
  12327. name: _file.filename,
  12328. url: _file.url,
  12329. uid: '',
  12330. type: 3,
  12331. fileid: _file.fileid,
  12332. });
  12333. this.knowFileids.push(_file.fileid)
  12334. }
  12335. fileids = this.knowInfoData.map((item) => item.fileid)
  12336. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  12337. this.knowInfoData.push({
  12338. name: _file.filename,
  12339. url: _file.url,
  12340. uid: '',
  12341. type: 3,
  12342. fileid: _file.fileid,
  12343. });
  12344. this.knowFileids.push(_file.fileid)
  12345. }
  12346. }
  12347. if(mclass.length){
  12348. courseInfo += `年级:${mclass.join(',')} `
  12349. }
  12350. if(sub.length){
  12351. courseInfo += `学科:${sub.join(',')} `
  12352. }
  12353. if(theme.length){
  12354. courseInfo += `主题:${theme.join(',')} `
  12355. }
  12356. this.addCourseBehavior('courseBehavior', `点击选择分类-${courseInfo}`)
  12357. this.typeC1 = this.getTypeC(2)
  12358. this.typeC2 = this.getTypeC(1)
  12359. },
  12360. getChapterData(e, i, j, ic, type) {
  12361. e.stopPropagation();
  12362. this.updataC = true;
  12363. this.icc = ic;
  12364. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  12365. console.log("还不能下载图片喔");
  12366. }
  12367. },
  12368. deleteChapterData(e, i, j, ic, taskI) {
  12369. e.stopPropagation();
  12370. let _this = this;
  12371. _this
  12372. .$confirm("确定删除此项?", "提示", {
  12373. confirmButtonText: "确定",
  12374. cancelButtonText: "取消",
  12375. type: "warning",
  12376. })
  12377. .then(() => {
  12378. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  12379. ic,
  12380. 1
  12381. );
  12382. })
  12383. .catch(() => {
  12384. return;
  12385. });
  12386. },
  12387. checkInfoData(fileid, file){
  12388. let type = 1
  12389. let index = 0
  12390. for(let i = 0; i < this.infoData.length; i++){
  12391. if(this.infoData[i].fileid == fileid){
  12392. type = 2
  12393. index = i
  12394. }
  12395. }
  12396. if(type == 2){
  12397. this.infoData.splice(index, 1)
  12398. }else {
  12399. this.infoData.push({...file})
  12400. }
  12401. },
  12402. checkKnowInfoData(fileid){
  12403. if(this.knowFileids.indexOf(fileid) == -1){
  12404. this.knowFileids.push(fileid)
  12405. }else {
  12406. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  12407. }
  12408. },
  12409. checkKnowInfoData2(fileid){
  12410. if(!fileid){
  12411. return
  12412. }
  12413. if(this.knowFileids2.indexOf(fileid) == -1){
  12414. this.knowFileids2.push(fileid)
  12415. }else {
  12416. this.knowFileids2.splice(this.knowFileids2.indexOf(fileid), 1)
  12417. }
  12418. },
  12419. checkKnowInfoData3(fileid){
  12420. if(this.knowFileids3.indexOf(fileid) == -1){
  12421. this.knowFileids3.push(fileid)
  12422. }else {
  12423. this.knowFileids3.splice(this.knowFileids3.indexOf(fileid), 1)
  12424. }
  12425. },
  12426. checkAllKnowInfoData3(){
  12427. // let array = this.knowInfoData3;
  12428. // if(this.knowFileids3.length === array.length){
  12429. // this.knowFileids3 = []; // 取消全选
  12430. // } else {
  12431. // this.knowFileids3 = array.map(item => item.url); // 全选
  12432. // }
  12433. let files = this.allknowInfoData3();
  12434. let count = 0
  12435. for(var i = 0; i < files.length; i++){
  12436. if(this.knowFileids3.includes(files[i].url)){
  12437. count++
  12438. }
  12439. }
  12440. if (count == files.length) {
  12441. this.knowFileids3 = this.knowFileids3.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12442. } else {
  12443. this.knowFileids3 = [...new Set([...this.knowFileids3, ...files.map(file => file.url)])]; // 全选并添加新文件
  12444. }
  12445. },
  12446. checkAllKnowInfoData2(){
  12447. let array = this.knowInfoData2;
  12448. if(this.knowFileids2.length === array.length){
  12449. this.knowFileids2 = []; // 取消全选
  12450. } else {
  12451. this.knowFileids2 = array.map(item => item.fileid); // 全选
  12452. }
  12453. },
  12454. deleteCheckAllKnowInfoData2(){
  12455. let _this = this;
  12456. _this
  12457. .$confirm("确定删除所选文件么?", "提示", {
  12458. confirmButtonText: "确定",
  12459. cancelButtonText: "取消",
  12460. type: "warning",
  12461. })
  12462. .then(() => {
  12463. _this.knowInfoData2 = _this.knowInfoData2.filter(item => !_this.knowFileids2.includes(item.fileid))
  12464. _this.knowFileids2 = []
  12465. _this.$forceUpdate()
  12466. })
  12467. .catch(() => {
  12468. return;
  12469. });
  12470. },
  12471. checkAppendixFile(url){
  12472. if(this.appendixFiles.indexOf(url) == -1){
  12473. this.appendixFiles.push(url)
  12474. }else {
  12475. this.appendixFiles.splice(this.appendixFiles.indexOf(url), 1)
  12476. }
  12477. },
  12478. checkAllappendixFile(){
  12479. let files = this.allFile();
  12480. let count = 0
  12481. for(var i = 0; i < files.length; i++){
  12482. if(this.appendixFiles.includes(files[i].url)){
  12483. count++
  12484. }
  12485. }
  12486. if (count == files.length) {
  12487. this.appendixFiles = this.appendixFiles.filter(url => !files.some(file => file.url === url)); // 取消全选只取消当前文件
  12488. if(this.appendixTypeCheck == 'all' && this.appendixTaskCheck == 'all'){
  12489. this.appendixFiles = []
  12490. }
  12491. } else {
  12492. this.appendixFiles = [...new Set([...this.appendixFiles, ...files.map(file => file.url)])]; // 全选并添加新文件
  12493. }
  12494. },
  12495. async exportAppendixFiles(){
  12496. let files = this.allFile(2);
  12497. let uploadFile = []
  12498. for(var i = 0; i < files.length; i++){
  12499. if(this.appendixFiles.includes(files[i].url)){
  12500. uploadFile.push(files[i])
  12501. }
  12502. }
  12503. if(!uploadFile.length){
  12504. this.$message.error('请先选需要下载的附件')
  12505. return
  12506. }
  12507. this.appendixLoading = true
  12508. const zip = new JSZip();
  12509. for(var j = 0; j < uploadFile.length; j++){
  12510. let fileZ = uploadFile[j]
  12511. let name = fileZ.name
  12512. let file = await getFile(fileZ.url)
  12513. const file_name = fileZ.name; // 获取文件名
  12514. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  12515. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  12516. // 判断是否有重复的文件名字
  12517. if (!zip.file(file_name)) {
  12518. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  12519. } else {
  12520. // 如果有重复的文件名,则在文件名后添加序号
  12521. let count = 1;
  12522. let newFileName = fileNameWithoutExt;
  12523. while (zip.file(`${newFileName}.${fileExt}`)) {
  12524. newFileName = `${fileNameWithoutExt}(${count})`;
  12525. count++;
  12526. }
  12527. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  12528. }
  12529. // zip.file(`${name}`, file.data, { binary: true })
  12530. }
  12531. zip.generateAsync({ type: "blob" }).then((content) => {
  12532. // 生成二进制流
  12533. saveAs(
  12534. content,
  12535. this.courseName + "-" + "附件.zip"
  12536. ); // 利用file-saver保存文件 自定义文件名
  12537. setTimeout(() => {
  12538. this.appendixLoading = false
  12539. }, 2000);
  12540. });
  12541. },
  12542. deleteInfoData(e, ic) {
  12543. e.stopPropagation();
  12544. let _this = this;
  12545. _this
  12546. .$confirm("确定删除此项?", "提示", {
  12547. confirmButtonText: "确定",
  12548. cancelButtonText: "取消",
  12549. type: "warning",
  12550. })
  12551. .then(() => {
  12552. _this.infoData.splice(
  12553. ic,
  12554. 1
  12555. );
  12556. })
  12557. .catch(() => {
  12558. return;
  12559. });
  12560. },
  12561. deleteInfoData2(e, ic) {
  12562. e.stopPropagation();
  12563. let _this = this;
  12564. _this
  12565. .$confirm("确定删除此项?", "提示", {
  12566. confirmButtonText: "确定",
  12567. cancelButtonText: "取消",
  12568. type: "warning",
  12569. })
  12570. .then(() => {
  12571. let fileid = _this.infoData2[ic].fileid;
  12572. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  12573. _this.infoData2.splice(
  12574. ic,
  12575. 1
  12576. );
  12577. })
  12578. .catch(() => {
  12579. return;
  12580. });
  12581. },
  12582. deleteKnowInfoData(e, ic) {
  12583. e.stopPropagation();
  12584. let _this = this;
  12585. _this
  12586. .$confirm("确定删除此项?", "提示", {
  12587. confirmButtonText: "确定",
  12588. cancelButtonText: "取消",
  12589. type: "warning",
  12590. })
  12591. .then(() => {
  12592. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12593. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  12594. }
  12595. _this.knowInfoData.splice(
  12596. ic,
  12597. 1
  12598. );
  12599. })
  12600. .catch(() => {
  12601. return;
  12602. });
  12603. },
  12604. deleteKnowInfoData2(e, ic) {
  12605. e.stopPropagation();
  12606. let _this = this;
  12607. _this
  12608. .$confirm("确定删除此项?", "提示", {
  12609. confirmButtonText: "确定",
  12610. cancelButtonText: "取消",
  12611. type: "warning",
  12612. })
  12613. .then(() => {
  12614. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12615. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  12616. }
  12617. _this.knowInfoData2.splice(
  12618. ic,
  12619. 1
  12620. );
  12621. })
  12622. .catch(() => {
  12623. return;
  12624. });
  12625. },
  12626. deletemubiaoInfoData(e, ic) {
  12627. e.stopPropagation();
  12628. let _this = this;
  12629. _this
  12630. .$confirm("确定删除此项?", "提示", {
  12631. confirmButtonText: "确定",
  12632. cancelButtonText: "取消",
  12633. type: "warning",
  12634. })
  12635. .then(() => {
  12636. _this.mubiaoInfoData.splice(
  12637. ic,
  12638. 1
  12639. );
  12640. })
  12641. .catch(() => {
  12642. return;
  12643. });
  12644. },
  12645. deletexuanzeInfoData(e, ic) {
  12646. e.stopPropagation();
  12647. let _this = this;
  12648. _this
  12649. .$confirm("确定删除此项?", "提示", {
  12650. confirmButtonText: "确定",
  12651. cancelButtonText: "取消",
  12652. type: "warning",
  12653. })
  12654. .then(() => {
  12655. _this.xuanzeInfoData.splice(
  12656. ic,
  12657. 1
  12658. );
  12659. })
  12660. .catch(() => {
  12661. return;
  12662. });
  12663. },
  12664. deletepingjiaInfoData(e, ic, tindex) {
  12665. e.stopPropagation();
  12666. let _this = this;
  12667. _this
  12668. .$confirm("确定删除此项?", "提示", {
  12669. confirmButtonText: "确定",
  12670. cancelButtonText: "取消",
  12671. type: "warning",
  12672. })
  12673. .then(() => {
  12674. _this.pingjiaInfoData[tindex].splice(
  12675. ic,
  12676. 1
  12677. );
  12678. })
  12679. .catch(() => {
  12680. return;
  12681. });
  12682. },
  12683. deleteCankaoInfoData(e, ic) {
  12684. e.stopPropagation();
  12685. let _this = this;
  12686. _this
  12687. .$confirm("确定删除此项?", "提示", {
  12688. confirmButtonText: "确定",
  12689. cancelButtonText: "取消",
  12690. type: "warning",
  12691. })
  12692. .then(() => {
  12693. _this.cankaoInfoData.splice(
  12694. ic,
  12695. 1
  12696. );
  12697. })
  12698. .catch(() => {
  12699. return;
  12700. });
  12701. },
  12702. deleteTeacherInfoData(e, ic) {
  12703. e.stopPropagation();
  12704. let _this = this;
  12705. _this
  12706. .$confirm("确定删除此项?", "提示", {
  12707. confirmButtonText: "确定",
  12708. cancelButtonText: "取消",
  12709. type: "warning",
  12710. })
  12711. .then(() => {
  12712. _this.teacherInfoData.splice(
  12713. ic,
  12714. 1
  12715. );
  12716. })
  12717. .catch(() => {
  12718. return;
  12719. });
  12720. },
  12721. updataVideoT(e, i, j, ic) {
  12722. // e.stopPropagation();
  12723. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  12724. // ic
  12725. // ].name = JSON.parse(JSON.stringify(e.target.value));
  12726. this.line =
  12727. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  12728. this.taskCount = j;
  12729. this.lineCount = ic;
  12730. this.dialogVisibleupdataVideoT = true;
  12731. this.$forceUpdate();
  12732. },
  12733. checkChpater(e, i, j, ic){
  12734. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  12735. if(type == 3){
  12736. var fileA = [
  12737. "DOC",
  12738. "DOCX",
  12739. "DOCM",
  12740. "DOTM",
  12741. "DOTX",
  12742. "PPTX",
  12743. "PPSX",
  12744. "PPT",
  12745. "PPS",
  12746. "PPTM",
  12747. "POTM",
  12748. "PPAM",
  12749. "POTX",
  12750. "PPSM",
  12751. "XLSX",
  12752. "XLS"
  12753. ];
  12754. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  12755. if (
  12756. fileA.indexOf(
  12757. url.split(".")[
  12758. url.split(".").length - 1
  12759. ].toLocaleUpperCase()
  12760. ) != -1
  12761. ) {
  12762. this.dialogVisibleOffice = true
  12763. this.wurl = url
  12764. } else if (
  12765. "pdf".indexOf(
  12766. url.split(".")[
  12767. url.split(".").length - 1
  12768. ].toLocaleLowerCase()
  12769. ) != -1
  12770. ) {
  12771. this.dialogVisiblePdf = true
  12772. this.wurl = url
  12773. }
  12774. }
  12775. },
  12776. checkChpater2(e, ic){
  12777. let type = this.infoData2[ic].type
  12778. if(type == 3){
  12779. var fileA = [
  12780. "DOC",
  12781. "DOCX",
  12782. "DOCM",
  12783. "DOTM",
  12784. "DOTX",
  12785. "PPTX",
  12786. "PPSX",
  12787. "PPT",
  12788. "PPS",
  12789. "PPTM",
  12790. "POTM",
  12791. "PPAM",
  12792. "POTX",
  12793. "PPSM",
  12794. "XLSX",
  12795. "XLS"
  12796. ];
  12797. let url = this.infoData2[ic].url
  12798. if (
  12799. fileA.indexOf(
  12800. url.split(".")[
  12801. url.split(".").length - 1
  12802. ].toLocaleUpperCase()
  12803. ) != -1
  12804. ) {
  12805. this.dialogVisibleOffice = true
  12806. this.wurl = url
  12807. } else if (
  12808. "pdf".indexOf(
  12809. url.split(".")[
  12810. url.split(".").length - 1
  12811. ].toLocaleLowerCase()
  12812. ) != -1
  12813. ) {
  12814. this.dialogVisiblePdf = true
  12815. this.wurl = url
  12816. }
  12817. }
  12818. },
  12819. checkChpater3(e, ic, item){
  12820. let type = item.type
  12821. if(type == 3){
  12822. var fileA = [
  12823. "DOC",
  12824. "DOCX",
  12825. "DOCM",
  12826. "DOTM",
  12827. "DOTX",
  12828. "PPTX",
  12829. "PPSX",
  12830. "PPT",
  12831. "PPS",
  12832. "PPTM",
  12833. "POTM",
  12834. "PPAM",
  12835. "POTX",
  12836. "PPSM",
  12837. "XLSX",
  12838. "XLS"
  12839. ];
  12840. let url = item.url
  12841. if (
  12842. fileA.indexOf(
  12843. url.split(".")[
  12844. url.split(".").length - 1
  12845. ].toLocaleUpperCase()
  12846. ) != -1
  12847. ) {
  12848. this.dialogVisibleOffice = true
  12849. this.wurl = url
  12850. } else if (
  12851. "pdf".indexOf(
  12852. url.split(".")[
  12853. url.split(".").length - 1
  12854. ].toLocaleLowerCase()
  12855. ) != -1
  12856. ) {
  12857. this.dialogVisiblePdf = true
  12858. this.wurl = url
  12859. }
  12860. }
  12861. },
  12862. updataVideoC() {
  12863. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12864. this.taskCount
  12865. ].chapterData[this.lineCount].name = JSON.parse(
  12866. JSON.stringify(this.line)
  12867. );
  12868. this.dialogVisibleupdataVideoT = false;
  12869. this.$forceUpdate();
  12870. },
  12871. upCd(e, i, j, taskCount, ic) {
  12872. e.stopPropagation();
  12873. if (ic == 0) {
  12874. return;
  12875. }
  12876. var a = JSON.parse(
  12877. JSON.stringify(
  12878. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  12879. ic - 1
  12880. ]
  12881. )
  12882. );
  12883. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  12884. JSON.parse(
  12885. JSON.stringify(
  12886. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  12887. )
  12888. );
  12889. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  12890. this.$forceUpdate();
  12891. },
  12892. downCd(e, i, j, taskCount, ic) {
  12893. e.stopPropagation();
  12894. if (
  12895. ic ==
  12896. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  12897. 1
  12898. ) {
  12899. return;
  12900. }
  12901. var a = JSON.parse(
  12902. JSON.stringify(
  12903. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  12904. ic + 1
  12905. ]
  12906. )
  12907. );
  12908. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  12909. JSON.parse(
  12910. JSON.stringify(
  12911. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  12912. )
  12913. );
  12914. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  12915. this.$forceUpdate();
  12916. },
  12917. async upTool(e, i, j, tooli) {
  12918. e.stopPropagation();
  12919. if (tooli == 0) {
  12920. return;
  12921. }
  12922. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  12923. let count2 = await this.getWorksCount(3, i, j, tooli);
  12924. if (count1 > 0 || count2 > 0) {
  12925. this.$confirm(
  12926. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  12927. "提示",
  12928. {
  12929. confirmButtonText: "确定",
  12930. cancelButtonText: "取消",
  12931. type: "warning",
  12932. }
  12933. )
  12934. .then(() => {
  12935. var a = JSON.parse(
  12936. JSON.stringify(
  12937. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  12938. tooli - 1
  12939. ]
  12940. )
  12941. );
  12942. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  12943. JSON.parse(
  12944. JSON.stringify(
  12945. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12946. )
  12947. );
  12948. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12949. this.$forceUpdate();
  12950. })
  12951. .catch(() => {
  12952. return;
  12953. });
  12954. } else {
  12955. var a = JSON.parse(
  12956. JSON.stringify(
  12957. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  12958. )
  12959. );
  12960. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  12961. JSON.parse(
  12962. JSON.stringify(
  12963. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12964. )
  12965. );
  12966. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12967. this.$forceUpdate();
  12968. }
  12969. },
  12970. async downTool(e, i, j, tooli) {
  12971. e.stopPropagation();
  12972. if (
  12973. tooli ==
  12974. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  12975. ) {
  12976. return;
  12977. }
  12978. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  12979. let count2 = await this.getWorksCount(3, i, j, tooli);
  12980. if (count1 > 0 || count2 > 0) {
  12981. this.$confirm(
  12982. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  12983. "提示",
  12984. {
  12985. confirmButtonText: "确定",
  12986. cancelButtonText: "取消",
  12987. type: "warning",
  12988. }
  12989. )
  12990. .then(() => {
  12991. var a = JSON.parse(
  12992. JSON.stringify(
  12993. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  12994. tooli + 1
  12995. ]
  12996. )
  12997. );
  12998. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  12999. JSON.parse(
  13000. JSON.stringify(
  13001. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13002. )
  13003. );
  13004. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13005. this.$forceUpdate();
  13006. })
  13007. .catch(() => {
  13008. return;
  13009. });
  13010. } else {
  13011. var a = JSON.parse(
  13012. JSON.stringify(
  13013. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  13014. )
  13015. );
  13016. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  13017. JSON.parse(
  13018. JSON.stringify(
  13019. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  13020. )
  13021. );
  13022. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  13023. this.$forceUpdate();
  13024. }
  13025. },
  13026. addWork(type) {
  13027. if(type == 2 && this.courseName == "") {
  13028. this.$message.error("请补充填写课程名称");
  13029. return;
  13030. }
  13031. let cPan = 1;
  13032. for (var i = 0; i < this.unitJson.length; i++) {
  13033. for (
  13034. var j = 0;
  13035. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13036. j++
  13037. ) {
  13038. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13039. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13040. if (
  13041. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13042. ) {
  13043. for (
  13044. var z = 0;
  13045. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13046. z++
  13047. ) {
  13048. if (
  13049. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13050. .length
  13051. ) {
  13052. this.$message.error("请把工具添加完整");
  13053. cPan = 2;
  13054. break;
  13055. }
  13056. }
  13057. }
  13058. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13059. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13060. i
  13061. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13062. return ele.value != "" || ele.detail != "" || ele.target != "";
  13063. });
  13064. }
  13065. }
  13066. }
  13067. this.inputShow = true;
  13068. if (cPan == 2) {
  13069. this.steps--;
  13070. return;
  13071. }
  13072. for (var i = 0; i < this.unitJson.length; i++) {
  13073. delete this.unitJson[i].isUpdate;
  13074. }
  13075. if(!this.targetCourseText2){
  13076. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13077. }
  13078. let params = [
  13079. {
  13080. uid: this.userid,
  13081. title: this.courseName,
  13082. brief: this.courseText,
  13083. cover:
  13084. this.cover.length > 0
  13085. ? JSON.stringify(this.cover)
  13086. : JSON.stringify([
  13087. {
  13088. name: "noBanner.jpg",
  13089. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  13090. uid: 1656409780264,
  13091. status: "success",
  13092. },
  13093. ]),
  13094. evaId: this.evalua,
  13095. astudent:
  13096. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13097. see: this.isTeacherSee == true ? 1 : 0,
  13098. chapters: JSON.stringify(this.unitJson),
  13099. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  13100. courseType: JSON.stringify(this.courseTypeId),
  13101. ateacher:
  13102. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13103. inviteCode: JSON.stringify(this.inviteCode),
  13104. refile: JSON.stringify(this.infoData),
  13105. reBrief: this.courseText2,
  13106. cpote: JSON.stringify(this.cpote),
  13107. setting: JSON.stringify({
  13108. courseJie: this.courseJie,
  13109. courseTime: this.courseTime,
  13110. teacherInfoData: this.teacherInfoData,
  13111. teacherCourseText: this.teacherCourseText,
  13112. targetCourseText: this.targetCourseText,
  13113. cankaoInfoData: this.cankaoInfoData,
  13114. mubiaoInfoData: this.mubiaoInfoData,
  13115. xuanzeInfoData: this.xuanzeInfoData,
  13116. pingjiaInfoData: this.pingjiaInfoData,
  13117. infoData2: this.infoData2,
  13118. isuseT: this.isuseT,
  13119. mode: this.mode,
  13120. targetCourseText2: this.targetCourseText2,
  13121. chatid: this.chatid,
  13122. languageSetting: this.languageSetting,
  13123. knowInfoData: this.knowInfoData,
  13124. knowFileids: this.knowFileids,
  13125. knowInfoData2: this.knowInfoData2,
  13126. knowFileids2: this.knowFileids2,
  13127. recordVideoText: this.recordVideoText,
  13128. recordAudioUrl: this.recordAudioUrl,
  13129. appendixFile: this.appendixFile,
  13130. }),
  13131. iresearch: this.isFileSearch ? 1 : 2,
  13132. },
  13133. ];
  13134. this.ajax
  13135. .post(this.$store.state.api + "addWorkNew2AI3", params)
  13136. .then((res) => {
  13137. console.log(this.steps);
  13138. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13139. this.$message({
  13140. message: "新增成功",
  13141. type: "success",
  13142. });
  13143. }
  13144. this.number = res.data.ordernumber;
  13145. this.courseId = res.data.courseId;
  13146. this.cid = res.data.courseId;
  13147. this.courseUserid = this.userid;
  13148. this.islogin = true;
  13149. // this.updateCourseState(4);
  13150. this.updateCourseState(5);
  13151. this.addtips()
  13152. if(type == 2){
  13153. this.retrunCourse()
  13154. }
  13155. if(type == 3){
  13156. this.steps = 4
  13157. }
  13158. })
  13159. .catch((err) => {
  13160. this.$message.error("网络不佳");
  13161. console.error(err);
  13162. });
  13163. },
  13164. goCourse() {
  13165. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  13166. },
  13167. updateWork2() {
  13168. let _unitIndex = this.unitIndex;
  13169. let cPan = 1;
  13170. for (
  13171. var j = 0;
  13172. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13173. j++
  13174. ) {
  13175. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13176. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13177. j
  13178. ].proVisible2 = false;
  13179. if (
  13180. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13181. .length > 1
  13182. ) {
  13183. for (
  13184. var z = 0;
  13185. z <
  13186. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13187. .length;
  13188. z++
  13189. ) {
  13190. if (
  13191. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13192. z
  13193. ].tool.length
  13194. ) {
  13195. this.$message.error("请把工具添加完整");
  13196. cPan = 2;
  13197. break;
  13198. }
  13199. }
  13200. }
  13201. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13202. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13203. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13204. (ele) => {
  13205. return ele.value != "" || ele.detail != "" || ele.target != "";
  13206. }
  13207. );
  13208. }
  13209. }
  13210. this.inputShow = true;
  13211. if (cPan == 2) {
  13212. this.steps--;
  13213. return;
  13214. }
  13215. let params = [
  13216. {
  13217. cid: this.cid,
  13218. chapters: JSON.stringify(this.unitJson),
  13219. uid: this.userid,
  13220. unitIndex: _unitIndex,
  13221. },
  13222. ];
  13223. this.ajax
  13224. .post(this.$store.state.api + "updateWorkNew4", params)
  13225. .then((res) => {
  13226. this.$message({
  13227. message: "修改成功",
  13228. type: "success",
  13229. });
  13230. this.courseId = this.cid;
  13231. this.addtips();
  13232. })
  13233. .catch((err) => {
  13234. this.$message.error("网络不佳");
  13235. console.error(err);
  13236. });
  13237. },
  13238. updateWork3(unitIndex) {
  13239. let _unitIndex = unitIndex;
  13240. let cPan = 1;
  13241. for (
  13242. var j = 0;
  13243. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  13244. j++
  13245. ) {
  13246. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  13247. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  13248. j
  13249. ].proVisible2 = false;
  13250. if (
  13251. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13252. .length > 1
  13253. ) {
  13254. for (
  13255. var z = 0;
  13256. z <
  13257. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  13258. .length;
  13259. z++
  13260. ) {
  13261. if (
  13262. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  13263. z
  13264. ].tool.length
  13265. ) {
  13266. this.$message.error("请把工具添加完整");
  13267. cPan = 2;
  13268. break;
  13269. }
  13270. }
  13271. }
  13272. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  13273. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  13274. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  13275. (ele) => {
  13276. return ele.value != "" || ele.detail != "" || ele.target != "";
  13277. }
  13278. );
  13279. }
  13280. }
  13281. this.inputShow = true;
  13282. if (cPan == 2) {
  13283. this.steps--;
  13284. return;
  13285. }
  13286. let params = [
  13287. {
  13288. cid: this.cid,
  13289. chapters: JSON.stringify(this.unitJson),
  13290. uid: this.userid,
  13291. unitIndex: _unitIndex,
  13292. },
  13293. ];
  13294. this.ajax
  13295. .post(this.$store.state.api + "updateWorkNew4", params)
  13296. .then((res) => {
  13297. // this.$message({
  13298. // message: "修改成功",
  13299. // type: "success",
  13300. // });
  13301. this.courseId = this.cid;
  13302. this.addtips()
  13303. })
  13304. .catch((err) => {
  13305. this.$message.error("网络不佳");
  13306. console.error(err);
  13307. });
  13308. },
  13309. updateWork() {
  13310. let cPan = 1;
  13311. for (var i = 0; i < this.unitJson.length; i++) {
  13312. for (
  13313. var j = 0;
  13314. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  13315. j++
  13316. ) {
  13317. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  13318. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  13319. if (
  13320. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  13321. ) {
  13322. for (
  13323. var z = 0;
  13324. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  13325. z++
  13326. ) {
  13327. if (
  13328. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  13329. .length
  13330. ) {
  13331. this.$message.error("请把工具添加完整");
  13332. cPan = 2;
  13333. break;
  13334. }
  13335. }
  13336. }
  13337. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  13338. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  13339. i
  13340. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  13341. return ele.value != "" || ele.detail != "" || ele.target != "";
  13342. });
  13343. }
  13344. }
  13345. }
  13346. this.inputShow = true;
  13347. if (cPan == 2) {
  13348. this.steps--;
  13349. return;
  13350. }
  13351. for (var i = 0; i < this.unitJson.length; i++) {
  13352. delete this.unitJson[i].isUpdate;
  13353. }
  13354. if(!this.targetCourseText2){
  13355. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  13356. }
  13357. let params = [
  13358. {
  13359. cid: this.cid,
  13360. title: this.courseName,
  13361. brief: this.courseText,
  13362. cover:
  13363. this.cover.length > 0
  13364. ? JSON.stringify(this.cover)
  13365. : JSON.stringify([
  13366. {
  13367. name: "noBanner.jpg",
  13368. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  13369. uid: 1656409780264,
  13370. status: "success",
  13371. },
  13372. ]),
  13373. evaId: this.evalua,
  13374. astudent:
  13375. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  13376. see: this.isTeacherSee == true ? 1 : 0,
  13377. chapters: JSON.stringify(this.unitJson),
  13378. template: this.myWord != "undefined" ? this.myWord : [],
  13379. uid: this.userid,
  13380. courseType: JSON.stringify(this.courseTypeId),
  13381. ateacher:
  13382. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  13383. inviteCode: JSON.stringify(this.inviteCode),
  13384. refile: JSON.stringify(this.infoData),
  13385. reBrief: this.courseText2,
  13386. cpote: JSON.stringify(this.cpote),
  13387. setting: JSON.stringify({
  13388. courseJie: this.courseJie,
  13389. courseTime: this.courseTime,
  13390. teacherInfoData: this.teacherInfoData,
  13391. teacherCourseText: this.teacherCourseText,
  13392. targetCourseText: this.targetCourseText,
  13393. cankaoInfoData: this.cankaoInfoData,
  13394. mubiaoInfoData: this.mubiaoInfoData,
  13395. xuanzeInfoData: this.xuanzeInfoData,
  13396. pingjiaInfoData: this.pingjiaInfoData,
  13397. infoData2: this.infoData2,
  13398. isuseT: this.isuseT,
  13399. mode: this.mode,
  13400. targetCourseText2: this.targetCourseText2,
  13401. chatid: this.chatid,
  13402. languageSetting: this.languageSetting,
  13403. knowInfoData: this.knowInfoData,
  13404. knowFileids: this.knowFileids,
  13405. knowInfoData2: this.knowInfoData2,
  13406. knowFileids2: this.knowFileids2,
  13407. recordVideoText: this.recordVideoText,
  13408. recordAudioUrl: this.recordAudioUrl,
  13409. appendixFile: this.appendixFile,
  13410. }),
  13411. iresearch: this.isFileSearch ? 1 : 2,
  13412. },
  13413. ];
  13414. this.ajax
  13415. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  13416. .then((res) => {
  13417. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  13418. if (this.cidType == 1) {
  13419. this.$message({
  13420. message: "修改成功",
  13421. type: "success",
  13422. });
  13423. } else {
  13424. this.$message({
  13425. message: "新增成功",
  13426. type: "success",
  13427. });
  13428. }
  13429. }
  13430. this.number = this.nbOrder;
  13431. this.courseId = this.cid;
  13432. this.addtips()
  13433. })
  13434. .catch((err) => {
  13435. this.$message.error("网络不佳");
  13436. console.error(err);
  13437. });
  13438. },
  13439. insertWord() {
  13440. this.dialogVisible1 = true;
  13441. this.updateBoolean2 = false;
  13442. this.tTitle = "";
  13443. this.tdetail = "";
  13444. },
  13445. addWord() {
  13446. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  13447. name: this.tTitle,
  13448. content: this.tdetail,
  13449. uid: this.guid(),
  13450. });
  13451. this.dialogVisible1 = false;
  13452. },
  13453. upWord() { },
  13454. selectWord(uid, i, c) {
  13455. this.dialogVisible1 = true;
  13456. this.updateBoolean2 = true;
  13457. if (
  13458. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  13459. ) {
  13460. this.tTitle =
  13461. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  13462. this.tdetail =
  13463. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  13464. }
  13465. },
  13466. isAddPP() {
  13467. if (this.checkboxList.length > 0) {
  13468. this.$message({
  13469. message: "添加成功",
  13470. type: "success",
  13471. });
  13472. this.dialogVisible3 = false;
  13473. } else {
  13474. this.$message({
  13475. message: "请添加课程成员",
  13476. type: "error",
  13477. });
  13478. }
  13479. },
  13480. isAddClass() {
  13481. this.dialogVisibleClass = false;
  13482. },
  13483. isAddPPTeacher() {
  13484. this.dialogVisibleMember = false;
  13485. this.setMan();
  13486. },
  13487. getTipsTemplate(){
  13488. if(this.templateid){
  13489. let params = {
  13490. id: this.templateid
  13491. }
  13492. this.ajax
  13493. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13494. .then((res) => {
  13495. if(res.data[0].length){
  13496. this.tipsJson = res.data[0][0]
  13497. this.aiJson = JSON.parse(res.data[0][0].tips)
  13498. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13499. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13500. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13501. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13502. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13503. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13504. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13505. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13506. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13507. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13508. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13509. }
  13510. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13511. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13512. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13513. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  13514. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  13515. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  13516. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  13517. - 我们的课程主题可以如何与学生的实际生活联系起来?
  13518. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  13519. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  13520. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  13521. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  13522. - 学生个人最终要完成什么?学生小组最终要完成什么?
  13523. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  13524. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  13525. 问题:<议程和问题引导>中的问题
  13526. 讨论:<转文本内容>`
  13527. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下<讨论>,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  13528. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  13529. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  13530. // }
  13531. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  13532. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13533. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13534. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13535. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  13536. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13537. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  13538. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13539. // }
  13540. this.$forceUpdate();
  13541. this.isDialog = res.data[0][0].isDialog
  13542. }
  13543. })
  13544. .catch((err) => { });
  13545. }
  13546. },
  13547. getTipsTemplateIsDialog(){
  13548. if(this.templateid){
  13549. let params = {
  13550. id: this.templateid
  13551. }
  13552. this.ajax
  13553. .get(this.$store.state.api + "selectTipsTemplateById", params)
  13554. .then((res) => {
  13555. if(res.data[0].length){
  13556. this.isDialog = res.data[0][0].isDialog
  13557. }
  13558. })
  13559. .catch((err) => { });
  13560. }
  13561. },
  13562. getTemplate() {
  13563. this.ajax
  13564. .get(this.$store.state.api + "getCourseTemplateT", "")
  13565. .then((res) => {
  13566. this.templateArray = res.data[0];
  13567. this.getTemplateOid();
  13568. this.$forceUpdate();
  13569. })
  13570. .catch((err) => { });
  13571. },
  13572. getTemplateOid() {
  13573. let params = {
  13574. oid: this.oid,
  13575. };
  13576. this.ajax
  13577. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13578. .then((res) => {
  13579. if (res.data[0].length) {
  13580. this.templateArray = [...res.data[0], ...this.templateArray];
  13581. }
  13582. this.getTemplateOrg();
  13583. this.$forceUpdate();
  13584. })
  13585. .catch((err) => { });
  13586. },
  13587. getTemplateOrg() {
  13588. let params = {
  13589. oid: this.org,
  13590. };
  13591. this.ajax
  13592. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13593. .then((res) => {
  13594. if (res.data[0].length) {
  13595. this.templateArray = [...res.data[0], ...this.templateArray];
  13596. }
  13597. this.$forceUpdate();
  13598. })
  13599. .catch((err) => { });
  13600. },
  13601. clearChoose() {
  13602. this.clearArray.splice(this.templateC.id, 1);
  13603. this.dialogVisible2 = false;
  13604. },
  13605. clearAttText() {
  13606. this.AttText = {
  13607. title: "",
  13608. text: "",
  13609. };
  13610. this.dialogVisible6 = false;
  13611. },
  13612. clearLine() {
  13613. this.line = "";
  13614. this.dialogVisible7 = false;
  13615. },
  13616. openTemplate() {
  13617. this.ctJson = {};
  13618. this.templateDialog = true;
  13619. },
  13620. checkctJson(json) {
  13621. if (this.ctJson.id == json.id) {
  13622. this.ctJson = {};
  13623. } else {
  13624. this.ctJson = json;
  13625. }
  13626. },
  13627. addTemplate(res) {
  13628. let _this = this;
  13629. let _res = [];
  13630. if (res.id == 1) {
  13631. _res = [
  13632. {
  13633. dyName: "", //单元标题
  13634. easy: 1,
  13635. chapterInfo: [
  13636. {
  13637. isread: false,
  13638. chapterid: this.guid(),
  13639. title: "",
  13640. courseName: "",
  13641. taskJson: [
  13642. {
  13643. task: "",
  13644. taskDetail: "",
  13645. chapterData: [],
  13646. toolText: "",
  13647. toolChoose: [
  13648. {
  13649. tool: [],
  13650. toolDetail: "",
  13651. toolType: 0,
  13652. askCount: 1,
  13653. askTitle: "",
  13654. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13655. },
  13656. ],
  13657. isShowTools: false,
  13658. askCount: 1,
  13659. isFold: 1,
  13660. askTitle: "",
  13661. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13662. checkJson: [{ checkCount: [], checkPerent: [] }],
  13663. homeworkList: [],
  13664. },
  13665. ],
  13666. itemCount: 1,
  13667. fileList1: [],
  13668. video: [],
  13669. testData: [],
  13670. pData: [],
  13671. templateArray: [],
  13672. },
  13673. ],
  13674. },
  13675. ];
  13676. this.updateCourseState(1);
  13677. } else if (res.id == 2) {
  13678. let stageData = [];
  13679. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13680. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13681. if (!iframe && !iframe2) {
  13682. this.$message.error("请使用AI共创生成");
  13683. return;
  13684. }
  13685. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13686. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13687. if (
  13688. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13689. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13690. ) {
  13691. this.$message.error("请使用AI共创生成");
  13692. return;
  13693. }
  13694. stageData = copyData
  13695. ? copyData.stageData
  13696. : copyData2
  13697. ? copyData2.stageData
  13698. : [""];
  13699. for (var i = 0; i < stageData.length; i++) {
  13700. _res.push({
  13701. dyName: stageData[i], //单元标题
  13702. chapterInfo: [
  13703. {
  13704. isread: false,
  13705. chapterid: this.guid(),
  13706. title: "",
  13707. courseName: "",
  13708. taskJson: [
  13709. {
  13710. task: "",
  13711. taskDetail: "",
  13712. chapterData: [],
  13713. toolText: "",
  13714. toolChoose: [
  13715. {
  13716. tool: [],
  13717. toolDetail: "",
  13718. toolType: 0,
  13719. askCount: 1,
  13720. askTitle: "",
  13721. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13722. },
  13723. ],
  13724. isShowTools: false,
  13725. askCount: 1,
  13726. isFold: 1,
  13727. askTitle: "",
  13728. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13729. checkJson: [{ checkCount: [], checkPerent: [] }],
  13730. homeworkList: [],
  13731. },
  13732. ],
  13733. itemCount: 1,
  13734. fileList1: [],
  13735. video: [],
  13736. testData: [],
  13737. pData: [],
  13738. templateArray: [],
  13739. },
  13740. ],
  13741. });
  13742. }
  13743. this.updateCourseState(1);
  13744. } else if (!Object.keys(res).length) {
  13745. this.$message.error("请选择模板");
  13746. retrun;
  13747. } else {
  13748. _res = JSON.parse(res.chapters);
  13749. this.updateCourseState(parseInt(res.state));
  13750. }
  13751. _this
  13752. .$confirm(
  13753. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13754. "提示",
  13755. {
  13756. confirmButtonText: "确定",
  13757. cancelButtonText: "取消",
  13758. type: "warning",
  13759. }
  13760. )
  13761. .then(() => {
  13762. _this.unitJson = _res;
  13763. _this.updateWork();
  13764. // _this.steps++;
  13765. _this.templateDialog = false;
  13766. setTimeout(() => {
  13767. this.checkEva(this.checkId);
  13768. setTimeout(() => {
  13769. this.checkEva(this.checkId);
  13770. }, 100);
  13771. }, 1000);
  13772. })
  13773. .catch(() => {
  13774. return;
  13775. });
  13776. },
  13777. checkTemplate(res) {
  13778. let _this = this;
  13779. _this
  13780. .$confirm(
  13781. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13782. "提示",
  13783. {
  13784. confirmButtonText: "确定",
  13785. cancelButtonText: "取消",
  13786. type: "warning",
  13787. }
  13788. )
  13789. .then(() => {
  13790. _this.unitJson = JSON.parse(res.chapters);
  13791. _this.steps++;
  13792. setTimeout(() => {
  13793. this.checkEva(this.checkId);
  13794. setTimeout(() => {
  13795. this.checkEva(this.checkId);
  13796. }, 100);
  13797. }, 1000);
  13798. })
  13799. .catch(() => {
  13800. return;
  13801. });
  13802. },
  13803. checkTemplate1(w) {
  13804. this.steps++;
  13805. },
  13806. checkTemplate2() {
  13807. let _this = this;
  13808. _this
  13809. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  13810. confirmButtonText: "确定",
  13811. cancelButtonText: "取消",
  13812. type: "warning",
  13813. })
  13814. .then(() => {
  13815. _this.unitIndex = 0;
  13816. _this.unitJson = [
  13817. {
  13818. dyName: "", //单元标题
  13819. chapterInfo: [
  13820. {
  13821. isread: false,
  13822. chapterid: this.guid(),
  13823. title: "",
  13824. courseName: "",
  13825. taskJson: [
  13826. {
  13827. task: "",
  13828. taskDetail: "",
  13829. chapterData: [],
  13830. toolText: "",
  13831. toolChoose: [
  13832. {
  13833. tool: [],
  13834. toolDetail: "",
  13835. toolType: 0,
  13836. askCount: 1,
  13837. askTitle: "",
  13838. askJson: [
  13839. { askstitle: "", askItem: 1, checkList: [] },
  13840. ],
  13841. },
  13842. ],
  13843. isShowTools: false,
  13844. askCount: 1,
  13845. isFold: 1,
  13846. askTitle: "",
  13847. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13848. checkJson: [{ checkCount: [], checkPerent: [] }],
  13849. homeworkList: [],
  13850. },
  13851. ],
  13852. itemCount: 1,
  13853. fileList1: [],
  13854. video: [],
  13855. testData: [],
  13856. pData: [],
  13857. templateArray: [],
  13858. },
  13859. ],
  13860. },
  13861. ];
  13862. this.steps++;
  13863. setTimeout(() => {
  13864. this.checkEva(this.checkId);
  13865. setTimeout(() => {
  13866. this.checkEva(this.checkId);
  13867. }, 100);
  13868. }, 1000);
  13869. this.updateWork();
  13870. })
  13871. .catch(() => {
  13872. return;
  13873. });
  13874. },
  13875. checkTemplate3() {
  13876. let _this = this;
  13877. _this
  13878. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  13879. confirmButtonText: "确定",
  13880. cancelButtonText: "取消",
  13881. type: "warning",
  13882. })
  13883. .then(() => {
  13884. _this.unitIndex = 0;
  13885. _this.unitJson = [
  13886. {
  13887. dyName: "", //单元标题
  13888. easy: 1,
  13889. chapterInfo: [
  13890. {
  13891. isread: false,
  13892. chapterid: this.guid(),
  13893. title: "",
  13894. courseName: "",
  13895. taskJson: [
  13896. {
  13897. task: "",
  13898. taskDetail: "",
  13899. chapterData: [],
  13900. toolText: "",
  13901. toolChoose: [
  13902. {
  13903. tool: [],
  13904. toolDetail: "",
  13905. toolType: 0,
  13906. askCount: 1,
  13907. askTitle: "",
  13908. askJson: [
  13909. { askstitle: "", askItem: 1, checkList: [] },
  13910. ],
  13911. },
  13912. ],
  13913. isShowTools: false,
  13914. askCount: 1,
  13915. isFold: 1,
  13916. askTitle: "",
  13917. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13918. checkJson: [{ checkCount: [], checkPerent: [] }],
  13919. homeworkList: [],
  13920. },
  13921. ],
  13922. itemCount: 1,
  13923. fileList1: [],
  13924. video: [],
  13925. testData: [],
  13926. pData: [],
  13927. templateArray: [],
  13928. },
  13929. ],
  13930. },
  13931. ];
  13932. // this.steps++;
  13933. this.updateWork();
  13934. })
  13935. .catch(() => {
  13936. return;
  13937. });
  13938. },
  13939. checkTemplate4() {
  13940. let _this = this;
  13941. _this
  13942. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  13943. confirmButtonText: "确定",
  13944. cancelButtonText: "取消",
  13945. type: "warning",
  13946. })
  13947. .then(() => {
  13948. _this.unitIndex = 0;
  13949. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  13950. this.steps++;
  13951. this.updateWork();
  13952. })
  13953. .catch(() => {
  13954. return;
  13955. });
  13956. },
  13957. wordNext() {
  13958. this.dialogVisible2 = false;
  13959. },
  13960. isAddOrUpdateAttText() {
  13961. if (this.AttTextType == 0) {
  13962. this.addAttTextMessage();
  13963. } else {
  13964. this.updateAttText();
  13965. }
  13966. },
  13967. isAddOrUpdateLine() {
  13968. if (!this.lineTitle) {
  13969. this.$message.error("请填写链接标题");
  13970. return;
  13971. }
  13972. if (this.lineType == 0) {
  13973. this.addLine();
  13974. } else {
  13975. this.updateLine();
  13976. }
  13977. },
  13978. addAttTextMessage() {
  13979. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13980. this.taskCount
  13981. ].chapterData.unshift({
  13982. name: this.AttText.title,
  13983. url: this.AttText.text,
  13984. type: 6,
  13985. });
  13986. this.imgChange1(null, null, 6, this.taskCount);
  13987. this.dialogVisible6 = false;
  13988. },
  13989. selectAttText(itemTaskIndex, i) {
  13990. this.AttText.title =
  13991. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13992. itemTaskIndex
  13993. ].chapterData[i].name;
  13994. this.AttText.text =
  13995. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13996. itemTaskIndex
  13997. ].chapterData[i].url;
  13998. this.taskCount = itemTaskIndex;
  13999. this.AttTextIndex = i;
  14000. this.AttTextType = 1;
  14001. this.dialogVisible6 = true;
  14002. },
  14003. updateAttText() {
  14004. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14005. this.taskCount
  14006. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  14007. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14008. this.taskCount
  14009. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  14010. this.dialogVisible6 = false;
  14011. },
  14012. addLine() {
  14013. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14014. this.lineCount
  14015. ].chapterData.unshift({
  14016. name: "链接",
  14017. title: this.lineTitle,
  14018. url: this.line,
  14019. type: 8,
  14020. });
  14021. this.imgChange1(null, null, 8, this.lineCount);
  14022. this.dialogVisible7 = false;
  14023. },
  14024. selectLine(itemTaskIndex, i) {
  14025. this.line =
  14026. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14027. itemTaskIndex
  14028. ].chapterData[i].url;
  14029. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14030. itemTaskIndex
  14031. ].chapterData[i].title
  14032. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14033. .chapterData[i].title
  14034. : "";
  14035. this.taskCount = itemTaskIndex;
  14036. this.lineCount = i;
  14037. this.lineType = 1;
  14038. this.dialogVisible7 = true;
  14039. },
  14040. openUpdateSource(itemTaskIndex, i) {
  14041. this.sourceData = {};
  14042. let source =
  14043. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14044. .chapterData[i];
  14045. this.sourceData[source.id] = {};
  14046. this.sourceData[source.id].name = source.title;
  14047. this.sourceData[source.id].url = source.url;
  14048. this.dialogVisibleSource = true;
  14049. this.updateSourcePan = true;
  14050. this.taskCount = itemTaskIndex;
  14051. this.lineCount = i;
  14052. },
  14053. updateLine() {
  14054. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14055. this.taskCount
  14056. ].chapterData[this.lineCount].url = this.line;
  14057. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14058. this.taskCount
  14059. ].chapterData[this.lineCount].title = this.lineTitle;
  14060. this.dialogVisible7 = false;
  14061. },
  14062. addPP() {
  14063. this.dialogVisible3 = true;
  14064. },
  14065. goTo(path) {
  14066. this.$router.push(path);
  14067. },
  14068. openTools(itemTaskIndex, i, toolIndex) {
  14069. this.toolIndex = toolIndex;
  14070. this.taskCount = itemTaskIndex;
  14071. if (i == 4) {
  14072. if (toolIndex == null) {
  14073. var a =
  14074. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14075. .chapterData;
  14076. for (var i = 0; i < a.length; i++) {
  14077. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  14078. this.askJson =
  14079. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14080. itemTaskIndex
  14081. ].chapterData[i].askJson;
  14082. }
  14083. }
  14084. } else {
  14085. this.askJson = JSON.parse(
  14086. JSON.stringify(
  14087. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14088. itemTaskIndex
  14089. ].toolChoose[toolIndex]
  14090. )
  14091. );
  14092. }
  14093. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  14094. this.dialogVisible5 = true;
  14095. } else if (i == 45) {
  14096. if (
  14097. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14098. .toolChoose[toolIndex].testJson
  14099. ) {
  14100. this.testJson = JSON.parse(
  14101. JSON.stringify(
  14102. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14103. itemTaskIndex
  14104. ].toolChoose[toolIndex].testJson
  14105. )
  14106. );
  14107. } else {
  14108. var testJson = {
  14109. testCount: 1,
  14110. testTitle: "",
  14111. testJson: [
  14112. {
  14113. teststitle: "",
  14114. testItem: 1,
  14115. checkList: [],
  14116. timuList: [],
  14117. answer: [],
  14118. type: "1",
  14119. },
  14120. ],
  14121. };
  14122. this.testJson = testJson;
  14123. }
  14124. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  14125. this.dialogVisibleChoice = true;
  14126. } else if (i == 47) {
  14127. if (
  14128. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14129. .toolChoose[toolIndex].sentenceList
  14130. ) {
  14131. this.sentenceList = JSON.parse(
  14132. JSON.stringify(
  14133. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14134. itemTaskIndex
  14135. ].toolChoose[toolIndex].sentenceList
  14136. )
  14137. );
  14138. } else {
  14139. var sentenceList = [
  14140. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14141. ];
  14142. this.sentenceList = sentenceList;
  14143. }
  14144. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  14145. this.dialogVisibleSentence = true;
  14146. } else if (i == 48) {
  14147. if (
  14148. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14149. .toolChoose[toolIndex].tableJson
  14150. ) {
  14151. this.tableJson = JSON.parse(
  14152. JSON.stringify(
  14153. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14154. itemTaskIndex
  14155. ].toolChoose[toolIndex].tableJson
  14156. )
  14157. );
  14158. } else {
  14159. var tableJson = { text: "" };
  14160. this.tableJson = tableJson;
  14161. }
  14162. this.dialogVisibleTable = true;
  14163. } else if (i == 52) {
  14164. if (
  14165. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14166. .toolChoose[toolIndex].wordJson
  14167. ) {
  14168. this.wordJson = JSON.parse(
  14169. JSON.stringify(
  14170. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14171. itemTaskIndex
  14172. ].toolChoose[toolIndex].wordJson
  14173. )
  14174. );
  14175. } else {
  14176. var wordJson = { text: "" };
  14177. this.wordJson = wordJson;
  14178. }
  14179. this.dialogVisibleWord = true;
  14180. // else if (i == 50) {
  14181. // if (
  14182. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14183. // .toolChoose[toolIndex].uploadJson
  14184. // ) {
  14185. // this.uploadJson = JSON.parse(
  14186. // JSON.stringify(
  14187. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14188. // itemTaskIndex
  14189. // ].toolChoose[toolIndex].uploadJson
  14190. // )
  14191. // );
  14192. // } else {
  14193. // var uploadJson = [];
  14194. // this.uploadJson = uploadJson;
  14195. // }
  14196. // this.dialogVisibleMoreUpload = true;
  14197. // }
  14198. } else if (i == 10) {
  14199. if (
  14200. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14201. .toolChoose[toolIndex].preTime
  14202. ) {
  14203. this.preTime = JSON.parse(
  14204. JSON.stringify(
  14205. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14206. itemTaskIndex
  14207. ].toolChoose[toolIndex].preTime
  14208. )
  14209. );
  14210. } else {
  14211. var preTime = 0;
  14212. this.preTime = preTime;
  14213. }
  14214. this.dialogVisiblePreTime = true;
  14215. } else if (i == 49) {
  14216. if (
  14217. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14218. .toolChoose[toolIndex].groupJson
  14219. ) {
  14220. this.groupJson = JSON.parse(
  14221. JSON.stringify(
  14222. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14223. itemTaskIndex
  14224. ].toolChoose[toolIndex].groupJson
  14225. )
  14226. );
  14227. } else {
  14228. var groupJson = {
  14229. group: [{ name: "第1组" }],
  14230. number: undefined,
  14231. islock: 1,
  14232. };
  14233. this.groupJson = groupJson;
  14234. }
  14235. this.dialogVisibleGroup = true;
  14236. } else if (i == 62) {
  14237. if (
  14238. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14239. .toolChoose[toolIndex].videoJson
  14240. ) {
  14241. this.videoJson = JSON.parse(
  14242. JSON.stringify(
  14243. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14244. itemTaskIndex
  14245. ].toolChoose[toolIndex].videoJson
  14246. )
  14247. );
  14248. } else {
  14249. var videoJson = {
  14250. video: "",
  14251. setting: [],
  14252. };
  14253. this.videoJson = videoJson;
  14254. }
  14255. this.dialogVisibleVideo = true;
  14256. } else if (i == 15) {
  14257. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14258. itemTaskIndex
  14259. ].toolChoose[toolIndex].answerQ
  14260. ? JSON.parse(
  14261. JSON.stringify(
  14262. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14263. itemTaskIndex
  14264. ].toolChoose[toolIndex].answerQ
  14265. )
  14266. )
  14267. : "";
  14268. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  14269. this.dialogVisible8 = true;
  14270. } else if (i == 40) {
  14271. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14272. itemTaskIndex
  14273. ].toolChoose[toolIndex].rateJson
  14274. ? JSON.parse(
  14275. JSON.stringify(
  14276. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14277. itemTaskIndex
  14278. ].toolChoose[toolIndex].rateJson
  14279. )
  14280. )
  14281. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  14282. this.selectSteps = 1;
  14283. this.dialogVisibleRate = true;
  14284. } else if (i == 42) {
  14285. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14286. itemTaskIndex
  14287. ].toolChoose[toolIndex].answerQ
  14288. ? JSON.parse(
  14289. JSON.stringify(
  14290. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14291. itemTaskIndex
  14292. ].toolChoose[toolIndex].answerQ
  14293. )
  14294. )
  14295. : "";
  14296. this.dialogVisibleMp3 = true;
  14297. } else if (i == 41) {
  14298. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14299. itemTaskIndex
  14300. ].toolChoose[toolIndex].selectJson
  14301. ? JSON.parse(
  14302. JSON.stringify(
  14303. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14304. itemTaskIndex
  14305. ].toolChoose[toolIndex].selectJson
  14306. )
  14307. )
  14308. : { url: "", select: [], answer: [] };
  14309. this.selectSteps = 1;
  14310. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  14311. this.dialogVisibleSelect = true;
  14312. } else if (i == 3) {
  14313. top.postMessage(
  14314. {
  14315. tools: "3y",
  14316. cid: this.cid,
  14317. stage: this.unitIndex,
  14318. task: itemTaskIndex,
  14319. tool: toolIndex,
  14320. },
  14321. "*"
  14322. );
  14323. } else if (i == 1) {
  14324. top.postMessage(
  14325. {
  14326. tools: "1y",
  14327. cid: this.cid,
  14328. stage: this.unitIndex,
  14329. task: itemTaskIndex,
  14330. tool: toolIndex,
  14331. },
  14332. "*"
  14333. );
  14334. } else if (i == 57) {
  14335. top.postMessage(
  14336. {
  14337. tools: "57y",
  14338. cid: this.cid,
  14339. stage: this.unitIndex,
  14340. task: itemTaskIndex,
  14341. tool: toolIndex,
  14342. },
  14343. "*"
  14344. );
  14345. } else if (i == 69) {
  14346. this.englishList = {};
  14347. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  14348. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  14349. ? JSON.parse(
  14350. JSON.stringify(
  14351. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14352. itemTaskIndex
  14353. ].toolChoose[toolIndex].englishList
  14354. )
  14355. )
  14356. : {};
  14357. this.$forceUpdate();
  14358. this.englishDialogVisible = true;
  14359. } else if (i == 70) {
  14360. this.englishVoiceJson = {};
  14361. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  14362. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  14363. ? JSON.parse(
  14364. JSON.stringify(
  14365. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14366. itemTaskIndex
  14367. ].toolChoose[toolIndex].englishVoiceJson
  14368. )
  14369. )
  14370. : {
  14371. title: '',
  14372. detail: '',
  14373. array: []
  14374. };
  14375. // {
  14376. // time: "",
  14377. // class: "",
  14378. // difficulty: 0,
  14379. // topic: "",
  14380. // isShow: false,
  14381. // eva: 0,
  14382. // aiEva: {
  14383. // isAiEva: false,
  14384. // aiEvaChoose: [],
  14385. // },
  14386. // allfType: [],
  14387. // englishJson: {},
  14388. // };
  14389. this.$forceUpdate();
  14390. this.EnglishVoiceDialog = true;
  14391. }else if(i == 72){
  14392. let appJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14393. itemTaskIndex
  14394. ].toolChoose[toolIndex].appJson
  14395. ? JSON.parse(
  14396. JSON.stringify(
  14397. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14398. itemTaskIndex
  14399. ].toolChoose[toolIndex].appJson
  14400. )
  14401. )
  14402. : {
  14403. url:'',
  14404. };
  14405. this.$forceUpdate();
  14406. this.$refs.appDialog.openG(appJson,this.unitIndex,itemTaskIndex,toolIndex);
  14407. }
  14408. },
  14409. setEnglishVoiceJson(val) {
  14410. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14411. this.taskCount
  14412. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  14413. JSON.stringify(val)
  14414. );
  14415. this.$forceUpdate();
  14416. if (
  14417. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14418. .toolChoose[this.toolIndex].tool != 70
  14419. ) {
  14420. this.addTools(70, this.taskCount, this.toolIndex);
  14421. }
  14422. },
  14423. chapAddTools(i) {
  14424. if (this.chapTools[0].tools.length == 0) {
  14425. this.chapTools[0].tools.push(i);
  14426. } else {
  14427. if (this.chapTools[0].tools.indexOf(i) != -1) {
  14428. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  14429. } else {
  14430. this.chapTools[0].tools.push(i);
  14431. }
  14432. }
  14433. this.$forceUpdate();
  14434. },
  14435. addChaptersDataTools() {
  14436. if (this.chapTools[0].tools.indexOf(4) != -1) {
  14437. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14438. this.chapCount
  14439. ].chapterData.unshift({
  14440. name: this.chapTools[0].toolDetail,
  14441. url: this.chapTools[0].tools,
  14442. type: 7,
  14443. askJson: this.askJson,
  14444. });
  14445. } else {
  14446. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14447. this.chapCount
  14448. ].chapterData.unshift({
  14449. name: this.chapTools[0].toolDetail,
  14450. url: this.chapTools[0].tools,
  14451. type: 7,
  14452. });
  14453. }
  14454. this.imgChange1(null, null, 7, this.chapCount);
  14455. this.dialogVisible4 = false;
  14456. },
  14457. addTools(i, itemTaskIndex, toolIndex) {
  14458. // if (
  14459. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14460. // .toolChoose[toolIndex].tool.length == 0
  14461. // ) {
  14462. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14463. // itemTaskIndex
  14464. // ].toolChoose[toolIndex].tool.push(i);
  14465. // } else {
  14466. // if (
  14467. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14468. // itemTaskIndex
  14469. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14470. // ) {
  14471. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14472. // itemTaskIndex
  14473. // ].toolChoose[toolIndex].tool.splice(
  14474. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14475. // itemTaskIndex
  14476. // ].toolChoose[toolIndex].tool.indexOf(i),
  14477. // 1
  14478. // );
  14479. // } else {
  14480. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14481. // itemTaskIndex
  14482. // ].toolChoose[toolIndex].tool.push(i);
  14483. // }
  14484. // console.log(
  14485. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14486. // .toolChoose[toolIndex].tool
  14487. // );
  14488. // }
  14489. if (i == 4) {
  14490. if (
  14491. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14492. .toolChoose[toolIndex].askJson.askTitle == "" ||
  14493. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14494. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  14495. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14496. .toolChoose[toolIndex].askJson[0].checkList < 2
  14497. ) {
  14498. this.openTools(itemTaskIndex, 4, toolIndex);
  14499. // this.$message({
  14500. // message: "请填写完整问卷内容",
  14501. // type: "error",
  14502. // });
  14503. return;
  14504. }
  14505. }
  14506. if (i == 45) {
  14507. if (
  14508. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14509. .toolChoose[toolIndex].testJson ||
  14510. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14511. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  14512. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14513. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  14514. ) {
  14515. this.openTools(itemTaskIndex, 45, toolIndex);
  14516. // this.$message({
  14517. // message: "请填写完整问卷内容",
  14518. // type: "error",
  14519. // });
  14520. return;
  14521. }
  14522. }
  14523. if (i == 47) {
  14524. if (
  14525. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14526. .toolChoose[toolIndex].sentenceList ||
  14527. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14528. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  14529. ) {
  14530. this.openTools(itemTaskIndex, 47, toolIndex);
  14531. return;
  14532. }
  14533. }
  14534. if (i == 69) {
  14535. if (
  14536. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14537. .toolChoose[toolIndex].englishList
  14538. ) {
  14539. this.openTools(itemTaskIndex, 69, toolIndex);
  14540. return;
  14541. }
  14542. }
  14543. if (i == 70) {
  14544. if (
  14545. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14546. .toolChoose[toolIndex].englishVoiceJson
  14547. ) {
  14548. this.openTools(itemTaskIndex, 70, toolIndex);
  14549. return;
  14550. }
  14551. }
  14552. if(i == 72){
  14553. if (
  14554. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14555. .toolChoose[toolIndex].appJson || Object.keys(this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14556. .toolChoose[toolIndex].appJson).length == 0
  14557. ) {
  14558. this.openTools(itemTaskIndex, 72, toolIndex);
  14559. return;
  14560. }
  14561. }
  14562. // if (i == 48) {
  14563. // if (
  14564. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14565. // .toolChoose[toolIndex].tableJson
  14566. // ) {
  14567. // this.openTools(itemTaskIndex, 48, toolIndex);
  14568. // return;
  14569. // }
  14570. // }
  14571. // if (i == 50) {
  14572. // if (
  14573. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14574. // .toolChoose[toolIndex].uploadJson
  14575. // ) {
  14576. // this.openTools(itemTaskIndex, 50, toolIndex);
  14577. // return;
  14578. // }
  14579. // }
  14580. if (i == 49) {
  14581. if (
  14582. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14583. .toolChoose[toolIndex].groupJson
  14584. ) {
  14585. this.openTools(itemTaskIndex, 49, toolIndex);
  14586. return;
  14587. }
  14588. }
  14589. if (i == 62) {
  14590. if (
  14591. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14592. .toolChoose[toolIndex].videoJson
  14593. ) {
  14594. this.openTools(itemTaskIndex, 62, toolIndex);
  14595. return;
  14596. }
  14597. }
  14598. if (i == 15) {
  14599. if (
  14600. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14601. .toolChoose[toolIndex].answerQ ||
  14602. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14603. .toolChoose[toolIndex].answerQ == ""
  14604. ) {
  14605. this.openTools(itemTaskIndex, 15, toolIndex);
  14606. // this.$message({
  14607. // message: "请填写问答内容",
  14608. // type: "error",
  14609. // });
  14610. return;
  14611. }
  14612. }
  14613. if (i == 40) {
  14614. if (
  14615. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14616. .toolChoose[toolIndex].rateJson ||
  14617. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14618. .toolChoose[toolIndex].rateJson.length
  14619. ) {
  14620. this.openTools(itemTaskIndex, 40, toolIndex);
  14621. return;
  14622. }
  14623. }
  14624. if (i == 41) {
  14625. if (
  14626. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14627. .toolChoose[toolIndex].selectJson ||
  14628. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14629. .toolChoose[toolIndex].selectJson.url == "" ||
  14630. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14631. .toolChoose[toolIndex].selectJson.select.length ||
  14632. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14633. .toolChoose[toolIndex].selectJson.answer.length
  14634. ) {
  14635. this.openTools(itemTaskIndex, 41, toolIndex);
  14636. return;
  14637. }
  14638. }
  14639. if (i == 42) {
  14640. if (
  14641. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14642. .toolChoose[toolIndex].answerQ ||
  14643. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14644. .toolChoose[toolIndex].answerQ == ""
  14645. ) {
  14646. this.openTools(itemTaskIndex, 42, toolIndex);
  14647. return;
  14648. }
  14649. }
  14650. if (
  14651. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14652. .toolChoose[toolIndex].tool.length > 0
  14653. ) {
  14654. if (
  14655. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14656. itemTaskIndex
  14657. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14658. ) {
  14659. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14660. itemTaskIndex
  14661. ].toolChoose[toolIndex].tool.splice(
  14662. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14663. itemTaskIndex
  14664. ].toolChoose[toolIndex].tool.indexOf(i),
  14665. 1
  14666. );
  14667. } else {
  14668. // this.$message({
  14669. // message: "每个工具只能添加一个",
  14670. // type: "error",
  14671. // });
  14672. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14673. itemTaskIndex
  14674. ].toolChoose[toolIndex].tool = [];
  14675. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14676. itemTaskIndex
  14677. ].toolChoose[toolIndex].tool.push(i);
  14678. }
  14679. } else {
  14680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14681. itemTaskIndex
  14682. ].toolChoose[toolIndex].tool.push(i);
  14683. }
  14684. this.$forceUpdate();
  14685. },
  14686. addAskList(index) {
  14687. this.askJson.askJson.splice(index + 1, 0, {
  14688. askstitle: "",
  14689. askItem: 1,
  14690. checkList: [],
  14691. });
  14692. this.askJson.askCount++;
  14693. },
  14694. addTestList(index) {
  14695. this.testJson.testJson.splice(index + 1, 0, {
  14696. teststitle: "",
  14697. testItem: 1,
  14698. checkList: [],
  14699. timuList: [],
  14700. answer: [],
  14701. type: "1",
  14702. });
  14703. this.testJson.testCount++;
  14704. },
  14705. deleteAskList(index) {
  14706. if (
  14707. !this.askJson.askJson[index].askstitle &&
  14708. this.askJson.askJson[index].askItem == 1 &&
  14709. !this.askJson.askJson[index].checkList[0]
  14710. ) {
  14711. this.askJson.askJson.splice(index, 1);
  14712. this.askJson.askCount--;
  14713. } else {
  14714. let _this = this;
  14715. _this
  14716. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14717. confirmButtonText: "确定",
  14718. cancelButtonText: "取消",
  14719. type: "warning",
  14720. })
  14721. .then(() => {
  14722. _this.askJson.askJson.splice(index, 1);
  14723. _this.askJson.askCount--;
  14724. })
  14725. .catch(() => {
  14726. return;
  14727. });
  14728. }
  14729. },
  14730. deleteTestList(index) {
  14731. if (
  14732. !this.testJson.testJson[index].teststitle &&
  14733. this.testJson.testJson[index].testItem == 1 &&
  14734. !this.testJson.testJson[index].checkList[0]
  14735. ) {
  14736. this.testJson.testJson.splice(index, 1);
  14737. this.testJson.testCount--;
  14738. } else {
  14739. let _this = this;
  14740. _this
  14741. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14742. confirmButtonText: "确定",
  14743. cancelButtonText: "取消",
  14744. type: "warning",
  14745. })
  14746. .then(() => {
  14747. _this.testJson.testJson.splice(index, 1);
  14748. _this.testJson.testCount--;
  14749. })
  14750. .catch(() => {
  14751. return;
  14752. });
  14753. }
  14754. },
  14755. askMove(type, index) {
  14756. if (type == 1) {
  14757. if (index > 0) {
  14758. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  14759. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14760. this.askJson.askJson[index - 1] = b;
  14761. this.askJson.askJson[index] = a;
  14762. }
  14763. } else {
  14764. if (index < this.askJson.askJson.length - 1) {
  14765. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  14766. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14767. this.askJson.askJson[index + 1] = b;
  14768. this.askJson.askJson[index] = a;
  14769. }
  14770. }
  14771. this.$forceUpdate();
  14772. },
  14773. checkMove(type, index, checkIndex) {
  14774. if (type == 1) {
  14775. if (checkIndex > 0) {
  14776. let a = JSON.parse(
  14777. JSON.stringify(
  14778. this.askJson.askJson[index].checkList[checkIndex - 1]
  14779. )
  14780. );
  14781. let b = JSON.parse(
  14782. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14783. );
  14784. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  14785. this.askJson.askJson[index].checkList[checkIndex] = a;
  14786. }
  14787. } else {
  14788. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  14789. let a = JSON.parse(
  14790. JSON.stringify(
  14791. this.askJson.askJson[index].checkList[checkIndex + 1]
  14792. )
  14793. );
  14794. let b = JSON.parse(
  14795. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14796. );
  14797. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  14798. this.askJson.askJson[index].checkList[checkIndex] = a;
  14799. }
  14800. }
  14801. this.$forceUpdate();
  14802. },
  14803. testMove(type, index) {
  14804. if (type == 1) {
  14805. if (index > 0) {
  14806. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  14807. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14808. this.testJson.testJson[index - 1] = b;
  14809. this.testJson.testJson[index] = a;
  14810. }
  14811. } else {
  14812. if (index < this.testJson.testJson.length - 1) {
  14813. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  14814. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14815. this.testJson.testJson[index + 1] = b;
  14816. this.testJson.testJson[index] = a;
  14817. }
  14818. }
  14819. this.$forceUpdate();
  14820. },
  14821. tcheckMove(type, index, checkIndex) {
  14822. if (type == 1) {
  14823. if (checkIndex > 0) {
  14824. let a = JSON.parse(
  14825. JSON.stringify(
  14826. this.testJson.testJson[index].checkList[checkIndex - 1]
  14827. )
  14828. );
  14829. let b = JSON.parse(
  14830. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14831. );
  14832. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  14833. this.testJson.testJson[index].checkList[checkIndex] = a;
  14834. }
  14835. } else {
  14836. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  14837. let a = JSON.parse(
  14838. JSON.stringify(
  14839. this.testJson.testJson[index].checkList[checkIndex + 1]
  14840. )
  14841. );
  14842. let b = JSON.parse(
  14843. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14844. );
  14845. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  14846. this.testJson.testJson[index].checkList[checkIndex] = a;
  14847. }
  14848. }
  14849. this.$forceUpdate();
  14850. },
  14851. addcheckList(json, index) {
  14852. // json.checkList.length++;
  14853. json.checkList.splice(index + 1, 0, "");
  14854. json.askItem++;
  14855. this.$forceUpdate();
  14856. },
  14857. deletecheckList(json, index) {
  14858. // json.checkList.length--;
  14859. json.checkList.splice(index, 1);
  14860. json.askItem--;
  14861. this.$forceUpdate();
  14862. },
  14863. addTcheckList(json, index) {
  14864. // json.checkList.length++;
  14865. json.checkList.splice(index + 1, 0, "");
  14866. json.testItem++;
  14867. this.$forceUpdate();
  14868. },
  14869. deleteTcheckList(json, index) {
  14870. // json.checkList.length--;
  14871. json.checkList.splice(index, 1);
  14872. json.testItem--;
  14873. this.$forceUpdate();
  14874. },
  14875. checkTestType(type, json) {
  14876. json.type = type;
  14877. setTimeout(() => {
  14878. json.answer = [];
  14879. }, 100);
  14880. },
  14881. checkAskType(type, json) {
  14882. json.type = type;
  14883. // json.checkList = [];
  14884. this.$forceUpdate();
  14885. },
  14886. addSelectList(json) {
  14887. json.select.push("");
  14888. json.answer.push("");
  14889. },
  14890. deleteSelectList(json) {
  14891. // json.select.length--;
  14892. // json.answer.length--;
  14893. json.select.splice(json.select.length - 1, 1);
  14894. json.answer.splice(json.answer.length - 1, 1);
  14895. },
  14896. addAsk() {
  14897. if (this.askJson.askTitle === "") {
  14898. this.$message.error("标题不能为空!");
  14899. return;
  14900. }
  14901. var aj = this.askJson.askJson;
  14902. var b = 1;
  14903. for (var i = 0; i < aj.length; i++) {
  14904. if (aj[i].askstitle === "") {
  14905. var a = 1;
  14906. for (let index = 0; index < aj[i].askItem; index++) {
  14907. const element = aj[i].checkList[index]
  14908. ? aj[i].checkList[index]
  14909. : "";
  14910. if (element != "") {
  14911. b++;
  14912. this.$message.error(`请将题目${i + 1}填写完整。`);
  14913. return;
  14914. } else {
  14915. a++;
  14916. }
  14917. }
  14918. if (b == 1) {
  14919. this.$message.error("至少填写一个问题");
  14920. return;
  14921. }
  14922. } else if (aj[i].askstitle != "") {
  14923. for (let index = 0; index < aj[i].askItem; index++) {
  14924. const element = aj[i].checkList[index]
  14925. ? aj[i].checkList[index]
  14926. : "";
  14927. var index = 0;
  14928. for (var z = 0; z < aj[i].checkList.length; z++) {
  14929. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  14930. if (checkC != "") {
  14931. index++;
  14932. } else {
  14933. this.$message.error(`题目${i + 1}选项不能为空!`);
  14934. return;
  14935. }
  14936. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  14937. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  14938. if (checkC == checkC2) {
  14939. this.$message.error(
  14940. `第${i + 1}题的选项${this.optionTypeList[z]}和选项${this.optionTypeList[z2]}重复了,请修改!`
  14941. );
  14942. return;
  14943. }
  14944. }
  14945. }
  14946. b++;
  14947. if (index < 2) {
  14948. this.$message.error("每道题目至少需要设置2个选项。");
  14949. return;
  14950. }
  14951. }
  14952. }
  14953. }
  14954. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  14955. var elc = el.checkList.filter((element) => {
  14956. return element != "";
  14957. });
  14958. return el.askstitle != "" && elc.length != 0;
  14959. });
  14960. if (!this.dialogVisible4) {
  14961. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14962. this.taskCount
  14963. ].toolChoose[this.toolIndex] = this.askJson;
  14964. }
  14965. this.dialogVisible5 = false;
  14966. if (
  14967. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14968. .toolChoose[this.toolIndex].tool != 4
  14969. ) {
  14970. this.addTools(4, this.taskCount, this.toolIndex);
  14971. }
  14972. },
  14973. addTest() {
  14974. // if (this.testJson.testTitle === "") {
  14975. // this.$message.error("标题不能为空!");
  14976. // return;
  14977. // }
  14978. var aj = this.testJson.testJson;
  14979. var b = 1;
  14980. for (var i = 0; i < aj.length; i++) {
  14981. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  14982. var a = 1;
  14983. for (let index = 0; index < aj[i].testItem; index++) {
  14984. const element = aj[i].checkList[index]
  14985. ? aj[i].checkList[index]
  14986. : "";
  14987. if (element != "") {
  14988. b++;
  14989. this.$message.error(`请将题目${i + 1}填写完整。`);
  14990. return;
  14991. } else {
  14992. a++;
  14993. }
  14994. }
  14995. if (b == 1) {
  14996. this.$message.error("至少填写一个问题");
  14997. return;
  14998. }
  14999. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  15000. for (let index = 0; index < aj[i].testItem; index++) {
  15001. const element = aj[i].checkList[index]
  15002. ? aj[i].checkList[index]
  15003. : "";
  15004. var index = 0;
  15005. for (var z = 0; z < aj[i].checkList.length; z++) {
  15006. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  15007. if (checkC != "") {
  15008. index++;
  15009. } else {
  15010. this.$message.error(`题目${i + 1}选项不能为空!`);
  15011. return;
  15012. }
  15013. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  15014. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  15015. if (checkC == checkC2) {
  15016. this.$message.error(
  15017. `第${i + 1}题的选项${this.optionTypeList[z]}和选项${this.optionTypeList[z2]}重复了,请修改!`
  15018. );
  15019. return;
  15020. }
  15021. }
  15022. }
  15023. b++;
  15024. if (index < 2) {
  15025. this.$message.error("每道题目至少需要设置2个选项。");
  15026. return;
  15027. }
  15028. if (
  15029. (aj[i].type == "2" && !aj[i].answer.length) ||
  15030. (aj[i].type == "1" &&
  15031. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  15032. (aj[i].answer !== 0 && !aj[i].answer)))
  15033. ) {
  15034. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  15035. return;
  15036. }
  15037. }
  15038. }
  15039. }
  15040. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15041. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15042. var elc = el.checkList.filter((element) => {
  15043. return element != "";
  15044. });
  15045. return (
  15046. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  15047. );
  15048. });
  15049. isTestJson.testCount = isTestJson.testJson.length;
  15050. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15051. this.taskCount
  15052. ].toolChoose[this.toolIndex].testJson = isTestJson;
  15053. this.dialogVisibleChoice = false;
  15054. if (
  15055. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15056. .toolChoose[this.toolIndex].tool != 45
  15057. ) {
  15058. this.addTools(45, this.taskCount, this.toolIndex);
  15059. }
  15060. },
  15061. addVideoJson(videoJson) {
  15062. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15063. this.taskCount
  15064. ].toolChoose[this.toolIndex].videoJson = videoJson;
  15065. this.dialogVisibleVideo = false;
  15066. if (
  15067. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15068. .toolChoose[this.toolIndex].tool != 62
  15069. ) {
  15070. this.addTools(62, this.taskCount, this.toolIndex);
  15071. }
  15072. },
  15073. //自动获取剪贴板
  15074. pasteOption() {
  15075. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15076. if (!iframe) {
  15077. this.$message.error("请使用AI共创生成题目");
  15078. return;
  15079. }
  15080. let copyData = iframe.contentWindow.copyData;
  15081. if (!copyData || !copyData.selectData.length) {
  15082. this.$message.error("请使用AI共创生成题目");
  15083. return;
  15084. }
  15085. let selectData = copyData.selectData;
  15086. for (var i = 0; i < selectData.length; i++) {
  15087. let answer = 0;
  15088. switch (selectData[i].answer[0]) {
  15089. case "A":
  15090. answer = 0;
  15091. break;
  15092. case "B":
  15093. answer = 1;
  15094. break;
  15095. case "C":
  15096. answer = 2;
  15097. break;
  15098. case "D":
  15099. answer = 3;
  15100. break;
  15101. case "E":
  15102. answer = 4;
  15103. break;
  15104. default:
  15105. break;
  15106. }
  15107. this.testJson.testJson.push({
  15108. teststitle: selectData[i].subject,
  15109. testItem: selectData[i].options.length,
  15110. checkList: selectData[i].options,
  15111. timuList: [],
  15112. answer: answer,
  15113. type: "1",
  15114. });
  15115. this.testJson.testCount++;
  15116. }
  15117. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  15118. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  15119. var elc = el.checkList.filter((element) => {
  15120. return element != "";
  15121. });
  15122. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  15123. });
  15124. isTestJson.testCount = isTestJson.testJson.length;
  15125. if (!isTestJson.testCount) {
  15126. return;
  15127. }
  15128. this.testJson = isTestJson;
  15129. this.$forceUpdate();
  15130. },
  15131. pasteTask(taskJson) {
  15132. let stageTasksData = [];
  15133. if (taskJson) {
  15134. stageTasksData = taskJson;
  15135. } else {
  15136. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15137. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15138. if (!iframe && !iframe2) {
  15139. this.$message.error("请使用AI共创生成");
  15140. return;
  15141. }
  15142. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15143. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15144. if (
  15145. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  15146. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  15147. ) {
  15148. this.$message.error("请使用AI共创生成");
  15149. return;
  15150. }
  15151. stageTasksData = copyData
  15152. ? copyData.tasksData
  15153. : copyData2
  15154. ? copyData2.tasksData
  15155. : [{ taskName: "", taskDecs: "" }];
  15156. }
  15157. let taskA = [];
  15158. let tasks = stageTasksData;
  15159. for (var j = 0; j < tasks.length; j++) {
  15160. taskA.push({
  15161. task: tasks[j].taskName,
  15162. taskDetail: tasks[j].taskDecs,
  15163. chapterData: [],
  15164. toolText: "",
  15165. toolChoose: [
  15166. {
  15167. tool: [],
  15168. toolDetail: "",
  15169. toolType: 0,
  15170. askCount: 1,
  15171. askTitle: "",
  15172. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15173. },
  15174. ],
  15175. isShowTools: false,
  15176. askCount: 1,
  15177. isFold: 1,
  15178. askTitle: "",
  15179. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15180. checkJson: [{ checkCount: [], checkPerent: [] }],
  15181. homeworkList: [],
  15182. });
  15183. }
  15184. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  15185. this.$forceUpdate();
  15186. },
  15187. pasteStage(stageJson) {
  15188. let stageData = [];
  15189. if (stageJson) {
  15190. stageData = stageJson;
  15191. } else {
  15192. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15193. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15194. if (!iframe && !iframe2) {
  15195. this.$message.error("请使用AI共创生成");
  15196. return;
  15197. }
  15198. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15199. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15200. if (
  15201. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  15202. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  15203. ) {
  15204. this.$message.error("请使用AI共创生成");
  15205. return;
  15206. }
  15207. stageData = copyData
  15208. ? copyData.stageData
  15209. : copyData2
  15210. ? copyData2.stageData
  15211. : [""];
  15212. }
  15213. let stage = [];
  15214. for (var i = 0; i < stageData.length; i++) {
  15215. stage.push({
  15216. dyName: stageData[i], //单元标题
  15217. chapterInfo: [
  15218. {
  15219. isread: false,
  15220. chapterid: this.guid(),
  15221. title: "",
  15222. courseName: "",
  15223. taskJson: [
  15224. {
  15225. task: "",
  15226. taskDetail: "",
  15227. chapterData: [],
  15228. toolText: "",
  15229. toolChoose: [
  15230. {
  15231. tool: [],
  15232. toolDetail: "",
  15233. toolType: 0,
  15234. askCount: 1,
  15235. askTitle: "",
  15236. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15237. },
  15238. ],
  15239. isShowTools: false,
  15240. askCount: 1,
  15241. isFold: 1,
  15242. askTitle: "",
  15243. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15244. checkJson: [{ checkCount: [], checkPerent: [] }],
  15245. homeworkList: [],
  15246. },
  15247. ],
  15248. itemCount: 1,
  15249. fileList1: [],
  15250. video: [],
  15251. testData: [],
  15252. pData: [],
  15253. templateArray: [],
  15254. },
  15255. ],
  15256. });
  15257. }
  15258. let _this = this;
  15259. if (stageJson) {
  15260. if (!_this.cid) {
  15261. _this.unitJson = stage;
  15262. } else {
  15263. _this.unitIndex = 0;
  15264. _this.unitJson = stage;
  15265. _this.updateWork();
  15266. }
  15267. } else {
  15268. _this
  15269. .$confirm(
  15270. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  15271. "提示",
  15272. {
  15273. confirmButtonText: "确定",
  15274. cancelButtonText: "取消",
  15275. type: "warning",
  15276. }
  15277. )
  15278. .then(() => {
  15279. _this.unitIndex = 0;
  15280. _this.unitJson = stage;
  15281. // _this.steps++;
  15282. _this.updateWork();
  15283. })
  15284. .catch(() => {
  15285. return;
  15286. });
  15287. }
  15288. },
  15289. openStageBox() {
  15290. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  15291. this.dialogVisibleStageChange = true;
  15292. },
  15293. updateChange() {
  15294. this.$confirm(
  15295. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  15296. "提示",
  15297. {
  15298. confirmButtonText: "确定",
  15299. cancelButtonText: "取消",
  15300. type: "warning",
  15301. }
  15302. )
  15303. .then(() => {
  15304. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  15305. this.updateWork();
  15306. this.dialogVisibleStageChange = false;
  15307. })
  15308. .catch(() => {
  15309. return;
  15310. });
  15311. },
  15312. addAnswer() {
  15313. if (this.answerQ == "") {
  15314. this.$message.error("请输入您想要问的问题");
  15315. return;
  15316. }
  15317. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15318. this.taskCount
  15319. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15320. this.dialogVisible8 = false;
  15321. if (
  15322. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15323. .toolChoose[this.toolIndex].tool != 15
  15324. ) {
  15325. this.addTools(15, this.taskCount, this.toolIndex);
  15326. }
  15327. },
  15328. addMp3Answer() {
  15329. if (this.answerQ == "") {
  15330. this.$message.error("请输入您想要回答的问题");
  15331. return;
  15332. }
  15333. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15334. this.taskCount
  15335. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  15336. this.dialogVisibleMp3 = false;
  15337. },
  15338. addRateAnswer() {
  15339. var a = 1;
  15340. for (var i = 0; i < this.rateJson.length; i++) {
  15341. if (this.rateJson[i].value == "") {
  15342. a = 2;
  15343. break;
  15344. }
  15345. }
  15346. if (a == 2) {
  15347. this.$message.error("请把评价信息填写完整");
  15348. return;
  15349. }
  15350. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15351. this.taskCount
  15352. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  15353. this.dialogVisibleRate = false;
  15354. if (
  15355. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15356. .toolChoose[this.toolIndex].tool != 40
  15357. ) {
  15358. this.addTools(40, this.taskCount, this.toolIndex);
  15359. }
  15360. },
  15361. addSelectAnswer() {
  15362. if (this.selectJson.url == "") {
  15363. this.$message.error("请上传题目");
  15364. return;
  15365. }
  15366. if (!this.selectJson.select.length) {
  15367. this.$message.error("请添加选项");
  15368. return;
  15369. }
  15370. if (!this.selectJson.answer.length) {
  15371. this.$message.error("请设置答案");
  15372. return;
  15373. }
  15374. var a = 1;
  15375. for (var i = 0; i < this.selectJson.answer.length; i++) {
  15376. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  15377. a = 2;
  15378. }
  15379. }
  15380. if (a == 2) {
  15381. this.$message.error("请设置答案");
  15382. return;
  15383. }
  15384. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15385. this.taskCount
  15386. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  15387. this.dialogVisibleSelect = false;
  15388. if (
  15389. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15390. .toolChoose[this.toolIndex].tool != 41
  15391. ) {
  15392. this.addTools(41, this.taskCount, this.toolIndex);
  15393. }
  15394. },
  15395. nextSelectSteps() {
  15396. if (this.selectJson.url == "") {
  15397. this.$message.error("请上传题目");
  15398. return;
  15399. }
  15400. if (!this.selectJson.select.length) {
  15401. this.$message.error("请添加选项");
  15402. return;
  15403. } else {
  15404. for (var z = 0; z < this.selectJson.select.length; z++) {
  15405. let checkC = this.selectJson.select[z];
  15406. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  15407. let checkC2 = this.selectJson.select[z2];
  15408. if (checkC == checkC2) {
  15409. this.$message.error(
  15410. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  15411. );
  15412. return;
  15413. }
  15414. }
  15415. }
  15416. }
  15417. var a = 1;
  15418. for (var i = 0; i < this.selectJson.select.length; i++) {
  15419. if (!this.selectJson.select[i]) {
  15420. a = 2;
  15421. }
  15422. }
  15423. if (a == 2) {
  15424. this.$message.error("添加的选项不能为空");
  15425. return;
  15426. }
  15427. this.selectSteps++;
  15428. },
  15429. selectCourseDetail() {
  15430. if (this.cid == "" || this.cid == undefined) {
  15431. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  15432. this.isTeacherSee = true;
  15433. }
  15434. console.log("这是新增课程");
  15435. this.selectAllType();
  15436. this.chatid = uuidv4();
  15437. // this.courseTextB = false
  15438. } else {
  15439. this.isOutline = true
  15440. this.isOutline2 = true
  15441. this.cpoteType = 4
  15442. this.cidType = 1;
  15443. let params = {
  15444. cid: this.cid,
  15445. };
  15446. this.ajax
  15447. .get(this.$store.state.api + "select_course_detail", params)
  15448. .then((res) => {
  15449. this.unitJson = JSON.parse(res.data[0][0].chapters);
  15450. this.courseState = res.data[0][0].state;
  15451. for (var j = 0; j < this.unitJson.length; j++) {
  15452. for (
  15453. var k = 0;
  15454. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  15455. k++
  15456. ) {
  15457. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  15458. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15459. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  15460. : [];
  15461. let _chapterData = [];
  15462. for (
  15463. var c = 0;
  15464. c <
  15465. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  15466. .length;
  15467. c++
  15468. ) {
  15469. if (
  15470. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15471. ) {
  15472. _chapterData.push(
  15473. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  15474. );
  15475. }
  15476. }
  15477. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  15478. _chapterData;
  15479. }
  15480. }
  15481. this.$forceUpdate();
  15482. this.courseName = res.data[0][0].title;
  15483. this.searchFileName = JSON.parse(JSON.stringify(this.courseName))
  15484. this.courseText = res.data[0][0].brief;
  15485. this.courseText2 = res.data[0][0].reBrief;
  15486. this.evalua = res.data[0][0].evaId;
  15487. this.cover = JSON.parse(res.data[0][0].cover);
  15488. this.noneBtnImg = this.cover.length >= 1;
  15489. if (res.data[0][0].refile) {
  15490. this.infoData = JSON.parse(res.data[0][0].refile)
  15491. }
  15492. // this.checkboxList =
  15493. // res.data[0][0].course_student.length > 0
  15494. // ? JSON.parse(res.data[0][0].course_student)
  15495. // : [];
  15496. this.checkboxList2 = res.data[0][0].juri
  15497. ? res.data[0][0].juri.split(",")
  15498. : [];
  15499. this.inviteCode = [];
  15500. for (var i = 0; i < res.data[2].length; i++) {
  15501. this.inviteCode.push({
  15502. cid: res.data[2][i].classid,
  15503. ic: res.data[2][i].code,
  15504. });
  15505. }
  15506. this.checkboxList3 = res.data[0][0].course_teacher
  15507. ? res.data[0][0].course_teacher.split(",")
  15508. : [];
  15509. // this.isTeacherSee =
  15510. // res.data[0][0].is_teacher_look == 0 ? true : false;
  15511. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15512. this.myWord = res.data[0][0].template;
  15513. this.templateC.id = "123";
  15514. this.courseUserid = res.data[0][0].userid;
  15515. // if(this.courseUserid == this.userid){
  15516. // this.InviteChange(this.checkboxList2)
  15517. // }
  15518. this.nbOrder = res.data[0][0].ordernumber;
  15519. this.courseTypeId = [];
  15520. for (var i = 0; i < res.data[1].length; i++) {
  15521. this.courseTypeId.push(res.data[1][i].typeid);
  15522. }
  15523. console.log(this.courseTypeId);
  15524. // if (this.timer) clearInterval(this.timer);
  15525. if (this.timer) clearTimeout(this.timer);
  15526. this.timer = null;
  15527. // this.timer = setInterval(() => {
  15528. if(res.data[3].length){
  15529. try {
  15530. this.aiJson = JSON.parse(res.data[3][0].tips);
  15531. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15532. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15533. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15534. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15535. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15536. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15537. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15538. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15539. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15540. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15541. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15542. }
  15543. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15544. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15545. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15546. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15547. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15548. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15549. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15550. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15551. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15552. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15553. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15554. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15555. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15556. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15557. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15558. 讨论:<转文本内容>`
  15559. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15560. this.templateid = res.data[3][0].template;
  15561. this.getTipsTemplateIsDialog()
  15562. }catch(error){
  15563. console.error(error)
  15564. }
  15565. }
  15566. if(res.data[0][0].cpote){
  15567. try {
  15568. this.cpote = JSON.parse(res.data[0][0].cpote);
  15569. }catch(error){
  15570. console.error(error)
  15571. }
  15572. }
  15573. if(res.data[0][0].setting){
  15574. try {
  15575. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15576. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15577. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  15578. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15579. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15580. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15581. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15582. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15583. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15584. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  15585. 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;
  15586. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15587. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15588. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15589. 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;
  15590. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15591. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15592. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15593. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15594. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15595. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15596. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15597. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15598. this.courseTextBool = true
  15599. }
  15600. // if(!this.teacherCourseText && !this.targetCourseText2){
  15601. // this.isuseT = 1
  15602. // }
  15603. }catch(error){
  15604. console.error(error)
  15605. }
  15606. }
  15607. if(this.courseText){
  15608. this.courseTextB = false
  15609. }
  15610. if(this.teacherCourseText){
  15611. this.teacherCourseTextB = false
  15612. }
  15613. if(this.targetCourseText){
  15614. this.targetCourseTextB = false
  15615. }
  15616. if(this.targetCourseText2){
  15617. this.targetCourseText2B = false
  15618. }
  15619. this.isFileSearch = res.data[0][0].iresearch == 1
  15620. // this.seleteCourseUpdate();
  15621. this.setMan();
  15622. this.selectAllType();
  15623. this.unitJson[
  15624. this.unitIndex
  15625. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15626. // }, 5000);
  15627. this.$forceUpdate();
  15628. setTimeout(() => {
  15629. this.checkEva(this.evalua);
  15630. setTimeout(() => {
  15631. this.checkEva(this.evalua);
  15632. }, 100);
  15633. }, 100);
  15634. })
  15635. .catch((err) => {
  15636. console.error(err);
  15637. });
  15638. }
  15639. if(this.aiId){
  15640. let params = {
  15641. cid: this.aiId,
  15642. };
  15643. this.ajax
  15644. .get(this.$store.state.api + "select_course_detail", params)
  15645. .then((res) => {
  15646. let _unitJson = JSON.parse(res.data[0][0].chapters);
  15647. let fileInfo = []
  15648. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  15649. for(var i = 0; i < _unitJson.length; i++){
  15650. let tasks = _unitJson[i].chapterInfo[0].taskJson
  15651. for(var j = 0; j < tasks.length; j++){
  15652. let _infoData = tasks[j].chapterData.filter(el => {
  15653. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  15654. })
  15655. if(_infoData.length){
  15656. fileInfo = [...fileInfo, ..._infoData]
  15657. }
  15658. }
  15659. }
  15660. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  15661. this.$forceUpdate();
  15662. this.courseName = res.data[0][0].title;
  15663. this.courseText = res.data[0][0].brief;
  15664. this.courseText2 = res.data[0][0].reBrief;
  15665. this.cover = JSON.parse(res.data[0][0].cover);
  15666. this.noneBtnImg = this.cover.length >= 1;
  15667. this.checkboxList2 = res.data[0][0].juri
  15668. ? res.data[0][0].juri.split(",")
  15669. : [];
  15670. this.inviteCode = [];
  15671. for (var i = 0; i < res.data[2].length; i++) {
  15672. this.inviteCode.push({
  15673. cid: res.data[2][i].classid,
  15674. ic: res.data[2][i].code,
  15675. });
  15676. }
  15677. this.checkboxList3 = res.data[0][0].course_teacher
  15678. ? res.data[0][0].course_teacher.split(",")
  15679. : [];
  15680. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15681. this.myWord = res.data[0][0].template;
  15682. this.templateC.id = "123";
  15683. this.courseTypeId = [];
  15684. for (var i = 0; i < res.data[1].length; i++) {
  15685. this.courseTypeId.push(res.data[1][i].typeid);
  15686. }
  15687. console.log(this.courseTypeId);
  15688. if(res.data[3].length){
  15689. try {
  15690. this.aiJson = JSON.parse(res.data[3][0].tips);
  15691. this.templateid = res.data[3][0].template;
  15692. this.getTipsTemplateIsDialog()
  15693. }catch(error){
  15694. console.error(error)
  15695. }
  15696. }
  15697. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15698. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15699. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15700. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15701. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15702. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15703. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15704. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15705. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15706. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15707. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15708. }
  15709. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15710. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15711. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15712. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15713. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15714. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15715. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15716. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15717. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15718. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15719. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15720. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15721. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15722. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15723. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15724. 讨论:<转文本内容>`
  15725. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15726. if(res.data[0][0].cpote){
  15727. try {
  15728. this.cpote = JSON.parse(res.data[0][0].cpote);
  15729. }catch(error){
  15730. console.error(error)
  15731. }
  15732. }
  15733. if(res.data[0][0].setting){
  15734. try {
  15735. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15736. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15737. 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];
  15738. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15739. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15740. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15741. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15742. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15743. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15744. 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];
  15745. 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;
  15746. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15747. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15748. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15749. 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;
  15750. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15751. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15752. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15753. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15754. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15755. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15756. this.appendixFile = (JSON.parse(res.data[0][0].setting).appendixFile) ? JSON.parse(res.data[0][0].setting).appendixFile : [];
  15757. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15758. this.courseTextBool = true
  15759. }
  15760. // if(!this.teacherCourseText && !this.targetCourseText2){
  15761. // this.isuseT = 1
  15762. // }
  15763. }catch(error){
  15764. console.error(error)
  15765. }
  15766. }
  15767. if(this.teacherInfoData.length){
  15768. this.isuseT = true
  15769. }
  15770. if(this.courseText){
  15771. this.courseTextB = false
  15772. }
  15773. if(this.teacherCourseText){
  15774. this.teacherCourseTextB = false
  15775. }
  15776. if(this.targetCourseText){
  15777. this.targetCourseTextB = false
  15778. }
  15779. if(this.targetCourseText2){
  15780. this.targetCourseText2B = false
  15781. }
  15782. this.setMan();
  15783. this.unitJson[
  15784. this.unitIndex
  15785. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15786. this.$forceUpdate();
  15787. setTimeout(() => {
  15788. this.checkEva(this.evalua);
  15789. setTimeout(() => {
  15790. this.checkEva(this.evalua);
  15791. }, 100);
  15792. }, 100);
  15793. })
  15794. .catch((err) => {
  15795. console.error(err);
  15796. });
  15797. }
  15798. // if(this.cidType != 1 && this.templateid == ''){
  15799. // this.promptShow = true
  15800. // }
  15801. },
  15802. seleteCourseUpdate() {
  15803. let params = {
  15804. cid: this.cid,
  15805. };
  15806. this.ajax
  15807. .get(this.$store.state.api + "select_course_detail", params)
  15808. .then((res) => {
  15809. // console.log(this.unitJson);
  15810. let unitJson = JSON.parse(res.data[0][0].chapters);
  15811. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  15812. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  15813. let _unitJson = [];
  15814. let _chapAarry = [];
  15815. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  15816. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  15817. let index = 1;
  15818. let chapindex;
  15819. if (_unitJson2.length > unitJson.length) {
  15820. for (let c = 0; c < _unitJson2.length; c++) {
  15821. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  15822. }
  15823. for (let j = 0; j < unitJson.length; j++) {
  15824. let count = 0;
  15825. for (let k = 0; k < _unitJson2.length; k++) {
  15826. if (
  15827. unitJson[j].chapterInfo[0].chapterid ==
  15828. _unitJson2[k].chapterInfo[0].chapterid
  15829. ) {
  15830. count++;
  15831. _chapAarry.splice(
  15832. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15833. 1
  15834. );
  15835. _unitJson.push(unitJson[j]);
  15836. break;
  15837. }
  15838. }
  15839. // if(count === 0){
  15840. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  15841. // }
  15842. }
  15843. for (let k = 0; k < _unitJson2.length; k++) {
  15844. if (_unitJson2[k].isUpdate == 1) {
  15845. _chapAarry.splice(
  15846. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15847. 1
  15848. );
  15849. _unitJson.push(_unitJson2[k]);
  15850. }
  15851. }
  15852. console.log(_chapAarry);
  15853. for (let d = 0; d < _unitJson2.length; d++) {
  15854. if (
  15855. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  15856. ) {
  15857. if (_unitIndex == d) {
  15858. index = 2;
  15859. }
  15860. chapindex = d;
  15861. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  15862. }
  15863. }
  15864. } else {
  15865. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  15866. }
  15867. for (let i = 0; i < unitJson.length; i++) {
  15868. if (
  15869. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  15870. _unitJson[i].chapterInfo[0].chapterid !=
  15871. unitJson[i].chapterInfo[0].chapterid
  15872. ) {
  15873. if (i == _unitJson.length - 1) {
  15874. // this.unitIndex++
  15875. _unitIndex2++;
  15876. }
  15877. _unitJson.splice(i, 0, unitJson[i]);
  15878. } else if (i > _unitJson.length - 1) {
  15879. _unitJson.push(unitJson[i]);
  15880. } else if (
  15881. _unitJson[i].chapterInfo[0].chapterid ==
  15882. unitJson[i].chapterInfo[0].chapterid
  15883. ) {
  15884. _unitJson[i] = unitJson[i];
  15885. }
  15886. // if (i == _unitIndex) {
  15887. // continue;
  15888. // } else
  15889. }
  15890. if (_chapAarry.length && index != 2) {
  15891. if (chapindex < _unitIndex) {
  15892. this.isDelete = 2;
  15893. // this.unitIndex--;
  15894. _unitIndex2--;
  15895. } else if (
  15896. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  15897. _unitJson[_unitIndex].chapterInfo[0].chapterid
  15898. ) {
  15899. this.isDelete = 2;
  15900. for (let n = 0; n < _unitJson.length; n++) {
  15901. if (
  15902. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  15903. _unitJson[n].chapterInfo[0].chapterid
  15904. ) {
  15905. // this.unitIndex = n;
  15906. _unitIndex2 = n;
  15907. _unitJson[n] = _unitJson2[_unitIndex];
  15908. break;
  15909. }
  15910. }
  15911. }
  15912. } else if (index != 2) {
  15913. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  15914. _unitJson2[_unitIndex];
  15915. for (
  15916. var ci = 0;
  15917. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  15918. ci++
  15919. ) {
  15920. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  15921. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  15922. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15923. .toolChoose
  15924. : [];
  15925. let _chapterData = [];
  15926. for (
  15927. var c = 0;
  15928. c <
  15929. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  15930. .length;
  15931. c++
  15932. ) {
  15933. if (
  15934. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15935. .chapterData[c]
  15936. ) {
  15937. _chapterData.push(
  15938. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15939. .chapterData[c]
  15940. );
  15941. }
  15942. }
  15943. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  15944. _chapterData;
  15945. }
  15946. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  15947. }
  15948. if (index == 1) {
  15949. this.unitJson = _unitJson;
  15950. this.$forceUpdate();
  15951. setTimeout(() => {
  15952. if (this.unitIndex != _unitIndex2) {
  15953. this.isDelete = 2;
  15954. this.unitIndex = _unitIndex2;
  15955. }
  15956. }, 0);
  15957. this.timer = setTimeout(() => {
  15958. this.seleteCourseUpdate();
  15959. }, 1000);
  15960. } else if (index == 2) {
  15961. let _this = this;
  15962. _this
  15963. .$confirm(
  15964. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  15965. "提示",
  15966. {
  15967. confirmButtonText: "需要",
  15968. cancelButtonText: "取消",
  15969. type: "warning",
  15970. }
  15971. )
  15972. .then(() => {
  15973. if (_this.time()) {
  15974. _this.restoreWork(
  15975. _chapAarry[0],
  15976. _unitJson,
  15977. chapindex,
  15978. _unitJson2,
  15979. _unitIndex2
  15980. );
  15981. }
  15982. })
  15983. .catch(() => {
  15984. _this.unitJson = _unitJson;
  15985. _this.$forceUpdate();
  15986. setTimeout(() => {
  15987. if (this.unitIndex != _unitIndex2) {
  15988. this.isDelete = 2;
  15989. this.unitIndex = _unitIndex2;
  15990. }
  15991. }, 0);
  15992. _this.timer = setTimeout(() => {
  15993. _this.seleteCourseUpdate();
  15994. }, 1000);
  15995. });
  15996. }
  15997. // 在复制操作之前记录滚动位置
  15998. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  15999. // 执行复制操作
  16000. // 复制操作完成后恢复滚动位置
  16001. this.$nextTick(() => {
  16002. if (this.$refs.scrollContainer) {
  16003. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16004. }
  16005. });
  16006. })
  16007. .catch((err) => {
  16008. console.error(err);
  16009. });
  16010. },
  16011. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  16012. let params = [
  16013. {
  16014. cid: this.cid,
  16015. chapters: JSON.stringify(this.unitJson),
  16016. uid: this.userid,
  16017. chapid: chapid,
  16018. },
  16019. ];
  16020. this.ajax
  16021. .post(this.$store.state.api + "restoreWork", params)
  16022. .then((res) => {
  16023. this.$message({
  16024. message: "恢复成功",
  16025. type: "success",
  16026. });
  16027. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  16028. this.unitJson = unitJson;
  16029. this.$forceUpdate();
  16030. setTimeout(() => {
  16031. if (this.unitIndex != unitIndex2) {
  16032. this.isDelete = 2;
  16033. this.unitIndex = unitIndex2;
  16034. }
  16035. }, 0);
  16036. this.timer = setTimeout(() => {
  16037. this.seleteCourseUpdate();
  16038. }, 1000);
  16039. })
  16040. .catch((err) => {
  16041. this.$message.error("网络不佳");
  16042. console.error(err);
  16043. });
  16044. },
  16045. getTypeName() {
  16046. console.log(this.courseTypeId);
  16047. this.$forceUpdate();
  16048. },
  16049. selectAllType() {
  16050. let params = {
  16051. org: this.org && this.org != "" ? this.org : "",
  16052. oid: this.oid && this.oid != "" ? this.oid : "",
  16053. stand: "cn"
  16054. };
  16055. this.ajax
  16056. .get(this.$store.state.api + "selectAllTypeStand", params)
  16057. .then((res) => {
  16058. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16059. res.data[0] = [...res.data[0], ...res.data[4]];
  16060. }
  16061. this.CourseType = res.data;
  16062. this.CourseType2 = [
  16063. { name: "智见课程", id: [] },
  16064. { name: "智行课程", id: [] },
  16065. { name: "智创课程", id: [] },
  16066. ];
  16067. for (var cti = 0; cti < res.data[0].length; cti++) {
  16068. if (
  16069. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16070. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  16071. ) {
  16072. this.CourseType2[0].id.push(res.data[0][cti].id);
  16073. } else if (
  16074. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  16075. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16076. ) {
  16077. this.CourseType2[1].id.push(res.data[0][cti].id);
  16078. } else if (
  16079. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16080. ) {
  16081. this.CourseType2[2].id.push(res.data[0][cti].id);
  16082. }
  16083. if (
  16084. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  16085. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  16086. ) {
  16087. res.data[0][cti].name = "年级";
  16088. } else if (
  16089. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  16090. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  16091. ) {
  16092. res.data[0][cti].name = "学科";
  16093. } else if (
  16094. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  16095. ) {
  16096. res.data[0][cti].name = "主题";
  16097. }
  16098. }
  16099. let _courseTypeId = [];
  16100. for (var i = 0; i < res.data[0].length; i++) {
  16101. if (!this.cid) {
  16102. this.courseTypeId[res.data[0][i].id] = [];
  16103. }
  16104. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  16105. // }
  16106. this.CourseTypeJson[res.data[0][i].id] = [];
  16107. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16108. if (res.data[0][i].name == "栏目") {
  16109. this.CourseType[0][i].name = "主题";
  16110. }
  16111. }
  16112. if (res.data[2].length == 0 && res.data[3].length == 0) {
  16113. for (var j = 0; j < res.data[1].length; j++) {
  16114. if (
  16115. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  16116. _courseTypeId.indexOf(res.data[1][j].id) == -1
  16117. ) {
  16118. _courseTypeId.push(res.data[1][j].id);
  16119. }
  16120. if (res.data[0][i].id == res.data[1][j].pid) {
  16121. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16122. }
  16123. }
  16124. } else {
  16125. if (res.data[2].length > 0) {
  16126. for (var j = 0; j < res.data[2].length; j++) {
  16127. if (
  16128. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  16129. _courseTypeId.indexOf(res.data[2][j].id) == -1
  16130. ) {
  16131. _courseTypeId.push(res.data[2][j].id);
  16132. }
  16133. if (res.data[0][i].id == res.data[2][j].pid) {
  16134. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16135. }
  16136. }
  16137. }
  16138. if (res.data[3].length > 0) {
  16139. for (var j = 0; j < res.data[3].length; j++) {
  16140. if (
  16141. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  16142. _courseTypeId.indexOf(res.data[3][j].id) == -1
  16143. ) {
  16144. _courseTypeId.push(res.data[3][j].id);
  16145. }
  16146. if (res.data[0][i].id == res.data[3][j].pid) {
  16147. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16148. }
  16149. }
  16150. }
  16151. }
  16152. }
  16153. this.courseTypeId = _courseTypeId;
  16154. this.typeC1 = this.getTypeC(2)
  16155. this.typeC2 = this.getTypeC(1)
  16156. })
  16157. .catch((err) => {
  16158. console.error(err);
  16159. });
  16160. },
  16161. selectType() {
  16162. this.ajax
  16163. .get(this.$store.state.api + "selectType")
  16164. .then((res) => {
  16165. this.CourseType = res.data;
  16166. for (var i = 0; i < res.data[0].length; i++) {
  16167. if (!this.cid) {
  16168. this.courseTypeId[res.data[0][i].id] = "";
  16169. }
  16170. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  16171. if (res.data[0][i].name == "栏目") {
  16172. this.CourseType[0][i].name = "主题";
  16173. }
  16174. }
  16175. for (var j = 0; j < res.data[1].length; j++) {
  16176. if (res.data[0][i].id == res.data[1][j].pid) {
  16177. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16178. this.CourseTypeJson[res.data[0][i].id] = [];
  16179. }
  16180. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16181. }
  16182. }
  16183. }
  16184. this.selectTypeByOid();
  16185. this.selectTypeByOrg();
  16186. })
  16187. .catch((err) => {
  16188. console.error(err);
  16189. });
  16190. },
  16191. selectTypeByOid() {
  16192. let params = {
  16193. oid: this.oid,
  16194. };
  16195. this.ajax
  16196. .get(this.$store.state.api + "selectTypeByOid", params)
  16197. .then((res) => {
  16198. for (var i = 0; i < res.data[0].length; i++) {
  16199. for (var j = 0; j < res.data[1].length; j++) {
  16200. if (res.data[0][i].id == res.data[1][j].pid) {
  16201. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16202. this.CourseTypeJson[res.data[0][i].id] = [];
  16203. }
  16204. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16205. }
  16206. }
  16207. }
  16208. })
  16209. .catch((err) => {
  16210. console.error(err);
  16211. });
  16212. },
  16213. selectTypeByOrg() {
  16214. let params = {
  16215. oid: this.org,
  16216. };
  16217. this.ajax
  16218. .get(this.$store.state.api + "selectTypeByOrg", params)
  16219. .then((res) => {
  16220. for (var i = 0; i < res.data[0].length; i++) {
  16221. for (var j = 0; j < res.data[1].length; j++) {
  16222. if (res.data[0][i].id == res.data[1][j].pid) {
  16223. if (!this.CourseTypeJson[res.data[0][i].id]) {
  16224. this.CourseTypeJson[res.data[0][i].id] = [];
  16225. }
  16226. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  16227. }
  16228. }
  16229. }
  16230. this.$forceUpdate();
  16231. })
  16232. .catch((err) => {
  16233. console.error(err);
  16234. });
  16235. },
  16236. OtherMb(type, task) {
  16237. if (task === 0 || task) {
  16238. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16239. task
  16240. ].isEvaFold = true;
  16241. }
  16242. this.typeMode = type;
  16243. setTimeout(() => {
  16244. this.checkEva(this.checkId);
  16245. setTimeout(() => {
  16246. this.checkEva(this.checkId);
  16247. }, 100);
  16248. }, 100);
  16249. },
  16250. openMember() {
  16251. this.searchTN = "";
  16252. this.getTeacher();
  16253. this.dialogVisibleMember = true;
  16254. },
  16255. checkEva(id, type) {
  16256. this.dialogVisiblemb = false;
  16257. this.selectEva();
  16258. if (this.evalua != id && type == 2) {
  16259. this.$message.success("导入成功");
  16260. setTimeout(() => {
  16261. this.checkEva(id);
  16262. }, 100);
  16263. }
  16264. this.evalua = id;
  16265. this.checkId = id;
  16266. if (this.evalua != "") {
  16267. for (var i = 0; i < this.evaJuri.length; i++) {
  16268. if (this.evalua == this.evaJuri[i].id) {
  16269. this.eTitle = this.evaJuri[i].title;
  16270. this.eJson = JSON.parse(this.evaJuri[i].content);
  16271. }
  16272. }
  16273. this.data.data = [];
  16274. this.$forceUpdate();
  16275. setTimeout(() => {
  16276. this.setMindData();
  16277. }, 1000);
  16278. }
  16279. },
  16280. deleteEva() {
  16281. let _this = this;
  16282. if (_this.evalua == "") {
  16283. this.$message.warning("内容已经清空了,请勿重复清空");
  16284. return;
  16285. }
  16286. _this
  16287. .$confirm("确定删除此目标吗?", "提示", {
  16288. confirmButtonText: "确定",
  16289. cancelButtonText: "取消",
  16290. type: "warning",
  16291. })
  16292. .then(() => {
  16293. _this.evalua = "";
  16294. _this.checkId = "";
  16295. _this.eTitle = "";
  16296. let _unitJson = _this.unitJson;
  16297. for (var i = 0; i < _unitJson.length; i++) {
  16298. let _task = _unitJson[i].chapterInfo[0].taskJson;
  16299. for (var j = 0; j < _task.length; j++) {
  16300. let _eList = _task[j].eList;
  16301. for (var k = 0; k < _eList.length; k++) {
  16302. delete _eList[k].target;
  16303. }
  16304. }
  16305. }
  16306. _this.$forceUpdate();
  16307. if (_this.cid) {
  16308. _this.updateWork();
  16309. }
  16310. })
  16311. .catch(() => {
  16312. return;
  16313. });
  16314. },
  16315. selectEva() {
  16316. let params = {
  16317. oid: this.oid,
  16318. };
  16319. this.ajax
  16320. .get(this.$store.state.api + "selectAllEvaluation", params)
  16321. .then((res) => {
  16322. this.evaJuri = res.data[0];
  16323. // 在复制操作之前记录滚动位置
  16324. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  16325. // 执行复制操作
  16326. // 复制操作完成后恢复滚动位置
  16327. this.$nextTick(() => {
  16328. if (this.$refs.scrollContainer) {
  16329. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  16330. }
  16331. });
  16332. })
  16333. .catch((err) => {
  16334. console.error(err);
  16335. });
  16336. },
  16337. setMindData() {
  16338. let targetArray = [];
  16339. this.data.data = [];
  16340. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  16341. let _eJson = Object.keys(this.eJson);
  16342. let _e = this.eJson;
  16343. for (let i = 0; i < _eJson.length; i++) {
  16344. let element = _e[_eJson[i]];
  16345. this.data.data.push({
  16346. id: element.id,
  16347. parentid: "root",
  16348. topic: element.name,
  16349. });
  16350. // targetArray.push({
  16351. // id: element.id,
  16352. // parentid: "root",
  16353. // name: element.name,
  16354. // });
  16355. targetArray.push({
  16356. value: element.name,
  16357. label: element.name,
  16358. children: [],
  16359. });
  16360. let _eJsonc = Object.keys(element.child);
  16361. let _e2 = element.child;
  16362. for (let j = 0; j < _eJsonc.length; j++) {
  16363. let _ec = _e2[_eJsonc[j]];
  16364. this.data.data.push({
  16365. id: _ec.id,
  16366. parentid: element.id,
  16367. topic: _ec.name,
  16368. });
  16369. // targetArray.push({
  16370. // id: _ec.id,
  16371. // parentid: element.id,
  16372. // name: _ec.name,
  16373. // });
  16374. targetArray[i].children.push({
  16375. value: _ec.name,
  16376. label: _ec.name,
  16377. children: [],
  16378. });
  16379. let _eJsonz = Object.keys(_ec.child);
  16380. let _e3 = _ec.child;
  16381. for (let z = 0; z < _eJsonz.length; z++) {
  16382. let _ez = _e3[_eJsonz[z]];
  16383. this.data.data.push({
  16384. id: _ez.id,
  16385. parentid: _ec.id,
  16386. topic: _ez.name,
  16387. });
  16388. // targetArray.push({
  16389. // id: _ez.id,
  16390. // parentid: _ec.id,
  16391. // name: _ez.name,
  16392. // });
  16393. targetArray[i].children[j].children.push({
  16394. value: _ez.name,
  16395. label: _ez.name,
  16396. });
  16397. }
  16398. }
  16399. }
  16400. this.targetArray = targetArray;
  16401. this.$forceUpdate();
  16402. },
  16403. /*添加评价 */
  16404. addEList(index, tIndex) {
  16405. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  16406. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  16407. value: "",
  16408. detail: "",
  16409. score: 5,
  16410. isai: "1",
  16411. })
  16412. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  16413. { value: "", detail: "", score: 5,isai: "1", },
  16414. ]);
  16415. this.$forceUpdate();
  16416. },
  16417. openEList(index, tIndex) {
  16418. this.evaIndex = index;
  16419. this.evatIndex = tIndex;
  16420. this.evaBoxDialog = true;
  16421. },
  16422. addCET(index, tIndex) {
  16423. this.cetIndex = index;
  16424. this.cettIndex = tIndex;
  16425. this.selectAllType1();
  16426. },
  16427. addCETemplate() {
  16428. var array =
  16429. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  16430. .eList;
  16431. let params = [
  16432. {
  16433. uid: this.userid,
  16434. n: this.templateName,
  16435. json: JSON.stringify(array),
  16436. t: 1,
  16437. oid: this.oid,
  16438. },
  16439. ];
  16440. this.ajax
  16441. .post(this.$store.state.api + "addCETShare", params)
  16442. .then((res) => {
  16443. this.addTypeByCET(res.data[0][0].id);
  16444. })
  16445. .catch((err) => {
  16446. this.$message.error("网络不佳");
  16447. console.error(err);
  16448. });
  16449. },
  16450. addTypeByCET(id) {
  16451. if (this.setTypeJson.two == "") {
  16452. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  16453. return;
  16454. }
  16455. let params = {
  16456. cid: id,
  16457. };
  16458. this.ajax
  16459. .get(this.$store.state.api + "deleteCETLabel", params)
  16460. .then((res) => {
  16461. for (var i = 0; i < 2; i++) {
  16462. let tid = "";
  16463. if (i == 0) {
  16464. tid = this.setTypeJson.one;
  16465. } else {
  16466. tid = this.setTypeJson.two;
  16467. }
  16468. let params = [
  16469. {
  16470. cid: id,
  16471. tid: tid,
  16472. uid: this.userid,
  16473. },
  16474. ];
  16475. this.ajax
  16476. .post(this.$store.state.api + "addCETLabel", params)
  16477. .then((res) => {
  16478. this.$message({
  16479. message: "添加成功",
  16480. type: "success",
  16481. });
  16482. this.close();
  16483. })
  16484. .catch((err) => {
  16485. this.$message.error("网络不佳");
  16486. console.error(err);
  16487. });
  16488. }
  16489. })
  16490. .catch((err) => {
  16491. this.$message.error("网络不佳");
  16492. console.error(err);
  16493. });
  16494. },
  16495. updateEvaJson(array) {
  16496. array = array.filter((item) => {
  16497. item.isai = "1"
  16498. return item;
  16499. });
  16500. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  16501. this.evatIndex
  16502. ].eList = array;
  16503. },
  16504. forceUpdate() {
  16505. this.$forceUpdate();
  16506. },
  16507. forceUpdate2() {
  16508. setTimeout(() => {
  16509. this.courseText += "*0*%*";
  16510. setTimeout(() => {
  16511. this.courseText = this.courseText.replaceAll("*0*%*", "");
  16512. }, 0);
  16513. }, 100);
  16514. this.$forceUpdate();
  16515. },
  16516. deletEList(index, tIndex, eIndex) {
  16517. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  16518. eIndex,
  16519. 1
  16520. );
  16521. this.$forceUpdate();
  16522. },
  16523. getChoosePic(t) {
  16524. this.chooseType = t;
  16525. this.getAllBanner();
  16526. },
  16527. getAllBanner() {
  16528. this.sysPicVisible = true;
  16529. let params = {
  16530. t: this.chooseType,
  16531. };
  16532. this.ajax
  16533. .get(this.$store.state.api + "selectAllBanner", params)
  16534. .then((res) => {
  16535. this.sysPic = res.data[0];
  16536. })
  16537. .catch((err) => {
  16538. console.error(err);
  16539. });
  16540. },
  16541. // getClass() {
  16542. // let params = {
  16543. // oid: this.oid,
  16544. // };
  16545. // this.ajax
  16546. // .get(this.$store.state.api + "selectClassBySchool", params)
  16547. // .then((res) => {
  16548. // this.classJuri = res.data[0];
  16549. // })
  16550. // .catch((err) => {
  16551. // console.error(err);
  16552. // });
  16553. // },
  16554. deleteSysPic() {
  16555. this.cover = [];
  16556. this.isSysPic = false;
  16557. this.isSysPic2 = false;
  16558. },
  16559. deleteSelectPic() {
  16560. this.selectJson.url = "";
  16561. },
  16562. setEListStar() {
  16563. this.$forceUpdate();
  16564. },
  16565. deletRateList(i) {
  16566. this.rateJson.splice(i, 1);
  16567. },
  16568. addRateList() {
  16569. this.rateJson.push({ detail: "", score: 5, value: "" });
  16570. },
  16571. addSt() {
  16572. this.sentenceList.push({
  16573. sentenceTitle: "",
  16574. addSentence: [],
  16575. rightAnswer: [],
  16576. });
  16577. },
  16578. addSen(i) {
  16579. if (!this.sentenceList[i].sentenceTitle) {
  16580. this.$message.error("请填写卡片内容!");
  16581. return;
  16582. }
  16583. if (this.sentenceList[i].sentenceTitle.length > 10) {
  16584. this.$message.error("卡片内容字数不能超过10位");
  16585. return;
  16586. }
  16587. if (
  16588. this.sentenceList[i].addSentence.indexOf(
  16589. this.sentenceList[i].sentenceTitle
  16590. ) !== -1
  16591. ) {
  16592. this.$message.error("不能添加重复的卡片内容!");
  16593. return;
  16594. }
  16595. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  16596. // this.isPushTitleList.push(this.sentenceTitle);
  16597. this.sentenceList[i].sentenceTitle = "";
  16598. },
  16599. setRightAnswer(s, i, j) {
  16600. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  16601. this.sentenceList[i].rightAnswer.push(s);
  16602. }
  16603. },
  16604. returnCard(r, i, j) {
  16605. this.sentenceList[i].rightAnswer.splice(j, 1);
  16606. },
  16607. addSentenceTool() {
  16608. for (var i = 0; i < this.sentenceList.length; i++) {
  16609. if (this.sentenceList[i].rightAnswer.length == 0) {
  16610. this.$message.error(`请将题目${i + 1}设置完整。`);
  16611. return;
  16612. }
  16613. if (
  16614. this.sentenceList[i].addSentence.length !=
  16615. this.sentenceList[i].rightAnswer.length
  16616. ) {
  16617. this.$message.error(`请将题目${i + 1}设置完整。`);
  16618. return;
  16619. }
  16620. }
  16621. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16622. this.taskCount
  16623. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  16624. this.sentenceList = [
  16625. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  16626. ];
  16627. this.dialogVisibleSentence = false;
  16628. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16629. // itemTaskIndex
  16630. // ].toolChoose[toolIndex].tool = [];
  16631. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16632. // itemTaskIndex
  16633. // ].toolChoose[toolIndex].tool.push(i);
  16634. if (
  16635. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16636. .toolChoose[this.toolIndex].tool != 47
  16637. ) {
  16638. this.addTools(47, this.taskCount, this.toolIndex);
  16639. }
  16640. },
  16641. addTableJson() {
  16642. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  16643. // this.$message.error("请将信息填写完整!");
  16644. // return;
  16645. // }
  16646. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16647. this.taskCount
  16648. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  16649. // this.tableJson = [{ text: "" }];
  16650. // this.dialogVisibleTable = false;
  16651. this.$message.success("上传成功");
  16652. if (
  16653. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16654. .toolChoose[this.toolIndex].tool != 48
  16655. ) {
  16656. this.addTools(48, this.taskCount, this.toolIndex);
  16657. }
  16658. },
  16659. addWordJson() {
  16660. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16661. this.taskCount
  16662. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  16663. // this.wordJson = [{ text: "" }];
  16664. // this.dialogVisibleWord = false;
  16665. this.$message.success("上传成功");
  16666. if (
  16667. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16668. .toolChoose[this.toolIndex].tool != 52
  16669. ) {
  16670. this.addTools(52, this.taskCount, this.toolIndex);
  16671. }
  16672. },
  16673. addMoreUpload() {
  16674. if (this.uploadJson.length == 0) {
  16675. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16676. this.taskCount
  16677. ].toolChoose[this.toolIndex].uploadJson = [];
  16678. } else {
  16679. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16680. this.taskCount
  16681. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  16682. }
  16683. this.uploadJson = [];
  16684. this.dialogVisibleMoreUpload = false;
  16685. if (
  16686. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16687. .toolChoose[this.toolIndex].tool != 50
  16688. ) {
  16689. this.addTools(50, this.taskCount, this.toolIndex);
  16690. }
  16691. },
  16692. addPreTime() {
  16693. if (this.preTime == 0) {
  16694. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16695. this.taskCount
  16696. ].toolChoose[this.toolIndex].preTime = 0;
  16697. } else {
  16698. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16699. this.taskCount
  16700. ].toolChoose[this.toolIndex].preTime = this.preTime;
  16701. }
  16702. this.preTime = 0;
  16703. this.dialogVisiblePreTime = false;
  16704. if (
  16705. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16706. .toolChoose[this.toolIndex].tool != 10
  16707. ) {
  16708. this.addTools(10, this.taskCount, this.toolIndex);
  16709. }
  16710. },
  16711. goToTask(i) {
  16712. this.toolIndexType = "";
  16713. if (this.isClickColor == i + 1) {
  16714. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16715. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16716. // } else {
  16717. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16718. i
  16719. ].toolOpen = true;
  16720. // }
  16721. this.$forceUpdate();
  16722. return;
  16723. }
  16724. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16725. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16726. // } else {
  16727. document.querySelectorAll(".basic_box")[0].scrollTop =
  16728. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16729. this.isClickColor = i + 1;
  16730. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16731. // }
  16732. this.$forceUpdate();
  16733. },
  16734. taskScroll(){
  16735. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  16736. const sections = document.querySelectorAll('.taskBorder');
  16737. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  16738. sections.forEach((section, index) => {
  16739. const offsetTop = section.offsetTop;
  16740. const offsetHeight = section.offsetHeight;
  16741. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  16742. this.isClickColor = index +1;
  16743. }
  16744. });
  16745. },
  16746. taskOpen(i, stageIndex) {
  16747. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16748. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  16749. } else {
  16750. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16751. }
  16752. this.updateWork3(stageIndex);
  16753. this.$forceUpdate();
  16754. },
  16755. goToTask2(i, stage) {
  16756. this.toolIndexType = "";
  16757. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  16758. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16759. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16760. // } else {
  16761. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16762. i
  16763. ].toolOpen = true;
  16764. // }
  16765. this.$forceUpdate();
  16766. return;
  16767. }
  16768. if (this.unitIndex != stage) {
  16769. if (this.panUnitJson() == 2) {
  16770. return;
  16771. }
  16772. this.unitSet(stage);
  16773. }
  16774. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16775. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16776. // } else {
  16777. document.querySelectorAll(".basic_box")[0].scrollTop =
  16778. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16779. this.isClickColor = i + 1;
  16780. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16781. // }
  16782. this.$forceUpdate();
  16783. },
  16784. taskMove(type, index) {
  16785. this.$confirm(
  16786. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  16787. "提示",
  16788. {
  16789. confirmButtonText: "确定",
  16790. cancelButtonText: "取消",
  16791. type: "warning",
  16792. }
  16793. )
  16794. .then(() => {
  16795. if (type == 1) {
  16796. if (index > 0) {
  16797. let a = JSON.parse(
  16798. JSON.stringify(
  16799. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16800. index - 1
  16801. ]
  16802. )
  16803. );
  16804. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  16805. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16806. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16807. }
  16808. } else {
  16809. if (
  16810. index <
  16811. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  16812. ) {
  16813. let a = JSON.parse(
  16814. JSON.stringify(
  16815. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16816. index + 1
  16817. ]
  16818. )
  16819. );
  16820. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  16821. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16822. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16823. }
  16824. }
  16825. this.$forceUpdate();
  16826. })
  16827. .catch(() => {
  16828. return;
  16829. });
  16830. },
  16831. stageMove(type, index) {
  16832. if (type == 1) {
  16833. if (index > 0) {
  16834. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  16835. let acid = JSON.parse(
  16836. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  16837. );
  16838. let bcid = JSON.parse(
  16839. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  16840. );
  16841. this.unitJson3[index - 1] = this.unitJson3[index];
  16842. this.unitJson3[index] = a;
  16843. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  16844. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  16845. }
  16846. } else {
  16847. if (index < this.unitJson3.length - 1) {
  16848. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  16849. let acid = JSON.parse(
  16850. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  16851. );
  16852. let bcid = JSON.parse(
  16853. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  16854. );
  16855. this.unitJson3[index + 1] = this.unitJson3[index];
  16856. this.unitJson3[index] = a;
  16857. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  16858. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  16859. }
  16860. }
  16861. this.$forceUpdate();
  16862. },
  16863. addGroup(i) {
  16864. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  16865. this.groupJson.group.push({
  16866. name: "第" + (this.groupJson.group.length + 1) + "组",
  16867. });
  16868. },
  16869. deleteGroup(i) {
  16870. this.groupJson.group.splice(i, 1);
  16871. },
  16872. numberPan() {
  16873. if (
  16874. /[^\d]/.test(this.groupJson.number) ||
  16875. this.groupJson.number < 2 ||
  16876. this.groupJson.number > 10
  16877. ) {
  16878. this.$message.error("请输入2-10的数字");
  16879. this.groupJson.number = "";
  16880. }
  16881. },
  16882. numberPanJie() {
  16883. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  16884. this.$message.error('请输入大于1的数字')
  16885. this.courseJie = 1
  16886. }
  16887. },
  16888. numberPanTime() {
  16889. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  16890. this.$message.error('请输入大于1的数字')
  16891. this.courseTime = 1
  16892. }
  16893. },
  16894. addGroupJson() {
  16895. for (var i = 0; i < this.groupJson.group.length; i++) {
  16896. if (!this.groupJson.group[i].name) {
  16897. this.$message.error("请将信息填写完整!");
  16898. return;
  16899. }
  16900. }
  16901. if (!this.groupJson.number) {
  16902. this.$message.error("请将信息填写完整!");
  16903. return;
  16904. }
  16905. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16906. this.taskCount
  16907. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  16908. JSON.stringify(this.groupJson)
  16909. );
  16910. this.dialogVisibleGroup = false;
  16911. this.groupJson = {};
  16912. if (
  16913. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16914. .toolChoose[this.toolIndex].tool != 49
  16915. ) {
  16916. this.addTools(49, this.taskCount, this.toolIndex);
  16917. }
  16918. },
  16919. updateTime(preTime) {
  16920. this.preTime = preTime;
  16921. },
  16922. InviteChange(val) {
  16923. console.log(val);
  16924. let _check = [];
  16925. let _check2 = [];
  16926. for (var i = 0; i < this.grade2.length; i++) {
  16927. var gid = this.grade2[i].id;
  16928. _check.push(gid);
  16929. }
  16930. for (var i = 0; i < this.checkboxList2.length; i++) {
  16931. var _id = this.checkboxList2[i];
  16932. if (_check.indexOf(_id) !== -1) {
  16933. _check2.push(_id);
  16934. }
  16935. }
  16936. this.checkAll = _check2.length === _check.length;
  16937. return;
  16938. let array = JSON.parse(JSON.stringify(val));
  16939. this.inviteCode = this.inviteCode.filter((el) => {
  16940. if (val.indexOf(el.cid) != -1) {
  16941. array.splice(array.indexOf(el.cid), 1);
  16942. return el;
  16943. }
  16944. });
  16945. for (var i = 0; i < array.length; i++) {
  16946. this.getInviteCode(array[i]);
  16947. }
  16948. },
  16949. InviteChange2(val) {
  16950. console.log(val);
  16951. let _check = [];
  16952. let _check2 = [];
  16953. for (var i = 0; i < this.teacherJuri.length; i++) {
  16954. var gid = this.teacherJuri[i].userid;
  16955. _check.push(gid);
  16956. }
  16957. for (var i = 0; i < this.checkboxList3.length; i++) {
  16958. var _id = this.checkboxList3[i];
  16959. if (_check.indexOf(_id) !== -1) {
  16960. _check2.push(_id);
  16961. }
  16962. }
  16963. this.checkAll2 = _check2.length === _check.length;
  16964. this.setMan();
  16965. return;
  16966. let array = JSON.parse(JSON.stringify(val));
  16967. this.inviteCode = this.inviteCode.filter((el) => {
  16968. if (val.indexOf(el.cid) != -1) {
  16969. array.splice(array.indexOf(el.cid), 1);
  16970. return el;
  16971. }
  16972. });
  16973. for (var i = 0; i < array.length; i++) {
  16974. this.getInviteCode(array[i]);
  16975. }
  16976. },
  16977. handleCheckAllChange(val) {
  16978. if (val) {
  16979. for (var i = 0; i < this.grade2.length; i++) {
  16980. var gid = this.grade2[i].id;
  16981. if (this.checkboxList2.indexOf(gid) === -1) {
  16982. this.checkboxList2.push(gid);
  16983. }
  16984. }
  16985. } else {
  16986. let _check = [];
  16987. let _check2 = [];
  16988. for (var i = 0; i < this.grade2.length; i++) {
  16989. var gid = this.grade2[i].id;
  16990. _check.push(gid);
  16991. }
  16992. for (var i = 0; i < this.checkboxList2.length; i++) {
  16993. var _id = this.checkboxList2[i];
  16994. if (_check.indexOf(_id) === -1) {
  16995. _check2.push(_id);
  16996. }
  16997. }
  16998. this.checkboxList2 = _check2;
  16999. }
  17000. this.isIndeterminate = false;
  17001. },
  17002. handleCheckAllChange2(val) {
  17003. if (val) {
  17004. for (var i = 0; i < this.teacherJuri.length; i++) {
  17005. var gid = this.teacherJuri[i].userid;
  17006. if (this.checkboxList3.indexOf(gid) === -1) {
  17007. this.checkboxList3.push(gid);
  17008. }
  17009. }
  17010. } else {
  17011. let _check = [];
  17012. let _check2 = [];
  17013. for (var i = 0; i < this.teacherJuri.length; i++) {
  17014. var gid = this.teacherJuri[i].userid;
  17015. _check.push(gid);
  17016. }
  17017. for (var i = 0; i < this.checkboxList3.length; i++) {
  17018. var _id = this.checkboxList3[i];
  17019. if (_check.indexOf(_id) === -1) {
  17020. _check2.push(_id);
  17021. }
  17022. }
  17023. this.checkboxList3 = _check2;
  17024. }
  17025. this.isIndeterminate2 = false;
  17026. },
  17027. async getInviteCode(cid) {
  17028. let code = this.randomNumber();
  17029. let params = {
  17030. code: code,
  17031. oid: this.oid,
  17032. };
  17033. let type = 1;
  17034. for (var i = 0; i < this.inviteCode.length; i++) {
  17035. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  17036. type = 2;
  17037. }
  17038. }
  17039. if (type == 2) {
  17040. this.getInviteCode(cid);
  17041. return;
  17042. }
  17043. const res = await this.ajax.get(
  17044. this.$store.state.api + "selectInviteCode2",
  17045. params
  17046. );
  17047. if (
  17048. res.data.length &&
  17049. res.data[0].length &&
  17050. res.data[0][0].courseId != this.cid
  17051. ) {
  17052. this.getInviteCode(cid);
  17053. return;
  17054. }
  17055. let array = [];
  17056. for (var i = 0; i < this.inviteCode.length; i++) {
  17057. array.push(this.inviteCode[i].cid);
  17058. }
  17059. if (array.indexOf(cid) != -1) {
  17060. this.inviteCode[array.indexOf(cid)].ic = code;
  17061. } else {
  17062. this.inviteCode.push({ cid: cid, ic: code });
  17063. }
  17064. },
  17065. OpenInviteD(cid) {
  17066. let array = [];
  17067. this.icode = "";
  17068. for (var i = 0; i < this.inviteCode.length; i++) {
  17069. array.push(this.inviteCode[i].cid);
  17070. }
  17071. if (array.indexOf(cid) != -1) {
  17072. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  17073. }
  17074. this.inviteId = cid;
  17075. this.dialogVisibleInvite = true;
  17076. },
  17077. addInvite() {
  17078. let reg = /^[A-Za-z0-9]{4,}$/;
  17079. if (!reg.test(this.icode)) {
  17080. this.$message.error("请输入至少四位数字或英文组合的随机码");
  17081. return;
  17082. }
  17083. let type = 1;
  17084. for (var i = 0; i < this.inviteCode.length; i++) {
  17085. if (
  17086. this.inviteCode[i].cid != this.inviteId &&
  17087. this.icode == this.inviteCode[i].ic
  17088. ) {
  17089. type = 2;
  17090. }
  17091. }
  17092. if (type == 2) {
  17093. this.$message.error("已有此随机码,不能重复");
  17094. return;
  17095. }
  17096. let params = {
  17097. code: this.icode,
  17098. oid: this.oid,
  17099. };
  17100. this.ajax
  17101. .get(this.$store.state.api + "selectInviteCode", params)
  17102. .then((res) => {
  17103. if (
  17104. res.data.length &&
  17105. res.data[0].length &&
  17106. res.data[0][0].courseId != this.cid
  17107. ) {
  17108. this.$message.error("已有此随机码,不能重复");
  17109. return;
  17110. }
  17111. let array = [];
  17112. for (var i = 0; i < this.inviteCode.length; i++) {
  17113. array.push(this.inviteCode[i].cid);
  17114. }
  17115. if (array.indexOf(this.inviteId) != -1) {
  17116. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  17117. } else {
  17118. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  17119. }
  17120. this.icode = "";
  17121. this.dialogVisibleInvite = false;
  17122. })
  17123. .catch((err) => {
  17124. console.error(err);
  17125. });
  17126. },
  17127. randomNumber() {
  17128. // 随机生成两位数
  17129. // let num = Math.floor(Math.random() * 900) + 100;
  17130. // 生成 0 到 99 之间的随机整数
  17131. const randomNumber = Math.floor(Math.random() * 100);
  17132. // 如果随机数小于 10,补上前导零
  17133. const num =
  17134. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  17135. // 随机生成两个大写字母
  17136. let letters = "";
  17137. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  17138. for (let i = 0; i < 3; i++) {
  17139. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  17140. }
  17141. // 随机生成两位数字和字母的组合
  17142. let mix = "";
  17143. let chars =
  17144. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  17145. for (let i = 0; i < 3; i++) {
  17146. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  17147. mix += char;
  17148. }
  17149. // 随机选择一种类型
  17150. let type = Math.floor(Math.random() * 3);
  17151. return num;
  17152. // 根据类型输出结果
  17153. switch (type) {
  17154. case 0:
  17155. console.log(num); // 输出两位数
  17156. return num;
  17157. case 1:
  17158. console.log(letters); // 输出两个大写字母
  17159. return letters;
  17160. case 2:
  17161. console.log(mix); // 输出两位数字和字母的组合
  17162. return mix;
  17163. }
  17164. },
  17165. getPaste() {
  17166. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  17167. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  17168. if (!iframe && !iframe2) {
  17169. return;
  17170. }
  17171. let copyData = iframe ? iframe.contentWindow.copyData : false;
  17172. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  17173. if (copyData && copyData.stageData && copyData.stageData.length) {
  17174. this.isPasteStage = true;
  17175. }
  17176. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  17177. this.isPasteStage = true;
  17178. }
  17179. if (copyData && copyData.selectData.length) {
  17180. this.isPasteChoice = true;
  17181. }
  17182. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  17183. this.isPasteTask = true;
  17184. }
  17185. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  17186. this.isPasteTask = true;
  17187. }
  17188. },
  17189. getPaste2() {
  17190. let iframe = document.querySelectorAll(".interIframe")[0];
  17191. const turndownService = new TurndownService();
  17192. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  17193. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  17194. if(confirm_next_step){
  17195. this.courseText += turndownService.turndown(confirm_next_step)
  17196. iframe.contentWindow.confirm_next_step = ''
  17197. }
  17198. if(work_area_text && work_area_text.aiContent){
  17199. this.courseText += turndownService.turndown(work_area_text.aiContent)
  17200. iframe.contentWindow.work_area_text = ''
  17201. }
  17202. },
  17203. textAreaChange(type, index){
  17204. if(type == 'courseText'){
  17205. this.addCourseBehavior('courseBehavior', `手动修改课程概况信息-${this.courseText}`)
  17206. }
  17207. if(type == 'targetCourseText2'){
  17208. this.addCourseBehavior('courseBehavior', `手动修改课程目标信息-${this.targetCourseText2}`)
  17209. }
  17210. if(type == 'taskDetail2'){
  17211. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程大纲信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2}`)
  17212. }
  17213. if(type == 'taskDetail3'){
  17214. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程教案信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3}`)
  17215. }
  17216. },
  17217. setCourseInfo(type){
  17218. let courseInfo = ''
  17219. let sub = []
  17220. let mclass = []
  17221. if (this.courseTypeId.length) {
  17222. for (var i = 0; i < this.courseTypeId.length; i++) {
  17223. let _sid = this.courseTypeId[i]
  17224. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17225. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17226. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17227. }
  17228. }
  17229. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17230. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17231. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17232. }
  17233. }
  17234. }
  17235. }
  17236. if(this.courseName){
  17237. courseInfo = `课程名称:${this.courseName} `
  17238. }
  17239. if(mclass.length){
  17240. courseInfo += `年级:${mclass.join(',')} `
  17241. }
  17242. if(sub.length){
  17243. courseInfo += `学科:${sub.join(',')} `
  17244. }
  17245. console.log(courseInfo)
  17246. window.course_info = courseInfo
  17247. this.course_info = courseInfo
  17248. window.course_lang = this.languageSetting
  17249. },
  17250. saveCourse(){
  17251. if (this.cid == "" || this.cid == undefined) {
  17252. this.addWork();
  17253. } else {
  17254. if (this.userid != this.courseUserid && this.role != "1") {
  17255. this.updateWork2();
  17256. } else {
  17257. this.updateWork();
  17258. }
  17259. }
  17260. },
  17261. setCover($event, attempts = 0) {
  17262. var _this = this;
  17263. this.addCourseBehavior('courseBehavior', `修改课程名称-${this.courseName}`)
  17264. _this.searchFileName = JSON.parse(JSON.stringify(_this.courseName))
  17265. if (_this.cover.length || attempts >= 3) {
  17266. return;
  17267. }
  17268. _this.findMatchingContents()
  17269. _this.imageloading2 = true;
  17270. _this.ajax
  17271. .post("https://gpt.cocorobo.cn/search_image", {
  17272. page: _this.ppage,
  17273. pagesize: 9,
  17274. query: _this.courseName,
  17275. })
  17276. .then(function (response) {
  17277. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  17278. if(data){
  17279. _this.cover = [];
  17280. setTimeout(() => {
  17281. _this.cover[0] = {
  17282. name: "网络图片.png",
  17283. url: data[0].thumbnail,
  17284. };
  17285. _this.imgChange1(null, null, 1, null);
  17286. _this.$forceUpdate();
  17287. _this.saveCourse()
  17288. }, 0);
  17289. _this.imageloading2 = false;
  17290. }else {
  17291. _this.imageloading2 = false;
  17292. _this.setCover($event, attempts + 1);
  17293. }
  17294. })
  17295. .catch(function (error) {
  17296. _this.imageloading2 = false;
  17297. _this.setCover($event, attempts + 1);
  17298. console.log(error);
  17299. });
  17300. },
  17301. searchImage() {
  17302. var _this = this;
  17303. _this.imageList = [];
  17304. if (!_this.searchImageValue) {
  17305. _this.sysPicVisible2 = true;
  17306. return;
  17307. }
  17308. _this.imageloading = true;
  17309. _this.ajax
  17310. .post("https://gpt.cocorobo.cn/search_image", {
  17311. page: _this.ppage,
  17312. pagesize: 9,
  17313. query: _this.searchImageValue,
  17314. })
  17315. .then(function (response) {
  17316. // console.log(response.data.data);
  17317. var data = response.data.FunctionResponse.result;
  17318. for (var i = 0; i < data.length; i++) {
  17319. _this.imageList.push({ url: data[i].thumbnail });
  17320. }
  17321. _this.imageloading = false;
  17322. })
  17323. .catch(function (error) {
  17324. console.log(error);
  17325. });
  17326. _this.sysPicVisible2 = true;
  17327. },
  17328. changePicture() {
  17329. this.ppage++;
  17330. this.searchImage();
  17331. },
  17332. resetImage() {
  17333. this.ppage = 1;
  17334. this.searchImage();
  17335. },
  17336. jumpGj(i, j) {
  17337. if (i + 1 != this.isClickColor) {
  17338. this.isClickColor = i + 1;
  17339. }
  17340. var a = document.scrollingElement;
  17341. this.toolIndexType = `gj${i}${j}`;
  17342. let target = document.querySelector(`#gj${i}${j}`);
  17343. if (target) {
  17344. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17345. setTimeout(() => {
  17346. target.scrollIntoView(true);
  17347. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17348. j
  17349. ].isFold3 = false;
  17350. setTimeout(() => {
  17351. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17352. }, 0);
  17353. }, 0);
  17354. }
  17355. },
  17356. jumpGj2(i, j, k) {
  17357. if (this.unitIndex != k) {
  17358. if (this.panUnitJson() == 2) {
  17359. return;
  17360. }
  17361. this.unitSet(k);
  17362. }
  17363. setTimeout(() => {
  17364. if (i + 1 != this.isClickColor) {
  17365. this.isClickColor = i + 1;
  17366. }
  17367. var a = document.scrollingElement;
  17368. this.toolIndexType = `gj${i}${j}${k}`;
  17369. let target = document.querySelector(`#gj${i}${j}`);
  17370. if (target) {
  17371. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  17372. setTimeout(() => {
  17373. target.scrollIntoView(true);
  17374. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  17375. j
  17376. ].isFold3 = false;
  17377. setTimeout(() => {
  17378. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  17379. }, 0);
  17380. }, 0);
  17381. }
  17382. }, 0);
  17383. },
  17384. dragStart(val, i, j) {
  17385. console.log(this.taskCount);
  17386. this.dragType = "drag";
  17387. this.taskCount = j;
  17388. this.oldIndex = i;
  17389. this.oldData = val;
  17390. },
  17391. dragOver(i, j) {
  17392. this.typeIndex = "chapter-" + j + "-" + i;
  17393. this.newIndex = i;
  17394. },
  17395. dragEnd() {
  17396. if (this.dragType != "drag") {
  17397. this.typeIndex = "";
  17398. this.newIndex = "";
  17399. this.dragType = "";
  17400. this.isdrag = "";
  17401. return;
  17402. }
  17403. console.log(this.taskCount);
  17404. let newItems = [
  17405. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  17406. .chapterData,
  17407. ];
  17408. // 删除老的节点
  17409. newItems.splice(this.oldIndex, 1);
  17410. // 在列表中目标位置增加新的节点
  17411. newItems.splice(this.newIndex, 0, this.oldData);
  17412. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  17413. this.taskCount
  17414. ].chapterData = [...newItems];
  17415. this.typeIndex = "";
  17416. this.newIndex = "";
  17417. this.dragType = "";
  17418. this.isdrag = "";
  17419. this.$forceUpdate();
  17420. },
  17421. dragTaskStart(val, i, j) {
  17422. this.dragType = "task";
  17423. this.oldIndex = i;
  17424. this.oldData = val;
  17425. this.oldUnitIndex = j;
  17426. },
  17427. dragTaskOver(i, j) {
  17428. this.typeIndex = "task-" + i;
  17429. this.newIndex = i;
  17430. this.checkUnitIndex = j;
  17431. },
  17432. async dragTaskEnd() {
  17433. if (this.dragType != "task") {
  17434. this.newIndex = "";
  17435. this.dragType = "";
  17436. this.typeIndex = "";
  17437. this.checkUnitIndex = "";
  17438. this.isdrag = "";
  17439. return;
  17440. }
  17441. if (
  17442. this.newIndex == this.oldIndex &&
  17443. this.oldUnitIndex == this.checkUnitIndex
  17444. ) {
  17445. this.newIndex = "";
  17446. this.dragType = "";
  17447. this.typeIndex = "";
  17448. this.checkUnitIndex = "";
  17449. this.isdrag = "";
  17450. return;
  17451. }
  17452. let count1 = await this.getWorksCount(
  17453. 2,
  17454. this.checkUnitIndex,
  17455. this.newIndex,
  17456. 0
  17457. );
  17458. let count2 = await this.getWorksCount(
  17459. 2,
  17460. this.oldUnitIndex,
  17461. this.oldIndex,
  17462. 0
  17463. );
  17464. if (count1 > 0 || count2 > 0) {
  17465. this.$confirm(
  17466. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  17467. "提示",
  17468. {
  17469. confirmButtonText: "确定",
  17470. cancelButtonText: "取消",
  17471. type: "warning",
  17472. }
  17473. )
  17474. .then(() => {
  17475. if (this.oldUnitIndex != this.checkUnitIndex) {
  17476. let newItems = [
  17477. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17478. ];
  17479. // 删除老的节点
  17480. newItems.splice(this.oldIndex, 1);
  17481. // 在列表中目标位置增加新的节点
  17482. let newItems2 = [
  17483. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17484. ];
  17485. newItems2.splice(this.newIndex, 0, this.oldData);
  17486. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17487. ...newItems,
  17488. ];
  17489. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17490. ...newItems2,
  17491. ];
  17492. } else {
  17493. let newItems = [
  17494. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17495. ];
  17496. let chapterData = []
  17497. if (this.oldIndex == 0) {
  17498. chapterData = newItems[this.oldIndex].chapterData
  17499. newItems[this.oldIndex].chapterData = []
  17500. } else if (this.newIndex == 0) {
  17501. chapterData = newItems[this.newIndex].chapterData
  17502. newItems[this.oldIndex].chapterData = []
  17503. }
  17504. // 删除老的节点
  17505. newItems.splice(this.oldIndex, 1);
  17506. // 在列表中目标位置增加新的节点
  17507. newItems.splice(this.newIndex, 0, this.oldData);
  17508. if (this.oldIndex == 0 || this.newIndex == 0) {
  17509. newItems[0].chapterData = chapterData
  17510. }
  17511. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17512. ...newItems,
  17513. ];
  17514. }
  17515. this.typeIndex = "";
  17516. this.newIndex = "";
  17517. this.dragType = "";
  17518. this.checkUnitIndex = "";
  17519. this.isdrag = "";
  17520. this.updateWork();
  17521. this.$forceUpdate();
  17522. })
  17523. .catch(() => {
  17524. this.newIndex = "";
  17525. this.dragType = "";
  17526. this.typeIndex = "";
  17527. this.checkUnitIndex = "";
  17528. this.isdrag = "";
  17529. return;
  17530. });
  17531. } else {
  17532. if (this.oldUnitIndex != this.checkUnitIndex) {
  17533. let newItems = [
  17534. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17535. ];
  17536. // 删除老的节点
  17537. newItems.splice(this.oldIndex, 1);
  17538. // 在列表中目标位置增加新的节点
  17539. let newItems2 = [
  17540. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  17541. ];
  17542. newItems2.splice(this.newIndex, 0, this.oldData);
  17543. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17544. ...newItems,
  17545. ];
  17546. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  17547. ...newItems2,
  17548. ];
  17549. } else {
  17550. let newItems = [
  17551. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  17552. ];
  17553. let chapterData = []
  17554. if (this.oldIndex == 0) {
  17555. chapterData = newItems[this.oldIndex].chapterData
  17556. newItems[this.oldIndex].chapterData = []
  17557. } else if (this.newIndex == 0) {
  17558. chapterData = newItems[this.newIndex].chapterData
  17559. newItems[this.oldIndex].chapterData = []
  17560. }
  17561. // 删除老的节点
  17562. newItems.splice(this.oldIndex, 1);
  17563. // 在列表中目标位置增加新的节点
  17564. newItems.splice(this.newIndex, 0, this.oldData);
  17565. if (this.oldIndex == 0 || this.newIndex == 0) {
  17566. newItems[0].chapterData = chapterData
  17567. }
  17568. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  17569. ...newItems,
  17570. ];
  17571. }
  17572. this.typeIndex = "";
  17573. this.newIndex = "";
  17574. this.dragType = "";
  17575. this.checkUnitIndex = "";
  17576. this.isdrag = "";
  17577. this.updateWork();
  17578. this.$forceUpdate();
  17579. }
  17580. },
  17581. dragUnitStart(val, i) {
  17582. this.dragType = "Unit";
  17583. this.oldIndex = i;
  17584. this.oldData = val;
  17585. },
  17586. dragUnitOver(i) {
  17587. this.typeIndex = "Unit-" + i;
  17588. this.newIndex = i;
  17589. console.log(i, this.unitJson[i].toolOpen);
  17590. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  17591. this.unitJson[i].toolOpen = true;
  17592. this.updateWork();
  17593. this.$forceUpdate();
  17594. }
  17595. },
  17596. async dragUnitEnd() {
  17597. if (this.dragType != "Unit") {
  17598. this.newIndex = "";
  17599. this.dragType = "";
  17600. this.typeIndex = "";
  17601. this.isdrag = "";
  17602. return;
  17603. }
  17604. if (this.newIndex == this.oldIndex) {
  17605. this.newIndex = "";
  17606. this.dragType = "";
  17607. this.typeIndex = "";
  17608. this.isdrag = "";
  17609. return;
  17610. }
  17611. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  17612. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  17613. console.log(count1, count2);
  17614. if (count1 > 0 || count2 > 0) {
  17615. this.$confirm(
  17616. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  17617. "提示",
  17618. {
  17619. confirmButtonText: "确定",
  17620. cancelButtonText: "取消",
  17621. type: "warning",
  17622. }
  17623. )
  17624. .then(() => {
  17625. let newItems = [...this.unitJson];
  17626. // 删除老的节点
  17627. newItems.splice(this.oldIndex, 1);
  17628. // 在列表中目标位置增加新的节点
  17629. newItems.splice(this.newIndex, 0, this.oldData);
  17630. this.unitJson = [...newItems];
  17631. this.typeIndex = "";
  17632. this.newIndex = "";
  17633. this.dragType = "";
  17634. this.isdrag = "";
  17635. this.updateWork();
  17636. this.$forceUpdate();
  17637. })
  17638. .catch(() => {
  17639. this.newIndex = "";
  17640. this.dragType = "";
  17641. this.typeIndex = "";
  17642. this.isdrag = "";
  17643. return;
  17644. });
  17645. } else {
  17646. let newItems = [...this.unitJson];
  17647. // 删除老的节点
  17648. newItems.splice(this.oldIndex, 1);
  17649. // 在列表中目标位置增加新的节点
  17650. newItems.splice(this.newIndex, 0, this.oldData);
  17651. this.unitJson = [...newItems];
  17652. this.typeIndex = "";
  17653. this.newIndex = "";
  17654. this.dragType = "";
  17655. this.isdrag = "";
  17656. this.updateWork();
  17657. this.$forceUpdate();
  17658. }
  17659. },
  17660. getWorksCount(type, stage, task, tool) {
  17661. return new Promise((resolve, reject) => {
  17662. let params = [
  17663. {
  17664. cid: this.cid,
  17665. stage: stage,
  17666. task: task,
  17667. tool: tool,
  17668. type: type,
  17669. },
  17670. ];
  17671. this.ajax
  17672. .post(this.$store.state.api + "getCourseWorkCount", params)
  17673. .then((res) => {
  17674. let count = res.data[0][0].count;
  17675. resolve(count);
  17676. })
  17677. .catch((err) => {
  17678. resolve(0);
  17679. this.$message.error("网络不佳");
  17680. console.error(err);
  17681. });
  17682. });
  17683. },
  17684. getTwoType(id) {
  17685. this.twoJson = [];
  17686. var array = this.CourseTypeJson1[
  17687. "3f8eed32-aba9-11ee-b534-005056b86db5"
  17688. ].filter((e) => {
  17689. return e.ppid == id;
  17690. });
  17691. this.twoJson = array;
  17692. this.$forceUpdate();
  17693. },
  17694. ctype() {
  17695. this.oneJson =
  17696. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  17697. },
  17698. selectAllType1() {
  17699. this.CourseType1 = [];
  17700. this.CourseTypeJson1 = {};
  17701. this.courseTypeId1 = {};
  17702. this.$forceUpdate();
  17703. let params = {
  17704. org: this.org && this.org != "" ? this.org : "",
  17705. oid: this.oid && this.oid != "" ? this.oid : "",
  17706. };
  17707. this.ajax
  17708. .get(this.$store.state.api + "selectAllEvaType", params)
  17709. .then((res) => {
  17710. this.CourseType1 = res.data;
  17711. for (var i = 0; i < res.data[0].length; i++) {
  17712. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  17713. res.data[0][i].name = "一级分类";
  17714. } else if (
  17715. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  17716. ) {
  17717. res.data[0][i].name = "二级分类";
  17718. }
  17719. if (!this.cid) {
  17720. this.courseTypeId1[res.data[0][i].id] = [];
  17721. }
  17722. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  17723. this.CourseTypeJson1[res.data[0][i].id] = [];
  17724. }
  17725. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  17726. for (var j = 0; j < res.data[1].length; j++) {
  17727. if (res.data[0][i].id == res.data[1][j].pid) {
  17728. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  17729. }
  17730. }
  17731. // } else {
  17732. if (res.data[2].length > 0) {
  17733. for (var j = 0; j < res.data[2].length; j++) {
  17734. if (res.data[0][i].id == res.data[2][j].pid) {
  17735. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  17736. }
  17737. }
  17738. }
  17739. if (res.data[3].length > 0) {
  17740. for (var j = 0; j < res.data[3].length; j++) {
  17741. if (res.data[0][i].id == res.data[3][j].pid) {
  17742. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  17743. }
  17744. }
  17745. }
  17746. // }
  17747. }
  17748. this.ctype();
  17749. this.cetBoxDialog = true;
  17750. })
  17751. .catch((err) => {
  17752. console.error(err);
  17753. });
  17754. },
  17755. allEvaCan() {
  17756. if (this.taskLoading.length) {
  17757. let _pan = 1
  17758. for (var k = 0; k < this.taskLoading.length; k++) {
  17759. if (this.taskLoading[k]) {
  17760. this.$message({
  17761. message: `请等待任务${k + 1}回答完毕后再继续`,
  17762. type: "warning"
  17763. });
  17764. _pan = 2
  17765. }
  17766. }
  17767. if (_pan == 2) {
  17768. return
  17769. }
  17770. }
  17771. if (this.taskGLoading.length) {
  17772. let _pan = 1
  17773. for (var k = 0; k < this.taskGLoading.length; k++) {
  17774. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  17775. this.$message({
  17776. message: `请等待任务${k + 1}回答完毕后再继续`,
  17777. type: "warning"
  17778. });
  17779. _pan = 2
  17780. }
  17781. }
  17782. if (_pan == 2) {
  17783. return
  17784. }
  17785. }
  17786. this.$confirm("是否一键生成所有工具的评价设置?会占用您一些时间。", "提示", {
  17787. confirmButtonText: "确定",
  17788. cancelButtonText: "取消",
  17789. type: "warning",
  17790. customClass: 'custom-confirm-box'
  17791. })
  17792. .then(() => {
  17793. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17794. for (var index = 0; index < taskJson.length; index++) {
  17795. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  17796. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  17797. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  17798. }
  17799. }
  17800. }
  17801. })
  17802. .catch(() => {
  17803. });
  17804. setTimeout(() => {
  17805. this.setTipsIndex()
  17806. }, 500)
  17807. },
  17808. allEvaCan2(index) {
  17809. if (this.taskLoading.length) {
  17810. let _pan = 1
  17811. for (var k = 0; k < this.taskLoading.length; k++) {
  17812. if (this.taskLoading[k]) {
  17813. this.$message({
  17814. message: `请等待任务${k + 1}回答完毕后再继续`,
  17815. type: "warning"
  17816. });
  17817. _pan = 2
  17818. }
  17819. }
  17820. if (_pan == 2) {
  17821. return
  17822. }
  17823. }
  17824. if (this.taskGLoading.length) {
  17825. let _pan = 1
  17826. for (var k = 0; k < this.taskGLoading.length; k++) {
  17827. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  17828. this.$message({
  17829. message: `请等待任务${k + 1}回答完毕后再继续`,
  17830. type: "warning"
  17831. });
  17832. _pan = 2
  17833. }
  17834. }
  17835. if (_pan == 2) {
  17836. return
  17837. }
  17838. }
  17839. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17840. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  17841. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  17842. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  17843. }
  17844. }
  17845. this.$message({
  17846. message: `执行成功`,
  17847. type: "success"
  17848. });
  17849. },
  17850. setAiJson(pan,string,string2,string3){
  17851. if(pan == 'aiTeacher2'){
  17852. this.aiJson['teacherDetail2'] = string
  17853. }else if(pan == 'aiRateRuleA'){
  17854. this.aiJson['aiRateRule'] = string
  17855. }else if(pan == 'aiOutline2'){
  17856. this.aiJson['aiOutlineTask'] = string
  17857. this.aiJson['aiOutlineDetail'] = string2
  17858. }else if(pan == 'aiTeacher3'){
  17859. this.aiJson['aiCpoteTask'] = string
  17860. this.aiJson['teacherDetail2'] = string2
  17861. }else if(pan == 'aiTask2'){
  17862. this.aiJson['aiTask'] = string
  17863. }else if(pan == 'aiTask3'){
  17864. this.aiJson['aiTaskG1'] = string
  17865. this.aiJson['aiTaskG2'] = string2
  17866. this.aiJson['aiTaskG3'] = string3
  17867. }else if(pan == 'aiteacherTextDetail'){
  17868. this.aiJson['aiAbstract'] = string
  17869. }else if(pan == 'aitargetTextDetail'){
  17870. this.aiJson['aiTarget'] = string
  17871. }else if(pan == 'aitargetTextDetail2'){
  17872. this.aiJson['aiTarget2'] = string
  17873. }else if(pan == 'aitargetTextDetail3'){
  17874. this.aiJson['aiTargetGet'] = string
  17875. this.aiJson['aiTarget2'] = string2
  17876. }else {
  17877. this.aiJson[pan] = string
  17878. }
  17879. this.aiText2 = ''
  17880. this.aiText3 = ''
  17881. this.$forceUpdate();
  17882. },
  17883. editTask3(index){
  17884. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  17885. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  17886. }else {
  17887. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  17888. }
  17889. setTimeout(() => {
  17890. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  17891. setTimeout(() => {
  17892. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  17893. }, 0);
  17894. }, 100);
  17895. this.$forceUpdate();
  17896. },
  17897. editTask2(index){
  17898. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  17899. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  17900. }else {
  17901. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  17902. }
  17903. setTimeout(() => {
  17904. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  17905. setTimeout(() => {
  17906. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  17907. }, 0);
  17908. }, 100);
  17909. this.$forceUpdate();
  17910. },
  17911. openRule(i, k){
  17912. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  17913. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  17914. }else {
  17915. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  17916. }
  17917. setTimeout(() => {
  17918. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  17919. setTimeout(() => {
  17920. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  17921. }, 0);
  17922. }, 200);
  17923. this.$forceUpdate();
  17924. },
  17925. editCpote(index){
  17926. if(this.cpote[index]){
  17927. this.cpote[index] = false
  17928. }else {
  17929. this.cpote[index] = true
  17930. }
  17931. setTimeout(() => {
  17932. this.cpote[index.replace('s','')] += "*0*%*";
  17933. setTimeout(() => {
  17934. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  17935. }, 0);
  17936. }, 100);
  17937. this.$forceUpdate();
  17938. },
  17939. clickGenTT(){
  17940. if(!this.teacherInfoData.length){
  17941. this.$message.error("请上传教案");
  17942. return;
  17943. }
  17944. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  17945. this.openAiDialog(2, 'aiteacherTextDetail',1)
  17946. setTimeout(() => {
  17947. this.openAiDialog(2, 'aitargetTextDetail',1)
  17948. }, 500);
  17949. },
  17950. async getUserName() {
  17951. let params = { uid: this.userid };
  17952. try {
  17953. let res = await this.ajax.get(
  17954. this.$store.state.api + "getUser",
  17955. params
  17956. );
  17957. return res.data[0][0].name;
  17958. } catch (err) {
  17959. console.error(err);
  17960. }
  17961. },
  17962. getCGN(type){
  17963. let sub = [] //学科
  17964. let mclass = [] //年纪
  17965. let theme = []
  17966. if (this.courseTypeId.length) {
  17967. for (var i = 0; i < this.courseTypeId.length; i++) {
  17968. let _sid = this.courseTypeId[i]
  17969. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17970. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17971. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17972. }
  17973. }
  17974. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17975. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17976. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17977. }
  17978. }
  17979. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17980. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  17981. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  17982. }
  17983. }
  17984. }
  17985. if(type == 1){
  17986. return sub.join(",")
  17987. }else if(type == 2){
  17988. return mclass.join(",")
  17989. }else if(type == 3){
  17990. return theme.join(",")
  17991. }
  17992. }
  17993. },
  17994. async exportTeachPlan(){
  17995. this.loading = true
  17996. const zip = new JSZip();
  17997. let md = new MarkdownIt();
  17998. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  17999. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18000. let String = ''
  18001. String += `<h1 style="text-align: center;">${this.courseName}</h1>`
  18002. String += `<h2>课程基本信息</h2>`
  18003. String += `<div><strong>设计者:</strong><span>${await this.getUserName()}</span></div>`
  18004. String += `<div><strong>年级:</strong><span></span>${this.getCGN(2)}</div>`
  18005. String += `<div><strong>主题:</strong><span></span>${this.getCGN(3)}</div>`
  18006. String += `<div><strong>学科:</strong><span></span>${this.getCGN(1)}</div>`
  18007. if(courseText){
  18008. String += `<h2>课程概况</h2>`
  18009. String += md.render(courseText)
  18010. }
  18011. if(target){
  18012. String += `<h2>课程目标</h2>`
  18013. String += md.render(target)
  18014. }
  18015. String += `<h2>课程教案</h2>`
  18016. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18017. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18018. // let name = _task.task+'-教案'
  18019. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  18020. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  18021. await this.generate(name, _html, i)
  18022. }
  18023. String += `<h3>任务${i+1}</h3>`
  18024. String += `<h4>${_task.task}</h4>`
  18025. String += _html
  18026. // let file = await this.generateExport(name, _html, i)
  18027. // zip.file(`${name}.docx`, file, { binary: true })
  18028. }
  18029. await this.generateExport(this.courseName, String, i)
  18030. setTimeout(() => {
  18031. this.loading = false
  18032. }, 2000);
  18033. // zip.generateAsync({ type: "blob" }).then((content) => {
  18034. // // 生成二进制流
  18035. // saveAs(
  18036. // content,
  18037. // this.courseName + "-" + "教案.zip"
  18038. // ); // 利用file-saver保存文件 自定义文件名
  18039. // setTimeout(() => {
  18040. // this.loading = false
  18041. // // if(!this.cid){
  18042. // // this.addWork(3)
  18043. // // }else{
  18044. // // this.updateWork();
  18045. // // this.steps = 4;
  18046. // // }
  18047. // }, 2000);
  18048. // });
  18049. },
  18050. async exportTaskEA(){
  18051. this.loading = true
  18052. const zip = new JSZip();
  18053. let md = new MarkdownIt();
  18054. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18055. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18056. for(var j = 0; j < _task.chapterData.length; j++){
  18057. if(_task.chapterData[j].type == 3 && _task.chapterData[j].name.includes('学历案')){
  18058. let file = await getFile(_task.chapterData[j].url)
  18059. if (file.data != 1) {
  18060. // 下载文件, 并存成ArrayBuffer对象
  18061. const file_name = _task.chapterData[j].name; // 获取文件名
  18062. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  18063. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  18064. // 判断是否有重复的文件名字
  18065. if (!zip.file(file_name)) {
  18066. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  18067. } else {
  18068. // 如果有重复的文件名,则在文件名后添加序号
  18069. let count = 1;
  18070. let newFileName = fileNameWithoutExt;
  18071. while (zip.file(`${newFileName}.${fileExt}`)) {
  18072. newFileName = `${fileNameWithoutExt}(${count})`;
  18073. count++;
  18074. }
  18075. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  18076. }
  18077. }
  18078. }
  18079. }
  18080. for(var j = 0; j < _task.toolChoose.length; j++){
  18081. let tool = _task.toolChoose[j]
  18082. if(tool.eList && tool.eList.length){
  18083. let tableContent = '| 素养 | 评价标准 | 评价细则 |\n| --- | --- | --- |\n';
  18084. tool.eList.forEach(item => {
  18085. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18086. });
  18087. let html = md.render(tableContent);
  18088. let name = `任务${i+1}工具${j+1}的评价.docx`
  18089. let file = await this.generateExport2(name, html, i)
  18090. zip.file(`${name}`, file, { binary: true })
  18091. }
  18092. }
  18093. // let file = await this.generateExport(name, _html, i)
  18094. // zip.file(`${name}.docx`, file, { binary: true })
  18095. }
  18096. zip.generateAsync({ type: "blob" }).then((content) => {
  18097. // 生成二进制流
  18098. saveAs(
  18099. content,
  18100. this.courseName + "-" + "评价和学历案.zip"
  18101. ); // 利用file-saver保存文件 自定义文件名
  18102. setTimeout(() => {
  18103. this.loading = false
  18104. }, 2000);
  18105. });
  18106. },
  18107. async downloadFile(item){
  18108. let data = await getFile(item.url)
  18109. let file = new File([data.data], item.name);
  18110. saveAs(file, item.name);
  18111. },
  18112. async addAppendixEva(i, j){
  18113. let md = new MarkdownIt();
  18114. let tool = this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose[j]
  18115. if(tool.eList && tool.eList.length){
  18116. let tableContent = '| 素养 | 评价标准 | 评价细则 |\n| --- | --- | --- |\n';
  18117. tool.eList.forEach(item => {
  18118. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  18119. });
  18120. let html = md.render(tableContent);
  18121. let name = `任务${i+1}工具${j+1}的评价.docx`
  18122. let file = await this.generateExport2(name, html, i)
  18123. this.beforeUploadHtml(file, 0, "", 2)
  18124. }
  18125. },
  18126. clickGenTT2(){
  18127. if (this.courseName == "") {
  18128. this.$message.error("请补充填写课程名称");
  18129. return;
  18130. }
  18131. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  18132. let functionA = ''
  18133. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18134. // setTimeout(() => {
  18135. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18136. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18137. // }, 500);
  18138. functionA = ()=>{
  18139. this.openAiDialog(2, 'aitargetTextDetail3',1)
  18140. }
  18141. }
  18142. this.openAiDialog(2, 'aiDetail',1, functionA)
  18143. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  18144. // setTimeout(() => {
  18145. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  18146. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  18147. // }, 500);
  18148. }
  18149. this.courseTextBool = true
  18150. },
  18151. changeIsuseT(){
  18152. if(this.isuseT == 1){
  18153. this.courseTextB = false
  18154. }else if(this.isuseT == 2){
  18155. navigator.mediaDevices.getUserMedia({ audio: true })
  18156. .then(stream => {
  18157. console.log('获取录音权限成功');
  18158. })
  18159. .catch(err => {
  18160. this.$message.error('获取录音权限失败')
  18161. console.error('获取录音权限失败:', err);
  18162. });
  18163. }else{
  18164. if(this.courseText){
  18165. this.courseTextB = false
  18166. }else{
  18167. this.courseTextB = true
  18168. }
  18169. }
  18170. this.interSetting = false
  18171. this.interPan = true
  18172. },
  18173. changeLang(){
  18174. window.course_lang = this.languageSetting
  18175. },
  18176. openInterPanSetting(){
  18177. this.interSetting = !this.interSetting
  18178. if(this.interSetting){
  18179. if(this.istemplate == 1){
  18180. this.agentid = this.aiJson.agentid
  18181. }else {
  18182. this.agentid = this.aiJson.sagentid
  18183. }
  18184. }else {
  18185. this.agentid = ''
  18186. }
  18187. },
  18188. openInterPanSetting2(){
  18189. this.interSetting = !this.interSetting
  18190. if(this.interSetting){
  18191. this.r_agentid = this.aiJson.recordAgentid
  18192. }else {
  18193. this.r_agentid = ''
  18194. }
  18195. },
  18196. setAgentid(){
  18197. if(!this.agentid.trim()){
  18198. this.$message.error('请输入工作流链接')
  18199. return;
  18200. }
  18201. if(this.istemplate == 1){
  18202. this.aiJson.agentid = this.agentid.trim()
  18203. }else {
  18204. this.aiJson.sagentid = this.agentid.trim()
  18205. }
  18206. this.interFlash = false
  18207. setTimeout(() => {
  18208. this.interFlash = true
  18209. }, 100);
  18210. this.interSetting = false
  18211. },
  18212. setAgentid2(){
  18213. if(!this.r_agentid.trim()){
  18214. this.$message.error('请输入工作流链接')
  18215. return;
  18216. }
  18217. this.aiJson.recordAgentid = this.r_agentid.trim()
  18218. this.interSetting = false
  18219. },
  18220. rebuildAgentid(){
  18221. this.aiJson.sagentid = ''
  18222. this.interFlash = false
  18223. setTimeout(() => {
  18224. this.interFlash = true
  18225. }, 100);
  18226. this.interSetting = false
  18227. },
  18228. cancelInterSetting(){
  18229. this.agentid = ''
  18230. this.interSetting = false
  18231. },
  18232. cancelInterSetting2(){
  18233. this.r_agentid = ''
  18234. this.interSetting = false
  18235. },
  18236. openAiDialog2(clickType, type, callback, index, tindex){
  18237. if (this.taskLoading.length) {
  18238. let _pan = 1
  18239. for(var k = 0; k < this.taskLoading.length; k++){
  18240. if(this.taskLoading[k]){
  18241. this.$message({
  18242. message: `请等待任务${k+1}回答完毕后再继续`,
  18243. type: "warning"
  18244. });
  18245. _pan = 2
  18246. }
  18247. }
  18248. if(_pan == 2){
  18249. return
  18250. }
  18251. }
  18252. if(this.taskGLoading.length){
  18253. let _pan = 1
  18254. for(var k = 0; k < this.taskGLoading.length; k++){
  18255. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  18256. this.$message({
  18257. message: `请等待任务${k+1}回答完毕后再继续`,
  18258. type: "warning"
  18259. });
  18260. _pan = 2
  18261. }
  18262. }
  18263. if(_pan == 2){
  18264. return
  18265. }
  18266. }
  18267. let pan2 = 1
  18268. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  18269. for(var _index = 0; _index < taskJson.length; _index++){
  18270. for (var j = 0; j < taskJson[_index].toolChoose.length; j++) {
  18271. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[_index].toolChoose[j].tool[0]) != -1){
  18272. if(this.$refs['evalist'+_index+j] && this.$refs['evalist'+_index+j][0].loading){
  18273. this.$message({
  18274. message: `请等待任务${_index+1}回答完毕后再继续`,
  18275. type: "warning"
  18276. });
  18277. pan2 = 2
  18278. }
  18279. }
  18280. }
  18281. }
  18282. if(pan2 == 2){
  18283. return
  18284. }
  18285. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  18286. confirmButtonText: "确定",
  18287. cancelButtonText: "取消",
  18288. type: "warning",
  18289. customClass: 'custom-confirm-box'
  18290. })
  18291. .then(() => {
  18292. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  18293. // this.openAiDialog(clickType, 'aiTeacher')
  18294. // }else {
  18295. this.openAiDialog(clickType, type, callback, index, tindex)
  18296. // }
  18297. })
  18298. .catch(() => {
  18299. });
  18300. setTimeout(() => {
  18301. this.setTipsIndex()
  18302. }, 500)
  18303. },
  18304. async openAiDialog(clickType, type, callback, index, tindex) {
  18305. let fileid = this.isFileSearch ? [...this.fileIds] : []
  18306. fileid = [...fileid]
  18307. if (this.infoData.length) {
  18308. for (var i = 0; i < this.infoData.length; i++) {
  18309. if(this.infoData[i].fileid){
  18310. fileid.push(this.infoData[i].fileid)
  18311. }else {
  18312. let _fileid = await this.createFileid(this.infoData[i].url)
  18313. if(_fileid){
  18314. this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18315. this.$forceUpdate();
  18316. if(_fileid != 1){
  18317. fileid.push(_fileid)
  18318. }
  18319. }
  18320. }
  18321. }
  18322. }
  18323. fileid = [...fileid, ...this.knowFileids, ...this.knowFileids2]
  18324. if(fileid.length > 30){
  18325. this.$message.error('目前检索文件不能超过30个噢,请减少一些')
  18326. return;
  18327. }
  18328. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  18329. this.$message.error("您没有权限修改/查看提示词");
  18330. return;
  18331. }
  18332. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  18333. this.$message.error("请上传教案");
  18334. return;
  18335. }
  18336. if (this.courseName == "") {
  18337. this.$message.error("请补充填写课程名称");
  18338. return;
  18339. }
  18340. this.aiText2 = ''
  18341. this.clickType = clickType
  18342. let sub = []
  18343. if (this.courseTypeId.length) {
  18344. for (var i = 0; i < this.courseTypeId.length; i++) {
  18345. let _sid = this.courseTypeId[i]
  18346. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18347. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18348. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18349. }
  18350. }
  18351. }
  18352. }
  18353. let mclass = []
  18354. if (this.courseTypeId.length) {
  18355. for (var i = 0; i < this.courseTypeId.length; i++) {
  18356. let _sid = this.courseTypeId[i]
  18357. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18358. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18359. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18360. }
  18361. }
  18362. }
  18363. }
  18364. if (type == "aiDetail") {
  18365. if (this.ttextLoading) {
  18366. this.$message({
  18367. message: "请回答完毕后再次发送",
  18368. type: "warning"
  18369. });
  18370. return;
  18371. }
  18372. this.aitype = "aiDetail"
  18373. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  18374. this.aiText = this.aiJson.aiDetail
  18375. this.aiCallBack = [callback, index]
  18376. } else if (type == "aiOutline") {
  18377. this.aitype = "aiOutline"
  18378. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18379. this.aiText = this.aiJson.aiOutline
  18380. } else if (type == "aiOutline2") {
  18381. this.aitype = "aiOutline2"
  18382. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  18383. this.aiText = this.aiJson.aiOutlineTask
  18384. this.aiText2 = this.aiJson.aiOutlineDetail
  18385. } else if (type == "aiOutlineDetail2") {
  18386. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  18387. this.$message({
  18388. message: "请回答完毕后再次发送",
  18389. type: "warning"
  18390. });
  18391. return;
  18392. }
  18393. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  18394. this.$message.error('请输入任务名称')
  18395. return;
  18396. }
  18397. this.aitype = type
  18398. this.aiCallBack = callback
  18399. this.aiText = this.aiJson.aiOutlineDetail2
  18400. } else if (type == "aiTask") {
  18401. this.aitype = "aiTask"
  18402. var _text = ""
  18403. for (var i = 0; i < this.teacherText.length; i++) {
  18404. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  18405. }
  18406. // this.aiText = `请根据${_text}。`
  18407. this.aiText = this.aiJson.aiTask
  18408. this.aiCallBack = callback
  18409. } else if (type == "aiTask2") {
  18410. if (this.taskLoading[callback]) {
  18411. this.$message({
  18412. message: "请回答完毕后再次发送",
  18413. type: "warning"
  18414. });
  18415. return;
  18416. }
  18417. this.aitype = "aiTask2"
  18418. this.aiText = this.aiJson.aiTask
  18419. this.aiCallBack = [callback, index]
  18420. } else if (type == "aiTask3") {
  18421. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  18422. this.$message({
  18423. message: "请回答完毕后再次发送",
  18424. type: "warning"
  18425. });
  18426. return;
  18427. }
  18428. this.aitype = type
  18429. this.aiText = this.aiJson.aiTaskG1
  18430. this.aiText2 = this.aiJson.aiTaskG2
  18431. this.aiText3 = this.aiJson.aiTaskG3
  18432. this.aiCallBack = [callback, index]
  18433. } else if (type == "aiTaskG3") {
  18434. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][2])) {
  18435. this.$message({
  18436. message: "请回答完毕后再次发送",
  18437. type: "warning"
  18438. });
  18439. return;
  18440. }
  18441. this.aitype = type
  18442. this.aiText = this.aiJson.aiTaskG3
  18443. this.aiCallBack = callback
  18444. } else if (type == "aiTaskG2") {
  18445. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][1])) {
  18446. this.$message({
  18447. message: "请回答完毕后再次发送",
  18448. type: "warning"
  18449. });
  18450. return;
  18451. }
  18452. if(callback != 'all' && !this.unitJson[0].chapterInfo[0].taskJson[callback].taskDetail3){
  18453. this.$message({
  18454. message: `请先生成任务${callback}的教案在执行此操作`,
  18455. type: "warning"
  18456. });
  18457. return;
  18458. }
  18459. this.aitype = type
  18460. this.aiText = this.aiJson.aiTaskG2
  18461. this.aiCallBack = callback
  18462. } else if (type == "aiDetail1") {
  18463. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  18464. this.$message({
  18465. message: "请回答完毕后再次发送",
  18466. type: "warning"
  18467. });
  18468. return;
  18469. }
  18470. this.aitype = "aiDetail1"
  18471. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  18472. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  18473. this.aiText = this.aiJson.aiDetail1
  18474. this.aiCallBack = callback
  18475. this.aiIndex = index
  18476. } else if (type == "aiDetail2") {
  18477. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  18478. this.$message({
  18479. message: "请回答完毕后再次发送",
  18480. type: "warning"
  18481. });
  18482. return;
  18483. }
  18484. this.aitype = "aiDetail2"
  18485. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  18486. this.aiText = this.aiJson.aiDetail2
  18487. this.aiCallBack = callback
  18488. this.aiIndex = index
  18489. } else if (type == "aiDetail3") {
  18490. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  18491. this.$message({
  18492. message: "请回答完毕后再次发送",
  18493. type: "warning"
  18494. });
  18495. return;
  18496. }
  18497. this.aitype = "aiDetail3"
  18498. this.aiText = this.aiJson.aiDetail3
  18499. this.aiIndex = index + '-' + tindex
  18500. } else if (type == "aiDetail4") {
  18501. var _text = ""
  18502. if(callback && callback.length){
  18503. for (var i = 0; i < callback.length; i++) {
  18504. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  18505. }
  18506. }
  18507. this.aitype = "aiDetail4"
  18508. this.aiText = this.aiJson.aiDetail4
  18509. this.aiIndex = index
  18510. } else if (type == "aiTeacher") {
  18511. this.aitype = "aiTeacher"
  18512. var _text = ""
  18513. for (var i = 0; i < this.dArray.length; i++) {
  18514. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  18515. }
  18516. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18517. this.aiText = this.aiJson.aiTeacher
  18518. this.aiCallBack = callback
  18519. } else if (type == "aiTeacher2") {
  18520. if(this.ttaskDetailLoading5.length){
  18521. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  18522. this.$message({
  18523. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  18524. type: "warning"
  18525. });
  18526. return
  18527. }
  18528. this.aitype = "aiTeacher2"
  18529. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18530. } else if (type == "aiTeacher3") {
  18531. this.aitype = type
  18532. this.aiText = this.aiJson.aiCpoteTask
  18533. this.aiText2 = this.aiJson.teacherDetail2
  18534. } else if (type == "teacherDetail") {
  18535. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18536. this.$message({
  18537. message: "请回答完毕后再次发送",
  18538. type: "warning"
  18539. });
  18540. return;
  18541. }
  18542. this.aitype = "teacherDetail"
  18543. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18544. this.aiText = this.aiJson.teacherDetail
  18545. this.aiCallBack = callback
  18546. this.aiIndex = index
  18547. } else if (type == "teacherDetail2") {
  18548. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  18549. this.$message.error('请输入任务名称')
  18550. return;
  18551. }
  18552. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  18553. // this.$message({
  18554. // message: "请回答完毕后再次发送",
  18555. // type: "warning"
  18556. // });
  18557. // return;
  18558. this.$confirm("还未生成完毕,是否直接重新生成?", "提示", {
  18559. confirmButtonText: "确定重新生成",
  18560. cancelButtonText: "取消",
  18561. distinguishCancelAndClose: true,
  18562. type: "warning",
  18563. customClass: 'custom-confirm-box'
  18564. })
  18565. .then(() => {
  18566. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  18567. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  18568. this.isTeacherTaskCancelToken2[index] = null;
  18569. }
  18570. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18571. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18572. if(this.isTeacherTaskCancelSource[index]){
  18573. this.isTeacherTaskCancelSource[index].close()
  18574. this.isTeacherTaskCancelSource[index] = null
  18575. }
  18576. this.aitype = "teacherDetail2"
  18577. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18578. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18579. this.aiCallBack = callback
  18580. this.aiIndex = index
  18581. this.dialogVisibleAiD = true
  18582. }).catch((v) => {
  18583. console.log(v);
  18584. })
  18585. setTimeout(() => {
  18586. this.setTipsIndex()
  18587. }, 500)
  18588. return;
  18589. }else {
  18590. this.aitype = "teacherDetail2"
  18591. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  18592. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  18593. this.aiCallBack = callback
  18594. this.aiIndex = index
  18595. this.dialogVisibleAiD = true
  18596. }
  18597. } else if (type == "aiCpote1") {
  18598. if (this.cpotetLoading.cpote1) {
  18599. this.$message({
  18600. message: "请回答完毕后再次发送",
  18601. type: "warning"
  18602. });
  18603. return;
  18604. }
  18605. this.aitype = "aiCpote1"
  18606. this.aiText = this.aiJson.cpote1
  18607. this.aiCallBack = callback
  18608. } else if (type == "aiCpote2") {
  18609. if (this.cpotetLoading.cpote2) {
  18610. this.$message({
  18611. message: "请回答完毕后再次发送",
  18612. type: "warning"
  18613. });
  18614. return;
  18615. }
  18616. this.aitype = "aiCpote2"
  18617. this.aiText = this.aiJson.cpote2
  18618. this.aiCallBack = callback
  18619. } else if (type == "aiCpote3") {
  18620. if (this.cpotetLoading.cpote3) {
  18621. this.$message({
  18622. message: "请回答完毕后再次发送",
  18623. type: "warning"
  18624. });
  18625. return;
  18626. }
  18627. this.aitype = "aiCpote3"
  18628. this.aiText = this.aiJson.cpote3
  18629. this.aiCallBack = callback
  18630. } else if (type == "aiCpote4") {
  18631. if (this.cpotetLoading.cpote4) {
  18632. this.$message({
  18633. message: "请回答完毕后再次发送",
  18634. type: "warning"
  18635. });
  18636. return;
  18637. }
  18638. this.aitype = "aiCpote4"
  18639. this.aiText = this.aiJson.cpote4
  18640. this.aiCallBack = callback
  18641. } else if (type == 'aiteacherTextDetail'){
  18642. if (this.tteacherTextLoading) {
  18643. this.$message({
  18644. message: "请回答完毕后再次发送",
  18645. type: "warning"
  18646. });
  18647. return;
  18648. }
  18649. this.aitype = type
  18650. this.aiText = this.aiJson.aiAbstract
  18651. this.aiCallBack = callback
  18652. } else if (type == 'aitargetTextDetail'){
  18653. if (this.ttargetTextLoading) {
  18654. this.$message({
  18655. message: "请回答完毕后再次发送",
  18656. type: "warning"
  18657. });
  18658. return;
  18659. }
  18660. this.aitype = type
  18661. this.aiText = this.aiJson.aiTarget
  18662. this.aiCallBack = callback
  18663. } else if (type == 'aitargetTextDetail2'){
  18664. if (this.ttargetTextLoading2) {
  18665. this.$message({
  18666. message: "请回答完毕后再次发送",
  18667. type: "warning"
  18668. });
  18669. return;
  18670. }
  18671. this.aitype = type
  18672. this.aiText = this.aiJson.aiTarget2
  18673. this.aiCallBack = callback
  18674. } else if (type == 'aitargetTextDetail3'){
  18675. if (this.ttargetTextLoading2) {
  18676. this.$message({
  18677. message: "请回答完毕后再次发送",
  18678. type: "warning"
  18679. });
  18680. return;
  18681. }
  18682. if(!this.courseText){
  18683. this.$message.error("请生成简要描述后再生成目标");
  18684. return;
  18685. }
  18686. this.$nextTick(() => {
  18687. const targetDiv = this.$refs.aitargetTextDetail3;
  18688. if (targetDiv) {
  18689. targetDiv.scrollIntoView();
  18690. }
  18691. });
  18692. this.aitype = type
  18693. this.aiText = this.aiJson.aiTargetGet
  18694. this.aiText2 = this.aiJson.aiTarget2
  18695. this.aiCallBack= callback
  18696. } else if (type == 'aiSearchFile'){
  18697. if(this.fileSLoading) {
  18698. this.$message({
  18699. message: "请回答完毕后再次发送",
  18700. type: "warning"
  18701. });
  18702. return;
  18703. }
  18704. this.aitype = type
  18705. this.aiText = this.aiJson.aiSearchFile
  18706. } else if (type == 'aiSearchFile2'){
  18707. if(this.fileSLoading) {
  18708. this.$message({
  18709. message: "请回答完毕后再次发送",
  18710. type: "warning"
  18711. });
  18712. return;
  18713. }
  18714. this.aitype = type
  18715. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  18716. #输出样例
  18717. <学科1>:关键词
  18718. - 匹配到的内容1
  18719. - 匹配到的内容2
  18720. - 匹配到的内容3
  18721. - 匹配到的内容4
  18722. - 匹配到的内容5
  18723. <学科2>:关键词
  18724. - 匹配到的内容1
  18725. - 匹配到的内容2
  18726. - 匹配到的内容3
  18727. - 匹配到的内容4
  18728. - 匹配到的内容5
  18729. ...
  18730. <学科n>:关键词
  18731. - 匹配到的内容1
  18732. - 匹配到的内容2
  18733. - 匹配到的内容3
  18734. - 匹配到的内容4
  18735. - 匹配到的内容5
  18736. `
  18737. } else if (type == 'aiRateRule'){
  18738. this.aitype = type
  18739. this.aiText = this.aiJson.aiRateRule
  18740. this.aiCallBack = [callback, index]
  18741. } else if (type == 'aiRateRuleA'){
  18742. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  18743. confirmButtonText: "生成所有",
  18744. cancelButtonText: "仅生成该任务",
  18745. distinguishCancelAndClose: true,
  18746. type: "warning",
  18747. })
  18748. .then(() => {
  18749. this.aitype = type
  18750. this.aiText = this.aiJson.aiRateRule
  18751. this.aiCallBack = [1,callback]
  18752. this.dialogVisibleAiD = true
  18753. }).catch((v) => {
  18754. console.log(v);
  18755. if (v == "cancel") {
  18756. this.aitype = type
  18757. this.aiText = this.aiJson.aiRateRule
  18758. this.aiCallBack = [2,callback]
  18759. this.dialogVisibleAiD = true
  18760. }
  18761. })
  18762. }
  18763. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  18764. this.dialogVisibleAiD = true
  18765. }
  18766. },
  18767. async aiConfirm(msg,msg2,msg3) {
  18768. let sub = []
  18769. if (this.courseTypeId.length) {
  18770. for (var i = 0; i < this.courseTypeId.length; i++) {
  18771. let _sid = this.courseTypeId[i]
  18772. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18773. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18774. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18775. }
  18776. }
  18777. }
  18778. }
  18779. let mclass = []
  18780. if (this.courseTypeId.length) {
  18781. for (var i = 0; i < this.courseTypeId.length; i++) {
  18782. let _sid = this.courseTypeId[i]
  18783. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18784. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18785. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18786. }
  18787. }
  18788. }
  18789. }
  18790. let url = []
  18791. if (this.infoData.length) {
  18792. for (var i = 0; i < this.infoData.length; i++) {
  18793. url.push(this.infoData[i].url)
  18794. }
  18795. }
  18796. if (this.aitype == "aiDetail") {
  18797. this.detailYou(msg)
  18798. } else if (this.aitype == "aiOutline") {
  18799. this.loading = true
  18800. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18801. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  18802. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  18803. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18804. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18805. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18806. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18807. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18808. if(this.languageSetting == 2){
  18809. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18810. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18811. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18812. }
  18813. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18814. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18815. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18816. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18817. let message = `NOTICE
  18818. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18819. Output: Provide your output in json format.
  18820. Language: ${this.getLang()}
  18821. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18822. Instruction: Based on the context, follow "Format example", write content.
  18823. # Context
  18824. ## 要求
  18825. ${msg} 以及##参考资料
  18826. ## 参考资料
  18827. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18828. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18829. detail至少输出300tokens,markdown格式输出。
  18830. detail包含子教学目标、过程性成果、子评价标准
  18831. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18832. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18833. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  18834. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  18835. # Format example`
  18836. message = message.replaceAll('\n', ' ')
  18837. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  18838. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  18839. // detail输出不要输出成json,文本或者markdown都可以
  18840. this.aiGet2(message, () => {
  18841. this.loading = false
  18842. this.isOutline = true
  18843. })
  18844. } else if (this.aitype == "aiOutline2") {
  18845. this.loading = true
  18846. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18847. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18848. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18849. let message = `NOTICE
  18850. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18851. Language: ${this.getLang()}
  18852. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18853. Instruction: Based on the context, follow "Format example", write content.
  18854. # Context
  18855. ## 要求
  18856. ${msg} 以及##参考资料
  18857. ## 参考资料
  18858. 课程名字:${this.courseName}
  18859. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  18860. ${sub.length ? '学科:' + sub.join(",") : ''}
  18861. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18862. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18863. # Format example
  18864. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  18865. this.aiGetTask2(message, () => {
  18866. this.loading = false
  18867. this.isOutline = true
  18868. })
  18869. } else if (this.aitype == "aiOutlineDetail2") {
  18870. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  18871. } else if (this.aitype == "aiTask") {
  18872. var _text = ""
  18873. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18874. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18875. }
  18876. let message = `NOTICE
  18877. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18878. Language: ${this.getLang()}
  18879. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18880. Instruction: Based on the context, follow "Format example", write content.
  18881. # Context
  18882. ## 要求
  18883. ${msg} 为**每个教学任务分别输出**以下内容。
  18884.  
  18885. ${(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','') : ''}
  18886. ## 参考资料
  18887. 教学任务教案:${_text}
  18888. ## 格式要求
  18889. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  18890. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18891. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  18892. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18893. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18894. 出现选择题和问答题的概率提高
  18895. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  18896.  
  18897. # Format example
  18898. [{"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":"工具描述"}]}]`
  18899. this.loading = true
  18900. this.aiGet3(message, this.aiCallBack)
  18901. } else if (this.aitype == "aiTask2") {
  18902. if(this.aiCallBack[0] == 'all'){
  18903. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18904. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18905. let message = `NOTICE
  18906. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18907. Language: ${this.getLang()}
  18908. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18909. Instruction: Based on the context, follow "Format example", write content.
  18910. # Context
  18911. ## 要求
  18912. ${msg} 为教学任务分别输出以下内容。
  18913.  
  18914. ${(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','') : ''}
  18915. ## 参考资料
  18916. 教学任务教案:${_text}
  18917. ## 格式要求
  18918. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18919. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  18920. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18921. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18922. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  18923.  
  18924. # Format example
  18925. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18926. this.taskLoading[_task] = true
  18927. this.aiGet32(message, _task)
  18928. }
  18929. }else{
  18930. 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`
  18931. let message = `NOTICE
  18932. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18933. Language: ${this.getLang()}
  18934. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18935. Instruction: Based on the context, follow "Format example", write content.
  18936. # Context
  18937. ## 要求
  18938. ${msg} 为教学任务分别输出以下内容。
  18939.  
  18940. ${(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','') : ''}
  18941. ## 参考资料
  18942. 教学任务教案:${_text}
  18943. ## 格式要求
  18944. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18945. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  18946. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18947. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18948. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  18949.  
  18950. # Format example
  18951. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18952. this.taskLoading[this.aiCallBack[0]] = true
  18953. this.aiGet32(message, this.aiCallBack[0])
  18954. }
  18955. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  18956. } else if (this.aitype == "aiTask3") {
  18957. if(this.aiCallBack[0] == 'all'){
  18958. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18959. if(!this.taskGLoading[_task]){
  18960. this.taskGLoading[_task] = []
  18961. this.ttaskGLoading[_task] = []
  18962. }
  18963. this.taskGLoading[_task][0] = true
  18964. this.ttaskGLoading[_task][0] = true
  18965. // this.taskGLoading[_task][1] = true
  18966. // this.taskGLoading[_task][2] = true
  18967. // this.aiGetG323(message3, _task)
  18968. }
  18969. let ij = 0;
  18970. let _this = this
  18971. function processNext() {
  18972. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18973. if(!_this.taskGLoading[ij][0]){
  18974. ij++;
  18975. processNext();
  18976. return;
  18977. }
  18978. let message1 = `NOTICE
  18979. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18980. Language: ${_this.getLang()}
  18981. # Context
  18982. ## 要求
  18983. ${msg}
  18984.  
  18985. ## 参考资料
  18986. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18987. # 输出格式与要求
  18988. 任务描述(告诉学生他们需要做什么):
  18989. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  18990. # 范例
  18991. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  18992. _this.aiGetG321L(message1, ij, (callback2) => {
  18993. // _this.aiGetG322(message2, ij, callback2);
  18994. callback2 ? callback2() : ''
  18995. }, () => {
  18996. // 回调函数,当前任务完成后执行
  18997. ij++;
  18998. processNext(); // 处理下一个任务
  18999. });
  19000. }
  19001. }
  19002. processNext(); // 启动处理
  19003. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19004. }else{
  19005. let message1 = `NOTICE
  19006. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19007. Language: ${this.getLang()}
  19008. # Context
  19009. ## 要求
  19010. ${msg}
  19011.  
  19012. ## 参考资料
  19013. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19014. # 输出格式与要求
  19015. 任务描述(告诉学生他们需要做什么):
  19016. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  19017. # 范例
  19018. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!`
  19019. if(!this.taskGLoading[this.aiCallBack[0]]){
  19020. this.taskGLoading[this.aiCallBack[0]] = []
  19021. this.ttaskGLoading[this.aiCallBack[0]] = []
  19022. }
  19023. this.taskGLoading[this.aiCallBack[0]][0] = true
  19024. this.ttaskGLoading[this.aiCallBack[0]][0] = true
  19025. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19026. // this.taskGLoading[this.aiCallBack[0]][2] = true
  19027. this.aiGetG321L(message1, this.aiCallBack[0], () => {
  19028. // this.aiGetG322(message2, this.aiCallBack[0])
  19029. // this.aiCallBack[0] ? this.aiCallBack[0]() : ''
  19030. })
  19031. // this.aiGetG323(message3, this.aiCallBack[0])
  19032. }
  19033. } else if (this.aitype == "aiTaskG3") {
  19034. let message3 = `NOTICE
  19035. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19036. Language: ${this.getLang()}
  19037. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19038. Instruction: Based on the context, follow "Format example", write content.
  19039. # Context
  19040. ## 要求
  19041. ${msg3}
  19042.  
  19043. ## 参考资料
  19044. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19045. # 输出格式与要求
  19046. 核心素养:从教案中提取
  19047. 目标:从教案中提取
  19048. 评价标准:从教案中提取评价标准
  19049. # Format example
  19050. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  19051. if(!this.taskGLoading[this.aiCallBack]){
  19052. this.taskGLoading[this.aiCallBack] = []
  19053. }
  19054. this.taskGLoading[this.aiCallBack][2] = true
  19055. this.aiGetG323(message3, this.aiCallBack)
  19056. } else if (this.aitype == "aiTaskG2") {
  19057. if(this.aiCallBack == 'all'){
  19058. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  19059. if(!this.taskGLoading[_task]){
  19060. this.taskGLoading[_task] = []
  19061. }
  19062. this.taskGLoading[_task][1] = true
  19063. }
  19064. let ij = 0;
  19065. let _this = this
  19066. function processNext() {
  19067. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19068. if(!_this.taskGLoading[ij][1] || !_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3){
  19069. _this.taskGLoading[ij][1] = false
  19070. ij++;
  19071. processNext();
  19072. return;
  19073. }
  19074. let message2 = `NOTICE
  19075. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19076. Language: ${_this.getLang()}
  19077. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19078. Instruction: Based on the context, follow "Format example", write content.
  19079. # Context
  19080. ## 要求
  19081. ${msg2}
  19082.  
  19083. ## 参考资料
  19084. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19085. # 输出格式与要求
  19086. 互动工具列表
  19087. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19088. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19089. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  19090. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19091. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19092. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19093. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19094. # Format example
  19095. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19096. _this.aiGetG322(message2, ij, () => {
  19097. // 回调函数,当前任务完成后执行
  19098. ij++;
  19099. processNext(); // 处理下一个任务
  19100. });
  19101. }
  19102. }
  19103. processNext(); // 启动处理
  19104. }else{
  19105. let message2 = `NOTICE
  19106. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  19107. Language: ${this.getLang()}
  19108. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19109. Instruction: Based on the context, follow "Format example", write content.
  19110. # Context
  19111. ## 要求
  19112. ${msg2}
  19113.  
  19114. ## 参考资料
  19115. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19116. # 输出格式与要求
  19117. 互动工具列表
  19118. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  19119. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  19120. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  19121. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  19122. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  19123. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  19124. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  19125. # Format example
  19126. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  19127. if(!this.taskGLoading[this.aiCallBack]){
  19128. this.taskGLoading[this.aiCallBack] = []
  19129. }
  19130. // this.taskGLoading[this.aiCallBack[0]][0] = true
  19131. // this.taskGLoading[this.aiCallBack[0]][1] = true
  19132. this.taskGLoading[this.aiCallBack][1] = true
  19133. this.aiGetG322(message2, this.aiCallBack)
  19134. }
  19135. } else if (this.aitype == "aiDetail1") {
  19136. this.aiDetail(msg, this.aiIndex)
  19137. } else if (this.aitype == "aiDetail2") {
  19138. this.aiDetail2(msg, this.aiIndex)
  19139. } else if (this.aitype == "aiDetail3") {
  19140. let _index = this.aiIndex.split('-')
  19141. this.aiDetail3(msg, _index[0], _index[1])
  19142. } else if (this.aitype == "aiDetail4") {
  19143. this.aiDetail4(msg, this.aiIndex)
  19144. } else if (this.aitype == "teacherDetail") {
  19145. this.aiDetail5(msg, this.aiIndex)
  19146. } else if (this.aitype == "teacherDetail2") {
  19147. this.aiDetail52(msg, this.aiIndex)
  19148. } else if (this.aitype == "aiCpote1") {
  19149. this.aiCpote(msg, this.aiCallBack)
  19150. } else if (this.aitype == "aiCpote2") {
  19151. this.aiCpote(msg, this.aiCallBack)
  19152. } else if (this.aitype == "aiCpote3") {
  19153. this.aiCpote(msg, this.aiCallBack)
  19154. } else if (this.aitype == "aiCpote4") {
  19155. this.aiCpote(msg, this.aiCallBack)
  19156. } else if (this.aitype == "aiTeacher") {
  19157. this.loading = true
  19158. var _text = ""
  19159. for (var i = 0; i < this.dArray.length; i++) {
  19160. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  19161. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  19162. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19163. let message = ` NOTICE
  19164. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19165. Language: ${this.getLang()}
  19166. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19167. Instruction: Based on the context, follow "Format example", write content.
  19168. # Context
  19169. ## 要求
  19170. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  19171. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  19172. ${(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','') : ''}
  19173. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19174. ## Format example
  19175. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  19176. this.aiGet4(message, () => {
  19177. this.loading = false
  19178. this.isOutline2 = true
  19179. })
  19180. } else if (this.aitype == "aiTeacher2"){
  19181. this.isOutline2 = true
  19182. let _this = this
  19183. setTimeout(()=>{
  19184. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19185. const _tindex = 'task-' + i;
  19186. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19187. _this.taskDetailLoading5.push(_tindex)
  19188. }
  19189. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  19190. _this.ttaskDetailLoading5.push(_tindex)
  19191. }
  19192. // this.aiDetail52(msg, i)
  19193. }
  19194. let ij = 0;
  19195. function processNext() {
  19196. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19197. const _tindex = 'task-' + ij;
  19198. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19199. ij++;
  19200. processNext();
  19201. return;
  19202. }
  19203. // 处理当前任务
  19204. _this.aiDetail52(msg, ij, function () {
  19205. // 回调函数,当前任务完成后执行
  19206. ij++;
  19207. processNext(); // 处理下一个任务
  19208. });
  19209. }
  19210. }
  19211. processNext(); // 启动处理
  19212. }, 0)
  19213. } else if (this.aitype == "aiTeacher3"){
  19214. this.loading = true
  19215. let message = `NOTICE
  19216. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19217. Language: ${this.getLang()}
  19218. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19219. Instruction: Based on the context, follow "Format example", write content.
  19220. # Context
  19221. ## 要求
  19222. ${msg} 以及##参考资料
  19223. ## 参考资料
  19224. 任务簇:${this.cpote.cpote4}
  19225. # Format example
  19226. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  19227. this.aiGetTask3(message, () => {
  19228. this.loading = false
  19229. this.isOutline2 = true
  19230. })
  19231. } else if (this.aitype == "aiteacherTextDetail") {
  19232. this.aiteacherTextDetail(msg)
  19233. } else if (this.aitype == "aitargetTextDetail") {
  19234. this.aitargetTextDetail(msg)
  19235. } else if (this.aitype == "aitargetTextDetail2") {
  19236. this.aitargetTextDetail2(msg)
  19237. } else if (this.aitype == "aitargetTextDetail3") {
  19238. this.aitargetTextDetail3(msg)
  19239. } else if (this.aitype == 'aiSearchFile'){
  19240. let messages = `NOTICE
  19241. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19242. Language: ${this.getLang()}
  19243. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19244. Instruction: Based on the context, follow "Format example", write content.
  19245. ## 参考资料
  19246. 关键词:${this.courseName}
  19247. # Context
  19248. ## 要求
  19249. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  19250. # Format example
  19251. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  19252. this.fileSLoading = true
  19253. this.aiSearchFile(messages,()=>{
  19254. this.fileSLoading = false
  19255. })
  19256. } else if (this.aitype == 'aiSearchFile2'){
  19257. let messages = `${msg}
  19258. 课程名字:${this.courseName}
  19259. ${sub.length ? '学科:' + sub.join(",") : ''}
  19260. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  19261. this.fileSLoading = true
  19262. this.aiSearchFile2(messages,()=>{
  19263. this.fileSLoading = false
  19264. })
  19265. } else if (this.aitype == 'aiRateRule'){
  19266. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  19267. } else if (this.aitype == 'aiRateRuleA'){
  19268. if(this.aiCallBack[0] == 1){
  19269. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19270. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  19271. for(var k = 0; k < task.eList.length; k++){
  19272. if(!task.eList[k].rule){
  19273. this.againEva(msg, i, k)
  19274. }
  19275. }
  19276. }
  19277. }else if(this.aiCallBack[0] == 2){
  19278. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  19279. for(var k = 0; k < task.eList.length; k++){
  19280. if(!task.eList[k].rule){
  19281. this.againEva(msg, this.aiCallBack[1], k)
  19282. }
  19283. }
  19284. }
  19285. }
  19286. this.setAiJson(this.aitype, msg, msg2, msg3)
  19287. },
  19288. getLang(){
  19289. let lang = ''
  19290. if(this.languageSetting == 0){
  19291. lang = 'Chinese.'
  19292. }else if(this.languageSetting == 1){
  19293. lang = 'Traditional Chinese.'
  19294. }else if(this.languageSetting == 2){
  19295. lang = 'English.'
  19296. }
  19297. return lang
  19298. },
  19299. detailYou(message) {
  19300. this.textLoading = true
  19301. this.ttextLoading = true
  19302. let sub = []
  19303. if (this.courseTypeId.length) {
  19304. for (var i = 0; i < this.courseTypeId.length; i++) {
  19305. let _sid = this.courseTypeId[i]
  19306. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19307. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19308. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19309. }
  19310. }
  19311. }
  19312. }
  19313. let mclass = []
  19314. if (this.courseTypeId.length) {
  19315. for (var i = 0; i < this.courseTypeId.length; i++) {
  19316. let _sid = this.courseTypeId[i]
  19317. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19318. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19319. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19320. }
  19321. }
  19322. }
  19323. }
  19324. let url = []
  19325. if (this.infoData.length) {
  19326. for (var i = 0; i < this.infoData.length; i++) {
  19327. url.push(this.infoData[i].url)
  19328. }
  19329. }
  19330. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  19331. // --------
  19332. // ## 补充参考资料
  19333. // 补充资料:${url.join(",")}
  19334. // 补充描述:${this.courseText2} ##补充参考资料和
  19335. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19336. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19337. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19338. let msg = `NOTICE
  19339. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  19340. Language: ${this.getLang()}
  19341. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19342. Instruction: Based on the context, follow "Format example", write content.
  19343. #Context
  19344. ## 参考资料
  19345. 课程名字:${this.courseName}
  19346. ${sub.length ? '学科:' + sub.join(",") : ''}
  19347. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19348. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  19349. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  19350. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  19351. ## 要求
  19352. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  19353. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4' && this.templateid != '9dd4bb76-1e48-11ef-bee5-005056b86db5') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  19354. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19355. this.aiGet(msg)
  19356. },
  19357. setUnitJson() {
  19358. 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 }] }
  19359. this.$forceUpdate()
  19360. },
  19361. async aiGet(messages) {
  19362. let _this = this
  19363. let fileid = []
  19364. if(!this.yiKeTemplateArray.includes(this.templateid)){
  19365. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  19366. if(_this.cankaoInfoData[i].fileid){
  19367. fileid.push(_this.cankaoInfoData[i].fileid)
  19368. }else {
  19369. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  19370. if(_fileid){
  19371. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19372. _this.$forceUpdate();
  19373. if(_fileid != 1){
  19374. fileid.push(_fileid)
  19375. }
  19376. }
  19377. }
  19378. }
  19379. if(this.mode == 1){
  19380. for (var i = 0; i < _this.infoData.length; i++) {
  19381. if(_this.infoData[i].fileid){
  19382. fileid.push(_this.infoData[i].fileid)
  19383. }else {
  19384. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19385. if(_fileid){
  19386. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19387. _this.$forceUpdate();
  19388. if(_fileid != 1){
  19389. fileid.push(_fileid)
  19390. }
  19391. }
  19392. }
  19393. }
  19394. }
  19395. } else {
  19396. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19397. fileid = [...fileid]
  19398. if (_this.infoData.length) {
  19399. for (var i = 0; i < _this.infoData.length; i++) {
  19400. if(_this.infoData[i].fileid){
  19401. fileid.push(_this.infoData[i].fileid)
  19402. }else {
  19403. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19404. if(_fileid){
  19405. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19406. _this.$forceUpdate();
  19407. if(_fileid != 1){
  19408. fileid.push(_fileid)
  19409. }
  19410. }
  19411. }
  19412. }
  19413. }
  19414. }
  19415. _this.isTextCancelToken = _this.ajax.setCancelSource();
  19416. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19417. let _uuid = uuidv4();
  19418. // let params = JSON.stringify({
  19419. // // "model": "Chat",
  19420. // model: 'gpt-3.5-turbo',
  19421. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19422. // max_tokens: 4096,
  19423. // top_p: 1,
  19424. // frequency_penalty: 0,
  19425. // presence_penalty: 0,
  19426. // messages: [{
  19427. // content: messages,
  19428. // role: 'user'
  19429. // }],
  19430. // uid: _uuid,
  19431. // mind_map_question: "",
  19432. // })
  19433. let params = {
  19434. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19435. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19436. session_name: _uuid,
  19437. userId: _this.userid,
  19438. uid: _uuid,
  19439. file_ids: fileid.length ? [...fileid] : '',
  19440. model: 'gpt-4o-2024-11-20',
  19441. temperature: this.mode == 3 ? 0.5 : 0.1,
  19442. }
  19443. // let params = JSON.stringify({
  19444. // message: {
  19445. // anthropic_version: "bedrock-2023-05-31",
  19446. // max_tokens: 4096,
  19447. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19448. // top_p: 1,
  19449. // messages: [{
  19450. // "role": "user",
  19451. // "content": messages
  19452. // }] ,
  19453. // },
  19454. // uid: _uuid,
  19455. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19456. // });
  19457. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19458. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  19459. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19460. console.log(response);
  19461. // let data = response.data.FunctionResponse
  19462. // if (data.choices && data.choices.length && data.choices[0].message) {
  19463. // _this.courseText = data.choices[0].message.content
  19464. // }
  19465. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19466. } else {
  19467. _this.$message.warning(response.data.FunctionResponse.result);
  19468. }
  19469. _this.isTextCancelToken = null
  19470. }).catch(function (error) {
  19471. _this.textLoading = false
  19472. _this.ttextLoading = false
  19473. _this.isTextCancelToken = null
  19474. if(error && error.message != 'Request canceled by the user.'){
  19475. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19476. }
  19477. console.log(error);
  19478. });
  19479. await _this.aiGetgetAiContent(_uuid)
  19480. },
  19481. aiGetgetAiContent(_uid) {
  19482. try {
  19483. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19484. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19485. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19486. } catch(error){
  19487. console.log('EventSource error:', error);
  19488. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19489. this.textLoading = false
  19490. this.ttextLoading = false
  19491. this.isTextCancelToken = null
  19492. return;
  19493. }
  19494. let _allText = "";
  19495. let _mdText = "";
  19496. let _iindex = 0
  19497. this.isTextCancelSource.onmessage = _e => {
  19498. let _eData = JSON.parse(_e.data).content;
  19499. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19500. //对话已经完成
  19501. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19502. this.isTextCancelSource.close();
  19503. this.isTextCancelSource = null;
  19504. this.courseText = _mdText;
  19505. this.textLoading = false
  19506. this.ttextLoading = false
  19507. this.courseTextB = false
  19508. this.isTextCancelToken = null
  19509. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  19510. this.saveCourse()
  19511. return;
  19512. } else {
  19513. _iindex++
  19514. //对话还在继续
  19515. let _text = "";
  19516. _text = _eData.replaceAll("'", "");
  19517. if (_allText == "") {
  19518. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19519. } else {
  19520. _allText += _text;
  19521. }
  19522. _mdText = _allText + "_";
  19523. _mdText = _mdText.replace(/\\n/g, "\n");
  19524. _mdText = _mdText.replace(/\\/g, "");
  19525. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19526. //转化返回的回复流数据
  19527. if(_iindex == 10){
  19528. this.courseText = _mdText;
  19529. _iindex = 0
  19530. }
  19531. this.textLoading = false
  19532. // 处理流数据
  19533. }
  19534. // this.$forceUpdate();
  19535. };
  19536. let _this = this
  19537. this.isTextCancelSource.onerror = function(event) {
  19538. // 处理错误,可以尝试重新连接
  19539. console.log('EventSource error:', event);
  19540. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19541. _this.textLoading = false
  19542. _this.ttextLoading = false
  19543. _this.isTextCancelToken = null
  19544. _this.isTextCancelSource.close();
  19545. _this.isTextCancelSource = null;
  19546. };
  19547. },
  19548. numberToChinese(number) {
  19549. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  19550. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  19551. let result = '';
  19552. let num = parseInt(number, 10);
  19553. let i = 0;
  19554. while (num > 0) {
  19555. result = chineseNum[num % 10] + chineseUnit[i] + result;
  19556. num = Math.floor(num / 10);
  19557. i++;
  19558. }
  19559. // 去除连续的零,保留一个零
  19560. result = result.replace(/零+/g, '零');
  19561. return result;
  19562. },
  19563. async aiGet2(messages, callback) {
  19564. let _this = this
  19565. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19566. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19567. if (_this.infoData.length) {
  19568. for (var i = 0; i < _this.infoData.length; i++) {
  19569. if(_this.infoData[i].fileid){
  19570. fileid.push(_this.infoData[i].fileid)
  19571. }else {
  19572. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19573. if(_fileid){
  19574. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19575. _this.$forceUpdate();
  19576. if(_fileid != 1){
  19577. fileid.push(_fileid)
  19578. }
  19579. }
  19580. }
  19581. }
  19582. }
  19583. console.log('fileid=========',fileid)
  19584. // let params = JSON.stringify({
  19585. // // "model": "Chat",
  19586. // model: 'gpt-3.5-turbo',
  19587. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19588. // max_tokens: 4096,
  19589. // top_p: 1,
  19590. // frequency_penalty: 0,
  19591. // presence_penalty: 0,
  19592. // messages: [{
  19593. // content: messages,
  19594. // role: 'user'
  19595. // }],
  19596. // stream: false,
  19597. // uid: this.userid,
  19598. // mind_map_question: "",
  19599. // })
  19600. // // let params = JSON.stringify({
  19601. // // message: {
  19602. // // anthropic_version: "bedrock-2023-05-31",
  19603. // // max_tokens: 4096,
  19604. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19605. // // top_p: 1,
  19606. // // messages: [{
  19607. // // content: messages,
  19608. // // role: 'user'
  19609. // // }], //
  19610. // // },
  19611. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19612. // // });
  19613. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19614. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19615. // console.log(response);
  19616. // let data = response.data.FunctionResponse
  19617. // if (data.choices && data.choices.length && data.choices[0].message) {
  19618. // console.log(data.choices[0].message.content);
  19619. // let dArray = JSON.parse(data.choices[0].message.content)
  19620. // _this.dArray = dArray
  19621. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19622. // for (var i = 0; i < dArray.length; i++) {
  19623. // let _task = dArray[i]
  19624. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19625. // task: _task.task,
  19626. // taskDetail: "",
  19627. // taskDetail2: _task.detail,
  19628. // taskDetail3: "",
  19629. // chapterData: [],
  19630. // toolText: "",
  19631. // toolChoose: [
  19632. // {
  19633. // tool: [],
  19634. // toolDetail: "",
  19635. // toolType: 0,
  19636. // askCount: 1,
  19637. // askTitle: "",
  19638. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19639. // },
  19640. // ],
  19641. // isShowTools: false,
  19642. // askCount: 1,
  19643. // isFold: 0,
  19644. // askTitle: "",
  19645. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19646. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19647. // homeworkList: [],
  19648. // })
  19649. // }
  19650. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19651. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19652. // _this.$forceUpdate();
  19653. // }
  19654. // // if (data.result) {
  19655. // // console.log(data.result);
  19656. // // let dArray = JSON.parse(data.result)
  19657. // // _this.dArray = dArray
  19658. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19659. // // for (var i = 0; i < dArray.length; i++) {
  19660. // // let _task = dArray[i]
  19661. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19662. // // task: _task.task,
  19663. // // taskDetail: "",
  19664. // // taskDetail2: _task.detail,
  19665. // // taskDetail3: "",
  19666. // // chapterData: [],
  19667. // // toolText: "",
  19668. // // toolChoose: [
  19669. // // {
  19670. // // tool: [],
  19671. // // toolDetail: "",
  19672. // // toolType: 0,
  19673. // // askCount: 1,
  19674. // // askTitle: "",
  19675. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19676. // // },
  19677. // // ],
  19678. // // isShowTools: false,
  19679. // // askCount: 1,
  19680. // // isFold: 1,
  19681. // // askTitle: "",
  19682. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19683. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19684. // // homeworkList: [],
  19685. // // })
  19686. // // }
  19687. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19688. // // _this.$forceUpdate();
  19689. // // }
  19690. // callback ? callback() : ''
  19691. // }).catch(function (error) {
  19692. // _this.loading = false
  19693. // console.log(error);
  19694. // });
  19695. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19696. let parm = {
  19697. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  19698. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  19699. session_name: uuidv4(),
  19700. userId: this.userid,
  19701. file_ids: fileid.length ? [...fileid] : '',
  19702. model: 'gpt-4o-2024-11-20',
  19703. temperature: this.mode == 3 ? 0.5 : 0.1,
  19704. }
  19705. this.ajax
  19706. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19707. .then((response) => {
  19708. console.log(response);
  19709. let data = response.data.FunctionResponse
  19710. if (data.message) {
  19711. console.log(data.message);
  19712. let dArray = {}
  19713. try {
  19714. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19715. } catch (error) {
  19716. console.log("error_________________" + error);
  19717. try {
  19718. let regex = new RegExp(/```json([\s\S]*?)```/);
  19719. let match = data.message.match(regex);
  19720. dArray = JSON.parse(match[1]);
  19721. // var message = data.message;
  19722. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19723. // var jsonEnd = message.indexOf("```", jsonStart);
  19724. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19725. // dArray = JSON.parse(jsonString);
  19726. } catch (error) {
  19727. try {
  19728. let regex = new RegExp(/```json([\s\S]*?)```/);
  19729. let match = data.message.match(regex);
  19730. // eval("var aaa = " + match[0])
  19731. if(match && match[1]){
  19732. dArray = JSON.parse(match[1].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19733. }else {
  19734. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19735. }
  19736. } catch (error) {
  19737. _this.$message.error('返回json格式不正确')
  19738. // +data.message
  19739. // _this.aiGet2(messages, callback);
  19740. _this.loading = false
  19741. _this.isOutlineCancelToken = null
  19742. console.log("error_________________" + error);
  19743. return;
  19744. }
  19745. console.log("error_________________" + error);
  19746. }
  19747. }
  19748. _this.dArray = dArray
  19749. console.log(dArray)
  19750. if(_this.panOutline() > 0){
  19751. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19752. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19753. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19754. }
  19755. for (var i = 0; i < dArray.length; i++) {
  19756. let _task = dArray[i]
  19757. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19758. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  19759. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  19760. }else {
  19761. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19762. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19763. taskDetail: "",
  19764. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19765. taskDetail3: "",
  19766. chapterData: [],
  19767. toolText: "",
  19768. toolChoose: [
  19769. {
  19770. tool: [],
  19771. toolDetail: "",
  19772. toolType: 0,
  19773. askCount: 1,
  19774. askTitle: "",
  19775. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19776. },
  19777. ],
  19778. isShowTools: false,
  19779. askCount: 1,
  19780. isFold: 0,
  19781. askTitle: "",
  19782. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19783. checkJson: [{ checkCount: [], checkPerent: [] }],
  19784. homeworkList: [],
  19785. })
  19786. }
  19787. }
  19788. }else {
  19789. _this.unitJson[0].chapterInfo[0].taskJson = []
  19790. for (var i = 0; i < dArray.length; i++) {
  19791. let _task = dArray[i]
  19792. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19793. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19794. taskDetail: "",
  19795. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19796. taskDetail3: "",
  19797. chapterData: [],
  19798. toolText: "",
  19799. toolChoose: [
  19800. {
  19801. tool: [],
  19802. toolDetail: "",
  19803. toolType: 0,
  19804. askCount: 1,
  19805. askTitle: "",
  19806. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19807. },
  19808. ],
  19809. isShowTools: false,
  19810. askCount: 1,
  19811. isFold: 0,
  19812. askTitle: "",
  19813. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19814. checkJson: [{ checkCount: [], checkPerent: [] }],
  19815. homeworkList: [],
  19816. })
  19817. }
  19818. }
  19819. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19820. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19821. _this.$forceUpdate();
  19822. _this.saveCourse()
  19823. }
  19824. callback ? callback() : ''
  19825. _this.isOutlineCancelToken = null
  19826. })
  19827. .catch((error) => {
  19828. _this.loading = false
  19829. _this.isOutlineCancelToken = null
  19830. console.log(error);
  19831. });
  19832. },
  19833. cancelAjax(type, index){
  19834. if (this.isOutlineCancelToken && type == 'outline') {
  19835. this.$message.success("已经成功停止生成课程大纲")
  19836. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  19837. this.isOutlineCancelToken = null;
  19838. this.loading = false
  19839. }
  19840. if (this.isFileCancelToken && type == 'file') {
  19841. this.$message.success("已经成功停止智能生成检索资料")
  19842. this.isFileCancelToken.cancel('Request canceled by the user.');
  19843. this.isFileCancelToken = null;
  19844. this.fileSLoading = false
  19845. }
  19846. if(this.isTextCancelToken && type == 'text'){
  19847. this.$message.success("已经成功停止AI优化")
  19848. this.isTextCancelToken.cancel('Request canceled by the user.');
  19849. this.isTextCancelToken = null;
  19850. this.textLoading = false
  19851. this.ttextLoading = true
  19852. if(this.isTextCancelSource){
  19853. this.isTextCancelSource.close()
  19854. this.isTextCancelSource = null
  19855. }
  19856. }
  19857. if(this.isTargetCancelToken2 && type == 'target2'){
  19858. this.$message.success("已经成功停止生成目标")
  19859. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  19860. this.isTargetCancelToken2 = null;
  19861. this.targetTextLoading2 = false
  19862. this.ttargetTextLoading2 = false
  19863. if(this.isTargetCancelSource2){
  19864. this.isTargetCancelSource2.close()
  19865. this.isTargetCancelSource2 = null
  19866. }
  19867. this.$nextTick(() => {
  19868. const targetDiv = this.$refs.aitargetTextDetail3;
  19869. if (targetDiv) {
  19870. targetDiv.scrollIntoView();
  19871. }
  19872. });
  19873. }
  19874. if(this.isTargetCancelToken1 && type == 'target1'){
  19875. this.$message.success("已经成功停止生成目标")
  19876. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  19877. this.isTargetCancelToken1 = null;
  19878. this.targetTextLoading = false
  19879. this.ttargetTextLoading = false
  19880. if(this.isTargetCancelSource1){
  19881. this.isTargetCancelSource1.close()
  19882. this.isTargetCancelSource1 = null
  19883. }
  19884. }
  19885. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  19886. this.$message.success("已经成功停止提取摘要")
  19887. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  19888. this.isTeacherTextCancelToken = null;
  19889. this.teacherTextLoading = false
  19890. this.tteacherTextLoading = false
  19891. if(this.isTeacherTextCancelSource){
  19892. this.isTeacherTextCancelSource.close()
  19893. this.isTeacherTextCancelSource = null
  19894. }
  19895. }
  19896. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  19897. this.$message.success("已经成功停止生成教案")
  19898. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  19899. this.isTeacherTaskCancelToken = null;
  19900. this.loading = false
  19901. }
  19902. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  19903. this.$message.success("已经成功停止生成大纲")
  19904. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  19905. this.isOutlineTaskCancelToken[index] = null;
  19906. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  19907. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  19908. if(this.isOutlineTaskCancelSource[index]){
  19909. this.isOutlineTaskCancelSource[index].close()
  19910. this.isOutlineTaskCancelSource[index] = null
  19911. }
  19912. }
  19913. if(type == 'teacherDetail2'){
  19914. this.$message.success("已经成功停止生成教案")
  19915. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  19916. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  19917. this.isTeacherTaskCancelToken2[index] = null;
  19918. }
  19919. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  19920. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  19921. }
  19922. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  19923. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  19924. }
  19925. if(this.isTeacherTaskCancelSource[index]){
  19926. this.isTeacherTaskCancelSource[index].close()
  19927. this.isTeacherTaskCancelSource[index] = null
  19928. }
  19929. }
  19930. if(type == 'aiTaskGL1'){
  19931. this.$message.success("已经成功停止生成任务概述")
  19932. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  19933. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  19934. this.taskCancelToken1[index] = null;
  19935. }
  19936. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  19937. this.taskGLoading[index][0] = false
  19938. }
  19939. if(this.isTaskCancelSource1[index]){
  19940. this.isTaskCancelSource1[index].close()
  19941. this.isTaskCancelSource1[index] = null
  19942. }
  19943. setTimeout(() => {
  19944. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  19945. this.cancelAjax('aiTaskGL2', index)
  19946. }
  19947. }, 1000)
  19948. this.$forceUpdate()
  19949. }
  19950. if(type == 'aiTaskGL2'){
  19951. this.$message.success("已经成功停止生成任务工具")
  19952. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  19953. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  19954. this.taskCancelToken2[index] = null;
  19955. }
  19956. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  19957. this.taskGLoading[index][1] = false
  19958. }
  19959. this.$forceUpdate()
  19960. }
  19961. if(type == 'taskAn'){
  19962. this.$message.success("已经成功停止生成任务概述")
  19963. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  19964. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  19965. this.taskAnCancelToken[index] = null;
  19966. }
  19967. if(this.taskAnLoading[index]){
  19968. this.taskAnLoading[index] = false
  19969. }
  19970. this.$forceUpdate()
  19971. }
  19972. if(type == 'findMatchingContents'){
  19973. this.$message.success("已经成功停止检索资料")
  19974. if(this.isfindMatchingContents){
  19975. this.isfindMatchingContents.cancel('Request canceled by the user.');
  19976. this.isfindMatchingContents = null;
  19977. }
  19978. if(this.knowInfoDataLoading){
  19979. this.knowInfoDataLoading = false
  19980. }
  19981. if(this.findMatchingContentsPage > 1){
  19982. this.findMatchingContentsPage --
  19983. }
  19984. this.$forceUpdate()
  19985. }
  19986. },
  19987. async aiGetTask2(messages, callback) {
  19988. let _this = this
  19989. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19990. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19991. if (_this.infoData.length) {
  19992. for (var i = 0; i < _this.infoData.length; i++) {
  19993. if(_this.infoData[i].fileid){
  19994. fileid.push(_this.infoData[i].fileid)
  19995. }else {
  19996. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19997. if(_fileid){
  19998. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19999. _this.$forceUpdate();
  20000. if(_fileid != 1){
  20001. fileid.push(_fileid)
  20002. }
  20003. }
  20004. }
  20005. }
  20006. }
  20007. console.log('fileid=========',fileid)
  20008. // let params = JSON.stringify({
  20009. // // "model": "Chat",
  20010. // model: 'gpt-3.5-turbo',
  20011. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20012. // max_tokens: 4096,
  20013. // top_p: 1,
  20014. // frequency_penalty: 0,
  20015. // presence_penalty: 0,
  20016. // messages: [{
  20017. // content: messages,
  20018. // role: 'user'
  20019. // }],
  20020. // stream: false,
  20021. // uid: this.userid,
  20022. // mind_map_question: "",
  20023. // })
  20024. // // let params = JSON.stringify({
  20025. // // message: {
  20026. // // anthropic_version: "bedrock-2023-05-31",
  20027. // // max_tokens: 4096,
  20028. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20029. // // top_p: 1,
  20030. // // messages: [{
  20031. // // content: messages,
  20032. // // role: 'user'
  20033. // // }], //
  20034. // // },
  20035. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20036. // // });
  20037. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20038. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20039. // console.log(response);
  20040. // let data = response.data.FunctionResponse
  20041. // if (data.choices && data.choices.length && data.choices[0].message) {
  20042. // console.log(data.choices[0].message.content);
  20043. // let dArray = JSON.parse(data.choices[0].message.content)
  20044. // _this.dArray = dArray
  20045. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20046. // for (var i = 0; i < dArray.length; i++) {
  20047. // let _task = dArray[i]
  20048. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20049. // task: _task.task,
  20050. // taskDetail: "",
  20051. // taskDetail2: _task.detail,
  20052. // taskDetail3: "",
  20053. // chapterData: [],
  20054. // toolText: "",
  20055. // toolChoose: [
  20056. // {
  20057. // tool: [],
  20058. // toolDetail: "",
  20059. // toolType: 0,
  20060. // askCount: 1,
  20061. // askTitle: "",
  20062. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20063. // },
  20064. // ],
  20065. // isShowTools: false,
  20066. // askCount: 1,
  20067. // isFold: 0,
  20068. // askTitle: "",
  20069. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20070. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20071. // homeworkList: [],
  20072. // })
  20073. // }
  20074. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20075. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20076. // _this.$forceUpdate();
  20077. // }
  20078. // // if (data.result) {
  20079. // // console.log(data.result);
  20080. // // let dArray = JSON.parse(data.result)
  20081. // // _this.dArray = dArray
  20082. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20083. // // for (var i = 0; i < dArray.length; i++) {
  20084. // // let _task = dArray[i]
  20085. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20086. // // task: _task.task,
  20087. // // taskDetail: "",
  20088. // // taskDetail2: _task.detail,
  20089. // // taskDetail3: "",
  20090. // // chapterData: [],
  20091. // // toolText: "",
  20092. // // toolChoose: [
  20093. // // {
  20094. // // tool: [],
  20095. // // toolDetail: "",
  20096. // // toolType: 0,
  20097. // // askCount: 1,
  20098. // // askTitle: "",
  20099. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20100. // // },
  20101. // // ],
  20102. // // isShowTools: false,
  20103. // // askCount: 1,
  20104. // // isFold: 1,
  20105. // // askTitle: "",
  20106. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20107. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20108. // // homeworkList: [],
  20109. // // })
  20110. // // }
  20111. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20112. // // _this.$forceUpdate();
  20113. // // }
  20114. // callback ? callback() : ''
  20115. // }).catch(function (error) {
  20116. // _this.loading = false
  20117. // console.log(error);
  20118. // });
  20119. this.isOutlineCancelToken = this.ajax.setCancelSource();
  20120. let parm = {
  20121. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20122. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20123. session_name: uuidv4(),
  20124. userId: this.userid,
  20125. file_ids: fileid.length ? [...fileid] : '',
  20126. model: 'gpt-4o-2024-11-20',
  20127. temperature: this.mode == 3 ? 0.5 : 0.1,
  20128. }
  20129. this.ajax
  20130. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  20131. .then((response) => {
  20132. console.log(response);
  20133. let data = response.data.FunctionResponse
  20134. if (data.message) {
  20135. console.log(data.message);
  20136. let dArray = {}
  20137. try {
  20138. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20139. } catch (error) {
  20140. console.log("error_________________" + error);
  20141. try {
  20142. let regex = new RegExp(/```json([\s\S]*?)```/);
  20143. let match = data.message.match(regex);
  20144. dArray = JSON.parse(match[1]);
  20145. // var message = data.message;
  20146. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20147. // var jsonEnd = message.indexOf("```", jsonStart);
  20148. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20149. // dArray = JSON.parse(jsonString);
  20150. } catch (error) {
  20151. try {
  20152. let regex = new RegExp(/```json([\s\S]*?)```/);
  20153. let match = data.message.match(regex);
  20154. // eval("var aaa = " + match[0])
  20155. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20156. } catch (error) {
  20157. console.log("error_________________" + error);
  20158. }
  20159. console.log("error_________________" + error);
  20160. }
  20161. }
  20162. _this.dArray = dArray
  20163. if(_this.panOutline() > 0){
  20164. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20165. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20166. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  20167. }
  20168. for (var i = 0; i < dArray.length; i++) {
  20169. let _task = dArray[i]
  20170. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20171. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  20172. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20173. }else {
  20174. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20175. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20176. taskDetail: "",
  20177. taskDetail2: "",
  20178. taskDetail3: "",
  20179. chapterData: [],
  20180. toolText: "",
  20181. toolChoose: [
  20182. {
  20183. tool: [],
  20184. toolDetail: "",
  20185. toolType: 0,
  20186. askCount: 1,
  20187. askTitle: "",
  20188. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20189. },
  20190. ],
  20191. isShowTools: false,
  20192. askCount: 1,
  20193. isFold: 0,
  20194. askTitle: "",
  20195. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20196. checkJson: [{ checkCount: [], checkPerent: [] }],
  20197. homeworkList: [],
  20198. })
  20199. }
  20200. }
  20201. }else {
  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.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20207. taskDetail: "",
  20208. taskDetail2: "",
  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: 0,
  20225. askTitle: "",
  20226. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20227. checkJson: [{ checkCount: [], checkPerent: [] }],
  20228. homeworkList: [],
  20229. })
  20230. }
  20231. }
  20232. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20233. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20234. _this.$forceUpdate();
  20235. _this.saveCourse()
  20236. setTimeout(()=>{
  20237. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20238. this.aiOutlineDetail('', i)
  20239. }
  20240. }, 0)
  20241. }
  20242. callback ? callback() : ''
  20243. _this.isOutlineCancelToken = null
  20244. })
  20245. .catch((error) => {
  20246. _this.loading = false
  20247. _this.isOutlineCancelToken = null
  20248. console.log(error);
  20249. });
  20250. },
  20251. async aiGetTask3(messages, callback) {
  20252. let _this = this
  20253. // let params = JSON.stringify({
  20254. // // "model": "Chat",
  20255. // model: 'gpt-3.5-turbo',
  20256. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20257. // max_tokens: 4096,
  20258. // top_p: 1,
  20259. // frequency_penalty: 0,
  20260. // presence_penalty: 0,
  20261. // messages: [{
  20262. // content: messages,
  20263. // role: 'user'
  20264. // }],
  20265. // stream: false,
  20266. // uid: this.userid,
  20267. // mind_map_question: "",
  20268. // })
  20269. // // let params = JSON.stringify({
  20270. // // message: {
  20271. // // anthropic_version: "bedrock-2023-05-31",
  20272. // // max_tokens: 4096,
  20273. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20274. // // top_p: 1,
  20275. // // messages: [{
  20276. // // content: messages,
  20277. // // role: 'user'
  20278. // // }], //
  20279. // // },
  20280. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20281. // // });
  20282. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20283. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20284. // console.log(response);
  20285. // let data = response.data.FunctionResponse
  20286. // if (data.choices && data.choices.length && data.choices[0].message) {
  20287. // console.log(data.choices[0].message.content);
  20288. // let dArray = JSON.parse(data.choices[0].message.content)
  20289. // _this.dArray = dArray
  20290. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20291. // for (var i = 0; i < dArray.length; i++) {
  20292. // let _task = dArray[i]
  20293. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20294. // task: _task.task,
  20295. // taskDetail: "",
  20296. // taskDetail2: _task.detail,
  20297. // taskDetail3: "",
  20298. // chapterData: [],
  20299. // toolText: "",
  20300. // toolChoose: [
  20301. // {
  20302. // tool: [],
  20303. // toolDetail: "",
  20304. // toolType: 0,
  20305. // askCount: 1,
  20306. // askTitle: "",
  20307. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20308. // },
  20309. // ],
  20310. // isShowTools: false,
  20311. // askCount: 1,
  20312. // isFold: 0,
  20313. // askTitle: "",
  20314. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20315. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20316. // homeworkList: [],
  20317. // })
  20318. // }
  20319. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20320. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20321. // _this.$forceUpdate();
  20322. // }
  20323. // // if (data.result) {
  20324. // // console.log(data.result);
  20325. // // let dArray = JSON.parse(data.result)
  20326. // // _this.dArray = dArray
  20327. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20328. // // for (var i = 0; i < dArray.length; i++) {
  20329. // // let _task = dArray[i]
  20330. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20331. // // task: _task.task,
  20332. // // taskDetail: "",
  20333. // // taskDetail2: _task.detail,
  20334. // // taskDetail3: "",
  20335. // // chapterData: [],
  20336. // // toolText: "",
  20337. // // toolChoose: [
  20338. // // {
  20339. // // tool: [],
  20340. // // toolDetail: "",
  20341. // // toolType: 0,
  20342. // // askCount: 1,
  20343. // // askTitle: "",
  20344. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20345. // // },
  20346. // // ],
  20347. // // isShowTools: false,
  20348. // // askCount: 1,
  20349. // // isFold: 1,
  20350. // // askTitle: "",
  20351. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20352. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20353. // // homeworkList: [],
  20354. // // })
  20355. // // }
  20356. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20357. // // _this.$forceUpdate();
  20358. // // }
  20359. // callback ? callback() : ''
  20360. // }).catch(function (error) {
  20361. // _this.loading = false
  20362. // console.log(error);
  20363. // });
  20364. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  20365. let parm = {
  20366. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20367. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20368. session_name: uuidv4(),
  20369. userId: this.userid,
  20370. file_ids: '',
  20371. model: 'gpt-4o-2024-11-20',
  20372. temperature: this.mode == 3 ? 0.5 : 0.1,
  20373. }
  20374. this.ajax
  20375. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  20376. .then((response) => {
  20377. console.log(response);
  20378. let data = response.data.FunctionResponse
  20379. if (data.message) {
  20380. console.log(data.message);
  20381. let dArray = {}
  20382. try {
  20383. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20384. } catch (error) {
  20385. console.log("error_________________" + error);
  20386. try {
  20387. let regex = new RegExp(/```json([\s\S]*?)```/);
  20388. let match = data.message.match(regex);
  20389. dArray = JSON.parse(match[1]);
  20390. // var message = data.message;
  20391. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20392. // var jsonEnd = message.indexOf("```", jsonStart);
  20393. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20394. // dArray = JSON.parse(jsonString);
  20395. } catch (error) {
  20396. try {
  20397. let regex = new RegExp(/```json([\s\S]*?)```/);
  20398. let match = data.message.match(regex);
  20399. // eval("var aaa = " + match[0])
  20400. dArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20401. } catch (error) {
  20402. console.log("error_________________" + error);
  20403. }
  20404. console.log("error_________________" + error);
  20405. }
  20406. }
  20407. _this.dArray = dArray
  20408. if(_this.panOutline() > 0){
  20409. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20410. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20411. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  20412. }
  20413. for (var i = 0; i < dArray.length; i++) {
  20414. let _task = dArray[i]
  20415. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20416. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  20417. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  20418. }else {
  20419. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20420. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20421. taskDetail: "",
  20422. taskDetail2: "",
  20423. taskDetail3: "",
  20424. chapterData: [],
  20425. toolText: "",
  20426. toolChoose: [
  20427. {
  20428. tool: [],
  20429. toolDetail: "",
  20430. toolType: 0,
  20431. askCount: 1,
  20432. askTitle: "",
  20433. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20434. },
  20435. ],
  20436. isShowTools: false,
  20437. askCount: 1,
  20438. isFold: 0,
  20439. askTitle: "",
  20440. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20441. checkJson: [{ checkCount: [], checkPerent: [] }],
  20442. homeworkList: [],
  20443. })
  20444. }
  20445. }
  20446. }else {
  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.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20452. taskDetail: "",
  20453. taskDetail2: "",
  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: 0,
  20470. askTitle: "",
  20471. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20472. checkJson: [{ checkCount: [], checkPerent: [] }],
  20473. homeworkList: [],
  20474. })
  20475. }
  20476. }
  20477. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20478. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20479. _this.$forceUpdate();
  20480. _this.saveCourse()
  20481. // setTimeout(()=>{
  20482. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20483. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  20484. // }
  20485. // }, 0)
  20486. setTimeout(()=>{
  20487. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20488. const _tindex = 'task-' + i;
  20489. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20490. _this.taskDetailLoading5.push(_tindex)
  20491. }
  20492. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  20493. _this.ttaskDetailLoading5.push(_tindex)
  20494. }
  20495. }
  20496. let ij = 0;
  20497. function processNext() {
  20498. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  20499. const _tindex = 'task-' + ij;
  20500. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  20501. ij++;
  20502. processNext();
  20503. return;
  20504. }
  20505. // 处理当前任务
  20506. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  20507. // 回调函数,当前任务完成后执行
  20508. ij++;
  20509. processNext(); // 处理下一个任务
  20510. });
  20511. }
  20512. }
  20513. processNext(); // 启动处理
  20514. }, 0)
  20515. }
  20516. callback ? callback() : ''
  20517. _this.isTeacherTaskCancelToken = null
  20518. })
  20519. .catch((error) => {
  20520. _this.loading = false
  20521. _this.isTeacherTaskCancelToken = null
  20522. console.log(error);
  20523. });
  20524. },
  20525. async aiGet3(messages, callback) {
  20526. let _this = this
  20527. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20528. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20529. if (_this.infoData.length) {
  20530. for (var i = 0; i < _this.infoData.length; i++) {
  20531. if(_this.infoData[i].fileid){
  20532. fileid.push(_this.infoData[i].fileid)
  20533. }else {
  20534. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20535. if(_fileid){
  20536. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20537. _this.$forceUpdate();
  20538. if(_fileid != 1){
  20539. fileid.push(_fileid)
  20540. }
  20541. }
  20542. }
  20543. }
  20544. }
  20545. // let params = JSON.stringify({
  20546. // // "model": "Chat",
  20547. // model: 'gpt-3.5-turbo',
  20548. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20549. // max_tokens: 4096,
  20550. // top_p: 1,
  20551. // frequency_penalty: 0,
  20552. // presence_penalty: 0,
  20553. // messages: [{
  20554. // content: messages,
  20555. // role: 'user'
  20556. // }],
  20557. // stream: false,
  20558. // uid: this.userid,
  20559. // mind_map_question: "",
  20560. // })
  20561. // // let params = JSON.stringify({
  20562. // // message: {
  20563. // // anthropic_version: "bedrock-2023-05-31",
  20564. // // max_tokens: 4096,
  20565. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20566. // // top_p: 1,
  20567. // // messages: [{
  20568. // // content: messages,
  20569. // // role: 'user'
  20570. // // }], //
  20571. // // },
  20572. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20573. // // });
  20574. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20575. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20576. // console.log(response);
  20577. // let data = response.data.FunctionResponse
  20578. // if (data.choices && data.choices.length && data.choices[0].message) {
  20579. // console.log(data.choices[0].message.content);
  20580. // let tArray = JSON.parse(data.choices[0].message.content)
  20581. // // _this.unitJson[0].chapterInfo[0].task = []
  20582. // let toolsJson = {
  20583. // "电子白板": { tool: 1, type: 1 },
  20584. // "文档": { tool: 52, type: 1 },
  20585. // "思维导图": { tool: 3, type: 1 },
  20586. // "表格": { tool: 48, type: 1 },
  20587. // "作业提交": { tool: 16, type: 2 }
  20588. // }
  20589. // for (var i = 0; i < tArray.length; i++) {
  20590. // let _task = tArray[i]
  20591. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20592. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20593. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20594. // if (_task.toolChoose.length) {
  20595. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20596. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20597. // {
  20598. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20599. // toolDetail: _task.toolChoose[j].detail,
  20600. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20601. // askCount: 1,
  20602. // askTitle: "",
  20603. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20604. // },
  20605. // )
  20606. // }
  20607. // } else {
  20608. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20609. // {
  20610. // tool: [],
  20611. // toolDetail: "",
  20612. // toolType: 0,
  20613. // askCount: 1,
  20614. // askTitle: "",
  20615. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20616. // },
  20617. // )
  20618. // }
  20619. // }
  20620. // // if (_this.infoData.length) {
  20621. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20622. // // }
  20623. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20624. // _this.$forceUpdate();
  20625. // }
  20626. // // if (data.result) {
  20627. // // console.log(data.result);
  20628. // // let tArray = JSON.parse(data.result)
  20629. // // // _this.unitJson[0].chapterInfo[0].task = []
  20630. // // let toolsJson = {
  20631. // // "电子白板": { tool: 1, type: 1 },
  20632. // // "文档": { tool: 52, type: 1 },
  20633. // // "思维导图": { tool: 3, type: 1 },
  20634. // // "表格": { tool: 48, type: 1 },
  20635. // // "作业提交": { tool: 16, type: 2 }
  20636. // // }
  20637. // // for (var i = 0; i < tArray.length; i++) {
  20638. // // let _task = tArray[i]
  20639. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20640. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20641. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20642. // // if (_task.toolChoose.length) {
  20643. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20644. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20645. // // {
  20646. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20647. // // toolDetail: _task.toolChoose[j].detail,
  20648. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20649. // // askCount: 1,
  20650. // // askTitle: "",
  20651. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20652. // // },
  20653. // // )
  20654. // // }
  20655. // // } else {
  20656. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20657. // // {
  20658. // // tool: [],
  20659. // // toolDetail: "",
  20660. // // toolType: 0,
  20661. // // askCount: 1,
  20662. // // askTitle: "",
  20663. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20664. // // },
  20665. // // )
  20666. // // }
  20667. // // }
  20668. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20669. // // _this.$forceUpdate();
  20670. // // }
  20671. // callback ? callback() : ''
  20672. // }).catch(function (error) {
  20673. // _this.loading = false
  20674. // console.log(error);
  20675. // });
  20676. let parm = {
  20677. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20678. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20679. session_name: uuidv4(),
  20680. userId: this.userid,
  20681. file_ids: fileid.length ? [...fileid] : '',
  20682. model: 'gpt-4o-2024-11-20',
  20683. temperature: this.mode == 3 ? 0.5 : 0.1,
  20684. }
  20685. this.ajax
  20686. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20687. .then(async (response) => {
  20688. console.log(response);
  20689. let data = response.data.FunctionResponse
  20690. if (data.message) {
  20691. console.log(data.message);
  20692. let tArray = {}
  20693. try {
  20694. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20695. } catch (error) {
  20696. console.log("error_________________" + error);
  20697. try {
  20698. let regex = new RegExp(/```json([\s\S]*?)```/);
  20699. let match = data.message.match(regex);
  20700. tArray = JSON.parse(match[1]);
  20701. // var message = data.message;
  20702. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20703. // var jsonEnd = message.indexOf("```", jsonStart);
  20704. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20705. // tArray = JSON.parse(jsonString);
  20706. } catch (error) {
  20707. try {
  20708. let regex = new RegExp(/```json([\s\S]*?)```/);
  20709. let match = data.message.match(regex);
  20710. // eval("var aaa = " + match[0])
  20711. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20712. } catch (error) {
  20713. console.log("error_________________" + error);
  20714. }
  20715. console.log("error_________________" + error);
  20716. }
  20717. }
  20718. let toolsJson = {
  20719. "电子白板": { tool: 1, type: 1 },
  20720. "文档": { tool: 52, type: 1 },
  20721. "思维导图": { tool: 3, type: 1 },
  20722. "表格": { tool: 48, type: 1 },
  20723. "作业提交": { tool: 16, type: 2 },
  20724. "问答": { tool: 15, type: 2 },
  20725. "选择题": { tool: 45, type: 2 },
  20726. }
  20727. // answerQ:"sssssssssssssss"
  20728. for (var i = 0; i < tArray.length; i++) {
  20729. let _task = tArray[i]
  20730. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20731. _task.elist = _task.elist.filter(el=>{
  20732. el.isai = "1"
  20733. return el
  20734. })
  20735. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20736. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20737. if (_task.toolChoose.length) {
  20738. for (var j = 0; j < _task.toolChoose.length; j++) {
  20739. let _json = {
  20740. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  20741. toolDetail: _task.toolChoose[j].detail,
  20742. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20743. askCount: 1,
  20744. askTitle: "",
  20745. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20746. }
  20747. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  20748. let answerQ = await _this.aiCreateQuestion(15, i)
  20749. _json.answerQ = answerQ.answerQ
  20750. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  20751. let testJson = await _this.aiCreateQuestion(45, i)
  20752. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20753. }
  20754. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  20755. }
  20756. } else {
  20757. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20758. {
  20759. tool: [],
  20760. toolDetail: "",
  20761. toolType: 0,
  20762. askCount: 1,
  20763. askTitle: "",
  20764. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20765. },
  20766. )
  20767. }
  20768. }
  20769. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20770. _this.$forceUpdate();
  20771. _this.createTeacherAn();
  20772. }
  20773. callback ? callback() : ''
  20774. })
  20775. .catch((error) => {
  20776. _this.loading = false
  20777. console.log(error);
  20778. });
  20779. },
  20780. async aiGet32(messages, index) {
  20781. let _this = this
  20782. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20783. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20784. if (_this.infoData.length) {
  20785. for (var i = 0; i < _this.infoData.length; i++) {
  20786. if(_this.infoData[i].fileid){
  20787. fileid.push(_this.infoData[i].fileid)
  20788. }else {
  20789. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20790. if(_fileid){
  20791. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20792. _this.$forceUpdate();
  20793. if(_fileid != 1){
  20794. fileid.push(_fileid)
  20795. }
  20796. }
  20797. }
  20798. }
  20799. }
  20800. // let params = JSON.stringify({
  20801. // // "model": "Chat",
  20802. // model: 'gpt-3.5-turbo',
  20803. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20804. // max_tokens: 4096,
  20805. // top_p: 1,
  20806. // frequency_penalty: 0,
  20807. // presence_penalty: 0,
  20808. // messages: [{
  20809. // content: messages,
  20810. // role: 'user'
  20811. // }],
  20812. // stream: false,
  20813. // uid: this.userid,
  20814. // mind_map_question: "",
  20815. // })
  20816. // // let params = JSON.stringify({
  20817. // // message: {
  20818. // // anthropic_version: "bedrock-2023-05-31",
  20819. // // max_tokens: 4096,
  20820. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20821. // // top_p: 1,
  20822. // // messages: [{
  20823. // // content: messages,
  20824. // // role: 'user'
  20825. // // }], //
  20826. // // },
  20827. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20828. // // });
  20829. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20830. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20831. // console.log(response);
  20832. // let data = response.data.FunctionResponse
  20833. // if (data.choices && data.choices.length && data.choices[0].message) {
  20834. // console.log(data.choices[0].message.content);
  20835. // let tArray = JSON.parse(data.choices[0].message.content)
  20836. // // _this.unitJson[0].chapterInfo[0].task = []
  20837. // let toolsJson = {
  20838. // "电子白板": { tool: 1, type: 1 },
  20839. // "文档": { tool: 52, type: 1 },
  20840. // "思维导图": { tool: 3, type: 1 },
  20841. // "表格": { tool: 48, type: 1 },
  20842. // "作业提交": { tool: 16, type: 2 }
  20843. // }
  20844. // for (var i = 0; i < tArray.length; i++) {
  20845. // let _task = tArray[i]
  20846. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20847. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20848. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20849. // if (_task.toolChoose.length) {
  20850. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20851. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20852. // {
  20853. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20854. // toolDetail: _task.toolChoose[j].detail,
  20855. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20856. // askCount: 1,
  20857. // askTitle: "",
  20858. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20859. // },
  20860. // )
  20861. // }
  20862. // } else {
  20863. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20864. // {
  20865. // tool: [],
  20866. // toolDetail: "",
  20867. // toolType: 0,
  20868. // askCount: 1,
  20869. // askTitle: "",
  20870. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20871. // },
  20872. // )
  20873. // }
  20874. // }
  20875. // // if (_this.infoData.length) {
  20876. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20877. // // }
  20878. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20879. // _this.$forceUpdate();
  20880. // }
  20881. // // if (data.result) {
  20882. // // console.log(data.result);
  20883. // // let tArray = JSON.parse(data.result)
  20884. // // // _this.unitJson[0].chapterInfo[0].task = []
  20885. // // let toolsJson = {
  20886. // // "电子白板": { tool: 1, type: 1 },
  20887. // // "文档": { tool: 52, type: 1 },
  20888. // // "思维导图": { tool: 3, type: 1 },
  20889. // // "表格": { tool: 48, type: 1 },
  20890. // // "作业提交": { tool: 16, type: 2 }
  20891. // // }
  20892. // // for (var i = 0; i < tArray.length; i++) {
  20893. // // let _task = tArray[i]
  20894. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20895. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20896. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20897. // // if (_task.toolChoose.length) {
  20898. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20899. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20900. // // {
  20901. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20902. // // toolDetail: _task.toolChoose[j].detail,
  20903. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20904. // // askCount: 1,
  20905. // // askTitle: "",
  20906. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20907. // // },
  20908. // // )
  20909. // // }
  20910. // // } else {
  20911. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20912. // // {
  20913. // // tool: [],
  20914. // // toolDetail: "",
  20915. // // toolType: 0,
  20916. // // askCount: 1,
  20917. // // askTitle: "",
  20918. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20919. // // },
  20920. // // )
  20921. // // }
  20922. // // }
  20923. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20924. // // _this.$forceUpdate();
  20925. // // }
  20926. // callback ? callback() : ''
  20927. // }).catch(function (error) {
  20928. // _this.loading = false
  20929. // console.log(error);
  20930. // });
  20931. let parm = {
  20932. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20933. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20934. session_name: uuidv4(),
  20935. userId: this.userid,
  20936. file_ids: fileid.length ? [...fileid] : '',
  20937. model: 'gpt-4o-2024-11-20',
  20938. temperature: this.mode == 3 ? 0.5 : 0.1,
  20939. }
  20940. this.ajax
  20941. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20942. .then(async (response) => {
  20943. console.log(response);
  20944. let data = response.data.FunctionResponse
  20945. if (data.message) {
  20946. console.log(data.message);
  20947. let tArray = {}
  20948. try {
  20949. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20950. } catch (error) {
  20951. console.log("error_________________" + error);
  20952. try {
  20953. let regex = new RegExp(/```json([\s\S]*?)```/);
  20954. let match = data.message.match(regex);
  20955. tArray = JSON.parse(match[1]);
  20956. // var message = data.message;
  20957. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20958. // var jsonEnd = message.indexOf("```", jsonStart);
  20959. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20960. // tArray = JSON.parse(jsonString);
  20961. } catch (error) {
  20962. try {
  20963. let regex = new RegExp(/```json([\s\S]*?)```/);
  20964. let match = data.message.match(regex);
  20965. // eval("var aaa = " + match[0])
  20966. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20967. } catch (error) {
  20968. console.log("error_________________" + error);
  20969. }
  20970. console.log("error_________________" + error);
  20971. }
  20972. }
  20973. let toolsJson = {
  20974. "电子白板": { tool: 1, type: 1 },
  20975. "文档": { tool: 52, type: 1 },
  20976. "思维导图": { tool: 3, type: 1 },
  20977. "表格": { tool: 48, type: 1 },
  20978. "作业提交": { tool: 16, type: 2 },
  20979. "问答": { tool: 15, type: 2 },
  20980. "选择题": { tool: 45, type: 2 },
  20981. }
  20982. // answerQ:"sssssssssssssss"
  20983. // for (var i = 0; i < tArray.length; i++) {
  20984. let _task = tArray
  20985. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  20986. _task.elist = _task.elist.filter(el=>{
  20987. el.isai = 1
  20988. return el
  20989. })
  20990. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  20991. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  20992. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  20993. console.log("error_________________JSON不对重新生成");
  20994. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20995. _this.aiGet32(messages, index)
  20996. return;
  20997. }
  20998. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  20999. if (_task.toolChoose && _task.toolChoose.length) {
  21000. for (var j = 0; j < _task.toolChoose.length; j++) {
  21001. let _json = {
  21002. tool: [],
  21003. toolDetail: _task.toolChoose[j].detail,
  21004. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21005. askCount: 1,
  21006. askTitle: "",
  21007. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21008. }
  21009. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21010. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  21011. let answerQ = await _this.aiCreateQuestion(15, index)
  21012. // _json.answerQ = answerQ.answerQ
  21013. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21014. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  21015. let testJson = await _this.aiCreateQuestion(45, index)
  21016. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21017. _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}
  21018. }
  21019. _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]
  21020. _this.$forceUpdate();
  21021. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21022. }
  21023. } else {
  21024. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21025. {
  21026. tool: [],
  21027. toolDetail: "",
  21028. toolType: 0,
  21029. askCount: 1,
  21030. askTitle: "",
  21031. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21032. },
  21033. )
  21034. }
  21035. // }
  21036. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21037. _this.$forceUpdate();
  21038. _this.createTeacherAn(index);
  21039. }
  21040. // callback ? callback() : ''
  21041. _this.taskLoading[index] = false
  21042. })
  21043. .catch((error) => {
  21044. // _this.loading = false
  21045. _this.taskLoading[index] = false
  21046. console.log(error);
  21047. });
  21048. },
  21049. async aiGetG321(messages, index, callback, callback2) {
  21050. let _this = this
  21051. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21052. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21053. if (_this.infoData.length) {
  21054. for (var i = 0; i < _this.infoData.length; i++) {
  21055. if(_this.infoData[i].fileid){
  21056. fileid.push(_this.infoData[i].fileid)
  21057. }else {
  21058. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21059. if(_fileid){
  21060. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21061. _this.$forceUpdate();
  21062. if(_fileid != 1){
  21063. fileid.push(_fileid)
  21064. }
  21065. }
  21066. }
  21067. }
  21068. }
  21069. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21070. let parm = {
  21071. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21072. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21073. session_name: uuidv4(),
  21074. userId: this.userid,
  21075. file_ids: fileid.length ? [...fileid] : '',
  21076. model: 'gpt-4o-2024-11-20',
  21077. temperature: this.mode == 3 ? 0.5 : 0.1,
  21078. }
  21079. this.ajax
  21080. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  21081. .then(async (response) => {
  21082. console.log(response);
  21083. let data = response.data.FunctionResponse
  21084. if (data.message) {
  21085. let tArray = {}
  21086. try {
  21087. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21088. } catch (error) {
  21089. console.log("error_________________" + error);
  21090. try {
  21091. let regex = new RegExp(/```json([\s\S]*?)```/);
  21092. let match = data.message.match(regex);
  21093. tArray = JSON.parse(match[1]);
  21094. } catch (error) {
  21095. try {
  21096. let regex = new RegExp(/```json([\s\S]*?)```/);
  21097. let match = data.message.match(regex);
  21098. // eval("var aaa = " + match[0])
  21099. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21100. } catch (error) {
  21101. console.log("error_________________" + error);
  21102. }
  21103. console.log("error_________________" + error);
  21104. }
  21105. }
  21106. console.log(data.message);
  21107. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  21108. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21109. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21110. _this.$forceUpdate();
  21111. _this.createTeacherAn(index);
  21112. }
  21113. callback ? callback(callback2) : ''
  21114. _this.taskGLoading[index][0] = false
  21115. _this.taskCancelToken1[index] = null
  21116. _this.$forceUpdate();
  21117. })
  21118. .catch((error) => {
  21119. // _this.loading = false
  21120. callback ? callback(callback2) : ''
  21121. _this.taskGLoading[index][0] = false
  21122. _this.taskCancelToken1[index] = null
  21123. _this.$forceUpdate();
  21124. console.log(error);
  21125. });
  21126. },
  21127. async aiGetG321L(messages, index, callback, callback2) {
  21128. let _this = this
  21129. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21130. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21131. if (_this.infoData.length) {
  21132. for (var i = 0; i < _this.infoData.length; i++) {
  21133. if(_this.infoData[i].fileid){
  21134. fileid.push(_this.infoData[i].fileid)
  21135. }else {
  21136. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21137. if(_fileid){
  21138. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21139. _this.$forceUpdate();
  21140. if(_fileid != 1){
  21141. fileid.push(_fileid)
  21142. }
  21143. }
  21144. }
  21145. }
  21146. }
  21147. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  21148. let _uuid = uuidv4();
  21149. let parm = {
  21150. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21151. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21152. session_name: uuidv4(),
  21153. userId: this.userid,
  21154. file_ids: fileid.length ? [...fileid] : '',
  21155. uid: _uuid,
  21156. // model: 'gpt-4o-2024-11-20',
  21157. model: 'gpt-4o-mini',
  21158. temperature: this.mode == 3 ? 0.5 : 0.1,
  21159. }
  21160. this.ajax
  21161. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", parm, _this.taskCancelToken1[index])
  21162. .then(async (response) => {
  21163. console.log(response);
  21164. // }
  21165. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21166. } else {
  21167. _this.$message.warning(response.data.FunctionResponse.result);
  21168. callback ? callback(callback2) : ''
  21169. _this.taskGLoading[index][0] = false
  21170. _this.ttaskGLoading[index][0] = false
  21171. _this.taskCancelToken1[index] = null
  21172. }
  21173. _this.taskCancelToken1[index] = null
  21174. _this.$forceUpdate();
  21175. })
  21176. .catch((error) => {
  21177. // _this.loading = false
  21178. callback ? callback(callback2) : ''
  21179. _this.taskGLoading[index][0] = false
  21180. _this.ttaskGLoading[index][0] = false
  21181. _this.taskCancelToken1[index] = null
  21182. _this.$forceUpdate();
  21183. console.log(error);
  21184. });
  21185. await _this.aiGetG321LgetAiContent(_uuid, index, callback, callback2)
  21186. },
  21187. aiGetG321LgetAiContent(_uid, index, callback, callback2) {
  21188. try {
  21189. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21190. this.isTaskCancelSource1[index] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21191. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21192. } catch(error){
  21193. console.log('EventSource error:', error);
  21194. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21195. callback ? callback(callback2) : ''
  21196. this.taskGLoading[index][0] = false
  21197. this.ttaskGLoading[index][0] = false
  21198. this.taskCancelToken1[index][0] = null
  21199. return;
  21200. }
  21201. let _allText = "";
  21202. let _mdText = "";
  21203. let _iindex = 0
  21204. this.isTaskCancelSource1[index].onmessage = _e => {
  21205. let _eData = JSON.parse(_e.data).content;
  21206. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21207. //对话已经完成
  21208. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21209. callback ? callback(callback2) : ''
  21210. this.isTaskCancelSource1[index].close();
  21211. this.isTaskCancelSource1[index] = null;
  21212. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21213. this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  21214. this.createTeacherAn(index);
  21215. this.taskGLoading[index][0] = false
  21216. this.ttaskGLoading[index][0] = false
  21217. this.taskCancelToken1[index][0] = null
  21218. return;
  21219. } else {
  21220. _iindex++
  21221. //对话还在继续
  21222. let _text = "";
  21223. _text = _eData.replaceAll("'", "");
  21224. if (_allText == "") {
  21225. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21226. } else {
  21227. _allText += _text;
  21228. }
  21229. _mdText = _allText + "_";
  21230. _mdText = _mdText.replace(/\\n/g, "\n");
  21231. _mdText = _mdText.replace(/\\/g, "");
  21232. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21233. //转化返回的回复流数据.
  21234. if(_iindex == 10){
  21235. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _mdText;
  21236. _iindex = 0
  21237. }
  21238. this.taskGLoading[index][0] = false
  21239. // 处理流数据
  21240. }
  21241. // this.$forceUpdate();
  21242. };
  21243. let _this = this
  21244. this.isTaskCancelSource1[index].onerror = function(event) {
  21245. // 处理错误,可以尝试重新连接
  21246. console.log('EventSource error:', event);
  21247. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21248. callback ? callback(callback2) : ''
  21249. _this.taskGLoading[index][0] = false
  21250. _this.ttaskGLoading[index][0] = false
  21251. _this.isTaskCancelSource1[index].close();
  21252. _this.isTaskCancelSource1[index] = null;
  21253. _this.taskCancelToken1[index][0] = null
  21254. };
  21255. },
  21256. async aiGetG322(messages, index, callback) {
  21257. let _this = this
  21258. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21259. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21260. if (_this.infoData.length) {
  21261. for (var i = 0; i < _this.infoData.length; i++) {
  21262. if(_this.infoData[i].fileid){
  21263. fileid.push(_this.infoData[i].fileid)
  21264. }else {
  21265. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21266. if(_fileid){
  21267. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21268. _this.$forceUpdate();
  21269. if(_fileid != 1){
  21270. fileid.push(_fileid)
  21271. }
  21272. }
  21273. }
  21274. }
  21275. }
  21276. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  21277. let parm = {
  21278. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21279. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21280. session_name: uuidv4(),
  21281. userId: this.userid,
  21282. file_ids: fileid.length ? [...fileid] : '',
  21283. model: 'gpt-4o-2024-11-20',
  21284. temperature: this.mode == 3 ? 0.5 : 0.1,
  21285. }
  21286. this.ajax
  21287. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  21288. .then(async (response) => {
  21289. console.log(response);
  21290. let data = response.data.FunctionResponse
  21291. if (data.message) {
  21292. console.log(data.message);
  21293. let tArray = {}
  21294. try {
  21295. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21296. } catch (error) {
  21297. console.log("error_________________" + error);
  21298. try {
  21299. let regex = new RegExp(/```json([\s\S]*?)```/);
  21300. let match = data.message.match(regex);
  21301. tArray = JSON.parse(match[1]);
  21302. } catch (error) {
  21303. try {
  21304. let regex = new RegExp(/```json([\s\S]*?)```/);
  21305. let match = data.message.match(regex);
  21306. // eval("var aaa = " + match[0])
  21307. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21308. } catch (error) {
  21309. console.log("error_________________" + error);
  21310. }
  21311. console.log("error_________________" + error);
  21312. }
  21313. }
  21314. let toolsJson = {
  21315. "电子白板": { tool: 1, type: 1 },
  21316. "文档": { tool: 52, type: 1 },
  21317. "思维导图": { tool: 3, type: 1 },
  21318. "表格": { tool: 48, type: 1 },
  21319. "作业提交": { tool: 16, type: 2 },
  21320. "问答": { tool: 15, type: 2 },
  21321. "选择题": { tool: 45, type: 2 },
  21322. }
  21323. if(_this.languageSetting == 1){
  21324. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  21325. }else if(_this.languageSetting == 2){
  21326. toolsJson = {
  21327. "Mind Map Tool": { tool: 1, type: 1 },
  21328. "Document tool": { tool: 52, type: 1 },
  21329. "Diagram Tool": { tool: 3, type: 1 },
  21330. "Spreadsheet tool": { tool: 48, type: 1 },
  21331. "作业提交": { tool: 16, type: 2 },
  21332. "Q&A Tool": { tool: 15, type: 2 },
  21333. "Choice tool": { tool: 45, type: 2 },
  21334. }
  21335. }
  21336. let _task = tArray
  21337. if(!_task.toolChoose){
  21338. console.log("error_________________JSON不对重新生成");
  21339. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21340. _this.aiGetG322(messages, index)
  21341. return;
  21342. }
  21343. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  21344. if (_task.toolChoose && _task.toolChoose.length) {
  21345. for (var j = 0; j < _task.toolChoose.length; j++) {
  21346. let _json = {
  21347. tool: [],
  21348. toolDetail: _task.toolChoose[j].detail,
  21349. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  21350. askCount: 1,
  21351. askTitle: "",
  21352. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21353. }
  21354. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21355. if(converter(_task.toolChoose[j].tool) == converter('问答') || _task.toolChoose[j].tool == 'Q&A Tool'){
  21356. let answerQ = await _this.aiCreateQuestion(15, index)
  21357. // _json.answerQ = answerQ.answerQ
  21358. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  21359. }else if(converter(_task.toolChoose[j].tool) == converter('选择题') || _task.toolChoose[j].tool == 'Choice tool'){
  21360. let testJson = await _this.aiCreateQuestion(45, index)
  21361. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  21362. _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}
  21363. }
  21364. _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]
  21365. _this.$forceUpdate();
  21366. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  21367. }
  21368. } else {
  21369. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  21370. {
  21371. tool: [],
  21372. toolDetail: "",
  21373. toolType: 0,
  21374. askCount: 1,
  21375. askTitle: "",
  21376. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21377. },
  21378. )
  21379. }
  21380. //
  21381. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21382. _this.$forceUpdate();
  21383. // _this.$nextTick(()=>{
  21384. // setTimeout(() => {
  21385. // for (var j = 0; j < _task.toolChoose.length; j++) {
  21386. // if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  21387. // _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  21388. // }
  21389. // }
  21390. // }, 2000);
  21391. // })
  21392. }
  21393. callback ? callback() : ''
  21394. _this.taskGLoading[index][1] = false
  21395. _this.taskCancelToken2[index] = null
  21396. _this.$forceUpdate();
  21397. })
  21398. .catch((error) => {
  21399. // _this.loading = false
  21400. callback ? callback() : ''
  21401. _this.taskGLoading[index][1] = false
  21402. _this.taskCancelToken2[index] = null
  21403. _this.$forceUpdate();
  21404. console.log(error);
  21405. });
  21406. },
  21407. async aiGetG323(messages, index) {
  21408. let _this = this
  21409. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21410. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21411. if (_this.infoData.length) {
  21412. for (var i = 0; i < _this.infoData.length; i++) {
  21413. if(_this.infoData[i].fileid){
  21414. fileid.push(_this.infoData[i].fileid)
  21415. }else {
  21416. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21417. if(_fileid){
  21418. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21419. _this.$forceUpdate();
  21420. if(_fileid != 1){
  21421. fileid.push(_fileid)
  21422. }
  21423. }
  21424. }
  21425. }
  21426. }
  21427. let parm = {
  21428. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21429. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21430. session_name: uuidv4(),
  21431. userId: this.userid,
  21432. file_ids: fileid.length ? [...fileid] : '',
  21433. model: 'gpt-4o-2024-11-20',
  21434. temperature: this.mode == 3 ? 0.5 : 0.1,
  21435. }
  21436. this.ajax
  21437. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21438. .then(async (response) => {
  21439. console.log(response);
  21440. let data = response.data.FunctionResponse
  21441. if (data.message) {
  21442. console.log(data.message);
  21443. let tArray = {}
  21444. try {
  21445. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21446. } catch (error) {
  21447. console.log("error_________________" + error);
  21448. try {
  21449. let regex = new RegExp(/```json([\s\S]*?)```/);
  21450. let match = data.message.match(regex);
  21451. tArray = JSON.parse(match[1]);
  21452. } catch (error) {
  21453. try {
  21454. let regex = new RegExp(/```json([\s\S]*?)```/);
  21455. let match = data.message.match(regex);
  21456. // eval("var aaa = " + match[0])
  21457. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21458. } catch (error) {
  21459. console.log("error_________________" + error);
  21460. }
  21461. console.log("error_________________" + error);
  21462. }
  21463. }
  21464. let _task = tArray
  21465. if(!_task.elist){
  21466. console.log("error_________________JSON不对重新生成");
  21467. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21468. _this.aiGetG322(messages, index)
  21469. return;
  21470. }
  21471. _task.elist = _task.elist.filter(el=>{
  21472. el.isai = "1"
  21473. return el
  21474. })
  21475. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  21476. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21477. _this.$forceUpdate();
  21478. }
  21479. // callback ? callback() : ''
  21480. _this.taskGLoading[index][2] = false
  21481. })
  21482. .catch((error) => {
  21483. // _this.loading = false
  21484. _this.taskGLoading[index][2] = false
  21485. console.log(error);
  21486. });
  21487. },
  21488. async aiCreateQuestion(type, task) {
  21489. let _this = this
  21490. return new Promise((resolve, reject) => {
  21491. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21492. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21493. if (_this.infoData.length) {
  21494. for (var i = 0; i < _this.infoData.length; i++) {
  21495. if(_this.infoData[i].fileid){
  21496. fileid.push(_this.infoData[i].fileid)
  21497. }
  21498. }
  21499. }
  21500. let sub = []
  21501. let mclass = []
  21502. if (this.courseTypeId.length) {
  21503. for (var i = 0; i < this.courseTypeId.length; i++) {
  21504. let _sid = this.courseTypeId[i]
  21505. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21506. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21507. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21508. }
  21509. }
  21510. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21511. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21512. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21513. }
  21514. }
  21515. }
  21516. }
  21517. let messages = ""
  21518. if(type == 15){
  21519. messages = `NOTICE
  21520. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21521. Language: ${this.getLang()}
  21522. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21523. Instruction: Based on the context, follow "Format example", write content.
  21524. # Context
  21525. ## 任务
  21526. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21527. ## 限制
  21528. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21529. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21530. ## 课程简介
  21531. 课程名字:${_this.courseName}
  21532. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21533. ${sub.length ? '学科:' + sub.join(",") : ''}
  21534. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21535. ## 教案
  21536. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21537. # Format example
  21538. {"answerQ":"问题"}
  21539. `
  21540. }else if(type == 45){
  21541. messages = `NOTICE
  21542. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21543. Language: ${this.getLang()}
  21544. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21545. Instruction: Based on the context, follow "Format example", write content.
  21546. # Context
  21547. ## 任务
  21548. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21549. ## 限制
  21550. - 生成题目禁止重复。
  21551. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21552. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21553. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21554. ## 课程简介
  21555. 课程名字:${_this.courseName}
  21556. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21557. ${sub.length ? '学科:' + sub.join(",") : ''}
  21558. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21559. ## 教案
  21560. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21561. # Format example
  21562. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21563. `
  21564. }
  21565. let parm = {
  21566. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21567. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21568. session_name: uuidv4(),
  21569. userId: this.userid,
  21570. file_ids: fileid.length ? [...fileid] : '',
  21571. model: 'gpt-4o-2024-11-20',
  21572. temperature: this.mode == 3 ? 0.5 : 0.1,
  21573. }
  21574. this.ajax
  21575. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21576. .then((response) => {
  21577. console.log(response);
  21578. let data = response.data.FunctionResponse
  21579. if (data.message) {
  21580. console.log(data.message);
  21581. try {
  21582. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21583. let tArray = {}
  21584. try {
  21585. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21586. } catch (error) {
  21587. console.log("error_________________" + error);
  21588. try {
  21589. let regex = new RegExp(/```json([\s\S]*?)```/);
  21590. let match = data.message.match(regex);
  21591. tArray = JSON.parse(match[1]);
  21592. // var message = data.message;
  21593. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21594. // var jsonEnd = message.indexOf("```", jsonStart);
  21595. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21596. // tArray = JSON.parse(jsonString);
  21597. } catch (error) {
  21598. try {
  21599. let regex = new RegExp(/```json([\s\S]*?)```/);
  21600. let match = data.message.match(regex);
  21601. // eval("var aaa = " + match[0])
  21602. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21603. } catch (error) {
  21604. try {
  21605. let regex = new RegExp(/```json([\s\S]*?)```/);
  21606. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21607. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21608. // eval("var aaa = " + match[0])
  21609. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21610. } catch (error) {
  21611. console.log("error_________________" + error);
  21612. }
  21613. console.log("error_________________" + error);
  21614. }
  21615. console.log("error_________________" + error);
  21616. }
  21617. }
  21618. resolve(tArray)
  21619. } catch (error) {
  21620. if(type == 15){
  21621. resolve({answerQ: "题目"})
  21622. }else if(type == 45){
  21623. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21624. }
  21625. }
  21626. }else if(type == 15){
  21627. resolve({answerQ: "题目"})
  21628. }else if(type == 45){
  21629. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21630. }
  21631. })
  21632. .catch((error) => {
  21633. if(type == 15){
  21634. resolve({answerQ: "题目"})
  21635. }else if(type == 45){
  21636. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  21637. }
  21638. console.log(error);
  21639. });
  21640. });
  21641. },
  21642. async aiChoice(type){
  21643. if(type == 45){
  21644. this.choiceLoading = true
  21645. }
  21646. let _this = this
  21647. let fileid = []
  21648. if (_this.xuanzeInfoData.length) {
  21649. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  21650. if(_this.xuanzeInfoData[i].fileid){
  21651. fileid.push(_this.xuanzeInfoData[i].fileid)
  21652. }
  21653. }
  21654. }else{
  21655. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21656. if (_this.infoData.length) {
  21657. for (var i = 0; i < _this.infoData.length; i++) {
  21658. if(_this.infoData[i].fileid){
  21659. fileid.push(_this.infoData[i].fileid)
  21660. }
  21661. }
  21662. }
  21663. }
  21664. let sub = []
  21665. let mclass = []
  21666. if (this.courseTypeId.length) {
  21667. for (var i = 0; i < this.courseTypeId.length; i++) {
  21668. let _sid = this.courseTypeId[i]
  21669. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21670. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21671. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21672. }
  21673. }
  21674. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21675. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21676. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21677. }
  21678. }
  21679. }
  21680. }
  21681. let messages = ""
  21682. if(type == 15){
  21683. messages = `NOTICE
  21684. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21685. Language: ${this.getLang()}
  21686. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21687. Instruction: Based on the context, follow "Format example", write content.
  21688. # Context
  21689. ## 任务
  21690. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  21691. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21692. ## 限制
  21693. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21694. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21695. ## 课程简介
  21696. 课程名字:${_this.courseName}
  21697. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21698. ${sub.length ? '学科:' + sub.join(",") : ''}
  21699. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21700. ## 教案
  21701. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21702. # Format example
  21703. {"answerQ":"问题"}
  21704. `
  21705. }else if(type == 45){
  21706. messages = `NOTICE
  21707. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  21708. Language: ${this.getLang()}
  21709. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21710. Instruction: Based on the context, follow "Format example", write content.
  21711. # Context
  21712. ## 任务
  21713. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  21714. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  21715. ## 限制
  21716. - 生成题目禁止重复。
  21717. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  21718. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  21719. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  21720. ## 课程简介
  21721. 课程名字:${_this.courseName}
  21722. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21723. ${sub.length ? '学科:' + sub.join(",") : ''}
  21724. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21725. ## 教案
  21726. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21727. # Format example
  21728. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  21729. `
  21730. }
  21731. let parm = {
  21732. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21733. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21734. session_name: uuidv4(),
  21735. userId: this.userid,
  21736. file_ids: fileid.length ? [...fileid] : '',
  21737. model: 'gpt-4o-2024-11-20',
  21738. temperature: this.mode == 3 ? 0.5 : 0.1,
  21739. }
  21740. this.ajax
  21741. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21742. .then((response) => {
  21743. console.log(response);
  21744. let data = response.data.FunctionResponse
  21745. if (data.message) {
  21746. console.log(data.message);
  21747. try {
  21748. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21749. let tArray = {}
  21750. try {
  21751. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21752. } catch (error) {
  21753. console.log("error_________________" + error);
  21754. try {
  21755. let regex = new RegExp(/```json([\s\S]*?)```/);
  21756. let match = data.message.match(regex);
  21757. tArray = JSON.parse(match[1]);
  21758. // var message = data.message;
  21759. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21760. // var jsonEnd = message.indexOf("```", jsonStart);
  21761. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21762. // tArray = JSON.parse(jsonString);
  21763. } catch (error) {
  21764. try {
  21765. let regex = new RegExp(/```json([\s\S]*?)```/);
  21766. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21767. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21768. // eval("var aaa = " + match[0])
  21769. tArray = JSON.parse(match[1].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21770. } catch (error) {
  21771. console.log("error_________________" + error);
  21772. }
  21773. console.log("error_________________" + error);
  21774. }
  21775. }
  21776. if(type == 45){
  21777. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  21778. }
  21779. } catch (error) {
  21780. if(type == 15){
  21781. {answerQ: "题目"}
  21782. }else if(type == 45){
  21783. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21784. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21785. }
  21786. _this.choiceLoading = false
  21787. }
  21788. }else if(type == 15){
  21789. {answerQ: "题目"}
  21790. }else if(type == 45){
  21791. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21792. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21793. }
  21794. _this.choiceLoading = false
  21795. }).catch((error) => {
  21796. if(type == 15){
  21797. {answerQ: "题目"}
  21798. }else if(type == 45){
  21799. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21800. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21801. }
  21802. console.log(error);
  21803. _this.choiceLoading = false
  21804. });
  21805. },
  21806. async aiGet4(messages, callback, clickType) {
  21807. let _this = this
  21808. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21809. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21810. if (_this.infoData.length) {
  21811. for (var i = 0; i < _this.infoData.length; i++) {
  21812. if(_this.infoData[i].fileid){
  21813. fileid.push(_this.infoData[i].fileid)
  21814. }else {
  21815. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21816. if(_fileid){
  21817. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21818. _this.$forceUpdate();
  21819. if(_fileid != 1){
  21820. fileid.push(_fileid)
  21821. }
  21822. }
  21823. }
  21824. }
  21825. }
  21826. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  21827. if(_this.cankaoInfoData[i].fileid){
  21828. fileid.push(_this.cankaoInfoData[i].fileid)
  21829. }else {
  21830. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  21831. if(_fileid){
  21832. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21833. _this.$forceUpdate();
  21834. if(_fileid != 1){
  21835. fileid.push(_fileid)
  21836. }
  21837. }
  21838. }
  21839. }
  21840. // let params = JSON.stringify({
  21841. // // "model": "Chat",
  21842. // model: 'gpt-3.5-turbo',
  21843. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21844. // max_tokens: 4096,
  21845. // top_p: 1,
  21846. // frequency_penalty: 0,
  21847. // presence_penalty: 0,
  21848. // messages: [{
  21849. // content: messages,
  21850. // role: 'user'
  21851. // }],
  21852. // stream: false,
  21853. // uid: this.userid,
  21854. // mind_map_question: "",
  21855. // })
  21856. // // let params = JSON.stringify({
  21857. // // message: {
  21858. // // anthropic_version: "bedrock-2023-05-31",
  21859. // // max_tokens: 4096,
  21860. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  21861. // // top_p: 1,
  21862. // // messages: [{
  21863. // // content: messages,
  21864. // // role: 'user'
  21865. // // }], //
  21866. // // },
  21867. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21868. // // });
  21869. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21870. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21871. // console.log(response);
  21872. // let data = response.data.FunctionResponse
  21873. // if (data.choices && data.choices.length && data.choices[0].message) {
  21874. // console.log(data.choices[0].message.content);
  21875. // let dArray = JSON.parse(data.choices[0].message.content)
  21876. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  21877. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  21878. // _this.unitJson[0].chapterInfo[0].taskJson = []
  21879. // for (var i = 0; i < dArray.length; i++) {
  21880. // let _task = dArray[i]
  21881. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  21882. // task: _task.task,
  21883. // taskDetail: "",
  21884. // taskDetail2: "",
  21885. // taskDetail3: _task.detail,
  21886. // chapterData: [],
  21887. // toolText: "",
  21888. // toolChoose: [
  21889. // {
  21890. // tool: [],
  21891. // toolDetail: "",
  21892. // toolType: 0,
  21893. // askCount: 1,
  21894. // askTitle: "",
  21895. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21896. // },
  21897. // ],
  21898. // isShowTools: false,
  21899. // askCount: 1,
  21900. // isFold: 0,
  21901. // askTitle: "",
  21902. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21903. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21904. // homeworkList: [],
  21905. // })
  21906. // }
  21907. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  21908. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21909. // _this.$forceUpdate();
  21910. // } else {
  21911. // for (var i = 0; i < dArray.length; i++) {
  21912. // let _task = dArray[i]
  21913. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  21914. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21915. // }else {
  21916. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  21917. // task: _task.task,
  21918. // taskDetail: "",
  21919. // taskDetail2: "",
  21920. // taskDetail3: _task.detail,
  21921. // chapterData: [],
  21922. // toolText: "",
  21923. // toolChoose: [
  21924. // {
  21925. // tool: [],
  21926. // toolDetail: "",
  21927. // toolType: 0,
  21928. // askCount: 1,
  21929. // askTitle: "",
  21930. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21931. // },
  21932. // ],
  21933. // isShowTools: false,
  21934. // askCount: 1,
  21935. // isFold: 0,
  21936. // askTitle: "",
  21937. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21938. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21939. // homeworkList: [],
  21940. // }
  21941. // }
  21942. // }
  21943. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21944. // _this.$forceUpdate();
  21945. // }
  21946. // }
  21947. // // if (data.result) {
  21948. // // console.log(data.result);
  21949. // // let dArray = JSON.parse(data.result)
  21950. // // _this.teacherText = JSON.parse(data.result)
  21951. // // for (var i = 0; i < dArray.length; i++) {
  21952. // // let _task = dArray[i]
  21953. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21954. // // }
  21955. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21956. // // _this.$forceUpdate();
  21957. // // }
  21958. // callback ? callback() : ''
  21959. // _this.loading = false
  21960. // }).catch(function (error) {
  21961. // _this.loading = false
  21962. // console.log(error);
  21963. // });
  21964. let parm = {
  21965. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21966. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21967. session_name: uuidv4(),
  21968. userId: this.userid,
  21969. file_ids: fileid.length ? [...fileid] : '',
  21970. model: 'gpt-4o-2024-11-20',
  21971. temperature: this.mode == 3 ? 0.5 : 0.1,
  21972. }
  21973. this.ajax
  21974. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21975. .then((response) => {
  21976. console.log(response);
  21977. let data = response.data.FunctionResponse
  21978. if (data.message) {
  21979. console.log(data.message);
  21980. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21981. let dArray = []
  21982. try {
  21983. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21984. } catch (error) {
  21985. console.log("error_________________" + error);
  21986. try {
  21987. let regex = new RegExp(/```json([\s\S]*?)```/);
  21988. let match = data.message.match(regex);
  21989. dArray = JSON.parse(match[1]);
  21990. // var message = data.message;
  21991. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21992. // var jsonEnd = message.indexOf("```", jsonStart);
  21993. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21994. // dArray = JSON.parse(jsonString);
  21995. } catch (error) {
  21996. _this.aiGet4(messages, callback)
  21997. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21998. console.log("error_________________" + error);
  21999. return;
  22000. console.log("error_________________" + error);
  22001. _this.loading = false
  22002. }
  22003. }
  22004. try {
  22005. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  22006. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  22007. if(_this.panTeacher() > 0){
  22008. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  22009. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  22010. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  22011. }
  22012. for (var i = 0; i < dArray.length; i++) {
  22013. let _task = dArray[i]
  22014. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22015. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  22016. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22017. }else {
  22018. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22019. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  22020. taskDetail: "",
  22021. taskDetail2: "",
  22022. taskDetail3: _task.detail,
  22023. chapterData: [],
  22024. toolText: "",
  22025. toolChoose: [
  22026. {
  22027. tool: [],
  22028. toolDetail: "",
  22029. toolType: 0,
  22030. askCount: 1,
  22031. askTitle: "",
  22032. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22033. },
  22034. ],
  22035. isShowTools: false,
  22036. askCount: 1,
  22037. isFold: 0,
  22038. askTitle: "",
  22039. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22040. checkJson: [{ checkCount: [], checkPerent: [] }],
  22041. homeworkList: [],
  22042. })
  22043. }
  22044. }
  22045. }else {
  22046. _this.unitJson[0].chapterInfo[0].taskJson = []
  22047. for (var i = 0; i < dArray.length; i++) {
  22048. let _task = dArray[i]
  22049. _this.unitJson[0].chapterInfo[0].taskJson.push({
  22050. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  22051. taskDetail: "",
  22052. taskDetail2: "",
  22053. taskDetail3: _task.detail,
  22054. chapterData: [],
  22055. toolText: "",
  22056. toolChoose: [
  22057. {
  22058. tool: [],
  22059. toolDetail: "",
  22060. toolType: 0,
  22061. askCount: 1,
  22062. askTitle: "",
  22063. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22064. },
  22065. ],
  22066. isShowTools: false,
  22067. askCount: 1,
  22068. isFold: 0,
  22069. askTitle: "",
  22070. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22071. checkJson: [{ checkCount: [], checkPerent: [] }],
  22072. homeworkList: [],
  22073. })
  22074. }
  22075. }
  22076. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  22077. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22078. _this.$forceUpdate();
  22079. } else {
  22080. for (var i = 0; i < dArray.length; i++) {
  22081. let _task = dArray[i]
  22082. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  22083. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  22084. }else {
  22085. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  22086. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  22087. taskDetail: "",
  22088. taskDetail2: "",
  22089. taskDetail3: _task.detail,
  22090. chapterData: [],
  22091. toolText: "",
  22092. toolChoose: [
  22093. {
  22094. tool: [],
  22095. toolDetail: "",
  22096. toolType: 0,
  22097. askCount: 1,
  22098. askTitle: "",
  22099. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22100. },
  22101. ],
  22102. isShowTools: false,
  22103. askCount: 1,
  22104. isFold: 0,
  22105. askTitle: "",
  22106. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22107. checkJson: [{ checkCount: [], checkPerent: [] }],
  22108. homeworkList: [],
  22109. }
  22110. }
  22111. }
  22112. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22113. _this.$forceUpdate();
  22114. }
  22115. } catch (error) {
  22116. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  22117. _this.aiGet4(messages, callback)
  22118. console.log("error_________________" + error);
  22119. return;
  22120. // _this.loading = false
  22121. }
  22122. }
  22123. callback ? callback() : ''
  22124. })
  22125. .catch((error) => {
  22126. _this.loading = false
  22127. console.log(error);
  22128. });
  22129. },
  22130. async aiDetail(msg, index) {
  22131. let _this = this
  22132. const _tindex = 'task-' + index
  22133. const _tindex2 = index
  22134. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22135. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22136. if (_this.infoData.length) {
  22137. for (var i = 0; i < _this.infoData.length; i++) {
  22138. if(_this.infoData[i].fileid){
  22139. fileid.push(_this.infoData[i].fileid)
  22140. }else {
  22141. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22142. if(_fileid){
  22143. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22144. _this.$forceUpdate();
  22145. if(_fileid != 1){
  22146. fileid.push(_fileid)
  22147. }
  22148. }
  22149. }
  22150. }
  22151. }
  22152. let url = []
  22153. if (this.infoData.length) {
  22154. for (var i = 0; i < this.infoData.length; i++) {
  22155. url.push(this.infoData[i].url)
  22156. }
  22157. }
  22158. let messages = `NOTICE
  22159. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22160. Language: ${this.getLang()}
  22161. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22162. Instruction: Based on the context, follow "Format example", write content.
  22163. #Context
  22164. ## 要求
  22165. ${msg}
  22166. ## 参考信息
  22167. 任务名称:${_this.aiCallBack.task}
  22168. ## 优化内容
  22169. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  22170. // -------- #补充参考资料和
  22171. // ## 补充参考资料
  22172. // - 补充资料:${url.join(",")}
  22173. // - 补充描述:${_this.courseText2}
  22174. _this.taskDetailLoading.push(_tindex)
  22175. _this.ttaskDetailLoading.push(_tindex)
  22176. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22177. let _uuid = uuidv4();
  22178. // let params = JSON.stringify({
  22179. // // "model": "Chat",
  22180. // model: 'gpt-3.5-turbo',
  22181. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22182. // max_tokens: 4096,
  22183. // top_p: 1,
  22184. // frequency_penalty: 0,
  22185. // presence_penalty: 0,
  22186. // messages: [{
  22187. // content: messages,
  22188. // role: 'user'
  22189. // }],
  22190. // uid: _uuid,
  22191. // mind_map_question: "",
  22192. // })
  22193. let params = {
  22194. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22195. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  22196. session_name: _uuid,
  22197. userId: _this.userid,
  22198. uid: _uuid,
  22199. file_ids: fileid.length ? [...fileid] : '',
  22200. model: 'gpt-4o-2024-11-20',
  22201. temperature: this.mode == 3 ? 0.5 : 0.1,
  22202. }
  22203. // let params = JSON.stringify({
  22204. // message: {
  22205. // anthropic_version: "bedrock-2023-05-31",
  22206. // max_tokens: 4096,
  22207. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22208. // top_p: 1,
  22209. // messages: [{
  22210. // "role": "user",
  22211. // "content": messages
  22212. // }] ,
  22213. // },
  22214. // uid: _uuid,
  22215. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22216. // });
  22217. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22218. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22219. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22220. console.log(response);
  22221. // let data = response.data.FunctionResponse
  22222. // if (data.choices && data.choices.length && data.choices[0].message) {
  22223. // console.log(data.choices[0].message.content);
  22224. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22225. // _this.$forceUpdate()
  22226. // }
  22227. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22228. } else {
  22229. _this.$message.warning(response.data.FunctionResponse.result);
  22230. }
  22231. _this.isOutlineTaskCancelToken[index] = null
  22232. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22233. }).catch(function (error) {
  22234. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22235. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22236. _this.isOutlineTaskCancelToken[index] = null
  22237. if(error && error.message != 'Request canceled by the user.'){
  22238. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22239. }
  22240. console.log(error);
  22241. });
  22242. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  22243. },
  22244. aiDetailgetAiContent(_uid, loading, _tindex2) {
  22245. try {
  22246. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22247. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22248. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22249. } catch(error){
  22250. console.log('EventSource error:', error);
  22251. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22252. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22253. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22254. this.isOutlineTaskCancelToken[_tindex2] = null
  22255. return;
  22256. }
  22257. let _allText = "";
  22258. let _mdText = "";
  22259. let _iindex = 0
  22260. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22261. let _eData = JSON.parse(_e.data).content;
  22262. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22263. //对话已经完成
  22264. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22265. this.isOutlineTaskCancelSource[_tindex2].close();
  22266. this.isOutlineTaskCancelSource[_tindex2] = null;
  22267. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22268. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22269. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22270. this.isOutlineTaskCancelToken[_tindex2] = null
  22271. return;
  22272. } else {
  22273. _iindex++
  22274. //对话还在继续
  22275. let _text = "";
  22276. _text = _eData.replaceAll("'", "");
  22277. if (_allText == "") {
  22278. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22279. } else {
  22280. _allText += _text;
  22281. }
  22282. _mdText = _allText + "_";
  22283. _mdText = _mdText.replace(/\\n/g, "\n");
  22284. _mdText = _mdText.replace(/\\/g, "");
  22285. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22286. //转化返回的回复流数据.
  22287. if(_iindex == 10){
  22288. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22289. _iindex = 0
  22290. }
  22291. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22292. // 处理流数据
  22293. }
  22294. // this.$forceUpdate();
  22295. };
  22296. let _this = this
  22297. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22298. // 处理错误,可以尝试重新连接
  22299. console.log('EventSource error:', event);
  22300. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22301. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22302. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22303. _this.isOutlineTaskCancelToken[_tindex2] = null
  22304. _this.isOutlineTaskCancelSource[_tindex2].close();
  22305. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22306. };
  22307. },
  22308. async aiOutlineDetail(msg, index) {
  22309. let _this = this
  22310. const _tindex = 'task-' + index
  22311. const _tindex2 = index
  22312. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22313. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22314. if (_this.infoData.length) {
  22315. for (var i = 0; i < _this.infoData.length; i++) {
  22316. if(_this.infoData[i].fileid){
  22317. fileid.push(_this.infoData[i].fileid)
  22318. }else {
  22319. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22320. if(_fileid){
  22321. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22322. _this.$forceUpdate();
  22323. if(_fileid != 1){
  22324. fileid.push(_fileid)
  22325. }
  22326. }
  22327. }
  22328. }
  22329. }
  22330. let url = []
  22331. if (this.infoData.length) {
  22332. for (var i = 0; i < this.infoData.length; i++) {
  22333. url.push(this.infoData[i].url)
  22334. }
  22335. }
  22336. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22337. let messages = `NOTICE
  22338. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22339. Language: ${this.getLang()}
  22340. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22341. Instruction: Based on the context, follow "Format example", write content.
  22342. #Context
  22343. ## 要求
  22344. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  22345. ## 参考信息
  22346. 课程名字:${_this.courseName}
  22347. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22348. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22349. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22350. # Format example
  22351. 子任务名称:名称应该总结了该任务是在做什么,
  22352. 子任务设计:任务设计。
  22353. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  22354. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  22355. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  22356. `
  22357. // 教学目标:教学目标。
  22358. // 任务设计:任务设计。
  22359. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22360. // -------- #补充参考资料和
  22361. // ## 补充参考资料
  22362. // - 补充资料:${url.join(",")}
  22363. // - 补充描述:${_this.courseText2}
  22364. _this.taskDetailLoading.push(_tindex)
  22365. _this.ttaskDetailLoading.push(_tindex)
  22366. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22367. let _uuid = uuidv4();
  22368. // let params = JSON.stringify({
  22369. // // "model": "Chat",
  22370. // model: 'gpt-3.5-turbo',
  22371. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22372. // max_tokens: 4096,
  22373. // top_p: 1,
  22374. // frequency_penalty: 0,
  22375. // presence_penalty: 0,
  22376. // messages: [{
  22377. // content: messages,
  22378. // role: 'user'
  22379. // }],
  22380. // uid: _uuid,
  22381. // mind_map_question: "",
  22382. // })
  22383. let params = {
  22384. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22385. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22386. session_name: _uuid,
  22387. userId: _this.userid,
  22388. uid: _uuid,
  22389. file_ids: fileid.length ? [...fileid] : '',
  22390. model: 'gpt-4o-2024-11-20',
  22391. temperature: this.mode == 3 ? 0.5 : 0.1,
  22392. }
  22393. // let params = JSON.stringify({
  22394. // message: {
  22395. // anthropic_version: "bedrock-2023-05-31",
  22396. // max_tokens: 4096,
  22397. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22398. // top_p: 1,
  22399. // messages: [{
  22400. // "role": "user",
  22401. // "content": messages
  22402. // }] ,
  22403. // },
  22404. // uid: _uuid,
  22405. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22406. // });
  22407. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22408. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22409. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22410. console.log(response);
  22411. // let data = response.data.FunctionResponse
  22412. // if (data.choices && data.choices.length && data.choices[0].message) {
  22413. // console.log(data.choices[0].message.content);
  22414. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22415. // _this.$forceUpdate()
  22416. // }
  22417. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22418. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22419. } else {
  22420. _this.$message.warning(response.data.FunctionResponse.result);
  22421. }
  22422. _this.isOutlineTaskCancelToken[index] = null
  22423. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22424. }).catch(function (error) {
  22425. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22426. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22427. _this.isOutlineTaskCancelToken[index] = null
  22428. if(error && error.message != 'Request canceled by the user.'){
  22429. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22430. }
  22431. console.log(error);
  22432. });
  22433. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22434. },
  22435. async aiOutlineDetail2(msg, index) {
  22436. let _this = this
  22437. const _tindex = 'task-' + index
  22438. const _tindex2 = index
  22439. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22440. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22441. if (_this.infoData.length) {
  22442. for (var i = 0; i < _this.infoData.length; i++) {
  22443. if(_this.infoData[i].fileid){
  22444. fileid.push(_this.infoData[i].fileid)
  22445. }else {
  22446. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22447. if(_fileid){
  22448. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22449. _this.$forceUpdate();
  22450. if(_fileid != 1){
  22451. fileid.push(_fileid)
  22452. }
  22453. }
  22454. }
  22455. }
  22456. }
  22457. let url = []
  22458. if (this.infoData.length) {
  22459. for (var i = 0; i < this.infoData.length; i++) {
  22460. url.push(this.infoData[i].url)
  22461. }
  22462. }
  22463. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  22464. let taskArray = []
  22465. let taskArrayD = []
  22466. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  22467. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  22468. if(k != index){
  22469. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  22470. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  22471. }
  22472. }
  22473. let messages = `NOTICE
  22474. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  22475. Language: ${this.getLang()}
  22476. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22477. Instruction: Based on the context, follow "Format example", write content.
  22478. #Context
  22479. ## 要求
  22480. ${msg}
  22481. ## 参考信息
  22482. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22483. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  22484. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22485. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  22486. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  22487. # Format example
  22488. **子任务标题**:环节+子任务名称
  22489. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  22490. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  22491. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  22492. `
  22493. // 教学目标:教学目标。
  22494. // 任务设计:任务设计。
  22495. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  22496. // -------- #补充参考资料和
  22497. // ## 补充参考资料
  22498. // - 补充资料:${url.join(",")}
  22499. // - 补充描述:${_this.courseText2}
  22500. _this.taskDetailLoading.push(_tindex)
  22501. _this.ttaskDetailLoading.push(_tindex)
  22502. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  22503. let _uuid = uuidv4();
  22504. // let params = JSON.stringify({
  22505. // // "model": "Chat",
  22506. // model: 'gpt-3.5-turbo',
  22507. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22508. // max_tokens: 4096,
  22509. // top_p: 1,
  22510. // frequency_penalty: 0,
  22511. // presence_penalty: 0,
  22512. // messages: [{
  22513. // content: messages,
  22514. // role: 'user'
  22515. // }],
  22516. // uid: _uuid,
  22517. // mind_map_question: "",
  22518. // })
  22519. let params = {
  22520. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22521. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  22522. session_name: _uuid,
  22523. userId: _this.userid,
  22524. uid: _uuid,
  22525. file_ids: fileid.length ? [...fileid] : '',
  22526. model: 'gpt-4o-2024-11-20',
  22527. temperature: this.mode == 3 ? 0.5 : 0.1,
  22528. }
  22529. // let params = JSON.stringify({
  22530. // message: {
  22531. // anthropic_version: "bedrock-2023-05-31",
  22532. // max_tokens: 4096,
  22533. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22534. // top_p: 1,
  22535. // messages: [{
  22536. // "role": "user",
  22537. // "content": messages
  22538. // }] ,
  22539. // },
  22540. // uid: _uuid,
  22541. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22542. // });
  22543. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22544. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  22545. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22546. console.log(response);
  22547. // let data = response.data.FunctionResponse
  22548. // if (data.choices && data.choices.length && data.choices[0].message) {
  22549. // console.log(data.choices[0].message.content);
  22550. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  22551. // _this.$forceUpdate()
  22552. // }
  22553. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22554. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  22555. } else {
  22556. _this.$message.warning(response.data.FunctionResponse.result);
  22557. }
  22558. _this.isOutlineTaskCancelToken[index] = null
  22559. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22560. }).catch(function (error) {
  22561. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22562. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  22563. _this.isOutlineTaskCancelToken[index] = null
  22564. if(error && error.message != 'Request canceled by the user.'){
  22565. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22566. }
  22567. console.log(error);
  22568. });
  22569. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  22570. },
  22571. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  22572. try {
  22573. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22574. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22575. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22576. } catch(error) {
  22577. console.log('EventSource error:', error);
  22578. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22579. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22580. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22581. this.isOutlineTaskCancelToken[_tindex2] = null
  22582. return;
  22583. }
  22584. let _allText = "";
  22585. let _mdText = "";
  22586. let _iindex = 0
  22587. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  22588. let _eData = JSON.parse(_e.data).content;
  22589. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22590. //对话已经完成
  22591. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22592. this.isOutlineTaskCancelSource[_tindex2].close();
  22593. this.isOutlineTaskCancelSource[_tindex2] = null;
  22594. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22595. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  22596. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  22597. }
  22598. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22599. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  22600. this.isOutlineTaskCancelToken[_tindex2] = null
  22601. return;
  22602. } else {
  22603. _iindex++
  22604. //对话还在继续
  22605. let _text = "";
  22606. _text = _eData.replaceAll("'", "");
  22607. if (_allText == "") {
  22608. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22609. } else {
  22610. _allText += _text;
  22611. }
  22612. _mdText = _allText + "_";
  22613. _mdText = _mdText.replace(/\\n/g, "\n");
  22614. _mdText = _mdText.replace(/\\/g, "");
  22615. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22616. //转化返回的回复流数据.
  22617. if(_iindex == 10){
  22618. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  22619. _iindex = 0
  22620. }
  22621. if(this.taskDetailLoading.indexOf(loading) !== -1){
  22622. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  22623. }
  22624. // 处理流数据
  22625. }
  22626. // this.$forceUpdate();
  22627. };
  22628. let _this = this
  22629. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  22630. // 处理错误,可以尝试重新连接
  22631. console.log('EventSource error:', event);
  22632. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22633. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  22634. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  22635. _this.isOutlineTaskCancelToken[_tindex2] = null
  22636. _this.isOutlineTaskCancelSource[_tindex2].close();
  22637. _this.isOutlineTaskCancelSource[_tindex2] = null;
  22638. };
  22639. },
  22640. async aiDetail2(msg, index) {
  22641. let _this = this
  22642. const _tindex = 'task-' + index
  22643. const _tindex2 = index
  22644. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22645. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22646. if (_this.infoData.length) {
  22647. for (var i = 0; i < _this.infoData.length; i++) {
  22648. if(_this.infoData[i].fileid){
  22649. fileid.push(_this.infoData[i].fileid)
  22650. }else {
  22651. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22652. if(_fileid){
  22653. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22654. _this.$forceUpdate();
  22655. if(_fileid != 1){
  22656. fileid.push(_fileid)
  22657. }
  22658. }
  22659. }
  22660. }
  22661. }
  22662. let messages = `NOTICE
  22663. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22664. Language: ${this.getLang()}
  22665. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22666. Instruction: Based on the context, follow "Format example", write content.
  22667. #Context
  22668. ## 要求
  22669. ${msg}
  22670. ## 参考资料
  22671. 任务名字: ${_this.aiCallBack.task}
  22672. ## 优化信息
  22673. ${_this.aiCallBack.taskDetail}
  22674. # Format example
  22675. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  22676. _this.taskDetailLoading2.push(_tindex)
  22677. _this.ttaskDetailLoading2.push(_tindex)
  22678. let _uuid = uuidv4();
  22679. // let params = JSON.stringify({
  22680. // // "model": "Chat",
  22681. // model: 'gpt-3.5-turbo',
  22682. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22683. // max_tokens: 4096,
  22684. // top_p: 1,
  22685. // frequency_penalty: 0,
  22686. // presence_penalty: 0,
  22687. // messages: [{
  22688. // content: messages,
  22689. // role: 'user'
  22690. // }],
  22691. // uid: _uuid,
  22692. // mind_map_question: "",
  22693. // })
  22694. let params = {
  22695. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22696. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  22697. session_name: _uuid,
  22698. userId: _this.userid,
  22699. uid: _uuid,
  22700. file_ids: fileid.length ? [...fileid] : '',
  22701. model: 'gpt-4o-2024-11-20',
  22702. temperature: this.mode == 3 ? 0.5 : 0.1,
  22703. }
  22704. // let params = JSON.stringify({
  22705. // message: {
  22706. // anthropic_version: "bedrock-2023-05-31",
  22707. // max_tokens: 4096,
  22708. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22709. // top_p: 1,
  22710. // messages: [{
  22711. // "role": "user",
  22712. // "content": messages
  22713. // }] ,
  22714. // },
  22715. // uid: _uuid,
  22716. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22717. // });
  22718. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22719. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22720. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22721. console.log(response);
  22722. // let data = response.data.FunctionResponse
  22723. // if (data.choices && data.choices.length && data.choices[0].message) {
  22724. // console.log(data.choices[0].message.content);
  22725. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22726. // _this.$forceUpdate()
  22727. // }
  22728. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22729. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22730. } else {
  22731. _this.$message.warning(response.data.FunctionResponse.result);
  22732. }
  22733. }).catch(function (error) {
  22734. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  22735. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  22736. if(error && error.message != 'Request canceled by the user.'){
  22737. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22738. }
  22739. console.log(error);
  22740. });
  22741. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  22742. },
  22743. aiDetail2getAiContent(_uid, loading, _tindex2) {
  22744. let _source;
  22745. try {
  22746. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22747. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22748. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22749. } catch(error) {
  22750. console.log('EventSource error:', error);
  22751. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22752. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22753. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22754. return;
  22755. }
  22756. let _allText = "";
  22757. let _mdText = "";
  22758. let _iindex = 0
  22759. _source.onmessage = _e => {
  22760. let _eData = JSON.parse(_e.data).content;
  22761. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22762. //对话已经完成
  22763. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22764. _source.close();
  22765. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22766. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22767. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22768. return;
  22769. } else {
  22770. _iindex++
  22771. //对话还在继续
  22772. let _text = "";
  22773. _text = _eData.replaceAll("'", "");
  22774. if (_allText == "") {
  22775. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22776. } else {
  22777. _allText += _text;
  22778. }
  22779. _mdText = _allText + "_";
  22780. _mdText = _mdText.replace(/\\n/g, "\n");
  22781. _mdText = _mdText.replace(/\\/g, "");
  22782. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22783. //转化返回的回复流数据
  22784. if(_iindex == 10){
  22785. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22786. _iindex = 0
  22787. }
  22788. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22789. // 处理流数据
  22790. }
  22791. // this.$forceUpdate();
  22792. };
  22793. let _this = this
  22794. _source.onerror = function(event) {
  22795. // 处理错误,可以尝试重新连接
  22796. console.log('EventSource error:', event);
  22797. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22798. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  22799. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  22800. _source.close();
  22801. };
  22802. },
  22803. async aiDetail3(msg, index, tindex) {
  22804. let _this = this
  22805. const _tindex = 'task-' + index + tindex
  22806. const _tindex2 = index
  22807. const _tindex3 = tindex
  22808. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22809. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22810. if (_this.infoData.length) {
  22811. for (var i = 0; i < _this.infoData.length; i++) {
  22812. if(_this.infoData[i].fileid){
  22813. fileid.push(_this.infoData[i].fileid)
  22814. }else {
  22815. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22816. if(_fileid){
  22817. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22818. _this.$forceUpdate();
  22819. if(_fileid != 1){
  22820. fileid.push(_fileid)
  22821. }
  22822. }
  22823. }
  22824. }
  22825. }
  22826. // **重点考虑该任务及工具名和工具内容的情况下*
  22827. let messages = `NOTICE
  22828. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22829. Language: ${this.getLang()}
  22830. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22831. Instruction: Based on the context, follow "Format example", write content.
  22832. #Context
  22833. ## 参考内容
  22834. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22835. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22836. 工具名称:${_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 : '无'}
  22837. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  22838. ## 要求
  22839. ${msg} 输出格式和内容要求参考#格式与要求
  22840. # Format example
  22841. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  22842. _this.taskDetailLoading3.push(_tindex)
  22843. _this.ttaskDetailLoading3.push(_tindex)
  22844. let _uuid = uuidv4();
  22845. // let params = JSON.stringify({
  22846. // // "model": "Chat",
  22847. // model: 'gpt-3.5-turbo',
  22848. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22849. // max_tokens: 4096,
  22850. // top_p: 1,
  22851. // frequency_penalty: 0,
  22852. // presence_penalty: 0,
  22853. // messages: [{
  22854. // content: messages,
  22855. // role: 'user'
  22856. // }],
  22857. // uid: _uuid,
  22858. // mind_map_question: "",
  22859. // })
  22860. let params = {
  22861. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22862. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22863. session_name: _uuid,
  22864. userId: _this.userid,
  22865. uid: _uuid,
  22866. file_ids: fileid.length ? [...fileid] : '',
  22867. model: 'gpt-4o-2024-11-20',
  22868. temperature: this.mode == 3 ? 0.5 : 0.1,
  22869. }
  22870. // let params = JSON.stringify({
  22871. // message: {
  22872. // anthropic_version: "bedrock-2023-05-31",
  22873. // max_tokens: 4096,
  22874. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22875. // top_p: 1,
  22876. // messages: [{
  22877. // "role": "user",
  22878. // "content": messages
  22879. // }] ,
  22880. // },
  22881. // uid: _uuid,
  22882. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22883. // });
  22884. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22885. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22886. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22887. console.log(response);
  22888. let data = response.data.FunctionResponse
  22889. // if (data.choices && data.choices.length && data.choices[0].message) {
  22890. // console.log(data.choices[0].message.content);
  22891. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  22892. // _this.$forceUpdate()
  22893. // }
  22894. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  22895. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22896. } else {
  22897. _this.$message.warning(response.data.FunctionResponse.result);
  22898. }
  22899. }).catch(function (error) {
  22900. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  22901. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  22902. if(error && error.message != 'Request canceled by the user.'){
  22903. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22904. }
  22905. console.log(error);
  22906. });
  22907. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  22908. },
  22909. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  22910. let _source;
  22911. try {
  22912. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22913. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22914. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22915. } catch(error) {
  22916. console.log('EventSource error:', event);
  22917. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22918. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22919. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  22920. return;
  22921. }
  22922. let _allText = "";
  22923. let _mdText = "";
  22924. let _iindex = 0
  22925. _source.onmessage = _e => {
  22926. let _eData = JSON.parse(_e.data).content;
  22927. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22928. //对话已经完成
  22929. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22930. _source.close();
  22931. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  22932. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22933. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  22934. return;
  22935. } else {
  22936. _iindex++
  22937. //对话还在继续
  22938. let _text = "";
  22939. _text = _eData.replaceAll("'", "");
  22940. if (_allText == "") {
  22941. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22942. } else {
  22943. _allText += _text;
  22944. }
  22945. _mdText = _allText + "_";
  22946. _mdText = _mdText.replace(/\\n/g, "\n");
  22947. _mdText = _mdText.replace(/\\/g, "");
  22948. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22949. //转化返回的回复流数据
  22950. if(_iindex == 10){
  22951. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  22952. _iindex = 0
  22953. }
  22954. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22955. // 处理流数据
  22956. }
  22957. // this.$forceUpdate();
  22958. };
  22959. let _this = this
  22960. _source.onerror = function(event) {
  22961. // 处理错误,可以尝试重新连接
  22962. console.log('EventSource error:', event);
  22963. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22964. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  22965. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  22966. _source.close();
  22967. };
  22968. },
  22969. async aiDetail4(msg, index) {
  22970. if (!msg.length) {
  22971. this.$message.error("请添加评价后才能优化")
  22972. return
  22973. }
  22974. let _this = this
  22975. const _tindex = 'task-' + index
  22976. const _tindex2 = index
  22977. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22978. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22979. if (_this.infoData.length) {
  22980. for (var i = 0; i < _this.infoData.length; i++) {
  22981. if(_this.infoData[i].fileid){
  22982. fileid.push(_this.infoData[i].fileid)
  22983. }else {
  22984. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22985. if(_fileid){
  22986. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22987. _this.$forceUpdate();
  22988. if(_fileid != 1){
  22989. fileid.push(_fileid)
  22990. }
  22991. }
  22992. }
  22993. }
  22994. }
  22995. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  22996. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  22997. if(_this.pingjiaInfoData[index][i].fileid){
  22998. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  22999. }
  23000. }
  23001. }
  23002. var _text = ""
  23003. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  23004. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  23005. // _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 : ''} `
  23006. _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 : ''} `
  23007. }
  23008. }
  23009. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  23010. // **重点考虑该任务详情**
  23011. // let messages = `
  23012. // Language: ${this.getLang()}
  23013. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23014. // #Context
  23015. // ## 参考内容
  23016. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23017. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23018. // 评价设计:${_text}
  23019. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23020. // ## 要求
  23021. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  23022. // # 格式与要求
  23023. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  23024. // # Format example
  23025. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  23026. let messages = `
  23027. Language: ${this.getLang()}
  23028. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23029. #Context
  23030. ## 参考内容
  23031. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23032. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  23033. ${_text ? '评价设计:'+_text : ''}
  23034. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  23035. ## 要求
  23036. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  23037. # 格式与要求
  23038. 核心素养:从教案中提取
  23039. 目标:从教案中提取
  23040. 评价标准:从教案中提取评价标准
  23041. # Format example
  23042. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  23043. _this.taskDetailLoading4.push(_tindex)
  23044. // let params = JSON.stringify({
  23045. // // "model": "Chat",
  23046. // model: 'gpt-3.5-turbo',
  23047. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23048. // max_tokens: 4096,
  23049. // top_p: 1,
  23050. // frequency_penalty: 0,
  23051. // presence_penalty: 0,
  23052. // messages: [{
  23053. // content: messages,
  23054. // role: 'user'
  23055. // }],
  23056. // stream: false,
  23057. // uid: this.userid,
  23058. // mind_map_question: "",
  23059. // })
  23060. let params = {
  23061. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  23062. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23063. session_name: uuidv4(),
  23064. userId: _this.userid,
  23065. file_ids: fileid.length ? [...fileid] : '',
  23066. model: 'gpt-4o-2024-11-20',
  23067. temperature: this.mode == 3 ? 0.5 : 0.1,
  23068. }
  23069. // let params = JSON.stringify({
  23070. // message: {
  23071. // anthropic_version: "bedrock-2023-05-31",
  23072. // max_tokens: 4096,
  23073. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23074. // top_p: 1,
  23075. // messages: [{
  23076. // content: messages,
  23077. // role: 'user'
  23078. // }], //
  23079. // },
  23080. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23081. // });
  23082. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23083. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  23084. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  23085. console.log(response);
  23086. let data = response.data.FunctionResponse
  23087. // if (data.choices && data.choices.length && data.choices[0].message) {
  23088. // console.log(data.choices[0].message.content);
  23089. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  23090. // _this.$forceUpdate()
  23091. // }
  23092. if (data.message) {
  23093. console.log(data.message);
  23094. try {
  23095. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  23096. } catch (e) {
  23097. console.log("error_________________" + e);
  23098. // _this.$message.error(data.message)
  23099. try {
  23100. let regex = new RegExp(/```json([\s\S]*?)```/);
  23101. let match = data.message.match(regex);
  23102. let elist = JSON.parse(match[1])
  23103. elist = elist.filter(el=>{
  23104. el.isai = 1
  23105. return el
  23106. })
  23107. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  23108. // var message = data.message;
  23109. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  23110. // var jsonEnd = message.indexOf("```", jsonStart);
  23111. // if (jsonStart !== -1 && jsonEnd !== -1) {
  23112. // var jsonString = message
  23113. // .substring(jsonStart, jsonEnd)
  23114. // .trim();
  23115. // var _data2 = JSON.parse(jsonString);
  23116. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  23117. // }
  23118. } catch (error) {
  23119. }
  23120. }
  23121. _this.$forceUpdate()
  23122. }
  23123. // if (data.result) {
  23124. // console.log(data.result);
  23125. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  23126. // _this.$forceUpdate()
  23127. // }
  23128. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23129. }).catch(function (error) {
  23130. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23131. if(error && error.message != 'Request canceled by the user.'){
  23132. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23133. }
  23134. console.log(error);
  23135. });
  23136. },
  23137. async aiDetail5(msg, index) {
  23138. let _this = this
  23139. const _tindex = 'task-' + index
  23140. const _tindex2 = index
  23141. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23142. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23143. if (_this.infoData.length) {
  23144. for (var i = 0; i < _this.infoData.length; i++) {
  23145. if(_this.infoData[i].fileid){
  23146. fileid.push(_this.infoData[i].fileid)
  23147. }else {
  23148. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23149. if(_fileid){
  23150. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23151. _this.$forceUpdate();
  23152. if(_fileid != 1){
  23153. fileid.push(_fileid)
  23154. }
  23155. }
  23156. }
  23157. }
  23158. }
  23159. let url = []
  23160. if (this.infoData.length) {
  23161. for (var i = 0; i < this.infoData.length; i++) {
  23162. url.push(this.infoData[i].url)
  23163. }
  23164. }
  23165. var _text = ""
  23166. var _text2 = ""
  23167. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  23168. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23169. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  23170. }
  23171. let messages = `
  23172. Language: ${this.getLang()}
  23173. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  23174. --------
  23175. ## 要求
  23176. ${msg}
  23177. -------
  23178. ## 本教案描述
  23179. ${_this.aiCallBack}
  23180. -------
  23181. ## 课程大纲
  23182. ${_text}
  23183. -------
  23184. ## 其他教学任务教案
  23185. ${_text2}`
  23186. // ## 补充参考资料
  23187. // - 补充资料:${url.join(",")}
  23188. // - 补充描述:${this.courseText2}
  23189. _this.taskDetailLoading5.push(_tindex)
  23190. _this.ttaskDetailLoading5.push(_tindex)
  23191. let _uuid = uuidv4();
  23192. // let params = JSON.stringify({
  23193. // // "model": "Chat",
  23194. // model: 'gpt-3.5-turbo',
  23195. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23196. // max_tokens: 4096,
  23197. // top_p: 1,
  23198. // frequency_penalty: 0,
  23199. // presence_penalty: 0,
  23200. // messages: [{
  23201. // content: messages,
  23202. // role: 'user'
  23203. // }],
  23204. // uid: _uuid,
  23205. // mind_map_question: "",
  23206. // })
  23207. let params = {
  23208. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23209. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23210. session_name: _uuid,
  23211. userId: _this.userid,
  23212. uid: _uuid,
  23213. file_ids: fileid.length ? [...fileid] : '',
  23214. model: 'gpt-4o-2024-11-20',
  23215. temperature: this.mode == 3 ? 0.5 : 0.1,
  23216. }
  23217. // let params = JSON.stringify({
  23218. // message: {
  23219. // anthropic_version: "bedrock-2023-05-31",
  23220. // max_tokens: 4096,
  23221. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23222. // top_p: 1,
  23223. // messages: [{
  23224. // "role": "user",
  23225. // "content": messages
  23226. // }] ,
  23227. // },
  23228. // uid: _uuid,
  23229. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23230. // });
  23231. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23232. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23233. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23234. console.log(response);
  23235. // let data = response.data.FunctionResponse
  23236. // if (data.choices && data.choices.length && data.choices[0].message) {
  23237. // console.log(data.choices[0].message.content);
  23238. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23239. // _this.$forceUpdate()
  23240. // }
  23241. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23242. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23243. } else {
  23244. _this.$message.warning(response.data.FunctionResponse.result);
  23245. }
  23246. }).catch(function (error) {
  23247. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23248. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23249. }
  23250. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23251. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23252. }
  23253. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23254. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23255. if(error && error.message != 'Request canceled by the user.'){
  23256. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23257. }
  23258. console.log(error);
  23259. });
  23260. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  23261. },
  23262. aiDetail5getAiContent(_uid, loading, _tindex2) {
  23263. let _source;
  23264. try {
  23265. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23266. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23267. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23268. } catch(error){
  23269. console.log('EventSource error:', error);
  23270. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23271. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23272. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23273. }
  23274. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23275. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23276. }
  23277. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23278. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23279. return;
  23280. }
  23281. let _allText = "";
  23282. let _mdText = "";
  23283. let _iindex = 0
  23284. _source.onmessage = _e => {
  23285. let _eData = JSON.parse(_e.data).content;
  23286. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23287. //对话已经完成
  23288. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23289. _source.close();
  23290. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23291. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23292. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23293. }
  23294. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23295. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23296. }
  23297. return;
  23298. } else {
  23299. _iindex++
  23300. //对话还在继续
  23301. let _text = "";
  23302. _text = _eData.replaceAll("'", "");
  23303. if (_allText == "") {
  23304. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23305. } else {
  23306. _allText += _text;
  23307. }
  23308. _mdText = _allText + "_";
  23309. _mdText = _mdText.replace(/\\n/g, "\n");
  23310. _mdText = _mdText.replace(/\\/g, "");
  23311. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23312. //转化返回的回复流数据
  23313. if(_iindex == 10){
  23314. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23315. _iindex = 0
  23316. }
  23317. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23318. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23319. }
  23320. // 处理流数据
  23321. }
  23322. // this.$forceUpdate();
  23323. };
  23324. let _this = this
  23325. _source.onerror = function(event) {
  23326. // 处理错误,可以尝试重新连接
  23327. console.log('EventSource error:', event);
  23328. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23329. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23330. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23331. }
  23332. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23333. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23334. }
  23335. _source.close();
  23336. };
  23337. },
  23338. async aiDetail52(msg, index, callback) {
  23339. let _this = this
  23340. const _tindex = 'task-' + index
  23341. const _tindex2 = index
  23342. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23343. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23344. if (_this.infoData.length) {
  23345. for (var i = 0; i < _this.infoData.length; i++) {
  23346. if(_this.infoData[i].fileid){
  23347. fileid.push(_this.infoData[i].fileid)
  23348. }else {
  23349. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23350. if(_fileid){
  23351. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23352. _this.$forceUpdate();
  23353. if(_fileid != 1){
  23354. fileid.push(_fileid)
  23355. }
  23356. }
  23357. }
  23358. }
  23359. }
  23360. let url = []
  23361. if (this.infoData.length) {
  23362. for (var i = 0; i < this.infoData.length; i++) {
  23363. url.push(this.infoData[i].url)
  23364. }
  23365. }
  23366. let taskN = []
  23367. let taskD = []
  23368. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  23369. if(_tindex2 != ti){
  23370. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  23371. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  23372. }
  23373. }
  23374. let messages = `NOTICE
  23375. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23376. Language: ${this.getLang()}
  23377. ATTENTION: follow "Language"
  23378. #Context
  23379. ## 要求
  23380. ${msg}
  23381. ## 补充描述
  23382. 课程简要描述:${_this.courseText}
  23383. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  23384. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  23385. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  23386. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23387. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  23388. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23389. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23390. `
  23391. // ## 补充参考资料
  23392. // - 补充资料:${url.join(",")}
  23393. // - 补充描述:${this.courseText2}
  23394. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  23395. _this.taskDetailLoading5.push(_tindex)
  23396. }
  23397. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  23398. _this.ttaskDetailLoading5.push(_tindex)
  23399. }
  23400. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  23401. let _uuid = uuidv4();
  23402. // let params = JSON.stringify({
  23403. // // "model": "Chat",
  23404. // model: 'gpt-3.5-turbo',
  23405. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23406. // max_tokens: 4096,
  23407. // top_p: 1,
  23408. // frequency_penalty: 0,
  23409. // presence_penalty: 0,
  23410. // messages: [{
  23411. // content: messages,
  23412. // role: 'user'
  23413. // }],
  23414. // uid: _uuid,
  23415. // mind_map_question: "",
  23416. // })
  23417. let params = {
  23418. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23419. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23420. session_name: _uuid,
  23421. userId: _this.userid,
  23422. uid: _uuid,
  23423. file_ids: fileid.length ? [...fileid] : '',
  23424. model: 'gpt-4o-2024-11-20',
  23425. temperature: this.mode == 3 ? 0.5 : 0.1,
  23426. }
  23427. // let params = JSON.stringify({
  23428. // message: {
  23429. // anthropic_version: "bedrock-2023-05-31",
  23430. // max_tokens: 4096,
  23431. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23432. // top_p: 1,
  23433. // messages: [{
  23434. // "role": "user",
  23435. // "content": messages
  23436. // }] ,
  23437. // },
  23438. // uid: _uuid,
  23439. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23440. // });
  23441. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23442. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  23443. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23444. console.log(response);
  23445. // let data = response.data.FunctionResponse
  23446. // if (data.choices && data.choices.length && data.choices[0].message) {
  23447. // console.log(data.choices[0].message.content);
  23448. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23449. // _this.$forceUpdate()
  23450. // }
  23451. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23452. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23453. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  23454. } else {
  23455. _this.$message.warning(response.data.FunctionResponse.result);
  23456. }
  23457. _this.isTeacherTaskCancelToken2[index] = null
  23458. }).catch(function (error) {
  23459. if(error && error.message != 'Request canceled by the user.'){
  23460. _this.isTeacherTaskCancelToken2[index] = null
  23461. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  23462. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23463. }
  23464. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  23465. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23466. }
  23467. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  23468. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  23469. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23470. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23471. confirmButtonText: "确定",
  23472. cancelButtonText: "取消",
  23473. distinguishCancelAndClose: true,
  23474. type: "warning",
  23475. customClass: 'custom-confirm-box'
  23476. })
  23477. .then(() => {
  23478. _this.aiDetail52(msg, index, callback)
  23479. }).catch((v) => {
  23480. console.log(v);
  23481. callback ? callback() : ''
  23482. })
  23483. setTimeout(() => {
  23484. _this.setTipsIndex()
  23485. }, 500)
  23486. }
  23487. console.log(error);
  23488. });
  23489. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  23490. },
  23491. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  23492. try {
  23493. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23494. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23495. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23496. } catch(error) {
  23497. console.log('EventSource error:', error);
  23498. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23499. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23500. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23501. }
  23502. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23503. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23504. }
  23505. this.isTeacherTaskCancelToken2[_tindex2] = null
  23506. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23507. confirmButtonText: "确定",
  23508. cancelButtonText: "取消",
  23509. distinguishCancelAndClose: true,
  23510. type: "warning",
  23511. customClass: 'custom-confirm-box'
  23512. })
  23513. .then(() => {
  23514. _this.aiDetail52(msg, _tindex2, callback)
  23515. }).catch((v) => {
  23516. console.log(v);
  23517. callback ? callback() : ''
  23518. })
  23519. setTimeout(() => {
  23520. _this.setTipsIndex()
  23521. }, 500)
  23522. return;
  23523. }
  23524. let _allText = "";
  23525. let _mdText = "";
  23526. this.allTextArray[_tindex2] = ""
  23527. let _iindex = 0
  23528. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  23529. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  23530. let _eData = JSON.parse(_e.data).content;
  23531. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23532. //对话已经完成
  23533. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23534. this.isTeacherTaskCancelSource[_tindex2].close();
  23535. this.isTeacherTaskCancelSource[_tindex2] = null;
  23536. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23537. if(this.taskDetailLoading5.indexOf(loading) != -1){
  23538. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23539. }
  23540. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  23541. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23542. }
  23543. this.isTeacherTaskCancelToken2[_tindex2] = null
  23544. callback ? callback() : ''
  23545. // this.createTeacherAn(_tindex2, 2);
  23546. this.saveCourse()
  23547. return;
  23548. } else {
  23549. _iindex++
  23550. //对话还在继续
  23551. let _text = "";
  23552. _text = _eData.replaceAll("'", "");
  23553. if (_allText == "") {
  23554. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23555. } else {
  23556. _allText += _text;
  23557. }
  23558. _mdText = _allText + "_";
  23559. _mdText = _mdText.replace(/\\n/g, "\n");
  23560. _mdText = _mdText.replace(/\\/g, "");
  23561. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23562. //转化返回的回复流数据
  23563. if(_iindex == 10){
  23564. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  23565. _iindex = 0
  23566. }
  23567. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  23568. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23569. }
  23570. // 处理流数据
  23571. }
  23572. };
  23573. let _this = this
  23574. _this.isTeacherTaskCancelSource.onerror = function(event) {
  23575. // 处理错误,可以尝试重新连接
  23576. console.log('EventSource error:', event);
  23577. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23578. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  23579. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  23580. }
  23581. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  23582. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  23583. }
  23584. _this.isTeacherTaskCancelSource[_tindex2].close();
  23585. _this.isTeacherTaskCancelSource[_tindex2] = null;
  23586. _this.isTeacherTaskCancelToken2[_tindex2] = null
  23587. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  23588. confirmButtonText: "确定",
  23589. cancelButtonText: "取消",
  23590. distinguishCancelAndClose: true,
  23591. type: "warning",
  23592. customClass: 'custom-confirm-box'
  23593. })
  23594. .then(() => {
  23595. _this.aiDetail52(msg, _tindex2, callback)
  23596. }).catch((v) => {
  23597. console.log(v);
  23598. callback ? callback() : ''
  23599. })
  23600. setTimeout(() => {
  23601. _this.setTipsIndex()
  23602. }, 500)
  23603. };
  23604. },
  23605. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  23606. let _mdText = "";
  23607. let _eData = JSON.parse(_e.data).content;
  23608. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23609. //对话已经完成
  23610. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23611. _source.close();
  23612. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23613. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  23614. return;
  23615. } else {
  23616. //对话还在继续
  23617. let _text = "";
  23618. _text = _eData.replaceAll("'", "");
  23619. if (this.allTextArray[_tindex2] == "") {
  23620. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23621. } else {
  23622. this.allTextArray[_tindex2] += _text;
  23623. }
  23624. _mdText = this.allTextArray[_tindex2] + "_";
  23625. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  23626. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  23627. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  23628. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  23629. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  23630. // 处理流数据
  23631. }
  23632. },
  23633. async aiCpote(msg, callback) {
  23634. let _this = this
  23635. let _index = _this.aitype.replace("aiC","c")
  23636. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23637. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23638. if (_this.infoData.length) {
  23639. for (var i = 0; i < _this.infoData.length; i++) {
  23640. if(_this.infoData[i].fileid){
  23641. fileid.push(_this.infoData[i].fileid)
  23642. }else {
  23643. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23644. if(_fileid){
  23645. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23646. _this.$forceUpdate();
  23647. if(_fileid != 1){
  23648. fileid.push(_fileid)
  23649. }
  23650. }
  23651. }
  23652. }
  23653. }
  23654. let sub = []
  23655. if (this.courseTypeId.length) {
  23656. for (var i = 0; i < this.courseTypeId.length; i++) {
  23657. let _sid = this.courseTypeId[i]
  23658. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23659. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23660. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23661. }
  23662. }
  23663. }
  23664. }
  23665. let mclass = []
  23666. if (this.courseTypeId.length) {
  23667. for (var i = 0; i < this.courseTypeId.length; i++) {
  23668. let _sid = this.courseTypeId[i]
  23669. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23670. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23671. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23672. }
  23673. }
  23674. }
  23675. }
  23676. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  23677. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  23678. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  23679. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  23680. let messages = `NOTICE
  23681. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  23682. Language: ${this.getLang()}
  23683. ATTENTION: follow "Language"
  23684. ${msg}
  23685. ## 课程简介
  23686. 课程名字:${this.courseName}
  23687. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23688. ${sub.length ? '学科:' + sub.join(",") : ''}
  23689. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23690. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  23691. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  23692. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  23693. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  23694. _this.cpoteLoading[_index] = true
  23695. _this.cpotetLoading[_index] = true
  23696. let _uuid = uuidv4();
  23697. // let params = JSON.stringify({
  23698. // // "model": "Chat",
  23699. // model: 'gpt-3.5-turbo',
  23700. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23701. // max_tokens: 4096,
  23702. // top_p: 1,
  23703. // frequency_penalty: 0,
  23704. // presence_penalty: 0,
  23705. // messages: [{
  23706. // content: messages,
  23707. // role: 'user'
  23708. // }],
  23709. // uid: _uuid,
  23710. // mind_map_question: "",
  23711. // })
  23712. let params = {
  23713. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23714. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23715. session_name: _uuid,
  23716. userId: _this.userid,
  23717. uid: _uuid,
  23718. file_ids: fileid.length ? [...fileid] : '',
  23719. model: 'gpt-4o-2024-11-20',
  23720. temperature: this.mode == 3 ? 0.5 : 0.1,
  23721. }
  23722. // let params = JSON.stringify({
  23723. // message: {
  23724. // anthropic_version: "bedrock-2023-05-31",
  23725. // max_tokens: 4096,
  23726. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23727. // top_p: 1,
  23728. // messages: [{
  23729. // "role": "user",
  23730. // "content": messages
  23731. // }] ,
  23732. // },
  23733. // uid: _uuid,
  23734. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23735. // });
  23736. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23737. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23738. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23739. console.log(response);
  23740. // let data = response.data.FunctionResponse
  23741. // if (data.choices && data.choices.length && data.choices[0].message) {
  23742. // console.log(data.choices[0].message.content);
  23743. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23744. // _this.$forceUpdate()
  23745. // }
  23746. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23747. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23748. } else {
  23749. _this.$message.warning(response.data.FunctionResponse.result);
  23750. }
  23751. }).catch(function (error) {
  23752. _this.cpoteLoading[_index] = false
  23753. _this.cpotetLoading[_index] = false
  23754. callback ? callback() : ''
  23755. if(error && error.message != 'Request canceled by the user.'){
  23756. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23757. }
  23758. console.log(error);
  23759. });
  23760. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  23761. },
  23762. aiCpotegetAiContent(_uid, loading, callback) {
  23763. let _source;
  23764. try {
  23765. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23766. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23767. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23768. } catch(error){
  23769. console.log('EventSource error:', error);
  23770. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23771. this.cpoteLoading[loading] = false
  23772. this.cpotetLoading[loading] = false
  23773. return;
  23774. }
  23775. let _allText = "";
  23776. let _mdText = "";
  23777. let _iindex = 0
  23778. _source.onmessage = _e => {
  23779. let _eData = JSON.parse(_e.data).content;
  23780. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23781. //对话已经完成
  23782. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23783. _source.close();
  23784. this.cpote[loading] = _mdText;
  23785. this.cpoteLoading[loading] = false
  23786. this.cpotetLoading[loading] = false
  23787. callback ? callback() : ''
  23788. this.saveCourse()
  23789. return;
  23790. } else {
  23791. _iindex++
  23792. //对话还在继续
  23793. let _text = "";
  23794. _text = _eData.replaceAll("'", "");
  23795. if (_allText == "") {
  23796. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23797. } else {
  23798. _allText += _text;
  23799. }
  23800. _mdText = _allText + "_";
  23801. _mdText = _mdText.replace(/\\n/g, "\n");
  23802. _mdText = _mdText.replace(/\\/g, "");
  23803. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23804. //转化返回的回复流数据
  23805. if(_iindex == 10){
  23806. this.cpote[loading] = _mdText;
  23807. _iindex = 0
  23808. }
  23809. this.cpoteLoading[loading] = false
  23810. // 处理流数据
  23811. }
  23812. // this.$forceUpdate();
  23813. };
  23814. let _this = this
  23815. _source.onerror = function(event) {
  23816. // 处理错误,可以尝试重新连接
  23817. console.log('EventSource error:', event);
  23818. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23819. _this.cpoteLoading[loading] = false
  23820. _this.cpotetLoading[loading] = false
  23821. _source.close();
  23822. };
  23823. },
  23824. async aiteacherTextDetail(msg) {
  23825. let _this = this
  23826. let fileid = []
  23827. if (_this.teacherInfoData.length) {
  23828. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  23829. if(_this.teacherInfoData[i].fileid){
  23830. fileid.push(_this.teacherInfoData[i].fileid)
  23831. }else {
  23832. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  23833. if(_fileid){
  23834. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23835. _this.$forceUpdate();
  23836. if(_fileid != 1){
  23837. fileid.push(_fileid)
  23838. }
  23839. }
  23840. }
  23841. }
  23842. }
  23843. _this.teacherTextLoading = true
  23844. _this.tteacherTextLoading = true
  23845. let sub = []
  23846. if (_this.courseTypeId.length) {
  23847. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23848. let _sid = _this.courseTypeId[i]
  23849. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23850. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23851. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23852. }
  23853. }
  23854. }
  23855. }
  23856. let mclass = []
  23857. if (_this.courseTypeId.length) {
  23858. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23859. let _sid = _this.courseTypeId[i]
  23860. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23861. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23862. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23863. }
  23864. }
  23865. }
  23866. }
  23867. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  23868. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  23869. let messages = `NOTICE
  23870. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23871. Language: ${this.getLang()}
  23872. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23873. Instruction: Based on the context, follow "Format example", write content.
  23874. #Context
  23875. ## 参考资料
  23876. 课程名字:${this.courseName}
  23877. ${sub.length ? '学科:' + sub.join(",") : ''}
  23878. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23879. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  23880. ## 要求
  23881. ${msg}
  23882. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23883. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  23884. let _uuid = uuidv4();
  23885. // let params = JSON.stringify({
  23886. // // "model": "Chat",
  23887. // model: 'gpt-3.5-turbo',
  23888. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23889. // max_tokens: 4096,
  23890. // top_p: 1,
  23891. // frequency_penalty: 0,
  23892. // presence_penalty: 0,
  23893. // messages: [{
  23894. // content: messages,
  23895. // role: 'user'
  23896. // }],
  23897. // uid: _uuid,
  23898. // mind_map_question: "",
  23899. // })
  23900. let params = {
  23901. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23902. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23903. session_name: _uuid,
  23904. userId: _this.userid,
  23905. uid: _uuid,
  23906. file_ids: fileid.length ? [...fileid] : '',
  23907. model: 'gpt-4o-2024-11-20',
  23908. temperature: this.mode == 3 ? 0.5 : 0.1,
  23909. }
  23910. // let params = JSON.stringify({
  23911. // message: {
  23912. // anthropic_version: "bedrock-2023-05-31",
  23913. // max_tokens: 4096,
  23914. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23915. // top_p: 1,
  23916. // messages: [{
  23917. // "role": "user",
  23918. // "content": messages
  23919. // }] ,
  23920. // },
  23921. // uid: _uuid,
  23922. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23923. // });
  23924. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23925. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  23926. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23927. console.log(response);
  23928. // let data = response.data.FunctionResponse
  23929. // if (data.choices && data.choices.length && data.choices[0].message) {
  23930. // _this.courseText = data.choices[0].message.content
  23931. // }
  23932. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23933. } else {
  23934. _this.$message.warning(response.data.FunctionResponse.result);
  23935. }
  23936. _this.isTeacherTextCancelToken = null
  23937. }).catch(function (error) {
  23938. _this.teacherTextLoading = false
  23939. _this.tteacherTextLoading = false
  23940. _this.isTeacherTextCancelToken = null
  23941. if(error && error.message != 'Request canceled by the user.'){
  23942. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23943. }
  23944. console.log(error);
  23945. });
  23946. await _this.aiteacherTextDetailgetAiContent(_uuid)
  23947. },
  23948. aiteacherTextDetailgetAiContent(_uid) {
  23949. try {
  23950. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23951. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23952. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23953. } catch(error) {
  23954. console.log('EventSource error:', event);
  23955. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23956. this.teacherTextLoading = false
  23957. this.tteacherTextLoading = false
  23958. this.isTeacherTextCancelToken = null
  23959. return;
  23960. }
  23961. let _allText = "";
  23962. let _mdText = "";
  23963. let _iindex = 0
  23964. this.isTeacherTextCancelSource.onmessage = _e => {
  23965. let _eData = JSON.parse(_e.data).content;
  23966. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23967. //对话已经完成
  23968. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23969. this.isTeacherTextCancelSource.close();
  23970. this.isTeacherTextCancelSource = null;
  23971. this.teacherCourseText = _mdText;
  23972. this.teacherTextLoading = false
  23973. this.tteacherTextLoading = false
  23974. this.teacherCourseTextB = false
  23975. this.isTeacherTextCancelToken = null
  23976. return;
  23977. } else {
  23978. _iindex++
  23979. //对话还在继续
  23980. let _text = "";
  23981. _text = _eData.replaceAll("'", "");
  23982. if (_allText == "") {
  23983. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23984. } else {
  23985. _allText += _text;
  23986. }
  23987. _mdText = _allText + "_";
  23988. _mdText = _mdText.replace(/\\n/g, "\n");
  23989. _mdText = _mdText.replace(/\\/g, "");
  23990. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23991. //转化返回的回复流数据
  23992. if(_iindex == 10){
  23993. this.teacherCourseText = _mdText;
  23994. _iindex = 0
  23995. }
  23996. if(this.teacherTextLoading){
  23997. this.teacherTextLoading = false
  23998. }
  23999. // 处理流数据
  24000. }
  24001. // this.$forceUpdate();
  24002. };
  24003. let _this = this
  24004. this.isTeacherTextCancelSource.onerror = function(event) {
  24005. // 处理错误,可以尝试重新连接
  24006. console.log('EventSource error:', event);
  24007. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24008. _this.teacherTextLoading = false
  24009. _this.tteacherTextLoading = false
  24010. _this.isTeacherTextCancelToken = null
  24011. _this.isTeacherTextCancelSource.close();
  24012. _this.isTeacherTextCancelSource = null;
  24013. };
  24014. },
  24015. async aitargetTextDetail(msg) {
  24016. let _this = this
  24017. let fileid = []
  24018. if (_this.teacherInfoData.length) {
  24019. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  24020. if(_this.teacherInfoData[i].fileid){
  24021. fileid.push(_this.teacherInfoData[i].fileid)
  24022. }else {
  24023. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  24024. if(_fileid){
  24025. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24026. _this.$forceUpdate();
  24027. if(_fileid != 1){
  24028. fileid.push(_fileid)
  24029. }
  24030. }
  24031. }
  24032. }
  24033. }
  24034. _this.targetTextLoading = true
  24035. _this.ttargetTextLoading = true
  24036. let sub = []
  24037. if (_this.courseTypeId.length) {
  24038. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24039. let _sid = _this.courseTypeId[i]
  24040. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24041. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24042. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24043. }
  24044. }
  24045. }
  24046. }
  24047. let mclass = []
  24048. if (_this.courseTypeId.length) {
  24049. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24050. let _sid = _this.courseTypeId[i]
  24051. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24052. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24053. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24054. }
  24055. }
  24056. }
  24057. }
  24058. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  24059. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  24060. let messages = `NOTICE
  24061. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24062. Language: ${this.getLang()}
  24063. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24064. Instruction: Based on the context, follow "Format example", write content.
  24065. #Context
  24066. ## 参考资料
  24067. 课程名字:${this.courseName}
  24068. ${sub.length ? '学科:' + sub.join(",") : ''}
  24069. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24070. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24071. ## 要求
  24072. ${msg}
  24073. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24074. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  24075. let _uuid = uuidv4();
  24076. // let params = JSON.stringify({
  24077. // // "model": "Chat",
  24078. // model: 'gpt-3.5-turbo',
  24079. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24080. // max_tokens: 4096,
  24081. // top_p: 1,
  24082. // frequency_penalty: 0,
  24083. // presence_penalty: 0,
  24084. // messages: [{
  24085. // content: messages,
  24086. // role: 'user'
  24087. // }],
  24088. // uid: _uuid,
  24089. // mind_map_question: "",
  24090. // })
  24091. let params = {
  24092. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24093. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24094. session_name: _uuid,
  24095. userId: _this.userid,
  24096. uid: _uuid,
  24097. file_ids: fileid.length ? [...fileid] : '',
  24098. model: 'gpt-4o-2024-11-20',
  24099. temperature: this.mode == 3 ? 0.5 : 0.1,
  24100. }
  24101. // let params = JSON.stringify({
  24102. // message: {
  24103. // anthropic_version: "bedrock-2023-05-31",
  24104. // max_tokens: 4096,
  24105. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24106. // top_p: 1,
  24107. // messages: [{
  24108. // "role": "user",
  24109. // "content": messages
  24110. // }] ,
  24111. // },
  24112. // uid: _uuid,
  24113. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24114. // });
  24115. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24116. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  24117. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24118. console.log(response);
  24119. // let data = response.data.FunctionResponse
  24120. // if (data.choices && data.choices.length && data.choices[0].message) {
  24121. // _this.courseText = data.choices[0].message.content
  24122. // }
  24123. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24124. } else {
  24125. _this.$message.warning(response.data.FunctionResponse.result);
  24126. }
  24127. _this.isTargetCancelToken1 = null
  24128. }).catch(function (error) {
  24129. _this.targetTextLoading = false
  24130. _this.ttargetTextLoading = false
  24131. _this.isTargetCancelToken1 = null
  24132. if(error && error.message != 'Request canceled by the user.'){
  24133. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24134. }
  24135. console.log(error);
  24136. });
  24137. await _this.aitargetTextDetailgetAiContent(_uuid)
  24138. },
  24139. aitargetTextDetailgetAiContent(_uid) {
  24140. try {
  24141. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24142. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24143. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24144. } catch (error) {
  24145. console.log('EventSource error:', error);
  24146. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24147. this.targetTextLoading = false
  24148. this.ttargetTextLoading = false
  24149. this.isTargetCancelToken1 = null
  24150. return;
  24151. }
  24152. let _allText = "";
  24153. let _mdText = "";
  24154. let _iindex = 0
  24155. this.isTargetCancelSource1.onmessage = _e => {
  24156. let _eData = JSON.parse(_e.data).content;
  24157. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24158. //对话已经完成
  24159. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24160. this.isTargetCancelSource1.close();
  24161. this.isTargetCancelSource1 = null;
  24162. this.targetCourseText = _mdText;
  24163. this.targetTextLoading = false
  24164. this.ttargetTextLoading = false
  24165. this.targetCourseTextB = false
  24166. this.isTargetCancelToken1 = null
  24167. return;
  24168. } else {
  24169. _iindex++
  24170. //对话还在继续
  24171. let _text = "";
  24172. _text = _eData.replaceAll("'", "");
  24173. if (_allText == "") {
  24174. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24175. } else {
  24176. _allText += _text;
  24177. }
  24178. _mdText = _allText + "_";
  24179. _mdText = _mdText.replace(/\\n/g, "\n");
  24180. _mdText = _mdText.replace(/\\/g, "");
  24181. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24182. //转化返回的回复流数据
  24183. if(_iindex == 10){
  24184. this.targetCourseText = _mdText;
  24185. _iindex = 0
  24186. }
  24187. if(this.targetTextLoading){
  24188. this.targetTextLoading = false
  24189. }
  24190. // 处理流数据
  24191. }
  24192. // this.$forceUpdate();
  24193. };
  24194. let _this = this
  24195. this.isTargetCancelSource1.onerror = function(event) {
  24196. // 处理错误,可以尝试重新连接
  24197. console.log('EventSource error:', event);
  24198. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24199. _this.targetTextLoading = false
  24200. _this.ttargetTextLoading = false
  24201. _this.isTargetCancelToken1 = null
  24202. _this.isTargetCancelSource1.close();
  24203. _this.isTargetCancelSource1 = null;
  24204. };
  24205. },
  24206. async aitargetTextDetail2(msg) {
  24207. let _this = this
  24208. let fileid = []
  24209. if(_this.mubiaoInfoData.length){
  24210. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24211. if(_this.mubiaoInfoData[i].fileid){
  24212. fileid.push(_this.mubiaoInfoData[i].fileid)
  24213. }else {
  24214. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24215. if(_fileid){
  24216. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24217. _this.$forceUpdate();
  24218. if(_fileid != 1){
  24219. fileid.push(_fileid)
  24220. }
  24221. }
  24222. }
  24223. }
  24224. }
  24225. _this.targetTextLoading2 = true
  24226. _this.ttargetTextLoading2 = true
  24227. let sub = []
  24228. if (_this.courseTypeId.length) {
  24229. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24230. let _sid = _this.courseTypeId[i]
  24231. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24232. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24233. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24234. }
  24235. }
  24236. }
  24237. }
  24238. let mclass = []
  24239. if (_this.courseTypeId.length) {
  24240. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24241. let _sid = _this.courseTypeId[i]
  24242. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24243. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24244. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24245. }
  24246. }
  24247. }
  24248. }
  24249. if(sub.length){
  24250. let _fileid = _this.importFileid(sub)
  24251. fileid = [...fileid, ..._fileid]
  24252. }
  24253. let messages = `NOTICE
  24254. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24255. Language: ${this.getLang()}
  24256. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24257. Instruction: Based on the context, follow "Format example", write content.
  24258. #Context
  24259. ## 参考资料
  24260. 课程标题:${this.courseName}
  24261. ${sub.length ? '学科:' + sub.join(",") : ''}
  24262. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24263. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24264. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24265. ## 要求
  24266. ${msg}
  24267. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24268. let _uuid = uuidv4();
  24269. // let params = JSON.stringify({
  24270. // // "model": "Chat",
  24271. // model: 'gpt-3.5-turbo',
  24272. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24273. // max_tokens: 4096,
  24274. // top_p: 1,
  24275. // frequency_penalty: 0,
  24276. // presence_penalty: 0,
  24277. // messages: [{
  24278. // content: messages,
  24279. // role: 'user'
  24280. // }],
  24281. // uid: _uuid,
  24282. // mind_map_question: "",
  24283. // })
  24284. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24285. let params = {
  24286. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24287. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24288. session_name: _uuid,
  24289. userId: _this.userid,
  24290. uid: _uuid,
  24291. file_ids: fileid.length ? [...fileid] : '',
  24292. model: 'gpt-4o-2024-11-20',
  24293. temperature: this.mode == 3 ? 0.5 : 0.1,
  24294. }
  24295. // let params = JSON.stringify({
  24296. // message: {
  24297. // anthropic_version: "bedrock-2023-05-31",
  24298. // max_tokens: 4096,
  24299. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24300. // top_p: 1,
  24301. // messages: [{
  24302. // "role": "user",
  24303. // "content": messages
  24304. // }] ,
  24305. // },
  24306. // uid: _uuid,
  24307. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24308. // });
  24309. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24310. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24311. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24312. console.log(response);
  24313. // let data = response.data.FunctionResponse
  24314. // if (data.choices && data.choices.length && data.choices[0].message) {
  24315. // _this.courseText = data.choices[0].message.content
  24316. // }
  24317. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24318. } else {
  24319. _this.$message.warning(response.data.FunctionResponse.result);
  24320. }
  24321. _this.isTargetCancelToken2 = null
  24322. }).catch(function (error) {
  24323. _this.targetTextLoading2 = false
  24324. _this.ttargetTextLoading2 = false
  24325. _this.isTargetCancelToken2 = null
  24326. if(error && error.message != 'Request canceled by the user.'){
  24327. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24328. }
  24329. console.log(error);
  24330. });
  24331. await _this.aitargetTextDetail2getAiContent(_uuid)
  24332. },
  24333. importFileid(sub){
  24334. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  24335. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  24336. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  24337. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  24338. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  24339. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  24340. let _sub = converter(sub.join(","))
  24341. let fileid = []
  24342. for(var i = 0; i < this.fileidArray.length; i++){
  24343. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  24344. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  24345. fileid.push(this.fileidArray[i].fileid)
  24346. }
  24347. }
  24348. }
  24349. return fileid
  24350. },
  24351. selectFileid(){
  24352. let params = {
  24353. oid: this.oid,
  24354. };
  24355. this.ajax
  24356. .get(this.$store.state.api + "selectFileid", params)
  24357. .then((res) => {
  24358. this.fileidArray = res.data[0]
  24359. if(res.data[1].length){
  24360. this.fileidArray = res.data[1]
  24361. }
  24362. if(res.data[2].length){
  24363. this.fileidArray = res.data[2]
  24364. }
  24365. })
  24366. .catch((err) => {
  24367. console.error(err);
  24368. });
  24369. },
  24370. selectAiFileid(){
  24371. let params = {
  24372. oid: this.oid,
  24373. };
  24374. this.ajax
  24375. .get(this.$store.state.api + "selectAiFileid", params)
  24376. .then((res) => {
  24377. let fileIds = []
  24378. for(var i = 0; i < res.data[0].length; i++){
  24379. fileIds.push(res.data[0][i].fileid)
  24380. }
  24381. this.fileIds = fileIds
  24382. if(res.data[1].length){
  24383. fileIds = []
  24384. for(var i = 0; i < res.data[1].length; i++){
  24385. fileIds.push(res.data[0][i].fileid)
  24386. }
  24387. this.fileIds = fileIds
  24388. }
  24389. if(res.data[2].length){
  24390. fileIds = []
  24391. for(var i = 0; i < res.data[2].length; i++){
  24392. fileIds.push(res.data[0][i].fileid)
  24393. }
  24394. this.fileIds = fileIds
  24395. }
  24396. })
  24397. .catch((err) => {
  24398. console.error(err);
  24399. });
  24400. },
  24401. selectKnowFileid(){
  24402. let params = {
  24403. oid: this.oid,
  24404. sta: 'cn'
  24405. };
  24406. this.ajax
  24407. .get(this.$store.state.api + "selectKnowFileid", params)
  24408. .then((res) => {
  24409. this.knowFileArray = res.data[0]
  24410. if(res.data[1].length){
  24411. this.knowFileArray = res.data[1]
  24412. }
  24413. if(res.data[2].length){
  24414. this.knowFileArray = res.data[2]
  24415. }
  24416. })
  24417. .catch((err) => {
  24418. console.error(err);
  24419. });
  24420. },
  24421. async aitargetTextDetail22(msg,msg2) {
  24422. let _this = this
  24423. let fileid = []
  24424. _this.targetTextLoading2 = true
  24425. _this.ttargetTextLoading2 = true
  24426. let sub = []
  24427. if (_this.courseTypeId.length) {
  24428. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24429. let _sid = _this.courseTypeId[i]
  24430. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24431. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24432. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24433. }
  24434. }
  24435. }
  24436. }
  24437. let mclass = []
  24438. if (_this.courseTypeId.length) {
  24439. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24440. let _sid = _this.courseTypeId[i]
  24441. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24442. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24443. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24444. }
  24445. }
  24446. }
  24447. }
  24448. if(!msg2 && sub.length){
  24449. // let _fileid = _this.importFileid(sub)
  24450. // fileid = [...fileid, ..._fileid]
  24451. }
  24452. let messages = `NOTICE
  24453. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  24454. Language: ${this.getLang()}
  24455. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24456. Instruction: Based on the context, follow "Format example", write content.
  24457. #Context
  24458. ## 参考资料
  24459. 课程标题:${this.courseName}
  24460. ${sub.length ? '学科:' + sub.join(",") : ''}
  24461. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  24462. 课程目标:${msg2}
  24463. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  24464. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  24465. ## 要求
  24466. ${msg}
  24467. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  24468. let _uuid = uuidv4();
  24469. // let params = JSON.stringify({
  24470. // // "model": "Chat",
  24471. // model: 'gpt-3.5-turbo',
  24472. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24473. // max_tokens: 4096,
  24474. // top_p: 1,
  24475. // frequency_penalty: 0,
  24476. // presence_penalty: 0,
  24477. // messages: [{
  24478. // content: messages,
  24479. // role: 'user'
  24480. // }],
  24481. // uid: _uuid,
  24482. // mind_map_question: "",
  24483. // })
  24484. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24485. let params = {
  24486. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  24487. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24488. session_name: _uuid,
  24489. userId: _this.userid,
  24490. uid: _uuid,
  24491. file_ids: fileid.length ? [...fileid] : '',
  24492. model: 'gpt-4o-2024-11-20',
  24493. temperature: this.mode == 3 ? 0.5 : 0.1,
  24494. }
  24495. // let params = JSON.stringify({
  24496. // message: {
  24497. // anthropic_version: "bedrock-2023-05-31",
  24498. // max_tokens: 4096,
  24499. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24500. // top_p: 1,
  24501. // messages: [{
  24502. // "role": "user",
  24503. // "content": messages
  24504. // }] ,
  24505. // },
  24506. // uid: _uuid,
  24507. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24508. // });
  24509. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24510. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  24511. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24512. console.log(response);
  24513. // let data = response.data.FunctionResponse
  24514. // if (data.choices && data.choices.length && data.choices[0].message) {
  24515. // _this.courseText = data.choices[0].message.content
  24516. // }
  24517. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  24518. } else {
  24519. _this.$message.warning(response.data.FunctionResponse.result);
  24520. }
  24521. _this.isTargetCancelToken2 = null
  24522. }).catch(function (error) {
  24523. _this.targetTextLoading2 = false
  24524. _this.ttargetTextLoading2 = false
  24525. _this.isTargetCancelToken2 = null
  24526. if(error && error.message != 'Request canceled by the user.'){
  24527. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24528. }
  24529. console.log(error);
  24530. });
  24531. await _this.aitargetTextDetail2getAiContent(_uuid)
  24532. },
  24533. aitargetTextDetail2getAiContent(_uid) {
  24534. try {
  24535. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24536. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24537. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  24538. } catch(error) {
  24539. console.log('EventSource error:', error);
  24540. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24541. this.targetTextLoading2 = false
  24542. this.ttargetTextLoading2 = false
  24543. this.isTargetCancelToken2 = null
  24544. return;
  24545. }
  24546. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  24547. let _allText = "";
  24548. let _mdText = "";
  24549. let _iindex = 0
  24550. this.isTargetCancelSource2.onmessage = _e => {
  24551. let _eData = JSON.parse(_e.data).content;
  24552. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  24553. //对话已经完成
  24554. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  24555. this.isTargetCancelSource2.close();
  24556. this.isTargetCancelSource2 = null;
  24557. this.targetCourseText2 = text1+' \n '+_mdText;
  24558. this.targetTextLoading2 = false
  24559. this.ttargetTextLoading2 = false
  24560. this.targetCourseText2B = false
  24561. this.isTargetCancelToken2 = null
  24562. this.saveCourse()
  24563. return;
  24564. } else {
  24565. _iindex++
  24566. //对话还在继续
  24567. let _text = "";
  24568. _text = _eData.replaceAll("'", "");
  24569. if (_allText == "") {
  24570. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  24571. } else {
  24572. _allText += _text;
  24573. }
  24574. _mdText = _allText + "_";
  24575. _mdText = _mdText.replace(/\\n/g, "\n");
  24576. _mdText = _mdText.replace(/\\/g, "");
  24577. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  24578. //转化返回的回复流数据
  24579. if(_iindex == 10){
  24580. this.targetCourseText2 = text1+' \n '+_mdText;
  24581. _iindex = 0
  24582. }
  24583. if(this.targetTextLoading2){
  24584. this.targetTextLoading2 = false
  24585. }
  24586. // 处理流数据
  24587. }
  24588. // this.$forceUpdate();
  24589. };
  24590. let _this = this
  24591. this.isTargetCancelSource2.onerror = function(event) {
  24592. // 处理错误,可以尝试重新连接
  24593. console.log('EventSource error:', event);
  24594. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24595. _this.targetTextLoading2 = false
  24596. _this.ttargetTextLoading2 = false
  24597. _this.isTargetCancelToken2 = null
  24598. _this.isTargetCancelSource2.close();
  24599. _this.isTargetCancelSource2 = null;
  24600. };
  24601. },
  24602. async aitargetTextDetail3(msg) {
  24603. let _this = this
  24604. let fileid = []
  24605. if(_this.mubiaoInfoData.length){
  24606. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  24607. if(_this.mubiaoInfoData[i].fileid){
  24608. fileid.push(_this.mubiaoInfoData[i].fileid)
  24609. }else {
  24610. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  24611. if(_fileid){
  24612. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  24613. _this.$forceUpdate();
  24614. if(_fileid != 1){
  24615. fileid.push(_fileid)
  24616. }
  24617. }
  24618. }
  24619. }
  24620. }
  24621. _this.targetTextLoading2 = true
  24622. _this.ttargetTextLoading2 = true
  24623. let sub = []
  24624. if (_this.courseTypeId.length) {
  24625. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24626. let _sid = _this.courseTypeId[i]
  24627. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24628. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24629. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24630. }
  24631. }
  24632. }
  24633. }
  24634. let mclass = []
  24635. if (_this.courseTypeId.length) {
  24636. for (var i = 0; i < _this.courseTypeId.length; i++) {
  24637. let _sid = _this.courseTypeId[i]
  24638. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24639. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  24640. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  24641. }
  24642. }
  24643. }
  24644. }
  24645. // if(sub.length){
  24646. // let _fileid = _this.importFileid(sub)
  24647. // fileid = [...fileid, ..._fileid]
  24648. // }
  24649. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24650. if (_this.infoData.length) {
  24651. for (var i = 0; i < _this.infoData.length; i++) {
  24652. if(_this.infoData[i].fileid){
  24653. fileid.push(_this.infoData[i].fileid)
  24654. }else {
  24655. let _fileid = await _this.createFileid(_this.infoData[i].url)
  24656. if(_fileid){
  24657. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  24658. _this.$forceUpdate();
  24659. if(_fileid != 1){
  24660. fileid.push(_fileid)
  24661. }
  24662. }
  24663. }
  24664. }
  24665. }
  24666. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  24667. let messages = `Language: ${this.getLang()}
  24668. ${msg}
  24669. ## 课程信息
  24670. 课程名字:${this.courseName}
  24671. 课程概况:${this.courseText}
  24672. ${sub.length ? '学科:' + sub.join(",") : ''}
  24673. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  24674. let _uuid = uuidv4();
  24675. // let params = JSON.stringify({
  24676. // // "model": "Chat",
  24677. // model: 'gpt-3.5-turbo',
  24678. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24679. // max_tokens: 4096,
  24680. // top_p: 1,
  24681. // frequency_penalty: 0,
  24682. // presence_penalty: 0,
  24683. // messages: [{
  24684. // content: messages,
  24685. // role: 'user'
  24686. // }],
  24687. // uid: _uuid,
  24688. // mind_map_question: "",
  24689. // })
  24690. let params = {
  24691. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24692. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24693. session_name: _uuid,
  24694. userId: _this.userid,
  24695. uid: _uuid,
  24696. file_ids: fileid.length ? [...fileid] : '',
  24697. model: 'gpt-4o-2024-11-20',
  24698. temperature: this.mode == 3 ? 0.5 : 0.1,
  24699. }
  24700. // let params = JSON.stringify({
  24701. // message: {
  24702. // anthropic_version: "bedrock-2023-05-31",
  24703. // max_tokens: 4096,
  24704. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24705. // top_p: 1,
  24706. // messages: [{
  24707. // "role": "user",
  24708. // "content": messages
  24709. // }] ,
  24710. // },
  24711. // uid: _uuid,
  24712. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24713. // });
  24714. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24715. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  24716. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  24717. console.log(response);
  24718. // let data = response.data.FunctionResponse
  24719. // if (data.choices && data.choices.length && data.choices[0].message) {
  24720. // _this.courseText = data.choices[0].message.content
  24721. // }
  24722. console.log(response);
  24723. let data = response.data.FunctionResponse
  24724. // if (data.choices && data.choices.length && data.choices[0].message) {
  24725. // console.log(data.choices[0].message.content);
  24726. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  24727. // _this.$forceUpdate()
  24728. // }
  24729. if (data.message) {
  24730. console.log('返回回来的目标:',data.message);
  24731. _this.targetCourseText2 = data.message
  24732. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  24733. }
  24734. _this.isTargetCancelToken2 = null
  24735. }).catch(function (error) {
  24736. _this.targetTextLoading2 = false
  24737. _this.ttargetTextLoading2 = false
  24738. _this.isTargetCancelToken2 = null
  24739. if(error && error.message != 'Request canceled by the user.'){
  24740. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24741. }
  24742. console.log(error);
  24743. });
  24744. },
  24745. againEva(msg, i, k) {
  24746. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  24747. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  24748. return;
  24749. }
  24750. if (this.ruleLoading[i]) {
  24751. this.ruleLoading[i][k] = true
  24752. } else {
  24753. this.ruleLoading[i] = []
  24754. this.ruleLoading[i][k] = true
  24755. }
  24756. let message = `NOTICE
  24757. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  24758. Language: ${this.getLang()}
  24759. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24760. Instruction: Based on the context, follow "Format example", write content.
  24761. #Context
  24762. ##要求
  24763. ${msg}
  24764. ##制定标准资料
  24765. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  24766. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  24767. # Format example
  24768. ==
  24769. 0 星,作业内容与作业要求无关;
  24770. 1 星,没有识别问题和需求;
  24771. 2 星,问题或需求没有被清晰理解或准确识别;
  24772. 3 星,问题或需求的一部分被识别;
  24773. 4 星,问题或需求的大部分被识别;
  24774. 5 星,问题或需求都被识别。
  24775. ==
  24776. `
  24777. // let params = {
  24778. // // "model": "Chat",
  24779. // model: 'gpt-4o-2024-11-20',
  24780. // // model: "gpt-4o",
  24781. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24782. // max_tokens: 4096,
  24783. // top_p: 1,
  24784. // frequency_penalty: 0,
  24785. // presence_penalty: 0,
  24786. // messages: [
  24787. // {
  24788. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  24789. // role: "user"
  24790. // }
  24791. // ],
  24792. // stream: false,
  24793. // uid: this.userid,
  24794. // mind_map_question: ""
  24795. // };
  24796. // this.ajax
  24797. // .post("https://gpt4.cocorobo.cn/chat", params)
  24798. // .then(response => {
  24799. // let data = response.data.FunctionResponse;
  24800. // console.log("data", data);
  24801. // if (data.choices && data.choices.length && data.choices[0].message) {
  24802. // let content = data.choices[0].message.content;
  24803. // var regex = new RegExp('==([^=]+)==');
  24804. // let match = content.match(regex);
  24805. // if (match) {
  24806. // content = match[1].trim().replaceAll(' ', '');
  24807. // // 获取匹配到的内容并去除两端空格
  24808. // console.log('contentInsideDoubleEquals', content);
  24809. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24810. // console.log("未有星级。");
  24811. // this.againEva(msg, i, k)
  24812. // return
  24813. // }
  24814. // //  return
  24815. // } else {
  24816. // console.log("未找到匹配的内容。");
  24817. // this.againEva(msg, i, k)
  24818. // return
  24819. // }
  24820. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  24821. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24822. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24823. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  24824. // this.$forceUpdate();
  24825. // this.ruleLoading[i][k] = false
  24826. // }else{
  24827. // this.ruleLoading[i][k] = false
  24828. // }
  24829. // })
  24830. // .catch(error => {
  24831. // console.log(error);
  24832. // this.ruleLoading[i][k] = false
  24833. // });
  24834. let parm = {
  24835. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24836. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  24837. session_name: uuidv4(),
  24838. userId: this.userid,
  24839. file_ids: [],
  24840. model: 'gpt-4o-2024-11-20',
  24841. temperature: this.mode == 3 ? 0.5 : 0.1,
  24842. }
  24843. this.ajax
  24844. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  24845. .then(async (response) => {
  24846. console.log(response);
  24847. let data = response.data.FunctionResponse
  24848. if (data.message) {
  24849. console.log(data.message);
  24850. let content = data.message;
  24851. var regex = new RegExp('==([^=]+)==');
  24852. let match = content.match(regex);
  24853. if (match) {
  24854. content = match[1].trim().replaceAll(' ', '');
  24855. // 获取匹配到的内容并去除两端空格
  24856. console.log('contentInsideDoubleEquals', content);
  24857. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24858. console.log("未有星级。");
  24859. this.againEva(msg, i, k)
  24860. return
  24861. }
  24862. //  return
  24863. } else {
  24864. console.log("未找到匹配的内容。");
  24865. this.againEva(msg, i, k)
  24866. return
  24867. }
  24868. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  24869. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24870. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24871. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  24872. this.$forceUpdate();
  24873. this.ruleLoading[i][k] = false
  24874. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  24875. }else {
  24876. this.ruleLoading[i][k] = false
  24877. }
  24878. })
  24879. .catch((error) => {
  24880. this.ruleLoading[i][k] = false
  24881. console.log(error);
  24882. });
  24883. },
  24884. async aiSearchFile(messages, callback) {
  24885. let _this = this
  24886. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  24887. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24888. console.log('fileid=========',fileid)
  24889. // let params = JSON.stringify({
  24890. // // "model": "Chat",
  24891. // model: 'gpt-3.5-turbo',
  24892. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24893. // max_tokens: 4096,
  24894. // top_p: 1,
  24895. // frequency_penalty: 0,
  24896. // presence_penalty: 0,
  24897. // messages: [{
  24898. // content: messages,
  24899. // role: 'user'
  24900. // }],
  24901. // stream: false,
  24902. // uid: this.userid,
  24903. // mind_map_question: "",
  24904. // })
  24905. // // let params = JSON.stringify({
  24906. // // message: {
  24907. // // anthropic_version: "bedrock-2023-05-31",
  24908. // // max_tokens: 4096,
  24909. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  24910. // // top_p: 1,
  24911. // // messages: [{
  24912. // // content: messages,
  24913. // // role: 'user'
  24914. // // }], //
  24915. // // },
  24916. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24917. // // });
  24918. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24919. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  24920. // console.log(response);
  24921. // let data = response.data.FunctionResponse
  24922. // if (data.choices && data.choices.length && data.choices[0].message) {
  24923. // console.log(data.choices[0].message.content);
  24924. // let dArray = JSON.parse(data.choices[0].message.content)
  24925. // _this.dArray = dArray
  24926. // _this.unitJson[0].chapterInfo[0].taskJson = []
  24927. // for (var i = 0; i < dArray.length; i++) {
  24928. // let _task = dArray[i]
  24929. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  24930. // task: _task.task,
  24931. // taskDetail: "",
  24932. // taskDetail2: _task.detail,
  24933. // taskDetail3: "",
  24934. // chapterData: [],
  24935. // toolText: "",
  24936. // toolChoose: [
  24937. // {
  24938. // tool: [],
  24939. // toolDetail: "",
  24940. // toolType: 0,
  24941. // askCount: 1,
  24942. // askTitle: "",
  24943. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24944. // },
  24945. // ],
  24946. // isShowTools: false,
  24947. // askCount: 1,
  24948. // isFold: 0,
  24949. // askTitle: "",
  24950. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24951. // checkJson: [{ checkCount: [], checkPerent: [] }],
  24952. // homeworkList: [],
  24953. // })
  24954. // }
  24955. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  24956. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  24957. // _this.$forceUpdate();
  24958. // }
  24959. // // if (data.result) {
  24960. // // console.log(data.result);
  24961. // // let dArray = JSON.parse(data.result)
  24962. // // _this.dArray = dArray
  24963. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  24964. // // for (var i = 0; i < dArray.length; i++) {
  24965. // // let _task = dArray[i]
  24966. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  24967. // // task: _task.task,
  24968. // // taskDetail: "",
  24969. // // taskDetail2: _task.detail,
  24970. // // taskDetail3: "",
  24971. // // chapterData: [],
  24972. // // toolText: "",
  24973. // // toolChoose: [
  24974. // // {
  24975. // // tool: [],
  24976. // // toolDetail: "",
  24977. // // toolType: 0,
  24978. // // askCount: 1,
  24979. // // askTitle: "",
  24980. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24981. // // },
  24982. // // ],
  24983. // // isShowTools: false,
  24984. // // askCount: 1,
  24985. // // isFold: 1,
  24986. // // askTitle: "",
  24987. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24988. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  24989. // // homeworkList: [],
  24990. // // })
  24991. // // }
  24992. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  24993. // // _this.$forceUpdate();
  24994. // // }
  24995. // callback ? callback() : ''
  24996. // }).catch(function (error) {
  24997. // _this.loading = false
  24998. // console.log(error);
  24999. // });
  25000. this.isFileCancelToken = this.ajax.setCancelSource();
  25001. let parm = {
  25002. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  25003. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25004. session_name: uuidv4(),
  25005. userId: this.userid,
  25006. file_ids: fileid.length ? [...fileid] : '',
  25007. model: 'gpt-4o-2024-11-20',
  25008. temperature: this.mode == 3 ? 0.5 : 0.1,
  25009. }
  25010. this.ajax
  25011. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25012. .then((response) => {
  25013. console.log(response);
  25014. let data = response.data.FunctionResponse
  25015. if (data.message) {
  25016. console.log(data.message);
  25017. let dArray = []
  25018. try {
  25019. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  25020. let regex3 = new RegExp('(?<!")content(?!")','g')
  25021. //
  25022. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  25023. } catch (error) {
  25024. // callback ? callback() : ''
  25025. console.log("error_________________" + error);
  25026. try {
  25027. let regex = new RegExp(/```json([\s\S]*?)```/);
  25028. let match = data.message.match(regex);
  25029. dArray = JSON.parse(match[1]);
  25030. } catch (error) {
  25031. // callback ? callback() : ''
  25032. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  25033. console.log("error_________________" + error);
  25034. _this.isFileCancelToken = null;
  25035. _this.aiSearchFile(messages, callback)
  25036. return
  25037. }
  25038. }
  25039. for(let i = 0; i < dArray.length; i++){
  25040. let content = dArray[i].content
  25041. let name = '参考资料'+(i+1)
  25042. let md = new MarkdownIt();
  25043. let _html = content ? md.render(content) : ''
  25044. setTimeout(()=>{
  25045. if(i == (dArray.length - 1)){
  25046. _this.generate2(name, _html, i, callback)
  25047. }else {
  25048. _this.generate2(name, _html, i)
  25049. }
  25050. }, 500 * i)
  25051. }
  25052. _this.isFileCancelToken = null
  25053. _this.$forceUpdate();
  25054. }
  25055. })
  25056. .catch((error) => {
  25057. callback ? callback() : ''
  25058. _this.isFileCancelToken = null
  25059. console.log(error);
  25060. });
  25061. },
  25062. async aiSearchFile2(messages, callback) {
  25063. let _this = this
  25064. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  25065. console.log('fileid=========',fileid)
  25066. this.isFileCancelToken = this.ajax.setCancelSource();
  25067. let parm = {
  25068. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  25069. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  25070. session_name: uuidv4(),
  25071. userId: this.userid,
  25072. file_ids: fileid.length ? [...fileid] : '',
  25073. model: 'gpt-4o-2024-11-20',
  25074. temperature: this.mode == 3 ? 0.5 : 0.1,
  25075. }
  25076. this.ajax
  25077. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  25078. .then((response) => {
  25079. console.log(response);
  25080. let data = response.data.FunctionResponse
  25081. if (data.message) {
  25082. console.log(data.message);
  25083. let content = data.message
  25084. let name = '参考资料'
  25085. let md = new MarkdownIt();
  25086. let _html = content ? md.render(content) : ''
  25087. _this.generate2(name, _html, 0, callback)
  25088. _this.isFileCancelToken = null
  25089. _this.$forceUpdate();
  25090. }
  25091. })
  25092. .catch((error) => {
  25093. callback ? callback() : ''
  25094. _this.isFileCancelToken = null
  25095. console.log(error);
  25096. });
  25097. },
  25098. createFileid(url) {
  25099. let _this = this
  25100. return new Promise((resolve, reject) => {
  25101. try {
  25102. _this.ajax
  25103. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  25104. url: url,
  25105. })
  25106. .then((res) => {
  25107. let _data = res.data.FunctionResponse;
  25108. if (_data.result && _data.result.id) {
  25109. resolve(_data.result.id)
  25110. }else {
  25111. resolve(1)
  25112. }
  25113. }).catch(function (error) {
  25114. resolve(1)
  25115. });
  25116. }catch (e){
  25117. resolve(1)
  25118. }
  25119. });
  25120. },
  25121. handleSwitchChange(string){
  25122. // let area = ''
  25123. // let text = ''
  25124. // if(string == 'aiteacherTextDetail'){
  25125. // area = '已有教案摘要'
  25126. // text = this.teacherCourseText
  25127. // }else if(string == 'aitargetTextDetail'){
  25128. // area = '课程目标'
  25129. // text = this.targetCourseText
  25130. // }else if(string == 'aiDetail'){
  25131. // area = '课程简要描述'
  25132. // text = this.courseText
  25133. // }else if(string == 'aitargetTextDetail2'){
  25134. // area = '课程目标'
  25135. // text = this.targetCourseText2
  25136. // }else if(string.indexOf('aiDetail1') != -1){
  25137. // let index = parseInt(string.split('aiDetail1-')[1])
  25138. // area = `任务${index+1}课程大纲`
  25139. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  25140. // }else if(string == 'aiCpote1'){
  25141. // area = '概念群'
  25142. // text = this.cpote.cpote1
  25143. // }else if(string == 'aiCpote2'){
  25144. // area = '问题链'
  25145. // text = this.cpote.cpote2
  25146. // }else if(string == 'aiCpote3'){
  25147. // area = '目标层'
  25148. // text = this.cpote.cpote3
  25149. // }else if(string == 'aiCpote4'){
  25150. // area = '任务簇'
  25151. // text = this.cpote.cpote4
  25152. // }else if(string.indexOf('teacherDetail2') != -1){
  25153. // let index = parseInt(string.split('teacherDetail2-')[1])
  25154. // area = `任务${index+1}教案`
  25155. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  25156. // }else if(string.indexOf('aiDetail2') != -1){
  25157. // let index = parseInt(string.split('aiDetail2-')[1])
  25158. // area = `任务${index+1}任务描述`
  25159. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  25160. // }else if(string.indexOf('aiDetail3') != -1){
  25161. // let index = parseInt(string.split('-')[1])
  25162. // let index2 = parseInt(string.split('-')[2])
  25163. // area = `任务${index+1}工具${index2+1}的工具描述`
  25164. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  25165. // }
  25166. // if(this.isQuote[string] && text){
  25167. // this.quoteArray.push({
  25168. // string,
  25169. // area,
  25170. // value: text
  25171. // })
  25172. // }
  25173. console.log(this.isQuote)
  25174. },
  25175. setIsQuote(string){
  25176. this.isQuote[string] = false
  25177. },
  25178. setEvaList(task, tool, elist){
  25179. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  25180. this.$forceUpdate()
  25181. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  25182. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  25183. }
  25184. },
  25185. closeRight(){
  25186. this.isDisplay = !this.isDisplay;
  25187. },
  25188. addCourseBehavior(type, _html) { // 保存行为操作
  25189. let params = [{
  25190. uid: this.userid,
  25191. courseId: '',
  25192. type: type,
  25193. content: _html,
  25194. }];
  25195. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  25196. if (res.data == 1) {
  25197. console.log('保存操作成功');
  25198. } else {
  25199. console.log('保存操作失败');
  25200. }
  25201. }).catch(e => {
  25202. console.log('保存操作失败');
  25203. console.log(e);
  25204. });
  25205. },
  25206. async useUrl(){
  25207. if(!this.knowFileids3.length){
  25208. this.$message.error('请选择要使用的检索资料')
  25209. return
  25210. }
  25211. let array = []
  25212. for(var i = 0; i < this.knowFileids3.length; i++){
  25213. let item = this.knowFileids3[i]
  25214. for(var j = 0; j < this.knowInfoData3.length; j++){
  25215. if(item == this.knowInfoData3[j].url){
  25216. let isExist = this.knowInfoData2.some(item => item.name === this.knowInfoData3[j].name);
  25217. if (!isExist) {
  25218. this.knowInfoData2.push(this.knowInfoData3[j]);
  25219. }
  25220. }
  25221. }
  25222. }
  25223. this.$nextTick(() => {
  25224. this.$refs.rightKnow.scrollTop = this.$refs.rightKnow.scrollHeight;
  25225. });
  25226. this.knowFileids3 = []
  25227. for (let i = 0; i < this.knowInfoData2.length; i++) {
  25228. if (!this.knowInfoData2[i].fileid) {
  25229. let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25230. this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25231. console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25232. if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25233. this.knowFileids2.push(fileid)
  25234. }
  25235. }
  25236. }
  25237. },
  25238. panFind(event) {
  25239. // if(!this.findMatchingContentsFinish){
  25240. // const { scrollTop, clientHeight, scrollHeight } = event.target;
  25241. // // 判断是否触底
  25242. // if (scrollTop + clientHeight >= scrollHeight - 5 && !this.knowInfoDataLoading) {
  25243. // this.findMatchingContentsPage++
  25244. // this.findMatchingContents(); // 调用下拉刷新方法
  25245. // }
  25246. // }
  25247. if(!this.findMatchingContentsFinish){
  25248. this.findMatchingContentsPage++
  25249. this.findMatchingContents(); // 调用下拉刷新方法
  25250. }else{
  25251. this.$message.error('已获取全部数据')
  25252. }
  25253. },
  25254. startFindMatchingContents(){
  25255. if(!this.searchFileName){
  25256. this.$message.error('请输入检索关键词')
  25257. return
  25258. }
  25259. if(this.knowInfoDataLoading){
  25260. this.$message.error('检索中请稍后')
  25261. return
  25262. }
  25263. if(this.isfindMatchingContents && this.findMatchingContentsPage < 10){
  25264. this.isfindMatchingContents.cancel('Request canceled by the user.');
  25265. this.isfindMatchingContents = null;
  25266. }else if(this.isfindMatchingContents){
  25267. this.$message.error('检索中请稍后')
  25268. return
  25269. }
  25270. this.findMatchingContentsFinish = false
  25271. this.findMatchingContentsPage = 1
  25272. this.knowInfoData3 = []
  25273. this.knowFileType1 = ''
  25274. this.knowFileType2 = ''
  25275. this.knowFileType = ''
  25276. this.findMatchingContents(); // 调用下拉刷新方法
  25277. },
  25278. findMatchingContents(){
  25279. if(!this.searchFileName){
  25280. this.$message.error('请输入检索关键词')
  25281. return
  25282. }
  25283. if(this.isfindMatchingContents){
  25284. this.$message.error('检索中请稍后')
  25285. return
  25286. }
  25287. let sub = []
  25288. let grade = []
  25289. if (this.courseTypeId.length) {
  25290. for (var i = 0; i < this.courseTypeId.length; i++) {
  25291. let _sid = this.courseTypeId[i]
  25292. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25293. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  25294. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  25295. }
  25296. }
  25297. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  25298. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  25299. grade.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  25300. }
  25301. }
  25302. }
  25303. }
  25304. if(this.findMatchingContentsPage < 2){
  25305. this.knowInfoDataLoading = true
  25306. }
  25307. let params = {
  25308. type: this.typeC2.join(","),
  25309. string: this.searchFileName,
  25310. grade: this.typeC1.join(","),
  25311. page: this.findMatchingContentsPage
  25312. };
  25313. let md = new MarkdownIt();
  25314. this.isfindMatchingContents = this.ajax.setCancelSource()
  25315. this.ajax.get(this.$store.state.api + 'findMatchingContentsPage2', params, this.isfindMatchingContents).then(async res => {
  25316. console.log(res)
  25317. this.isfindMatchingContents = null
  25318. this.knowInfoDataLoading = false
  25319. if(res.data.length){
  25320. let files = []
  25321. // let knowFile = JSON.parse(JSON.stringify(this.knowFileids2))
  25322. for (var i = 0; i < res.data.length; i++) {
  25323. // files.push(await this.generateExport2(el.title, md.render(el.content)));
  25324. let el = res.data[i];
  25325. let url = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn' + el.file_url;
  25326. let extension = url.split('.').pop().toLowerCase();
  25327. let _type = 2; // 默认类型为2
  25328. // 定义文件类型数组
  25329. let imgA = ["png", "jpg", "jpeg", "bmp", "gif", "webp", "psd", "svg", "tiff"];
  25330. let fileA = ["PDF", "DOC", "DOCX", "DOCM", "DOTM", "DOTX", "PPTX", "PPSX", "PPT", "PPS", "PPTM", "POTM", "PPAM", "POTX", "PPSM", "XLSX", "XLS"];
  25331. 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"];
  25332. // 根据文件扩展名判断文件类型
  25333. if (fileA.includes(extension.toUpperCase())) {
  25334. _type = 3;
  25335. } else if (videoA.includes(extension.toUpperCase())) {
  25336. _type = 2;
  25337. } else if (imgA.includes(extension)) {
  25338. _type = 13;
  25339. } else {
  25340. _type = 12;
  25341. }
  25342. let isExist = this.knowInfoData3.some(item => item.name === el.title);
  25343. if (!isExist) {
  25344. // let fileid = await this.createFileid(url)
  25345. this.knowInfoData3.push({
  25346. name: el.title,
  25347. url: url,
  25348. uid: '',
  25349. type: _type,
  25350. fileid: '',
  25351. file_type: el.file_type
  25352. // fileid == 1 ? '' : fileid
  25353. });
  25354. // if(fileid != 1){
  25355. // this.knowFileids2.push(fileid)
  25356. // }
  25357. }
  25358. }
  25359. // for (let i = 0; i < this.knowInfoData3.length; i++) {
  25360. // if (!this.knowInfoData2[i].fileid) {
  25361. // let fileid = await this.createFileid(this.knowInfoData2[i].url)
  25362. // this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  25363. // console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  25364. // if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  25365. // this.knowFileids2.push(fileid)
  25366. // }
  25367. // }
  25368. // }
  25369. // let data = {
  25370. // target:{
  25371. // files: files
  25372. // }
  25373. // }
  25374. // console.log(data)
  25375. // this.beforeUploadInfo2(data, 20)
  25376. if(this.findMatchingContentsPage < 10){
  25377. this.panFind()
  25378. }
  25379. }else{
  25380. if(this.findMatchingContentsPage == 1){
  25381. this.$message.error('未检索出内容')
  25382. }else {
  25383. this.findMatchingContentsFinish = true
  25384. }
  25385. }
  25386. }).catch(e => {
  25387. console.log('查询失败');
  25388. this.isfindMatchingContents = null
  25389. this.knowInfoDataLoading = false
  25390. console.log(e);
  25391. });
  25392. }
  25393. },
  25394. beforeDestroy() {
  25395. // clearTimeout(this.timer);
  25396. // this.timer = null;
  25397. // clearInterval(this.timer2);
  25398. // this.timer2 = null;
  25399. clearInterval(this.pasteTimer);
  25400. this.pasteTimer = null;
  25401. },
  25402. beforeRouteLeave(to, from, next) {
  25403. // clearTimeout(this.timer);
  25404. // this.timer = null;
  25405. // clearInterval(this.timer2);
  25406. // this.timer2 = null;
  25407. clearInterval(this.pasteTimer);
  25408. this.pasteTimer = null;
  25409. next();
  25410. },
  25411. mounted(){
  25412. let _this = this
  25413. // 监听浏览器后退或者刷新等离开页面的操作
  25414. window.onbeforeunload = function(event) {
  25415. // 检查是否有未保存的更改
  25416. const message = "你有未保存的更改,确定要离开吗?";
  25417. // 现代浏览器通常会显示一个默认的提示信息,不能完全自定义提示内容
  25418. event.returnValue = message; // 兼容大部分浏览器
  25419. console.log(message)
  25420. return message; // 兼容部分浏览器
  25421. };
  25422. const resizable = this.$el.querySelector('.resizable');
  25423. const resizer = this.$el.querySelector('.resizer');
  25424. const maxWidth = document.body.offsetWidth / 2;
  25425. const maxWidth2 = window.innerWidth / 2;
  25426. let startX, startWidth;
  25427. const mouseMoveHandler = (e) => {
  25428. e.preventDefault(); // 添加此行以防止选中其他文本
  25429. const dx = startX - e.clientX;
  25430. const newWidth = startWidth + dx;
  25431. if (newWidth >= 350 && newWidth <= maxWidth) {
  25432. resizable.style.minWidth = `${newWidth}px`;
  25433. }
  25434. };
  25435. const mouseUpHandler = () => {
  25436. document.removeEventListener('mousemove', mouseMoveHandler);
  25437. document.removeEventListener('mouseup', mouseUpHandler);
  25438. document.body.style.cursor = 'default';
  25439. };
  25440. const mouseDownHandler = (e) => {
  25441. e.preventDefault(); // 添加此行以防止选中其他文本
  25442. startX = e.clientX;
  25443. startWidth = resizable.getBoundingClientRect().width;
  25444. document.addEventListener('mousemove', mouseMoveHandler);
  25445. document.addEventListener('mouseup', mouseUpHandler);
  25446. document.body.style.cursor = 'ew-resize';
  25447. };
  25448. resizer.addEventListener('mousedown', mouseDownHandler);
  25449. const touchMoveHandler = (e) => {
  25450. e.preventDefault(); // 添加此行以防止选中其他文本
  25451. const dx = startX - e.touches[0].clientX;
  25452. const newWidth = startWidth + dx;
  25453. if (newWidth >= 350 && newWidth <= maxWidth2) {
  25454. resizable.style.minWidth = `${newWidth}px`;
  25455. }
  25456. };
  25457. const touchEndHandler = () => {
  25458. document.removeEventListener('touchmove', touchMoveHandler);
  25459. document.removeEventListener('touchend', touchEndHandler);
  25460. document.body.style.cursor = 'default';
  25461. };
  25462. const touchStartHandler = (e) => {
  25463. e.preventDefault(); // 添加此行以防止选中其他文本
  25464. startX = e.touches[0].clientX;
  25465. startWidth = resizable.getBoundingClientRect().width;
  25466. document.addEventListener('touchmove', touchMoveHandler);
  25467. document.addEventListener('touchend', touchEndHandler);
  25468. document.body.style.cursor = 'ew-resize';
  25469. };
  25470. resizer.addEventListener('touchstart', touchStartHandler);
  25471. },
  25472. created() {
  25473. this.selectFileid();
  25474. // this.selectAiFileid();
  25475. this.selectKnowFileid();
  25476. this.getStudent();
  25477. this.getTeacher();
  25478. this.getClass();
  25479. this.selectGrage();
  25480. this.getTemplate();
  25481. this.getTipsTemplate();
  25482. // this.selectType();
  25483. this.selectEva();
  25484. if(this.istemplate == 1){
  25485. this.isOutline = true
  25486. this.isOutline2 = true
  25487. this.courseTextBool = true
  25488. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  25489. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  25490. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25491. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  25492. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  25493. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  25494. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  25495. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  25496. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  25497. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  25498. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  25499. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  25500. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  25501. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  25502. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  25503. - 我们的课程主题可以如何与学生的实际生活联系起来?
  25504. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  25505. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  25506. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  25507. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  25508. - 学生个人最终要完成什么?学生小组最终要完成什么?
  25509. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  25510. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  25511. 讨论:<转文本内容>`
  25512. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  25513. }
  25514. this.loading = false;
  25515. // this.timer2 = setInterval(() => {
  25516. // this.selectEva();
  25517. // }, 5000);
  25518. // this.pasteTimer = setInterval(() => {
  25519. // this.getPaste();
  25520. // }, 1000);
  25521. this.pasteTimer = setInterval(() => {
  25522. this.getPaste2();
  25523. }, 500);
  25524. setTimeout(() => {
  25525. // this.selectAllType();
  25526. this.selectCourseDetail();
  25527. }, 500);
  25528. let _this = this;
  25529. window.pasteStage = function (json) {
  25530. _this.pasteStage(json);
  25531. };
  25532. window.pasteTask = function (json) {
  25533. _this.pasteTask(json);
  25534. };
  25535. },
  25536. };
  25537. </script>
  25538. <style scoped>
  25539. @media screen and (max-width: 1280px) {
  25540. .mbCss {
  25541. flex-direction: column !important;
  25542. }
  25543. .pjCss {
  25544. width: 100% !important;
  25545. }
  25546. .evaCss {
  25547. width: 100% !important;
  25548. margin-top: 10px;
  25549. }
  25550. }
  25551. .el-table>>>.even_row {
  25552. background-color: #f1f1f1 !important;
  25553. }
  25554. .dialog_diy>>>.el-dialog__header {
  25555. background: #3c3c3c !important;
  25556. padding: 15px 20px;
  25557. }
  25558. .dialog_diy>>>.el-dialog__title {
  25559. color: #fff;
  25560. }
  25561. .dialog_diy>>>.el-dialog__headerbtn {
  25562. top: 19px;
  25563. }
  25564. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  25565. color: #fff;
  25566. }
  25567. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  25568. color: #fff;
  25569. }
  25570. .dialog_diy>>>.el-dialog__body,
  25571. .dialog_diy>>>.el-dialog__footer {
  25572. background: #fafafa;
  25573. }
  25574. .dialog_diy3>>>.el-dialog__body,
  25575. .dialog_diy3>>>.el-dialog__footer {
  25576. background: #eee !important;
  25577. }
  25578. .dialog_diy3>>>.el-dialog__body {
  25579. padding: 20px 20px;
  25580. }
  25581. .dialog_diyStage>>>.el-dialog__body {
  25582. padding: 10px;
  25583. }
  25584. .source_diy>>>.el-dialog {
  25585. height: 100% !important;
  25586. margin: 0 auto !important;
  25587. }
  25588. .source_diy>>>.el-dialog__body {
  25589. height: calc(100% - 185px);
  25590. overflow: auto;
  25591. background: #e6eaf0;
  25592. }
  25593. .source_diy>>>.el-dialog__footer {
  25594. background: #e6eaf0 !important;
  25595. }
  25596. .left {
  25597. border-right: 1px solid rgb(60, 94, 143);
  25598. display: flex;
  25599. flex-direction: column;
  25600. align-items: center;
  25601. min-height: 600px;
  25602. width: 385px;
  25603. height: 80%;
  25604. }
  25605. .tips {
  25606. color: rgb(128, 128, 128);
  25607. font-size: 12px;
  25608. width: 270px;
  25609. margin: 40px;
  25610. }
  25611. .pb_content {
  25612. height: 100% !important;
  25613. /* margin: 0 20px 0 20px; */
  25614. }
  25615. .pb_content_body {
  25616. width: 100% !important;
  25617. height: 100%;
  25618. display: flex;
  25619. }
  25620. .info_solid {
  25621. width: 270px;
  25622. height: 30px;
  25623. border-left: 1px solid #bdbdbd;
  25624. margin: 10px 0px 10px 30px;
  25625. }
  25626. .info_steps {
  25627. width: 270px;
  25628. font-size: 0.875rem;
  25629. display: flex;
  25630. align-items: center;
  25631. }
  25632. .info_steps span:nth-child(1) {
  25633. width: 30px;
  25634. height: 30px;
  25635. background: rgba(0, 0, 0, 0.38);
  25636. display: block;
  25637. color: #fff;
  25638. border-radius: 40px;
  25639. text-align: center;
  25640. line-height: 30px;
  25641. }
  25642. .steps_active {
  25643. background: #3d67bc !important;
  25644. }
  25645. .info_steps span:nth-child(2) {
  25646. margin-left: 5px;
  25647. }
  25648. .right {
  25649. height: 100%;
  25650. width: 100%;
  25651. display: flex;
  25652. overflow: hidden;
  25653. flex-direction: column;
  25654. }
  25655. .leftBar{
  25656. width: 290px;
  25657. height: calc(100% - 50px);
  25658. overflow: auto;
  25659. border-radius: 5px;
  25660. margin: 25px auto;
  25661. box-sizing: border-box;
  25662. margin-right: 10px;
  25663. }
  25664. .leftBar2{
  25665. width: 400px;
  25666. min-width: 400px;
  25667. height: calc(100% - 50px);
  25668. overflow: auto;
  25669. border-radius: 5px;
  25670. margin: 25px auto;
  25671. box-sizing: border-box;
  25672. margin-right: 10px;
  25673. background: #fff;
  25674. padding: 5px;
  25675. border-radius: 5px;
  25676. }
  25677. .basic_box {
  25678. margin: 0 auto;
  25679. position: relative;
  25680. padding: 0 20px 0 20px;
  25681. }
  25682. .basic_box_success {
  25683. width: 100%;
  25684. min-height: 455px;
  25685. padding: 50px 0;
  25686. position: relative;
  25687. text-align: center;
  25688. border-bottom: 1px solid #bfbfbf;
  25689. box-sizing: border-box;
  25690. display: flex;
  25691. align-items: center;
  25692. flex-direction: column;
  25693. justify-content: center;
  25694. }
  25695. .info_title {
  25696. font-size: 1.5em;
  25697. margin-right: 25px;
  25698. /* margin: 20px 30px 20px 30px; */
  25699. }
  25700. .bInfo_title {
  25701. text-align: left;
  25702. margin: 10px 0;
  25703. }
  25704. .small_title {
  25705. font-size: 14px;
  25706. line-height: 40px;
  25707. }
  25708. .chapter_beizhu {
  25709. font-size: 12px;
  25710. font-weight: bold;
  25711. float: right;
  25712. color: rgb(128, 128, 128);
  25713. margin-top: 5px;
  25714. }
  25715. .chapter_uploadBox1 {
  25716. text-align: left;
  25717. background-color: rgb(242, 242, 242);
  25718. width: 100%;
  25719. height: 67px;
  25720. padding: 0px 15px;
  25721. border-radius: 8px;
  25722. overflow: hidden;
  25723. font-size: 16px;
  25724. box-sizing: border-box;
  25725. position: relative;
  25726. }
  25727. .chapter_add {
  25728. width: 100%;
  25729. height: 32px;
  25730. margin-top: 15px;
  25731. cursor: pointer;
  25732. }
  25733. .chapter_add_l {
  25734. margin-left: 5px;
  25735. width: 30px;
  25736. height: 30px;
  25737. float: left;
  25738. border: 1px solid #aaa;
  25739. color: #aaa;
  25740. border-radius: 50%;
  25741. font-size: 25px;
  25742. text-align: center;
  25743. }
  25744. .chapter_add_r {
  25745. font-size: 18px;
  25746. height: 40px;
  25747. line-height: 30px;
  25748. text-indent: 10px;
  25749. color: #aaa;
  25750. }
  25751. .chapter_add_r span {
  25752. font-size: 12px;
  25753. color: rgb(204, 204, 204);
  25754. }
  25755. .chapter_add_input {
  25756. display: none;
  25757. }
  25758. .line {
  25759. width: 85%;
  25760. margin: 0 auto;
  25761. border-top: 1px solid #e5e5e5;
  25762. margin-top: 20px;
  25763. }
  25764. .info_btnBox {
  25765. width: calc(100%);
  25766. display: flex;
  25767. justify-content: center;
  25768. height: 80px;
  25769. align-items: center;
  25770. background: #fff;
  25771. margin: 0 auto;
  25772. border-top: 2px solid rgb(228, 232, 237);
  25773. box-sizing: border-box;
  25774. }
  25775. .info_btnBox2 {
  25776. width: calc(100%);
  25777. display: flex;
  25778. justify-content: center;
  25779. height: 20px;
  25780. align-items: center;
  25781. background: #fff;
  25782. margin: 0 auto;
  25783. border-top: 2px solid rgb(228, 232, 237);
  25784. box-sizing: border-box;
  25785. overflow: hidden;
  25786. cursor: pointer;
  25787. }
  25788. .info_btnBox3 {
  25789. width: calc(100%);
  25790. display: flex;
  25791. justify-content: flex-end;
  25792. padding: 0 20px;
  25793. height: 60px;
  25794. align-items: center;
  25795. background: unset;
  25796. margin: 0 auto;
  25797. /* border-top: 1px solid rgb(228, 232, 237); */
  25798. box-sizing: border-box;
  25799. overflow: hidden;
  25800. cursor: pointer;
  25801. background: #fff;
  25802. border-radius: 10px;
  25803. }
  25804. .info_btn+.info_btn {
  25805. margin-left: 15px;
  25806. }
  25807. .info_btn,
  25808. .teacherWord {
  25809. color: #fff;
  25810. background-color: #0f7eff;
  25811. padding: 8px 24px;
  25812. font-size: 0.9375rem;
  25813. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  25814. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  25815. min-width: 64px;
  25816. font-weight: 500;
  25817. border-radius: 4px;
  25818. box-sizing: border-box;
  25819. border: none;
  25820. cursor: pointer;
  25821. }
  25822. .teacherWord {
  25823. width: 105px !important;
  25824. text-align: center !important;
  25825. line-height: 36px !important;
  25826. padding: 0 !important;
  25827. font-size: 14px !important;
  25828. margin: 10px 0 !important;
  25829. }
  25830. .template_box {
  25831. display: flex;
  25832. flex-wrap: wrap;
  25833. }
  25834. .wordTeacher {
  25835. display: flex;
  25836. flex-direction: column;
  25837. width: 100px;
  25838. height: 100px;
  25839. text-align: center;
  25840. font-size: 13px;
  25841. margin: 0 20px 20px 0;
  25842. background: #f0f4fa;
  25843. position: relative;
  25844. border-radius: 5px;
  25845. align-items: center;
  25846. justify-content: center;
  25847. border: 1px solid #cad1dc;
  25848. color: #0e1e33;
  25849. /* padding: 25px 0px; */
  25850. cursor: pointer;
  25851. }
  25852. .wordTeacher::after {
  25853. content: "";
  25854. display: block;
  25855. position: absolute;
  25856. width: 15px;
  25857. height: 15px;
  25858. right: 10px;
  25859. top: 10px;
  25860. background-image: url(../../../assets/icon/new/choose_a.png);
  25861. background-size: 100% 100%;
  25862. }
  25863. .wordTeacherA::after {
  25864. background-image: url(../../../assets/icon/new/choose_b.png);
  25865. }
  25866. .wordTeacher:nth-child(5n) {
  25867. margin-right: 0px;
  25868. }
  25869. .wordPic {
  25870. margin: 0 auto;
  25871. width: 30px;
  25872. height: 30px;
  25873. cursor: pointer;
  25874. }
  25875. .deleteWord {
  25876. width: 22px;
  25877. height: 22px;
  25878. position: absolute;
  25879. right: 5px;
  25880. top: -15px;
  25881. cursor: pointer;
  25882. display: none;
  25883. z-index: 999;
  25884. }
  25885. .wordPic>img,
  25886. .deleteWord>img,
  25887. .addToolImg>img {
  25888. width: 100%;
  25889. height: 100%;
  25890. }
  25891. .info_btn:hover {
  25892. background-color: #4f7cd5 !important;
  25893. }
  25894. .cru_selectBox {
  25895. display: flex;
  25896. margin: 15px 0;
  25897. flex-wrap: nowrap;
  25898. white-space: nowrap;
  25899. overflow: auto;
  25900. position: relative;
  25901. height: 40px;
  25902. max-width: calc(100% - 175px);
  25903. }
  25904. .cru_selectBox::-webkit-scrollbar {
  25905. /*滚动条整体样式*/
  25906. width: 6px;
  25907. /*高宽分别对应横竖滚动条的尺寸*/
  25908. height: 6px;
  25909. }
  25910. /*定义滚动条轨道 内阴影+圆角*/
  25911. .cru_selectBox::-webkit-scrollbar-track {
  25912. border-radius: 10px;
  25913. background-color: #eee;
  25914. }
  25915. /*定义滑块 内阴影+圆角*/
  25916. .cru_selectBox::-webkit-scrollbar-thumb {
  25917. border-radius: 10px;
  25918. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  25919. background-color: rgba(0, 0, 0, 0.1);
  25920. }
  25921. .cru_line {
  25922. position: absolute;
  25923. bottom: 0px;
  25924. transition: all 0.5s;
  25925. left: 0px;
  25926. width: 50px;
  25927. height: 4px;
  25928. left: 10px;
  25929. border-radius: 2px;
  25930. background: #3681fc;
  25931. }
  25932. .cru_select {
  25933. font-size: 18px;
  25934. margin-right: 20px;
  25935. margin-left: 5px;
  25936. cursor: pointer;
  25937. color: #0e1e33;
  25938. }
  25939. .cru_select:hover {
  25940. color: #3681fc !important;
  25941. }
  25942. .cru_selected {
  25943. color: #3681fc !important;
  25944. font-weight: bold;
  25945. }
  25946. .chapter_box {
  25947. margin-top: 10px;
  25948. width: 100%;
  25949. padding: 10px 20px;
  25950. background: #fff;
  25951. border-radius: 8px;
  25952. box-sizing: border-box;
  25953. }
  25954. .chapter_contentbox {
  25955. display: flex;
  25956. align-items: center;
  25957. /* margin-top: 15px; */
  25958. }
  25959. .chapter_contentbox .cc_title {
  25960. margin: 0px;
  25961. color: black;
  25962. display: block;
  25963. white-space: nowrap;
  25964. overflow: hidden;
  25965. text-overflow: ellipsis;
  25966. margin-right: 20px;
  25967. font-size: 18px;
  25968. height: 20px;
  25969. line-height: 22px;
  25970. min-width: fit-content;
  25971. display: flex;
  25972. }
  25973. .chapter_contentbox .cc_title::before {
  25974. content: "";
  25975. height: 100%;
  25976. width: 3px;
  25977. background: #3681fc;
  25978. border-radius: 3px;
  25979. opacity: 1;
  25980. display: block;
  25981. margin-right: 10px;
  25982. }
  25983. .chapter_contentbox .cc_input {
  25984. width: 100%;
  25985. display: flex;
  25986. }
  25987. .show_taskD {
  25988. min-width: fit-content;
  25989. margin-left: 10px;
  25990. display: flex;
  25991. align-items: center;
  25992. font-size: 14px;
  25993. cursor: pointer;
  25994. color: #717c8d;
  25995. }
  25996. .show_taskD>img {
  25997. width: 15px;
  25998. margin-right: 5px;
  25999. transition: 0.2s all;
  26000. transform: rotate(-90deg);
  26001. }
  26002. .show_taskD.show>img {
  26003. transform: rotate(0deg);
  26004. }
  26005. .show_toolD {
  26006. min-width: fit-content;
  26007. margin-left: 10px;
  26008. display: flex;
  26009. align-items: center;
  26010. font-size: 14px;
  26011. cursor: pointer;
  26012. color: #717c8d;
  26013. /* position: absolute;
  26014. right: 45px;
  26015. top: 5px; */
  26016. }
  26017. .show_toolD>img {
  26018. width: 15px;
  26019. margin-right: 5px;
  26020. transition: 0.2s all;
  26021. transform: rotate(-90deg);
  26022. }
  26023. .show_toolD.show>img {
  26024. transform: rotate(0deg);
  26025. }
  26026. .remove {
  26027. background-image: url("../../../assets/icon/new/delete_u.png");
  26028. cursor: pointer;
  26029. opacity: 0.5;
  26030. width: 30px;
  26031. min-width: 30px;
  26032. height: 30px;
  26033. background-size: 100% 100%;
  26034. background-repeat: no-repeat;
  26035. margin-left: 10px;
  26036. }
  26037. .remove1 {
  26038. background-image: url("../../../assets/remove1.png");
  26039. background-repeat: no-repeat;
  26040. background-position: 5px 10px;
  26041. width: 40px;
  26042. height: 50px;
  26043. cursor: pointer;
  26044. margin-left: 10px;
  26045. }
  26046. .binfo_input {
  26047. width: 100%;
  26048. margin: 0;
  26049. padding: 12px 14px;
  26050. display: block;
  26051. min-width: 0;
  26052. outline: none;
  26053. box-sizing: border-box;
  26054. background: none;
  26055. border: none;
  26056. border-radius: 4px;
  26057. background: #fff;
  26058. font-size: 16px;
  26059. resize: none;
  26060. font-family: "Microsoft YaHei";
  26061. min-height: 48px;
  26062. /* border: 1px solid #3682fc00; */
  26063. border: 1.5px solid #cad1dc;
  26064. }
  26065. .binfo_textarea {
  26066. border: 1.5px solid #cad1dc;
  26067. font-size: 16px;
  26068. resize: none;
  26069. /* background: #f6f6f6; */
  26070. font-family: "Microsoft YaHei";
  26071. }
  26072. .binfo_input:focus-visible {
  26073. border: 1.5px solid #3681fc !important;
  26074. }
  26075. .time {
  26076. display: flex;
  26077. margin: 35px 0 80px 0;
  26078. }
  26079. .chapter_btnbox {
  26080. width: 160px;
  26081. border-radius: 5px;
  26082. border: 2px dashed gray;
  26083. display: flex;
  26084. padding: 8px 50px;
  26085. align-items: center;
  26086. justify-content: center;
  26087. margin: 30px auto 0;
  26088. cursor: pointer;
  26089. }
  26090. .icon_add {
  26091. position: relative;
  26092. width: 24px;
  26093. padding-top: 20px;
  26094. border-radius: 100%;
  26095. border-width: 2px;
  26096. border-style: solid;
  26097. border-color: gray;
  26098. }
  26099. .icon_add i:nth-child(1) {
  26100. position: absolute;
  26101. left: 50%;
  26102. top: 50%;
  26103. height: 60%;
  26104. transform: translate(-50%, -50%);
  26105. border-width: 1px;
  26106. border-style: solid;
  26107. border-color: inherit;
  26108. }
  26109. .icon_add i:nth-child(2) {
  26110. position: absolute;
  26111. top: 50%;
  26112. left: 50%;
  26113. width: 60%;
  26114. transform: translate(-50%, -50%);
  26115. border-width: 1px;
  26116. border-style: solid;
  26117. border-color: inherit;
  26118. }
  26119. .chapter_btn_w {
  26120. font-size: 0.9375rem;
  26121. font-weight: bold;
  26122. color: gray;
  26123. margin-left: 20px;
  26124. }
  26125. .disUoloadSty>>>.el-icon-plus {
  26126. display: none !important;
  26127. /* 上传按钮隐藏 */
  26128. }
  26129. .imgLeft {
  26130. margin: 15px 0;
  26131. }
  26132. .add_info_box {
  26133. margin: 0 0 0 auto;
  26134. display: flex;
  26135. flex-wrap: wrap;
  26136. }
  26137. .add_info_box button {
  26138. margin: 0 5px 10px 0;
  26139. }
  26140. .add_info_box2 {
  26141. display: flex;
  26142. align-items: center;
  26143. flex-wrap: wrap;
  26144. }
  26145. .add_info_box2::after {
  26146. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  26147. color: red;
  26148. font-size: 14px;
  26149. margin-bottom: 10px;
  26150. }
  26151. .add_chapters_box {
  26152. text-align: left;
  26153. background-color: #fff;
  26154. width: 100%;
  26155. border-radius: 4px;
  26156. font-size: 16px;
  26157. box-sizing: border-box;
  26158. position: relative;
  26159. padding: 0 15px;
  26160. height: auto;
  26161. overflow-y: auto;
  26162. overflow-x: hidden;
  26163. border: 1px solid #cad1dc;
  26164. }
  26165. .add_chapters_box.add_c_none {
  26166. display: flex;
  26167. justify-content: center;
  26168. align-items: center;
  26169. padding: 15px;
  26170. }
  26171. .add_c_none>img {
  26172. width: 25px;
  26173. }
  26174. .add_chapters_box.add_c_none>span {
  26175. font-size: 14px;
  26176. font-weight: 400;
  26177. margin: 0 0 5px 5px;
  26178. }
  26179. .homework_box {
  26180. display: flex;
  26181. align-items: flex-start;
  26182. flex-wrap: wrap;
  26183. margin: 15px 0 0 0;
  26184. flex-direction: column;
  26185. align-content: flex-start;
  26186. }
  26187. .course_homework {
  26188. display: flex;
  26189. justify-content: center;
  26190. flex-direction: row;
  26191. align-items: center;
  26192. margin: 0 10px 0 0;
  26193. }
  26194. .course_homework>>>.el-input__inner {
  26195. width: 140px;
  26196. margin-left: 15px;
  26197. }
  26198. .chapter_upload_move {
  26199. position: relative;
  26200. background-color: #fff;
  26201. position: absolute;
  26202. width: 100%;
  26203. top: 0px;
  26204. left: 0px;
  26205. border: 1px solid #eee;
  26206. border-radius: 5px;
  26207. transition: width 2s;
  26208. -moz-transition: width 2s;
  26209. -webkit-transition: width 2s;
  26210. -o-transition: width 2s;
  26211. }
  26212. .chapter_upload_l_i {
  26213. background-image: url("../../../assets/icon.png");
  26214. background-position: 3px -165px;
  26215. width: 30px;
  26216. height: 30px;
  26217. margin: 10px auto 0 auto;
  26218. }
  26219. .course_input_box {
  26220. display: flex;
  26221. margin-right: 20px;
  26222. min-width: 400px;
  26223. width: calc(100% - 350px);
  26224. align-items: center;
  26225. position: relative;
  26226. margin-bottom: 15px;
  26227. }
  26228. .course_input_box2 {
  26229. display: flex;
  26230. width: 100%;
  26231. align-items: center;
  26232. position: relative;
  26233. flex-wrap: wrap;
  26234. }
  26235. .course_input_box>.binfo_input {
  26236. width: calc(100%);
  26237. margin: 0;
  26238. border: 1.5px solid rgb(202, 209, 220);
  26239. border-radius: 5px;
  26240. font-weight: 600;
  26241. padding: 12px 14px 12px 71px;
  26242. }
  26243. .bb_courseIcon {
  26244. width: 57px;
  26245. height: 45px;
  26246. background: #f0f4fa;
  26247. border-radius: 5px 0px 0px 5px;
  26248. display: flex;
  26249. align-items: center;
  26250. justify-content: center;
  26251. border-right: 1.5px solid rgb(202, 209, 220);
  26252. box-sizing: border-box;
  26253. position: absolute;
  26254. left: 1.5px;
  26255. }
  26256. .bb_courseIcon>img {
  26257. width: 25px;
  26258. height: auto;
  26259. }
  26260. .big_box {
  26261. /* margin-top: 20px; */
  26262. display: flex;
  26263. justify-content: space-between;
  26264. /* border-bottom: 1px solid #E0E2ED; */
  26265. }
  26266. .left_first {
  26267. display: flex;
  26268. flex-direction: column;
  26269. flex-wrap: nowrap;
  26270. width: calc(100% - 310px);
  26271. padding: 20px;
  26272. box-sizing: border-box;
  26273. background: #fff;
  26274. border-radius: 5px;
  26275. }
  26276. .right_first {
  26277. width: 300px;
  26278. display: flex;
  26279. align-items: center;
  26280. justify-content: center;
  26281. /* border-left: 1px solid #E0E2ED; */
  26282. box-sizing: border-box;
  26283. padding: 20px;
  26284. flex-direction: column;
  26285. background: #fff;
  26286. border-radius: 5px;
  26287. }
  26288. .ai_box {
  26289. width: 204px;
  26290. display: flex;
  26291. justify-content: flex-end;
  26292. margin-bottom: 15px;
  26293. }
  26294. .ai_content {
  26295. display: flex;
  26296. align-items: center;
  26297. font-size: 14px;
  26298. padding: 7px 20px;
  26299. box-sizing: border-box;
  26300. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  26301. border-radius: 12px;
  26302. font-weight: 700;
  26303. cursor: pointer;
  26304. }
  26305. .ai_content>img {
  26306. width: 40px;
  26307. margin-right: 5px;
  26308. }
  26309. .c_info_title {
  26310. padding: 15px 0 15px 0;
  26311. font-size: 16px;
  26312. font-weight: bold;
  26313. margin: 0 0 0 20px;
  26314. box-sizing: border-box;
  26315. display: flex;
  26316. align-items: center;
  26317. line-height: 20px;
  26318. }
  26319. .c_info_title::before {
  26320. content: "";
  26321. display: block;
  26322. width: 3px;
  26323. height: 20px;
  26324. background: #0061ff;
  26325. border-radius: 3px;
  26326. margin: 0 5px 0 0;
  26327. }
  26328. .right_title {
  26329. height: 30px;
  26330. padding: 15px 0 15px 20px;
  26331. border-bottom: 1px solid #f2f2f2;
  26332. font-size: 1.5em;
  26333. font-weight: bold;
  26334. color: #0f7eff;
  26335. margin: 0 auto;
  26336. }
  26337. .people {
  26338. border: 1px solid rgb(229 229 229);
  26339. /* height: 495px; */
  26340. height: 350px;
  26341. border-radius: 5px;
  26342. width: 100%;
  26343. overflow: auto;
  26344. }
  26345. .people_top {
  26346. display: flex;
  26347. width: 100%;
  26348. /* justify-content: space-between; */
  26349. /* align-items: center; */
  26350. flex-direction: column;
  26351. padding: 10px 10px 0;
  26352. box-sizing: border-box;
  26353. }
  26354. .people_nav,
  26355. .people_top_right {
  26356. /* padding: 20px 0 0 20px; */
  26357. }
  26358. .people_top_right {
  26359. height: 40px;
  26360. margin-bottom: 10px;
  26361. }
  26362. .people_search {
  26363. display: flex;
  26364. position: relative;
  26365. }
  26366. .people_search>>>.el-input__inner {
  26367. /* height: 25px; */
  26368. width: 100%;
  26369. }
  26370. .search_img {
  26371. width: 20px;
  26372. height: 20px;
  26373. position: absolute;
  26374. right: 10px;
  26375. top: 50%;
  26376. transform: translateY(-50%);
  26377. }
  26378. .search_img>img {
  26379. width: 100%;
  26380. height: 100%;
  26381. }
  26382. .people_name {
  26383. display: flex;
  26384. justify-content: flex-start;
  26385. padding: 20px 10px;
  26386. flex-direction: column;
  26387. flex-wrap: wrap;
  26388. }
  26389. .p_box {
  26390. position: relative;
  26391. }
  26392. .people_name>>>.el-checkbox {
  26393. width: 100%;
  26394. display: flex;
  26395. align-items: center;
  26396. margin-bottom: 10px;
  26397. }
  26398. .people_name>>>.el-checkbox__label {
  26399. text-overflow: ellipsis;
  26400. overflow: hidden;
  26401. width: calc(100%);
  26402. }
  26403. .people_name2>>>.el-checkbox__label {
  26404. width: calc(100% - 130px);
  26405. }
  26406. .inviteCode {
  26407. position: absolute;
  26408. right: 30px;
  26409. color: #237ade;
  26410. top: 0;
  26411. cursor: pointer;
  26412. font-size: 13px;
  26413. }
  26414. .noneInvite {
  26415. color: #a8a8a8;
  26416. }
  26417. .inviteImg {
  26418. position: absolute;
  26419. right: 5px;
  26420. top: 0;
  26421. width: 20px;
  26422. }
  26423. .right_img {
  26424. width: 150px;
  26425. height: 150px;
  26426. margin: 0 auto;
  26427. }
  26428. .right_img>img {
  26429. width: 100%;
  26430. height: 100%;
  26431. }
  26432. .number {
  26433. margin-top: 20px;
  26434. color: #4aa6ff;
  26435. text-decoration: underline;
  26436. }
  26437. .success_button {
  26438. display: flex;
  26439. text-align: center;
  26440. margin: 5% 0 auto;
  26441. flex-direction: row;
  26442. justify-content: center;
  26443. }
  26444. .look_course {
  26445. margin-right: 40px;
  26446. background: #3d67bc;
  26447. width: 200px;
  26448. height: 35px;
  26449. line-height: 35px;
  26450. color: #fff;
  26451. text-align: center;
  26452. font-size: 14px;
  26453. border-radius: 5px;
  26454. cursor: pointer;
  26455. }
  26456. .attend_others {
  26457. width: 250px;
  26458. background: #4fb13c;
  26459. height: 35px;
  26460. line-height: 35px;
  26461. color: #fff;
  26462. text-align: center;
  26463. font-size: 14px;
  26464. border-radius: 5px;
  26465. cursor: pointer;
  26466. }
  26467. .dialog_diy2>>>.el-dialog__body {
  26468. text-align: center;
  26469. }
  26470. .write_togother {
  26471. position: absolute;
  26472. right: 45px;
  26473. display: flex;
  26474. top: 5%;
  26475. }
  26476. .write_people {
  26477. font-size: 14px;
  26478. line-height: 50px;
  26479. padding-right: 10px;
  26480. }
  26481. .end_write {
  26482. background: #3d67bc;
  26483. color: #fff;
  26484. width: 100px;
  26485. height: 35px;
  26486. line-height: 35px;
  26487. text-align: center;
  26488. font-size: 14px;
  26489. border-radius: 5px;
  26490. cursor: pointer;
  26491. }
  26492. .chapter_upload+.chapter_upload {
  26493. /* margin-top: 15px; */
  26494. border-top: 1px solid #e7ebf1;
  26495. }
  26496. .chapter_upload {
  26497. height: 45px;
  26498. position: relative;
  26499. display: flex;
  26500. align-items: center;
  26501. width: 100%;
  26502. min-height: 45px;
  26503. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  26504. /* border-radius: 4px; */
  26505. /* overflow: hidden; */
  26506. box-sizing: border-box;
  26507. }
  26508. .chapter_upload_drag {
  26509. position: absolute;
  26510. cursor: pointer;
  26511. width: 16px;
  26512. height: 16px;
  26513. left: -9px;
  26514. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  26515. background-size: 100% 100%;
  26516. z-index: 10;
  26517. display: none;
  26518. }
  26519. .isNavStage>.chapter_upload_drag {
  26520. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  26521. }
  26522. .chapter_upload_t {
  26523. background-color: #fff;
  26524. position: absolute;
  26525. height: 100%;
  26526. top: 0px;
  26527. left: 0px;
  26528. box-sizing: border-box;
  26529. }
  26530. .chapter_upload_o {
  26531. width: 100%;
  26532. height: 100%;
  26533. position: relative;
  26534. z-index: 1;
  26535. }
  26536. .chapter_upload_ic {
  26537. margin: 0 15px 0px auto;
  26538. display: flex;
  26539. align-items: center;
  26540. }
  26541. .chapter_upload_type{
  26542. width: 80px;
  26543. min-width: 80px;
  26544. text-align: center;
  26545. font-size: 14px;
  26546. }
  26547. .chapter_upload_box_file{
  26548. height: calc(100% - 45px);
  26549. overflow: auto;
  26550. border-top: 1px solid #e7ebf1;
  26551. box-sizing: border-box;
  26552. }
  26553. .chapter_upload_ic_l {
  26554. width: 50px;
  26555. height: 50px;
  26556. float: left;
  26557. }
  26558. .chapter_upload_ic_l div {
  26559. width: 30px;
  26560. height: 35px;
  26561. background: url("../../../assets/icon/icon.png");
  26562. }
  26563. .chapter_upload_ic_edit {
  26564. height: 100%;
  26565. display: flex;
  26566. align-items: center;
  26567. cursor: pointer;
  26568. margin: 0 10px 0 0;
  26569. }
  26570. .chapter_upload_ic_edit div {
  26571. width: 18px;
  26572. height: 18px;
  26573. background-image: url("../../../assets/icon/new/edit_u.png");
  26574. background-size: 100% 100%;
  26575. }
  26576. .chapter_upload_ic_download {
  26577. height: 100%;
  26578. display: flex;
  26579. align-items: center;
  26580. cursor: pointer;
  26581. margin: 0;
  26582. }
  26583. .chapter_upload_ic_download div {
  26584. width: 18px;
  26585. height: 18px;
  26586. background-image: url("../../../assets/icon/course/download.svg");
  26587. background-size: 100% 100%;
  26588. }
  26589. .chapter_upload_ic_check {
  26590. height: 100%;
  26591. display: flex;
  26592. align-items: center;
  26593. cursor: pointer;
  26594. margin: 0 10px 0 0;
  26595. }
  26596. .chapter_upload_ic_check div {
  26597. width: 18px;
  26598. height: 18px;
  26599. background-image: url("../../../assets/icon/course/lookeye.svg");
  26600. background-size: 100% 100%;
  26601. }
  26602. .chapter_upload_ic_r {
  26603. height: 100%;
  26604. display: flex;
  26605. align-items: center;
  26606. cursor: pointer;
  26607. }
  26608. .chapter_upload_ic_r div {
  26609. width: 18px;
  26610. height: 18px;
  26611. background-image: url("../../../assets/icon/new/delete_u.png");
  26612. background-size: 100% 100%;
  26613. }
  26614. .chapter_upload_n {
  26615. display: flex;
  26616. text-indent: 10px;
  26617. text-decoration: none;
  26618. text-overflow: ellipsis;
  26619. white-space: nowrap;
  26620. overflow: hidden;
  26621. width: 55%;
  26622. margin-left: 10px;
  26623. cursor: pointer;
  26624. margin-top: 2px;
  26625. align-items: center;
  26626. }
  26627. .chapter_upload_n > .chapter_upload_box{
  26628. border: none;
  26629. outline: none;
  26630. max-width: 100%;
  26631. z-index: 99;
  26632. font-size: 14px;
  26633. white-space: nowrap;
  26634. overflow: hidden;
  26635. text-overflow: ellipsis;
  26636. color: #757575;
  26637. }
  26638. .chapter_upload_l_i2,
  26639. .chapter_upload_l_i3,
  26640. .chapter_upload_l_i8,
  26641. .chapter_upload_l_i6,
  26642. .chapter_upload_l_i12,
  26643. .chapter_upload_l_i14,
  26644. .chapter_upload_l_i13 {
  26645. width: 15px;
  26646. height: 15px;
  26647. background-size: 100% 100%;
  26648. }
  26649. .chapter_upload_l_i2 {
  26650. background-image: url("../../../assets/icon/new/u_word.png");
  26651. }
  26652. .chapter_upload_l_i3 {
  26653. background-image: url("../../../assets/icon/new/u_video.png");
  26654. }
  26655. .chapter_upload_l_i8 {
  26656. background-image: url("../../../assets/icon/new/u_url.png");
  26657. }
  26658. .chapter_upload_l_i14 {
  26659. background-image: url("../../../assets/icon/new/u_source.png");
  26660. }
  26661. .chapter_upload_l_i6 {
  26662. background-image: url("../../../assets/icon/new/u_picture.png");
  26663. }
  26664. .chapter_upload_l_i12 {
  26665. background-image: url("../../../assets/icon/new/u_word.png");
  26666. }
  26667. .chapter_upload_l_i13 {
  26668. background-image: url("../../../assets/icon/new/u_img.png");
  26669. }
  26670. .chapter_upload_noSee {
  26671. background-image: url("../../../assets/icon/new/u_noUpload.png");
  26672. width: 18px;
  26673. height: 18px;
  26674. background-size: 100% 100%;
  26675. display: block;
  26676. margin-right: 10px;
  26677. }
  26678. .chapter_upload_ud {
  26679. display: flex;
  26680. flex-direction: row;
  26681. justify-content: center;
  26682. margin: 0 10px 0 0;
  26683. }
  26684. .chapter_upload_ud>.chapter_upload_up {
  26685. margin-bottom: 0;
  26686. margin-right: 10px;
  26687. }
  26688. .chapter_upload_down,
  26689. .chapter_upload_up {
  26690. width: 20px;
  26691. height: 20px;
  26692. background: #e4eaf2;
  26693. cursor: pointer;
  26694. margin: 0 auto;
  26695. border-radius: 5px;
  26696. display: flex;
  26697. justify-content: center;
  26698. align-items: center;
  26699. }
  26700. .chapter_upload_up::after,
  26701. .chapter_upload_down::after {
  26702. content: "";
  26703. background-image: url("../../../assets/icon/new/downBtn.png");
  26704. width: 13px;
  26705. height: 13px;
  26706. background-size: 100% 100%;
  26707. display: block;
  26708. }
  26709. .chapter_upload_up::after {
  26710. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  26711. }
  26712. .chapter_upload_up {
  26713. margin-bottom: 5px;
  26714. }
  26715. .chapter_upload_ud2 {
  26716. display: flex;
  26717. flex-direction: row;
  26718. justify-content: center;
  26719. margin: 0 10px 0 0;
  26720. }
  26721. .chapter_upload_ud2>.chapter_upload_up2 {
  26722. margin-bottom: 0;
  26723. margin-right: 10px;
  26724. }
  26725. .chapter_upload_down2,
  26726. .chapter_upload_up2 {
  26727. cursor: pointer;
  26728. margin: 0 auto;
  26729. border-radius: 5px;
  26730. display: flex;
  26731. justify-content: center;
  26732. align-items: center;
  26733. color: #717c8d;
  26734. font-size: 14px;
  26735. }
  26736. .chapter_upload_up2 {
  26737. margin-right: 10px;
  26738. }
  26739. .chapter_upload_up2::before,
  26740. .chapter_upload_down2::before {
  26741. content: "";
  26742. background-image: url("../../../assets/icon/new/c_down.png");
  26743. width: 14px;
  26744. height: 14px;
  26745. background-size: 100% 100%;
  26746. display: block;
  26747. margin-right: 5px;
  26748. }
  26749. .chapter_upload_up2::before {
  26750. background-image: url("../../../assets/icon/new/c_up.png") !important;
  26751. }
  26752. .addWordStyle {
  26753. display: flex;
  26754. flex-direction: row;
  26755. justify-content: flex-start;
  26756. overflow-x: auto;
  26757. white-space: nowrap;
  26758. flex-wrap: wrap;
  26759. }
  26760. /* table 样式 */
  26761. .cont>>>table {
  26762. border-top: 1px solid #ccc;
  26763. border-left: 1px solid #ccc;
  26764. }
  26765. .cont>>>table td,
  26766. .cont>>>table th {
  26767. border-bottom: 1px solid #ccc;
  26768. border-right: 1px solid #ccc;
  26769. /* padding: 20px 5px; */
  26770. padding: 5px 10px;
  26771. max-width: 0px;
  26772. height: 30px;
  26773. vertical-align: baseline;
  26774. }
  26775. .cont>>>table th {
  26776. border-bottom: 2px solid #ccc;
  26777. text-align: center;
  26778. }
  26779. /* blockquote 样式 */
  26780. .cont>>>blockquote {
  26781. display: block;
  26782. border-left: 8px solid #d0e5f2;
  26783. padding: 5px 10px;
  26784. margin: 10px 0;
  26785. line-height: 1.4;
  26786. font-size: 100%;
  26787. background-color: #f1f1f1;
  26788. }
  26789. /* code 样式 */
  26790. .cont>>>code {
  26791. display: inline-block;
  26792. /* *display: inline; */
  26793. zoom: 1;
  26794. background-color: #f1f1f1;
  26795. border-radius: 3px;
  26796. padding: 3px 5px;
  26797. margin: 0 3px;
  26798. }
  26799. .cont>>>pre code {
  26800. display: block;
  26801. }
  26802. /* ul ol 样式 */
  26803. .cont>>>ul,
  26804. ol {
  26805. margin: 10px 0 10px 20px;
  26806. }
  26807. .wordbox {
  26808. display: flex;
  26809. flex-wrap: wrap;
  26810. cursor: pointer;
  26811. width: 100%;
  26812. }
  26813. .checkword {
  26814. width: 22px;
  26815. height: 22px;
  26816. margin: 10px auto 0;
  26817. cursor: pointer;
  26818. }
  26819. .checkword img {
  26820. width: 100%;
  26821. }
  26822. .stepBg {
  26823. display: flex;
  26824. justify-content: space-between;
  26825. align-items: center;
  26826. background: #fff;
  26827. width: calc(100%);
  26828. margin: 0 auto;
  26829. }
  26830. .stepBorder {
  26831. height: 3px !important;
  26832. background: #cad1dc;
  26833. width: 100px !important;
  26834. margin: 0 15px !important;
  26835. position: relative;
  26836. }
  26837. .border-active {
  26838. background: #3681fc !important;
  26839. }
  26840. .border-active::before,
  26841. .border-active::after {
  26842. border-color: #3681fc !important;
  26843. }
  26844. .stepBorder::before,
  26845. .stepBorder::after {
  26846. content: "";
  26847. width: 9px;
  26848. height: 9px;
  26849. background: #ffffff;
  26850. opacity: 1;
  26851. border: 2px solid #acb4bf;
  26852. display: block;
  26853. box-sizing: border-box;
  26854. border-radius: 50%;
  26855. position: absolute;
  26856. top: 50%;
  26857. transform: translateY(-50%);
  26858. }
  26859. .stepBorder::after {
  26860. right: -9px;
  26861. }
  26862. .stepTop {
  26863. width: 100%;
  26864. /* border-radius: 10px; */
  26865. display: flex;
  26866. justify-content: center;
  26867. align-items: center;
  26868. flex-wrap: nowrap;
  26869. background: #fff;
  26870. /* top: 18%; */
  26871. height: 80px;
  26872. border-bottom: 2px solid rgb(228, 232, 237);
  26873. box-sizing: border-box;
  26874. }
  26875. .stepTop2 {
  26876. width: 100%;
  26877. /* border-radius: 10px; */
  26878. display: flex;
  26879. justify-content: center;
  26880. align-items: center;
  26881. flex-wrap: nowrap;
  26882. background: #fff;
  26883. /* top: 18%; */
  26884. height: 20px;
  26885. border-bottom: 2px solid rgb(228, 232, 237);
  26886. box-sizing: border-box;
  26887. overflow: hidden;
  26888. cursor: pointer;
  26889. }
  26890. .stepTop>div img {
  26891. width: 100%;
  26892. }
  26893. .stepTop>div {
  26894. height: 50px;
  26895. width: 180px;
  26896. cursor: pointer;
  26897. margin: 10px 0;
  26898. border-radius: 10px;
  26899. }
  26900. .first,
  26901. .second,
  26902. .third,
  26903. .four {
  26904. background: #3681fc;
  26905. height: 90px;
  26906. color: #fff;
  26907. display: flex;
  26908. flex-direction: row;
  26909. align-items: center;
  26910. justify-content: center;
  26911. }
  26912. .first>div:nth-child(1),
  26913. .second>div:nth-child(1),
  26914. .third>div:nth-child(1),
  26915. .four>div:nth-child(1) {
  26916. margin: 5px 10px 0 0;
  26917. width: 2rem;
  26918. }
  26919. .firstNo,
  26920. .secondNo,
  26921. .thirdNo,
  26922. .fourNo {
  26923. background: #e7e7e7;
  26924. color: #adadad;
  26925. display: flex;
  26926. flex-direction: row;
  26927. align-items: center;
  26928. justify-content: center;
  26929. }
  26930. .firstNo>div:nth-child(1),
  26931. .secondNo>div:nth-child(1),
  26932. .thirdNo>div:nth-child(1),
  26933. .fourNo>div:nth-child(1) {
  26934. margin: 5px 10px 0 0;
  26935. width: 2rem;
  26936. }
  26937. .uploadWidth>>>.el-upload {
  26938. width: 60px;
  26939. height: 60px;
  26940. position: relative;
  26941. }
  26942. .addPeople {
  26943. background: #fa6060;
  26944. width: 150px;
  26945. height: 40px;
  26946. color: #fff;
  26947. border-radius: 5px;
  26948. text-align: center;
  26949. line-height: 40px;
  26950. font-size: 14px;
  26951. cursor: pointer;
  26952. }
  26953. .kcImg {
  26954. width: 60px;
  26955. margin-left: 10px;
  26956. }
  26957. .zyImg {
  26958. width: 55px;
  26959. margin: 0 10px;
  26960. }
  26961. .deleteZy {
  26962. width: 20px;
  26963. position: absolute;
  26964. top: 5px;
  26965. right: 5px;
  26966. cursor: pointer;
  26967. }
  26968. .kcImg>img,
  26969. .zyImg>img,
  26970. .deleteZy>img {
  26971. width: 100%;
  26972. height: 100%;
  26973. }
  26974. .zyBox {
  26975. display: flex;
  26976. flex-direction: row;
  26977. align-items: center;
  26978. background: #67d37d;
  26979. color: #fff;
  26980. width: 210px;
  26981. margin: 20px 20px 0 0;
  26982. border-radius: 10px;
  26983. height: 70px;
  26984. position: relative;
  26985. }
  26986. .upCss {
  26987. display: flex;
  26988. flex-direction: row;
  26989. justify-content: flex-start;
  26990. }
  26991. .upCss>>>.el-icon-plus {
  26992. position: none !important;
  26993. width: 200px;
  26994. height: 100px;
  26995. display: flex;
  26996. flex-wrap: nowrap;
  26997. flex-direction: column;
  26998. align-items: center;
  26999. justify-content: center;
  27000. border: 1px dashed #ccc;
  27001. min-width: 78px;
  27002. min-height: 100px;
  27003. z-index: 999;
  27004. }
  27005. .upCss>>>.el-upload-list__item-name {
  27006. width: 100px;
  27007. white-space: nowrap;
  27008. overflow: hidden;
  27009. text-overflow: ellipsis;
  27010. }
  27011. .upCss>>>.el-upload-list__item .el-icon-close {
  27012. font-size: 20px;
  27013. z-index: 9999;
  27014. }
  27015. .addStageImg {
  27016. min-width: 20px;
  27017. min-height: 20px;
  27018. width: 20px;
  27019. height: 20px;
  27020. cursor: pointer;
  27021. }
  27022. .addHW {
  27023. width: 28px;
  27024. height: 28px;
  27025. cursor: pointer;
  27026. }
  27027. .addStageImg>img,
  27028. .addHW>img {
  27029. width: 100%;
  27030. height: 100%;
  27031. }
  27032. .addNewPP>>>.el-dialog__body {
  27033. padding: 5px 20px;
  27034. }
  27035. .addNewPP>>>.el-dialog {
  27036. margin-top: 5vh !important;
  27037. }
  27038. .addNewPP2>>>.el-dialog__body {
  27039. padding: 5px 0;
  27040. }
  27041. .addNewPP2>>>.el-dialog {
  27042. margin-top: 5vh !important;
  27043. }
  27044. .isHeight {
  27045. height: 680px;
  27046. }
  27047. .toolChoose {
  27048. display: flex;
  27049. /* width: 100%; */
  27050. flex-direction: row;
  27051. flex-wrap: wrap;
  27052. }
  27053. .tool,
  27054. .isToolChoose {
  27055. display: flex;
  27056. flex-direction: column;
  27057. flex-wrap: nowrap;
  27058. width: fit-content;
  27059. margin: 10px 0 10px 0;
  27060. align-items: center;
  27061. border: 2px solid #dbdbdb00;
  27062. padding: 10px 20px;
  27063. border-radius: 5px;
  27064. cursor: pointer;
  27065. /* box-shadow: 0 0 2px 0px #dedede; */
  27066. position: relative;
  27067. box-sizing: border-box;
  27068. }
  27069. .tool:hover {
  27070. border: 2px solid #a5c7ff;
  27071. }
  27072. .tool:hover>.noCTool {
  27073. display: block;
  27074. opacity: 0.5;
  27075. }
  27076. .isToolChoose {
  27077. border: 2px solid #438aff !important;
  27078. box-shadow: 0 0 2px 0px #438aff;
  27079. opacity: 1 !important;
  27080. }
  27081. .isCTool,
  27082. .noCTool {
  27083. width: 30px;
  27084. height: 30px;
  27085. position: absolute;
  27086. top: -4px;
  27087. right: -4px;
  27088. }
  27089. .noCTool {
  27090. display: none;
  27091. }
  27092. .isCTool>img,
  27093. .noCTool>img {
  27094. width: 100%;
  27095. height: 100%;
  27096. }
  27097. .tool+.tool {
  27098. margin-right: 10px;
  27099. }
  27100. .whiteBIcon {
  27101. width: 60px;
  27102. cursor: pointer;
  27103. display: flex;
  27104. flex-direction: column;
  27105. flex-wrap: nowrap;
  27106. align-items: center;
  27107. font-size: 14px;
  27108. }
  27109. .whiteBIcon>img,
  27110. .toolIcon>img,
  27111. .arrow>img {
  27112. width: 100%;
  27113. height: 100%;
  27114. }
  27115. .check img {
  27116. width: 20px;
  27117. height: 20px;
  27118. }
  27119. .whiteBIcon>img {
  27120. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  27121. border-radius: 15px;
  27122. }
  27123. .whiteBIcon>div:nth-child(2) {
  27124. height: 20px;
  27125. line-height: 20px;
  27126. text-align: center;
  27127. }
  27128. .check {
  27129. /* width: 20px;
  27130. height: 20px; */
  27131. cursor: pointer;
  27132. margin: 10px 0 0;
  27133. }
  27134. .checkDiv {
  27135. display: flex;
  27136. align-items: center;
  27137. }
  27138. .checkDiv span {
  27139. margin-left: 5px;
  27140. color: #858585;
  27141. }
  27142. .customWidth>>>.el-dialog {
  27143. min-width: 600px !important;
  27144. }
  27145. .CollaborativeCss {
  27146. width: 100%;
  27147. display: flex;
  27148. justify-content: center;
  27149. align-items: center;
  27150. box-sizing: border-box;
  27151. padding: 10px 0;
  27152. cursor: pointer;
  27153. }
  27154. .CollaborativeCss >>> .el-tooltip {
  27155. overflow: hidden;
  27156. white-space: nowrap;
  27157. text-overflow: ellipsis;
  27158. }
  27159. .CollaborativeCss2 {
  27160. background: #e0eafb;
  27161. color: #3681fc;
  27162. font-weight: 700;
  27163. border-radius: 5px;
  27164. }
  27165. .a_addBox {
  27166. margin: 10px 0;
  27167. background: #fff;
  27168. padding: 15px;
  27169. /* max-height: 600px; */
  27170. overflow: auto;
  27171. }
  27172. .a_add_box {
  27173. border-bottom: 2px solid #eee;
  27174. padding-bottom: 25px;
  27175. }
  27176. .a_add_head {
  27177. display: flex;
  27178. align-items: center;
  27179. justify-content: space-between;
  27180. margin: 10px 0 0 0;
  27181. font-size: 18px;
  27182. }
  27183. .a_add_checkType {
  27184. margin-top: 10px;
  27185. display: flex;
  27186. font-size: 14px;
  27187. align-items: center;
  27188. }
  27189. .a_add_checkType span {
  27190. box-sizing: border-box;
  27191. padding: 0 0 5px 0;
  27192. cursor: pointer;
  27193. }
  27194. .a_add_checkType span+span {
  27195. margin-left: 10px;
  27196. }
  27197. .a_add_checkType .active {
  27198. border-bottom: 2px solid #409eff;
  27199. color: #409eff;
  27200. }
  27201. .a_add_head .a_add_head_input {
  27202. /* width: 540px; */
  27203. width: 100%;
  27204. }
  27205. .a_add_head .a_add_head_div {
  27206. display: flex;
  27207. align-items: center;
  27208. justify-content: space-between;
  27209. }
  27210. .a_add_body {
  27211. display: flex;
  27212. /* align-items: center; */
  27213. align-items: flex-end;
  27214. }
  27215. .a_add_input {
  27216. display: flex;
  27217. align-items: center;
  27218. flex-wrap: wrap;
  27219. }
  27220. .a_add_input_choice {
  27221. flex-direction: column;
  27222. margin-right: 10px;
  27223. }
  27224. .a_add_input_choice>>>.el-radio {
  27225. display: flex;
  27226. align-items: center;
  27227. flex-direction: row-reverse;
  27228. margin: 30px 0 0 0;
  27229. position: relative;
  27230. }
  27231. .a_add_input_choice>>>.el-checkbox {
  27232. display: flex;
  27233. align-items: center;
  27234. flex-direction: row-reverse;
  27235. margin: 30px 0 0 0;
  27236. position: relative;
  27237. }
  27238. .width100 {
  27239. width: 100%;
  27240. }
  27241. .a_add_input .a_add_persent {
  27242. width: 100%;
  27243. }
  27244. .a_add_persent_div {
  27245. width: 100%;
  27246. display: flex;
  27247. align-items: center;
  27248. }
  27249. .a_add_persent_div span {
  27250. margin: 5px 0;
  27251. }
  27252. .a_add_persent_div span:nth-child(1) {
  27253. width: 30%;
  27254. }
  27255. .a_add_persent_div span:nth-child(2) {
  27256. width: 7%;
  27257. }
  27258. .a_add_persent_div span:nth-child(3) {
  27259. width: 40%;
  27260. }
  27261. .a_add_body_div {
  27262. display: flex;
  27263. align-items: center;
  27264. justify-content: center;
  27265. /* flex-direction: column; */
  27266. position: absolute;
  27267. right: -20px;
  27268. transform: translateX(100%);
  27269. }
  27270. .a_add_body_div>>>.el-button--primary {
  27271. background: #466b99;
  27272. border: none;
  27273. }
  27274. .all_choose {
  27275. display: flex;
  27276. flex-direction: row;
  27277. align-items: flex-start;
  27278. width: 100%;
  27279. }
  27280. .all_choose+.all_choose {
  27281. /* margin-top: 10px */
  27282. }
  27283. .all_choose>span {
  27284. min-width: fit-content;
  27285. display: block;
  27286. white-space: nowrap;
  27287. overflow: hidden;
  27288. text-overflow: ellipsis;
  27289. margin-right: 20px;
  27290. font-weight: bold;
  27291. font-size: 14px;
  27292. }
  27293. .all_choose>>>.el-checkbox-group {
  27294. display: flex;
  27295. flex-direction: row;
  27296. width: 100%;
  27297. flex-wrap: wrap;
  27298. align-content: center;
  27299. justify-content: flex-start;
  27300. align-items: center;
  27301. margin-top: 3px;
  27302. }
  27303. .all_choose>.el-checkbox-group>>>.el-checkbox {
  27304. margin-bottom: 10px;
  27305. display: flex;
  27306. flex-direction: row;
  27307. align-items: center;
  27308. margin-right: 10px;
  27309. }
  27310. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  27311. min-width: 80px;
  27312. overflow: hidden;
  27313. width: 80px;
  27314. text-overflow: ellipsis;
  27315. white-space: nowrap;
  27316. }
  27317. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  27318. width: auto;
  27319. }
  27320. .choose>div:nth-child(3)>span {
  27321. /* letter-spacing: 0 !important; */
  27322. }
  27323. .choose {
  27324. display: flex;
  27325. flex-direction: column;
  27326. flex-wrap: nowrap;
  27327. height: 100%;
  27328. justify-content: space-evenly;
  27329. align-items: flex-start;
  27330. }
  27331. .both {
  27332. display: flex;
  27333. flex-direction: row;
  27334. flex-wrap: wrap;
  27335. width: 100%;
  27336. align-items: center;
  27337. justify-content: flex-start;
  27338. margin: 0 0 15px;
  27339. }
  27340. .notice>>>.el-dialog {
  27341. width: 500px !important;
  27342. text-align: center;
  27343. }
  27344. .notice>>>.el-button {
  27345. margin-top: 20px;
  27346. }
  27347. .whiteBg {
  27348. /* background: #fff; */
  27349. border-radius: 10px;
  27350. }
  27351. .wb_j_box {
  27352. display: flex;
  27353. width: 100%;
  27354. padding: 0 20px 0;
  27355. box-sizing: border-box;
  27356. }
  27357. .wb_j_box_content {
  27358. width: calc(100% - 55% - 100px);
  27359. display: flex;
  27360. align-items: center;
  27361. }
  27362. .wb_j_box_p_box {
  27363. max-width: calc(100% - 200px);
  27364. word-break: break-all;
  27365. overflow: hidden;
  27366. margin: 0 0 0 10px;
  27367. font-size: 14px;
  27368. color: #6e6e6e;
  27369. z-index: 999;
  27370. }
  27371. .chooseWho {
  27372. display: flex;
  27373. width: 410px;
  27374. flex-direction: row;
  27375. flex-wrap: nowrap;
  27376. justify-content: space-between;
  27377. padding-bottom: 10px;
  27378. }
  27379. .chooseWho>div {
  27380. cursor: pointer;
  27381. padding-bottom: 10px;
  27382. font-weight: bold;
  27383. }
  27384. .isChooseActive {
  27385. color: #3e88f4;
  27386. border-bottom: 2px solid #2f80f3;
  27387. }
  27388. .toolSort {
  27389. display: flex;
  27390. flex-direction: row;
  27391. flex-wrap: wrap;
  27392. justify-content: flex-start;
  27393. align-items: flex-start;
  27394. }
  27395. .toolSort>div {
  27396. margin-right: 10px;
  27397. }
  27398. .tools {
  27399. width: 100%;
  27400. display: flex;
  27401. flex-direction: column;
  27402. flex-wrap: nowrap;
  27403. align-items: flex-start;
  27404. }
  27405. .leftTools,
  27406. .rightTools {
  27407. width: 50%;
  27408. }
  27409. .leftTools+.leftTools {
  27410. border-top: 1px solid #dbdbdb;
  27411. padding-top: 30px;
  27412. }
  27413. .rightTools {
  27414. display: flex;
  27415. flex-direction: row;
  27416. flex-wrap: nowrap;
  27417. justify-content: space-around;
  27418. }
  27419. .firstToolList {
  27420. display: flex;
  27421. flex-direction: column;
  27422. flex-wrap: nowrap;
  27423. align-items: center;
  27424. }
  27425. .iconList {
  27426. display: flex;
  27427. flex-direction: row;
  27428. flex-wrap: wrap;
  27429. justify-content: flex-start;
  27430. align-items: center;
  27431. margin: 20px 0 5px 0;
  27432. width: 240px;
  27433. min-width: 240px;
  27434. }
  27435. .iconTool {
  27436. display: flex;
  27437. flex-direction: column;
  27438. flex-wrap: nowrap;
  27439. align-items: center;
  27440. justify-content: flex-start;
  27441. margin: 15px 10px;
  27442. }
  27443. .toolIcon {
  27444. width: 50px;
  27445. }
  27446. .taskBorder {
  27447. /* border: 1px solid #CAD1DC; */
  27448. border-radius: 10px;
  27449. margin-top: 10px;
  27450. min-height: 670px;
  27451. position: relative;
  27452. background: #fff;
  27453. padding: 20px;
  27454. overflow: hidden;
  27455. box-sizing: border-box;
  27456. }
  27457. .smallTaskBorder {
  27458. height: 405px;
  27459. min-height: 405px !important;
  27460. overflow: hidden;
  27461. }
  27462. /* .taskBorder>div {
  27463. padding: 30px 30px 10px;
  27464. } */
  27465. .addTaskBorder {
  27466. /* border: 2px solid #5E9AFC; */
  27467. border-radius: 8px;
  27468. margin-top: 10px;
  27469. cursor: pointer;
  27470. /* height: 50px;
  27471. line-height: 50px; */
  27472. background: #fff;
  27473. padding: 15px 0;
  27474. display: flex;
  27475. align-items: center;
  27476. justify-content: center;
  27477. }
  27478. /* .addTaskBorder>div {
  27479. margin: 0 auto;
  27480. display: flex;
  27481. align-items: center;
  27482. justify-content: center;
  27483. }
  27484. .addTaskBorder>div>img {
  27485. width: 20px;
  27486. }
  27487. .addTaskBorder>div>span {
  27488. font-size: 16px;
  27489. margin-left: 10px;
  27490. color: #5E9AFC;
  27491. } */
  27492. .funBlock {
  27493. display: flex;
  27494. padding: 15px 0;
  27495. flex-direction: row;
  27496. justify-content: center;
  27497. align-items: center;
  27498. position: absolute;
  27499. right: 0;
  27500. bottom: 0;
  27501. background: #fff;
  27502. width: 100%;
  27503. height: 60px;
  27504. z-index: 9;
  27505. }
  27506. .fold {
  27507. display: flex;
  27508. margin: 0 20px;
  27509. flex-direction: row;
  27510. align-items: center;
  27511. cursor: pointer;
  27512. color: #2b7bff;
  27513. }
  27514. .arrow {
  27515. margin-right: 8px;
  27516. width: 16px;
  27517. height: 16px;
  27518. min-width: 16px;
  27519. min-height: 16px;
  27520. background-size: 100% 100%;
  27521. display: block;
  27522. background-image: url(../../../assets/icon/new/u_up.png);
  27523. /* border-left: 7px solid transparent;
  27524. border-bottom: 7px solid #717C8D;
  27525. border-top: 0px solid transparent;
  27526. border-right: 7px solid transparent; */
  27527. /* box-sizing: border-box; */
  27528. transition: all 0.3s;
  27529. }
  27530. .arrowZ {
  27531. transform: rotate(180deg);
  27532. }
  27533. .addToolFun {
  27534. display: flex;
  27535. width: 150px;
  27536. flex-direction: row;
  27537. align-items: center;
  27538. justify-content: center;
  27539. border: 2px dashed #cad1dc;
  27540. border-radius: 5px;
  27541. height: 50px;
  27542. margin: 35px auto 0;
  27543. cursor: pointer;
  27544. }
  27545. .addToolFun2 {
  27546. display: flex;
  27547. width: 150px;
  27548. border: 2px dashed #cad1dc;
  27549. flex-direction: row;
  27550. align-items: center;
  27551. justify-content: center;
  27552. border-radius: 5px;
  27553. height: 50px;
  27554. margin: 0 auto 0;
  27555. cursor: pointer;
  27556. }
  27557. .addToolFun2>div,
  27558. .addToolFun>div {
  27559. display: flex;
  27560. line-height: 50px;
  27561. }
  27562. .addToolImg {
  27563. width: 20px;
  27564. height: 20px;
  27565. margin-right: 10px;
  27566. }
  27567. .addToolsDia>>>.el-dialog__body {
  27568. padding: 20px;
  27569. }
  27570. .addToolsDia>>>.el-dialog__body>.toolChoose {
  27571. padding: 0;
  27572. }
  27573. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  27574. padding: 0;
  27575. border-bottom: none;
  27576. margin-bottom: 0;
  27577. }
  27578. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  27579. width: 100%;
  27580. }
  27581. .lineCss>>>.el-form-item__label {
  27582. width: auto !important;
  27583. }
  27584. .lineCss>>>.el-form-item__content {
  27585. margin-left: 50px !important;
  27586. }
  27587. .newSteps {
  27588. display: flex;
  27589. width: 100% !important;
  27590. /* height: 80px; */
  27591. cursor: pointer;
  27592. margin: 10px 0;
  27593. border-radius: 10px;
  27594. flex-direction: row;
  27595. align-content: center;
  27596. justify-content: center;
  27597. align-items: center;
  27598. margin: 0 !important;
  27599. }
  27600. /* 评价样式 */
  27601. .elist_css {
  27602. padding-bottom: 75px !important;
  27603. }
  27604. .elist_title {
  27605. margin-bottom: 10px;
  27606. }
  27607. .elist_input {
  27608. width: 100%;
  27609. }
  27610. .elist_input_box {
  27611. display: flex;
  27612. align-items: center;
  27613. flex-wrap: wrap;
  27614. }
  27615. .elist_input_box+.elist_input_box {
  27616. margin-top: 30px;
  27617. }
  27618. .elist_input .elist_input_box input {
  27619. font: inherit;
  27620. color: currentColor;
  27621. width: 100%;
  27622. /* max-width: calc(100% - 385px); */
  27623. max-width: calc(100% - 150px);
  27624. padding: 8px 14px;
  27625. display: block;
  27626. min-width: 0;
  27627. outline: none;
  27628. border: 1px solid rgba(0, 0, 0, 0.23);
  27629. border-radius: 4px;
  27630. box-sizing: border-box;
  27631. background: #fff;
  27632. margin: 0 20px 0 0;
  27633. }
  27634. .elist_input .elist_input_box span {
  27635. height: 36px;
  27636. line-height: 36px;
  27637. color: rgb(82, 82, 82);
  27638. min-width: 80px;
  27639. }
  27640. .elist_input .elist_input_box .remove {
  27641. height: 20px;
  27642. width: 20px;
  27643. min-height: 20px;
  27644. min-width: 20px;
  27645. background-size: 100% 100%;
  27646. background-position: unset;
  27647. margin-left: 5px;
  27648. }
  27649. .elist_input_box>>>.el-rate {
  27650. display: flex;
  27651. height: 36px;
  27652. align-items: center;
  27653. }
  27654. .elist_input_box .elist_inptu_text {
  27655. width: 100%;
  27656. display: flex;
  27657. align-items: center;
  27658. margin-top: 10px;
  27659. }
  27660. .elist_input_box .elist_inptu_text input {
  27661. /* width: 500px; */
  27662. width: 100%;
  27663. max-width: unset;
  27664. }
  27665. .elist_input_box>>>.el-rate__icon {
  27666. font-size: 24px;
  27667. }
  27668. .elist_btn {
  27669. margin-top: 10px;
  27670. }
  27671. .lineTitle {
  27672. /* margin-top: 15px; */
  27673. width: 110px;
  27674. font-size: 16px;
  27675. display: flex;
  27676. align-items: center;
  27677. line-height: 20px;
  27678. }
  27679. .lineTitle::before {
  27680. content: "";
  27681. display: block;
  27682. width: 3px;
  27683. height: 20px;
  27684. background: #0061ff;
  27685. border-radius: 3px;
  27686. margin: 0 5px 0 0;
  27687. }
  27688. .clineTitle::before {
  27689. content: "";
  27690. display: block;
  27691. min-width: 10px;
  27692. width: 10px;
  27693. height: 10px;
  27694. background: #0061ff;
  27695. border-radius: 50%;
  27696. margin: 0 5px 0 0;
  27697. }
  27698. .courseTop {
  27699. display: flex;
  27700. flex-direction: row;
  27701. justify-content: space-between;
  27702. align-items: center;
  27703. width: calc(100%);
  27704. margin: 0 auto;
  27705. padding: 10px 20px;
  27706. box-sizing: border-box;
  27707. position: absolute;
  27708. top: 0;
  27709. }
  27710. .stepsNav {
  27711. display: flex;
  27712. flex-direction: row;
  27713. justify-content: flex-start;
  27714. align-items: center;
  27715. }
  27716. .stepsWord {
  27717. font-size: 18px;
  27718. color: #fff;
  27719. font-weight: bold;
  27720. margin-left: auto;
  27721. background: rgb(15, 126, 255);
  27722. border-radius: 5px;
  27723. padding: 3px 25px;
  27724. box-sizing: border-box;
  27725. }
  27726. .stepBox {
  27727. width: calc(100% - 40px);
  27728. height: calc(100%);
  27729. overflow: hidden;
  27730. border-radius: 5px;
  27731. margin: 0 auto;
  27732. }
  27733. .rightBox {
  27734. width: calc(100%);
  27735. background: #f0f2f5;
  27736. /* border-radius: 10px; */
  27737. overflow: auto;
  27738. height: calc(100% - 150px);
  27739. margin: 0 auto;
  27740. position: relative;
  27741. box-sizing: border-box;
  27742. }
  27743. .e_add_top {
  27744. display: flex;
  27745. justify-content: space-between;
  27746. background: #fff;
  27747. position: absolute;
  27748. right: 20px;
  27749. height: 50px;
  27750. align-items: center;
  27751. }
  27752. .e_add_title2 {
  27753. display: flex;
  27754. align-items: center;
  27755. }
  27756. .e_add_title2 span {
  27757. width: 40px;
  27758. }
  27759. .e_add_title {
  27760. display: flex;
  27761. align-items: center;
  27762. color: #b8b8b8;
  27763. font-size: 18px;
  27764. position: relative;
  27765. height: 40px;
  27766. }
  27767. .e_add_title span {
  27768. margin-right: 10px;
  27769. }
  27770. .e_add_title .el_input {
  27771. width: 300px;
  27772. }
  27773. .e_add_title>>>.el-input__inner {
  27774. width: 400px;
  27775. }
  27776. .e_add_btn {}
  27777. .e_add_content {
  27778. display: flex;
  27779. width: 100%;
  27780. }
  27781. .e_add_list {
  27782. background: #fff;
  27783. height: 500px;
  27784. width: 210px;
  27785. position: relative;
  27786. margin: 15px 5px 0 0;
  27787. flex-shrink: 0;
  27788. display: flex;
  27789. flex-direction: column;
  27790. }
  27791. .e_add_list_title {
  27792. font-size: 20px;
  27793. width: 100%;
  27794. box-sizing: border-box;
  27795. padding: 15px 40px;
  27796. text-align: center;
  27797. border-bottom: 1px solid #eaeaea;
  27798. position: relative;
  27799. display: flex;
  27800. align-items: center;
  27801. justify-content: center;
  27802. height: 57px;
  27803. background: #f6f6f6;
  27804. }
  27805. .e_add_list_title span {
  27806. overflow: hidden;
  27807. white-space: nowrap;
  27808. text-overflow: ellipsis;
  27809. }
  27810. .e_add_list_title img {
  27811. position: absolute;
  27812. right: 15px;
  27813. width: 25px;
  27814. cursor: pointer;
  27815. top: 50%;
  27816. transform: translateY(-50%);
  27817. }
  27818. .e_add_list_body {
  27819. height: calc(100% - 187px);
  27820. overflow: auto;
  27821. }
  27822. .e_add_list_child {
  27823. width: 100%;
  27824. display: flex;
  27825. align-items: center;
  27826. justify-content: center;
  27827. position: relative;
  27828. box-sizing: border-box;
  27829. padding: 15px 40px;
  27830. text-align: center;
  27831. }
  27832. .e_add_list_child span {
  27833. overflow: hidden;
  27834. white-space: nowrap;
  27835. text-overflow: ellipsis;
  27836. cursor: pointer;
  27837. }
  27838. .e_add_list_child img {
  27839. position: absolute;
  27840. right: 10px;
  27841. width: 21px;
  27842. cursor: pointer;
  27843. top: 50%;
  27844. transform: translateY(-50%);
  27845. }
  27846. .e_add_list_child+.e_add_list_child {
  27847. border-top: 1px solid #eaeaea;
  27848. }
  27849. .e_add_list_child .active {
  27850. color: #409eff;
  27851. }
  27852. .e_add_list_btn {
  27853. position: absolute;
  27854. bottom: 0;
  27855. height: 50px;
  27856. background: rgb(120, 120, 254);
  27857. width: 100%;
  27858. color: #fff;
  27859. font-size: 16px;
  27860. text-align: center;
  27861. line-height: 50px;
  27862. cursor: pointer;
  27863. }
  27864. .e_add_list_detail {
  27865. position: absolute;
  27866. bottom: 0;
  27867. height: 130px;
  27868. background: rgb(120, 120, 254);
  27869. width: 100%;
  27870. color: #fff;
  27871. font-size: 16px;
  27872. display: flex;
  27873. align-items: center;
  27874. justify-content: center;
  27875. }
  27876. .e_add_list_detail textarea {
  27877. height: 90%;
  27878. width: 95%;
  27879. border: none;
  27880. resize: none;
  27881. outline: none;
  27882. padding: 5px;
  27883. box-sizing: border-box;
  27884. }
  27885. .e_add_list_pbox {
  27886. width: 100%;
  27887. }
  27888. .e_add_list_pbox_title {
  27889. height: 50px;
  27890. background: #fff;
  27891. display: flex;
  27892. align-items: center;
  27893. width: 100%;
  27894. box-sizing: border-box;
  27895. padding: 0 20px;
  27896. flex-direction: row;
  27897. flex-wrap: wrap;
  27898. }
  27899. .type_title {
  27900. font-size: 18px;
  27901. font-weight: 700;
  27902. }
  27903. .type_content {
  27904. font-size: 16px;
  27905. margin-left: 30px;
  27906. }
  27907. .type_content span+span {
  27908. margin-left: 20px;
  27909. }
  27910. .type_content span {
  27911. cursor: pointer;
  27912. padding-bottom: 5px;
  27913. box-sizing: border-box;
  27914. }
  27915. .type_content .active {
  27916. color: #409eff;
  27917. border-bottom: 2px solid #409eff;
  27918. }
  27919. .e_add_list_pbox_content {
  27920. height: calc(100% - 50px);
  27921. display: flex;
  27922. align-items: center;
  27923. width: 100%;
  27924. background: #fff;
  27925. }
  27926. .mbCss {
  27927. width: 100%;
  27928. display: flex;
  27929. flex-direction: row;
  27930. flex-wrap: nowrap;
  27931. align-content: center;
  27932. align-items: flex-start;
  27933. justify-content: flex-start;
  27934. }
  27935. .pjCss {
  27936. /* width: 42%; */
  27937. width: calc(100% - 55%);
  27938. display: flex;
  27939. flex-direction: column;
  27940. flex-wrap: nowrap;
  27941. align-items: flex-start;
  27942. }
  27943. .e_box {
  27944. /* display: flex; */
  27945. flex-wrap: wrap;
  27946. max-height: 500px;
  27947. align-items: flex-start;
  27948. overflow: auto;
  27949. width: 100%;
  27950. }
  27951. .e_card {
  27952. border: 1px solid #ccc;
  27953. background: #fff;
  27954. margin-right: 20px;
  27955. width: 270px;
  27956. display: flex;
  27957. flex-direction: column;
  27958. align-items: center;
  27959. border-radius: 5px;
  27960. margin-top: 10px;
  27961. text-align: center;
  27962. }
  27963. .e_card_picture {
  27964. margin: 10px 0;
  27965. }
  27966. .e_card_picture>img {
  27967. width: 50px;
  27968. }
  27969. .e_card_name {
  27970. width: 100%;
  27971. padding: 0 10px;
  27972. box-sizing: border-box;
  27973. margin-bottom: 10px;
  27974. overflow: hidden;
  27975. text-overflow: ellipsis;
  27976. white-space: nowrap;
  27977. }
  27978. .e_card_time {
  27979. width: 100%;
  27980. padding: 0 10px;
  27981. box-sizing: border-box;
  27982. font-size: 15px;
  27983. color: #c3c3c3;
  27984. margin-bottom: 10px;
  27985. }
  27986. .e_card_btn {
  27987. height: 40px;
  27988. display: flex;
  27989. align-items: center;
  27990. width: 100%;
  27991. background: rgb(244, 244, 244);
  27992. }
  27993. .e_card_btn:hover {
  27994. background: rgb(221 221 221);
  27995. }
  27996. .e_card_btn span {
  27997. flex: 1 1 auto;
  27998. text-align: center;
  27999. cursor: pointer;
  28000. }
  28001. .addEva {
  28002. border: 1px solid #ccc;
  28003. background: #fff;
  28004. margin-right: 20px;
  28005. width: 270px;
  28006. height: 149px;
  28007. display: flex;
  28008. flex-direction: column;
  28009. align-items: center;
  28010. border-radius: 5px;
  28011. margin-top: 10px;
  28012. text-align: center;
  28013. cursor: pointer;
  28014. justify-content: center;
  28015. }
  28016. .addEva>img {
  28017. width: 50px;
  28018. object-fit: cover;
  28019. }
  28020. .uploadFm {
  28021. border: 1px dashed #ccc;
  28022. width: 100%;
  28023. height: 140px;
  28024. position: relative;
  28025. cursor: pointer;
  28026. display: flex;
  28027. flex-direction: column;
  28028. justify-content: center;
  28029. align-items: center;
  28030. font-size: 14px;
  28031. color: #6e6e6e;
  28032. position: relative;
  28033. }
  28034. .cover_p {
  28035. width: 100% !important;
  28036. height: 100%;
  28037. object-fit: cover;
  28038. }
  28039. .uploadFm2:hover .cover_mask {
  28040. display: flex !important;
  28041. }
  28042. .cover_mask {
  28043. display: none;
  28044. width: 100%;
  28045. height: 100%;
  28046. position: absolute;
  28047. background: #00000054;
  28048. align-items: center;
  28049. justify-content: center;
  28050. flex-direction: column;
  28051. }
  28052. .cover_mask>img {
  28053. width: 30px;
  28054. }
  28055. .cover_mask>span {
  28056. color: #fff;
  28057. font-size: 12px;
  28058. }
  28059. .uploadFm>img {
  28060. width: 50px;
  28061. }
  28062. .fileCss {
  28063. width: 100%;
  28064. display: flex;
  28065. flex-direction: row;
  28066. flex-wrap: nowrap;
  28067. justify-content: space-around;
  28068. align-items: center;
  28069. padding-top: 15px;
  28070. }
  28071. .fileCss>div {
  28072. display: flex;
  28073. flex-direction: column;
  28074. align-items: center;
  28075. }
  28076. .fileCss .spanName {
  28077. margin-top: 10px;
  28078. }
  28079. .sysPicBox {
  28080. display: flex;
  28081. flex-direction: row;
  28082. flex-wrap: wrap;
  28083. align-content: flex-start;
  28084. height: 435px;
  28085. overflow: auto;
  28086. position: relative;
  28087. }
  28088. .picNone {
  28089. position: absolute;
  28090. left: 50%;
  28091. top: 45%;
  28092. transform: translate(-50%, -50%);
  28093. width: fit-content;
  28094. color: #9c9c9c;
  28095. }
  28096. .sysPic {
  28097. width: 200px;
  28098. height: 115px;
  28099. margin: 0 20px 20px 0;
  28100. cursor: pointer;
  28101. }
  28102. .sysPic>img,
  28103. .isSysPic>img,
  28104. .deletePic>img {
  28105. width: 100%;
  28106. height: 100%;
  28107. object-fit: cover;
  28108. }
  28109. .isSysPic {
  28110. width: 200px;
  28111. height: 115px;
  28112. position: relative;
  28113. }
  28114. .deletePic {
  28115. width: 20px;
  28116. height: 20px;
  28117. position: absolute;
  28118. top: 0;
  28119. right: 0;
  28120. cursor: pointer;
  28121. }
  28122. .select_box1 {
  28123. height: 100%;
  28124. }
  28125. .select_box1_img {
  28126. background: #fff;
  28127. border-radius: 5px;
  28128. padding: 15px;
  28129. box-sizing: border-box;
  28130. margin-bottom: 20px;
  28131. }
  28132. .select_box1_title {
  28133. padding: 0 0 15px 0;
  28134. border-bottom: 1px solid #eee;
  28135. margin-bottom: 15px;
  28136. }
  28137. .select_box1_title span:nth-child(1) {
  28138. font-size: 16px;
  28139. margin-right: 20px;
  28140. color: #000;
  28141. }
  28142. .select_box1_title span:nth-child(2) {
  28143. font-size: 14px;
  28144. color: rgb(112, 112, 112);
  28145. }
  28146. .select_box1_add_img {}
  28147. .select_box1_select {
  28148. background: #fff;
  28149. border-radius: 5px;
  28150. padding: 15px;
  28151. box-sizing: border-box;
  28152. height: calc(100% - 200px);
  28153. overflow: auto;
  28154. }
  28155. .select_box2 {
  28156. height: 100%;
  28157. }
  28158. .select_box2_title {
  28159. background: #fff;
  28160. border-radius: 5px;
  28161. padding: 5px 10px;
  28162. box-sizing: border-box;
  28163. margin-bottom: 10px;
  28164. }
  28165. .select_box2_box {
  28166. display: flex;
  28167. height: calc(100% - 30px);
  28168. }
  28169. .select_box2_img {
  28170. width: calc(100% - 310px);
  28171. height: 100%;
  28172. overflow: auto;
  28173. background: #fff;
  28174. border-radius: 5px;
  28175. }
  28176. .select_box2_img img {
  28177. width: 100%;
  28178. }
  28179. .select_box2_answer {
  28180. background: #fff;
  28181. margin-left: 10px;
  28182. border-radius: 5px;
  28183. width: 300px;
  28184. overflow: auto;
  28185. height: 100%;
  28186. display: flex;
  28187. flex-direction: column;
  28188. align-items: center;
  28189. padding-top: 10px;
  28190. box-sizing: border-box;
  28191. }
  28192. .select_box2_answer_box {
  28193. margin: 0 0 10px 0;
  28194. width: 85%;
  28195. }
  28196. .rate_textarea {
  28197. font: inherit;
  28198. color: currentColor;
  28199. width: 100%;
  28200. padding: 8px 14px;
  28201. display: block;
  28202. min-width: 0;
  28203. outline: none;
  28204. border: 1px solid rgba(0, 0, 0, 0.23);
  28205. border-radius: 4px;
  28206. box-sizing: border-box;
  28207. background: #fff;
  28208. margin: 0 20px 0 0;
  28209. resize: none;
  28210. }
  28211. .select_answer_title {
  28212. text-align: left;
  28213. width: 85%;
  28214. margin-bottom: 10px;
  28215. font-size: 18px;
  28216. color: #8e8e8e;
  28217. }
  28218. .mask {
  28219. background-color: rgb(0 0 0 / 30%);
  28220. /* position: fixed; */
  28221. position: absolute;
  28222. top: 0;
  28223. left: 0;
  28224. width: 100%;
  28225. height: 100%;
  28226. z-index: 90;
  28227. display: flex;
  28228. align-items: center;
  28229. justify-content: center;
  28230. }
  28231. .progressBox {
  28232. width: 300px;
  28233. height: 150px;
  28234. background: #fff;
  28235. border-radius: 10px;
  28236. box-shadow: 0 0 6px 1px #bfbfbf;
  28237. display: flex;
  28238. align-items: center;
  28239. justify-content: center;
  28240. flex-direction: column;
  28241. position: relative;
  28242. color: #6c6c6c;
  28243. }
  28244. .progressBox>>>.el-progress-bar__outer {
  28245. background-color: #d1dfff !important;
  28246. }
  28247. .progressBox .lbox {
  28248. height: 50px;
  28249. font-size: 19px;
  28250. display: flex;
  28251. align-items: center;
  28252. color: #747474;
  28253. }
  28254. .progressBox .lbox img {
  28255. width: 40px;
  28256. margin-right: 20px;
  28257. }
  28258. .closeCss {
  28259. position: absolute;
  28260. top: 8px;
  28261. right: 8px;
  28262. cursor: pointer;
  28263. width: 20px;
  28264. height: 20px;
  28265. }
  28266. .closeCss>img {
  28267. width: 100%;
  28268. height: 100%;
  28269. }
  28270. .updateTips::before {
  28271. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  28272. font-size: 14px;
  28273. margin-left: 20px;
  28274. font-weight: 400;
  28275. color: #ff3a3a;
  28276. margin-bottom: 10px;
  28277. display: block;
  28278. }
  28279. .updateMask {
  28280. width: 100%;
  28281. z-index: 3;
  28282. top: 0;
  28283. position: absolute;
  28284. /* background-color: rgba(0,0,0,.3); */
  28285. }
  28286. .t_j_box {
  28287. display: flex;
  28288. }
  28289. .t_j_box span:nth-child(1) {
  28290. width: 15%;
  28291. overflow: hidden;
  28292. margin-right: 10px;
  28293. text-overflow: ellipsis;
  28294. white-space: nowrap;
  28295. }
  28296. .t_j_box span:nth-child(2) {
  28297. width: 30%;
  28298. overflow: hidden;
  28299. text-overflow: ellipsis;
  28300. margin-right: 10px;
  28301. }
  28302. .t_j_box span:nth-child(3) {
  28303. max-width: calc(55% - 20px);
  28304. overflow: hidden;
  28305. text-overflow: ellipsis;
  28306. }
  28307. .sentenBox {
  28308. background: #fff;
  28309. height: 600px;
  28310. overflow: auto;
  28311. background-image: url("../../../assets/icon/conSentences/csBg.png");
  28312. background-position: 102%;
  28313. background-repeat: no-repeat;
  28314. background-size: 60%;
  28315. }
  28316. .sentenBox>.sentenContent {
  28317. padding-bottom: 10px;
  28318. width: 97%;
  28319. margin: 0 auto;
  28320. }
  28321. .sentenBox>.sentenContent+.sentenContent {
  28322. border-top: 1px solid #cbcbcb;
  28323. }
  28324. .addSen {
  28325. background: #409efe;
  28326. width: 90px;
  28327. color: #fff;
  28328. height: 35px;
  28329. text-align: center;
  28330. line-height: 35px;
  28331. border-radius: 5px;
  28332. float: right;
  28333. margin: 10px 20px 0 0;
  28334. cursor: pointer;
  28335. }
  28336. .sentenTop {
  28337. display: flex;
  28338. flex-direction: row;
  28339. flex-wrap: nowrap;
  28340. align-items: center;
  28341. }
  28342. .sentenTop::before {
  28343. content: attr(index);
  28344. background: #3681fc;
  28345. border-radius: 50%;
  28346. color: #fff;
  28347. width: 25px;
  28348. height: 25px;
  28349. min-width: 25px;
  28350. min-height: 25px;
  28351. text-align: center;
  28352. line-height: 25px;
  28353. margin-right: 5px;
  28354. }
  28355. .sentenTop>div:nth-child(2) {
  28356. width: 300px;
  28357. margin: 0 15px;
  28358. }
  28359. .sentenTop>div:nth-child(3) {
  28360. background: #409efe;
  28361. color: #fff;
  28362. width: 65px;
  28363. height: 35px;
  28364. text-align: center;
  28365. line-height: 35px;
  28366. border-radius: 5px;
  28367. cursor: pointer;
  28368. }
  28369. .cardList {
  28370. padding: 30px 0 20px 0;
  28371. display: flex;
  28372. flex-direction: row;
  28373. flex-wrap: wrap;
  28374. align-items: center;
  28375. box-sizing: border-box;
  28376. border-bottom: 1px solid #f4f4f4;
  28377. width: 98%;
  28378. margin: 0 auto;
  28379. }
  28380. .rightCardList {
  28381. display: flex;
  28382. flex-wrap: wrap;
  28383. }
  28384. .cardBox {
  28385. display: flex;
  28386. flex-direction: row;
  28387. flex-wrap: wrap;
  28388. align-items: center;
  28389. align-content: center;
  28390. }
  28391. .isCard,
  28392. .isCard1 {
  28393. width: auto;
  28394. padding: 0 20px;
  28395. height: 65px;
  28396. text-align: center;
  28397. line-height: 65px;
  28398. font-size: 14px;
  28399. cursor: pointer;
  28400. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  28401. background-size: 100% 100%;
  28402. position: relative;
  28403. z-index: 99;
  28404. }
  28405. .isCard1 {
  28406. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  28407. }
  28408. .isCard:hover .deleteWord {
  28409. display: block;
  28410. }
  28411. .isCard>div:nth-child(1),
  28412. .isCard1>div:nth-child(1) {
  28413. white-space: nowrap;
  28414. overflow: hidden;
  28415. text-overflow: ellipsis;
  28416. width: 100%;
  28417. margin: 0 auto;
  28418. }
  28419. .card {
  28420. width: 140px;
  28421. height: 65px;
  28422. }
  28423. .card>img {
  28424. width: 100%;
  28425. height: 100%;
  28426. }
  28427. .rightCardBox {
  28428. width: 98%;
  28429. margin: 10px auto 0;
  28430. }
  28431. .rightCardBox>div:nth-child(1) {
  28432. margin-bottom: 10px;
  28433. }
  28434. .cardCss {
  28435. display: flex;
  28436. flex-direction: column;
  28437. flex-wrap: nowrap;
  28438. align-items: center;
  28439. border-bottom: 3px solid #b4c3d3;
  28440. padding: 0 0 5px 0;
  28441. /* margin-right: 10px; */
  28442. }
  28443. .cardCss>div:nth-child(2) {
  28444. background: #5b7b9d;
  28445. color: #fff;
  28446. width: 20px;
  28447. height: 20px;
  28448. border-radius: 50%;
  28449. text-align: center;
  28450. line-height: 20px;
  28451. }
  28452. .sentenTopBox {
  28453. display: flex;
  28454. flex-direction: row;
  28455. flex-wrap: nowrap;
  28456. align-items: center;
  28457. justify-content: space-between;
  28458. padding: 55px 0 0 20px;
  28459. box-sizing: border-box;
  28460. width: 85%;
  28461. }
  28462. .rb_c_ai_box,
  28463. .stepsBottom {
  28464. width: 100%;
  28465. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  28466. /* background: #f7f7f7; */
  28467. border-radius: 10px;
  28468. overflow: hidden;
  28469. /* height: 100%; */
  28470. height: calc(100% - 55px);
  28471. }
  28472. .navTop {
  28473. background: #53749b;
  28474. color: #fff;
  28475. height: 40px;
  28476. line-height: 40px;
  28477. padding-left: 15px;
  28478. font-size: 18px;
  28479. }
  28480. .navBottom {
  28481. /* background: #6b91b7; */
  28482. height: 100%;
  28483. overflow: auto;
  28484. padding: 10px 0;
  28485. }
  28486. .navStage {
  28487. display: flex;
  28488. flex-direction: row;
  28489. flex-wrap: nowrap;
  28490. align-items: center;
  28491. padding: 10px 10px 10px 0;
  28492. cursor: pointer;
  28493. background: #ffffff;
  28494. width: 95%;
  28495. margin: 5px auto 5px;
  28496. box-sizing: border-box;
  28497. border-radius: 5px;
  28498. flex-wrap: wrap;
  28499. position: relative;
  28500. }
  28501. .navStage:hover>.chapter_upload_drag {
  28502. display: block;
  28503. }
  28504. .navTask:hover>.chapter_upload_drag {
  28505. display: block;
  28506. }
  28507. .chapter_upload:hover>.chapter_upload_drag {
  28508. display: block;
  28509. }
  28510. .navStage::before {
  28511. content: "";
  28512. display: block;
  28513. width: 16px;
  28514. height: 16px;
  28515. background-image: url(../../../assets/icon/new/icon_stage.png);
  28516. background-size: 100%;
  28517. margin-left: 25px;
  28518. }
  28519. .navStage .chapter_unit_open {
  28520. content: "";
  28521. display: block;
  28522. width: 16px;
  28523. height: 16px;
  28524. background-image: url(../../../assets/icon/new/down.png);
  28525. transform: rotate(-90deg);
  28526. background-size: 100%;
  28527. margin-left: 10px;
  28528. transition: all 0.5s;
  28529. }
  28530. .isNavStageOpen .chapter_unit_open {
  28531. transform: rotate(0deg);
  28532. }
  28533. .isNavStage {
  28534. background: #0061ff;
  28535. }
  28536. .isNavStage::before {
  28537. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  28538. }
  28539. .isNavStage .chapter_unit_open {
  28540. background-image: url(../../../assets/icon/new/downC.png);
  28541. }
  28542. .isNavStage .nt_taskName {
  28543. font-weight: bold !important;
  28544. color: #ffffff !important;
  28545. }
  28546. .isNavStage .nt_taskTitle {
  28547. font-weight: bold !important;
  28548. color: #fff !important;
  28549. }
  28550. .navStage .nt_taskBox {
  28551. width: calc(100% - 68px);
  28552. padding: 0 0 0 5px;
  28553. box-sizing: border-box;
  28554. box-sizing: border-box;
  28555. display: flex;
  28556. flex-direction: row;
  28557. flex-wrap: nowrap;
  28558. align-items: baseline;
  28559. }
  28560. .navStage .nt_taskTitle {
  28561. color: #060e17;
  28562. line-height: 25px;
  28563. font-size: 16px;
  28564. }
  28565. .navStage .nt_taskName {
  28566. max-width: calc(100% - 82px);
  28567. white-space: nowrap;
  28568. overflow: hidden;
  28569. text-overflow: ellipsis;
  28570. font-size: 16px;
  28571. color: #060e17;
  28572. }
  28573. .navTask {
  28574. display: flex;
  28575. flex-direction: row;
  28576. flex-wrap: nowrap;
  28577. align-items: center;
  28578. padding: 10px 10px 10px 0;
  28579. cursor: pointer;
  28580. background: #ffffff;
  28581. width: 95%;
  28582. margin: 5px auto 5px;
  28583. box-sizing: border-box;
  28584. border-radius: 5px;
  28585. flex-wrap: wrap;
  28586. position: relative;
  28587. }
  28588. .navTask .chapter_upload_open {
  28589. content: "";
  28590. display: block;
  28591. width: 16px;
  28592. height: 16px;
  28593. background-image: url(../../../assets/icon/new/icon_arrow.png);
  28594. background-size: 100%;
  28595. margin-left: 23px;
  28596. }
  28597. .noImage .chapter_upload_open {
  28598. display: none;
  28599. background-image: unset !important;
  28600. }
  28601. .isNavOpen .chapter_upload_open {
  28602. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  28603. transform: rotate(90deg);
  28604. }
  28605. .isNavTask .chapter_upload_open {
  28606. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  28607. transform: rotate(-90deg);
  28608. }
  28609. .isNavTask.isNavOpen .chapter_upload_open {
  28610. transform: rotate(0deg);
  28611. }
  28612. .dragOverTop {
  28613. border-top: 2px solid #0061ff !important;
  28614. border-radius: 0 !important;
  28615. margin-top: 10px;
  28616. }
  28617. .dragOverBottom {
  28618. border-bottom: 2px solid #0061ff !important;
  28619. border-radius: 0 !important;
  28620. margin-top: 10px;
  28621. }
  28622. .dragOverTop2 {
  28623. border-top: 2px solid #0061ff !important;
  28624. border-radius: 0 !important;
  28625. }
  28626. .dragOverBottom2 {
  28627. border-bottom: 2px solid #0061ff !important;
  28628. border-radius: 0 !important;
  28629. }
  28630. .isNavTask {
  28631. /* background: #3681FC; */
  28632. background: #eef3fb;
  28633. }
  28634. .isNavTask>.chapter_upload_drag {
  28635. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  28636. }
  28637. .isNavTask .nt_taskName {
  28638. /* color: #fff !important; */
  28639. font-weight: bold !important;
  28640. color: #0061ff !important;
  28641. }
  28642. .isNavTask .nt_taskTitle {
  28643. /* color: #AECCFE !important; */
  28644. font-weight: bold !important;
  28645. color: #0061ff !important;
  28646. }
  28647. .navTask .nt_taskBox {
  28648. width: calc(100% - 40px);
  28649. padding: 0 0 0 5px;
  28650. box-sizing: border-box;
  28651. box-sizing: border-box;
  28652. display: flex;
  28653. flex-direction: row;
  28654. flex-wrap: nowrap;
  28655. align-items: baseline;
  28656. }
  28657. .navTask .nt_taskTitle {
  28658. /* color: #717C8D; */
  28659. color: #060e17;
  28660. line-height: 25px;
  28661. font-size: 16px;
  28662. /* min-width: 66px; */
  28663. }
  28664. .navTask .nt_taskName {
  28665. /* color: #fff; */
  28666. /* max-width: 130px; */
  28667. /* width: 100%; */
  28668. max-width: calc(100% - 66px);
  28669. font-size: 16px;
  28670. color: #060e17;
  28671. /* color: #0E1E33; */
  28672. }
  28673. .navTask .nt_taskName span {
  28674. width: 100%;
  28675. white-space: nowrap;
  28676. overflow: hidden;
  28677. text-overflow: ellipsis;
  28678. display: block;
  28679. }
  28680. .gjBox {
  28681. width: calc(100% - 25px);
  28682. padding: 0 0 0 0;
  28683. box-sizing: border-box;
  28684. border-left: 1px solid #cad1dc;
  28685. margin-left: 25px;
  28686. }
  28687. .gjBox>div {
  28688. display: flex;
  28689. align-items: center;
  28690. }
  28691. .gjBox>div::before {
  28692. content: "";
  28693. height: 1px;
  28694. width: 10px;
  28695. background: #cad1dc;
  28696. display: block;
  28697. margin-right: 5px;
  28698. }
  28699. .gjCss {
  28700. display: flex;
  28701. flex-direction: row;
  28702. flex-wrap: nowrap;
  28703. align-items: center;
  28704. padding: 15px 0;
  28705. box-sizing: border-box;
  28706. font-size: 14px;
  28707. cursor: pointer;
  28708. }
  28709. .isGjCss {
  28710. color: #0061ff;
  28711. }
  28712. .groupBox {}
  28713. .groupContent+.groupContent {
  28714. margin-top: 30px;
  28715. }
  28716. .groupTitle {
  28717. font-size: 24px;
  28718. color: rgb(80, 80, 80);
  28719. margin-bottom: 20px;
  28720. }
  28721. .groupName {
  28722. display: flex;
  28723. align-items: center;
  28724. }
  28725. .groupn {
  28726. font-size: 15px;
  28727. margin-right: 10px;
  28728. }
  28729. .groupName+.groupName {
  28730. margin-top: 15px;
  28731. }
  28732. .groupBtn {
  28733. margin-left: 10px;
  28734. }
  28735. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  28736. text-align: left;
  28737. }
  28738. .radioBox>div {
  28739. margin: 10px 0 0 10px;
  28740. }
  28741. .radioBox>>>.el-radio__input,
  28742. .radioBox>>>.el-checkbox__inner {
  28743. margin-left: 10px;
  28744. }
  28745. .radioBox>>>.el-radio__label,
  28746. .radioBox>>>.el-checkbox__label {
  28747. display: flex;
  28748. align-items: center;
  28749. }
  28750. .inImg {
  28751. width: 50px;
  28752. }
  28753. .inImg>img {
  28754. width: 100%;
  28755. height: 100%;
  28756. object-fit: cover;
  28757. }
  28758. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  28759. height: auto;
  28760. padding: 10px;
  28761. margin: 0;
  28762. }
  28763. .upCss>>>.el-upload-list {
  28764. width: 100%;
  28765. }
  28766. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  28767. width: 100%;
  28768. height: 120px;
  28769. object-fit: contain;
  28770. background: unset;
  28771. margin-left: 0;
  28772. }
  28773. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  28774. display: none;
  28775. }
  28776. .tcMember+.tcMember::before {
  28777. content: "、";
  28778. }
  28779. .xzUpImg {
  28780. width: 25px;
  28781. height: 25px;
  28782. min-width: 25px;
  28783. min-height: 25px;
  28784. cursor: pointer;
  28785. margin: 0 10px;
  28786. }
  28787. .xzUpImg>img {
  28788. width: 100%;
  28789. height: 100%;
  28790. }
  28791. .closeCss {
  28792. position: absolute;
  28793. top: 8px;
  28794. right: 8px;
  28795. cursor: pointer;
  28796. width: 20px;
  28797. height: 20px;
  28798. }
  28799. .closeCss>img {
  28800. width: 100%;
  28801. height: 100%;
  28802. }
  28803. .moveBtn {
  28804. display: flex;
  28805. flex-direction: row;
  28806. flex-wrap: nowrap;
  28807. align-items: center;
  28808. width: 55px;
  28809. }
  28810. .timuUpImg {
  28811. display: flex;
  28812. flex-direction: row;
  28813. align-items: center;
  28814. width: 100%;
  28815. margin-right: 10px;
  28816. }
  28817. .timuUpImg>div:nth-child(1) {
  28818. margin-right: 10px;
  28819. display: flex;
  28820. align-items: center;
  28821. width: 100%;
  28822. }
  28823. .timuImgBox {
  28824. margin: 10px 0;
  28825. display: flex;
  28826. flex-direction: column;
  28827. flex-wrap: wrap;
  28828. align-items: flex-start;
  28829. }
  28830. .timuImg {
  28831. width: 100px;
  28832. margin: 5px 0;
  28833. cursor: pointer;
  28834. position: relative;
  28835. }
  28836. .timuImg:hover .deleteWord {
  28837. display: block;
  28838. }
  28839. .deleteWord {
  28840. width: 25px;
  28841. height: 25px;
  28842. position: absolute;
  28843. right: -5px;
  28844. top: -5px;
  28845. cursor: pointer;
  28846. display: none;
  28847. }
  28848. .timuImg>img,
  28849. .deleteWord>img {
  28850. width: 100%;
  28851. height: 100%;
  28852. object-fit: cover;
  28853. }
  28854. .e_add_delete {
  28855. cursor: pointer;
  28856. margin-left: 10px;
  28857. }
  28858. .pType_box {
  28859. margin: 15px 0;
  28860. align-items: flex-end;
  28861. }
  28862. .noneBox {
  28863. height: 200px;
  28864. width: 100%;
  28865. display: flex;
  28866. align-items: center;
  28867. justify-content: center;
  28868. flex-direction: column;
  28869. /* margin-top: 150px; */
  28870. }
  28871. .noneBox>img {
  28872. width: 95px;
  28873. }
  28874. .noneBox>span {
  28875. margin-top: 10px;
  28876. color: #717c8d;
  28877. }
  28878. .rb_c_box {
  28879. width: 100%;
  28880. height: 100%;
  28881. display: flex;
  28882. /* padding: 20px; */
  28883. box-sizing: border-box;
  28884. justify-content: space-between;
  28885. }
  28886. .rb_c_box_left {
  28887. height: 100%;
  28888. background: #fff;
  28889. width: 270px;
  28890. min-width: 270px;
  28891. border-radius: 8px;
  28892. margin-right: 10px;
  28893. }
  28894. .rb_c_box_right {
  28895. height: 100%;
  28896. width: calc(100%);
  28897. overflow: hidden;
  28898. }
  28899. .rb_c_box_btn {
  28900. display: flex;
  28901. justify-content: flex-start;
  28902. height: 50px;
  28903. align-items: center;
  28904. background: #fff;
  28905. padding: 0 20px;
  28906. border-radius: 10px 10px 0px 0px;
  28907. border-bottom: 1px solid #cad1dc;
  28908. }
  28909. .rb_c_box_btn > .title{
  28910. font-size: 24px;
  28911. font-weight: bold;
  28912. display: flex;
  28913. align-items: center;
  28914. }
  28915. .rb_c_box_btn > .title:before{
  28916. content: '';
  28917. background-image: url(../../../assets/icon/course/courseName.png);
  28918. width: 24px;
  28919. height: 24px;
  28920. background-size: 100% 100%;
  28921. margin-right: 10px;
  28922. }
  28923. .rb_c_box_right>.basic_box {
  28924. /* background: #fff; */
  28925. border-radius: 0;
  28926. height: calc(100% - 50px);
  28927. overflow: auto;
  28928. padding: 0;
  28929. }
  28930. .textarea_css {
  28931. display: block;
  28932. resize: none;
  28933. padding: 10px 15px;
  28934. line-height: 1.5;
  28935. box-sizing: border-box;
  28936. width: 100%;
  28937. font-size: 14px;
  28938. color: #606266;
  28939. background-color: #fff;
  28940. background-image: none;
  28941. border: 1px solid #dcdfe6;
  28942. border-radius: 4px;
  28943. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  28944. outline: none;
  28945. overflow: hidden;
  28946. height: 46px;
  28947. font-family: "Microsoft YaHei";
  28948. }
  28949. .textarea_css::-webkit-input-placeholder {
  28950. color: #c0c4cc;
  28951. }
  28952. .textarea_css:focus {
  28953. border-color: #409eff;
  28954. outline: 0;
  28955. }
  28956. .addEditor>>>.text {
  28957. height: auto;
  28958. min-height: 100px;
  28959. }
  28960. .addEditor>>>.w-e-text-container {
  28961. min-height: 100px;
  28962. }
  28963. .moveBtn2 {
  28964. flex-direction: column;
  28965. width: fit-content;
  28966. margin: 0 10px 0 10px;
  28967. }
  28968. .moveBtn2 .chapter_upload_down,
  28969. .moveBtn2 .chapter_upload_up {
  28970. width: 16px;
  28971. height: 16px;
  28972. }
  28973. .moveBtn2 .chapter_upload_up::after,
  28974. .moveBtn2 .chapter_upload_down::after {
  28975. width: 10px;
  28976. height: 10px;
  28977. }
  28978. .fullStyle>>>.el-dialog__body {
  28979. height: calc(100% - 125px) !important;
  28980. box-sizing: border-box;
  28981. }
  28982. .fullStyle1>>>.el-dialog__body {
  28983. height: auto !important;
  28984. }
  28985. .fullStyle>>>.el-dialog {
  28986. width: 100% !important;
  28987. max-width: 100% !important;
  28988. height: 100% !important;
  28989. margin: 0 !important;
  28990. }
  28991. .fullStyle {
  28992. width: 100% !important;
  28993. max-width: 100% !important;
  28994. height: 100% !important;
  28995. margin: 0 auto !important;
  28996. }
  28997. .wb_j_box_btn {
  28998. width: calc(100% - 30px);
  28999. display: flex;
  29000. height: 40px;
  29001. border: 1.5px solid #cad1dc;
  29002. border-radius: 4px;
  29003. box-sizing: border-box;
  29004. align-items: center;
  29005. font-size: 14px;
  29006. cursor: pointer;
  29007. overflow: hidden;
  29008. }
  29009. .wb_j_box_btn:hover {
  29010. border: 1.5px solid #0061ff;
  29011. }
  29012. .wb_j_box_title {
  29013. background: #f0f4fa;
  29014. height: 100%;
  29015. line-height: 40px;
  29016. width: 90px;
  29017. text-align: center;
  29018. color: #060e17;
  29019. border-right: 1.5px solid #cad1dc;
  29020. box-sizing: border-box;
  29021. }
  29022. .wb_j_box_btn_c {
  29023. width: calc(100% - 90px);
  29024. padding: 0 35px 0 10px;
  29025. box-sizing: border-box;
  29026. position: relative;
  29027. }
  29028. .wb_j_box_span {
  29029. width: 100%;
  29030. overflow: hidden;
  29031. white-space: nowrap;
  29032. text-overflow: ellipsis;
  29033. word-wrap: break-word;
  29034. color: #717c8d;
  29035. }
  29036. .wb_j_box_arrow {
  29037. content: "";
  29038. width: 14px;
  29039. height: 14px;
  29040. background: url(../../../assets/icon/new/u_arrow.png);
  29041. background-size: 100% 100%;
  29042. position: absolute;
  29043. right: 12px;
  29044. top: 50%;
  29045. transform: translateY(-50%);
  29046. }
  29047. .check_classBox {
  29048. height: 400px;
  29049. display: flex;
  29050. border-top: 1.5px solid #e7ebf1;
  29051. border-bottom: 1.5px solid #e7ebf1;
  29052. }
  29053. .check_class_right {
  29054. width: 130px;
  29055. border-right: 1px solid #e7ebf1;
  29056. display: flex;
  29057. align-items: center;
  29058. flex-direction: column;
  29059. height: 100%;
  29060. overflow: auto;
  29061. padding: 15px 0;
  29062. box-sizing: border-box;
  29063. }
  29064. .check_class {
  29065. width: 85%;
  29066. border-radius: 5px;
  29067. height: 30px;
  29068. min-height: 30px;
  29069. line-height: 30px;
  29070. text-align: center;
  29071. padding: 0 10px;
  29072. box-sizing: border-box;
  29073. cursor: pointer;
  29074. white-space: nowrap;
  29075. overflow: hidden;
  29076. text-overflow: ellipsis;
  29077. }
  29078. .check_class.activeX {
  29079. background: #e0eafb;
  29080. color: #3681fc;
  29081. font-weight: 700;
  29082. }
  29083. .check_class+.check_class {
  29084. margin-top: 15px;
  29085. }
  29086. .check_class_left {
  29087. background: #fafafa;
  29088. width: calc(100% - 130px);
  29089. padding: 15px;
  29090. box-sizing: border-box;
  29091. }
  29092. .check_class_all_box {
  29093. display: flex;
  29094. margin-bottom: 10px;
  29095. }
  29096. .all_check {
  29097. display: flex;
  29098. align-items: center;
  29099. padding: 2px 0 0;
  29100. margin-left: 10px;
  29101. }
  29102. .all_check>>>.el-checkbox__label {
  29103. line-height: 18px;
  29104. }
  29105. .check_class_left_title {
  29106. font-size: 16px;
  29107. font-weight: 700;
  29108. }
  29109. .check_class_item {
  29110. display: flex;
  29111. flex-wrap: wrap;
  29112. height: calc(100% - 45px);
  29113. overflow: auto;
  29114. justify-content: flex-start;
  29115. align-items: flex-start;
  29116. align-content: flex-start;
  29117. }
  29118. .class_item:first-child {
  29119. /* margin: 0 15px 15px 67px; */
  29120. }
  29121. .class_item {
  29122. margin: 0 15px 15px 0;
  29123. }
  29124. .class_item:hover>>>.el-checkbox__label {
  29125. color: #409eff;
  29126. }
  29127. .class_item>>>.el-checkbox__label {
  29128. color: #0e1e33;
  29129. }
  29130. .class_item:hover>>>.el-checkbox__inner {
  29131. border-color: #409eff;
  29132. }
  29133. .class_item>>>.el-checkbox,
  29134. .class_item>>>.el-checkbox__input {
  29135. display: flex;
  29136. align-items: center;
  29137. }
  29138. .taskTitle {
  29139. font-size: 20px;
  29140. font-weight: bold;
  29141. margin-bottom: 35px;
  29142. }
  29143. .taskTitle:after {
  29144. content: "";
  29145. width: 100%;
  29146. display: block;
  29147. height: 1px;
  29148. background: #cad1dc;
  29149. position: absolute;
  29150. left: 0;
  29151. margin: 15px 0 0;
  29152. }
  29153. .eva_btn_box {
  29154. margin: 20px 0px 0 0;
  29155. display: flex;
  29156. flex-direction: row;
  29157. flex-wrap: nowrap;
  29158. align-items: center;
  29159. justify-content: space-between;
  29160. width: 100%;
  29161. }
  29162. .eva_btn_left_box {
  29163. display: flex;
  29164. flex-direction: row;
  29165. flex-wrap: nowrap;
  29166. align-items: center;
  29167. }
  29168. .addTypeChoose {
  29169. display: flex;
  29170. flex-direction: row;
  29171. flex-wrap: nowrap;
  29172. align-items: center;
  29173. margin: 15px 0;
  29174. }
  29175. .addTypeBox {
  29176. display: flex;
  29177. flex-direction: column;
  29178. flex-wrap: nowrap;
  29179. align-items: center;
  29180. }
  29181. .addTypeChoose {
  29182. display: flex;
  29183. flex-direction: row;
  29184. flex-wrap: nowrap;
  29185. align-items: center;
  29186. margin: 15px 0;
  29187. }
  29188. .buchong_box {
  29189. background: #E0EAFB66;
  29190. width: calc(100% - 20px);
  29191. min-height: 50px;
  29192. display: flex;
  29193. align-items: center;
  29194. justify-content: center;
  29195. margin: 0 auto;
  29196. }
  29197. .outline {
  29198. width: calc(100% - 40px);
  29199. margin: 0 auto;
  29200. }
  29201. .task_outline {
  29202. width: calc(100% - 40px);
  29203. margin: 0 auto;
  29204. }
  29205. .outline_box+.outline_box {
  29206. margin: 30px 0 0px;
  29207. }
  29208. .outline_task {
  29209. display: flex;
  29210. align-items: center;
  29211. margin-bottom: 10px;
  29212. }
  29213. .outline_btn{
  29214. display: flex;
  29215. align-items: center;
  29216. min-width: fit-content;
  29217. margin-left: 10px;
  29218. }
  29219. .outline_task .title {
  29220. font-size: 18px;
  29221. font-weight: bold;
  29222. min-width: 80px;
  29223. }
  29224. .op_task_box,
  29225. .op_tool_box,
  29226. .outline_detail {
  29227. position: relative;
  29228. }
  29229. .op_task_box:hover .op_box,
  29230. .op_tool_box:hover .op_box,
  29231. .outline_detail:hover .op_box {
  29232. display: flex
  29233. }
  29234. .op_box {
  29235. position: absolute;
  29236. bottom: 10px;
  29237. display: none;
  29238. align-items: center;
  29239. justify-content: space-between;
  29240. width: calc(100% - 20px);
  29241. left: 50%;
  29242. transform: translateX(-50%);
  29243. }
  29244. .op_box .op_remark {
  29245. color: #8E8E8E;
  29246. font-size: 14px;
  29247. }
  29248. .op_box_right{
  29249. display: flex;
  29250. }
  29251. .op_box_isquote{
  29252. display: flex;
  29253. }
  29254. .op_box_isquote *{
  29255. display: none;
  29256. }
  29257. .op_box_isquote .op_box_right,
  29258. .op_box_isquote .custom-switch{
  29259. display: flex;
  29260. margin-left: auto;
  29261. }
  29262. .op_task_box:hover .op_box_isquote *{
  29263. display: flex;
  29264. }
  29265. .op_task_box:hover .op_box_isquote .op_box_right,
  29266. .op_task_box:hover .op_box_isquote .custom-switch{
  29267. display: flex;
  29268. margin-left: unset;
  29269. }
  29270. .rb_c_nav {
  29271. width: calc(100% - 20px);
  29272. margin: 15px auto 0;
  29273. font-size: 18px;
  29274. display: flex;
  29275. align-items: center;
  29276. }
  29277. .rb_c_nav span {
  29278. cursor: pointer;
  29279. }
  29280. .rb_c_nav span+span {
  29281. margin-left: 10px;
  29282. }
  29283. .rb_c_nav span.active {
  29284. color: #0061FF
  29285. }
  29286. .text_panel>>>.text {
  29287. height: 400px;
  29288. }
  29289. .markBox{
  29290. padding: 20px 14px;
  29291. line-height: 29px;
  29292. font-size: 16px;
  29293. background: #f4f4f4;
  29294. border-radius: 5px;
  29295. word-break: break-word;
  29296. }
  29297. .info_box_t {
  29298. display: flex;
  29299. align-items: center;
  29300. flex-wrap: wrap;
  29301. }
  29302. .info_box_t + .info_box_t {
  29303. margin-top: 10px;
  29304. }
  29305. .info_box_t_box {
  29306. display: flex;
  29307. align-items: center;
  29308. flex-wrap: wrap;
  29309. margin-bottom: 5px;
  29310. }
  29311. .info_box_t_box + .info_box_t_box{
  29312. margin-left: 10px;
  29313. }
  29314. .info_box_t_box > span{
  29315. width: fit-content;
  29316. font-weight: bold;
  29317. font-size: 14px;
  29318. }
  29319. .info_box_t_box > input{
  29320. width: 150px !important;
  29321. margin: 0 5px 0 0;
  29322. }
  29323. .info_radio >>> .el-radio, .el-radio__input{
  29324. line-height: 18px;
  29325. height: 18px;
  29326. }
  29327. .mode_box{
  29328. display: flex;
  29329. align-items: center;
  29330. }
  29331. .mode_box > span{
  29332. padding: 0px 5px;
  29333. cursor: pointer;
  29334. }
  29335. .mode_box > span.active{
  29336. color: #409eff;
  29337. }
  29338. .chapter_upload_check {
  29339. width: 15px;
  29340. height: 15px;
  29341. min-width: 15px;
  29342. min-height: 15px;
  29343. cursor: pointer;
  29344. background-image: url('../../../assets/icon/check.png');
  29345. background-size: 100% 100%;
  29346. }
  29347. .chapter_upload_check.checked{
  29348. background-image: url('../../../assets/icon/checked.png');
  29349. }
  29350. .ruleBtn {
  29351. width: fit-content;
  29352. height: 36px;
  29353. line-height: 36px;
  29354. cursor: pointer;
  29355. color: #0061FF;
  29356. }
  29357. .stopBtn{
  29358. z-index: 999999;
  29359. position: absolute;
  29360. left: 50%;
  29361. top: calc(50% + 70px);
  29362. transform: translateX(-50%);
  29363. }
  29364. .rateSwitch >>> .el-switch__label.is-active {
  29365. color: #0061FF;
  29366. }
  29367. .rateSwitch >>> .el-switch__label--right{
  29368. display: flex;
  29369. align-items: center;
  29370. }
  29371. .rateSwitch >>> .el-switch__label--right::before{
  29372. content: "";
  29373. width: 14px;
  29374. height: 14px;
  29375. min-width: 14px;
  29376. min-height: 14px;
  29377. background-size: 100% 100%;
  29378. display: block;
  29379. margin-right: 7px;
  29380. background-image: url(../../../assets/icon/new/u_op2.png);
  29381. }
  29382. .rateSwitch >>> .el-switch__label--right.is-active::before{
  29383. background-image: url(../../../assets/icon/new/u_op.png);
  29384. }
  29385. .inter_box{
  29386. min-width: calc(50%);
  29387. min-height: 500px;
  29388. margin-right: 10px;
  29389. border: 1px solid #c7c7c7;
  29390. border-radius: 0px 5px 5px 5px;
  29391. overflow: hidden;
  29392. position: relative;
  29393. box-sizing: border-box;
  29394. }
  29395. .inter_box::before{
  29396. content:'对话区';
  29397. position: absolute;
  29398. left: 0;
  29399. top: 0;
  29400. display: block;
  29401. padding: 8px 10px;
  29402. background: #e0eafb;
  29403. color: #98a0ac;
  29404. font-size: 14px;
  29405. border-radius: 0 15px 15px 0;
  29406. }
  29407. .inter_voiceBox,
  29408. .inter_Detailbox{
  29409. border: 1px solid #c7c7c7;
  29410. border-radius: 0px 5px 5px 5px;
  29411. overflow: hidden;
  29412. position: relative;
  29413. box-sizing: border-box;
  29414. }
  29415. .inter_Detailbox::before{
  29416. content:'编辑区';
  29417. position: absolute;
  29418. left: 0;
  29419. top: 0;
  29420. display: block;
  29421. padding: 8px 10px;
  29422. background: #e0eafb;
  29423. color: #98a0ac;
  29424. font-size: 14px;
  29425. border-radius: 0 15px 15px 0;
  29426. }
  29427. .inter_voiceBox::before{
  29428. content:'录音区';
  29429. position: absolute;
  29430. left: 0;
  29431. top: 0;
  29432. display: block;
  29433. padding: 8px 10px;
  29434. background: #e0eafb;
  29435. color: #98a0ac;
  29436. font-size: 14px;
  29437. border-radius: 0 15px 15px 0;
  29438. z-index: 999;
  29439. }
  29440. .inter_box > iframe{
  29441. width: 100%;
  29442. height: 100%;
  29443. border: none;
  29444. }
  29445. .inter_setting{
  29446. display: block;
  29447. background-image: url(../../../assets/icon/course/setting.svg);
  29448. background-size: 100% 100%;
  29449. width: 20px;
  29450. height: 20px;
  29451. cursor: pointer;
  29452. margin-left: 10px;
  29453. }
  29454. .inter_setting_panel{
  29455. position: absolute;
  29456. left: 110px;
  29457. top: 30px;
  29458. background: #fff;
  29459. border-radius: 5px;
  29460. box-shadow: 0px 0px 2px 1px #00000017;
  29461. padding: 10px;
  29462. z-index: 999;
  29463. }
  29464. .panel_title{
  29465. text-align: center;
  29466. font-size: 18px;
  29467. margin-bottom: 10px;
  29468. }
  29469. .panel_tips{
  29470. font-weight: 500;
  29471. font-size: 14px;
  29472. text-align: center;
  29473. margin-bottom: 10px;
  29474. color: #6d6d6d;
  29475. }
  29476. .panel_input{
  29477. margin-bottom: 10px;
  29478. }
  29479. .panel_button{
  29480. display: flex;
  29481. justify-content: space-between;
  29482. }
  29483. .panel_input_record {
  29484. margin-top: 10px;
  29485. }
  29486. .panel_input_record > span{
  29487. margin-bottom: 5px;
  29488. display: block;
  29489. }
  29490. .custom-switch >>> .el-switch__label.is-active {
  29491. color: #0061FF;
  29492. }
  29493. .close_btn{
  29494. position: absolute;
  29495. top: 40px;
  29496. right: 10px;
  29497. box-shadow: 0 0 4px 2px #00000033;
  29498. border-radius: 70px 0 0 70px;
  29499. display: flex;
  29500. align-items: center;
  29501. padding-left: 5px;
  29502. padding: 10px 7px 10px 12px;
  29503. background: #fff;
  29504. cursor: pointer;
  29505. }
  29506. .close_btn > img {
  29507. width: 15px;
  29508. transition: 0.3s;
  29509. transform: rotate(0deg);
  29510. }
  29511. .close_btn_voice > img{
  29512. transform: rotate(180deg);
  29513. }
  29514. .resizable {
  29515. position: relative;
  29516. min-width: 350px; /* 最小宽度 */
  29517. max-width: 50%; /* 最大宽度 */
  29518. }
  29519. .resizer {
  29520. width: 12.8px;
  29521. height: 28.8px;
  29522. /* background: #ccc; */
  29523. position: absolute;
  29524. top: 50%;
  29525. left: 0;
  29526. cursor: ew-resize;
  29527. transform: translateY(-50%);
  29528. /* border-radius: 43px; */
  29529. background-image: url(../../../assets/icon/course/course_slide.png);
  29530. background-size: 100% 100%;
  29531. }
  29532. .pptBox{
  29533. position: fixed;
  29534. bottom: 10px;
  29535. left: 20px;
  29536. padding: 10px;
  29537. }
  29538. .pptBox > .box > div + div{
  29539. margin-top: 10px;
  29540. }
  29541. .ppClass{
  29542. background: #fff;
  29543. border-radius: 5px;
  29544. box-shadow: 0 0 6px 3px #00000030;
  29545. overflow: hidden;
  29546. }
  29547. .file-loading-class >>> .el-loading-spinner{
  29548. margin-top: -10px;
  29549. }
  29550. .file-loading-class >>> .el-loading-spinner .circular{
  29551. height: 20px;
  29552. width: 20px;
  29553. }
  29554. .button-toggle {
  29555. color: #007bff; /* 文本颜色 */
  29556. cursor: pointer; /* 鼠标悬停时显示手型 */
  29557. transition: color 0.2s; /* 文字颜色过渡效果 */
  29558. font-size: 14px;
  29559. }
  29560. .button-toggle:hover {
  29561. color: #0056b3; /* 悬停时的文字颜色 */
  29562. }
  29563. .button-toggle:focus {
  29564. outline: none; /* 去掉聚焦时的边框 */
  29565. }
  29566. .right_icon{
  29567. width: 12px;
  29568. height: 12px;
  29569. margin-left: 5px;
  29570. }
  29571. .buttonBoxB{
  29572. position: relative;
  29573. margin: 0 0 0 10px;
  29574. }
  29575. .buttonBoxB::after{
  29576. content: '';
  29577. display: block;
  29578. background-image: url(../../../assets/icon/course/downArrow.svg);
  29579. background-size: 100% 100%;
  29580. width: 15px;
  29581. height: 15px;
  29582. cursor: pointer;
  29583. margin-left: 5px;
  29584. }
  29585. .buttonBoxB:hover .buttonBox{
  29586. display: block;
  29587. }
  29588. .buttonBox {
  29589. position: absolute;
  29590. bottom: -0;
  29591. left: 0;
  29592. transform: translateY(100%);
  29593. background: #fff;
  29594. border-radius: 5px;
  29595. box-shadow: 0 0 3px 1px #e3e3e3;
  29596. width: 155px;
  29597. display: none;
  29598. z-index: 99999;
  29599. }
  29600. .buttonBox>div {
  29601. height: 40px;
  29602. line-height: 40px;
  29603. width: 100%;
  29604. text-align: center;
  29605. color: #000;
  29606. box-sizing: border-box;
  29607. }
  29608. .buttonBox>div+div {
  29609. border-top: 1px solid #e0e0e0;
  29610. }
  29611. .buttonBox>div:hover {
  29612. background: #f6f8ff;
  29613. }
  29614. .appendix_info_title {
  29615. padding: 15px 0 15px 0;
  29616. font-size: 20px;
  29617. font-weight: bold;
  29618. margin: 0 0 0 20px;
  29619. box-sizing: border-box;
  29620. display: flex;
  29621. align-items: center;
  29622. line-height: 20px;
  29623. }
  29624. .appendix_file_box{
  29625. width: 100%
  29626. }
  29627. .appendix_check_box{}
  29628. .appendix_check_box > div + div{
  29629. margin-top: 10px;
  29630. }
  29631. .appendix_check_task{
  29632. display: flex;
  29633. align-items: center;
  29634. }
  29635. .appendix_check_type{
  29636. display: flex;
  29637. align-items: center;
  29638. }
  29639. .appendix_check_task > span,
  29640. .appendix_check_type > span{
  29641. width: 100px;
  29642. }
  29643. .appendix_check_task > .checkButton,
  29644. .appendix_check_type > .checkButton{
  29645. border: 1px solid #1684fc;
  29646. color: #1684fc;
  29647. padding: 5px 10px;
  29648. border-radius: 5px;
  29649. margin-right: 10px;
  29650. cursor: pointer;
  29651. }
  29652. .appendix_check_task > .checkButton.checked,
  29653. .appendix_check_type > .checkButton.checked{
  29654. background: #1684fc;
  29655. color: #fff;
  29656. }
  29657. .appendix_check_all_box{
  29658. display: flex;
  29659. align-items: center;
  29660. margin-bottom: 5px;
  29661. }
  29662. .appendix_check_all{
  29663. display: flex;
  29664. align-items: center;
  29665. cursor: pointer;
  29666. }
  29667. .appendix_check_all_text{
  29668. margin-left: 5px;
  29669. }
  29670. .know_serach_box{
  29671. margin-bottom: 20px;
  29672. display: flex;
  29673. align-items: center;
  29674. }
  29675. .know_serach_box > span{
  29676. min-width: 100px;
  29677. }
  29678. .know_serach_box > .c_pub_button_add{
  29679. min-width: fit-content;
  29680. }
  29681. .add_chapters_check_box{
  29682. display: flex;
  29683. align-items: center;
  29684. height: 50px;
  29685. }
  29686. .add_chapters_check{
  29687. display: flex;
  29688. align-items: center;
  29689. cursor: pointer;
  29690. }
  29691. </style>