addCourse.vue 1.2 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止</div>
  4. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken" @click="cancelAjax('teacherTask')">停止</div>
  5. <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
  6. <div class="courseTop">
  7. <!-- <div class="stepsNav">
  8. <el-breadcrumb separator-class="el-icon-arrow-right">
  9. <el-breadcrumb-item :to="{
  10. path:
  11. '/course?userid=' +
  12. userid +
  13. '&oid=' +
  14. oid +
  15. '&org=' +
  16. org +
  17. '&role=' +
  18. role,
  19. }">课程管理</el-breadcrumb-item>
  20. <el-breadcrumb-item>
  21. <span style="color: rgb(15, 126, 255)">添加课程</span>
  22. </el-breadcrumb-item>
  23. </el-breadcrumb>
  24. </div> -->
  25. <div class="r_pub_button_retrun" style="margin-left: auto" @click="retrunCourse">返回</div>
  26. </div>
  27. <div class="right" style="height: calc(100% - 36px); margin-top: 36px;" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  28. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  29. <!-- @mouseenter="stepDisplay(true)"
  30. @mouseleave="stepDisplay(false)" -->
  31. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  32. <div class="stepBg" v-if="false">
  33. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  34. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  35. <div>
  36. <img src="../../../assets/icon/first.png" alt />
  37. </div>
  38. <div>填写基本信息</div>
  39. </div>
  40. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  41. <div>
  42. <img src="../../../assets/icon/firstNo.png" alt />
  43. </div>
  44. <div>填写基本信息</div>
  45. </div>
  46. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  47. </div>
  48. <!-- <div
  49. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  50. class="second"
  51. @click="navSteps(2)"
  52. >
  53. <div style="margin: 5px 10px 0 0; width: 2rem">
  54. <img src="../../../assets/icon/second.png" alt />
  55. </div>
  56. <div>选择课程模板</div>
  57. </div>
  58. <div
  59. v-else-if="cidType === 0 && isStepDisplay"
  60. class="secondNo"
  61. @click="navSteps(2)"
  62. >
  63. <div>
  64. <img src="../../../assets/icon/secondNo.png" alt />
  65. </div>
  66. <div>选择课程模板</div>
  67. </div> -->
  68. <!-- <div
  69. v-if="isStepDisplay"
  70. class="stepBorder"
  71. :class="{ 'border-active': steps > 2 }"
  72. ></div> -->
  73. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  74. <div>
  75. <img src="../../../assets/icon/third.png" alt />
  76. </div>
  77. <div>上传课程内容</div>
  78. </div>
  79. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  80. <div>
  81. <img src="../../../assets/icon/thirdNo.png" alt />
  82. </div>
  83. <div>上传课程内容</div>
  84. </div>
  85. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  86. <div v-if="steps > 3 && isStepDisplay" class="four">
  87. <div>
  88. <img src="../../../assets/icon/four.png" alt />
  89. </div>
  90. <div>上传完成</div>
  91. </div>
  92. <div v-else-if="isStepDisplay" class="fourNo">
  93. <div>
  94. <img src="../../../assets/icon/fourNo.png" alt />
  95. </div>
  96. <div>上传完成</div>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  101. style="padding: 0" :style="{
  102. height:
  103. !isStepDisplay && !isBtnDisplay
  104. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  105. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  106. }">
  107. <!-- <div class="updateMask" :style="{
  108. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  109. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  110. <div class="whiteBg" style="background: unset; padding: 0">
  111. <div>
  112. <div class="basic_box" style="padding: 0">
  113. <div class="big_box">
  114. <div class="left_first">
  115. <div :class="{
  116. updateTips:
  117. cid && userid != courseUserid && role != '1',
  118. }">
  119. <div style="width: 100%">
  120. <div class="course_input_box2">
  121. <div class="course_input_box">
  122. <div class="bb_courseIcon">
  123. <img src="../../../assets/icon/new/course.png" />
  124. </div>
  125. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" @change="setCover" />
  126. </div>
  127. <div style=" margin-bottom: 15px; display:flex;">
  128. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  129. style="justify-content: center; min-width: 150px;"></el-switch>
  130. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  131. style="justify-content: center; min-width: 175px"></el-switch>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  137. <span>类型</span>
  138. <!-- 学科+ 主题+ 未来+ -->
  139. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  140. style="display: flex; align-items: center">
  141. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  142. :key="index">
  143. <el-radio :label="item.name">{{
  144. item.name
  145. }}</el-radio>
  146. </div>
  147. </el-radio-group>
  148. </div>
  149. <div class="both">
  150. <div class="choose">
  151. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  152. <span v-if="
  153. CourseTypeJson[item.id].length > 0 &&
  154. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  155. ? pTypeCheck.indexOf(item.id) != -1
  156. : true)
  157. ">{{ item.name }}:</span>
  158. <el-checkbox-group v-model="courseTypeId" @change="typeChange" v-if="
  159. CourseTypeJson[item.id].length > 0 &&
  160. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  161. ? pTypeCheck.indexOf(item.id) != -1
  162. : true)
  163. ">
  164. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  165. item1.name }}</el-checkbox>
  166. </el-checkbox-group>
  167. <!-- <div
  168. v-else
  169. style="font-size: 14px; margin-left: -8px"
  170. >
  171. 暂无
  172. </div> -->
  173. </div>
  174. </div>
  175. </div>
  176. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  177. <div class="info_box_t_box">
  178. <span>输出语言:</span>
  179. <el-radio-group v-model="languageSetting" style="display: flex; align-items: center" @change="changeLang">
  180. <div class="all_choose info_radio">
  181. <el-radio :label="0">简体中文</el-radio>
  182. </div>
  183. <div class="all_choose info_radio" style="margin-left: 10px">
  184. <el-radio :label="1">繁体中文</el-radio>
  185. </div>
  186. <div class="all_choose info_radio" style="margin-left: 10px">
  187. <el-radio :label="2">English</el-radio>
  188. </div>
  189. </el-radio-group>
  190. </div>
  191. </div>
  192. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  193. <div class="info_box_t_box">
  194. <!-- <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  195. style="justify-content: center; min-width: 175px"></el-switch> -->
  196. <span>生成模式:</span>
  197. <el-radio-group v-model="isuseT" style="display: flex; align-items: center" @change="changeIsuseT">
  198. <div class="all_choose info_radio">
  199. <el-radio :label="false">从零开始生成</el-radio>
  200. </div>
  201. <div class="all_choose info_radio" style="margin-left: 10px">
  202. <el-radio :label="true">从已有教案生成</el-radio>
  203. </div>
  204. <div class="all_choose info_radio" style="margin-left: 10px">
  205. <el-radio :label="1">对话模式生成</el-radio>
  206. </div>
  207. <div class="all_choose info_radio" style="margin-left: 10px">
  208. <el-radio :label="2">头脑风暴模式生成</el-radio>
  209. </div>
  210. </el-radio-group>
  211. </div>
  212. </div>
  213. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  214. <div class="info_box_t_box">
  215. <span>生成风格:</span>
  216. <div class="mode_box">
  217. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  218. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  219. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  220. </div>
  221. </div>
  222. </div>
  223. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  224. <div class="info_box_t_box">
  225. <span>课程节数:</span>
  226. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  227. <span>节</span>
  228. </div>
  229. <div class="info_box_t_box">
  230. <span>课程时长:</span>
  231. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  232. <span>min</span>
  233. </div>
  234. </div> -->
  235. </div>
  236. <div class="right_first" v-loading="imageloading2">
  237. <!-- <div class="ai_box">
  238. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  239. </div> -->
  240. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  241. 上传封面
  242. </div>
  243. <div style="width: 100%">
  244. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  245. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  246. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  247. <div v-if="cover.length == 0">点击添加封面</div>
  248. <div class="cover_mask">
  249. <img src="../../../assets/icon/new/cover_update.png" /><span
  250. style="margin-top: 5px">修改封面</span>
  251. </div>
  252. </div>
  253. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  254. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  255. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  256. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  257. <i class="el-icon-plus"></i>
  258. </el-upload> -->
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. </div>
  264. </div>
  265. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  266. <div class="whiteBg" style="border-radius: 0">
  267. <div class="c_info_title">
  268. 课程权限设置
  269. </div>
  270. <div class="wb_j_box">
  271. <div class="wb_j_box_content">
  272. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  273. (dialogVisibleClass = true),
  274. (classSearch = ''),
  275. (gradeId = ''),
  276. getClass()
  277. ">添加班级</button>
  278. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  279. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  280. getClassC(tc) }}</span>
  281. </div> -->
  282. <div class="wb_j_box_btn" @click="
  283. (dialogVisibleClass = true),
  284. (classSearch = ''),
  285. (gradeId = ''),
  286. getClass()
  287. ">
  288. <div class="wb_j_box_title">授课班级</div>
  289. <div class="wb_j_box_btn_c">
  290. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  291. v-if="checkboxList2.length" popper-class="text_tooltip2">
  292. <div class="wb_j_box_span">
  293. {{ getListClassC(checkboxList2) }}
  294. </div>
  295. </el-tooltip>
  296. <div v-else class="wb_j_box_span">请选择授课班级</div>
  297. <div class="wb_j_box_arrow"></div>
  298. </div>
  299. </div>
  300. </div>
  301. <div class="wb_j_box_content">
  302. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  303. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  304. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  305. checkBoolean
  306. ? checkboxList3
  307. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  308. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  309. </div> -->
  310. <div class="wb_j_box_btn" @click="openMember">
  311. <div class="wb_j_box_title">协同人员</div>
  312. <div class="wb_j_box_btn_c">
  313. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  314. v-if="checkboxList3.length" popper-class="text_tooltip2">
  315. <div class="wb_j_box_span">
  316. {{ getListMan2(checkboxList3) }}
  317. </div>
  318. </el-tooltip>
  319. <div v-else class="wb_j_box_span">请选择协同人员</div>
  320. <div class="wb_j_box_arrow"></div>
  321. </div>
  322. </div>
  323. </div>
  324. </div>
  325. </div>
  326. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  327. <div class="c_info_title">目标管理</div>
  328. <div style="margin: 0 auto; padding: 0 20px">
  329. <div style="
  330. width: 95%;
  331. min-height: 200px;
  332. border: 1px solid #cad1dc;
  333. border-radius: 4px;
  334. position: relative;
  335. ">
  336. <div class="e_add_top">
  337. <div class="e_add_title">
  338. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  339. 清除
  340. </button>
  341. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  342. 添加
  343. </button>
  344. <!-- <span>当前使用目标管理</span>
  345. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  346. <img
  347. src="../../../assets/line.png"
  348. class="cru_line"
  349. style="
  350. width: 125px;
  351. height: 20px;
  352. bottom: -10px;
  353. left: 155px;
  354. "
  355. /> -->
  356. </div>
  357. <div style="
  358. display: flex;
  359. flex-direction: row;
  360. align-items: center;
  361. ">
  362. <!-- <el-button
  363. type="primary"
  364. size="small"
  365. @click="dialogVisiblemb = true"
  366. >添加目标管理</el-button
  367. >
  368. <el-button
  369. type="primary"
  370. size="small"
  371. @click="deleteEva()"
  372. >清除内容</el-button
  373. > -->
  374. <!-- <div class="e_add_delete" @click="deleteEva()">
  375. <img src="../../../assets/icon/delete.png" alt="" />
  376. </div> -->
  377. </div>
  378. </div>
  379. <div v-if="evalua == ''">
  380. <div class="noneBox">
  381. <img src="../../../assets/icon/new/eva_none.png" />
  382. <span>请添加目标管理</span>
  383. </div>
  384. </div>
  385. <div class="e_add_content" v-else>
  386. <div class="e_add_list_pbox">
  387. <div class="e_add_list_pbox_title">
  388. <span class="type_title">切换模式</span>
  389. <div class="type_content">
  390. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  391. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  392. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  393. </div>
  394. </div>
  395. <div class="e_add_list_pbox_content">
  396. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  397. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  398. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  399. v-if="typeMode == 3">
  400. </SeeBoard>
  401. </div>
  402. </div>
  403. </div>
  404. </div>
  405. </div>
  406. </div>
  407. </div>
  408. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  409. <div style="position: relative;
  410. background: #fff;
  411. box-sizing: border-box;
  412. padding: 1px 20px 10px;
  413. width: 100%;
  414. border-radius: 10px;">
  415. <div style="
  416. display: flex;
  417. flex-direction: row;
  418. justify-content: space-between;
  419. align-items: center;
  420. " :style="{
  421. margin: true
  422. ? '20px 0 10px'
  423. : '20px 0 0',
  424. }">
  425. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  426. 已有教案
  427. <div class="add_info_box" style="margin: 0 0 0 auto">
  428. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  429. 上传已有教案
  430. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  431. beforeUploadInfo2(
  432. $event,
  433. 14
  434. )
  435. " />
  436. </button>
  437. <button class="c_pub_button_add" @click="clickGenTT" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  438. 一键智能总结生成
  439. </button>
  440. </div>
  441. </div>
  442. </div>
  443. <div>
  444. <div class="add_chapters_box add_c_none" v-if="
  445. teacherInfoData &&
  446. teacherInfoData.length == 0
  447. ">
  448. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  449. <span>暂时还没有内容,快去添加吧</span>
  450. </div>
  451. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  452. <div @dragstart="
  453. dragStart(item1, index1, 0)
  454. " @dragover.prevent="
  455. dragOver(index1, 0)
  456. " @dragend="dragEnd()" :draggable="isdrag ==
  457. 'chapter-' + 0 + '-' + index1
  458. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  459. getChapterData(
  460. $event,
  461. index1,
  462. item1.type
  463. )
  464. " :class="{
  465. dragOverTop2:
  466. newIndex === index1 &&
  467. typeIndex ==
  468. 'chapter-' +
  469. 0 +
  470. '-' +
  471. index1 &&
  472. oldIndex > index1 &&
  473. dragType == 'drag',
  474. dragOverBottom2:
  475. newIndex === index1 &&
  476. typeIndex ==
  477. 'chapter-' +
  478. 0 +
  479. '-' +
  480. index1 &&
  481. oldIndex < index1 &&
  482. dragType == 'drag',
  483. }">
  484. <div class="chapter_upload_o" style="
  485. position: relative;
  486. display: flex;
  487. align-items: center;
  488. ">
  489. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  490. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  491. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  492. </div>
  493. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  494. </div>
  495. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  496. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  497. </div>
  498. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  499. </div>
  500. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  501. </div>
  502. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  503. </div>
  504. </div>
  505. <div class="chapter_upload_n">
  506. <input readonly="true" v-if="
  507. item1.type == 2 ||
  508. item1.type == 3 ||
  509. item1.type == 12 ||
  510. item1.type == 13 ||
  511. item1.type == 7
  512. " :placeholder="item1.name" style="
  513. border: none;
  514. outline: none;
  515. width: 80%;
  516. minwidth: 215px;
  517. z-index: 99;
  518. font-size: 14px;
  519. white-space: nowrap;
  520. overflow: hidden;
  521. text-overflow: ellipsis;
  522. " />
  523. </div>
  524. <div class="chapter_upload_ic">
  525. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  526. <div class="chapter_upload_ic_r" @click.stop="
  527. deleteTeacherInfoData(
  528. $event,
  529. index1
  530. )
  531. ">
  532. <div></div>
  533. </div>
  534. </div>
  535. </div>
  536. </div>
  537. </div>
  538. </div>
  539. <div v-if="
  540. teacherinfoproVisible
  541. " class="mask">
  542. <div class="progressBox">
  543. <div class="lbox">
  544. <img src="../../../assets/loading.gif" />上传中,请稍后
  545. </div>
  546. <div style="margin-bottom: 10px">
  547. <span>{{
  548. teacherinfoisFinishSize
  549. }}</span>
  550. /
  551. <span>{{
  552. teacherinfoisAllSize
  553. }}</span>
  554. </div>
  555. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  556. ? teacherinfoprogress
  557. : 0
  558. " style="width: 80%"></el-progress> -->
  559. </div>
  560. </div>
  561. </div>
  562. </div>
  563. <div class="whiteBg" :style="{ minHeight: teacherTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;position: relative" v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  564. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken" @click="cancelAjax('teacherText')">停止</div>
  565. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  566. <div class="c_info_title">
  567. 已有教案摘要
  568. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  569. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  570. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '右键已有教案摘要-提取摘要按钮')"
  571. @click="openAiDialog(2, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '点击已有教案摘要-提取摘要按钮')">提取摘要</button>
  572. </el-tooltip>
  573. </div>
  574. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  575. <div style="width: calc(100%);" class='op_task_box'>
  576. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  577. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  578. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  579. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  580. <div class="op_box" :class="{op_box_isquote: isQuote['aiteacherTextDetail']}">
  581. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  582. <div class="op_box_right">
  583. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  584. <div class="r_pub_button_op"
  585. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '右键已有教案摘要-智能优化按钮')"
  586. @click="openAiDialog(2, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '点击已有教案摘要-智能优化按钮')">智能优化</div>
  587. </el-tooltip>
  588. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击已有教案摘要-确定/编辑按钮')">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  589. <el-switch style="margin-left: 10px" v-model="isQuote['aiteacherTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiteacherTextDetail'), addCourseBehavior('courseBehavior', '点击已有教案摘要-引用按钮')"></el-switch>
  590. </div>
  591. </div>
  592. </div>
  593. </div>
  594. </div>
  595. </div>
  596. <div class="whiteBg" :style="{ minHeight: targetTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  597. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1" @click="cancelAjax('target1')">停止</div>
  598. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  599. <div class="c_info_title">
  600. 课程目标
  601. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  602. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  603. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '右键课程目标-提取目标按钮')"
  604. @click="openAiDialog(2, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '点击课程目标-提取目标按钮')">提取目标</button>
  605.                   </el-tooltip>
  606. </div>
  607. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  608. <div style="width: calc(100%);" class='op_task_box'>
  609. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  610. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  611. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  612. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  613. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail']}">
  614. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  615. <div class="op_box_right">
  616. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  617. <div class="r_pub_button_op"
  618. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  619. @click="openAiDialog(2, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">智能优化</div>
  620. </el-tooltip>
  621. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  622. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aitargetTextDetail'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  623. </div>
  624. </div>
  625. </div>
  626. </div>
  627. </div>
  628. </div>
  629. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  630. <div style="position: relative;
  631. background: #fff;
  632. box-sizing: border-box;
  633. padding: 1px 20px 10px;
  634. width: 100%;
  635. border-radius: 10px;">
  636. <div style="
  637. display: flex;
  638. flex-direction: row;
  639. justify-content: space-between;
  640. align-items: center;
  641. " :style="{
  642. margin: true
  643. ? '20px 0 10px'
  644. : '20px 0 0',
  645. }">
  646. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  647. 系统推荐参考资料
  648. <div class="add_info_box" style="margin: 0 0 0 auto">
  649. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  650. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  651. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  652. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  653.  </el-tooltip>
  654. </div>
  655. </div>
  656. </div>
  657. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  658. <div class="add_chapters_box add_c_none" v-if="
  659. cankaoInfoData &&
  660. cankaoInfoData.length == 0
  661. ">
  662. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  663. <span>暂时还没有内容,快去添加吧</span>
  664. </div>
  665. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  666. <div @dragstart="
  667. dragStart(item1, index1, 0)
  668. " @dragover.prevent="
  669. dragOver(index1, 0)
  670. " @dragend="dragEnd()" :draggable="isdrag ==
  671. 'chapter-' + 0 + '-' + index1
  672. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  673. getChapterData(
  674. $event,
  675. index1,
  676. item1.type
  677. )
  678. " :class="{
  679. dragOverTop2:
  680. newIndex === index1 &&
  681. typeIndex ==
  682. 'chapter-' +
  683. 0 +
  684. '-' +
  685. index1 &&
  686. oldIndex > index1 &&
  687. dragType == 'drag',
  688. dragOverBottom2:
  689. newIndex === index1 &&
  690. typeIndex ==
  691. 'chapter-' +
  692. 0 +
  693. '-' +
  694. index1 &&
  695. oldIndex < index1 &&
  696. dragType == 'drag',
  697. }">
  698. <div class="chapter_upload_o" style="
  699. position: relative;
  700. display: flex;
  701. align-items: center;
  702. ">
  703. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  704. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  705. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  706. </div>
  707. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  708. </div>
  709. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  710. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  711. </div>
  712. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  713. </div>
  714. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  715. </div>
  716. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  717. </div>
  718. </div>
  719. <div class="chapter_upload_n">
  720. <input readonly="true" v-if="
  721. item1.type == 2 ||
  722. item1.type == 3 ||
  723. item1.type == 12 ||
  724. item1.type == 13 ||
  725. item1.type == 7
  726. " :placeholder="item1.name" style="
  727. border: none;
  728. outline: none;
  729. width: 80%;
  730. minwidth: 215px;
  731. z-index: 99;
  732. font-size: 14px;
  733. white-space: nowrap;
  734. overflow: hidden;
  735. text-overflow: ellipsis;
  736. " />
  737. </div>
  738. <div class="chapter_upload_ic">
  739. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  740. <div class="chapter_upload_ic_r" @click.stop="
  741. deleteCankaoInfoData(
  742. $event,
  743. index1
  744. )
  745. ">
  746. <div></div>
  747. </div>
  748. </div>
  749. </div>
  750. </div>
  751. </div>
  752. </div>
  753. </div>
  754. </div>
  755. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  756. <div style="position: relative;
  757. background: #fff;
  758. box-sizing: border-box;
  759. padding: 1px 20px 10px;
  760. width: 100%;
  761. border-radius: 10px;">
  762. <div style="
  763. display: flex;
  764. flex-direction: row;
  765. justify-content: space-between;
  766. align-items: center;
  767. " :style="{
  768. margin: true
  769. ? '20px 0 10px'
  770. : '20px 0 0',
  771. }">
  772. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  773. 参考标准
  774. <div class="add_info_box" style="margin: 0 0 0 auto">
  775. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  776. 上传参考标准
  777. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  778. beforeUploadInfo2(
  779. $event,
  780. 19
  781. )
  782. " />
  783. </button>
  784. </div>
  785. </div>
  786. </div>
  787. <div>
  788. <div class="add_chapters_box add_c_none" v-if="
  789. knowInfoData &&
  790. knowInfoData.length == 0
  791. ">
  792. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  793. <span>暂时还没有内容,快去添加吧</span>
  794. </div>
  795. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  796. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
  797. getChapterData(
  798. $event,
  799. index1,
  800. item1.type
  801. )
  802. " >
  803. <div class="chapter_upload_o" style="
  804. position: relative;
  805. display: flex;
  806. align-items: center;
  807. ">
  808. <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData(item1.fileid)"></div>
  809. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  810. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  811. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  812. </div>
  813. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  814. </div>
  815. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  816. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  817. </div>
  818. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  819. </div>
  820. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  821. </div>
  822. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  823. </div>
  824. </div>
  825. <div class="chapter_upload_n">
  826. <input readonly="true" v-if="
  827. item1.type == 2 ||
  828. item1.type == 3 ||
  829. item1.type == 12 ||
  830. item1.type == 13 ||
  831. item1.type == 7
  832. " :placeholder="item1.name" @click.stop="
  833. checkChpater3($event, index1, item1)
  834. " style="
  835. border: none;
  836. outline: none;
  837. width: 80%;
  838. minwidth: 215px;
  839. z-index: 99;
  840. font-size: 14px;
  841. white-space: nowrap;
  842. overflow: hidden;
  843. text-overflow: ellipsis;
  844. " />
  845. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  846. border: none;
  847. outline: none;
  848. width: 80%;
  849. white-space: nowrap;
  850. overflow: hidden;
  851. text-overflow: ellipsis;
  852. " readonly="true" @click="
  853. selectAttText(index1)
  854. " />
  855. <input :placeholder="item1.title ? item1.title : '链接'
  856. " v-if="item1.type == 8" style="
  857. border: none;
  858. outline: none;
  859. width: 80%;
  860. white-space: nowrap;
  861. overflow: hidden;
  862. text-overflow: ellipsis;
  863. " readonly="true" @click="selectLine(index1)" />
  864. <input :placeholder="item1.title ? item1.title : '链接'
  865. " v-if="item1.type == 14" style="
  866. border: none;
  867. outline: none;
  868. width: 80%;
  869. white-space: nowrap;
  870. overflow: hidden;
  871. text-overflow: ellipsis;
  872. " readonly="true" @click="
  873. openUpdateSource(index1)
  874. " />
  875. </div>
  876. <div class="chapter_upload_ic">
  877. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  878. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  879. checkChpater3($event, index1, item1)
  880. ">
  881. <div></div>
  882. </div>
  883. <div class="chapter_upload_ic_r" @click.stop="
  884. deleteKnowInfoData(
  885. $event,
  886. index1
  887. )
  888. ">
  889. <div></div>
  890. </div>
  891. </div>
  892. </div>
  893. </div>
  894. </div>
  895. </div>
  896. <div v-if="
  897. knowinfoproVisible
  898. " class="mask">
  899. <div class="progressBox">
  900. <div class="lbox">
  901. <img src="../../../assets/loading.gif" />上传中,请稍后
  902. </div>
  903. <div style="margin-bottom: 10px">
  904. <span>{{
  905. knowinfoisFinishSize
  906. }}</span>
  907. /
  908. <span>{{
  909. knowinfoisAllSize
  910. }}</span>
  911. </div>
  912. </div>
  913. </div>
  914. </div>
  915. </div>
  916. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  917. <div style="position: relative;
  918. background: #fff;
  919. box-sizing: border-box;
  920. padding: 1px 20px 10px;
  921. width: 100%;
  922. border-radius: 10px;">
  923. <div style="
  924. display: flex;
  925. flex-direction: row;
  926. justify-content: space-between;
  927. align-items: center;
  928. " :style="{
  929. margin: true
  930. ? '20px 0 10px'
  931. : '20px 0 0',
  932. }">
  933. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  934. 检索资料
  935. <div class="add_info_box" style="margin: 0 0 0 auto;align-items:center">
  936. <input type="text" placeholder="请输入检索关键词" class="binfo_input" v-model="searchFileName" style="width: 200px;margin: 0 5px 10px 0;min-height: 36px;box-sizing: border-box;height: 36px;"/>
  937. <button class="c_pub_button_add" @click="startFindMatchingContents">
  938. 点击检索资料
  939. <!-- <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  940. beforeUploadInfo2(
  941. $event,
  942. 20
  943. )
  944. " /> -->
  945. </button>
  946. </div>
  947. </div>
  948. </div>
  949. <div style="display: flex; align-items: center;">
  950. <div v-loading="knowInfoDataLoading" element-loading-text="小可正在努力生成中,请稍等..." style="height: 200px; width:100%;">
  951. <div class="c_pub_button_confirm stopBtn" v-if="knowInfoDataLoading && isfindMatchingContents" @click="cancelAjax('findMatchingContents')">停止</div>
  952. <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
  953. knowInfoData3 &&
  954. knowInfoData3.length == 0
  955. ">
  956. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  957. <span>暂时还没有内容,快去检索吧</span>
  958. </div>
  959. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:100%;overflow: auto;" @scroll="panFind">
  960. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData3" :key="item1.id" @click="
  961. getChapterData(
  962. $event,
  963. index1,
  964. item1.type
  965. )
  966. " >
  967. <div class="chapter_upload_o" style="
  968. position: relative;
  969. display: flex;
  970. align-items: center;
  971. ">
  972. <div class="chapter_upload_check file-loading-class" :class="{ checked: knowFileids3.indexOf(item1.url) != -1 }" @click="checkKnowInfoData3(item1.url)"></div>
  973. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  974. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  975. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  976. </div>
  977. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  978. </div>
  979. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  980. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  981. </div>
  982. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  983. </div>
  984. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  985. </div>
  986. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  987. </div>
  988. </div>
  989. <div class="chapter_upload_n">
  990. <el-tooltip :content="item1.name" placement="top" effect="dark">
  991. <!-- content to trigger tooltip here -->
  992. <input readonly="true" v-if="
  993. item1.type == 2 ||
  994. item1.type == 3 ||
  995. item1.type == 12 ||
  996. item1.type == 13 ||
  997. item1.type == 7
  998. " :placeholder="item1.name" @click.stop="
  999. checkChpater3($event, index1, item1)
  1000. " style="
  1001. border: none;
  1002. outline: none;
  1003. width: 80%;
  1004. minwidth: 215px;
  1005. z-index: 99;
  1006. font-size: 14px;
  1007. white-space: nowrap;
  1008. overflow: hidden;
  1009. text-overflow: ellipsis;
  1010. " />
  1011. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1012. border: none;
  1013. outline: none;
  1014. width: 80%;
  1015. white-space: nowrap;
  1016. overflow: hidden;
  1017. text-overflow: ellipsis;
  1018. " readonly="true" @click="
  1019. selectAttText(index1)
  1020. " />
  1021. <input :placeholder="item1.title ? item1.title : '链接'
  1022. " v-if="item1.type == 8" style="
  1023. border: none;
  1024. outline: none;
  1025. width: 80%;
  1026. white-space: nowrap;
  1027. overflow: hidden;
  1028. text-overflow: ellipsis;
  1029. " readonly="true" @click="selectLine(index1)" />
  1030. <input :placeholder="item1.title ? item1.title : '链接'
  1031. " v-if="item1.type == 14" style="
  1032. border: none;
  1033. outline: none;
  1034. width: 80%;
  1035. white-space: nowrap;
  1036. overflow: hidden;
  1037. text-overflow: ellipsis;
  1038. " readonly="true" @click="
  1039. openUpdateSource(index1)
  1040. " />
  1041. </el-tooltip>
  1042. </div>
  1043. <div class="chapter_upload_ic">
  1044. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1045. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1046. checkChpater3($event, index1, item1)
  1047. ">
  1048. <div></div>
  1049. </div>
  1050. <!-- <div class="chapter_upload_ic_r" @click.stop="
  1051. deleteKnowInfoData3(
  1052. $event,
  1053. index1
  1054. )
  1055. ">
  1056. <div></div>
  1057. </div> -->
  1058. </div>
  1059. </div>
  1060. </div>
  1061. </div>
  1062. </div>
  1063. <div style="margin: 0 5px; min-width: fit-content">
  1064. <button class="c_pub_button_confirm" @click="useUrl">
  1065. 使用
  1066. <svg t="1730970226429" class="right_icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1465" width="128" height="128"><path d="M236.552013 926.853955a55.805997 55.805997 0 0 0 0 80.454996 59.682997 59.682997 0 0 0 82.794996 0l468.099978-455.081978a55.805997 55.805997 0 0 0 0-80.453996L319.348009 16.689999a59.682997 59.682997 0 0 0-82.794996 0 55.805997 55.805997 0 0 0 0 80.454996L663.401993 511.999975 236.624013 926.853955z" p-id="1466" fill="#ffffff"></path></svg>
  1067. </button>
  1068. </div>
  1069. <div style="height: 200px; width:100%;">
  1070. <div class="add_chapters_box add_c_none" style="height: 100%" v-if="
  1071. knowInfoData2 &&
  1072. knowInfoData2.length == 0
  1073. ">
  1074. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1075. <span>暂时还没有内容,快去添加吧</span>
  1076. </div>
  1077. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column;height:100%;overflow: auto;" ref="rightKnow">
  1078. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData2" :key="item1.id" @click="
  1079. getChapterData(
  1080. $event,
  1081. index1,
  1082. item1.type
  1083. )
  1084. " >
  1085. <div class="chapter_upload_o" style="
  1086. position: relative;
  1087. display: flex;
  1088. align-items: center;
  1089. ">
  1090. <div class="chapter_upload_check file-loading-class" :class="{ checked: knowFileids2.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData2(item1.fileid)" v-loading="!item1.fileid"></div>
  1091. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1092. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1093. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1094. </div>
  1095. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1096. </div>
  1097. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1098. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1099. </div>
  1100. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1101. </div>
  1102. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1103. </div>
  1104. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1105. </div>
  1106. </div>
  1107. <div class="chapter_upload_n">
  1108. <el-tooltip :content="item1.name" placement="top" effect="dark">
  1109. <!-- content to trigger tooltip here -->
  1110. <input readonly="true" v-if="
  1111. item1.type == 2 ||
  1112. item1.type == 3 ||
  1113. item1.type == 12 ||
  1114. item1.type == 13 ||
  1115. item1.type == 7
  1116. " :placeholder="item1.name" @click.stop="
  1117. checkChpater3($event, index1, item1)
  1118. " style="
  1119. border: none;
  1120. outline: none;
  1121. width: 80%;
  1122. minwidth: 215px;
  1123. z-index: 99;
  1124. font-size: 14px;
  1125. white-space: nowrap;
  1126. overflow: hidden;
  1127. text-overflow: ellipsis;
  1128. " />
  1129. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1130. border: none;
  1131. outline: none;
  1132. width: 80%;
  1133. white-space: nowrap;
  1134. overflow: hidden;
  1135. text-overflow: ellipsis;
  1136. " readonly="true" @click="
  1137. selectAttText(index1)
  1138. " />
  1139. <input :placeholder="item1.title ? item1.title : '链接'
  1140. " v-if="item1.type == 8" style="
  1141. border: none;
  1142. outline: none;
  1143. width: 80%;
  1144. white-space: nowrap;
  1145. overflow: hidden;
  1146. text-overflow: ellipsis;
  1147. " readonly="true" @click="selectLine(index1)" />
  1148. <input :placeholder="item1.title ? item1.title : '链接'
  1149. " v-if="item1.type == 14" style="
  1150. border: none;
  1151. outline: none;
  1152. width: 80%;
  1153. white-space: nowrap;
  1154. overflow: hidden;
  1155. text-overflow: ellipsis;
  1156. " readonly="true" @click="
  1157. openUpdateSource(index1)
  1158. " />
  1159. </el-tooltip>
  1160. </div>
  1161. <div class="chapter_upload_ic">
  1162. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1163. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1164. checkChpater3($event, index1, item1)
  1165. ">
  1166. <div></div>
  1167. </div>
  1168. <div class="chapter_upload_ic_r" @click.stop="
  1169. deleteKnowInfoData2(
  1170. $event,
  1171. index1
  1172. )
  1173. ">
  1174. <div></div>
  1175. </div>
  1176. </div>
  1177. </div>
  1178. </div>
  1179. </div>
  1180. </div>
  1181. </div>
  1182. <div v-if="
  1183. knowinfoproVisible2
  1184. " class="mask">
  1185. <div class="progressBox">
  1186. <div class="lbox">
  1187. <img src="../../../assets/loading.gif" />上传中,请稍后
  1188. </div>
  1189. <div style="margin-bottom: 10px">
  1190. <span>{{
  1191. knowinfoisFinishSize2
  1192. }}</span>
  1193. /
  1194. <span>{{
  1195. knowinfoisAllSize2
  1196. }}</span>
  1197. </div>
  1198. </div>
  1199. </div>
  1200. </div>
  1201. </div>
  1202. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && infoData2.length">
  1203. <div style="position: relative;
  1204. background: #fff;
  1205. box-sizing: border-box;
  1206. padding: 1px 20px 10px;
  1207. width: 100%;
  1208. border-radius: 10px;">
  1209. <div style="
  1210. display: flex;
  1211. flex-direction: row;
  1212. justify-content: space-between;
  1213. align-items: center;
  1214. " :style="{
  1215. margin: true
  1216. ? '20px 0 10px'
  1217. : '20px 0 0',
  1218. }">
  1219. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1220. 知识库
  1221. <div class="add_info_box" style="margin: 0 0 0 auto">
  1222. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1223. 上传补充资料
  1224. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1225. beforeUploadInfo2(
  1226. $event,
  1227. 15
  1228. )
  1229. " />
  1230. </button>
  1231. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="knowFileids.length">
  1232. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1233. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  1234. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  1235.  </el-tooltip> -->
  1236. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1237. @click="openAiDialog(2, 'aiSearchFile2')" v-if="knowFileids.length">智能检索资料</button>
  1238. </div>
  1239. </div>
  1240. </div>
  1241. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等..." :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  1242. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken" @click="cancelAjax('file')">停止</div>
  1243. <div class="add_chapters_box add_c_none" v-if="
  1244. infoData2 &&
  1245. infoData2.length == 0
  1246. ">
  1247. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1248. <span>暂时还没有内容,快去添加吧</span>
  1249. </div>
  1250. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1251. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  1252. getChapterData(
  1253. $event,
  1254. index1,
  1255. item1.type
  1256. )
  1257. " >
  1258. <div class="chapter_upload_o" style="
  1259. position: relative;
  1260. display: flex;
  1261. align-items: center;
  1262. ">
  1263. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  1264. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1265. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1266. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1267. </div>
  1268. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1269. </div>
  1270. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1271. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1272. </div>
  1273. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1274. </div>
  1275. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1276. </div>
  1277. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1278. </div>
  1279. </div>
  1280. <div class="chapter_upload_n">
  1281. <input readonly="true" v-if="
  1282. item1.type == 2 ||
  1283. item1.type == 3 ||
  1284. item1.type == 12 ||
  1285. item1.type == 13 ||
  1286. item1.type == 7
  1287. " :placeholder="item1.name" @click.stop="
  1288. checkChpater2($event, index1 )
  1289. " style="
  1290. border: none;
  1291. outline: none;
  1292. width: 80%;
  1293. minwidth: 215px;
  1294. z-index: 99;
  1295. font-size: 14px;
  1296. white-space: nowrap;
  1297. overflow: hidden;
  1298. text-overflow: ellipsis;
  1299. " />
  1300. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1301. border: none;
  1302. outline: none;
  1303. width: 80%;
  1304. white-space: nowrap;
  1305. overflow: hidden;
  1306. text-overflow: ellipsis;
  1307. " readonly="true" @click="
  1308. selectAttText(index1)
  1309. " />
  1310. <input :placeholder="item1.title ? item1.title : '链接'
  1311. " v-if="item1.type == 8" style="
  1312. border: none;
  1313. outline: none;
  1314. width: 80%;
  1315. white-space: nowrap;
  1316. overflow: hidden;
  1317. text-overflow: ellipsis;
  1318. " readonly="true" @click="selectLine(index1)" />
  1319. <input :placeholder="item1.title ? item1.title : '链接'
  1320. " v-if="item1.type == 14" style="
  1321. border: none;
  1322. outline: none;
  1323. width: 80%;
  1324. white-space: nowrap;
  1325. overflow: hidden;
  1326. text-overflow: ellipsis;
  1327. " readonly="true" @click="
  1328. openUpdateSource(index1)
  1329. " />
  1330. </div>
  1331. <div class="chapter_upload_ic">
  1332. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1333. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1334. checkChpater2($event, index1 )
  1335. ">
  1336. <div></div>
  1337. </div>
  1338. <div class="chapter_upload_ic_r" @click.stop="
  1339. deleteInfoData2(
  1340. $event,
  1341. index1
  1342. )
  1343. ">
  1344. <div></div>
  1345. </div>
  1346. </div>
  1347. </div>
  1348. </div>
  1349. </div>
  1350. </div>
  1351. <div v-if="
  1352. infoproVisible
  1353. " class="mask">
  1354. <div class="progressBox">
  1355. <div class="lbox">
  1356. <img src="../../../assets/loading.gif" />上传中,请稍后
  1357. </div>
  1358. <div style="margin-bottom: 10px">
  1359. <span>{{
  1360. infoisFinishSize
  1361. }}</span>
  1362. /
  1363. <span>{{
  1364. infoisAllSize
  1365. }}</span>
  1366. </div>
  1367. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1368. ? infoprogress
  1369. : 0
  1370. " style="width: 80%"></el-progress> -->
  1371. </div>
  1372. </div>
  1373. </div>
  1374. </div>
  1375. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="(isuseT === 2)">
  1376. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1377. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1378. 课程概况<span class="inter_setting" @click="openInterPanSetting2" v-if="istemplate == 1"></span>
  1379. <div class="inter_setting_panel" v-show="interSetting">
  1380. <div class="panel_title">配置工作流</div>
  1381. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1382. <div class="panel_input">
  1383. <input type="text" :placeholder="'请输入agentid'" class="binfo_input" v-model="r_agentid"/>
  1384. <div class="panel_input_record">
  1385. <span>议程和问题引导</span>
  1386. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordstart" placeholder="议程和问题引导"></textarea>
  1387. </div>
  1388. <div class="panel_input_record">
  1389. <span>查看进度</span>
  1390. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordCheckJindu" placeholder="查看进度"></textarea>
  1391. </div>
  1392. <div class="panel_input_record">
  1393. <span>总结并生成课程概况</span>
  1394. <textarea rows="5" class="binfo_input binfo_textarea" cols v-model="aiJson.recordCourseD" placeholder="总结并生成课程概况"></textarea>
  1395. </div>
  1396. </div>
  1397. <div class="panel_button" style="justify-content: flex-end;">
  1398. <button class="c_pub_button_confirm" @click="setAgentid2" style="margin-right: 10px;">确认</button>
  1399. <button class="c_pub_button_return" @click="cancelInterSetting2">取消</button>
  1400. </div>
  1401. </div>
  1402. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1403. </div>
  1404. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1405. <div style="width: calc(100%);height: 100%" class='op_task_box inter_voiceBox'>
  1406. <recordV
  1407. :videoText2.sync="recordVideoText"
  1408. :audioUrl2.sync="recordAudioUrl"></recordV>
  1409. </div>
  1410. <div class="inter_box" v-show="interPan" style="margin: 0 0 0 10px;max-width: 50%;max-height:500px;">
  1411. <aiBoxCourseDetail
  1412. v-if="aiJson.recordAgentid && chatid"
  1413. :languageSetting="languageSetting"
  1414. :courseId="chatid"
  1415. :courseText2.sync="courseText"
  1416. :viedoText="recordVideoText"
  1417. :agentid="aiJson.recordAgentid"
  1418. :recordstart="aiJson.recordstart"
  1419. :recordCheckJindu="aiJson.recordCheckJindu"
  1420. :recordCourseD="aiJson.recordCourseD"
  1421. :courseInfo="course_info"
  1422. :fileids='[...knowFileids, ...knowFileids2]'></aiBoxCourseDetail>
  1423. </div>
  1424. </div>
  1425. </div>
  1426. </div>
  1427. <div class="whiteBg" :style="{ minHeight: textLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!(isuseT === true) && !(isuseT === 1) && !(isuseT === 2) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid)) || (isuseT === 2 && courseText)">
  1428. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken" @click="cancelAjax('text')">停止</div>
  1429. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1430. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  1431. 课程简要描述
  1432. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1433. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1434. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1), addCourseBehavior('courseBehavior', '右键课程简要描述-AI优化按钮')"
  1435. @click="openAiDialog(2, 'aiDetail',1), addCourseBehavior('courseBehavior', '点击课程简要描述-AI优化按钮')">AI优化</button>
  1436. </el-tooltip>
  1437. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">生成概况和目标</button>
  1438. </div>
  1439. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1440. <div style="width: calc(100%);" class='op_task_box'>
  1441. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1442. placeholder="请输入课程简要描述" v-if="courseTextB" @change="textAreaChange('courseText')"></textarea>
  1443. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  1444. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  1445. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1446. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1447. <div class="op_box_right">
  1448. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1449. <div class="r_pub_button_op"
  1450. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2), addCourseBehavior('courseBehavior', '右键课程简要描述-智能优化按钮')"
  1451. @click="openAiDialog(2, 'aiDetail', 2), addCourseBehavior('courseBehavior', '点击课程简要描述-智能优化按钮')">智能优化</div>
  1452. </el-tooltip>
  1453. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程简要描述-确定/编辑按钮')">{{ courseTextB ? '确定' : '编辑'}}</div>
  1454. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程简要描述-引用按钮')"></el-switch>
  1455. </div>
  1456. </div>
  1457. </div>
  1458. </div>
  1459. </div>
  1460. </div>
  1461. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(isuseT === 1)">
  1462. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1463. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1464. 课程概况<span class="inter_setting" @click="openInterPanSetting"></span>
  1465. <div class="inter_setting_panel" v-show="interSetting">
  1466. <div class="panel_title">配置工作流</div>
  1467. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1468. <div class="panel_input">
  1469. <input type="text" :placeholder="this.aiJson.agentid ? this.aiJson.agentid : '请输入agentid'" class="binfo_input" v-model="agentid"/>
  1470. </div>
  1471. <div class="panel_button">
  1472. <button class="c_pub_button_confirm" @click="setAgentid">确认</button>
  1473. <button class="c_pub_button_confirm" @click="rebuildAgentid" v-if="istemplate != 1">复原</button>
  1474. <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
  1475. </div>
  1476. </div>
  1477. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1478. </div>
  1479. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1480. <div class="inter_box" v-show="interPan">
  1481. <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl" frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
  1482. </div>
  1483. <div style="width: calc(100%);height: 100%" class='op_task_box' :class="{inter_Detailbox: !courseTextB && interPan}">
  1484. <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
  1485. placeholder="请输入课程简要描述" v-if="courseTextB && interPan" @change="textAreaChange('courseText')"></textarea>
  1486. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1487. placeholder="请输入课程简要描述" v-else-if="courseTextB && !interPan" @change="textAreaChange('courseText')"></textarea>
  1488. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-else-if="textLoading"></div>
  1489. <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-html="MarkdownT(courseText)" v-else></div>
  1490. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1491. <div class="op_remark"></div>
  1492. <div class="op_box_right">
  1493. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1494. <div class="r_pub_button_op"
  1495. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1496. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1497. </el-tooltip> -->
  1498. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程概况-确定/编辑按钮')">{{ courseTextB ? '确定' : '编辑'}}</div>
  1499. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程概况-引用按钮')"></el-switch>
  1500. </div>
  1501. </div>
  1502. </div>
  1503. </div>
  1504. </div>
  1505. </div>
  1506. <div class="whiteBg" :style="{ minHeight: targetTextLoading2 ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2" element-loading-text="小可正在努力生成中,请稍等..." v-if="((!(isuseT === true) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1507. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2" @click="cancelAjax('target2')">停止</div>
  1508. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1509. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  1510. 课程目标
  1511. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  1512. 上传补充资料
  1513. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1514. beforeUploadInfo2(
  1515. $event,
  1516. 16
  1517. )
  1518. " />
  1519. </button>
  1520. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  1521. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1522. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  1523. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  1524. </el-tooltip>
  1525. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1526. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1527. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '右键课程目标-生成目标按钮')"
  1528. @click="openAiDialog(2, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '点击课程目标-生成目标按钮')" ref="aitargetTextDetail3">生成目标</button>
  1529. </el-tooltip>
  1530. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  1531. <div class="add_chapters_box add_c_none" v-if="
  1532. mubiaoInfoData &&
  1533. mubiaoInfoData.length == 0
  1534. ">
  1535. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1536. <span>暂时还没有内容,快去添加吧</span>
  1537. </div>
  1538. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1539. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  1540. getChapterData(
  1541. $event,
  1542. index1,
  1543. item1.type
  1544. )
  1545. " >
  1546. <div class="chapter_upload_o" style="
  1547. position: relative;
  1548. display: flex;
  1549. align-items: center;
  1550. ">
  1551. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1552. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1553. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1554. </div>
  1555. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1556. </div>
  1557. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1558. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1559. </div>
  1560. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1561. </div>
  1562. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1563. </div>
  1564. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1565. </div>
  1566. </div>
  1567. <div class="chapter_upload_n">
  1568. <input readonly="true" v-if="
  1569. item1.type == 2 ||
  1570. item1.type == 3 ||
  1571. item1.type == 12 ||
  1572. item1.type == 13 ||
  1573. item1.type == 7
  1574. " :placeholder="item1.name" @click.stop="
  1575. checkChpater3($event, index1, item1)
  1576. " style="
  1577. border: none;
  1578. outline: none;
  1579. width: 80%;
  1580. minwidth: 215px;
  1581. z-index: 99;
  1582. font-size: 14px;
  1583. white-space: nowrap;
  1584. overflow: hidden;
  1585. text-overflow: ellipsis;
  1586. " />
  1587. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1588. border: none;
  1589. outline: none;
  1590. width: 80%;
  1591. white-space: nowrap;
  1592. overflow: hidden;
  1593. text-overflow: ellipsis;
  1594. " readonly="true" @click="
  1595. selectAttText(index1)
  1596. " />
  1597. <input :placeholder="item1.title ? item1.title : '链接'
  1598. " v-if="item1.type == 8" style="
  1599. border: none;
  1600. outline: none;
  1601. width: 80%;
  1602. white-space: nowrap;
  1603. overflow: hidden;
  1604. text-overflow: ellipsis;
  1605. " readonly="true" @click="selectLine(index1)" />
  1606. <input :placeholder="item1.title ? item1.title : '链接'
  1607. " v-if="item1.type == 14" style="
  1608. border: none;
  1609. outline: none;
  1610. width: 80%;
  1611. white-space: nowrap;
  1612. overflow: hidden;
  1613. text-overflow: ellipsis;
  1614. " readonly="true" @click="
  1615. openUpdateSource(index1)
  1616. " />
  1617. </div>
  1618. <div class="chapter_upload_ic">
  1619. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1620. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1621. checkChpater3($event, index1, item1)
  1622. ">
  1623. <div></div>
  1624. </div>
  1625. <div class="chapter_upload_ic_r" @click.stop="
  1626. deletemubiaoInfoData(
  1627. $event,
  1628. index1
  1629. )
  1630. ">
  1631. <div></div>
  1632. </div>
  1633. </div>
  1634. </div>
  1635. </div>
  1636. </div>
  1637. </div>
  1638. <div v-if="
  1639. mubiaoinfoproVisible
  1640. " class="mask">
  1641. <div class="progressBox">
  1642. <div class="lbox">
  1643. <img src="../../../assets/loading.gif" />上传中,请稍后
  1644. </div>
  1645. <div style="margin-bottom: 10px">
  1646. <span>{{
  1647. mubiaoinfoisFinishSize
  1648. }}</span>
  1649. /
  1650. <span>{{
  1651. mubiaoinfoisAllSize
  1652. }}</span>
  1653. </div>
  1654. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1655. ? mubiaoinfoprogress
  1656. : 0
  1657. " style="width: 80%"></el-progress> -->
  1658. </div>
  1659. </div>
  1660. </div>
  1661. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1662. <div style="width: calc(100%);" class='op_task_box'>
  1663. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  1664. placeholder="请输入课程目标" v-if="targetCourseText2B" @change="textAreaChange('targetCourseText2')"></textarea>
  1665. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  1666. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1667. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail2']}">
  1668. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1669. <div class="op_box_right">
  1670. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1671. <div class="r_pub_button_op"
  1672. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  1673. @click="openAiDialog(2, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">智能优化</div>
  1674. </el-tooltip>
  1675. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1676. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aitargetTextDetail2'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  1677. </div>
  1678. </div>
  1679. </div>
  1680. </div>
  1681. </div>
  1682. </div>
  1683. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  1684. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1685. <div class="c_info_title">
  1686. 补充资料
  1687. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1688. </div>
  1689. <div class="buchong_box">
  1690. <span>暂时还没有内容,快去添加吧~</span>
  1691. </div>
  1692. </div> -->
  1693. <div style="position: relative;
  1694. background: #fff;
  1695. box-sizing: border-box;
  1696. padding: 1px 20px 10px;
  1697. width: 100%;
  1698. border-radius: 10px;">
  1699. <div style="
  1700. display: flex;
  1701. flex-direction: row;
  1702. justify-content: space-between;
  1703. align-items: center;
  1704. " :style="{
  1705. margin: true
  1706. ? '20px 0 10px'
  1707. : '20px 0 0',
  1708. }">
  1709. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1710. 补充资料
  1711. <div class="add_info_box" style="margin: 0 0 0 auto">
  1712. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1713. 上传补充资料
  1714. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1715. beforeUploadInfo2(
  1716. $event,
  1717. 13
  1718. )
  1719. " />
  1720. </button>
  1721. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1722. 图文
  1723. </button>
  1724. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1725. 链接
  1726. </button>
  1727. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1728. 代码
  1729. </button>
  1730. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1731. 资源
  1732. </button> -->
  1733. </div>
  1734. </div>
  1735. </div>
  1736. <div>
  1737. <div class="add_chapters_box add_c_none" v-if="
  1738. infoData &&
  1739. infoData.length == 0
  1740. ">
  1741. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1742. <span>暂时还没有内容,快去添加吧</span>
  1743. </div>
  1744. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1745. <div @dragstart="
  1746. dragStart(item1, index1, 0)
  1747. " @dragover.prevent="
  1748. dragOver(index1, 0)
  1749. " @dragend="dragEnd()" :draggable="isdrag ==
  1750. 'chapter-' + 0 + '-' + index1
  1751. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1752. getChapterData(
  1753. $event,
  1754. index1,
  1755. item1.type
  1756. )
  1757. " :class="{
  1758. dragOverTop2:
  1759. newIndex === index1 &&
  1760. typeIndex ==
  1761. 'chapter-' +
  1762. 0 +
  1763. '-' +
  1764. index1 &&
  1765. oldIndex > index1 &&
  1766. dragType == 'drag',
  1767. dragOverBottom2:
  1768. newIndex === index1 &&
  1769. typeIndex ==
  1770. 'chapter-' +
  1771. 0 +
  1772. '-' +
  1773. index1 &&
  1774. oldIndex < index1 &&
  1775. dragType == 'drag',
  1776. }">
  1777. <!-- <div @mousedown="
  1778. isdrag =
  1779. 'chapter-' + 0 + '-' + index1
  1780. " @mouseup="isdrag = ''" @touchstart="
  1781. isdrag =
  1782. 'chapter-' + 0 + '-' + index1
  1783. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1784. <div class="chapter_upload_o" style="
  1785. position: relative;
  1786. display: flex;
  1787. align-items: center;
  1788. ">
  1789. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1790. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1791. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1792. </div>
  1793. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1794. </div>
  1795. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1796. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1797. </div>
  1798. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1799. </div>
  1800. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1801. </div>
  1802. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1803. </div>
  1804. </div>
  1805. <div class="chapter_upload_n">
  1806. <input readonly="true" v-if="
  1807. item1.type == 2 ||
  1808. item1.type == 3 ||
  1809. item1.type == 12 ||
  1810. item1.type == 13 ||
  1811. item1.type == 7
  1812. " :placeholder="item1.name" @click="
  1813. updataVideoT(
  1814. $event,
  1815. index1
  1816. )
  1817. " style="
  1818. border: none;
  1819. outline: none;
  1820. width: 80%;
  1821. minwidth: 215px;
  1822. z-index: 99;
  1823. font-size: 14px;
  1824. white-space: nowrap;
  1825. overflow: hidden;
  1826. text-overflow: ellipsis;
  1827. " />
  1828. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1829. border: none;
  1830. outline: none;
  1831. width: 80%;
  1832. white-space: nowrap;
  1833. overflow: hidden;
  1834. text-overflow: ellipsis;
  1835. " readonly="true" @click="
  1836. selectAttText(index1)
  1837. " />
  1838. <input :placeholder="item1.title ? item1.title : '链接'
  1839. " v-if="item1.type == 8" style="
  1840. border: none;
  1841. outline: none;
  1842. width: 80%;
  1843. white-space: nowrap;
  1844. overflow: hidden;
  1845. text-overflow: ellipsis;
  1846. " readonly="true" @click="selectLine(index1)" />
  1847. <input :placeholder="item1.title ? item1.title : '链接'
  1848. " v-if="item1.type == 14" style="
  1849. border: none;
  1850. outline: none;
  1851. width: 80%;
  1852. white-space: nowrap;
  1853. overflow: hidden;
  1854. text-overflow: ellipsis;
  1855. " readonly="true" @click="
  1856. openUpdateSource(index1)
  1857. " />
  1858. </div>
  1859. <div class="chapter_upload_ic">
  1860. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1861. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1862. <div class="chapter_upload_up" @click="
  1863. upCd(
  1864. $event,
  1865. index1
  1866. )
  1867. "></div>
  1868. <div class="chapter_upload_down" @click="
  1869. downCd(
  1870. $event,
  1871. index1
  1872. )
  1873. "></div>
  1874. </div>
  1875. <div class="chapter_upload_ic_edit" v-if="
  1876. item1.type == 2 ||
  1877. item1.type == 3 ||
  1878. item1.type == 12 ||
  1879. item1.type == 13 ||
  1880. item1.type == 7
  1881. " @click.stop="
  1882. updataVideoT(
  1883. $event,
  1884. index1
  1885. )
  1886. ">
  1887. <div></div>
  1888. </div>
  1889. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1890. selectAttText(index1)
  1891. ">
  1892. <div></div>
  1893. </div>
  1894. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1895. @click="selectLine(index1)">
  1896. <div></div>
  1897. </div>
  1898. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1899. openUpdateSource(index1)
  1900. ">
  1901. <div></div>
  1902. </div> -->
  1903. <div class="chapter_upload_ic_r" @click.stop="
  1904. deleteInfoData(
  1905. $event,
  1906. index1
  1907. )
  1908. ">
  1909. <div></div>
  1910. </div>
  1911. </div>
  1912. </div>
  1913. </div>
  1914. </div>
  1915. </div>
  1916. <div v-if="
  1917. infoproVisible
  1918. " class="mask">
  1919. <div class="progressBox">
  1920. <!-- <div id="closePro" class="closeCss">
  1921. <img src="../../../../assets/icon/close.png" alt />
  1922. </div> -->
  1923. <div class="lbox">
  1924. <img src="../../../assets/loading.gif" />上传中,请稍后
  1925. </div>
  1926. <div style="margin-bottom: 10px">
  1927. <span>{{
  1928. infoisFinishSize
  1929. }}M</span>
  1930. /
  1931. <span>{{
  1932. infoisAllSize
  1933. }}M</span>
  1934. </div>
  1935. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1936. ? infoprogress
  1937. : 0
  1938. " style="width: 80%"></el-progress>
  1939. </div>
  1940. </div>
  1941. </div>
  1942. </div>
  1943. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1944. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1945. <div class="c_info_title">
  1946. 补充描述
  1947. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1948. </div>
  1949. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1950. <div style="width: calc(100%)">
  1951. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1952. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1953. </div>
  1954. </div>
  1955. </div>
  1956. </div>
  1957. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3' && isOutline">
  1958. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1959. <div class="c_info_title">
  1960. 课程大纲
  1961. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1962. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1963. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1964. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1965. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1966. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1967. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1968. </el-tooltip>
  1969. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1970. @click="openAiDialog2(2, 'aiOutline'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1971. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1972. @click="openAiDialog2(2, 'aiOutline2'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1973. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1974. </div>
  1975. <div class="task_outline">
  1976. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1977. <div class="outline_task">
  1978. <div class="title">任务{{ index + 1 }}</div>
  1979. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1980. v-model="item.task" />
  1981. <div class="outline_btn">
  1982. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1983. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)" @click="openAiDialog(2, 'aiOutlineDetail2', index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-${item.taskDetail2 ? '重新生成任务' : '生成任务'}按钮`)">{{ item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  1984. </el-tooltip>
  1985. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在上面加入一个任务按钮`)">在上面加入一个任务</button>
  1986. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在下面加入一个任务按钮`)">在下面加入一个任务</button>
  1987. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="deleteTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-删除按钮`)" v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  1988. </div>
  1989. </div>
  1990. <div class="outline_detail" :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1991. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]" @click="cancelAjax('outlineTask', index)">停止</div>
  1992. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1993. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2" @change="textAreaChange('taskDetail2', index)"></textarea>
  1994. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1995. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1996. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail1-'+index]}">
  1997. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1998. <div class="op_box_right">
  1999. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2000. <div class="r_pub_button_op"
  2001. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `右键课程大纲-任务${index + 1}-智能优化按钮`)"
  2002. @click="openAiDialog(2, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-智能优化按钮`)">智能优化</div>
  2003. </el-tooltip>
  2004. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-确定/编辑按钮`)">{{
  2005. item.isTask2 ? '确定' : '编辑'}}</div>
  2006. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail1-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail1-'+index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-引用按钮`)"></el-switch>
  2007. </div>
  2008. </div>
  2009. </div>
  2010. </div>
  2011. </div>
  2012. </div>
  2013. </div>
  2014. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 0 || istemplate == 1)">
  2015. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2016. <div class="c_info_title">
  2017. 概念群
  2018. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2019. @click="openAiDialog2(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-重新生成概念群按钮`)">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  2020. </div>
  2021. <div class="task_outline">
  2022. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  2023. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  2024. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  2025. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  2026. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  2027. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote1']}">
  2028. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2029. <div class="op_box_right">
  2030. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2031. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1'), addCourseBehavior('courseBehavior', `右键概念群-智能优化按钮`)"
  2032. @click="openAiDialog(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-智能优化按钮`)">智能优化</div>
  2033. </el-tooltip>
  2034. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s'), addCourseBehavior('courseBehavior', `点击概念群-确定/编辑按钮`)">{{
  2035. cpote.cpote1s ? '确定' : '编辑'}}</div>
  2036. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote1']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-引用按钮`)"></el-switch>
  2037. </div>
  2038. </div>
  2039. </div>
  2040. </div>
  2041. </div>
  2042. </div>
  2043. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 1 || istemplate == 1)">
  2044. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2045. <div class="c_info_title">
  2046. 问题链
  2047. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2048. @click="openAiDialog2(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-重新生成问题链按钮`)">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  2049. </div>
  2050. <div class="task_outline">
  2051. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  2052. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  2053. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  2054. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  2055. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  2056. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote2']}">
  2057. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2058. <div class="op_box_right">
  2059. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2060. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2'), addCourseBehavior('courseBehavior', `右键问题链-智能优化按钮`)"
  2061. @click="openAiDialog(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-智能优化按钮`)">智能优化</div>
  2062. </el-tooltip>
  2063. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s'), addCourseBehavior('courseBehavior', `点击问题链-确定/编辑按钮`)">{{
  2064. cpote.cpote2s ? '确定' : '编辑'}}</div>
  2065. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-引用按钮`)"></el-switch>
  2066. </div>
  2067. </div>
  2068. </div>
  2069. </div>
  2070. </div>
  2071. </div>
  2072. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 2 || istemplate == 1)">
  2073. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2074. <div class="c_info_title">
  2075. 目标层
  2076. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2077. @click="openAiDialog2(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-重新生成目标层按钮`)">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  2078. </div>
  2079. <div class="task_outline">
  2080. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  2081. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  2082. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  2083. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  2084. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  2085. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote3']}">
  2086. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2087. <div class="op_box_right">
  2088. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2089. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3'), addCourseBehavior('courseBehavior', `右键目标层-智能优化按钮`)"
  2090. @click="openAiDialog(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-智能优化按钮`)">智能优化</div>
  2091. </el-tooltip>
  2092. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s'), addCourseBehavior('courseBehavior', `点击目标层-确定/编辑按钮`)">{{
  2093. cpote.cpote3s ? '确定' : '编辑'}}</div>
  2094. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote3']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-引用按钮`)"></el-switch>
  2095. </div>
  2096. </div>
  2097. </div>
  2098. </div>
  2099. </div>
  2100. </div>
  2101. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 3 || istemplate == 1)">
  2102. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2103. <div class="c_info_title">
  2104. 任务簇
  2105. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2106. @click="openAiDialog2(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-重新生成任务簇按钮`)">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  2107. </div>
  2108. <div class="task_outline">
  2109. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  2110. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  2111. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  2112. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  2113. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  2114. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote4']}">
  2115. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2116. <div class="op_box_right">
  2117. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2118. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4'), addCourseBehavior('courseBehavior', `右键任务簇-智能优化按钮`)"
  2119. @click="openAiDialog(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-智能优化按钮`)">智能优化</div>
  2120. </el-tooltip>
  2121. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s'), addCourseBehavior('courseBehavior', `点击任务簇-确定/编辑按钮`)">{{
  2122. cpote.cpote4s ? '确定' : '编辑'}}</div>
  2123. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote4']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-引用按钮`)"></el-switch>
  2124. </div>
  2125. </div>
  2126. </div>
  2127. </div>
  2128. </div>
  2129. </div>
  2130. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  2131. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  2132. <div class="c_info_title">
  2133. 教案
  2134. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  2135. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2136. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  2137. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  2138. </el-tooltip>
  2139. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2140. @click="openAiDialog2(2, 'aiTeacher2'), addCourseBehavior('courseBehavior', `点击教案-重新生成教案按钮`)" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  2141. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="panTeacher() == 0 && istemplate == 1 && (templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3')">
  2142. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  2143. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  2144. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  2145. </el-tooltip>
  2146. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  2147. </div>
  2148. <div class="task_outline">
  2149. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  2150. <div class="outline_task">
  2151. <div class="title">任务{{ index + 1 }}</div>
  2152. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2153. v-model="item.task" />
  2154. </div>
  2155. <div class="outline_detail" :style="{ minHeight: taskDetailLoading5.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2156. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading5.indexOf('task-' + index) !== -1" @click="cancelAjax('teacherDetail2', index)">停止</div>
  2157. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  2158. v-model="item.taskDetail3" v-if="item.isTask3" @change="textAreaChange('taskDetail3', index)"></textarea>
  2159. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  2160. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  2161. <div class="op_box" :class="{op_box_isquote: isQuote['teacherDetail2-'+index]}">
  2162. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2163. <div class="op_box_right">
  2164. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2165. <div class="r_pub_button_op"
  2166. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `右键教案-任务${index + 1}-智能优化按钮`)"
  2167. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-智能优化按钮`)">智能优化</div>
  2168. </el-tooltip>
  2169. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  2170. item.isTask3 ? '确定' : '编辑'}}</div>
  2171. <el-switch style="margin-left: 10px" v-model="isQuote['teacherDetail2-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('teacherDetail2-'+index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-引用按钮`)"></el-switch>
  2172. </div>
  2173. </div>
  2174. </div>
  2175. </div>
  2176. </div>
  2177. </div>
  2178. </div>
  2179. <div class="info_btnBox3" v-if="istemplate != 1">
  2180. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2181. goTo(
  2182. '/course?userid=' +
  2183. userid +
  2184. '&oid=' +
  2185. oid +
  2186. '&org=' +
  2187. org +
  2188. '&role=' +
  2189. role
  2190. )
  2191. ">
  2192. 返回课程
  2193. </button>
  2194. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2195. {{ steps == 4 ? "返回课程" : "上一步" }}
  2196. </button>
  2197. <button class="c_pub_button_confirm" v-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" @click="clickGenTT2">
  2198. {{isuseT === true ? "重新生成概况和目标" : "生成概况和目标"}}
  2199. </button>
  2200. <button class="c_pub_button_confirm" v-else-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  2201. {{isuseT === true ? "重新生成概况" : "生成概况"}}
  2202. </button>
  2203. <button class="c_pub_button_confirm" v-if="isOutline2" @click="exportTeachPlan">
  2204. {{ "导出教案" }}
  2205. </button>
  2206. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  2207. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  2208. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  2209. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  2210. pub_btn_next_img: steps != 3,
  2211. pub_btn_finish_img: steps == 3,
  2212. }">
  2213. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  2214. </button>
  2215. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  2216. @contextmenu.prevent="nextSteps(1)" :class="{
  2217. pub_btn_next_img: steps != 3,
  2218. pub_btn_finish_img: steps == 3,
  2219. }">
  2220. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  2221. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  2222. : "下一步" }}
  2223. </button>
  2224. </el-tooltip>
  2225. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  2226. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  2227. pub_btn_next_img: steps != 3,
  2228. pub_btn_finish_img: steps == 3,
  2229. }">下一步2</button>
  2230. </el-tooltip> -->
  2231. </div>
  2232. </div>
  2233. <div class="rightBox" v-if="steps == 2" :style="{
  2234. height:
  2235. !isStepDisplay && !isBtnDisplay
  2236. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  2237. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2238. }">
  2239. <div class="basic_box" style="
  2240. padding: 20px 30px 0px !important;
  2241. box-sizing: border-box;
  2242. height: calc(100% - 80px);
  2243. overflow: auto;
  2244. background: #fff;
  2245. ">
  2246. <!-- <div
  2247. style="
  2248. color: #b8b8b8;
  2249. background: #fff;
  2250. width: 26%;
  2251. height: 40px;
  2252. border-radius: 15px;
  2253. padding-left: 20px;
  2254. line-height: 40px;
  2255. font-size: 17px;
  2256. box-shadow: 0px 1px 2px 2px #e0e0e0;
  2257. "
  2258. >-->
  2259. <div class="right_title" style="border: none; margin: 0; padding: 0">
  2260. 请选择合适的课程模板
  2261. </div>
  2262. <div class="wordbox">
  2263. <div class="wordTeacher" @click="checkTemplate2()">
  2264. <div class="wordPic">
  2265. <img src="../../../assets/icon/new/template_none.png" alt />
  2266. </div>
  2267. <div style="
  2268. margin-top: 10px;
  2269. line-height: 19px;
  2270. overflow: hidden;
  2271. text-overflow: ellipsis;
  2272. white-space: nowrap;
  2273. padding: 0 20px;
  2274. ">
  2275. 空白模板
  2276. </div>
  2277. </div>
  2278. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  2279. <div class="wordPic">
  2280. <img src="../../../assets/icon/new/template.png" alt />
  2281. </div>
  2282. <div style="
  2283. margin-top: 10px;
  2284. line-height: 19px;
  2285. overflow: hidden;
  2286. text-overflow: ellipsis;
  2287. white-space: nowrap;
  2288. padding: 0 20px;
  2289. ">
  2290. {{ aa.title }}
  2291. </div>
  2292. </div>
  2293. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  2294. <div class="wordPic">
  2295. <img src="../../../assets/icon/new/template.png" alt />
  2296. </div>
  2297. <div style="
  2298. margin-top: 10px;
  2299. line-height: 19px;
  2300. overflow: hidden;
  2301. text-overflow: ellipsis;
  2302. white-space: nowrap;
  2303. padding: 0 20px;
  2304. ">
  2305. 简易模板
  2306. </div>
  2307. </div>
  2308. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  2309. <div class="wordPic">
  2310. <img src="../../../assets/icon/new/template.png" alt />
  2311. </div>
  2312. <div style="
  2313. margin-top: 10px;
  2314. line-height: 19px;
  2315. overflow: hidden;
  2316. text-overflow: ellipsis;
  2317. white-space: nowrap;
  2318. padding: 0 20px;
  2319. ">
  2320. 智能粘贴模式
  2321. </div>
  2322. </div>
  2323. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  2324. <div class="wordPic">
  2325. <img src="../../../assets/icon/wordMub.png" alt />
  2326. </div>
  2327. <div style="
  2328. margin-top: 10px;
  2329. line-height: 19px;
  2330. overflow: hidden;
  2331. text-overflow: ellipsis;
  2332. white-space: nowrap;
  2333. padding: 0 20px;
  2334. ">
  2335. 未来小学课程设计
  2336. </div>
  2337. </div> -->
  2338. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  2339. <div class="wordPic">
  2340. <img src="../../../assets/icon/wordMub.png" alt />
  2341. </div>
  2342. <div style="
  2343. margin-top: 10px;
  2344. line-height: 19px;
  2345. overflow: hidden;
  2346. text-overflow: ellipsis;
  2347. white-space: nowrap;
  2348. padding: 0 20px;
  2349. ">
  2350. 我的课程
  2351. </div>
  2352. </div> -->
  2353. </div>
  2354. </div>
  2355. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  2356. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2357. goTo(
  2358. '/course?userid=' +
  2359. userid +
  2360. '&oid=' +
  2361. oid +
  2362. '&org=' +
  2363. org +
  2364. '&role=' +
  2365. role
  2366. )
  2367. ">
  2368. 返回课程
  2369. </button>
  2370. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2371. {{ steps == 4 ? "返回课程" : "上一步" }}
  2372. </button>
  2373. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  2374. pub_btn_next_img: steps != 3,
  2375. pub_btn_finish_img: steps == 3,
  2376. }">
  2377. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  2378. </button>
  2379. </div>
  2380. </div>
  2381. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  2382. height:
  2383. !isStepDisplay && !isBtnDisplay
  2384. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  2385. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2386. }">
  2387. <div class="rb_c_box">
  2388. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1" :style="{width: stepShow ? '270px' : '0',minWidth: stepShow ? '270px' : '0',height: stepShow ? '100%' : '0',marginRight: stepShow ? '10px' : '0'}">
  2389. <div class="close_btn" @click="stepShow = !stepShow" :class="!stepShow ? 'close_btn_voice' : ''" style="left: 0;right: unset;top: 5px;transform: rotate(180deg);">
  2390. <img src="../../../assets/icon/course/arrow.svg" >
  2391. </div>
  2392. <div class="rb_c_nav">
  2393. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1" v-show="stepShow" style="margin-left: auto">目录</span>
  2394. <!-- <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span> -->
  2395. <!-- <span class="button-toggle" @click="stepShow = !stepShow">{{ stepShow ? '收缩' : '展开' }}</span> -->
  2396. </div>
  2397. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  2398. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  2399. position: istemplate == 1 ? 'sticky' : 'unset',
  2400. top: istemplate == 1 ? '0' : 'unset'
  2401. }">
  2402. <!-- <div class="navTop">辅助导航</div> -->
  2403. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  2404. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  2405. <div class="nt_taskBox" style="width: 100%;">
  2406. <div class="nt_taskTitle"
  2407. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  2408. unitIndex + 1 }}</div>
  2409. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  2410. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  2411. <span>{{ unitJson[unitIndex].dyName }}</span>
  2412. </el-tooltip>
  2413. </div>
  2414. </div>
  2415. </div> -->
  2416. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  2417. .taskJson" :key="tIndex" :class="{
  2418. dragOverTop:
  2419. newIndex === tIndex &&
  2420. typeIndex == 'task-' + tIndex &&
  2421. oldIndex > tIndex &&
  2422. dragType == 'task',
  2423. dragOverBottom:
  2424. newIndex === tIndex &&
  2425. typeIndex == 'task-' + tIndex &&
  2426. oldIndex < tIndex &&
  2427. dragType == 'task',
  2428. }">
  2429. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  2430. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  2431. class="navTask" :class="{
  2432. isNavTask:
  2433. isClickColor > 0 && isClickColor == tIndex + 1,
  2434. isNavOpen: t.toolOpen,
  2435. }">
  2436. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  2437. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  2438. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  2439. class="chapter_upload_drag"></div>
  2440. <div class="nt_taskBox">
  2441. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  2442. <div class="nt_taskName">
  2443. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2444. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  2445. </el-tooltip>
  2446. </div>
  2447. </div>
  2448. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  2449. 1
  2450. ">
  2451. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  2452. @click.stop="taskMove(1, tIndex)"></div>
  2453. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  2454. @click.stop="taskMove(2, tIndex)"></div>
  2455. </div> -->
  2456. </div>
  2457. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2458. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2459. @click="jumpGj(tIndex, toolIndex2)">
  2460. <div class="gjCss" :class="{
  2461. isGjCss:
  2462. toolIndexType == `gj${tIndex}${toolIndex2}`,
  2463. }">
  2464. <div>工具{{ toolIndex2 + 1 }}:</div>
  2465. <div>
  2466. {{
  2467. toolsData[tool.tool[0]] &&
  2468. toolsData[tool.tool[0]].name
  2469. }}
  2470. </div>
  2471. </div>
  2472. </div>
  2473. </div>
  2474. </div>
  2475. </div>
  2476. <div class="navBottom" v-if="courseState == 1">
  2477. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  2478. dragOverTop:
  2479. newIndex === stageIndex &&
  2480. typeIndex == 'Unit-' + stageIndex &&
  2481. oldIndex > stageIndex &&
  2482. dragType == 'Unit',
  2483. dragOverBottom:
  2484. newIndex === stageIndex &&
  2485. typeIndex == 'Unit-' + stageIndex &&
  2486. oldIndex < stageIndex &&
  2487. dragType == 'Unit',
  2488. }">
  2489. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  2490. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  2491. @click="unitSet2(stageIndex)" class="navStage" :class="{
  2492. isNavStage: stageIndex == unitIndex,
  2493. isNavStageOpen: stage.toolOpen,
  2494. }">
  2495. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  2496. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  2497. class="chapter_upload_drag"></div>
  2498. <div class="nt_taskBox">
  2499. <div class="nt_taskTitle">
  2500. 第{{ stageIndex + 1 }}阶段:
  2501. </div>
  2502. <div class="nt_taskName">
  2503. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  2504. " placement="top">
  2505. <span>{{
  2506. stage.dyName ? stage.dyName : "未命名阶段"
  2507. }}</span>
  2508. </el-tooltip>
  2509. </div>
  2510. </div>
  2511. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  2512. </div>
  2513. <div v-for="(t, tIndex) in unitJson[stageIndex]
  2514. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  2515. dragOverTop:
  2516. newIndex === tIndex &&
  2517. typeIndex == 'task-' + tIndex &&
  2518. ((oldIndex > tIndex &&
  2519. stageIndex == checkUnitIndex) ||
  2520. (oldIndex == tIndex &&
  2521. stageIndex == checkUnitIndex &&
  2522. checkUnitIndex != oldUnitIndex)) &&
  2523. dragType == 'task',
  2524. dragOverBottom:
  2525. newIndex === tIndex &&
  2526. typeIndex == 'task-' + tIndex &&
  2527. oldIndex < tIndex &&
  2528. stageIndex == checkUnitIndex &&
  2529. dragType == 'task',
  2530. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  2531. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  2532. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  2533. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  2534. isNavTask:
  2535. isClickColor > 0 &&
  2536. isClickColor == tIndex + 1 &&
  2537. stageIndex == unitIndex,
  2538. isNavOpen: t.toolOpen,
  2539. }">
  2540. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  2541. <div @mousedown="
  2542. isdrag = 'task-' + stageIndex + '-' + tIndex
  2543. " @mouseup="isdrag = ''" @touchstart="
  2544. isdrag = 'task-' + stageIndex + '-' + tIndex
  2545. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  2546. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  2547. <div class="nt_taskTitle">
  2548. 任务{{ tIndex + 1 }}:
  2549. </div>
  2550. <div class="nt_taskName">
  2551. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2552. <span>{{
  2553. t.task ? t.task : "未命名任务"
  2554. }}</span>
  2555. </el-tooltip>
  2556. </div>
  2557. </div>
  2558. </div>
  2559. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2560. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2561. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  2562. <div class="gjCss" :class="{
  2563. isGjCss:
  2564. toolIndexType ==
  2565. `gj${tIndex}${toolIndex2}${stageIndex}`,
  2566. }">
  2567. <div>工具{{ toolIndex2 + 1 }}:</div>
  2568. <div>
  2569. {{
  2570. toolsData[tool.tool[0]] &&
  2571. toolsData[tool.tool[0]].name
  2572. }}
  2573. </div>
  2574. </div>
  2575. </div>
  2576. </div>
  2577. </div>
  2578. </div>
  2579. </div>
  2580. </div>
  2581. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  2582. <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
  2583. </div>
  2584. </div>
  2585. <div class="rb_c_box_right">
  2586. <div class="rb_c_box_btn" style="justify-content: flex-end">
  2587. <span class="title">{{ courseName }}</span>
  2588. <!-- <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button> -->
  2589. <button class="c_pub_button_return"
  2590. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="margin-left: auto;border: none;">
  2591. {{ steps == 4 ? "返回课程" : "上一步" }}
  2592. </button>
  2593. <button class="c_pub_button_confirm3 buttonBoxB">
  2594. <span>一键生成</span>
  2595. <div class="buttonBox">
  2596. <div @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</div>
  2597. <div @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)" v-if="panTool() == 0">一键生成所有工具</div>
  2598. <div @click="openAiDialog2(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)" v-if="panTool() > 0">重新生成所有工具</div>
  2599. <div @click="allEvaCan(), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有评价按钮`)" v-if="panTool() > 0">{{panTaskElist() == 0 && panEvaCont() == 0 ? '一键生成所有评价' : '重新生成所有评价'}}</div>
  2600. <div @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案</div>
  2601. </div>
  2602. </button>
  2603. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog2(2, 'aiTask3','all', ''), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</button> -->
  2604. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="openAiDialog(2, 'aiTaskG2', 'all'), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有工具按钮`)" v-if="panTool() == 0">一键生成所有工具</button> -->
  2605. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="allEvaCan(), addCourseBehavior('courseBehavior', `点击学历案-一键生成所有评价按钮`)" v-if="panTool() > 0 && panTaskElist() == 0 && panEvaCont() == 0">一键生成所有评价</button> -->
  2606. <!-- <button class="c_pub_button_confirm3" style="margin: 0 0 0 10px;" @click="exportTaskEA(), addCourseBehavior('courseBehavior', `点击学历案-导出评价和学历案按钮`)">导出评价和学历案</button> -->
  2607. <button class="c_pub_button_confirm" style="margin: 0 0 0 10px;" v-if="steps < 4 && istemplate != 1" @click="nextSteps">
  2608. {{ steps == 3 ? "确认上传" : "下一步" }}
  2609. </button>
  2610. </div>
  2611. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  2612. <div v-if="false" style="
  2613. display: flex;
  2614. flex-direction: row;
  2615. align-items: center;
  2616. position: sticky;
  2617. top: 0;
  2618. z-index: 99;
  2619. width: 100%;
  2620. padding: 0 20px 0 20px;
  2621. box-sizing: border-box;
  2622. background: #fff;
  2623. border-radius: 8px;
  2624. ">
  2625. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2626. <div class="cru_selectBox" :style="{
  2627. maxWidth: isPasteTask
  2628. ? 'calc(100% - 335px)'
  2629. : 'calc(100% - 190px)',
  2630. }" v-if="courseState == 1">
  2631. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2632. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2633. <!-- item.dyName ? item.dyName : -->
  2634. <span v-if="
  2635. unitJson[unitJson.length - 1].easy == 4 ||
  2636. unitJson[unitJson.length - 1].easy == 6
  2637. ">{{
  2638. item.dyName
  2639. ? item.dyName
  2640. : "第" + (index + 1) + "阶段"
  2641. }}</span>
  2642. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2643. </div>
  2644. <div class="cru_line" :style="{
  2645. left: offsetLetfPx + 'px',
  2646. }"></div>
  2647. </div>
  2648. <div class="addStageImg" @click="addunit()" v-if="
  2649. !(unitJson[unitJson.length - 1].easy == 4) &&
  2650. !(unitJson[unitJson.length - 1].easy == 6) &&
  2651. courseState == 1
  2652. ">
  2653. <img src="../../../assets/icon/new/addStage.png" alt />
  2654. </div>
  2655. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2656. v-if="courseState == 2" style="margin: 15px 0">
  2657. 新建阶段
  2658. </button>
  2659. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2660. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2661. 阶段顺序
  2662. </button>
  2663. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2664. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2665. 智能粘贴
  2666. </button>
  2667. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2668. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2669. }" style="padding: 0 12px">
  2670. 选择课程模板
  2671. </button>
  2672. </div>
  2673. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2674. :key="index">
  2675. <div v-loading="anLoading[0]" v-if="courseState == 4" style="position: relative;
  2676. background: #fff;
  2677. box-sizing: border-box;
  2678. padding: 1px 20px 10px;
  2679. width: 100%;
  2680. border-radius: 10px;">
  2681. <div style="
  2682. display: flex;
  2683. flex-direction: row;
  2684. justify-content: space-between;
  2685. align-items: center;
  2686. " :style="{
  2687. margin: !item.taskJson[0].isFoldchapter
  2688. ? '20px 0 10px'
  2689. : '20px 0 0',
  2690. }">
  2691. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2692. 学习内容
  2693. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2694. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2695. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2696. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2697. </el-tooltip>
  2698. </div>
  2699. </div>
  2700. <div >
  2701. <div class="add_chapters_box add_c_none" v-if="
  2702. item.taskJson[0].chapterData &&
  2703. item.taskJson[0].chapterData.length == 0
  2704. ">
  2705. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  2706. <span>请添加学习内容</span>
  2707. </div>
  2708. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2709. <div @dragstart="
  2710. dragStart(item1, index1, 0)
  2711. " @dragover.prevent="
  2712. dragOver(index1, 0)
  2713. " @dragend="dragEnd()" :draggable="isdrag ==
  2714. 'chapter-' + 0 + '-' + index1
  2715. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2716. :key="item1.id" @click="
  2717. getChapterData(
  2718. $event,
  2719. unitIndex,
  2720. index,
  2721. index1,
  2722. item1.type
  2723. )
  2724. " :class="{
  2725. dragOverTop2:
  2726. newIndex === index1 &&
  2727. typeIndex ==
  2728. 'chapter-' +
  2729. 0 +
  2730. '-' +
  2731. index1 &&
  2732. oldIndex > index1 &&
  2733. dragType == 'drag',
  2734. dragOverBottom2:
  2735. newIndex === index1 &&
  2736. typeIndex ==
  2737. 'chapter-' +
  2738. 0 +
  2739. '-' +
  2740. index1 &&
  2741. oldIndex < index1 &&
  2742. dragType == 'drag',
  2743. }">
  2744. <div @mousedown="
  2745. isdrag =
  2746. 'chapter-' + 0 + '-' + index1
  2747. " @mouseup="isdrag = ''" @touchstart="
  2748. isdrag =
  2749. 'chapter-' + 0 + '-' + index1
  2750. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2751. <div class="chapter_upload_o" style="
  2752. position: relative;
  2753. display: flex;
  2754. align-items: center;
  2755. ">
  2756. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2757. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2758. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2759. </div>
  2760. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2761. </div>
  2762. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2763. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2764. </div>
  2765. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2766. </div>
  2767. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2768. </div>
  2769. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2770. </div>
  2771. </div>
  2772. <div class="chapter_upload_n">
  2773. <input readonly="true" v-if="
  2774. item1.type == 2 ||
  2775. item1.type == 3 ||
  2776. item1.type == 12 ||
  2777. item1.type == 13 ||
  2778. item1.type == 7
  2779. " :placeholder="item1.name" @click="
  2780. updataVideoT(
  2781. $event,
  2782. unitIndex,
  2783. 0,
  2784. index1
  2785. )
  2786. " style="
  2787. border: none;
  2788. outline: none;
  2789. width: 80%;
  2790. minwidth: 215px;
  2791. z-index: 99;
  2792. font-size: 14px;
  2793. white-space: nowrap;
  2794. overflow: hidden;
  2795. text-overflow: ellipsis;
  2796. " />
  2797. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2798. border: none;
  2799. outline: none;
  2800. width: 80%;
  2801. white-space: nowrap;
  2802. overflow: hidden;
  2803. text-overflow: ellipsis;
  2804. " readonly="true" @click="
  2805. selectAttText(0, index1)
  2806. " />
  2807. <input :placeholder="item1.title ? item1.title : '链接'
  2808. " v-if="item1.type == 8" style="
  2809. border: none;
  2810. outline: none;
  2811. width: 80%;
  2812. white-space: nowrap;
  2813. overflow: hidden;
  2814. text-overflow: ellipsis;
  2815. " readonly="true" @click="selectLine(0, index1)" />
  2816. <input :placeholder="item1.title ? item1.title : '链接'
  2817. " v-if="item1.type == 14" style="
  2818. border: none;
  2819. outline: none;
  2820. width: 80%;
  2821. white-space: nowrap;
  2822. overflow: hidden;
  2823. text-overflow: ellipsis;
  2824. " readonly="true" @click="
  2825. openUpdateSource(0, index1)
  2826. " />
  2827. </div>
  2828. <div class="chapter_upload_ic">
  2829. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2830. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2831. checkChpater( $event, unitIndex, 0, index1 )
  2832. ">
  2833. <div></div>
  2834. </div>
  2835. <div class="chapter_upload_ud" style="z-index: 99">
  2836. <div class="chapter_upload_up" @click="
  2837. upCd(
  2838. $event,
  2839. unitIndex,
  2840. index,
  2841. 0,
  2842. index1
  2843. )
  2844. "></div>
  2845. <div class="chapter_upload_down" @click="
  2846. downCd(
  2847. $event,
  2848. unitIndex,
  2849. index,
  2850. 0,
  2851. index1
  2852. )
  2853. "></div>
  2854. </div>
  2855. <div class="chapter_upload_ic_edit" v-if="
  2856. item1.type == 2 ||
  2857. item1.type == 3 ||
  2858. item1.type == 12 ||
  2859. item1.type == 13 ||
  2860. item1.type == 7
  2861. " @click.stop="
  2862. updataVideoT(
  2863. $event,
  2864. unitIndex,
  2865. 0,
  2866. index1
  2867. )
  2868. ">
  2869. <div></div>
  2870. </div>
  2871. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2872. selectAttText(0, index1)
  2873. ">
  2874. <div></div>
  2875. </div>
  2876. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2877. @click="selectLine(0, index1)">
  2878. <div></div>
  2879. </div>
  2880. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2881. openUpdateSource(0, index1)
  2882. ">
  2883. <div></div>
  2884. </div>
  2885. <div class="chapter_upload_ic_r" @click.stop="
  2886. deleteChapterData(
  2887. $event,
  2888. unitIndex,
  2889. index,
  2890. index1,
  2891. 0
  2892. )
  2893. ">
  2894. <div></div>
  2895. </div>
  2896. </div>
  2897. </div>
  2898. </div>
  2899. </div>
  2900. </div>
  2901. <div class="add_info_box" style="margin: 10px 0 0">
  2902. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2903. 文件
  2904. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple" @change="
  2905. beforeUpload2(
  2906. $event,
  2907. unitIndex,
  2908. 13,
  2909. 0
  2910. )
  2911. " />
  2912. </button>
  2913. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2914. 图文
  2915. </button>
  2916. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2917. 链接
  2918. </button>
  2919. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2920. 代码
  2921. </button>
  2922. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2923. 资源
  2924. </button>
  2925. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2926. AI生成PPT
  2927. </button>
  2928. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2929. AI生成教案
  2930. </button>
  2931. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2932. 智能检索视频
  2933. </button>
  2934. </div>
  2935. <div v-if="
  2936. unitJson[unitIndex].chapterInfo[0].taskJson[
  2937. 0
  2938. ].proVisible
  2939. " class="mask">
  2940. <div class="progressBox">
  2941. <!-- <div id="closePro" class="closeCss">
  2942. <img src="../../../../assets/icon/close.png" alt />
  2943. </div> -->
  2944. <div class="lbox">
  2945. <img src="../../../assets/loading.gif" />上传中,请稍后
  2946. </div>
  2947. <div style="margin-bottom: 10px">
  2948. <span>{{
  2949. unitJson[unitIndex].chapterInfo[0].taskJson[
  2950. 0
  2951. ].isFinishSize
  2952. }}</span>
  2953. /
  2954. <span>{{
  2955. unitJson[unitIndex].chapterInfo[0].taskJson[
  2956. 0
  2957. ].isAllSize
  2958. }}</span>
  2959. </div>
  2960. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2961. 0
  2962. ].progress
  2963. ? unitJson[unitIndex].chapterInfo[0]
  2964. .taskJson[0].progress
  2965. : 0
  2966. " style="width: 80%"></el-progress> -->
  2967. </div>
  2968. </div>
  2969. </div>
  2970. <div class="chapter_box" v-if="courseState == 1">
  2971. <div class="chapter_contentbox">
  2972. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2973. <div class="cc_input">
  2974. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2975. v-model="unitJson[unitIndex].dyName" />
  2976. </div>
  2977. <div class="remove" v-if="
  2978. (unitJson.length > 1 || courseState != 2) &&
  2979. !(unitJson[unitJson.length - 1].easy == 4) &&
  2980. !(unitJson[unitJson.length - 1].easy == 6)
  2981. " @click="deleteUnit(unitIndex)"></div>
  2982. </div>
  2983. </div>
  2984. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2985. margin: 50px 0px 10px;
  2986. font-size: 1.5em;
  2987. font-weight: 700;
  2988. color: #0f7eff;
  2989. ">
  2990. 添加任务
  2991. </div> -->
  2992. <div class="taskBorder" :style="{
  2993. minHeight: unitJson[unitIndex].easy && 'unset',
  2994. borderRadius: itemTaskIndex == 0 ? '0px 0px 10px 10px' : '10px',
  2995. marginTop: itemTaskIndex == 0 ? '0' : '10px',
  2996. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2997. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2998. <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
  2999. <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" @click="cancelAjax('aiTaskGL1', itemTaskIndex)">停止</div>
  3000. <div class="taskTitle">
  3001. <div style="display: flex;width: 100%;justify-content: space-between;">
  3002. <span>任务{{ itemTaskIndex + 1 }}</span>
  3003. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3004. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  3005. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  3006. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  3007. </el-tooltip> -->
  3008. <div style="display: flex">
  3009. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3010. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  3011. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)"
  3012. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)">重新生成任务</button>
  3013. </el-tooltip>
  3014. </div>
  3015. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3016. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  3017. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  3018. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  3019. </el-tooltip> -->
  3020. </div>
  3021. </div>
  3022. <!-- padding: 20px; -->
  3023. <div v-if="unitJson[unitIndex].easy != 1">
  3024. <div :style="{
  3025. marginBottom:
  3026. unitJson[unitIndex].easy == 3 ||
  3027. (unitJson[unitIndex].easy == 5 &&
  3028. itemTask.taskType == 1)
  3029. ? '75px'
  3030. : '0',
  3031. }">
  3032. <div style="
  3033. display: flex;
  3034. margin: 0px 0 20px;
  3035. flex-direction: row;
  3036. justify-content: flex-start;
  3037. align-items: center;
  3038. ">
  3039. <div class="lineTitle">任务概述</div>
  3040. </div>
  3041. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  3042. flex-direction: row;
  3043. justify-content: flex-start;
  3044. align-items: center;
  3045. margin: 0;
  3046. ">
  3047. <!-- <div class="cc_title">
  3048. 任务{{ itemTaskIndex + 1 }}
  3049. </div> -->
  3050. <div class="cc_input">
  3051. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  3052. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3053. itemTaskIndex
  3054. ].task
  3055. " />
  3056. </div>
  3057. <div class="remove" v-if="
  3058. item.taskJson.length > 1 &&
  3059. (!unitJson[unitIndex].easy ||
  3060. unitJson[unitIndex].easy == 6)
  3061. " @click="deleteTask(itemTaskIndex)"></div>
  3062. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  3063. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  3064. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  3065. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  3066. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  3067. </div> -->
  3068. </div>
  3069. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  3070. display: flex;
  3071. margin: 20px 0;
  3072. flex-direction: row;
  3073. justify-content: flex-start;
  3074. align-items: center;
  3075. ">
  3076. <div class="lineTitle">任务描述</div>
  3077. </div> && !itemTask.isFold2-->
  3078. <div v-if="
  3079. easyArray.indexOf(unitJson[unitIndex].easy) ==
  3080. -1
  3081. " style="margin-top: 20px" class="op_task_box"
  3082. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  3083. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3084. itemTaskIndex
  3085. ].taskDetail
  3086. " @change="change"></editor-bar> -->
  3087. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  3088. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3089. itemTaskIndex
  3090. ].taskDetail
  3091. "></textarea>
  3092. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  3093. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  3094. itemTaskIndex
  3095. ].taskDetail
  3096. "></textarea> -->
  3097. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail2-'+itemTaskIndex]}">
  3098. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  3099. <div class="op_box_right">
  3100. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3101. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  3102. itemTaskIndex
  3103. ], itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  3104. itemTaskIndex
  3105. ], itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)">智能优化</div>
  3106. </el-tooltip>
  3107. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail2-'+itemTaskIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail2-'+itemTaskIndex)"></el-switch>
  3108. </div>
  3109. </div>
  3110. </div>
  3111. </div>
  3112. </div>
  3113. <div
  3114. v-loading="anLoading[itemTaskIndex]"
  3115. style="position: relative"
  3116. v-if="courseState == 5"
  3117. >
  3118. <div
  3119. style="
  3120. display: flex;
  3121. flex-direction: row;
  3122. justify-content: space-between;
  3123. align-items: center;
  3124. "
  3125. :style="{
  3126. margin: !itemTask.isFoldchapter
  3127. ? '20px 0 10px'
  3128. : '20px 0 0',
  3129. }"
  3130. >
  3131. <div
  3132. style="margin-bottom: 10px"
  3133. class="lineTitle clineTitle"
  3134. >
  3135. 学习内容
  3136. </div>
  3137. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  3138. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  3139. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  3140. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  3141. <!-- <div class="line"></div> -->
  3142. </div>
  3143. <!-- v-if="!itemTask.isFoldchapter" -->
  3144. <div>
  3145. <div
  3146. class="add_chapters_box add_c_none"
  3147. v-if="
  3148. itemTask.chapterData &&
  3149. itemTask.chapterData.length == 0
  3150. "
  3151. >
  3152. <!-- <img
  3153. src="../../../assets/icon/new/c_none.png"
  3154. alt
  3155. /> -->
  3156. <span>请添加学习内容</span>
  3157. </div>
  3158. <div
  3159. v-else
  3160. class="add_chapters_box"
  3161. style="display: flex; flex-direction: column"
  3162. >
  3163. <div
  3164. @dragstart="
  3165. dragStart(item1, index1, itemTaskIndex)
  3166. "
  3167. @dragover.prevent="
  3168. dragOver(index1, itemTaskIndex)
  3169. "
  3170. @dragend="dragEnd()"
  3171. :draggable="
  3172. isdrag ==
  3173. 'chapter-' + itemTaskIndex + '-' + index1
  3174. "
  3175. class="chapter_upload"
  3176. v-for="(item1, index1) in itemTask.chapterData"
  3177. :key="item1.id"
  3178. @click="
  3179. getChapterData(
  3180. $event,
  3181. unitIndex,
  3182. index,
  3183. index1,
  3184. item1.type
  3185. )
  3186. "
  3187. :class="{
  3188. dragOverTop2:
  3189. newIndex === index1 &&
  3190. typeIndex ==
  3191. 'chapter-' +
  3192. itemTaskIndex +
  3193. '-' +
  3194. index1 &&
  3195. oldIndex > index1 &&
  3196. dragType == 'drag',
  3197. dragOverBottom2:
  3198. newIndex === index1 &&
  3199. typeIndex ==
  3200. 'chapter-' +
  3201. itemTaskIndex +
  3202. '-' +
  3203. index1 &&
  3204. oldIndex < index1 &&
  3205. dragType == 'drag',
  3206. }"
  3207. >
  3208. <div
  3209. @mousedown="
  3210. isdrag =
  3211. 'chapter-' + itemTaskIndex + '-' + index1
  3212. "
  3213. @mouseup="isdrag = ''"
  3214. @touchstart="
  3215. isdrag =
  3216. 'chapter-' + itemTaskIndex + '-' + index1
  3217. "
  3218. @touchend="isdrag = ''"
  3219. class="chapter_upload_drag"
  3220. ></div>
  3221. <div
  3222. class="chapter_upload_o"
  3223. style="
  3224. position: relative;
  3225. display: flex;
  3226. align-items: center;
  3227. "
  3228. >
  3229. <div
  3230. class="chapter_upload_l"
  3231. style="padding: 1px 0 0 10px"
  3232. >
  3233. <div
  3234. v-if="item1.type == 2"
  3235. class="chapter_upload_l_i2"
  3236. ></div>
  3237. <div
  3238. v-if="item1.type == 3"
  3239. class="chapter_upload_l_i3"
  3240. style="margin-left: 1px"
  3241. ></div>
  3242. <div
  3243. v-if="item1.type == 6"
  3244. class="chapter_upload_l_i6"
  3245. style="margin-left: 1px"
  3246. ></div>
  3247. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3248. <div
  3249. v-if="item1.type == 8"
  3250. class="chapter_upload_l_i8"
  3251. style="margin-left: 1px"
  3252. ></div>
  3253. <div
  3254. v-if="item1.type == 14"
  3255. class="chapter_upload_l_i14"
  3256. style="margin-left: 1px"
  3257. ></div>
  3258. <div
  3259. v-if="item1.type == 12"
  3260. class="chapter_upload_l_i12"
  3261. style="margin-left: 1px"
  3262. ></div>
  3263. <div
  3264. v-if="item1.type == 13"
  3265. class="chapter_upload_l_i13"
  3266. style="margin-left: 1px"
  3267. ></div>
  3268. </div>
  3269. <div class="chapter_upload_n">
  3270. <input
  3271. readonly="true"
  3272. v-if="
  3273. item1.type == 2 ||
  3274. item1.type == 3 ||
  3275. item1.type == 12 ||
  3276. item1.type == 13 ||
  3277. item1.type == 7
  3278. "
  3279. :placeholder="item1.name"
  3280. @click="
  3281. updataVideoT(
  3282. $event,
  3283. unitIndex,
  3284. itemTaskIndex,
  3285. index1
  3286. )
  3287. "
  3288. style="
  3289. border: none;
  3290. outline: none;
  3291. width: 80%;
  3292. minwidth: 215px;
  3293. z-index: 99;
  3294. font-size: 14px;
  3295. white-space: nowrap;
  3296. overflow: hidden;
  3297. text-overflow: ellipsis;
  3298. "
  3299. />
  3300. <input
  3301. :placeholder="item1.name"
  3302. v-if="item1.type == 6"
  3303. style="
  3304. border: none;
  3305. outline: none;
  3306. width: 80%;
  3307. white-space: nowrap;
  3308. overflow: hidden;
  3309. text-overflow: ellipsis;
  3310. "
  3311. readonly="true"
  3312. @click="
  3313. selectAttText(itemTaskIndex, index1)
  3314. "
  3315. />
  3316. <input
  3317. :placeholder="
  3318. item1.title ? item1.title : '链接'
  3319. "
  3320. v-if="item1.type == 8"
  3321. style="
  3322. border: none;
  3323. outline: none;
  3324. width: 80%;
  3325. white-space: nowrap;
  3326. overflow: hidden;
  3327. text-overflow: ellipsis;
  3328. "
  3329. readonly="true"
  3330. @click="selectLine(itemTaskIndex, index1)"
  3331. />
  3332. <input
  3333. :placeholder="
  3334. item1.title ? item1.title : '链接'
  3335. "
  3336. v-if="item1.type == 14"
  3337. style="
  3338. border: none;
  3339. outline: none;
  3340. width: 80%;
  3341. white-space: nowrap;
  3342. overflow: hidden;
  3343. text-overflow: ellipsis;
  3344. "
  3345. readonly="true"
  3346. @click="
  3347. openUpdateSource(itemTaskIndex, index1)
  3348. "
  3349. />
  3350. </div>
  3351. <div class="chapter_upload_ic">
  3352. <div
  3353. class="chapter_upload_noSee"
  3354. v-if="item1.type == 12"
  3355. ></div>
  3356. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3357. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  3358. ">
  3359. <div></div>
  3360. </div>
  3361. <div
  3362. class="chapter_upload_ud"
  3363. style="z-index: 99"
  3364. >
  3365. <div
  3366. class="chapter_upload_up"
  3367. @click="
  3368. upCd(
  3369. $event,
  3370. unitIndex,
  3371. index,
  3372. itemTaskIndex,
  3373. index1
  3374. )
  3375. "
  3376. ></div>
  3377. <div
  3378. class="chapter_upload_down"
  3379. @click="
  3380. downCd(
  3381. $event,
  3382. unitIndex,
  3383. index,
  3384. itemTaskIndex,
  3385. index1
  3386. )
  3387. "
  3388. ></div>
  3389. </div>
  3390. <div
  3391. class="chapter_upload_ic_edit"
  3392. v-if="
  3393. item1.type == 2 ||
  3394. item1.type == 3 ||
  3395. item1.type == 12 ||
  3396. item1.type == 13 ||
  3397. item1.type == 7
  3398. "
  3399. @click.stop="
  3400. updataVideoT(
  3401. $event,
  3402. unitIndex,
  3403. itemTaskIndex,
  3404. index1
  3405. )
  3406. "
  3407. >
  3408. <div></div>
  3409. </div>
  3410. <div
  3411. class="chapter_upload_ic_edit"
  3412. v-if="item1.type == 6"
  3413. @click="
  3414. selectAttText(itemTaskIndex, index1)
  3415. "
  3416. >
  3417. <div></div>
  3418. </div>
  3419. <div
  3420. class="chapter_upload_ic_edit"
  3421. v-if="item1.type == 8"
  3422. @click="selectLine(itemTaskIndex, index1)"
  3423. >
  3424. <div></div>
  3425. </div>
  3426. <div
  3427. class="chapter_upload_ic_edit"
  3428. v-if="item1.type == 14"
  3429. @click="
  3430. openUpdateSource(itemTaskIndex, index1)
  3431. "
  3432. >
  3433. <div></div>
  3434. </div>
  3435. <div
  3436. class="chapter_upload_ic_r"
  3437. @click.stop="
  3438. deleteChapterData(
  3439. $event,
  3440. unitIndex,
  3441. index,
  3442. index1,
  3443. itemTaskIndex
  3444. )
  3445. "
  3446. >
  3447. <div></div>
  3448. </div>
  3449. </div>
  3450. </div>
  3451. </div>
  3452. </div>
  3453. </div>
  3454. <!-- v-if="!itemTask.isFoldchapter" -->
  3455. <div class="add_info_box" style="margin: 10px 0 0">
  3456. <button
  3457. class="c_pub_button_add pub_btn_add_img"
  3458. @click="addImg($event)"
  3459. >
  3460. 文件
  3461. <input
  3462. type="file"
  3463. accept="*"
  3464. style="display: none"
  3465. multiple="multiple"
  3466. v-if="inputShow"
  3467. @change="
  3468. beforeUpload2(
  3469. $event,
  3470. unitIndex,
  3471. 13,
  3472. itemTaskIndex
  3473. )
  3474. "
  3475. />
  3476. </button>
  3477. <button
  3478. class="c_pub_button_add pub_btn_add_img"
  3479. @click="addAttText(itemTaskIndex)"
  3480. >
  3481. 图文
  3482. </button>
  3483. <button
  3484. class="c_pub_button_add pub_btn_add_img"
  3485. @click="openLine(itemTaskIndex)"
  3486. >
  3487. 链接
  3488. </button>
  3489. <button
  3490. class="c_pub_button_add pub_btn_add_img"
  3491. @click="pasteLine(itemTaskIndex)"
  3492. >
  3493. 代码
  3494. </button>
  3495. <button
  3496. class="c_pub_button_add pub_btn_add_img"
  3497. @click="openSource(itemTaskIndex)"
  3498. >
  3499. 资源
  3500. </button>
  3501. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成PPT按钮`)">
  3502. AI生成PPT
  3503. </button>
  3504. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3505. AI生成教案
  3506. </button> -->
  3507. <button class="c_pub_button_add pub_btn_add_img" @click="createTaskAn(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成学历案按钮`)">
  3508. {{ taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex] == true ? '停止生成学历案' : 'AI生成学历案'}}
  3509. </button>
  3510. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-智能检索视频按钮`)">
  3511. 智能检索视频
  3512. </button>
  3513. </div>
  3514. <div
  3515. v-if="
  3516. unitJson[unitIndex].chapterInfo[0].taskJson[
  3517. itemTaskIndex
  3518. ].proVisible
  3519. "
  3520. class="mask"
  3521. >
  3522. <div class="progressBox">
  3523. <!-- <div id="closePro" class="closeCss">
  3524. <img src="../../../../assets/icon/close.png" alt />
  3525. </div> -->
  3526. <div class="lbox">
  3527. <img
  3528. src="../../../assets/loading.gif"
  3529. />上传中,请稍后
  3530. </div>
  3531. <div style="margin-bottom: 10px">
  3532. <span
  3533. >{{
  3534. unitJson[unitIndex].chapterInfo[0].taskJson[
  3535. itemTaskIndex
  3536. ].isFinishSize
  3537. }}</span
  3538. >
  3539. /
  3540. <span
  3541. >{{
  3542. unitJson[unitIndex].chapterInfo[0].taskJson[
  3543. itemTaskIndex
  3544. ].isAllSize
  3545. }}</span
  3546. >
  3547. </div>
  3548. <!-- <el-progress
  3549. :text-inside="true"
  3550. :stroke-width="20"
  3551. :percentage="
  3552. unitJson[unitIndex].chapterInfo[0].taskJson[
  3553. itemTaskIndex
  3554. ].progress
  3555. ? unitJson[unitIndex].chapterInfo[0]
  3556. .taskJson[itemTaskIndex].progress
  3557. : 0
  3558. "
  3559. style="width: 80%"
  3560. ></el-progress> -->
  3561. </div>
  3562. </div>
  3563. </div>
  3564. <div v-if="
  3565. unitJson[unitIndex].easy == 1 ||
  3566. (unitJson[unitIndex].easy == 5 &&
  3567. itemTask.taskType == 2)
  3568. ">
  3569. <div>
  3570. <div class="add_chapters_box add_c_none" v-if="
  3571. itemTask.chapterData &&
  3572. itemTask.chapterData.length == 0
  3573. ">
  3574. <img src="../../../assets/icon/new/c_none.png" alt />
  3575. </div>
  3576. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3577. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3578. dragOver(index1, itemTaskIndex)
  3579. " @dragend="dragEnd()" :draggable="isdrag ==
  3580. 'chapter-' + itemTaskIndex + '-' + index1
  3581. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3582. :key="item1.id" @click="
  3583. getChapterData(
  3584. $event,
  3585. unitIndex,
  3586. index,
  3587. index1,
  3588. item1.type
  3589. )
  3590. " :class="{
  3591. dragOverTop2:
  3592. newIndex === index1 &&
  3593. typeIndex ==
  3594. 'chapter-' +
  3595. itemTaskIndex +
  3596. '-' +
  3597. index1 &&
  3598. oldIndex > index1,
  3599. dragOverBottom2:
  3600. newIndex === index1 &&
  3601. typeIndex ==
  3602. 'chapter-' +
  3603. itemTaskIndex +
  3604. '-' +
  3605. index1 &&
  3606. oldIndex < index1,
  3607. }">
  3608. <div @mousedown="
  3609. isdrag =
  3610. 'chapter-' + itemTaskIndex + '-' + index1
  3611. " @mouseup="isdrag = ''" @touchstart="
  3612. isdrag =
  3613. 'chapter-' + itemTaskIndex + '-' + index1
  3614. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3615. <div class="chapter_upload_t" style="width: 100%"></div>
  3616. <div class="chapter_upload_o" style="
  3617. position: relative;
  3618. display: flex;
  3619. align-items: center;
  3620. ">
  3621. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3622. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3623. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3624. </div>
  3625. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3626. </div>
  3627. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3628. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3629. </div>
  3630. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3631. </div>
  3632. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3633. </div>
  3634. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3635. </div>
  3636. </div>
  3637. <div class="chapter_upload_n">
  3638. <span style="
  3639. font-size: 14px;
  3640. color: rgb(109, 109, 109);
  3641. height: 14px;
  3642. line-height: 14px;
  3643. " v-if="
  3644. item1.type == 2 ||
  3645. item1.type == 3 ||
  3646. item1.type == 7
  3647. ">{{ item1.text }}-</span>
  3648. <input readonly="true" v-if="
  3649. item1.type == 2 ||
  3650. item1.type == 3 ||
  3651. item1.type == 7
  3652. " :placeholder="item1.name" @click="
  3653. updataVideoT(
  3654. $event,
  3655. unitIndex,
  3656. itemTaskIndex,
  3657. index1
  3658. )
  3659. " style="
  3660. border: none;
  3661. outline: none;
  3662. width: 80%;
  3663. minwidth: 215px;
  3664. z-index: 99;
  3665. font-size: 14px;
  3666. white-space: nowrap;
  3667. overflow: hidden;
  3668. text-overflow: ellipsis;
  3669. " />
  3670. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3671. border: none;
  3672. outline: none;
  3673. width: 80%;
  3674. white-space: nowrap;
  3675. overflow: hidden;
  3676. text-overflow: ellipsis;
  3677. " readonly="true" @click="
  3678. selectAttText(itemTaskIndex, index1)
  3679. " />
  3680. <input :placeholder="item1.title ? item1.title : '链接'
  3681. " v-if="item1.type == 8 || item1.type == 14" style="
  3682. border: none;
  3683. outline: none;
  3684. width: 80%;
  3685. white-space: nowrap;
  3686. overflow: hidden;
  3687. text-overflow: ellipsis;
  3688. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3689. </div>
  3690. <div class="chapter_upload_ic">
  3691. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3692. <div class="chapter_upload_ud" style="z-index: 99">
  3693. <div class="chapter_upload_up" @click="
  3694. upCd(
  3695. $event,
  3696. unitIndex,
  3697. index,
  3698. itemTaskIndex,
  3699. index1
  3700. )
  3701. "></div>
  3702. <div class="chapter_upload_down" @click="
  3703. downCd(
  3704. $event,
  3705. unitIndex,
  3706. index,
  3707. itemTaskIndex,
  3708. index1
  3709. )
  3710. "></div>
  3711. </div>
  3712. <div class="chapter_upload_ic_edit" v-if="
  3713. item1.type == 2 ||
  3714. item1.type == 3 ||
  3715. item1.type == 12 ||
  3716. item1.type == 13 ||
  3717. item1.type == 7
  3718. " @click.stop="
  3719. updataVideoT(
  3720. $event,
  3721. unitIndex,
  3722. itemTaskIndex,
  3723. index1
  3724. )
  3725. ">
  3726. <div></div>
  3727. </div>
  3728. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3729. selectAttText(itemTaskIndex, index1)
  3730. ">
  3731. <div></div>
  3732. </div>
  3733. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3734. @click="selectLine(itemTaskIndex, index1)">
  3735. <div></div>
  3736. </div>
  3737. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3738. openUpdateSource(itemTaskIndex, index1)
  3739. ">
  3740. <div></div>
  3741. </div>
  3742. <div class="chapter_upload_ic_r" @click.stop="
  3743. deleteChapterData(
  3744. $event,
  3745. unitIndex,
  3746. index,
  3747. index1,
  3748. itemTaskIndex
  3749. )
  3750. ">
  3751. <div></div>
  3752. </div>
  3753. </div>
  3754. </div>
  3755. </div>
  3756. </div>
  3757. </div>
  3758. <div class="add_info_box" style="margin: 10px 0 0">
  3759. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3760. <span style="color: red">*</span>
  3761. 教学设计
  3762. <input type="file"
  3763. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3764. style="display: none" v-if="inputShow" @change="
  3765. beforeUpload3(
  3766. $event,
  3767. unitIndex,
  3768. 3,
  3769. itemTaskIndex,
  3770. '教学设计'
  3771. )
  3772. " />
  3773. </button>
  3774. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3775. <span style="color: red">*</span>
  3776. 教学课件
  3777. <input type="file"
  3778. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3779. style="display: none" v-if="inputShow" @change="
  3780. beforeUpload3(
  3781. $event,
  3782. unitIndex,
  3783. 3,
  3784. itemTaskIndex,
  3785. '教学课件'
  3786. )
  3787. " />
  3788. </button>
  3789. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3790. 教学视频
  3791. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3792. style="display: none" v-if="inputShow" @change="
  3793. beforeUpload3(
  3794. $event,
  3795. unitIndex,
  3796. 2,
  3797. itemTaskIndex,
  3798. '教学视频'
  3799. )
  3800. " />
  3801. </button>
  3802. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3803. 教学音频
  3804. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3805. beforeUpload3(
  3806. $event,
  3807. unitIndex,
  3808. 2,
  3809. itemTaskIndex,
  3810. '教学音频'
  3811. )
  3812. " />
  3813. </button>
  3814. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3815. 学习单
  3816. <input type="file"
  3817. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3818. style="display: none" v-if="inputShow" @change="
  3819. beforeUpload3(
  3820. $event,
  3821. unitIndex,
  3822. 3,
  3823. itemTaskIndex,
  3824. '学习单'
  3825. )
  3826. " />
  3827. </button>
  3828. </div>
  3829. <div v-if="
  3830. unitJson[unitIndex].chapterInfo[0].taskJson[
  3831. itemTaskIndex
  3832. ].proVisible
  3833. " class="mask">
  3834. <div class="progressBox">
  3835. <!-- <div id="closePro" class="closeCss">
  3836. <img src="../../../../assets/icon/close.png" alt />
  3837. </div> -->
  3838. <div class="lbox">
  3839. <img src="../../../assets/loading.gif" />上传中,请稍后
  3840. </div>
  3841. <div style="margin-bottom: 10px">
  3842. <span>{{
  3843. unitJson[unitIndex].chapterInfo[0].taskJson[
  3844. itemTaskIndex
  3845. ].isFinishSize
  3846. }}M</span>
  3847. /
  3848. <span>{{
  3849. unitJson[unitIndex].chapterInfo[0].taskJson[
  3850. itemTaskIndex
  3851. ].isAllSize
  3852. }}M</span>
  3853. </div>
  3854. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3855. itemTaskIndex
  3856. ].progress
  3857. ? unitJson[unitIndex].chapterInfo[0]
  3858. .taskJson[itemTaskIndex].progress
  3859. : 0
  3860. " style="width: 80%"></el-progress>
  3861. </div>
  3862. </div>
  3863. </div>
  3864. </div>
  3865. <!-- padding: 20px; -->
  3866. <div style="
  3867. background: #fff;
  3868. border-radius: 5px;
  3869. margin-top: 15px;
  3870. " :style="{paddingBottom: panTaskElist() == 0?'75px':''}">
  3871. <div v-if="
  3872. unitJson[unitIndex].easy == 6 ||
  3873. !unitJson[unitIndex].easy
  3874. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" element-loading-text="小可正在努力生成中,请稍等...">
  3875. <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" @click="cancelAjax('aiTaskGL2', itemTaskIndex)">停止</div>
  3876. <div style="width: 100%">
  3877. <div style="
  3878. display: flex;
  3879. flex-direction: row;
  3880. align-items: center;
  3881. margin: 5px 0 20px;
  3882. width: 100%
  3883. ">
  3884. <div class="lineTitle clineTitle" style="width: 100%">
  3885. <span>练习内容</span>
  3886. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3887. <div class="r_pub_button_op" style="margin-left:auto;"
  3888. @contextmenu.prevent="openAiDialog(1, 'aiTaskG2', itemTaskIndex)"
  3889. @click="openAiDialog(2, 'aiTaskG2', itemTaskIndex)">{{ panDanTool(itemTask) > 0 ? '重新生成工具' : '生成工具' }}</div>
  3890. </el-tooltip>
  3891. </div>
  3892. <!-- <div class="line" style="width: 90%"></div> -->
  3893. </div>
  3894. </div>
  3895. <div class="tools">
  3896. <div class="leftTools" style="width: 100%" v-for="(
  3897. itemTool, toolIndex
  3898. ) in itemTask.toolChoose" :key="toolIndex">
  3899. <div style="
  3900. display: flex;
  3901. flex-direction: row;
  3902. align-items: baseline;
  3903. flex-wrap: nowrap;
  3904. justify-content: flex-start;
  3905. position: relative;
  3906. ">
  3907. <div style="margin-right: 20px; font-weight: bold"
  3908. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3909. 工具 {{ toolIndex + 1 }} :
  3910. </div>
  3911. <div class="chooseWho">
  3912. <div :class="itemTool.toolType == 0
  3913. ? 'isChooseActive'
  3914. : ''
  3915. " @click="
  3916. (itemTool.toolType = 0),
  3917. (itemTool.isFold3 = false),
  3918. $forceUpdate()
  3919. ">
  3920. 互动类
  3921. </div>
  3922. <div :class="itemTool.toolType == 1
  3923. ? 'isChooseActive'
  3924. : ''
  3925. " @click="
  3926. (itemTool.toolType = 1),
  3927. (itemTool.isFold3 = false),
  3928. $forceUpdate()
  3929. ">
  3930. 思维类
  3931. </div>
  3932. <div :class="itemTool.toolType == 6
  3933. ? 'isChooseActive'
  3934. : ''
  3935. " @click="
  3936. (itemTool.toolType = 6),
  3937. (itemTool.isFold3 = false),
  3938. $forceUpdate()
  3939. ">
  3940. 协作类
  3941. </div>
  3942. <div :class="itemTool.toolType == 2
  3943. ? 'isChooseActive'
  3944. : ''
  3945. " @click="
  3946. (itemTool.toolType = 2),
  3947. (itemTool.isFold3 = false),
  3948. $forceUpdate()
  3949. ">
  3950. 测评类
  3951. </div>
  3952. <div :class="itemTool.toolType == 7
  3953. ? 'isChooseActive'
  3954. : ''
  3955. " @click="
  3956. (itemTool.toolType = 7),
  3957. (itemTool.isFold3 = false),
  3958. $forceUpdate()
  3959. ">
  3960. 评价类
  3961. </div>
  3962. <div :class="itemTool.toolType == 3
  3963. ? 'isChooseActive'
  3964. : ''
  3965. " @click="
  3966. (itemTool.toolType = 3),
  3967. (itemTool.isFold3 = false),
  3968. $forceUpdate()
  3969. ">
  3970. 编程类
  3971. </div>
  3972. <div :class="itemTool.toolType == 5
  3973. ? 'isChooseActive'
  3974. : ''
  3975. " @click="
  3976. (itemTool.toolType = 5),
  3977. (itemTool.isFold3 = false),
  3978. $forceUpdate()
  3979. ">
  3980. 学科类
  3981. </div>
  3982. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3983. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3984. 其他
  3985. </div> -->
  3986. </div>
  3987. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3988. margin:
  3989. itemTask.toolChoose.length > 1
  3990. ? '0px 35px 0px auto'
  3991. : '0 0 0 auto',
  3992. }" v-if="itemTask.toolChoose.length > 1">
  3993. <div class="chapter_upload_up2" @click.stop="
  3994. upTool(
  3995. $event,
  3996. unitIndex,
  3997. itemTaskIndex,
  3998. toolIndex
  3999. )
  4000. ">
  4001. 上移
  4002. </div>
  4003. <div class="chapter_upload_down2" @click.stop="
  4004. downTool(
  4005. $event,
  4006. unitIndex,
  4007. itemTaskIndex,
  4008. toolIndex
  4009. )
  4010. ">
  4011. 下移
  4012. </div>
  4013. </div>
  4014. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  4015. @click="fold3(itemTaskIndex, toolIndex)"
  4016. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4017. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  4018. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  4019. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  4020. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  4021. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4022. v-if="itemTask.toolChoose.length > 1" style="
  4023. position: absolute;
  4024. right: 0;
  4025. top: -5px;
  4026. "></div>
  4027. </div>
  4028. <!-- v-show="!itemTool.isFold3" -->
  4029. <div style="min-height: 163px">
  4030. <div class="toolSort" v-if="itemTool.toolType == 0">
  4031. <!-- <div class="tool">
  4032. <div
  4033. class="whiteBIcon"
  4034. @click="addTools(8, itemTaskIndex, toolIndex)"
  4035. >
  4036. <img src="../../../assets/icon/secondToolList/library.png" alt />
  4037. <div style="margin: 5px 0">素材库</div>
  4038. </div>
  4039. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  4040. <img
  4041. src="../../../assets/icon/checkNo.png"
  4042. alt
  4043. v-if="itemTool.tool.indexOf(8) == -1"
  4044. />
  4045. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  4046. alt /><span>已选择</span></div>
  4047. </div>
  4048. </div>-->
  4049. <!-- <div class="tool">
  4050. <div
  4051. class="whiteBIcon"
  4052. @click="addTools(17, itemTaskIndex, toolIndex)"
  4053. >
  4054. <img
  4055. src="../../../assets/icon/secondToolList/library.png"
  4056. alt
  4057. />
  4058. <div style="margin: 5px 0">学习资料</div>
  4059. </div>
  4060. <div
  4061. class="check"
  4062. @click="addTools(17, itemTaskIndex, toolIndex)"
  4063. >
  4064. <img
  4065. src="../../../assets/icon/checkNo.png"
  4066. alt
  4067. v-if="itemTool.tool.indexOf(17) == -1"
  4068. />
  4069. <img
  4070. src="../../../assets/icon/checkedIs.png"
  4071. alt
  4072. v-else
  4073. />
  4074. </div>10
  4075. </div> -->
  4076. <div class="tool" :class="{
  4077. isToolChoose:
  4078. itemTool.tool.indexOf(10) != -1,
  4079. }" @click="
  4080. addTools(10, itemTaskIndex, toolIndex)
  4081. ">
  4082. <div class="whiteBIcon" @click.stop="
  4083. openTools(itemTaskIndex, 10, toolIndex)
  4084. ">
  4085. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  4086. <div style="margin: 5px 0">倒计时</div>
  4087. </div>
  4088. <div class="noCTool">
  4089. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4090. </div>
  4091. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  4092. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4093. </div>
  4094. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  4095. <img src="../../../assets/icon/checkNo.png" alt
  4096. v-if="itemTool.tool.indexOf(10) == -1" />
  4097. <div class="checkDiv" v-else>
  4098. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4099. </div>
  4100. </div> -->
  4101. </div>
  4102. <div class="tool" :class="{
  4103. isToolChoose:
  4104. itemTool.tool.indexOf(65) != -1,
  4105. }" @click="
  4106. addTools(65, itemTaskIndex, toolIndex)
  4107. ">
  4108. <div class="whiteBIcon" @click.stop="
  4109. addTools(65, itemTaskIndex, toolIndex)
  4110. ">
  4111. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  4112. <div style="margin: 5px 0">挑人</div>
  4113. </div>
  4114. <div class="noCTool">
  4115. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4116. </div>
  4117. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  4118. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4119. </div>
  4120. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  4121. <img src="../../../assets/icon/checkNo.png" alt
  4122. v-if="itemTool.tool.indexOf(65) == -1" />
  4123. <div class="checkDiv" v-else>
  4124. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4125. </div>
  4126. </div> -->
  4127. </div>
  4128. <!-- <div class="tool">
  4129. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  4130. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4131. <div style="margin: 5px 0">学生分组</div>
  4132. </div>
  4133. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4134. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  4135. <div class="checkDiv" v-else>
  4136. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4137. </div>
  4138. </div>
  4139. </div> -->
  4140. <!-- <div class="tool">
  4141. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  4142. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  4143. <div style="margin: 5px 0">交互视频</div>
  4144. </div>
  4145. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  4146. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  4147. <div class="checkDiv" v-else>
  4148. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4149. </div>
  4150. </div>
  4151. </div> -->
  4152. </div>
  4153. <div class="toolSort" v-if="itemTool.toolType == 1">
  4154. <div class="tool" :class="{
  4155. isToolChoose:
  4156. itemTool.tool.indexOf(7) != -1,
  4157. }" @click="
  4158. addTools(7, itemTaskIndex, toolIndex)
  4159. ">
  4160. <div class="whiteBIcon" @click.stop="
  4161. addTools(7, itemTaskIndex, toolIndex)
  4162. ">
  4163. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  4164. <div style="margin: 5px 0">思维网格</div>
  4165. </div>
  4166. <div class="noCTool">
  4167. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4168. </div>
  4169. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  4170. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4171. </div>
  4172. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  4173. <img src="../../../assets/icon/checkNo.png" alt
  4174. v-if="itemTool.tool.indexOf(7) == -1" />
  4175. <div class="checkDiv" v-else>
  4176. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4177. </div>
  4178. </div> -->
  4179. </div>
  4180. <div class="tool" :class="{
  4181. isToolChoose:
  4182. itemTool.tool.indexOf(1) != -1,
  4183. }" @click="
  4184. addTools(1, itemTaskIndex, toolIndex)
  4185. ">
  4186. <div class="whiteBIcon" @click.stop="
  4187. openTools(itemTaskIndex, 1, toolIndex)
  4188. ">
  4189. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4190. <div style="margin: 5px 0">电子白板</div>
  4191. </div>
  4192. <div class="noCTool">
  4193. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4194. </div>
  4195. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  4196. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4197. </div>
  4198. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  4199. <img src="../../../assets/icon/checkNo.png" alt
  4200. v-if="itemTool.tool.indexOf(1) == -1" />
  4201. <div class="checkDiv" v-else>
  4202. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4203. </div>
  4204. </div> -->
  4205. </div>
  4206. <!-- <div class="tool">
  4207. <div
  4208. class="whiteBIcon"
  4209. @click="addTools(2, itemTaskIndex, toolIndex)"
  4210. >
  4211. <img
  4212. src="../../../assets/icon/secondToolList/note.png"
  4213. alt
  4214. />
  4215. <div style="margin: 5px 0">便签</div>
  4216. </div>
  4217. <div
  4218. class="check"
  4219. @click="addTools(2, itemTaskIndex, toolIndex)"
  4220. >
  4221. <img
  4222. src="../../../assets/icon/checkNo.png"
  4223. alt
  4224. v-if="itemTool.tool.indexOf(2) == -1"
  4225. />
  4226. <div class="checkDiv" v-else>
  4227. <img
  4228. src="../../../assets/icon/checkedIs.png"
  4229. alt
  4230. /><span>已选择</span>
  4231. </div>
  4232. </div>
  4233. </div> -->
  4234. <!-- <div class="tool">
  4235. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  4236. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4237. <div style="margin: 5px 0">协同文档</div>
  4238. </div>
  4239. <div
  4240. class="check"
  4241. @click="addTools(6, itemTaskIndex, toolIndex)"
  4242. >
  4243. <img
  4244. src="../../../assets/icon/checkNo.png"
  4245. alt
  4246. v-if="itemTool.tool.indexOf(6) == -1"
  4247. />
  4248. <div class="checkDiv" v-else>
  4249. <img
  4250. src="../../../assets/icon/checkedIs.png"
  4251. alt
  4252. /><span>已选择</span>
  4253. </div>
  4254. </div>
  4255. </div> -->
  4256. <div class="tool" :class="{
  4257. isToolChoose:
  4258. itemTool.tool.indexOf(52) != -1,
  4259. }" @click="
  4260. addTools(52, itemTaskIndex, toolIndex)
  4261. ">
  4262. <div class="whiteBIcon" @click.stop="
  4263. openTools(itemTaskIndex, 52, toolIndex)
  4264. ">
  4265. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4266. <div style="margin: 5px 0">文档</div>
  4267. </div>
  4268. <div class="noCTool">
  4269. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4270. </div>
  4271. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  4272. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4273. </div>
  4274. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  4275. <img src="../../../assets/icon/checkNo.png" alt
  4276. v-if="itemTool.tool.indexOf(52) == -1" />
  4277. <div class="checkDiv" v-else>
  4278. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4279. </div>
  4280. </div> -->
  4281. </div>
  4282. <div class="tool" :class="{
  4283. isToolChoose:
  4284. itemTool.tool.indexOf(3) != -1,
  4285. }" @click="
  4286. addTools(3, itemTaskIndex, toolIndex)
  4287. ">
  4288. <div class="whiteBIcon" @click.stop="
  4289. openTools(itemTaskIndex, 3, toolIndex)
  4290. ">
  4291. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4292. <div style="margin: 5px 0">思维导图</div>
  4293. </div>
  4294. <div class="noCTool">
  4295. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4296. </div>
  4297. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  4298. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4299. </div>
  4300. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  4301. <img src="../../../assets/icon/checkNo.png" alt
  4302. v-if="itemTool.tool.indexOf(3) == -1" />
  4303. <div class="checkDiv" v-else>
  4304. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4305. </div>
  4306. </div> -->
  4307. </div>
  4308. <div class="tool" :class="{
  4309. isToolChoose:
  4310. itemTool.tool.indexOf(48) != -1,
  4311. }" @click="
  4312. addTools(48, itemTaskIndex, toolIndex)
  4313. ">
  4314. <div class="whiteBIcon" @click.stop="
  4315. openTools(itemTaskIndex, 48, toolIndex)
  4316. ">
  4317. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4318. <div style="margin: 5px 0">表格</div>
  4319. </div>
  4320. <div class="noCTool">
  4321. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4322. </div>
  4323. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  4324. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4325. </div>
  4326. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  4327. <img src="../../../assets/icon/checkNo.png" alt
  4328. v-if="itemTool.tool.indexOf(48) == -1" />
  4329. <div class="checkDiv" v-else>
  4330. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4331. </div>
  4332. </div> -->
  4333. </div>
  4334. </div>
  4335. <div class="toolSort" v-if="itemTool.toolType == 6">
  4336. <div class="tool" :class="{
  4337. isToolChoose:
  4338. itemTool.tool.indexOf(49) != -1,
  4339. }" @click="
  4340. addTools(49, itemTaskIndex, toolIndex)
  4341. ">
  4342. <div class="whiteBIcon" @click.stop="
  4343. openTools(itemTaskIndex, 49, toolIndex)
  4344. ">
  4345. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4346. <div style="margin: 5px 0">学生分组</div>
  4347. </div>
  4348. <div class="noCTool">
  4349. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4350. </div>
  4351. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  4352. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4353. </div>
  4354. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4355. <img src="../../../assets/icon/checkNo.png" alt
  4356. v-if="itemTool.tool.indexOf(49) == -1" />
  4357. <div class="checkDiv" v-else>
  4358. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4359. </div>
  4360. </div> -->
  4361. </div>
  4362. </div>
  4363. <div class="toolSort" v-if="itemTool.toolType == 2">
  4364. <!-- <div class="tool">
  4365. <div
  4366. class="whiteBIcon"
  4367. @click="addTools(5, itemTaskIndex, toolIndex)"
  4368. >
  4369. <img
  4370. src="../../../assets/icon/thirdToolList/score.png"
  4371. alt
  4372. />
  4373. <div style="margin: 5px 0">量规评分</div>
  4374. </div>
  4375. <div
  4376. class="check"
  4377. @click="addTools(5, itemTaskIndex, toolIndex)"
  4378. >
  4379. <img
  4380. src="../../../assets/icon/checkNo.png"
  4381. alt
  4382. v-if="itemTool.tool.indexOf(5) == -1"
  4383. />
  4384. <img
  4385. src="../../../assets/icon/checkedIs.png"
  4386. alt
  4387. v-else
  4388. />
  4389. </div>
  4390. </div>-->
  4391. <div class="tool" :class="{
  4392. isToolChoose:
  4393. itemTool.tool.indexOf(4) != -1,
  4394. }" @click="
  4395. addTools(4, itemTaskIndex, toolIndex)
  4396. ">
  4397. <div class="whiteBIcon" @click.stop="
  4398. openTools(itemTaskIndex, 4, toolIndex)
  4399. ">
  4400. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4401. <div style="margin: 5px 0">问卷调查</div>
  4402. </div>
  4403. <div class="noCTool">
  4404. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4405. </div>
  4406. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4407. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4408. </div>
  4409. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4410. <img src="../../../assets/icon/checkNo.png" alt
  4411. v-if="itemTool.tool.indexOf(4) == -1" />
  4412. <div class="checkDiv" v-else>
  4413. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4414. </div>
  4415. </div> -->
  4416. </div>
  4417. <div class="tool" :class="{
  4418. isToolChoose:
  4419. itemTool.tool.indexOf(45) != -1,
  4420. }" @click="
  4421. addTools(45, itemTaskIndex, toolIndex)
  4422. ">
  4423. <div class="whiteBIcon" @click="
  4424. openTools(itemTaskIndex, 45, toolIndex)
  4425. ">
  4426. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4427. <div style="margin: 5px 0">选择题</div>
  4428. </div>
  4429. <div class="noCTool">
  4430. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4431. </div>
  4432. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4433. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4434. </div>
  4435. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4436. <img src="../../../assets/icon/checkNo.png" alt
  4437. v-if="itemTool.tool.indexOf(45) == -1" />
  4438. <div class="checkDiv" v-else>
  4439. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4440. </div>
  4441. </div> -->
  4442. </div>
  4443. <div class="tool" :class="{
  4444. isToolChoose:
  4445. itemTool.tool.indexOf(15) != -1,
  4446. }" @click="
  4447. addTools(15, itemTaskIndex, toolIndex)
  4448. ">
  4449. <div class="whiteBIcon" @click.stop="
  4450. openTools(itemTaskIndex, 15, toolIndex)
  4451. ">
  4452. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4453. <div style="margin: 5px 0">问答</div>
  4454. </div>
  4455. <div class="noCTool">
  4456. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4457. </div>
  4458. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4459. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4460. </div>
  4461. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4462. <img src="../../../assets/icon/checkNo.png" alt
  4463. v-if="itemTool.tool.indexOf(15) == -1" />
  4464. <div class="checkDiv" v-else>
  4465. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4466. </div>
  4467. </div> -->
  4468. </div>
  4469. <div class="tool" :class="{
  4470. isToolChoose:
  4471. itemTool.tool.indexOf(16) != -1,
  4472. }" @click="
  4473. addTools(16, itemTaskIndex, toolIndex)
  4474. ">
  4475. <div class="whiteBIcon" @click.stop="
  4476. addTools(16, itemTaskIndex, toolIndex)
  4477. ">
  4478. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4479. <div style="margin: 5px 0">作业提交</div>
  4480. </div>
  4481. <div class="noCTool">
  4482. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4483. </div>
  4484. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4485. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4486. </div>
  4487. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4488. <img src="../../../assets/icon/checkNo.png" alt
  4489. v-if="itemTool.tool.indexOf(16) == -1" />
  4490. <div class="checkDiv" v-else>
  4491. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4492. </div>
  4493. </div> -->
  4494. </div>
  4495. <div class="tool" :class="{
  4496. isToolChoose:
  4497. itemTool.tool.indexOf(50) != -1,
  4498. }" @click="
  4499. addTools(50, itemTaskIndex, toolIndex)
  4500. ">
  4501. <div class="whiteBIcon" @click.stop="
  4502. addTools(50, itemTaskIndex, toolIndex)
  4503. ">
  4504. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4505. <div style="margin: 5px 0">批量上传</div>
  4506. </div>
  4507. <div class="noCTool">
  4508. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4509. </div>
  4510. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4511. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4512. </div>
  4513. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4514. <img src="../../../assets/icon/checkNo.png" alt
  4515. v-if="itemTool.tool.indexOf(50) == -1" />
  4516. <div class="checkDiv" v-else>
  4517. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4518. </div>
  4519. </div> -->
  4520. </div>
  4521. <!-- <div class="tool">
  4522. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4523. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4524. <div style="margin: 5px 0">个人评价</div>
  4525. </div>
  4526. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4527. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4528. <div class="checkDiv" v-else>
  4529. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4530. </div>
  4531. </div>
  4532. </div> -->
  4533. <div class="tool" :class="{
  4534. isToolChoose:
  4535. itemTool.tool.indexOf(41) != -1,
  4536. }" @click="
  4537. addTools(41, itemTaskIndex, toolIndex)
  4538. ">
  4539. <div class="whiteBIcon" @click.stop="
  4540. openTools(itemTaskIndex, 41, toolIndex)
  4541. ">
  4542. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4543. <div style="margin: 5px 0">选择匹配</div>
  4544. </div>
  4545. <div class="noCTool">
  4546. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4547. </div>
  4548. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4549. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4550. </div>
  4551. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4552. <img src="../../../assets/icon/checkNo.png" alt
  4553. v-if="itemTool.tool.indexOf(41) == -1" />
  4554. <div class="checkDiv" v-else>
  4555. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4556. </div>
  4557. </div> -->
  4558. </div>
  4559. <div class="tool" :class="{
  4560. isToolChoose:
  4561. itemTool.tool.indexOf(47) != -1,
  4562. }" @click="
  4563. addTools(47, itemTaskIndex, toolIndex)
  4564. ">
  4565. <div class="whiteBIcon" @click.stop="
  4566. openTools(itemTaskIndex, 47, toolIndex)
  4567. ">
  4568. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4569. <div style="margin: 5px 0">排序</div>
  4570. </div>
  4571. <div class="noCTool">
  4572. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4573. </div>
  4574. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4575. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4576. </div>
  4577. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4578. <img src="../../../assets/icon/checkNo.png" alt
  4579. v-if="itemTool.tool.indexOf(47) == -1" />
  4580. <div class="checkDiv" v-else>
  4581. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4582. </div>
  4583. </div> -->
  4584. </div>
  4585. <!-- <div class="tool">
  4586. <div
  4587. class="whiteBIcon"
  4588. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4589. >
  4590. <img
  4591. src="../../../assets/icon/thirdToolList/mp3.png"
  4592. alt
  4593. />
  4594. <div style="margin: 5px 0">上传音频</div>
  4595. </div>
  4596. <div
  4597. class="check"
  4598. @click="addTools(42, itemTaskIndex, toolIndex)"
  4599. >
  4600. <img
  4601. src="../../../assets/icon/checkNo.png"
  4602. alt
  4603. v-if="itemTool.tool.indexOf(42) == -1"
  4604. />
  4605. <img
  4606. src="../../../assets/icon/checkedIs.png"
  4607. alt
  4608. v-else
  4609. />
  4610. </div>
  4611. </div> -->
  4612. </div>
  4613. <div class="toolSort" v-if="itemTool.toolType == 3">
  4614. <div class="tool" :class="{
  4615. isToolChoose:
  4616. itemTool.tool.indexOf(18) != -1,
  4617. }" @click="
  4618. addTools(18, itemTaskIndex, toolIndex)
  4619. ">
  4620. <div class="whiteBIcon" @click.stop="
  4621. addTools(18, itemTaskIndex, toolIndex)
  4622. ">
  4623. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4624. <div style="margin: 5px 0">训练平台</div>
  4625. </div>
  4626. <div class="noCTool">
  4627. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4628. </div>
  4629. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4630. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4631. </div>
  4632. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4633. <img src="../../../assets/icon/checkNo.png" alt
  4634. v-if="itemTool.tool.indexOf(18) == -1" />
  4635. <div class="checkDiv" v-else>
  4636. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4637. </div>
  4638. </div> -->
  4639. </div>
  4640. <div class="tool" :class="{
  4641. isToolChoose:
  4642. itemTool.tool.indexOf(21) != -1,
  4643. }" @click="
  4644. addTools(21, itemTaskIndex, toolIndex)
  4645. ">
  4646. <div class="whiteBIcon" @click.stop="
  4647. addTools(21, itemTaskIndex, toolIndex)
  4648. ">
  4649. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4650. <div style="margin: 5px 0">
  4651. AIoT Blockly
  4652. </div>
  4653. </div>
  4654. <div class="noCTool">
  4655. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4656. </div>
  4657. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4658. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4659. </div>
  4660. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4661. <img src="../../../assets/icon/checkNo.png" alt
  4662. v-if="itemTool.tool.indexOf(21) == -1" />
  4663. <div class="checkDiv" v-else>
  4664. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4665. </div>
  4666. </div> -->
  4667. </div>
  4668. <!-- <div class="tool">
  4669. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4670. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4671. <div style="margin: 5px 0">AI体验</div>
  4672. </div>
  4673. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4674. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4675. <div class="checkDiv" v-else>
  4676. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4677. </div>
  4678. </div>
  4679. </div> -->
  4680. <div class="tool" :class="{
  4681. isToolChoose:
  4682. itemTool.tool.indexOf(23) != -1,
  4683. }" @click="
  4684. addTools(23, itemTaskIndex, toolIndex)
  4685. ">
  4686. <div class="whiteBIcon" @click.stop="
  4687. addTools(23, itemTaskIndex, toolIndex)
  4688. ">
  4689. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4690. <div style="margin: 5px 0">AI Python</div>
  4691. </div>
  4692. <div class="noCTool">
  4693. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4694. </div>
  4695. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4696. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4697. </div>
  4698. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4699. <img src="../../../assets/icon/checkNo.png" alt
  4700. v-if="itemTool.tool.indexOf(23) == -1" />
  4701. <div class="checkDiv" v-else>
  4702. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4703. </div>
  4704. </div> -->
  4705. </div>
  4706. <div class="tool" :class="{
  4707. isToolChoose:
  4708. itemTool.tool.indexOf(24) != -1,
  4709. }" @click="
  4710. addTools(24, itemTaskIndex, toolIndex)
  4711. ">
  4712. <div class="whiteBIcon" @click.stop="
  4713. addTools(24, itemTaskIndex, toolIndex)
  4714. ">
  4715. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4716. <div style="margin: 5px 0">
  4717. AI Blockly
  4718. </div>
  4719. </div>
  4720. <div class="noCTool">
  4721. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4722. </div>
  4723. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4724. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4725. </div>
  4726. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4727. <img src="../../../assets/icon/checkNo.png" alt
  4728. v-if="itemTool.tool.indexOf(24) == -1" />
  4729. <div class="checkDiv" v-else>
  4730. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4731. </div>
  4732. </div> -->
  4733. </div>
  4734. <div class="tool" :class="{
  4735. isToolChoose:
  4736. itemTool.tool.indexOf(32) != -1,
  4737. }" @click="
  4738. addTools(32, itemTaskIndex, toolIndex)
  4739. ">
  4740. <div class="whiteBIcon" @click.stop="
  4741. addTools(32, itemTaskIndex, toolIndex)
  4742. ">
  4743. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4744. <div style="margin: 5px 0">源码编辑</div>
  4745. </div>
  4746. <div class="noCTool">
  4747. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4748. </div>
  4749. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4750. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4751. </div>
  4752. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4753. <img src="../../../assets/icon/checkNo.png" alt
  4754. v-if="itemTool.tool.indexOf(32) == -1" />
  4755. <div class="checkDiv" v-else>
  4756. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4757. </div>
  4758. </div> -->
  4759. </div>
  4760. <div class="tool" :class="{
  4761. isToolChoose:
  4762. itemTool.tool.indexOf(57) != -1,
  4763. }" @click="
  4764. addTools(57, itemTaskIndex, toolIndex)
  4765. ">
  4766. <div class="whiteBIcon" @click.stop="
  4767. openTools(itemTaskIndex, 57, toolIndex)
  4768. ">
  4769. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4770. <div style="margin: 5px 0">CocoPi</div>
  4771. </div>
  4772. <div class="noCTool">
  4773. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4774. </div>
  4775. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4776. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4777. </div>
  4778. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4779. <img src="../../../assets/icon/checkNo.png" alt
  4780. v-if="itemTool.tool.indexOf(57) == -1" />
  4781. <div class="checkDiv" v-else>
  4782. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4783. </div>
  4784. </div> -->
  4785. </div>
  4786. <div class="tool" :class="{
  4787. isToolChoose:
  4788. itemTool.tool.indexOf(63) != -1,
  4789. }" @click="
  4790. addTools(63, itemTaskIndex, toolIndex)
  4791. ">
  4792. <div class="whiteBIcon" @click.stop="
  4793. addTools(63, itemTaskIndex, toolIndex)
  4794. ">
  4795. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4796. <div style="margin: 5px 0">海龟编程</div>
  4797. </div>
  4798. <div class="noCTool">
  4799. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4800. </div>
  4801. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4802. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4803. </div>
  4804. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4805. <img src="../../../assets/icon/checkNo.png" alt
  4806. v-if="itemTool.tool.indexOf(63) == -1" />
  4807. <div class="checkDiv" v-else>
  4808. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4809. </div>
  4810. </div> -->
  4811. </div>
  4812. <div class="tool" :class="{
  4813. isToolChoose:
  4814. itemTool.tool.indexOf(71) != -1,
  4815. }" @click="
  4816. addTools(71, itemTaskIndex, toolIndex)
  4817. ">
  4818. <div class="whiteBIcon" @click.stop="
  4819. addTools(71, itemTaskIndex, toolIndex)
  4820. ">
  4821. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4822. <div style="margin: 5px 0">AI智能体</div>
  4823. </div>
  4824. <div class="noCTool">
  4825. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4826. </div>
  4827. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4828. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4829. </div>
  4830. </div>
  4831. </div>
  4832. <div class="toolSort" v-if="itemTool.toolType == 7">
  4833. <div class="tool" :class="{
  4834. isToolChoose:
  4835. itemTool.tool.indexOf(40) != -1,
  4836. }" @click.stop="
  4837. addTools(40, itemTaskIndex, toolIndex)
  4838. ">
  4839. <div class="whiteBIcon" @click.stop="
  4840. openTools(itemTaskIndex, 40, toolIndex)
  4841. ">
  4842. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4843. <div style="margin: 5px 0">个人评价</div>
  4844. </div>
  4845. <div class="noCTool">
  4846. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4847. </div>
  4848. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4849. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4850. </div>
  4851. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4852. <img src="../../../assets/icon/checkNo.png" alt
  4853. v-if="itemTool.tool.indexOf(40) == -1" />
  4854. <div class="checkDiv" v-else>
  4855. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4856. </div>
  4857. </div> -->
  4858. </div>
  4859. </div>
  4860. <div class="toolSort" v-if="itemTool.toolType == 5">
  4861. <div class="tool" :class="{
  4862. isToolChoose:
  4863. itemTool.tool.indexOf(28) != -1,
  4864. }" @click="
  4865. addTools(28, itemTaskIndex, toolIndex)
  4866. ">
  4867. <div class="whiteBIcon" @click.stop="
  4868. addTools(28, itemTaskIndex, toolIndex)
  4869. ">
  4870. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4871. <div style="margin: 5px 0">翻译</div>
  4872. </div>
  4873. <div class="noCTool">
  4874. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4875. </div>
  4876. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4877. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4878. </div>
  4879. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4880. <img src="../../../assets/icon/checkNo.png" alt
  4881. v-if="itemTool.tool.indexOf(28) == -1" />
  4882. <div class="checkDiv" v-else>
  4883. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4884. </div>
  4885. </div> -->
  4886. </div>
  4887. <div class="tool" :class="{
  4888. isToolChoose:
  4889. itemTool.tool.indexOf(31) != -1,
  4890. }" @click="
  4891. addTools(31, itemTaskIndex, toolIndex)
  4892. ">
  4893. <div class="whiteBIcon" @click.stop="
  4894. addTools(31, itemTaskIndex, toolIndex)
  4895. ">
  4896. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4897. <div style="margin: 5px 0">数字画板</div>
  4898. </div>
  4899. <div class="noCTool">
  4900. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4901. </div>
  4902. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4903. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4904. </div>
  4905. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4906. <img src="../../../assets/icon/checkNo.png" alt
  4907. v-if="itemTool.tool.indexOf(31) == -1" />
  4908. <div class="checkDiv" v-else>
  4909. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4910. </div>
  4911. </div> -->
  4912. </div>
  4913. <div class="tool" :class="{
  4914. isToolChoose:
  4915. itemTool.tool.indexOf(39) != -1,
  4916. }" @click="
  4917. addTools(39, itemTaskIndex, toolIndex)
  4918. ">
  4919. <div class="whiteBIcon" @click.stop="
  4920. addTools(39, itemTaskIndex, toolIndex)
  4921. ">
  4922. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4923. <div style="margin: 5px 0">GeoGebra</div>
  4924. </div>
  4925. <div class="noCTool">
  4926. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4927. </div>
  4928. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4929. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4930. </div>
  4931. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4932. <img src="../../../assets/icon/checkNo.png" alt
  4933. v-if="itemTool.tool.indexOf(39) == -1" />
  4934. <div class="checkDiv" v-else>
  4935. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4936. </div>
  4937. </div> -->
  4938. </div>
  4939. <div class="tool" :class="{
  4940. isToolChoose:
  4941. itemTool.tool.indexOf(66) != -1,
  4942. }" @click="
  4943. addTools(66, itemTaskIndex, toolIndex)
  4944. ">
  4945. <div class="whiteBIcon" @click.stop="
  4946. addTools(66, itemTaskIndex, toolIndex)
  4947. ">
  4948. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4949. <div style="margin: 5px 0">公式编辑</div>
  4950. </div>
  4951. <div class="noCTool">
  4952. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4953. </div>
  4954. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4955. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4956. </div>
  4957. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4958. <img src="../../../assets/icon/checkNo.png" alt
  4959. v-if="itemTool.tool.indexOf(66) == -1" />
  4960. <div class="checkDiv" v-else>
  4961. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4962. </div>
  4963. </div> -->
  4964. </div>
  4965. <!-- <div class="tool">
  4966. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4967. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4968. <div style="margin: 5px 0">分子结构</div>
  4969. </div>
  4970. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4971. <img src="../../../assets/icon/checkNo.png" alt
  4972. v-if="itemTool.tool.indexOf(67) == -1" />
  4973. <div class="checkDiv" v-else>
  4974. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4975. </div>
  4976. </div>
  4977. </div> -->
  4978. <div class="tool" :class="{
  4979. isToolChoose:
  4980. itemTool.tool.indexOf(68) != -1,
  4981. }" @click="
  4982. addTools(68, itemTaskIndex, toolIndex)
  4983. ">
  4984. <div class="whiteBIcon" @click.stop="
  4985. addTools(68, itemTaskIndex, toolIndex)
  4986. ">
  4987. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4988. <div style="margin: 5px 0">时间轴</div>
  4989. </div>
  4990. <div class="noCTool">
  4991. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4992. </div>
  4993. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4994. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4995. </div>
  4996. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4997. <img src="../../../assets/icon/checkNo.png" alt
  4998. v-if="itemTool.tool.indexOf(68) == -1" />
  4999. <div class="checkDiv" v-else>
  5000. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5001. </div>
  5002. </div> -->
  5003. </div>
  5004. <div class="tool" :class="{
  5005. isToolChoose:
  5006. itemTool.tool.indexOf(69) != -1,
  5007. }" @click="
  5008. addTools(69, itemTaskIndex, toolIndex)
  5009. ">
  5010. <div class="whiteBIcon" @click.stop="
  5011. openTools(itemTaskIndex, 69, toolIndex)
  5012. ">
  5013. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  5014. <div style="margin: 5px 0">英语写作</div>
  5015. </div>
  5016. <div class="noCTool">
  5017. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5018. </div>
  5019. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  5020. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5021. </div>
  5022. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  5023. <img src="../../../assets/icon/checkNo.png" alt
  5024. v-if="itemTool.tool.indexOf(4) == -1" />
  5025. <div class="checkDiv" v-else>
  5026. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5027. </div>
  5028. </div> -->
  5029. </div>
  5030. <div class="tool" :class="{
  5031. isToolChoose:
  5032. itemTool.tool.indexOf(70) != -1,
  5033. }" @click="
  5034. addTools(70, itemTaskIndex, toolIndex)
  5035. ">
  5036. <div class="whiteBIcon" @click.stop="
  5037. openTools(itemTaskIndex, 70, toolIndex)
  5038. ">
  5039. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  5040. <div style="margin: 5px 0">英语口语</div>
  5041. </div>
  5042. <div class="noCTool">
  5043. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5044. </div>
  5045. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  5046. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5047. </div>
  5048. </div>
  5049. <!-- <div class="tool">
  5050. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  5051. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  5052. <div style="margin: 5px 0">翻译</div>
  5053. </div>
  5054. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  5055. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  5056. <div class="checkDiv" v-else>
  5057. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5058. </div>
  5059. </div>
  5060. </div>
  5061. <div class="tool">
  5062. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  5063. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  5064. <div style="margin: 5px 0">魔盒识字</div>
  5065. </div>
  5066. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  5067. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  5068. <div class="checkDiv" v-else>
  5069. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5070. </div>
  5071. </div>
  5072. </div>
  5073. <div class="tool">
  5074. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  5075. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  5076. <div style="margin: 5px 0">24点</div>
  5077. </div>
  5078. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  5079. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  5080. <div class="checkDiv" v-else>
  5081. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5082. </div>
  5083. </div>
  5084. </div>
  5085. <div class="tool">
  5086. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  5087. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5088. <div style="margin: 5px 0">数学画板</div>
  5089. </div>
  5090. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  5091. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  5092. <div class="checkDiv" v-else>
  5093. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5094. </div>
  5095. </div>
  5096. </div>
  5097. <div class="tool">
  5098. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  5099. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  5100. <div style="margin: 5px 0">GeoGebra</div>
  5101. </div>
  5102. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  5103. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  5104. <div class="checkDiv" v-else>
  5105. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5106. </div>
  5107. </div>
  5108. </div>
  5109. <div class="tool">
  5110. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  5111. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  5112. <div style="margin: 5px 0">模拟驾驶</div>
  5113. </div>
  5114. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  5115. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  5116. <div class="checkDiv" v-else>
  5117. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5118. </div>
  5119. </div>
  5120. </div>
  5121. <div class="tool">
  5122. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  5123. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  5124. <div style="margin: 5px 0">路径搜索</div>
  5125. </div>
  5126. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  5127. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  5128. <div class="checkDiv" v-else>
  5129. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5130. </div>
  5131. </div>
  5132. </div>
  5133. <div class="tool">
  5134. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  5135. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  5136. <div style="margin: 5px 0">深度学习</div>
  5137. </div>
  5138. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  5139. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  5140. <div class="checkDiv" v-else>
  5141. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5142. </div>
  5143. </div>
  5144. </div>
  5145. <div class="tool">
  5146. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  5147. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  5148. <div style="margin: 5px 0">全历史</div>
  5149. </div>
  5150. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  5151. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  5152. <div class="checkDiv" v-else>
  5153. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5154. </div>
  5155. </div>
  5156. </div>
  5157. </div>
  5158. <div class="toolSort" v-if="itemTool.toolType == 4">
  5159. <div class="tool">
  5160. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  5161. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  5162. <div style="margin: 5px 0">课程设计</div>
  5163. </div>
  5164. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  5165. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  5166. <div class="checkDiv" v-else>
  5167. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5168. </div>
  5169. </div>
  5170. </div>
  5171. <div class="tool">
  5172. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  5173. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  5174. <div style="margin: 5px 0">目标管理</div>
  5175. </div>
  5176. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  5177. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  5178. <div class="checkDiv" v-else>
  5179. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5180. </div>
  5181. </div>
  5182. </div> -->
  5183. <!-- <div class="tool">
  5184. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  5185. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  5186. <div style="margin: 5px 0">汉字宫</div>
  5187. </div>
  5188. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  5189. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  5190. <div class="checkDiv" v-else>
  5191. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5192. </div>
  5193. </div>
  5194. </div> -->
  5195. </div>
  5196. </div>
  5197. <!-- v-show="!itemTool.isFold3" -->
  5198. <div class="op_tool_box"
  5199. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  5200. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  5201. class="binfo_input" style="
  5202. margin: 0 0 20px 0;
  5203. width: 100% !important;
  5204. " v-model="itemTool.toolDetail"></textarea>
  5205. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]}">
  5206. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  5207. <div class="op_box_right">
  5208. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5209. <div class="r_pub_button_op"
  5210. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)"
  5211. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)">
  5212. 智能优化</div>
  5213. </el-tooltip>
  5214. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  5215. </div>
  5216. </div>
  5217. </div>
  5218. <evaList
  5219. :toolsData="toolsData"
  5220. :unitJson="unitJson"
  5221. :itemTaskIndex="itemTaskIndex"
  5222. :toolIndex="toolIndex"
  5223. :knowFileids="knowFileids"
  5224. :languageSetting="languageSetting"
  5225. :userid="userid"
  5226. :aiJson="aiJson"
  5227. @setEvaList="setEvaList"
  5228. @addCourseBehavior="addCourseBehavior"
  5229. v-if="panTaskElist() == 0 && pjIndex.indexOf(itemTool.tool[0]) != -1"
  5230. :ref="'evalist'+itemTaskIndex+toolIndex"></evaList>
  5231. </div>
  5232. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具描述-添加按钮`)" style="
  5233. margin: 0 auto;
  5234. padding: 0 30px;
  5235. height: 45px;
  5236. ">
  5237. 添加工具
  5238. </button>
  5239. </div>
  5240. </div>
  5241. <div class="elist_css" v-if="panElist(itemTask) > 0">
  5242. <div class="elist_title">
  5243. <div style=" display: flex; flex-direction: row; align-items: center; margin: 20px 0; ">
  5244. <div class="lineTitle clineTitle" style="width: auto">任务评价体系</div>
  5245. </div>
  5246. <div>
  5247. <MindTask :showBar="false" :mindData="itemTask" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' " :ref="unitIndex + '-' + itemTaskIndex + 'mindTask'"></MindTask>
  5248. </div>
  5249. </div>
  5250. </div>
  5251. <div class="elist_css" v-if="panTaskElist() > 0"
  5252. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])" element-loading-text="小可正在努力生成中,请稍等...">
  5253. <div class="elist_title">
  5254. <div style="
  5255. display: flex;
  5256. flex-direction: row;
  5257. align-items: center;
  5258. margin: 20px 0;
  5259. ">
  5260. <div class="lineTitle clineTitle">评价设置</div>
  5261. <div style="margin-left:auto;display: flex;">
  5262. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  5263. <div class="r_pub_button_op"
  5264. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  5265. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  5266. </el-tooltip>
  5267. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  5268. <div class="r_pub_button_op" style="margin-left:10px;"
  5269. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  5270. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  5271. </el-tooltip>
  5272. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5273. <div class="r_pub_button_op" style="margin-left:10px;"
  5274. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  5275. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList && itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
  5276. </el-tooltip>
  5277. </div>
  5278. <!-- <div class="line" style="width: 90%"></div> -->
  5279. </div>
  5280. </div>
  5281. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5282. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5283. 上传补充资料
  5284. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5285. beforeUploadInfo2(
  5286. $event,
  5287. 18,
  5288. itemTaskIndex
  5289. )
  5290. " />
  5291. </button>
  5292. <div style="margin-top: 10px;width:100%" v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  5293. <div class="add_chapters_box add_c_none" v-if="
  5294. pingjiaInfoData[itemTaskIndex] &&
  5295. pingjiaInfoData[itemTaskIndex].length == 0
  5296. ">
  5297. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5298. <span>暂时还没有内容,快去添加吧</span>
  5299. </div>
  5300. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5301. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]" :key="item1.id" @click="
  5302. getChapterData(
  5303. $event,
  5304. index1,
  5305. item1.type
  5306. )
  5307. " >
  5308. <div class="chapter_upload_o" style="
  5309. position: relative;
  5310. display: flex;
  5311. align-items: center;
  5312. ">
  5313. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5314. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5315. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5316. </div>
  5317. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5318. </div>
  5319. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5320. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5321. </div>
  5322. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5323. </div>
  5324. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5325. </div>
  5326. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5327. </div>
  5328. </div>
  5329. <div class="chapter_upload_n">
  5330. <input readonly="true" v-if="
  5331. item1.type == 2 ||
  5332. item1.type == 3 ||
  5333. item1.type == 12 ||
  5334. item1.type == 13 ||
  5335. item1.type == 7
  5336. " :placeholder="item1.name" @click.stop="
  5337. checkChpater3($event, index1, item1)
  5338. " style="
  5339. border: none;
  5340. outline: none;
  5341. width: 80%;
  5342. minwidth: 215px;
  5343. z-index: 99;
  5344. font-size: 14px;
  5345. white-space: nowrap;
  5346. overflow: hidden;
  5347. text-overflow: ellipsis;
  5348. " />
  5349. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5350. border: none;
  5351. outline: none;
  5352. width: 80%;
  5353. white-space: nowrap;
  5354. overflow: hidden;
  5355. text-overflow: ellipsis;
  5356. " readonly="true" @click="
  5357. selectAttText(index1)
  5358. " />
  5359. <input :placeholder="item1.title ? item1.title : '链接'
  5360. " v-if="item1.type == 8" style="
  5361. border: none;
  5362. outline: none;
  5363. width: 80%;
  5364. white-space: nowrap;
  5365. overflow: hidden;
  5366. text-overflow: ellipsis;
  5367. " readonly="true" @click="selectLine(index1)" />
  5368. <input :placeholder="item1.title ? item1.title : '链接'
  5369. " v-if="item1.type == 14" style="
  5370. border: none;
  5371. outline: none;
  5372. width: 80%;
  5373. white-space: nowrap;
  5374. overflow: hidden;
  5375. text-overflow: ellipsis;
  5376. " readonly="true" @click="
  5377. openUpdateSource(index1)
  5378. " />
  5379. </div>
  5380. <div class="chapter_upload_ic">
  5381. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5382. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5383. checkChpater3($event, index1, item1)
  5384. ">
  5385. <div></div>
  5386. </div>
  5387. <div class="chapter_upload_ic_r" @click.stop="
  5388. deletepingjiaInfoData(
  5389. $event,
  5390. index1,
  5391. itemTaskIndex
  5392. )
  5393. ">
  5394. <div></div>
  5395. </div>
  5396. </div>
  5397. </div>
  5398. </div>
  5399. </div>
  5400. </div>
  5401. <div v-if="
  5402. pingjiainfoproVisible[itemTaskIndex]
  5403. " class="mask">
  5404. <div class="progressBox">
  5405. <div class="lbox">
  5406. <img src="../../../assets/loading.gif" />上传中,请稍后
  5407. </div>
  5408. <div style="margin-bottom: 10px">
  5409. <span>{{
  5410. pingjiainfoisFinishSize[itemTaskIndex]
  5411. }}</span>
  5412. /
  5413. <span>{{
  5414. pingjiainfoisAllSize[itemTaskIndex]
  5415. }}</span>
  5416. </div>
  5417. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5418. ? pingjiainfoprogress[itemTaskIndex]
  5419. : 0
  5420. " style="width: 80%"></el-progress> -->
  5421. </div>
  5422. </div>
  5423. </div>
  5424. <div class="mbCss">
  5425. <div class="pjCss" :style="{
  5426. width: itemTask.isEvaFold
  5427. ? 'calc(100% - 55%)'
  5428. : 'calc(100% - 120px)',
  5429. }">
  5430. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5431. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5432. <div class="elist_inptu_text">
  5433. <span>目标:</span>
  5434. <!-- <span>核心素养:</span> -->
  5435. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: calc(100% - 280px);"/>
  5436. <el-switch
  5437. @change="forceUpdate"
  5438. class="rateSwitch"
  5439. style="margin-left: auto;"
  5440. v-model="itemTask.eList[eIndex].isai"
  5441. active-color="#0061FF"
  5442. active-text="AI评分"
  5443. inactive-text=""
  5444. active-value="1"
  5445. inactive-value="2">
  5446. </el-switch>
  5447. </div>
  5448. <div class="elist_inptu_text" v-show="false">
  5449. <!-- <span>评价维度:</span> -->
  5450. <span>能力:</span>
  5451. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5452. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5453. <!-- </el-tooltip> -->
  5454. <!-- <span>评星等级:</span>
  5455. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5456. disabled></el-rate> -->
  5457. <div class="remove" @click="
  5458. deletEList(
  5459. unitIndex,
  5460. itemTaskIndex,
  5461. eIndex
  5462. )
  5463. "></div>
  5464. </div>
  5465. <div class="elist_inptu_text">
  5466. <!-- <span>维度描述:</span> -->
  5467. <span>评价标准:</span>
  5468. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5469. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5470. <div class="remove" @click="
  5471. deletEList(
  5472. unitIndex,
  5473. itemTaskIndex,
  5474. eIndex
  5475. )
  5476. "></div>
  5477. <!-- </el-tooltip> -->
  5478. </div>
  5479. <div class="elist_inptu_text" v-if="evalua">
  5480. <span>目标:</span>
  5481. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5482. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5483. @change="forceUpdate()">
  5484. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5485. :value="e.name">
  5486. </el-option>
  5487. </el-select> -->
  5488. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5489. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5490. </div>
  5491. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  5492. <span>评价细则:</span>
  5493. <div style="width: calc(100%);">
  5494. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  5495. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5496. <div class="ruleBtn"
  5497. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5498. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5499. </el-tooltip>
  5500. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  5501. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5502. <div class="op_box">
  5503. <div class="op_remark"></div>
  5504. <div class="op_box_right">
  5505. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5506. <div class="r_pub_button_op"
  5507. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5508. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5509. </el-tooltip>
  5510. </div>
  5511. </div>
  5512. </div>
  5513. </div>
  5514. </div>
  5515. </div>
  5516. </div>
  5517. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5518. style="margin: 35px 35px 0 0">
  5519. <div class="addToolImg">
  5520. <img src="../../../assets/icon/add.png" alt />
  5521. </div>
  5522. <div>添加</div>
  5523. </div> -->
  5524. <div class="eva_btn_box">
  5525. <div class="eva_btn_left_box">
  5526. <button class="c_pub_button_add pub_btn_eval_img"
  5527. @click="addEList(unitIndex, itemTaskIndex)">
  5528. 添加
  5529. </button>
  5530. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5531. @click="openEList(unitIndex, itemTaskIndex)">
  5532. 资源
  5533. </button> -->
  5534. </div>
  5535. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5536. v-if="itemTask.eList && itemTask.eList.length">
  5537. 添加资源模板
  5538. </button>
  5539. </div>
  5540. </div>
  5541. <div v-if="evalua" style="
  5542. border: 1px solid #e5e5e5;
  5543. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5544. " :style="{
  5545. width: itemTask.isEvaFold ? '55%' : '116px',
  5546. }" class="evaCss">
  5547. <!-- <div class="e_add_top">
  5548. <div class="e_add_title">
  5549. <span>当前使用目标管理</span>
  5550. <span>{{ eTitle }}</span>
  5551. <img src="../../../assets/line.png" class="cru_line" style="
  5552. width: 125px;
  5553. height: 20px;
  5554. bottom: -10px;
  5555. left: 155px;
  5556. " />
  5557. </div>
  5558. </div> -->
  5559. <div class="e_add_content" style="width: 100%">
  5560. <div class="e_add_list_pbox" style="width: 100%">
  5561. <div class="e_add_list_pbox_title">
  5562. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5563. <div class="type_content" v-if="itemTask.isEvaFold">
  5564. <span :class="{ active: typeMode == 1 }"
  5565. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5566. <span :class="{ active: typeMode == 2 }"
  5567. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5568. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5569. </div>
  5570. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5571. @click="foldEva(itemTaskIndex)">
  5572. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5573. </div>
  5574. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5575. @click="foldEva(itemTaskIndex)">
  5576. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5577. </div>
  5578. </div>
  5579. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5580. style="min-height: 200px">
  5581. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5582. " v-if="typeMode == 1"></Mind>
  5583. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5584. </Sunburst>
  5585. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5586. v-if="typeMode == 3"></SeeBoard>
  5587. </div>
  5588. </div>
  5589. </div>
  5590. </div>
  5591. </div>
  5592. </div>
  5593. <div class="funBlock" style="padding: 0">
  5594. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5595. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5596. <div>
  5597. {{
  5598. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5599. }}
  5600. </div>
  5601. </div>
  5602. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5603. <div>展开</div>
  5604. <div class="arrow">
  5605. <img src="../../../assets/icon/expand.png" alt />
  5606. </div>
  5607. </div> -->
  5608. </div>
  5609. </div>
  5610. </div>
  5611. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5612. <!-- <div>
  5613. <img src="../../../../assets/icon/new/addStage.png" alt />
  5614. <span>添加任务</span>
  5615. </div> -->
  5616. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5617. 添加任务
  5618. </button>
  5619. </div>
  5620. </div>
  5621. <div class="info_btnBox3" v-show="istemplate == 1">
  5622. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5623. goTo(
  5624. '/course?userid=' +
  5625. userid +
  5626. '&oid=' +
  5627. oid +
  5628. '&org=' +
  5629. org +
  5630. '&role=' +
  5631. role
  5632. )
  5633. ">
  5634. 返回课程
  5635. </button>
  5636. <button class="c_pub_button_return pub_btn_last_img"
  5637. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5638. {{ steps == 4 ? "返回课程" : "上一步" }}
  5639. </button>
  5640. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5641. pub_btn_next_img: steps != 3,
  5642. pub_btn_finish_img: steps == 3,
  5643. }">
  5644. {{ steps == 3 ? "确认上传" : "下一步" }}
  5645. </button>
  5646. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5647. '修改模板' : '保存模板'}}</button>
  5648. </div>
  5649. </div>
  5650. </div>
  5651. </div>
  5652. </div>
  5653. <div style="
  5654. width: calc(100% - 20px);
  5655. background: rgb(255, 255, 255);
  5656. border-radius: 10px;
  5657. " v-if="steps == 4">
  5658. <div class="basic_box_success">
  5659. <div class="right_img">
  5660. <img src="../../../assets/icon/right.png" alt />
  5661. </div>
  5662. <div style="font-weight: bold">成功</div>
  5663. <!-- <div>您的课程编号</div>
  5664. <div class="number">{{ number }}</div>-->
  5665. <!-- <div class="success_button">
  5666. <div class="look_course" @click="isNoFinsh">
  5667. 邀请老师协同编辑
  5668. </div>
  5669. <div class="attend_others" @click="goCourse">预览课程</div>
  5670. </div> -->
  5671. </div>
  5672. </div>
  5673. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5674. @mouseleave="btnDisplay(false)" v-if="false">
  5675. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5676. goTo(
  5677. '/course?userid=' +
  5678. userid +
  5679. '&oid=' +
  5680. oid +
  5681. '&org=' +
  5682. org +
  5683. '&role=' +
  5684. role
  5685. )
  5686. ">
  5687. 返回课程
  5688. </button>
  5689. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5690. @click="lastSteps">
  5691. {{ steps == 4 ? "返回课程" : "上一步" }}
  5692. </button>
  5693. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5694. pub_btn_next_img: steps != 3,
  5695. pub_btn_finish_img: steps == 3,
  5696. }">
  5697. {{ steps == 3 ? "确认上传" : "下一步" }}
  5698. </button>
  5699. </div>
  5700. </div>
  5701. </div>
  5702. <div class="leftBar" style="height: calc(100% - 36px - 20px);margin-top: 36px;" v-if="istemplate == 1">
  5703. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5704. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5705. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5706. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5707. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5708. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5709. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5710. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5711. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5712. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5713. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5714. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5715. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5716. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5717. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5718. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5719. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5720. @setAiJson="setAiJson" /> -->
  5721. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5722. @setAiJson="setAiJson" />
  5723. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5724. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5725. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5726. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5727. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5728. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5729. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5730. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5731. </div>
  5732. <div class="leftBar2 resizable" style="height: calc(100% - 36px - 20px);margin-top: 36px;" v-show="istemplate != 1 && isDialog == 1 && chatid && isDisplay">
  5733. <div class="resizer"></div>
  5734. <aiBoxRight
  5735. :languageSetting="languageSetting"
  5736. :courseId="chatid"
  5737. :unitJson="unitJson"
  5738. :quoteArray="isQuote"
  5739. :teacherCourseText="teacherCourseText"
  5740. :targetCourseText="targetCourseText"
  5741. :courseText2="courseText"
  5742. :targetCourseText2="targetCourseText2"
  5743. :cpote="cpote"
  5744. @addCourseBehavior="addCourseBehavior"
  5745. :fileids='[...knowFileids, ...knowFileids2]'
  5746. @setIsQuote="setIsQuote"></aiBoxRight>
  5747. </div>
  5748. <div class="close_btn" @click="closeRight" :class="!isDisplay ? 'close_btn_voice' : ''" v-show="istemplate != 1 && isDialog == 1 && chatid">
  5749. <img src="../../../assets/icon/course/arrow.svg" >
  5750. </div>
  5751. </div>
  5752. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5753. class="dialog_diy2 customWidth">
  5754. <div>请复制该链接邀请协同编辑</div>
  5755. <div>http://www.boomyon.com/index-zhang.com</div>
  5756. <span slot="footer" class="dialog-footer">
  5757. <el-button type="primary">复制链接分享</el-button>
  5758. <el-button @click="dialogVisible = false">取消</el-button>
  5759. </span>
  5760. </el-dialog>
  5761. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5762. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5763. <el-form>
  5764. <el-form-item label="文档标题">
  5765. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5766. </el-form-item>
  5767. <div>文档简介</div>
  5768. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5769. </el-form>
  5770. <span slot="footer" class="dialog-footer">
  5771. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5772. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5773. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5774. </span>
  5775. </el-dialog>
  5776. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5777. :before-close="handleClose" class="dialog_diy">
  5778. <el-form>
  5779. <el-form-item label="文档标题">
  5780. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5781. </el-form-item>
  5782. <div>文档内容</div>
  5783. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5784. </el-form>
  5785. <span slot="footer" class="dialog-footer">
  5786. <el-button @click="clearChoose">取 消</el-button>
  5787. <el-button type="primary" @click="wordNext()">确定</el-button>
  5788. </span>
  5789. </el-dialog>
  5790. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5791. :before-close="handleClose" class="dialog_diy">
  5792. <el-form>
  5793. <el-form-item label="文本标题">
  5794. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5795. placeholder="请输入文本标题..."></el-input>
  5796. </el-form-item>
  5797. <!-- <div>富文本内容</div> -->
  5798. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5799. </el-form>
  5800. <span slot="footer" class="dialog-footer">
  5801. <el-button @click="clearAttText">取 消</el-button>
  5802. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5803. </span>
  5804. </el-dialog>
  5805. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5806. :before-close="handleClose" class="dialog_diy lineCss">
  5807. <el-form>
  5808. <el-form-item label="标题" :label-width="formLabelWidth">
  5809. <span>
  5810. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5811. </span>
  5812. </el-form-item>
  5813. <el-form-item label="链接" :label-width="formLabelWidth">
  5814. <span>
  5815. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5816. </span>
  5817. </el-form-item>
  5818. </el-form>
  5819. <span slot="footer" class="dialog-footer">
  5820. <el-button @click="clearLine">取 消</el-button>
  5821. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5822. </span>
  5823. </el-dialog>
  5824. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5825. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5826. <div>
  5827. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5828. </div>
  5829. <span slot="footer" class="dialog-footer">
  5830. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5831. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5832. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5833. </span>
  5834. </el-dialog>
  5835. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5836. :before-close="handleClose" class="addNewPP customWidth">
  5837. <div class="people">
  5838. <div class="people_top">
  5839. <div class="people_nav">选择成员</div>
  5840. <div class="people_top_right">
  5841. <div class="people_search">
  5842. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5843. <div class="search_img" @click="searchStudent">
  5844. <img src="../../../assets/icon/search.png" alt />
  5845. </div>
  5846. </div>
  5847. </div>
  5848. </div>
  5849. <el-checkbox-group v-model="checkboxList" class="people_name">
  5850. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5851. "暂无学生可选" }}</el-checkbox>
  5852. </el-checkbox-group>
  5853. </div>
  5854. <span slot="footer" class="dialog-footer">
  5855. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5856. <el-button type="primary" @click="isAddPP">确定</el-button>
  5857. </span>
  5858. </el-dialog>
  5859. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5860. :before-close="handleClose" class="addNewPP2">
  5861. <div class="check_classBox">
  5862. <div class="check_class_right">
  5863. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5864. 全部
  5865. </div>
  5866. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5867. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5868. {{ item.name }}
  5869. </div>
  5870. </el-tooltip>
  5871. </div>
  5872. <div class="check_class_left">
  5873. <div class="check_class_all_box">
  5874. <div class="check_class_left_title">选择班级</div>
  5875. <div style="display: flex; align-items: center; margin-left: auto">
  5876. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5877. </div>
  5878. </div>
  5879. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5880. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5881. </div> -->
  5882. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5883. v-if="grade2.length">
  5884. <div v-for="item in grade2" :key="item.id" class="class_item">
  5885. <el-checkbox :label="item.id">
  5886. {{ item.name }}
  5887. </el-checkbox>
  5888. </div>
  5889. </el-checkbox-group>
  5890. <div v-if="!grade2.length">暂无数据</div>
  5891. </div>
  5892. </div>
  5893. <span slot="footer" class="dialog-footer">
  5894. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5895. <el-button type="primary" @click="isAddClass">确定</el-button>
  5896. </span>
  5897. </el-dialog>
  5898. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5899. :before-close="handleClose" class="addNewPP customWidth">
  5900. <div style="display: flex;justify-content: space-between;">
  5901. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5902. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5903. 全部
  5904. </div>
  5905. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5906. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5907. <el-tooltip placement="top" :content="i.name">
  5908. <span>{{i.name}}</span>
  5909. </el-tooltip>
  5910. </div>
  5911. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5912. 其他
  5913. </div>
  5914. </div>
  5915. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5916. <div class="people">
  5917. <div class="people_top">
  5918. <div class="people_top_right">
  5919. <div class="people_search">
  5920. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5921. <div class="search_img" @click="getTeacher(collid)">
  5922. <img src="../../../assets/icon/search.png" alt />
  5923. </div>
  5924. </div>
  5925. </div>
  5926. <div class="people_nav" style="display: flex; align-items: center">
  5927. <div class="check_class_left_title">选择成员</div>
  5928. <div style="display: flex; align-items: center; margin-left: auto">
  5929. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5930. </div>
  5931. </div>
  5932. </div>
  5933. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5934. @change="InviteChange2">
  5935. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5936. <div class="t_j_box">
  5937. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5938. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5939. </el-tooltip>
  5940. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5941. <span>{{ item.username.split('@')[0] }}</span>
  5942. </el-tooltip>
  5943. <el-tooltip placement="top" :content="item.school">
  5944. <span>{{ item.school }}</span>
  5945. </el-tooltip>
  5946. </div>
  5947. </el-checkbox>
  5948. </el-checkbox-group>
  5949. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5950. </div>
  5951. </div>
  5952. </div>
  5953. <span slot="footer" class="dialog-footer">
  5954. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5955. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5956. </span>
  5957. </el-dialog>
  5958. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5959. closePan(4);
  5960. }
  5961. " class="dialog_diy fullStyle">
  5962. <div style="height: 100%">
  5963. <div class="a_add_title" style="
  5964. display: flex;
  5965. flex-direction: row;
  5966. align-items: center;
  5967. justify-content: center;
  5968. ">
  5969. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5970. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5971. </div>
  5972. <div class="a_addBox" style="height: calc(100% - 50px)">
  5973. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5974. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5975. <div class="a_add_checkType">
  5976. <span :class="{
  5977. active:
  5978. askJson.askJson[index1].type == '1' ||
  5979. !askJson.askJson[index1].type,
  5980. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5981. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5982. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5983. </div>
  5984. <div class="a_add_head">
  5985. <div style="
  5986. display: flex;
  5987. align-items: center;
  5988. width: 100%;
  5989. margin-right: 20px;
  5990. ">
  5991. <span style="min-width: fit-content">{{
  5992. index1 + 1 + "、"
  5993. }}</span>
  5994. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5995. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5996. $forceUpdate();
  5997. }
  5998. "></textarea>
  5999. </div>
  6000. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  6001. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  6002. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  6003. </div>
  6004. <div class="a_add_head_div">
  6005. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  6006. </el-button>
  6007. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  6008. </div>
  6009. </div>
  6010. <div class="a_add_body">
  6011. <div class="a_add_input" style="flex-direction: column">
  6012. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  6013. margin: 20px 10px 0 0;
  6014. display: flex;
  6015. align-items: center;
  6016. position: relative;
  6017. ">
  6018. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  6019. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6020. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  6021. @change="() => {
  6022. $forceUpdate();
  6023. }
  6024. "></textarea>
  6025. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  6026. v-if="askJson.askJson[index1].askItem != 1">
  6027. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  6028. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  6029. </div>
  6030. <div class="a_add_body_div">
  6031. <el-button type="primary" size="small"
  6032. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  6033. <el-button type="primary" size="small" @click="
  6034. deletecheckList(askJson.askJson[index1], checkIndex)
  6035. " v-if="askJson.askJson[index1].askItem != 1">删除
  6036. </el-button>
  6037. </div>
  6038. </div>
  6039. </div>
  6040. <!-- <div class="a_add_body_div">
  6041. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  6042. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  6043. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  6044. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  6045. </el-button>
  6046. </div> -->
  6047. </div>
  6048. </div>
  6049. </div>
  6050. </div>
  6051. <span slot="footer" class="dialog-footer">
  6052. <el-button @click="closePan(4)">取 消</el-button>
  6053. <el-button type="primary" @click="addAsk">确 定</el-button>
  6054. </span>
  6055. </el-dialog>
  6056. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  6057. closePan(45);
  6058. }
  6059. " class="dialog_diy fullStyle">
  6060. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  6061. <!-- <div class="a_add_title" style="
  6062. display: flex;
  6063. flex-direction: row;
  6064. align-items: center;
  6065. justify-content: center;
  6066. ">
  6067. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  6068. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  6069. </div> -->
  6070. <div class="a_addBox" style="height: 100%">
  6071. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  6072. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  6073. 上传补充资料
  6074. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  6075. beforeUploadInfo2(
  6076. $event,
  6077. 17
  6078. )
  6079. " />
  6080. </button>
  6081. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  6082. <div class="add_chapters_box add_c_none" v-if="
  6083. xuanzeInfoData &&
  6084. xuanzeInfoData.length == 0
  6085. ">
  6086. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  6087. <span>暂时还没有内容,快去添加吧</span>
  6088. </div>
  6089. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  6090. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  6091. getChapterData(
  6092. $event,
  6093. index1,
  6094. item1.type
  6095. )
  6096. " >
  6097. <div class="chapter_upload_o" style="
  6098. position: relative;
  6099. display: flex;
  6100. align-items: center;
  6101. ">
  6102. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  6103. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  6104. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  6105. </div>
  6106. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  6107. </div>
  6108. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  6109. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  6110. </div>
  6111. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  6112. </div>
  6113. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  6114. </div>
  6115. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  6116. </div>
  6117. </div>
  6118. <div class="chapter_upload_n">
  6119. <input readonly="true" v-if="
  6120. item1.type == 2 ||
  6121. item1.type == 3 ||
  6122. item1.type == 12 ||
  6123. item1.type == 13 ||
  6124. item1.type == 7
  6125. " :placeholder="item1.name" @click.stop="
  6126. checkChpater3($event, index1, item1)
  6127. " style="
  6128. border: none;
  6129. outline: none;
  6130. width: 80%;
  6131. minwidth: 215px;
  6132. z-index: 99;
  6133. font-size: 14px;
  6134. white-space: nowrap;
  6135. overflow: hidden;
  6136. text-overflow: ellipsis;
  6137. " />
  6138. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  6139. border: none;
  6140. outline: none;
  6141. width: 80%;
  6142. white-space: nowrap;
  6143. overflow: hidden;
  6144. text-overflow: ellipsis;
  6145. " readonly="true" @click="
  6146. selectAttText(index1)
  6147. " />
  6148. <input :placeholder="item1.title ? item1.title : '链接'
  6149. " v-if="item1.type == 8" style="
  6150. border: none;
  6151. outline: none;
  6152. width: 80%;
  6153. white-space: nowrap;
  6154. overflow: hidden;
  6155. text-overflow: ellipsis;
  6156. " readonly="true" @click="selectLine(index1)" />
  6157. <input :placeholder="item1.title ? item1.title : '链接'
  6158. " v-if="item1.type == 14" style="
  6159. border: none;
  6160. outline: none;
  6161. width: 80%;
  6162. white-space: nowrap;
  6163. overflow: hidden;
  6164. text-overflow: ellipsis;
  6165. " readonly="true" @click="
  6166. openUpdateSource(index1)
  6167. " />
  6168. </div>
  6169. <div class="chapter_upload_ic">
  6170. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  6171. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  6172. checkChpater3($event, index1, item1)
  6173. ">
  6174. <div></div>
  6175. </div>
  6176. <div class="chapter_upload_ic_r" @click.stop="
  6177. deletexuanzeInfoData(
  6178. $event,
  6179. index1
  6180. )
  6181. ">
  6182. <div></div>
  6183. </div>
  6184. </div>
  6185. </div>
  6186. </div>
  6187. </div>
  6188. </div>
  6189. <div v-if="
  6190. xuanzeinfoproVisible
  6191. " class="mask">
  6192. <div class="progressBox">
  6193. <div class="lbox">
  6194. <img src="../../../assets/loading.gif" />上传中,请稍后
  6195. </div>
  6196. <div style="margin-bottom: 10px">
  6197. <span>{{
  6198. xuanzeinfoisFinishSize
  6199. }}</span>
  6200. /
  6201. <span>{{
  6202. xuanzeinfoisAllSize
  6203. }}</span>
  6204. </div>
  6205. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  6206. ? xuanzeinfoprogress
  6207. : 0
  6208. " style="width: 80%"></el-progress> -->
  6209. </div>
  6210. </div>
  6211. </div>
  6212. <div style="
  6213. font-size: 16px;
  6214. color: #c7c7c7;
  6215. display: flex;
  6216. align-items: center;
  6217. justify-content: flex-end;
  6218. ">
  6219. <!-- 请输入题目内容 -->
  6220. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  6221. 智能生成
  6222. </button>
  6223. <!-- 请输入题目内容 -->
  6224. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  6225. v-if="isPasteChoice">
  6226. 智能粘贴
  6227. </button>
  6228. </div>
  6229. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  6230. <div class="a_add_checkType">
  6231. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  6232. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  6233. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  6234. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  6235. </div>
  6236. <div class="a_add_head">
  6237. <div class="timuUpImg">
  6238. <div style="display: flex; align-items: center">
  6239. <span style="min-width: fit-content">{{
  6240. index1 + 1 + "、"
  6241. }}</span>
  6242. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  6243. placeholder="请输入题目">
  6244. </el-input> -->
  6245. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6246. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  6247. $forceUpdate();
  6248. }
  6249. "></textarea>
  6250. </div>
  6251. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  6252. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  6253. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  6254. </div>
  6255. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  6256. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6257. <input type="file" accept="image/*" style="display: none"
  6258. @change="beforeUploadTiMu($event, index1)" />
  6259. </div>
  6260. </div>
  6261. <div class="a_add_head_div">
  6262. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  6263. </el-button>
  6264. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  6265. </div>
  6266. </div>
  6267. <div class="timuImgBox" v-if="
  6268. testJson.testJson[index1].timuList &&
  6269. testJson.testJson[index1].timuList.length
  6270. ">
  6271. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  6272. @click.stop="previewImg(timg.src)">
  6273. <img :src="timg.src" alt="" />
  6274. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  6275. <img src="../../../assets/icon/delete.png" alt="" />
  6276. </div>
  6277. </div>
  6278. </div>
  6279. <div class="a_add_body">
  6280. <div class="a_add_input a_add_input_choice">
  6281. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  6282. @change="() => {
  6283. $forceUpdate();
  6284. }
  6285. ">
  6286. <div class="radioBox">
  6287. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  6288. .testItem" :key="checkIndex" :label="checkIndex">
  6289. <div style="margin-right: 10px">
  6290. 选项{{ checkIndex + 1 }}
  6291. </div>
  6292. <div style="margin-right: 10px; width: 300px" v-if="
  6293. testJson.testJson[index1].checkList[checkIndex] &&
  6294. testJson.testJson[index1].checkList[checkIndex]
  6295. .imgType &&
  6296. testJson.testJson[index1].checkList[checkIndex]
  6297. .imgType == 1
  6298. ">
  6299. <div class="inImg" @click.stop="
  6300. previewImg(
  6301. testJson.testJson[index1].checkList[checkIndex]
  6302. .src
  6303. )
  6304. ">
  6305. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  6306. .src
  6307. " lazy />
  6308. <!-- <img :src="
  6309. testJson.testJson[index1].checkList[checkIndex]
  6310. .src
  6311. " alt="" /> -->
  6312. </div>
  6313. </div>
  6314. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  6315. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6316. $forceUpdate();
  6317. }
  6318. "></textarea>
  6319. <div class="xzUpImg" @click.stop="addImg($event)">
  6320. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6321. <input type="file" accept="image/*" style="display: none"
  6322. @change="beforeUploadTi($event, index1, checkIndex)" />
  6323. </div>
  6324. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6325. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  6326. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  6327. </div>
  6328. <div class="a_add_body_div">
  6329. <el-button type="primary" size="small" @click.stop="
  6330. addTcheckList(testJson.testJson[index1], checkIndex)
  6331. ">添加</el-button>
  6332. <el-button type="primary" size="small" @click.stop="
  6333. deleteTcheckList(
  6334. testJson.testJson[index1],
  6335. checkIndex
  6336. )
  6337. " v-if="testJson.testJson[index1].testItem != 1">删除
  6338. </el-button>
  6339. </div>
  6340. </el-radio>
  6341. </div>
  6342. </el-radio-group>
  6343. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6344. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6345. $forceUpdate();
  6346. }
  6347. ">
  6348. <div class="radioBox">
  6349. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6350. .testItem" :key="checkIndex1" :label="checkIndex1">
  6351. <div style="margin-right: 10px">
  6352. 选项{{ checkIndex1 + 1 }}
  6353. </div>
  6354. <div style="margin-right: 10px; width: 300px" v-if="
  6355. testJson.testJson[index1].checkList[checkIndex1] &&
  6356. testJson.testJson[index1].checkList[checkIndex1]
  6357. .imgType &&
  6358. testJson.testJson[index1].checkList[checkIndex1]
  6359. .imgType == 1
  6360. ">
  6361. <div class="inImg" @click.stop="
  6362. previewImg(
  6363. testJson.testJson[index1].checkList[checkIndex1]
  6364. .src
  6365. )
  6366. ">
  6367. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6368. .src
  6369. " lazy />
  6370. <!-- <img :src="
  6371. testJson.testJson[index1].checkList[checkIndex1]
  6372. .src
  6373. " alt="" /> -->
  6374. </div>
  6375. </div>
  6376. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6377. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6378. $forceUpdate();
  6379. }
  6380. "></textarea>
  6381. <div class="xzUpImg" @click.stop="addImg($event)">
  6382. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6383. <input type="file" accept="image/*" style="display: none"
  6384. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6385. </div>
  6386. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6387. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6388. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6389. </div>
  6390. <div class="a_add_body_div">
  6391. <el-button type="primary" size="small" @click.stop="
  6392. addTcheckList(
  6393. testJson.testJson[index1],
  6394. checkIndex1
  6395. )
  6396. ">添加</el-button>
  6397. <el-button type="primary" size="small" @click.stop="
  6398. deleteTcheckList(
  6399. testJson.testJson[index1],
  6400. checkIndex1
  6401. )
  6402. " v-if="testJson.testJson[index1].testItem != 1">删除
  6403. </el-button>
  6404. </div>
  6405. </el-checkbox>
  6406. </div>
  6407. </el-checkbox-group>
  6408. </div>
  6409. <!-- <div class="a_add_body_div">
  6410. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6411. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6412. v-if="testJson.testJson[index1].testItem != 1">删除
  6413. </el-button>
  6414. </div> -->
  6415. </div>
  6416. </div>
  6417. </div>
  6418. </div>
  6419. <span slot="footer" class="dialog-footer">
  6420. <el-button @click="closePan(45)">取 消</el-button>
  6421. <el-button type="primary" @click="addTest">确 定</el-button>
  6422. </span>
  6423. </el-dialog>
  6424. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6425. :before-close="handleClose" class="dialog_diy addToolsDia">
  6426. <div class="toolChoose">
  6427. <div class="tools">
  6428. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6429. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6430. <div style="
  6431. display: flex;
  6432. flex-direction: row;
  6433. align-items: baseline;
  6434. flex-wrap: nowrap;
  6435. justify-content: flex-start;
  6436. position: relative;
  6437. ">
  6438. <div class="chooseWho">
  6439. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6440. 互动类
  6441. </div>
  6442. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6443. 思维类
  6444. </div>
  6445. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6446. 评价类
  6447. </div>
  6448. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6449. 其他
  6450. </div>
  6451. </div>
  6452. </div>
  6453. <div style="min-height: 163px">
  6454. <div class="toolSort" v-if="chapToolsType == 0">
  6455. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6456. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6457. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6458. <div style="margin: 5px 0">素材库</div>
  6459. </div>
  6460. <div class="noCTool">
  6461. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6462. </div>
  6463. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6464. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6465. </div>
  6466. <!-- <div class="check" @click="chapAddTools(8)">
  6467. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6468. <div class="checkDiv" v-else>
  6469. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6470. </div>
  6471. </div> -->
  6472. </div>
  6473. </div>
  6474. <div class="toolSort" v-if="chapToolsType == 1">
  6475. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6476. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6477. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6478. <div style="margin: 5px 0">思维网格</div>
  6479. </div>
  6480. <div class="noCTool">
  6481. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6482. </div>
  6483. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6484. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6485. </div>
  6486. <!-- <div class="check" @click="chapAddTools(7)">
  6487. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6488. <div class="checkDiv" v-else>
  6489. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6490. </div>
  6491. </div> -->
  6492. </div>
  6493. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6494. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6495. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6496. <div style="margin: 5px 0">电子白板</div>
  6497. </div>
  6498. <div class="noCTool">
  6499. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6500. </div>
  6501. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6502. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6503. </div>
  6504. <!-- <div class="check" @click="chapAddTools(1)">
  6505. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6506. <div class="checkDiv" v-else>
  6507. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6508. </div>
  6509. </div> -->
  6510. </div>
  6511. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6512. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6513. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6514. <div style="margin: 5px 0">便签</div>
  6515. </div>
  6516. <div class="noCTool">
  6517. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6518. </div>
  6519. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6520. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6521. </div>
  6522. <!-- <div class="check" @click="chapAddTools(2)">
  6523. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6524. <div class="checkDiv" v-else>
  6525. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6526. </div>
  6527. </div> -->
  6528. </div>
  6529. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6530. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6531. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6532. <div style="margin: 5px 0">协同文档</div>
  6533. </div>
  6534. <div class="noCTool">
  6535. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6536. </div>
  6537. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6538. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6539. </div>
  6540. <!-- <div class="check" @click="chapAddTools(6)">
  6541. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6542. <div class="checkDiv" v-else>
  6543. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6544. </div>
  6545. </div> -->
  6546. </div>
  6547. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6548. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6549. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6550. <div style="margin: 5px 0">思维导图</div>
  6551. </div>
  6552. <div class="noCTool">
  6553. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6554. </div>
  6555. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6556. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6557. </div>
  6558. <!-- <div class="check" @click="chapAddTools(3)">
  6559. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6560. <div class="checkDiv" v-else>
  6561. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6562. </div>
  6563. </div> -->
  6564. </div>
  6565. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6566. @click="chapAddTools(31)">
  6567. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6568. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6569. <div style="margin: 5px 0">数学画板</div>
  6570. </div>
  6571. <div class="noCTool">
  6572. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6573. </div>
  6574. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6575. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6576. </div>
  6577. <!-- <div class="check" @click="chapAddTools(31)">
  6578. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6579. <div class="checkDiv" v-else>
  6580. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6581. </div>
  6582. </div> -->
  6583. </div>
  6584. </div>
  6585. <div class="toolSort" v-if="chapToolsType == 2">
  6586. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6587. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6588. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6589. <div style="margin: 5px 0">量规评分</div>
  6590. </div>
  6591. <div class="noCTool">
  6592. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6593. </div>
  6594. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6595. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6596. </div>
  6597. <!-- <div class="check" @click="chapAddTools(5)">
  6598. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6599. <div class="checkDiv" v-else>
  6600. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6601. </div>
  6602. </div> -->
  6603. </div>
  6604. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6605. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6606. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6607. <div style="margin: 5px 0">问卷调查</div>
  6608. </div>
  6609. <div class="noCTool">
  6610. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6611. </div>
  6612. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6613. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6614. </div>
  6615. <!-- <div class="check" @click="chapAddTools(4)">
  6616. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6617. <div class="checkDiv" v-else>
  6618. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6619. </div>
  6620. </div> -->
  6621. </div>
  6622. </div>
  6623. </div>
  6624. <div>
  6625. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6626. v-model="itemTools.toolDetail" />
  6627. </div>
  6628. </div>
  6629. </div>
  6630. </div>
  6631. <span slot="footer" class="dialog-footer">
  6632. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6633. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6634. </span>
  6635. </el-dialog>
  6636. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6637. closePan(15);
  6638. }
  6639. " class="dialog_diy">
  6640. <div>
  6641. <div class="a_add_title" style="
  6642. display: flex;
  6643. flex-direction: column;
  6644. align-items: flex-start;
  6645. justify-content: center;
  6646. ">
  6647. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6648. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6649. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6650. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6651. </div>
  6652. </div>
  6653. <span slot="footer" class="dialog-footer">
  6654. <el-button @click="closePan(15)">取 消</el-button>
  6655. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6656. </span>
  6657. </el-dialog>
  6658. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6659. :before-close="handleClose" class="dialog_diy">
  6660. <div>
  6661. <div class="a_add_title" style="
  6662. display: flex;
  6663. flex-direction: column;
  6664. align-items: flex-start;
  6665. justify-content: center;
  6666. ">
  6667. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6668. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6669. </div>
  6670. </div>
  6671. <span slot="footer" class="dialog-footer">
  6672. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6673. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6674. </span>
  6675. </el-dialog>
  6676. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6677. :before-close="handleClose" class="dialog_diy">
  6678. <div>
  6679. <div class="fileCss" style="padding-top: 20px">
  6680. <div>
  6681. <button class="info_btn" @click="addImg($event)">
  6682. 选择本地文件
  6683. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6684. </button>
  6685. <div class="spanName">选择本地文件</div>
  6686. </div>
  6687. <!-- <div>
  6688. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6689. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6690. <img :src="cover[0].url" alt="" />
  6691. <div class="deletePic" @click="deleteSysPic">
  6692. <img src="../../../assets/icon/delete.png" alt="" />
  6693. </div>
  6694. </div>
  6695. <div class="spanName">选择系统文件</div>
  6696. </div> -->
  6697. <div>
  6698. <el-button @click="(searchImageValue = courseName), resetImage()"
  6699. v-if="isSysPic2 == false">选择网络文件</el-button>
  6700. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6701. <img :src="cover[0].url" alt="" />
  6702. <div class="deletePic" @click="deleteSysPic">
  6703. <img src="../../../assets/icon/delete.png" alt="" />
  6704. </div>
  6705. </div>
  6706. <div class="spanName">选择网络文件</div>
  6707. </div>
  6708. </div>
  6709. <!-- <div class="fileCss">
  6710. </div> -->
  6711. </div>
  6712. <span slot="footer" class="dialog-footer">
  6713. <el-button @click="choosePicVisible = false">取 消</el-button>
  6714. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6715. </span>
  6716. </el-dialog>
  6717. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6718. :before-close="handleClose" class="dialog_diy">
  6719. <div class="cru_selectBox" style="margin: 0">
  6720. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6721. 绘画
  6722. </div>
  6723. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6724. 科技
  6725. </div>
  6726. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6727. 人文
  6728. </div>
  6729. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6730. 艺术
  6731. </div>
  6732. </div>
  6733. <div class="sysPicBox">
  6734. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6735. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6736. </div>
  6737. </div>
  6738. </el-dialog>
  6739. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6740. :before-close="handleClose" class="dialog_diy">
  6741. <div>
  6742. <div class="people_top_right" style="display: flex; align-items: center">
  6743. <div style="position: relative; width: 100%">
  6744. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6745. @keyup.enter.native="resetImage()"></el-input>
  6746. <div class="search_img" @click="resetImage" style="right: 10px">
  6747. <img src="../../../assets/icon/search.png" alt />
  6748. </div>
  6749. </div>
  6750. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6751. </div>
  6752. <div class="sysPicBox" v-loading="imageloading">
  6753. <div class="picNone" v-if="!imageList.length">
  6754. 请输入关键词搜索图片
  6755. </div>
  6756. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6757. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6758. </div>
  6759. </div>
  6760. </div>
  6761. </el-dialog>
  6762. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6763. closePan(41);
  6764. }
  6765. " class="dialog_diy dialog_diy3 fullStyle">
  6766. <div v-if="selectJson" style="height: 100%">
  6767. <div class="select_box1" v-if="selectSteps == 1">
  6768. <div class="select_box1_img">
  6769. <div class="select_box1_title">
  6770. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6771. </div>
  6772. <div class="select_box1_add_img">
  6773. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6774. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6775. <img src="../../../assets/icon/addPoster.png" alt="" />
  6776. </div>
  6777. <div class="isSysPic" v-else>
  6778. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6779. <div class="deletePic" @click="deleteSelectPic">
  6780. <img src="../../../assets/icon/delete.png" alt="" />
  6781. </div>
  6782. </div>
  6783. </div>
  6784. </div>
  6785. <div class="select_box1_select">
  6786. <div class="select_box1_title">
  6787. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  6788. </div>
  6789. <div class="select_box1_select_box">
  6790. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  6791. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  6792. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  6793. <div class="select_box1_select_box_add">
  6794. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  6795. 添加</el-button>
  6796. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  6797. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  6798. </div>
  6799. </div>
  6800. </div>
  6801. </div>
  6802. <div v-if="selectSteps == 2" style="height: 100%">
  6803. <div class="select_box2">
  6804. <div class="select_box2_title">设置每道题目的正确选项</div>
  6805. <div class="select_box2_box">
  6806. <div class="select_box2_img">
  6807. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6808. </div>
  6809. <div class="select_box2_answer">
  6810. <div class="select_answer_title">根据题目选择对应答案</div>
  6811. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  6812. <span>{{ checkIndex + 1 }}、</span>
  6813. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  6814. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  6815. </el-option>
  6816. </el-select>
  6817. </div>
  6818. </div>
  6819. </div>
  6820. </div>
  6821. </div>
  6822. </div>
  6823. <span slot="footer" class="dialog-footer">
  6824. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  6825. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  6826. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  6827. </span>
  6828. </el-dialog>
  6829. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  6830. :before-close="handleClose" class="dialog_diy">
  6831. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  6832. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  6833. <div class="pjCss" style="width: 100%">
  6834. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  6835. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  6836. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  6837. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  6838. <div class="remove" @click="deletRateList(eIndex)"></div>
  6839. <div style="width: 100%; display: flex">
  6840. <span style="min-width: 100px; text-align: right">评星等级:</span>
  6841. <el-rate v-model="eItem.score" disabled></el-rate>
  6842. </div>
  6843. <div class="elist_inptu_text" style="align-items: flex-start">
  6844. <span style="min-width: 100px; text-align: right">描述:</span>
  6845. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  6846. </div>
  6847. </div>
  6848. </div>
  6849. <div class="addToolFun" @click="addRateList()">
  6850. <div class="addToolImg">
  6851. <img src="../../../assets/icon/add.png" alt />
  6852. </div>
  6853. <div>添加</div>
  6854. </div>
  6855. </div>
  6856. </div>
  6857. <span slot="footer" class="dialog-footer">
  6858. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  6859. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  6860. </span>
  6861. </el-dialog>
  6862. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  6863. closePan(47);
  6864. }
  6865. " class="dialog_diy dialog_diy3 fullStyle">
  6866. <div style="height: 100%">
  6867. <div class="sentenBox" style="height: 100%">
  6868. <div class="addSen" @click="addSt">添加题目</div>
  6869. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6870. <div class="sentenTopBox">
  6871. <div class="sentenTop" :index="stIndex + 1">
  6872. <div>题目设置</div>
  6873. <div>
  6874. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6875. </div>
  6876. <div @click="addSen(stIndex)">添加</div>
  6877. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6878. </div>
  6879. </div>
  6880. <div class="cardList">
  6881. <div v-if="st.addSentence.length > 0" class="cardBox">
  6882. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6883. @click="setRightAnswer(s, stIndex, sIndex)">
  6884. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6885. <div>{{ s }}</div>
  6886. </el-tooltip>
  6887. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6888. <img src="../../../assets/icon/delete.png" alt="" />
  6889. </div>
  6890. </div>
  6891. </div>
  6892. <div class="card">
  6893. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6894. </div>
  6895. </div>
  6896. <div class="rightCardBox">
  6897. <div>正确顺序</div>
  6898. <div class="rightCardList">
  6899. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6900. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6901. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6902. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6903. <div>{{ r }}</div>
  6904. </el-tooltip>
  6905. </div>
  6906. <div>{{ rIndex + 1 }}</div>
  6907. </div>
  6908. </div>
  6909. <div class="card" v-if="st.rightAnswer.length == 0">
  6910. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6911. </div>
  6912. <div class="card" v-else>
  6913. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6914. </div>
  6915. </div>
  6916. </div>
  6917. </div>
  6918. </div>
  6919. </div>
  6920. <span slot="footer" class="dialog-footer">
  6921. <el-button @click="closePan(47)">取 消</el-button>
  6922. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6923. </span>
  6924. </el-dialog>
  6925. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6926. :before-close="handleClose" class="dialog_diy">
  6927. <el-form>
  6928. <!-- <el-form-item label="文本标题">
  6929. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6930. </el-form-item> -->
  6931. <div>表格内容</div>
  6932. <Table v-model="tableJson.text" @change="change"></Table>
  6933. </el-form>
  6934. <span slot="footer" class="dialog-footer">
  6935. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6936. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6937. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6938. </span>
  6939. </el-dialog>
  6940. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6941. :before-close="handleClose" class="dialog_diy">
  6942. <el-form>
  6943. <!-- <el-form-item label="文本标题">
  6944. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6945. </el-form-item> -->
  6946. <div>文档内容</div>
  6947. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6948. </el-form>
  6949. <span slot="footer" class="dialog-footer">
  6950. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6951. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6952. </span>
  6953. </el-dialog>
  6954. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6955. :before-close="handleClose" class="dialog_diy">
  6956. <div style="
  6957. width: 100%;
  6958. display: flex;
  6959. flex-direction: row;
  6960. flex-wrap: nowrap;
  6961. align-items: center;
  6962. justify-content: center;
  6963. ">
  6964. <div>班级:</div>
  6965. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6966. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6967. </el-option>
  6968. </el-select>
  6969. </div>
  6970. <span slot="footer" class="dialog-footer">
  6971. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6972. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6973. </span>
  6974. </el-dialog>
  6975. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6976. :before-close="handleClose" class="dialog_diy">
  6977. <div style="
  6978. width: 100%;
  6979. display: flex;
  6980. flex-direction: row;
  6981. flex-wrap: nowrap;
  6982. align-items: center;
  6983. justify-content: center;
  6984. ">
  6985. <div>随机码:</div>
  6986. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6987. </div>
  6988. <span slot="footer" class="dialog-footer">
  6989. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6990. <el-button type="primary" @click="addInvite">确定</el-button>
  6991. </span>
  6992. </el-dialog>
  6993. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6994. :before-close="handleClose" class="dialog_diy">
  6995. <div>
  6996. <div style="margin-bottom: 20px; color: #999">
  6997. 提示:点击“+”或“-”修改倒计时时长。
  6998. </div>
  6999. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  7000. </div>
  7001. <span slot="footer" class="dialog-footer">
  7002. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  7003. <el-button type="primary" @click="addPreTime">确定</el-button>
  7004. </span>
  7005. </el-dialog>
  7006. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  7007. :before-close="handleClose" class="dialog_diy">
  7008. <div>
  7009. <div style="
  7010. width: 100%;
  7011. display: flex;
  7012. flex-direction: row;
  7013. flex-wrap: nowrap;
  7014. align-content: center;
  7015. align-items: center;
  7016. justify-content: space-between;
  7017. ">
  7018. <div style="
  7019. display: flex;
  7020. flex-flow: row nowrap;
  7021. align-items: flex-start;
  7022. width: 100%;
  7023. flex-direction: column;
  7024. flex-wrap: nowrap;
  7025. position: relative;
  7026. ">
  7027. <div class="e_box">
  7028. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  7029. <div class="e_card_picture">
  7030. <img src="../../../assets/e_picture.png" />
  7031. </div>
  7032. <div class="e_card_name">
  7033. <span>{{ item.title }}</span>
  7034. </div>
  7035. <div class="e_card_btn">
  7036. <span @click="checkEva(item.id, 2)">导入</span>
  7037. </div>
  7038. </div> -->
  7039. <!-- <div class="addEva" @click="openT">
  7040. <img src="../../../assets/icon/addEva.png" alt="" />
  7041. </div> -->
  7042. <div style="
  7043. display: flex;
  7044. justify-content: flex-end;
  7045. margin-bottom: 10px;
  7046. ">
  7047. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  7048. </div>
  7049. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  7050. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  7051. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  7052. </el-table-column>
  7053. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  7054. </el-table-column>
  7055. <el-table-column label="操作" width="250px">
  7056. <template slot-scope="scope">
  7057. <div class="btnBox">
  7058. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  7059. </div>
  7060. </template>
  7061. </el-table-column>
  7062. </el-table>
  7063. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  7064. 暂无数据
  7065. </div>
  7066. </div>
  7067. </div>
  7068. </div>
  7069. </div>
  7070. <span slot="footer" class="dialog-footer">
  7071. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  7072. </span>
  7073. </el-dialog>
  7074. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  7075. :before-close="handleClose" class="dialog_diy">
  7076. <div class="groupBox">
  7077. <div v-if="groupJson.group" class="groupContent">
  7078. <div class="groupTitle">请设置小组数量及名称</div>
  7079. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  7080. <span class="groupn">第{{ index + 1 }}组名称:</span>
  7081. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  7082. <div class="groupBtn">
  7083. <el-button type="primary" size="small" @click="addGroup(index)"
  7084. v-if="groupJson.group.length - 1 == index">
  7085. 添加</el-button>
  7086. <el-button type="primary" size="small" @click="deleteGroup(index)"
  7087. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  7088. </div>
  7089. </div>
  7090. </div>
  7091. <div class="groupContent">
  7092. <div class="groupTitle">请设置每组人数</div>
  7093. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  7094. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  7095. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  7096. @change="numberPan"></el-input>
  7097. </div>
  7098. </div>
  7099. <span slot="footer" class="dialog-footer">
  7100. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  7101. <el-button type="primary" @click="addGroupJson">确定</el-button>
  7102. </span>
  7103. </el-dialog>
  7104. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  7105. :before-close="handleClose" class="dialog_diy">
  7106. <div style="
  7107. width: 100%;
  7108. display: flex;
  7109. flex-direction: row;
  7110. flex-wrap: nowrap;
  7111. align-items: center;
  7112. justify-content: center;
  7113. ">
  7114. <div style="min-width: fit-content">文件名称:</div>
  7115. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  7116. </div>
  7117. <span slot="footer" class="dialog-footer">
  7118. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  7119. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  7120. </span>
  7121. </el-dialog>
  7122. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  7123. closePan(69);
  7124. }
  7125. " class="dialog_diy fullStyle fullStyle1">
  7126. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  7127. <span slot="footer" class="dialog-footer">
  7128. <el-button @click="englishDialogVisible = false">取 消</el-button>
  7129. <el-button type="primary" @click="addEnglish">确 定</el-button>
  7130. </span>
  7131. </el-dialog>
  7132. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  7133. :before-close="handleClose" class="dialog_diy">
  7134. <div class="template_box">
  7135. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  7136. :class="{ wordTeacherA: ctJson.id == aa.id }">
  7137. <div class="wordPic">
  7138. <img src="../../../assets/icon/new/course_template.png" alt />
  7139. </div>
  7140. <el-tooltip effect="dark" :content="aa.title" placement="top">
  7141. <div style="
  7142. margin-top: 10px;
  7143. line-height: 19px;
  7144. overflow: hidden;
  7145. text-overflow: ellipsis;
  7146. white-space: nowrap;
  7147. padding: 0 10px;
  7148. box-sizing: border-box;
  7149. width: 100%;
  7150. ">
  7151. {{ aa.title }}
  7152. </div>
  7153. </el-tooltip>
  7154. </div>
  7155. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  7156. :class="{ wordTeacherA: ctJson.id == 1 }">
  7157. <div class="wordPic">
  7158. <img src="../../../assets/icon/new/course_template.png" alt />
  7159. </div>
  7160. <div style="
  7161. margin-top: 10px;
  7162. line-height: 19px;
  7163. overflow: hidden;
  7164. text-overflow: ellipsis;
  7165. white-space: nowrap;
  7166. padding: 0 20px;
  7167. ">
  7168. 简易模板
  7169. </div>
  7170. </div>
  7171. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  7172. :class="{ wordTeacherA: ctJson.id == 2 }">
  7173. <div class="wordPic">
  7174. <img src="../../../assets/icon/new/course_template.png" alt />
  7175. </div>
  7176. <div style="
  7177. margin-top: 10px;
  7178. line-height: 19px;
  7179. overflow: hidden;
  7180. text-overflow: ellipsis;
  7181. white-space: nowrap;
  7182. padding: 0 20px;
  7183. ">
  7184. 智能粘贴模式
  7185. </div>
  7186. </div>
  7187. </div>
  7188. <span slot="footer" class="dialog-footer">
  7189. <el-button @click="templateDialog = false">取 消</el-button>
  7190. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  7191. </span>
  7192. </el-dialog>
  7193. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  7194. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  7195. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  7196. <div class="change_stageBox">
  7197. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  7198. <div class="nt_taskBox">
  7199. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  7200. <div class="nt_taskName">
  7201. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7202. <span>{{ t.dyName }}</span>
  7203. </el-tooltip>
  7204. </div>
  7205. </div>
  7206. <div class="moveBtn" v-if="unitJson3.length > 1">
  7207. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7208. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7209. </div>
  7210. </div>
  7211. </div>
  7212. <span slot="footer" class="dialog-footer">
  7213. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  7214. <el-button type="primary" @click="updateChange">确定</el-button>
  7215. </span>
  7216. </el-dialog>
  7217. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7218. :before-close="handleClose" class="dialog_diy">
  7219. <div class="addTypeChoose" style="justify-content: center">
  7220. <div style="min-width: 100px">模板名称:</div>
  7221. <el-input v-model="templateName" style="width: 200px"></el-input>
  7222. </div>
  7223. <div class="addTypeBox">
  7224. <div class="addTypeChoose">
  7225. <div style="min-width: 100px">选择一级分类:</div>
  7226. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  7227. style="width: 200px">
  7228. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7229. </el-option>
  7230. </el-select>
  7231. </div>
  7232. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7233. <div style="min-width: 100px">选择二级分类:</div>
  7234. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  7235. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7236. </el-option>
  7237. </el-select>
  7238. </div>
  7239. </div>
  7240. <span slot="footer" class="dialog-footer">
  7241. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  7242. <el-button @click="close()">关 闭</el-button>
  7243. </span>
  7244. </el-dialog>
  7245. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7246. </evaBox>
  7247. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7248. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7249. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3" @aiConfirm="aiConfirm" :clickType="clickType">
  7250. </aiDialog>
  7251. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7252. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7253. <div class="pptBox" :class="{'ppClass': pptBoxDialog && panPptCount() > 0 && pptCount.length}">
  7254. <div class="box" v-show="pptBoxDialog">
  7255. <aiCreateDialog
  7256. v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson"
  7257. :key="index"
  7258. :languageSetting="languageSetting"
  7259. :dialogVisibleAiCreate="dialogVisibleAiCreate2.includes(index)"
  7260. :courseName="courseName"
  7261. @createAiPpt="createAiPpt"
  7262. @closeAiPpt="closeAiPpt"
  7263. :infoData="infoData"
  7264. :courseTypeId="courseTypeId"
  7265. :CourseTypeJson="CourseTypeJson"
  7266. :courseState="courseState"
  7267. :lineCount="index"
  7268. :unitJson="unitJson"
  7269. :ref="'ppt'+index"
  7270. v-show="dialogVisibleAiCreate2.includes(index) && pptCount.includes(index)"
  7271. ></aiCreateDialog>
  7272. </div>
  7273. <span v-show="panPptCount() > 0 && pptCount.length" class="r_pub_button_edit" :style="{marginTop: panPptCount() > 0 ? '10px' : '0'}" style="justify-content: flex-start;" @click="pptBoxDialog = !pptBoxDialog">{{ pptBoxDialog ? "收缩" : "展开" }}</span>
  7274. </div>
  7275. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  7276. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7277. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  7278. </div>
  7279. </template>
  7280. <script>
  7281. import "../../../common/aws-sdk-2.235.1.min.js";
  7282. import { tools as toolsData } from "../../../common/tools.js";
  7283. // import "../../../common/aws-sdk-2.99.0.min.js";
  7284. import $ from "jquery";
  7285. import EditorBar from "../../../components/tools/wangEnduit";
  7286. import Table from "../../../components/tools/table";
  7287. import Mind from "../../tools/jsmind2";
  7288. import Time from "../../tools/time.vue";
  7289. import Sunburst from "../../tools/sunburst";
  7290. import SeeBoard from "../../tools/seeBoard";
  7291. import weilaiData from "../components/weilai.js";
  7292. import sourceDialog from "../teacherSource/dialog.vue";
  7293. import interVideo from "../interVideo/index.vue";
  7294. import englishRight from "../components/englishRight.vue";
  7295. import evaBox from "../evaBox/index.vue";
  7296. import EnglishVoice from "../EnglishVoice/index.vue";
  7297. import aiBox from './aiBox.vue'
  7298. import aiBoxRight from './aiBoxRight.vue'
  7299. import aiBoxCourseDetail from './aiBoxCourseDetail.vue'
  7300. import recordV from './record.vue'
  7301. import aiDialog from './aiDialog'
  7302. import aiTips from './aiTips.vue'
  7303. import tipsDialog from './tipsDialog.vue'
  7304. import { v4 as uuidv4 } from "uuid";
  7305. import MarkdownIt from "markdown-it";
  7306. import aiCreateDialog from './aiCreateDialog.vue'
  7307. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7308. import wpdf from "../test/file/wPdf2.vue";
  7309. import wOffice from "../test/file/wOffice.vue";
  7310. import htmlDocx from "html-docx-js/dist/html-docx";
  7311. import TurndownService from 'turndown';
  7312. import JSZip from "jszip";
  7313. import evaList from "./evaList.vue";
  7314. import MindTask from "./jsmind2";
  7315. import ConvertApi from 'convertapi-js'
  7316. let convertApi = ConvertApi.auth('secret_U1EO5rhgMCnoBnBT')
  7317. var OpenCC = require("opencc-js");
  7318. let converter = OpenCC.Converter({
  7319. from:'hk',
  7320. to:'cn'
  7321. })
  7322. let converter2 = OpenCC.Converter({
  7323. from:'cn',
  7324. to:'hk'
  7325. })
  7326. const getFile = (url) => {
  7327. return new Promise((resolve, reject) => {
  7328. var credentials = {
  7329. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7330. secretAccessKey: "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",
  7331. }; //秘钥形式的登录上传
  7332. window.AWS.config.update(credentials);
  7333. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7334. let url2 = url;
  7335. let _url2 = "";
  7336. if (
  7337. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  7338. ) {
  7339. _url2 = url2.split(
  7340. "https://view.officeapps.live.com/op/view.aspx?src="
  7341. )[1];
  7342. } else {
  7343. _url2 = url2;
  7344. }
  7345. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  7346. let name = decodeURIComponent(_url2.split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1])
  7347. var params = {
  7348. Bucket: "ccrb",
  7349. Key: name
  7350. };
  7351. s3.getObject(params, function (err, data) {
  7352. if (err) {
  7353. console.log(err, err.stack)
  7354. resolve({ data: 1 });
  7355. }else {
  7356. resolve({ data: data.Body });
  7357. console.log(data);
  7358. } // sxuccessful response
  7359. });
  7360. });
  7361. };
  7362. export default {
  7363. components: {
  7364. EditorBar,
  7365. Mind,
  7366. Time,
  7367. Sunburst,
  7368. SeeBoard,
  7369. Table,
  7370. sourceDialog,
  7371. interVideo,
  7372. englishRight,
  7373. evaBox,
  7374. EnglishVoice,
  7375. aiBox,
  7376. aiBoxRight,
  7377. aiBoxCourseDetail,
  7378. aiDialog,
  7379. aiTips,
  7380. tipsDialog,
  7381. aiCreateDialog,
  7382. aiCreateVideoDialog,
  7383. wpdf,
  7384. wOffice,
  7385. evaList,
  7386. MindTask,
  7387. recordV
  7388. },
  7389. data() {
  7390. return {
  7391. checkAll: false,
  7392. checkAll2: false,
  7393. chooseType: 1,
  7394. checkedCities: [],
  7395. isIndeterminate: true,
  7396. isIndeterminate2: true,
  7397. isSysPic: false,
  7398. isSysPic2: false,
  7399. steps: 1,
  7400. stepsNav: 1,
  7401. nbOrder: 0,
  7402. courseId: "",
  7403. chapToolsType: 0,
  7404. chapTools: [
  7405. {
  7406. tools: [],
  7407. toolDetail: "",
  7408. },
  7409. ],
  7410. line: "",
  7411. lineTitle: "",
  7412. sysPic: [],
  7413. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7414. sentenceList2: [],
  7415. isPushTitleList: [],
  7416. lineCount: 0,
  7417. lineType: 0,
  7418. chapCount: 0,
  7419. courseName: "",
  7420. isTeacherSee: false,
  7421. courseText: "",
  7422. textLoading: false,
  7423. ttextLoading: false,
  7424. courseText2: "",
  7425. preTime: 0,
  7426. formLabelWidth: "100px",
  7427. choosePicVisible: false,
  7428. sysPicVisible: false,
  7429. sysPicVisible2: false,
  7430. uploadLoading1: false,
  7431. noneBtnImg: false,
  7432. updateBoolean2: false,
  7433. unitIndex: 0,
  7434. taskCount: 0,
  7435. dialogVisible: false,
  7436. dialogVisible1: false,
  7437. dialogVisible2: false,
  7438. dialogVisible3: false,
  7439. dialogVisible4: false,
  7440. dialogVisible5: false,
  7441. dialogVisible6: false,
  7442. dialogVisible7: false,
  7443. dialogVisible8: false,
  7444. dialogVisible9: false,
  7445. dialogVisibleClass: false,
  7446. dialogVisibleMember: false,
  7447. dialogVisibleMp3: false,
  7448. dialogVisibleSelect: false,
  7449. dialogVisibleSentence: false,
  7450. dialogVisibleRate: false,
  7451. dialogVisibleChoice: false,
  7452. dialogVisiblemb: false,
  7453. dialogVisibleInvite: false,
  7454. dialogVisibleSource: false,
  7455. dialogVisibleVideo: false,
  7456. dialogVisibleStageChange: false,
  7457. dialogVisibleupdataVideoT: false,
  7458. englishDialogVisible: false,
  7459. templateDialog: false,
  7460. ctJson: {},
  7461. isClickColor: 1,
  7462. toolIndexType: "",
  7463. publicTool: 0,
  7464. searchPeople: "",
  7465. searchTN: "",
  7466. collid: '',
  7467. CollLoading: false,
  7468. userid: this.$route.query.userid,
  7469. oid: this.$route.query.oid,
  7470. org: this.$route.query.org,
  7471. role: this.$route.query.role,
  7472. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7473. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7474. dialogVisibleTable: false,
  7475. dialogVisibleWord: false,
  7476. tableJson: { text: "" },
  7477. wordJson: { text: "" },
  7478. dialogVisibleMoreUpload: false,
  7479. dialogVisiblePreTime: false,
  7480. uploadJson: [],
  7481. classJuri: [],
  7482. gradeList: [],
  7483. cover: [], //课程封面
  7484. myWord: [],
  7485. evaJuri: [],
  7486. evalua: "",
  7487. targetArray: [],
  7488. eTitle: "",
  7489. eJson: {},
  7490. fid: "", //一级
  7491. sid: "", //二级
  7492. tid: "", //二级
  7493. typeMode: 3,
  7494. eJSONNum: 0,
  7495. data: {
  7496. meta: {
  7497. name: "example",
  7498. author: "dd@163.com",
  7499. version: "0.2",
  7500. },
  7501. format: "node_array",
  7502. data: [{ id: "root", isroot: true, topic: "" }],
  7503. },
  7504. askJson: {
  7505. askCount: 1,
  7506. askTitle: "",
  7507. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7508. },
  7509. askJson2: {},
  7510. testJson: {},
  7511. testJson2: {},
  7512. selectJson: {},
  7513. selectJson2: {},
  7514. rateJson: [],
  7515. unitJson2: [],
  7516. unitJson3: [],
  7517. unitJson: [
  7518. {
  7519. dyName: "", //单元标题
  7520. chapterInfo: [
  7521. {
  7522. isread: false,
  7523. chapterid: this.guid(),
  7524. title: "",
  7525. courseName: "",
  7526. taskJson: [
  7527. {
  7528. task: "",
  7529. taskDetail: "",
  7530. chapterData: [],
  7531. toolText: "",
  7532. toolChoose: [
  7533. {
  7534. tool: [],
  7535. toolDetail: "",
  7536. toolType: 0,
  7537. askCount: 1,
  7538. askTitle: "",
  7539. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7540. },
  7541. ],
  7542. isShowTools: false,
  7543. askCount: 1,
  7544. isFold: 1,
  7545. askTitle: "",
  7546. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7547. checkJson: [{ checkCount: [], checkPerent: [] }],
  7548. homeworkList: [],
  7549. },
  7550. ],
  7551. itemCount: 1,
  7552. fileList1: [],
  7553. video: [],
  7554. testData: [],
  7555. pData: [],
  7556. templateArray: [],
  7557. },
  7558. ],
  7559. },
  7560. ],
  7561. templateArray: [],
  7562. studentJuri: [],
  7563. teacherJuri: [],
  7564. CollaborativeTeaList: [],
  7565. checkboxList: [],
  7566. checkboxList2: [],
  7567. checkboxList3: [],
  7568. classSearch: "",
  7569. gradeId: "",
  7570. number: "",
  7571. tTitle: "",
  7572. tdetail: "",
  7573. templateC: {},
  7574. AttText: {},
  7575. AttTextType: 0,
  7576. AttTextIndex: 0,
  7577. cTemplate: "",
  7578. CourseType: [],
  7579. CourseType1: [],
  7580. CourseType2: [],
  7581. CourseTypeJson: {},
  7582. CourseTypeJson1: {},
  7583. courseTypeId: [],
  7584. courseTypeId1: [],
  7585. courseTypeSon: [],
  7586. clearArray: [],
  7587. pTypeCheck: [],
  7588. pTypeCheckName: [],
  7589. loading: false,
  7590. toolType: 0,
  7591. inputShow: true,
  7592. inputShow2: true,
  7593. toolIndex: 0,
  7594. cidType: 0,
  7595. answerQ: "",
  7596. answerQ2: "",
  7597. grade: [],
  7598. grade2: [],
  7599. courseUserid: "",
  7600. timer: null,
  7601. timer2: null,
  7602. pasteTimer: null,
  7603. checkId: "",
  7604. isDelete: 1,
  7605. addindex: 0,
  7606. selectSteps: 1,
  7607. groupJson: {},
  7608. dialogVisibleGroup: false,
  7609. rightBoxHeight: 0,
  7610. ManAarray: [],
  7611. checkBoolean: false,
  7612. inviteCode: [],
  7613. inviteId: "",
  7614. icode: "",
  7615. easyArray: [2, 4],
  7616. sourceData: {},
  7617. updateSourcePan: false,
  7618. videoJson: {},
  7619. isBtnDisplay: false,
  7620. isStepDisplay: false,
  7621. isPasteStage: false,
  7622. isPasteTask: false,
  7623. isPasteChoice: false,
  7624. imageList: [],
  7625. imageloading: false,
  7626. imageloading2: false,
  7627. searchImageValue: "",
  7628. ppage: 1,
  7629. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7630. oldIndex: 0,
  7631. dragType: "",
  7632. oldUnitIndex: 0,
  7633. oldData: null,
  7634. newIndex: "",
  7635. englishList: {},
  7636. typeIndex: "",
  7637. courseState: 5,
  7638. taskJSONa: [
  7639. {
  7640. task: "",
  7641. taskDetail: "",
  7642. chapterData: [],
  7643. toolText: "",
  7644. toolChoose: [
  7645. {
  7646. tool: [],
  7647. toolDetail: "",
  7648. toolType: 0,
  7649. askCount: 1,
  7650. askTitle: "",
  7651. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7652. },
  7653. ],
  7654. isShowTools: false,
  7655. askCount: 1,
  7656. isFold: 1,
  7657. askTitle: "",
  7658. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7659. checkJson: [{ checkCount: [], checkPerent: [] }],
  7660. homeworkList: [],
  7661. },
  7662. ],
  7663. checkUnitIndex: 0,
  7664. isdrag: "",
  7665. evaIndex: "",
  7666. evatIndex: "",
  7667. evaBoxDialog: false,
  7668. EnglishVoiceDialog: false,
  7669. englishVoiceJson: {},
  7670. cetIndex: "",
  7671. cettIndex: "",
  7672. cetBoxDialog: false,
  7673. templateName: "",
  7674. setTypeJson: {
  7675. one: "",
  7676. two: "",
  7677. },
  7678. twoJson: [],
  7679. oneJson: [],
  7680. updateKey: 1,
  7681. isOutline: false,
  7682. isOutline2: false,
  7683. infoData: [],
  7684. infoproVisible: false,
  7685. infoisFinishSize: 0,
  7686. infoisAllSize: 0,
  7687. infoprogress: 0,
  7688. taskDetailLoading: [],
  7689. ttaskDetailLoading: [],
  7690. taskDetailLoading2: [],
  7691. ttaskDetailLoading2: [],
  7692. taskDetailLoading3: [],
  7693. ttaskDetailLoading3: [],
  7694. taskDetailLoading4: [],
  7695. taskDetailLoading5: [],
  7696. ttaskDetailLoading5: [],
  7697. dArray: [],
  7698. dialogVisibleAiD: false,
  7699. aitype: "",
  7700. aiJson: {
  7701. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7702. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7703. "aiTask": "请根据<教学任务教案>。",
  7704. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7705. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7706. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7707. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7708. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7709. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7710. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7711. },
  7712. aiText: "",
  7713. aiText2: "",
  7714. aiText3: "",
  7715. aiCallBack: "",
  7716. aiIndex: "",
  7717. clickType: 1,
  7718. promptShow: false,
  7719. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7720. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7721. dialogVisibleTips: false,
  7722. tipsJson: {},
  7723. cpote:{
  7724. cpote1: '',
  7725. cpote2: '',
  7726. cpote3: '',
  7727. cpote4: '',
  7728. },
  7729. cpoteLoading:{
  7730. cpote1: false,
  7731. cpote2: false,
  7732. cpote3: false,
  7733. cpote4: false,
  7734. },
  7735. cpotetLoading:{
  7736. cpote1: false,
  7737. cpote2: false,
  7738. cpote3: false,
  7739. cpote4: false,
  7740. },
  7741. cpoteType: 0,
  7742. dialogVisibleAiCreate: false,
  7743. dialogVisibleAiCreate2: [],
  7744. pptBoxDialog: true,
  7745. pptCount: [],
  7746. dialogVisibleAiCreateVideo: false,
  7747. teacherText: [],
  7748. isFileSearch: true,
  7749. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  7750. templatePan: ['0e7966d6-1e49-11ef-bee5-005056b86db5','60d153e3-1e49-11ef-bee5-005056b86db5','7f3e28b7-1e66-11ef-bee5-005056b86db5','9dd4bb76-1e48-11ef-bee5-005056b86db5','ab317f23-1e66-11ef-bee5-005056b86db5'],
  7751. courseJie:1,
  7752. courseTime:45,
  7753. allTextArray: [],
  7754. dialogVisiblePdf: false,
  7755. dialogVisibleOffice: false,
  7756. wurl: "",
  7757. choiceLoading: false,
  7758. teacherInfoData: [],
  7759. teacherinfoproVisible: false,
  7760. teacherinfoisFinishSize: 0,
  7761. teacherinfoisAllSize: 0,
  7762. teacherinfoprogress: 0,
  7763. teacherCourseText: "",
  7764. teacherTextLoading: false,
  7765. tteacherTextLoading: false,
  7766. targetCourseText: "",
  7767. targetTextLoading: false,
  7768. ttargetTextLoading: false,
  7769. cankaoInfoData: [],
  7770. fileSLoading: false,
  7771. infoData2: [],
  7772. isuseT: false,
  7773. mode: 1,
  7774. targetCourseText2: "",
  7775. targetTextLoading2: false,
  7776. ttargetTextLoading2: false,
  7777. courseTextBool: false,
  7778. teacherCourseTextB: true,
  7779. targetCourseTextB: true,
  7780. courseTextB: true,
  7781. targetCourseText2B: true,
  7782. // yiKeTemplateArray:['cf5722a4-401b-11ef-b873-005056b86db5','cf5722a4-401b-11ef-b873-005056b86dc4','cf5722a4-401b-11ef-b873-005056b86dc3','cf5722a4-401b-11ef-b873-005056b86dc5','9dd4bb76-1e48-11ef-bee5-005056b86dc4'],
  7783. yiKeTemplateArray:[],
  7784. taskLoading: [],
  7785. ruleLoading: [],
  7786. mubiaoInfoData: [],
  7787. mubiaoinfoproVisible: false,
  7788. mubiaoinfoisFinishSize: 0,
  7789. mubiaoinfoisAllSize: 0,
  7790. mubiaoinfoprogress: 0,
  7791. xuanzeInfoData: [],
  7792. xuanzeinfoproVisible: false,
  7793. xuanzeinfoisFinishSize: 0,
  7794. xuanzeinfoisAllSize: 0,
  7795. xuanzeinfoprogress: 0,
  7796. pingjiaInfoData: [],
  7797. pingjiainfoproVisible: [],
  7798. pingjiainfoisFinishSize: [],
  7799. pingjiainfoisAllSize: [],
  7800. pingjiainfoprogress: [],
  7801. taskGLoading: [],
  7802. isOutlineCancelToken: null,
  7803. isFileCancelToken: null,
  7804. isTargetCancelToken1: null,
  7805. isTargetCancelToken2: null,
  7806. isTextCancelToken: null,
  7807. isTeacherTextCancelToken: null,
  7808. isTeacherTaskCancelToken: null,
  7809. isOutlineTaskCancelToken: [],
  7810. isTeacherTaskCancelToken2: [],
  7811. isTeacherTaskCancelSource: [],
  7812. isTextCancelSource: null,
  7813. isOutlineTaskCancelSource: [],
  7814. isTeacherTextCancelSource: null,
  7815. isTargetCancelSource1: null,
  7816. isTargetCancelSource2: null,
  7817. fileidArray: [],
  7818. interPan: true,
  7819. interFlash: true,
  7820. agentid: "",
  7821. interSetting: false,
  7822. chatid: "",
  7823. languageSetting: 0, //0中文 1繁体 2英文
  7824. isQuote: {},
  7825. knowFileArray: [],
  7826. knowInfoData: [],
  7827. knowinfoproVisible: false,
  7828. knowinfoisFinishSize: 0,
  7829. knowinfoisAllSize: 0,
  7830. knowinfoprogress: 0,
  7831. knowFileids: [],
  7832. searchFileName: "",
  7833. knowInfoDataLoading: false,
  7834. isfindMatchingContents: null,
  7835. findMatchingContentsPage: 1,
  7836. findMatchingContentsFinish: false,
  7837. knowInfoData2: [],
  7838. knowinfoproVisible2: false,
  7839. knowinfoisFinishSize2: 0,
  7840. knowinfoisAllSize2: 0,
  7841. knowinfoprogress2: 0,
  7842. knowFileids2: [],
  7843. knowInfoData3: [],
  7844. knowFileids3: [],
  7845. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  7846. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41],
  7847. taskAnLoading: [],
  7848. taskAnCancelToken: [],
  7849. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  7850. taskCancelToken1: [],
  7851. taskCancelToken2: [],
  7852. isDisplay: true,
  7853. isDialog: 0,
  7854. recordVideoText: "",
  7855. recordAudioUrl: "",
  7856. r_agentid: "",
  7857. course_info: "",
  7858. stepShow: true,
  7859. anLoading: [],
  7860. };
  7861. },
  7862. directives: {
  7863. autoHeight: {
  7864. update(el, binding) {
  7865. const { value } = binding;
  7866. if (value && typeof value === "number") {
  7867. el.style.height = `${value}px`;
  7868. } else {
  7869. el.style.height = "auto";
  7870. }
  7871. },
  7872. componentUpdated(el) {
  7873. el.style.height = `${el.scrollHeight + 25}px`;
  7874. },
  7875. },
  7876. },
  7877. computed: {
  7878. // rightBoxHeight: function () {
  7879. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  7880. // },
  7881. offsetLetfPx: function () {
  7882. //addnum可以直接在模板语法里面用,相当于data内的值
  7883. return (
  7884. $(".cru_select")[this.unitIndex] &&
  7885. $(".cru_select")[this.unitIndex].offsetLeft + 5
  7886. );
  7887. },
  7888. getMan2() {
  7889. return function (people) {
  7890. let _people = people;
  7891. let _people2 = "";
  7892. if (this.ManAarray.length) {
  7893. for (var i = 0; i < this.ManAarray.length; i++) {
  7894. if (this.ManAarray[i].userid == people) {
  7895. _people2 = this.ManAarray[i].name;
  7896. break;
  7897. }
  7898. }
  7899. }
  7900. if (people == this.courseUserid) {
  7901. return "";
  7902. }
  7903. return this.ManAarray.length ? _people2 : "";
  7904. };
  7905. },
  7906. getListMan2() {
  7907. return function (list) {
  7908. let _people2 = [];
  7909. if (this.ManAarray.length) {
  7910. for (var j = 0; j < list.length; j++) {
  7911. let people = list[j];
  7912. for (var i = 0; i < this.ManAarray.length; i++) {
  7913. if (
  7914. this.ManAarray[i].userid == people &&
  7915. people != this.courseUserid
  7916. ) {
  7917. _people2.push(this.ManAarray[i].name);
  7918. break;
  7919. }
  7920. }
  7921. }
  7922. }
  7923. return this.ManAarray.length ? _people2.join("、") : "";
  7924. };
  7925. },
  7926. isInvite() {
  7927. return function (cid) {
  7928. let array = [];
  7929. for (var i = 0; i < this.inviteCode.length; i++) {
  7930. array.push(this.inviteCode[i].cid);
  7931. }
  7932. return array.indexOf(cid) != -1;
  7933. };
  7934. },
  7935. getInviteCodeC() {
  7936. return function (cid) {
  7937. let array = [];
  7938. for (var i = 0; i < this.inviteCode.length; i++) {
  7939. array.push(this.inviteCode[i].cid);
  7940. }
  7941. return this.inviteCode[array.indexOf(cid)].ic;
  7942. };
  7943. },
  7944. getClassC() {
  7945. return function (c) {
  7946. let _c2 = "";
  7947. if (this.grade.length) {
  7948. for (var i = 0; i < this.grade.length; i++) {
  7949. if (this.grade[i].id == c) {
  7950. _c2 = this.grade[i].name;
  7951. break;
  7952. }
  7953. }
  7954. }
  7955. return this.grade.length ? _c2 : "";
  7956. };
  7957. },
  7958. getListClassC() {
  7959. return function (list) {
  7960. let _c2 = [];
  7961. if (this.grade.length) {
  7962. for (var j = 0; j < list.length; j++) {
  7963. let c = list[j];
  7964. for (var i = 0; i < this.grade.length; i++) {
  7965. if (this.grade[i].id == c) {
  7966. _c2.push(this.grade[i].name);
  7967. break;
  7968. }
  7969. }
  7970. }
  7971. }
  7972. return this.grade.length ? _c2.join("、") : "";
  7973. };
  7974. },
  7975. MarkdownT() {
  7976. return function (c) {
  7977. let md = new MarkdownIt();
  7978. return c
  7979. ? md.render(c) : "";
  7980. };
  7981. },
  7982. panOutline(){
  7983. return function () {
  7984. let count = 0;
  7985. for(var i = 0; i < this.unitJson.length; i++){
  7986. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7987. for(var j = 0; j < _task.length; j++){
  7988. if(_task[j].taskDetail2){
  7989. count++
  7990. }
  7991. }
  7992. }
  7993. return count;
  7994. };
  7995. },
  7996. panTeacher(){
  7997. return function () {
  7998. let count = 0;
  7999. for(var i = 0; i < this.unitJson.length; i++){
  8000. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8001. for(var j = 0; j < _task.length; j++){
  8002. if(_task[j].taskDetail3){
  8003. count++
  8004. }
  8005. }
  8006. }
  8007. return count;
  8008. };
  8009. },
  8010. panTask(){
  8011. return function () {
  8012. let count = 0;
  8013. for(var i = 0; i < this.unitJson.length; i++){
  8014. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8015. for(var j = 0; j < _task.length; j++){
  8016. if(_task[j].taskDetail){
  8017. count++
  8018. }
  8019. }
  8020. }
  8021. return count;
  8022. };
  8023. },
  8024. panElist(){
  8025. return function (array) {
  8026. let count = 0;
  8027. for(var i = 0; i < array.toolChoose.length; i++){
  8028. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  8029. count++
  8030. }
  8031. }
  8032. return count;
  8033. };
  8034. },
  8035. panTaskElist(){
  8036. return function () {
  8037. let count = 0;
  8038. for(var i = 0; i < this.unitJson.length; i++){
  8039. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8040. for(var j = 0; j < _task.length; j++){
  8041. if(_task[j].eList && _task[j].eList.length){
  8042. count++
  8043. }
  8044. }
  8045. }
  8046. return count;
  8047. };
  8048. },
  8049. panEvaCont(){
  8050. return function () {
  8051. let count = 0;
  8052. for(var i = 0; i < this.unitJson.length; i++){
  8053. let _task = this.unitJson[i].chapterInfo[0].taskJson
  8054. for(var j = 0; j < _task.length; j++){
  8055. let tool = _task[j].toolChoose
  8056. for(var k = 0; k < tool.length; k++){
  8057. if(tool[k].eList && tool[k].eList.length){
  8058. count++
  8059. }
  8060. }
  8061. }
  8062. }
  8063. return count;
  8064. };
  8065. },
  8066. dataCheckPan(){
  8067. return function (fileid) {
  8068. for(let i = 0; i < this.infoData.length; i++){
  8069. if(this.infoData[i].fileid == fileid){
  8070. return true
  8071. }
  8072. }
  8073. return false;
  8074. };
  8075. },
  8076. interUrl: function () {
  8077. let agentid = this.aiJson.agentid
  8078. let sagentid = this.aiJson.sagentid
  8079. let url = ''
  8080. if(sagentid){
  8081. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${sagentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8082. }else{
  8083. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  8084. }
  8085. return url;
  8086. },
  8087. panPptCount(){
  8088. return function () {
  8089. let ppts = 0
  8090. for(var i = 0; i < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; i++){
  8091. let ppt = this.$refs['ppt'+i]
  8092. if(ppt && ppt[0].tanDialog){
  8093. ppts++
  8094. }
  8095. }
  8096. if(!this.pptCount.length){
  8097. this.pptBoxDialog = false
  8098. }
  8099. return ppts;
  8100. };
  8101. },
  8102. panDanTool(){
  8103. return function (array) {
  8104. let count = 0;
  8105. for(var i = 0; i < array.toolChoose.length; i++){
  8106. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8107. count++
  8108. }
  8109. }
  8110. return count;
  8111. };
  8112. },
  8113. panTool(){
  8114. return function () {
  8115. let count = 0;
  8116. for(var j = 0; j < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; j++){
  8117. let array = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[j]
  8118. for(var i = 0; i < array.toolChoose.length; i++){
  8119. if((array.toolChoose[i].tool && array.toolChoose[i].tool.length) || array.toolChoose[i].toolDetail){
  8120. count++
  8121. }
  8122. }
  8123. }
  8124. return count;
  8125. };
  8126. }
  8127. },
  8128. watch: {
  8129. unitIndex(newValue, oldValue) {
  8130. // return;
  8131. if (this.isDelete == 2) {
  8132. this.isDelete = 1;
  8133. return;
  8134. }
  8135. if (this.cid != "") {
  8136. let _unitIndex = oldValue;
  8137. if (
  8138. JSON.stringify(this.unitJson2[_unitIndex]) ==
  8139. JSON.stringify(this.unitJson[_unitIndex])
  8140. ) {
  8141. this.$refs.rightboxR.scrollTop = 0;
  8142. return;
  8143. }
  8144. let cPan = 1;
  8145. for (
  8146. var j = 0;
  8147. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8148. j++
  8149. ) {
  8150. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8151. j
  8152. ].proVisible = false;
  8153. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8154. j
  8155. ].proVisible2 = false;
  8156. if (
  8157. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8158. .length > 1
  8159. ) {
  8160. for (
  8161. var z = 0;
  8162. z <
  8163. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8164. .length;
  8165. z++
  8166. ) {
  8167. if (
  8168. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  8169. .toolChoose[z].tool.length
  8170. ) {
  8171. this.$message.error("请把工具添加完整");
  8172. cPan = 2;
  8173. break;
  8174. }
  8175. }
  8176. }
  8177. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8178. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8179. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8180. (ele) => {
  8181. return ele.value != "" || ele.detail != "" || ele.target != "";
  8182. }
  8183. );
  8184. }
  8185. }
  8186. if (cPan == 2) {
  8187. this.unitIndex = oldValue;
  8188. return;
  8189. }
  8190. for (var i = 0; i < this.unitJson.length; i++) {
  8191. if (this.addindex != i) {
  8192. delete this.unitJson[i].isUpdate;
  8193. }
  8194. }
  8195. this.$refs.rightboxR.scrollTop = 0;
  8196. this.addindex = -1;
  8197. let params = [
  8198. {
  8199. cid: this.cid,
  8200. chapters: JSON.stringify(this.unitJson),
  8201. uid: this.userid,
  8202. unitIndex: _unitIndex,
  8203. },
  8204. ];
  8205. this.ajax
  8206. .post(this.$store.state.api + "updateWorkNew4", params)
  8207. .then((res) => {
  8208. // this.$message({
  8209. // message: "修改成功",
  8210. // type: "success",
  8211. // });
  8212. // this.courseId = this.cid;
  8213. this.addtips()
  8214. })
  8215. .catch((err) => {
  8216. this.$message.error("网络不佳");
  8217. console.error(err);
  8218. });
  8219. }
  8220. },
  8221. steps(newValue, old) {
  8222. if(newValue == 2){
  8223. this.steps = old
  8224. }
  8225. if (newValue == 4) {
  8226. let cPan = 1;
  8227. for (var i = 0; i < this.unitJson.length; i++) {
  8228. for (
  8229. var j = 0;
  8230. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8231. j++
  8232. ) {
  8233. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8234. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8235. if (
  8236. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8237. ) {
  8238. for (
  8239. var z = 0;
  8240. z <
  8241. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8242. z++
  8243. ) {
  8244. if (
  8245. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  8246. .tool.length
  8247. ) {
  8248. this.$message.error("请把工具添加完整");
  8249. cPan = 2;
  8250. break;
  8251. }
  8252. }
  8253. }
  8254. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8255. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8256. i
  8257. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8258. return ele.value != "" || ele.detail != "" || ele.target != "";
  8259. });
  8260. }
  8261. }
  8262. }
  8263. this.inputShow = true;
  8264. if (cPan == 2) {
  8265. this.steps = old;
  8266. return;
  8267. }
  8268. this.goTo(
  8269. "/course?userid=" +
  8270. this.userid +
  8271. "&oid=" +
  8272. this.oid +
  8273. "&org=" +
  8274. this.org +
  8275. "&role=" +
  8276. this.role
  8277. );
  8278. }
  8279. },
  8280. courseName(newVal, oldVal) {
  8281. this.setCourseInfo();
  8282. },
  8283. courseTypeId: {
  8284. immediate: true,
  8285. deep: true,
  8286. handler(newValue, oldValue) {
  8287. this.setCourseInfo();
  8288. }
  8289. },
  8290. knowFileids(newVal, oldVal) {
  8291. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8292. },
  8293. knowFileids2(newVal, oldVal) {
  8294. window.course_fileids = [...this.knowFileids, ...this.knowFileids2]
  8295. },
  8296. },
  8297. methods: {
  8298. tableRowClassName({ row, rowIndex }) {
  8299. if ((rowIndex + 1) % 2 === 0) {
  8300. return "even_row";
  8301. } else {
  8302. return "";
  8303. }
  8304. },
  8305. close() {
  8306. this.cetIndex = "";
  8307. this.cettIndex = "";
  8308. this.templateName = "";
  8309. this.cetBoxDialog = false;
  8310. },
  8311. openAI() {
  8312. top.postMessage({ tools: "64" }, "*");
  8313. },
  8314. setMan() {
  8315. // let teacherJuri = this.teacherJuri2;
  8316. this.ManAarray = [];
  8317. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  8318. if (_user.indexOf(this.userid) == -1) {
  8319. _user.push(this.userid);
  8320. }
  8321. if (_user.indexOf(this.courseUserid) == -1) {
  8322. _user.push(this.courseUserid);
  8323. }
  8324. let params = [{
  8325. uid: _user.join(","),
  8326. }];
  8327. this.ajax
  8328. .post(this.$store.state.api + "getAllUserByIdP", params)
  8329. .then((res) => {
  8330. let teacherJuri = res.data[0];
  8331. this.ManAarray = teacherJuri;
  8332. })
  8333. .catch((err) => {
  8334. console.error(err);
  8335. });
  8336. },
  8337. previewImg(url) {
  8338. this.$hevueImgPreview(url);
  8339. },
  8340. btnDisplay(bool) {
  8341. this.isBtnDisplay = bool;
  8342. },
  8343. stepDisplay(bool) {
  8344. this.isStepDisplay = bool;
  8345. },
  8346. scrollChange() {
  8347. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8348. },
  8349. addHw(e) {
  8350. var el = e.currentTarget;
  8351. el.getElementsByTagName("input")[0].click();
  8352. },
  8353. change(val) {
  8354. if (this.dialogVisible1) {
  8355. this.tdetail = val;
  8356. } else if (this.dialogVisible6) {
  8357. this.AttText.text = val;
  8358. } else if (this.dialogVisible2) {
  8359. this.cTemplate = val;
  8360. } else if (this.dialogVisibleTable) {
  8361. this.tableJson.text = val;
  8362. }
  8363. this.$forceUpdate();
  8364. console.log(val);
  8365. },
  8366. change2(val) {
  8367. console.log(val);
  8368. this.$forceUpdate();
  8369. },
  8370. handleClose(done) {
  8371. done();
  8372. },
  8373. closePan(tool) {
  8374. if (tool == 15) {
  8375. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8376. this.dialogVisible8 = false;
  8377. } else {
  8378. this.closeConfirm(tool);
  8379. }
  8380. } else if (tool == 4) {
  8381. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8382. this.dialogVisible5 = false;
  8383. } else {
  8384. this.closeConfirm(tool);
  8385. }
  8386. } else if (tool == 45) {
  8387. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8388. this.dialogVisibleChoice = false;
  8389. } else {
  8390. this.closeConfirm(tool);
  8391. }
  8392. } else if (tool == 41) {
  8393. if (
  8394. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8395. ) {
  8396. this.dialogVisibleSelect = false;
  8397. } else {
  8398. this.closeConfirm(tool);
  8399. }
  8400. } else if (tool == 47) {
  8401. if (
  8402. JSON.stringify(this.sentenceList) ==
  8403. JSON.stringify(this.sentenceList2)
  8404. ) {
  8405. this.dialogVisibleSentence = false;
  8406. } else {
  8407. this.closeConfirm(tool);
  8408. }
  8409. } else if (tool == 69) {
  8410. if (
  8411. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8412. ) {
  8413. this.englishDialogVisible = false;
  8414. } else {
  8415. this.closeConfirm(tool);
  8416. }
  8417. }
  8418. },
  8419. closeConfirm(tool) {
  8420. this.$confirm("是否保存已编辑内容?", "提示", {
  8421. confirmButtonText: "保存",
  8422. cancelButtonText: "不保存",
  8423. type: "warning",
  8424. })
  8425. .then(() => {
  8426. if (tool == 15) {
  8427. this.addAnswer();
  8428. } else if (tool == 4) {
  8429. this.addAsk();
  8430. } else if (tool == 45) {
  8431. this.addTest();
  8432. } else if (tool == 41) {
  8433. this.addSelectAnswer();
  8434. } else if (tool == 47) {
  8435. this.addSentenceTool();
  8436. } else if (tool == 69) {
  8437. this.addEnglish();
  8438. }
  8439. })
  8440. .catch(() => {
  8441. if (tool == 15) {
  8442. this.dialogVisible8 = false;
  8443. } else if (tool == 4) {
  8444. this.dialogVisible5 = false;
  8445. } else if (tool == 45) {
  8446. this.dialogVisibleChoice = false;
  8447. } else if (tool == 41) {
  8448. this.dialogVisibleSelect = false;
  8449. } else if (tool == 47) {
  8450. this.dialogVisibleSentence = false;
  8451. } else if (tool == 69) {
  8452. this.englishDialogVisible = false;
  8453. }
  8454. });
  8455. },
  8456. addEnglish(jsonType) {
  8457. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  8458. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  8459. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  8460. if (
  8461. this.englishList.engTitle == "" ||
  8462. this.englishList.englishText == ""
  8463. ) {
  8464. this.$message.error("请将内容填写完整!");
  8465. return;
  8466. }
  8467. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8468. this.taskCount
  8469. ].toolChoose[this.toolIndex].englishList = this.englishList;
  8470. this.englishList = {};
  8471. if (jsonType && jsonType == 1) {
  8472. this.englishDialogVisible = true;
  8473. } else {
  8474. this.englishDialogVisible = false;
  8475. }
  8476. if (
  8477. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  8478. .toolChoose[this.toolIndex].tool != 69
  8479. ) {
  8480. this.addTools(69, this.taskCount, this.toolIndex);
  8481. }
  8482. },
  8483. imgChange2(i, j) {
  8484. var _tmp = this.testJson.testJson[i].checkList[j];
  8485. this.noneBtnImg = _tmp.length >= 1;
  8486. },
  8487. imgChange3(i) {
  8488. var _tmp = this.testJson.testJson[i];
  8489. this.noneBtnImg = _tmp.length >= 1;
  8490. },
  8491. imgChange1(file, fileList, type, itemTaskIndex) {
  8492. if (type == 1) {
  8493. var _tmp = this.cover;
  8494. } else if (
  8495. type == 2 ||
  8496. type == 3 ||
  8497. type == 6 ||
  8498. type == 7 ||
  8499. type == 8
  8500. ) {
  8501. var _tmp =
  8502. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8503. .chapterData;
  8504. } else if (type == 4) {
  8505. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  8506. } else {
  8507. var _tmp =
  8508. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8509. .homeworkList;
  8510. }
  8511. this.noneBtnImg = _tmp.length >= 1;
  8512. },
  8513. goTo(path) {
  8514. this.$router.push(path);
  8515. },
  8516. guid() {
  8517. var _num,
  8518. i,
  8519. _guid = "";
  8520. for (i = 0; i < 32; i++) {
  8521. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  8522. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  8523. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  8524. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  8525. _guid += "-";
  8526. }
  8527. }
  8528. return _guid;
  8529. },
  8530. retrunCourse() {
  8531. if(this.istemplate == 1){
  8532. this.goTo(
  8533. "/course?userid=" +
  8534. this.userid +
  8535. "&oid=" +
  8536. this.oid +
  8537. "&org=" +
  8538. this.org +
  8539. "&role=" +
  8540. this.role
  8541. );
  8542. return
  8543. }
  8544. this.$confirm("是否保存已编辑内容?", "提示", {
  8545. confirmButtonText: "保存",
  8546. cancelButtonText: "不保存",
  8547. distinguishCancelAndClose: true,
  8548. type: "warning",
  8549. })
  8550. .then(() => {
  8551. if (this.taskLoading.length) {
  8552. let _pan = 1
  8553. for(var k = 0; k < this.taskLoading.length; k++){
  8554. if(this.taskLoading[k]){
  8555. this.$message({
  8556. message: `请等待任务${k+1}回答完毕后再保存`,
  8557. type: "warning"
  8558. });
  8559. _pan = 2
  8560. }
  8561. }
  8562. if(_pan == 2){
  8563. return
  8564. }
  8565. }
  8566. if(this.taskGLoading.length){
  8567. let _pan = 1
  8568. for(var k = 0; k < this.taskGLoading.length; k++){
  8569. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8570. this.$message({
  8571. message: `请等待任务${k+1}回答完毕后再保存`,
  8572. type: "warning"
  8573. });
  8574. _pan = 2
  8575. }
  8576. }
  8577. if(_pan == 2){
  8578. return
  8579. }
  8580. }
  8581. let pan2 = 1
  8582. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  8583. for(var index = 0; index < taskJson.length; index++){
  8584. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  8585. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  8586. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  8587. this.$message({
  8588. message: `请等待任务${index+1}回答完毕后再继续`,
  8589. type: "warning"
  8590. });
  8591. pan2 = 2
  8592. }
  8593. }
  8594. }
  8595. }
  8596. if(pan2 == 2){
  8597. return
  8598. }
  8599. if (this.cid == "" || this.cid == undefined) {
  8600. if (this.courseName == "") {
  8601. this.$message.error("请补充填写课程名称");
  8602. return;
  8603. } else {
  8604. this.addWork();
  8605. }
  8606. this.steps = 4;
  8607. } else {
  8608. if (this.courseName == "") {
  8609. this.$message.error("请补充填写课程名称");
  8610. return;
  8611. } else {
  8612. if (this.userid != this.courseUserid && this.role != "1") {
  8613. this.updateWork2();
  8614. } else {
  8615. this.updateWork();
  8616. }
  8617. this.steps = 4;
  8618. }
  8619. }
  8620. })
  8621. .catch((v) => {
  8622. console.log(v);
  8623. if (v == "cancel") {
  8624. this.goTo(
  8625. "/course?userid=" +
  8626. this.userid +
  8627. "&oid=" +
  8628. this.oid +
  8629. "&org=" +
  8630. this.org +
  8631. "&role=" +
  8632. this.role
  8633. );
  8634. }
  8635. });
  8636. },
  8637. lastSteps() {
  8638. if (this.steps == 4) {
  8639. this.goTo(
  8640. "/course?userid=" +
  8641. this.userid +
  8642. "&oid=" +
  8643. this.oid +
  8644. "&org=" +
  8645. this.org +
  8646. "&role=" +
  8647. this.role
  8648. );
  8649. } else {
  8650. // if (this.cidType == 0) {
  8651. // this.steps--;
  8652. // if (this.steps == 1) {
  8653. // setTimeout(() => {
  8654. // this.checkEva(this.checkId);
  8655. // setTimeout(() => {
  8656. // this.checkEva(this.checkId);
  8657. // }, 100);
  8658. // }, 100);
  8659. // }
  8660. // } else {
  8661. if (this.steps == 3) {
  8662. this.steps = 1;
  8663. setTimeout(() => {
  8664. this.checkEva(this.checkId);
  8665. setTimeout(() => {
  8666. this.checkEva(this.checkId);
  8667. }, 100);
  8668. }, 100);
  8669. }
  8670. // }
  8671. }
  8672. },
  8673. navSteps(s) {
  8674. if (this.courseName == "") {
  8675. this.$message.error("请补充填写课程名称");
  8676. return;
  8677. }
  8678. if (this.cidType == 0) {
  8679. if (this.steps == 1) {
  8680. if (this.cid == "" || this.cid == undefined) {
  8681. this.addWork();
  8682. } else {
  8683. if (this.userid != this.courseUserid && this.role != "1") {
  8684. this.updateWork2();
  8685. } else {
  8686. this.updateWork();
  8687. }
  8688. }
  8689. }
  8690. if (s == 1) {
  8691. this.steps = 1;
  8692. setTimeout(() => {
  8693. this.checkEva(this.checkId);
  8694. setTimeout(() => {
  8695. this.checkEva(this.checkId);
  8696. }, 100);
  8697. }, 100);
  8698. }
  8699. if (s == 2) {
  8700. this.steps = 2;
  8701. }
  8702. if (s == 3) {
  8703. this.cTemplate = this.templateC.content;
  8704. this.dialogVisible2 = false;
  8705. this.steps = 3;
  8706. this.isClickColor = 1;
  8707. this.unitJson[
  8708. this.unitIndex
  8709. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8710. this.$forceUpdate();
  8711. setTimeout(() => {
  8712. this.checkEva(this.checkId);
  8713. setTimeout(() => {
  8714. this.checkEva(this.checkId);
  8715. }, 100);
  8716. }, 1000);
  8717. }
  8718. } else {
  8719. if (this.steps == 1) {
  8720. if (this.cid == "" || this.cid == undefined) {
  8721. this.addWork();
  8722. } else {
  8723. if (this.userid != this.courseUserid && this.role != "1") {
  8724. this.updateWork2();
  8725. } else {
  8726. this.updateWork();
  8727. }
  8728. }
  8729. }
  8730. if (s == 1) {
  8731. this.steps = 1;
  8732. setTimeout(() => {
  8733. this.checkEva(this.checkId);
  8734. setTimeout(() => {
  8735. this.checkEva(this.checkId);
  8736. }, 100);
  8737. }, 100);
  8738. }
  8739. if (s == 3) {
  8740. this.cTemplate = this.templateC.content;
  8741. this.dialogVisible2 = false;
  8742. this.steps = 3;
  8743. this.isClickColor = 1;
  8744. this.unitJson[
  8745. this.unitIndex
  8746. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8747. this.$forceUpdate();
  8748. setTimeout(() => {
  8749. this.checkEva(this.checkId);
  8750. setTimeout(() => {
  8751. this.checkEva(this.checkId);
  8752. }, 100);
  8753. }, 1000);
  8754. }
  8755. }
  8756. this.$refs.stepBox.scrollTop = 0;
  8757. },
  8758. setTipsIndex(){
  8759. // 使用 setTimeout 确保对话框已经渲染完成
  8760. this.$nextTick(() => {
  8761. const dialog = document.querySelector('.custom-confirm-box');
  8762. if (dialog) {
  8763. const parent = dialog.parentElement;
  8764. if (parent) {
  8765. parent.style.zIndex = 9999999;
  8766. const adjacentElement = parent.nextElementSibling;
  8767. if (adjacentElement) {
  8768. adjacentElement.style.zIndex = 9999998;
  8769. }
  8770. }
  8771. }
  8772. });
  8773. },
  8774. nextSteps(clickType, ttype) {
  8775. if(!this.time()){
  8776. return
  8777. }
  8778. // if (this.cidType == 1) {
  8779. if (this.steps == 1) {
  8780. if (this.courseName != "") {
  8781. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  8782. // this.$message({
  8783. // message: "请回答完毕后再次发送",
  8784. // type: "warning"
  8785. // });
  8786. if(this.ttaskDetailLoading.length){
  8787. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  8788. this.$message({
  8789. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8790. type: "warning"
  8791. });
  8792. }
  8793. if(this.cpotetLoading.cpote1){
  8794. this.$message({
  8795. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  8796. type: "warning"
  8797. });
  8798. }
  8799. if(this.cpotetLoading.cpote2){
  8800. this.$message({
  8801. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  8802. type: "warning"
  8803. });
  8804. }
  8805. if(this.cpotetLoading.cpote3){
  8806. this.$message({
  8807. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  8808. type: "warning"
  8809. });
  8810. }
  8811. if(this.cpotetLoading.cpote4){
  8812. this.$message({
  8813. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  8814. type: "warning"
  8815. });
  8816. }
  8817. return;
  8818. }
  8819. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  8820. if(!this.courseText && !this.teacherCourseText){
  8821. this.$message.error("请生成简要描述后再生成大纲");
  8822. return;
  8823. }
  8824. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  8825. this.openAiDialog(clickType, 'aiOutline2')
  8826. if(clickType == 1){
  8827. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  8828. }else {
  8829. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  8830. }
  8831. }else {
  8832. this.openAiDialog(clickType, 'aiOutline')
  8833. if(clickType == 1){
  8834. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  8835. }else {
  8836. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  8837. }
  8838. }
  8839. return;
  8840. }
  8841. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  8842. let _type = ''
  8843. if(this.cpoteType == 0){
  8844. _type = 'aiCpote1'
  8845. if(clickType == 1){
  8846. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  8847. }else {
  8848. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  8849. }
  8850. }else if(this.cpoteType == 1){
  8851. _type = 'aiCpote2'
  8852. if(clickType == 1){
  8853. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  8854. }else {
  8855. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  8856. }
  8857. }else if(this.cpoteType == 2){
  8858. _type = 'aiCpote3'
  8859. if(clickType == 1){
  8860. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  8861. }else {
  8862. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  8863. }
  8864. }else if(this.cpoteType == 3){
  8865. _type = 'aiCpote4'
  8866. if(clickType == 1){
  8867. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  8868. }else {
  8869. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  8870. }
  8871. }
  8872. this.cpoteType++
  8873. this.openAiDialog(clickType, _type)
  8874. return;
  8875. }
  8876. // if (!this.isOutline2) {
  8877. // this.openAiDialog(clickType, 'aiTeacher')
  8878. // return;
  8879. // }
  8880. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  8881. this.openAiDialog(clickType, 'aiTeacher3')
  8882. if(clickType == 1){
  8883. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  8884. }else {
  8885. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  8886. }
  8887. return;
  8888. }
  8889. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  8890. this.openAiDialog(clickType, 'aiTeacher2')
  8891. if(clickType == 1){
  8892. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  8893. }else {
  8894. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  8895. }
  8896. return;
  8897. }
  8898. let _pan2 = 1
  8899. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  8900. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  8901. _pan2 = 2
  8902. this.$message.error(`请完善任务${k+1}的课程大纲`)
  8903. break;
  8904. }
  8905. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  8906. _pan2 = 2
  8907. this.$message.error(`请完善任务${k+1}的课程教案`)
  8908. break;
  8909. }
  8910. }
  8911. if(_pan2 == 2){
  8912. return;
  8913. }
  8914. const functionA = () => {
  8915. setTimeout(() => {
  8916. this.loading = false
  8917. this.steps = 3;
  8918. }, 0)
  8919. this.isClickColor = 1;
  8920. this.unitJson[
  8921. this.unitIndex
  8922. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8923. this.$forceUpdate();
  8924. setTimeout(() => {
  8925. this.checkEva(this.checkId);
  8926. setTimeout(() => {
  8927. this.checkEva(this.checkId);
  8928. }, 100);
  8929. }, 1000);
  8930. if (this.cid == "" || this.cid == undefined) {
  8931. this.addWork();
  8932. } else {
  8933. if (this.userid != this.courseUserid && this.role != "1") {
  8934. this.updateWork2();
  8935. } else {
  8936. this.updateWork();
  8937. }
  8938. }
  8939. }
  8940. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  8941. if(this.ttaskDetailLoading5.length){
  8942. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  8943. // this.$message({
  8944. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8945. // type: "warning"
  8946. // });
  8947. this.$confirm("还有教案描述未生成完毕,是否直接下一步?", "提示", {
  8948. confirmButtonText: "确定",
  8949. cancelButtonText: "取消",
  8950. distinguishCancelAndClose: true,
  8951. type: "warning",
  8952. customClass: 'custom-confirm-box'
  8953. })
  8954. .then(() => {
  8955. if(this.isTeacherTaskCancelToken2){
  8956. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  8957. if(this.isTeacherTaskCancelToken2[i]){
  8958. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  8959. this.isTeacherTaskCancelToken2[i] = null;
  8960. }
  8961. }
  8962. }
  8963. this.taskDetailLoading5 = []
  8964. this.ttaskDetailLoading5 = []
  8965. if(this.isTeacherTaskCancelSource){
  8966. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  8967. if(this.isTeacherTaskCancelSource[i]){
  8968. this.isTeacherTaskCancelSource[i].close()
  8969. this.isTeacherTaskCancelSource[i] = null
  8970. }
  8971. }
  8972. }
  8973. if (this.cid) {
  8974. this.loading = true
  8975. functionA()
  8976. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  8977. } else {
  8978. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8979. if(clickType == 1){
  8980. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  8981. }else {
  8982. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  8983. }
  8984. }
  8985. }).catch((v) => {
  8986. console.log(v);
  8987. })
  8988. setTimeout(() => {
  8989. this.setTipsIndex()
  8990. }, 500)
  8991. }
  8992. return;
  8993. }
  8994. if (this.cid && this.panTask() > 0) {
  8995. this.loading = true
  8996. functionA()
  8997. } else {
  8998. // if(ttype == 2){
  8999. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  9000. // }else {
  9001. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  9002. // }
  9003. }
  9004. } else {
  9005. this.$message.error("请补充填写课程名称");
  9006. return;
  9007. }
  9008. } else if (this.steps == 3) {
  9009. if (this.taskLoading.length) {
  9010. let _pan = 1
  9011. for(var k = 0; k < this.taskLoading.length; k++){
  9012. if(this.taskLoading[k]){
  9013. this.$message({
  9014. message: `请等待任务${k+1}回答完毕后再上传`,
  9015. type: "warning"
  9016. });
  9017. _pan = 2
  9018. }
  9019. }
  9020. if(_pan == 2){
  9021. return
  9022. }
  9023. }
  9024. if(this.taskGLoading.length){
  9025. let _pan = 1
  9026. for(var k = 0; k < this.taskGLoading.length; k++){
  9027. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  9028. this.$message({
  9029. message: `请等待任务${k+1}回答完毕后再保存`,
  9030. type: "warning"
  9031. });
  9032. _pan = 2
  9033. }
  9034. }
  9035. if(_pan == 2){
  9036. return
  9037. }
  9038. }
  9039. let pan2 = 1
  9040. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  9041. for(var index = 0; index < taskJson.length; index++){
  9042. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  9043. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1){
  9044. if(this.$refs['evalist'+index+j] && this.$refs['evalist'+index+j][0].loading){
  9045. this.$message({
  9046. message: `请等待任务${index+1}回答完毕后再继续`,
  9047. type: "warning"
  9048. });
  9049. pan2 = 2
  9050. }
  9051. }
  9052. }
  9053. }
  9054. if(pan2 == 2){
  9055. return
  9056. }
  9057. if (this.cid == "" || this.cid == undefined) {
  9058. if (this.courseName == "") {
  9059. this.$message.error("请补充填写课程名称");
  9060. return;
  9061. } else {
  9062. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9063. this.addWork();
  9064. this.steps++;
  9065. }
  9066. } else {
  9067. if (this.courseName == "") {
  9068. this.$message.error("请补充填写课程名称");
  9069. return;
  9070. } else {
  9071. if (this.userid != this.courseUserid && this.role != "1") {
  9072. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9073. this.updateWork2();
  9074. } else {
  9075. this.addCourseBehavior('courseBehavior', `点击确认上传按钮`)
  9076. this.updateWork();
  9077. }
  9078. this.steps++;
  9079. }
  9080. }
  9081. }
  9082. // } else {
  9083. // if (this.steps == 1) {
  9084. // if (this.courseName != "") {
  9085. // if (this.cid == "" || this.cid == undefined) {
  9086. // this.addWork();
  9087. // } else {
  9088. // if (this.userid != this.courseUserid && this.role != "1") {
  9089. // // this.updateWork2();
  9090. // } else {
  9091. // this.updateWork();
  9092. // }
  9093. // }
  9094. // this.steps++;
  9095. // } else {
  9096. // this.$message.error("请补充填写课程名称");
  9097. // return;
  9098. // }
  9099. // } else if (this.steps == 2) {
  9100. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  9101. // this.cTemplate = this.templateC.content;
  9102. // }
  9103. // this.dialogVisible2 = false;
  9104. // this.steps++;
  9105. // setTimeout(() => {
  9106. // this.checkEva(this.checkId);
  9107. // setTimeout(() => {
  9108. // this.checkEva(this.checkId);
  9109. // }, 100);
  9110. // }, 1000);
  9111. // } else if (this.steps == 3) {
  9112. // if (this.cid == "" || this.cid == undefined) {
  9113. // if (this.courseName == "") {
  9114. // this.$message.error("请补充填写课程名称");
  9115. // return;
  9116. // } else {
  9117. // this.addWork();
  9118. // this.steps++;
  9119. // }
  9120. // } else {
  9121. // if (this.courseName == "") {
  9122. // this.$message.error("请补充填写课程名称");
  9123. // return;
  9124. // } else {
  9125. // if (this.userid != this.courseUserid && this.role != "1") {
  9126. // this.updateWork2();
  9127. // } else {
  9128. // this.updateWork();
  9129. // }
  9130. // this.steps++;
  9131. // }
  9132. // }
  9133. // }
  9134. // }
  9135. this.$refs.stepBox.scrollTop = 0;
  9136. },
  9137. unitSet(i) {
  9138. if (this.unitIndex == i) {
  9139. return;
  9140. }
  9141. this.unitIndex = i;
  9142. this.isClickColor = 1;
  9143. // this.$refs.rightboxR.scrollTop = 0;
  9144. this.$refs.unitBox.scrollTop = 0;
  9145. },
  9146. panUnitJson() {
  9147. let _unitIndex = this.unitIndex;
  9148. let cPan = 1;
  9149. for (
  9150. var j = 0;
  9151. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  9152. j++
  9153. ) {
  9154. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  9155. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  9156. j
  9157. ].proVisible2 = false;
  9158. if (
  9159. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9160. .length > 1
  9161. ) {
  9162. for (
  9163. var z = 0;
  9164. z <
  9165. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  9166. .length;
  9167. z++
  9168. ) {
  9169. if (
  9170. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  9171. z
  9172. ].tool.length
  9173. ) {
  9174. this.$message.error("请把工具添加完整");
  9175. cPan = 2;
  9176. break;
  9177. }
  9178. }
  9179. }
  9180. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  9181. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  9182. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  9183. (ele) => {
  9184. return ele.value != "" || ele.detail != "" || ele.target != "";
  9185. }
  9186. );
  9187. }
  9188. }
  9189. return cPan;
  9190. },
  9191. unitOpen(i) {
  9192. if (this.unitJson[i].toolOpen) {
  9193. this.unitJson[i].toolOpen = false;
  9194. } else {
  9195. this.unitJson[i].toolOpen = true;
  9196. }
  9197. this.updateWork();
  9198. this.$forceUpdate();
  9199. },
  9200. unitSet2(i) {
  9201. if (this.panUnitJson() == 2) {
  9202. return;
  9203. }
  9204. // if(this.unitJson[i].toolOpen){
  9205. // this.unitJson[i].toolOpen = false
  9206. // this.updateWork()
  9207. // this.$forceUpdate()
  9208. // return
  9209. // }else {
  9210. this.unitJson[i].toolOpen = true;
  9211. // }
  9212. this.$forceUpdate();
  9213. if (this.unitIndex == i) {
  9214. return;
  9215. }
  9216. this.unitIndex = i;
  9217. this.isClickColor = 1;
  9218. // this.$refs.rightboxR.scrollTop = 0;
  9219. this.$refs.unitBox.scrollTop = 0;
  9220. },
  9221. updateCourseState(i) {
  9222. let params = [
  9223. {
  9224. cid: this.cid,
  9225. state: i,
  9226. },
  9227. ];
  9228. this.ajax
  9229. .post(this.$store.state.api + "updateCourseMode", params)
  9230. .then((res) => {
  9231. this.courseState = i;
  9232. })
  9233. .catch((err) => {
  9234. this.$message.error("网络不佳");
  9235. console.error(err);
  9236. });
  9237. },
  9238. addtips(){
  9239. let params = [
  9240. {
  9241. cid: this.cid,
  9242. tips: JSON.stringify(this.aiJson),
  9243. tid: this.templateid
  9244. },
  9245. ];
  9246. this.ajax
  9247. .post(this.$store.state.api + "addTips", params)
  9248. .then((res) => {
  9249. })
  9250. .catch((err) => {
  9251. this.$message.error("网络不佳");
  9252. console.error(err);
  9253. });
  9254. },
  9255. openSaveTips(){
  9256. this.dialogVisibleTips = true
  9257. },
  9258. time() {
  9259. if (!this.now) {
  9260. this.now = new Date().getTime();
  9261. return true;
  9262. } else {
  9263. let time = new Date().getTime();
  9264. if (time - this.now > 1000) {
  9265. this.now = time;
  9266. return true;
  9267. } else {
  9268. return false;
  9269. }
  9270. }
  9271. },
  9272. deleteUnit(i) {
  9273. var _this = this;
  9274. if (i == 0 && _this.unitJson.length == 1) {
  9275. _this
  9276. .$confirm("确定切换成任务模式吗?", "提示", {
  9277. confirmButtonText: "确定",
  9278. cancelButtonText: "取消",
  9279. type: "warning",
  9280. })
  9281. .then(() => {
  9282. _this.unitJson[i].dyName = "";
  9283. // _this.updateCourseState(2);
  9284. })
  9285. .catch(() => {
  9286. return;
  9287. });
  9288. } else {
  9289. _this
  9290. .$confirm("确定删除此阶段吗?", "提示", {
  9291. confirmButtonText: "确定",
  9292. cancelButtonText: "取消",
  9293. type: "warning",
  9294. })
  9295. .then(() => {
  9296. _this.isDelete = 2;
  9297. // _this.unitIndex = _this.unitIndex - 1;
  9298. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  9299. // _this.$message.success("删除成功");
  9300. })
  9301. .catch(() => {
  9302. return;
  9303. });
  9304. }
  9305. },
  9306. deleteWork(chapid) {
  9307. let params = [
  9308. {
  9309. cid: this.cid,
  9310. chapters: JSON.stringify(this.unitJson),
  9311. uid: this.userid,
  9312. chapid: chapid,
  9313. },
  9314. ];
  9315. this.ajax
  9316. .post(this.$store.state.api + "deleteWork", params)
  9317. .then((res) => {
  9318. this.$message({
  9319. message: "删除成功",
  9320. type: "success",
  9321. });
  9322. let task = JSON.parse(
  9323. JSON.stringify(
  9324. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  9325. )
  9326. );
  9327. this.unitJson.splice(this.unitIndex, 1);
  9328. if (this.unitIndex == 0) {
  9329. this.unitIndex = 0;
  9330. } else {
  9331. this.unitIndex = this.unitIndex - 1;
  9332. }
  9333. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  9334. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  9335. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  9336. ...task,
  9337. ];
  9338. }
  9339. })
  9340. .catch((err) => {
  9341. this.$message.error("网络不佳");
  9342. console.error(err);
  9343. });
  9344. },
  9345. deleteTool(itemTaskIndex, i) {
  9346. var _this = this;
  9347. if (_this.time()) {
  9348. _this
  9349. .$confirm("确定删除此工具吗?", "提示", {
  9350. confirmButtonText: "确定",
  9351. cancelButtonText: "取消",
  9352. type: "warning",
  9353. })
  9354. .then(() => {
  9355. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9356. itemTaskIndex
  9357. ].toolChoose.splice(i, 1);
  9358. _this.$message.success("删除成功");
  9359. })
  9360. .catch(() => {
  9361. return;
  9362. });
  9363. }
  9364. },
  9365. deleteSentence(i) {
  9366. var _this = this;
  9367. _this
  9368. .$confirm("确定删除此题目吗?", "提示", {
  9369. confirmButtonText: "确定",
  9370. cancelButtonText: "取消",
  9371. type: "warning",
  9372. })
  9373. .then(() => {
  9374. _this.sentenceList.splice(i, 1);
  9375. _this.$message.success("删除成功");
  9376. })
  9377. .catch(() => {
  9378. return;
  9379. });
  9380. },
  9381. deleteS(s, i, j) {
  9382. this.sentenceList[i].addSentence.splice(j, 1);
  9383. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9384. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9385. this.sentenceList[i].rightAnswer.splice(a, 1);
  9386. }
  9387. },
  9388. openT() {
  9389. top.postMessage({ tools: "25" }, "*");
  9390. },
  9391. deleteTask(i) {
  9392. var _this = this;
  9393. if (_this.time()) {
  9394. _this
  9395. .$confirm(
  9396. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9397. 1 ==
  9398. i
  9399. ? "确定删除此任务吗?"
  9400. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  9401. "提示",
  9402. {
  9403. confirmButtonText: "确定",
  9404. cancelButtonText: "取消",
  9405. type: "warning",
  9406. }
  9407. )
  9408. .then(() => {
  9409. if (i == 0 && _this.courseState == 4) {
  9410. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9411. i + 1
  9412. ].chapterData = JSON.parse(
  9413. JSON.stringify(
  9414. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9415. .chapterData
  9416. )
  9417. );
  9418. }
  9419. _this.$forceUpdate();
  9420. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9421. i,
  9422. 1
  9423. );
  9424. _this.$message.success("删除成功");
  9425. })
  9426. .catch(() => {
  9427. return;
  9428. });
  9429. }
  9430. },
  9431. deleteTask2(i) {
  9432. var _this = this;
  9433. if (_this.time()) {
  9434. _this
  9435. .$confirm(
  9436. "确定删除此任务吗?",
  9437. "提示",
  9438. {
  9439. confirmButtonText: "确定",
  9440. cancelButtonText: "取消",
  9441. type: "warning",
  9442. }
  9443. )
  9444. .then(() => {
  9445. if (i == 0 && _this.courseState == 4) {
  9446. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9447. i + 1
  9448. ].chapterData = JSON.parse(
  9449. JSON.stringify(
  9450. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9451. .chapterData
  9452. )
  9453. );
  9454. }
  9455. _this.$forceUpdate();
  9456. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9457. i,
  9458. 1
  9459. );
  9460. _this.$message.success("删除成功");
  9461. })
  9462. .catch(() => {
  9463. return;
  9464. });
  9465. }
  9466. },
  9467. handlePictureCardPreview(file) {
  9468. this.dialogImageUrl = file.url;
  9469. },
  9470. clean(i, c) {
  9471. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  9472. },
  9473. handle_remove1(file, fileList, type) {
  9474. var _tmp = this.cover;
  9475. // for (var i = 0, len = _tmp.length; i < len; i++) {
  9476. // if (_tmp[i].uid == file.uid) {
  9477. // _tmp.splice(i, 1);
  9478. // break;
  9479. // }
  9480. // this.cover = _tmp;
  9481. // }
  9482. this.cover = [];
  9483. this.noneBtnImg = this.cover.length >= 1;
  9484. this.isSysPic = false;
  9485. this.isSysPic2 = false;
  9486. this.$forceUpdate();
  9487. },
  9488. addImg(e) {
  9489. var el = e.currentTarget;
  9490. el.getElementsByTagName("input")[0].click();
  9491. e.target.value = "";
  9492. },
  9493. addChaptersTools(i) {
  9494. this.chapTools = [
  9495. {
  9496. tools: [],
  9497. toolDetail: "",
  9498. },
  9499. ];
  9500. this.chapCount = i;
  9501. this.dialogVisible4 = true;
  9502. },
  9503. isNoFinsh() {
  9504. this.$message.warning("功能正在开发中");
  9505. },
  9506. addAttText(i) {
  9507. this.AttText = {
  9508. title: "",
  9509. text: "",
  9510. };
  9511. this.taskCount = i;
  9512. this.AttTextType = 0;
  9513. this.$forceUpdate();
  9514. this.dialogVisible6 = true;
  9515. setTimeout(() => {
  9516. this.$refs["fuInput"].focus();
  9517. }, 100);
  9518. },
  9519. openLine(i) {
  9520. this.line = "";
  9521. this.lineCount = i;
  9522. this.lineType = 0;
  9523. this.$forceUpdate();
  9524. this.dialogVisible7 = true;
  9525. },
  9526. pasteLine(i) {
  9527. navigator.clipboard
  9528. .readText()
  9529. .then((v) => {
  9530. console.log("获取剪贴板成功:", v);
  9531. const html = v;
  9532. const regex = /src="(.*?)"/g;
  9533. const match = regex.exec(html);
  9534. if (match && match[1]) {
  9535. console.log(match[1]);
  9536. this.$message.success("粘贴成功");
  9537. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9538. i
  9539. ].chapterData.unshift({
  9540. name: "链接",
  9541. title: "嵌入代码",
  9542. url: match[1],
  9543. type: 8,
  9544. });
  9545. } else {
  9546. // console.log("未找到包含 src 属性的 iframe");
  9547. this.$message.error(
  9548. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  9549. );
  9550. }
  9551. })
  9552. .catch((v) => {
  9553. console.log("获取剪贴板失败: ", v);
  9554. });
  9555. },
  9556. openSource(i) {
  9557. this.lineCount = i;
  9558. this.sourceData = {};
  9559. this.dialogVisibleSource = true;
  9560. this.updateSourcePan = false;
  9561. },
  9562. openAiCreate(i){
  9563. // this.lineCount = i;
  9564. // this.dialogVisibleAiCreate = true;
  9565. if(!this.pptCount.includes(i)){
  9566. this.pptCount.push(i)
  9567. this.dialogVisibleAiCreate2.push(i);
  9568. }else{
  9569. this.$refs['ppt'+i][0].tanDialog = false
  9570. this.$refs['ppt'+i][0].dialogVisibleAiCreate2 = true
  9571. }
  9572. this.pptBoxDialog = true
  9573. },
  9574. createAiPpt(json, i){
  9575. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9576. // this.dialogVisibleAiCreate = false;
  9577. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  9578. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  9579. },
  9580. closeAiPpt(i){
  9581. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  9582. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  9583. },
  9584. openAiCreateVideo(i){
  9585. this.lineCount = i;
  9586. this.dialogVisibleAiCreateVideo = true;
  9587. },
  9588. createAiVideo(json){
  9589. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9590. // this.dialogVisibleAiCreateVideo = false;
  9591. },
  9592. async createTeacherAn(index){
  9593. // this.lineCount = index;
  9594. let md = new MarkdownIt();
  9595. if(this.courseState == 4){
  9596. this.anLoading[0] = true
  9597. // if(index == 0 || index){
  9598. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9599. // let name = _task.task+'-教案'
  9600. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9601. // await this.generate(name, _html, 0)
  9602. // }else {
  9603. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9604. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9605. let name = _task.task+'-教案'
  9606. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9607. await this.generate(name, _html, 0)
  9608. }
  9609. // }
  9610. }else if(this.courseState == 5){
  9611. this.anLoading[index] = true
  9612. if(index == 0 || index){
  9613. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9614. let name = _task.task+'-教案'
  9615. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9616. await this.generate(name, _html, index)
  9617. }else {
  9618. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9619. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9620. let name = _task.task+'-教案'
  9621. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9622. await this.generate(name, _html, i)
  9623. }
  9624. }
  9625. }
  9626. },
  9627. async createTaskAn(index){
  9628. // this.lineCount = index;
  9629. if(this.taskAnLoading[index]){
  9630. // this.$message.error('请等待当前学历案生成完成')
  9631. this.cancelAjax('taskAn', index)
  9632. return
  9633. }
  9634. this.taskAnLoading[index] = true
  9635. this.$forceUpdate()
  9636. let _this = this
  9637. let md = new MarkdownIt();
  9638. let messages = ""
  9639. messages = `NOTICE
  9640. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  9641. Language: ${this.getLang()}
  9642. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  9643. ## 任务教案
  9644. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  9645. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  9646. let parm = {
  9647. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  9648. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  9649. session_name: uuidv4(),
  9650. userId: this.userid,
  9651. file_ids: [],
  9652. model: 'gpt-4o-2024-08-06',
  9653. temperature: this.mode == 3 ? 0.5 : 0.1,
  9654. }
  9655. this.ajax
  9656. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  9657. .then(async (response) => {
  9658. console.log(response);
  9659. let data = response.data.FunctionResponse
  9660. if (data.message) {
  9661. console.log(data.message);
  9662. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  9663. let name = _task.task+'-学历案'
  9664. let _html = md.render(data.message)
  9665. await _this.generate(name, _html, index, ()=>{
  9666. _this.taskAnLoading[index] = false
  9667. _this.taskAnCancelToken[index] = null
  9668. })
  9669. }else{
  9670. _this.taskAnLoading[index] = false
  9671. _this.taskAnCancelToken[index] = null
  9672. }
  9673. }).catch((error) => {
  9674. console.log(error);
  9675. _this.taskAnLoading[index] = false
  9676. _this.taskAnCancelToken[index] = null
  9677. });
  9678. },
  9679. async generate(a, html, index, callback) {
  9680. // <html lang="en">
  9681. // 将html文件中需要用到的数据挂载到store上
  9682. const content = `<!DOCTYPE html>
  9683. <html xmlns:v='urn:schemas-microsoft-com:vml'xmlns:o='urn:schemas-microsoft-com:office:office'xmlns:w='urn:schemas-microsoft-com:office:word'xmlns:m='http://schemas.microsoft.com/office/2004/12/omml'xmlns='http://www.w3.org/TR/REC-html40'>
  9684. <head>
  9685. <!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:TrackMoves>false</w:TrackMoves><w:TrackFormatting/><w:ValidateAgainstSchemas/><w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><w:IgnoreMixedContent>false</w:IgnoreMixedContent><w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><w:DoNotPromoteQF/><w:LidThemeOther>EN-US</w:LidThemeOther><w:LidThemeAsian>ZH-CN</w:LidThemeAsian><w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><w:Compatibility><w:BreakWrappedTables/><w:SnapToGridInCell/><w:WrapTextWithPunct/><w:UseAsianBreakRules/><w:DontGrowAutofit/><w:SplitPgBreakAndParaMark/><w:DontVertAlignCellWithSp/><w:DontBreakConstrainedForcedTables/><w:DontVertAlignInTxbx/><w:Word11KerningPairs/><w:CachedColBalance/><w:UseFELayout/></w:Compatibility><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><m:mathPr><m:mathFont m:val='Cambria Math'/><m:brkBin m:val='before'/><m:brkBinSub m:val='--'/><m:smallFrac m:val='off'/><m:dispDef/><m:lMargin m:val='0'/> <m:rMargin m:val='0'/><m:defJc m:val='centerGroup'/><m:wrapIndent m:val='1440'/><m:intLim m:val='subSup'/><m:naryLim m:val='undOvr'/></m:mathPr></w:WordDocument></xml><![endif]-->
  9686. <meta charset="UTF-8">
  9687. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9688. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9689. <title>${a}</title>
  9690. <style>
  9691. table {
  9692. border-collapse: collapse; /* 折叠边框 */
  9693. width: 100%;
  9694. }
  9695. th, td {
  9696. border: 1px solid black; /* 线条样式 */
  9697. padding: 8px;
  9698. text-align: left;
  9699. }
  9700. </style>
  9701. </head>
  9702. <body>
  9703. ${html}
  9704. </body>
  9705. </html>`;
  9706. // debugger
  9707. const blob = htmlDocx.asBlob(content)
  9708. // debugger
  9709. let dname = a + ".docx";
  9710. // 创建文件流
  9711. // 创建bolb实例时,内容一定要放在[]中
  9712. // const blob = new Blob([content], {
  9713. // type: "text/plain;charset='utf-8'",
  9714. // });
  9715. // const file = new File([blob], dname, { type: 'application/msword' });
  9716. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9717. // let params = convertApi.createParams()
  9718. // params.add('file', file)
  9719. // try {
  9720. // let result = await convertApi.convert('docx', 'docx', params)
  9721. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  9722. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  9723. // });
  9724. // await this.beforeUploadHtml(file, index, callback)
  9725. // } catch (error) {
  9726. // console.log('=================','报错')
  9727. // await this.beforeUploadHtml(file, index, callback)
  9728. // return
  9729. // }
  9730. await this.beforeUploadHtml(file, index, callback)
  9731. },
  9732. async generateExport(a, html, index) {
  9733. // <html lang="en">
  9734. // 将html文件中需要用到的数据挂载到store上
  9735. const content = `<!DOCTYPE html>
  9736. <html xmlns:v='urn:schemas-microsoft-com:vml'xmlns:o='urn:schemas-microsoft-com:office:office'xmlns:w='urn:schemas-microsoft-com:office:word'xmlns:m='http://schemas.microsoft.com/office/2004/12/omml'xmlns='http://www.w3.org/TR/REC-html40'>
  9737. <head>
  9738. <!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:TrackMoves>false</w:TrackMoves><w:TrackFormatting/><w:ValidateAgainstSchemas/><w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><w:IgnoreMixedContent>false</w:IgnoreMixedContent><w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><w:DoNotPromoteQF/><w:LidThemeOther>EN-US</w:LidThemeOther><w:LidThemeAsian>ZH-CN</w:LidThemeAsian><w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><w:Compatibility><w:BreakWrappedTables/><w:SnapToGridInCell/><w:WrapTextWithPunct/><w:UseAsianBreakRules/><w:DontGrowAutofit/><w:SplitPgBreakAndParaMark/><w:DontVertAlignCellWithSp/><w:DontBreakConstrainedForcedTables/><w:DontVertAlignInTxbx/><w:Word11KerningPairs/><w:CachedColBalance/><w:UseFELayout/></w:Compatibility><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><m:mathPr><m:mathFont m:val='Cambria Math'/><m:brkBin m:val='before'/><m:brkBinSub m:val='--'/><m:smallFrac m:val='off'/><m:dispDef/><m:lMargin m:val='0'/> <m:rMargin m:val='0'/><m:defJc m:val='centerGroup'/><m:wrapIndent m:val='1440'/><m:intLim m:val='subSup'/><m:naryLim m:val='undOvr'/></m:mathPr></w:WordDocument></xml><![endif]-->
  9739. <meta charset="UTF-8">
  9740. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9741. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9742. <title>${a}</title>
  9743. <style>
  9744. table {
  9745. border-collapse: collapse; /* 折叠边框 */
  9746. width: 100%;
  9747. }
  9748. th, td {
  9749. border: 1px solid black; /* 线条样式 */
  9750. padding: 8px;
  9751. text-align: left;
  9752. }
  9753. </style>
  9754. </head>
  9755. <body>
  9756. ${html}
  9757. </body>
  9758. </html>`;
  9759. // debugger
  9760. const blob = htmlDocx.asBlob(content)
  9761. // debugger
  9762. const dname = `${a}.docx`;
  9763. // 创建文件流
  9764. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9765. // let params = convertApi.createParams()
  9766. // params.add('file', file)
  9767. // try {
  9768. // let result = await convertApi.convert('docx', 'docx', params)
  9769. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  9770. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  9771. // });
  9772. // // 执行下载
  9773. // saveAs(file, dname);
  9774. // } catch (error) {
  9775. // saveAs(file, dname);
  9776. // // this.$message.error('导出失败')
  9777. // }
  9778. saveAs(file, dname);
  9779. // return file
  9780. },
  9781. async generateExport2(a, html, index) {
  9782. return new Promise(async (resolve) => {
  9783. // <html lang="en">
  9784. // 将html文件中需要用到的数据挂载到store上
  9785. const content = `<!DOCTYPE html>
  9786. <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'>
  9787. <head>
  9788. <!--[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]-->
  9789. <meta charset="UTF-8">
  9790. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9791. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9792. <title>${a}</title>
  9793. <style>
  9794. table {
  9795. border-collapse: collapse; /* 折叠边框 */
  9796. width: 100%;
  9797. }
  9798. th, td {
  9799. border: 1px solid black; /* 线条样式 */
  9800. padding: 8px;
  9801. text-align: left;
  9802. }
  9803. </style>
  9804. </head>
  9805. <body>
  9806. ${html}
  9807. </body>
  9808. </html>`;
  9809. // debugger
  9810. const blob = htmlDocx.asBlob(content)
  9811. // debugger
  9812. const dname = `${a}`;
  9813. // 创建文件流
  9814. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9815. let params = convertApi.createParams()
  9816. params.add('file', file)
  9817. resolve(file); // 通过 Promise 返回 File 对象
  9818. // try {
  9819. // let result = await convertApi.convert('docx', 'docx', params)
  9820. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  9821. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  9822. // });
  9823. // resolve(file); // 通过 Promise 返回 File 对象
  9824. // } catch (error) {
  9825. // resolve(''); // 通过 Promise 返回 File 对象
  9826. // }
  9827. });
  9828. },
  9829. beforeUploadHtml(event, index, callback) {
  9830. var file = event;
  9831. var credentials = {
  9832. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9833. secretAccessKey: "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",
  9834. }; //秘钥形式的登录上传
  9835. window.AWS.config.update(credentials);
  9836. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9837. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9838. var _this = this;
  9839. if (file) {
  9840. var params = {
  9841. Key:
  9842. file.name.split(".")[0] +
  9843. new Date().getTime() +
  9844. "." +
  9845. file.name.split(".")[file.name.split(".").length - 1],
  9846. ContentType: file.type,
  9847. Body: file,
  9848. "Access-Control-Allow-Credentials": "*",
  9849. ACL: "public-read",
  9850. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9851. var options = {
  9852. partSize: 2048 * 1024 * 1024,
  9853. queueSize: 2,
  9854. leavePartsOnError: true,
  9855. };
  9856. bucket
  9857. .upload(params, options)
  9858. .on("httpUploadProgress", function (evt) {
  9859. //这里可以写进度条
  9860. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9861. })
  9862. .send(function (err, data) {
  9863. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  9864. _this.anLoading[0] = false
  9865. }
  9866. if(_this.courseState == 5){
  9867. _this.anLoading[index] = false
  9868. }
  9869. callback ? callback() : ''
  9870. _this.$forceUpdate();
  9871. if (err) {
  9872. _this.$message.error("上传失败");
  9873. } else {
  9874. let _index = 0
  9875. // if(_this.lineCount == 0 || _this.lineCount){
  9876. // _index = _this.lineCount
  9877. // }else {
  9878. _index = index
  9879. // }
  9880. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  9881.                   name: file.name,
  9882.                   url: data.Location,
  9883.                   type: 3,
  9884.                 })
  9885. console.log(data.Location);
  9886. }
  9887. });
  9888. }
  9889. },
  9890. async generate2(a, html, index, callback) {
  9891. // 将html文件中需要用到的数据挂载到store上
  9892. const content = `<!DOCTYPE html>
  9893. <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'>
  9894. <head>
  9895. <!--[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]-->
  9896. <meta charset="UTF-8">
  9897. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9898. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9899. <title>${a}</title>
  9900. <style>
  9901. table {
  9902. border-collapse: collapse; /* 折叠边框 */
  9903. width: 100%;
  9904. }
  9905. th, td {
  9906. border: 1px solid black; /* 线条样式 */
  9907. padding: 8px;
  9908. text-align: left;
  9909. }
  9910. </style>
  9911. </head>
  9912. <body>
  9913. ${html}
  9914. </body>
  9915. </html>`;
  9916. const blob = htmlDocx.asBlob(content)
  9917. // debugger
  9918. let dname = a + ".docx";
  9919. // 创建文件流
  9920. // 创建bolb实例时,内容一定要放在[]中
  9921. // const blob = new Blob([content], {
  9922. // type: "text/plain;charset='utf-8'",
  9923. // });
  9924. // const file = new File([blob], dname, { type: 'application/msword' });
  9925. let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9926. // let params = convertApi.createParams()
  9927. // params.add('file', file)
  9928. // try {
  9929. // let result = await convertApi.convert('docx', 'docx', params)
  9930. // file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  9931. // return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  9932. // });
  9933. // await this.beforeUploadHtml2(file, index, callback)
  9934. // } catch (error) {
  9935. // await this.beforeUploadHtml2(file, index, callback)
  9936. // return;
  9937. // }
  9938. await this.beforeUploadHtml2(file, index, callback)
  9939. },
  9940. beforeUploadHtml2(event, index, callback) {
  9941. var file = event;
  9942. var credentials = {
  9943. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9944. secretAccessKey: "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",
  9945. }; //秘钥形式的登录上传
  9946. window.AWS.config.update(credentials);
  9947. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9948. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9949. var _this = this;
  9950. if (file) {
  9951. var params = {
  9952. Key:
  9953. file.name.split(".")[0] +
  9954. new Date().getTime() +
  9955. "." +
  9956. file.name.split(".")[file.name.split(".").length - 1],
  9957. ContentType: file.type,
  9958. Body: file,
  9959. "Access-Control-Allow-Credentials": "*",
  9960. ACL: "public-read",
  9961. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9962. var options = {
  9963. partSize: 2048 * 1024 * 1024,
  9964. queueSize: 2,
  9965. leavePartsOnError: true,
  9966. };
  9967. bucket
  9968. .upload(params, options)
  9969. .on("httpUploadProgress", function (evt) {
  9970. //这里可以写进度条
  9971. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9972. })
  9973. .send(async function (err, data) {
  9974. if(_this.courseState == 5){
  9975. _this.loading = false
  9976. }
  9977. if (err) {
  9978. callback ? callback() : ''
  9979. _this.$message.error("上传失败");
  9980. } else {
  9981. let fileid = await _this.createFileid(data.Location)
  9982. // _this.cankaoInfoData.push({
  9983. //                   name: file.name,
  9984. //                   url: data.Location,
  9985. //                   type: 3,
  9986. // fileid: fileid,
  9987. //   })
  9988. _this.infoData2.push({
  9989.                   name: file.name,
  9990.                   url: data.Location,
  9991.                   type: 3,
  9992. fileid: fileid == 1 ? '' : fileid,
  9993.   })
  9994. _this.infoData.push({
  9995. name: file.name,
  9996. url: data.Location,
  9997. type: 3,
  9998. fileid: fileid == 1 ? '' : fileid,
  9999. });
  10000. console.log(data.Location);
  10001. callback ? callback() : ''
  10002. }
  10003. });
  10004. }
  10005. },
  10006. addSource() {
  10007. if (!Object.keys(this.sourceData).length) {
  10008. this.$message.error("请选择要上传的资源");
  10009. return;
  10010. }
  10011. let keys = Object.keys(this.sourceData);
  10012. for (var i = 0; i < keys.length; i++) {
  10013. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10014. this.lineCount
  10015. ].chapterData.unshift({
  10016. name: "链接",
  10017. title: this.sourceData[keys[i]].name,
  10018. url: this.sourceData[keys[i]].url,
  10019. type: 14,
  10020. id: keys[i],
  10021. });
  10022. }
  10023. this.$forceUpdate();
  10024. this.dialogVisibleSource = false;
  10025. },
  10026. updateSource() {
  10027. if (!Object.keys(this.sourceData).length) {
  10028. this.$message.error("请选择要上传的资源");
  10029. return;
  10030. }
  10031. let keys = Object.keys(this.sourceData);
  10032. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10033. this.taskCount
  10034. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  10035. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10036. this.taskCount
  10037. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  10038. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10039. this.taskCount
  10040. ].chapterData[this.lineCount].id = keys[0];
  10041. this.updateSourcePan = false;
  10042. this.$forceUpdate();
  10043. this.dialogVisibleSource = false;
  10044. },
  10045. deleteM(i, j) {
  10046. this.testJson.testJson[i].timuList.splice(j, 1);
  10047. },
  10048. beforeUploadTiMu(event, i) {
  10049. const loading = this.openLoading();
  10050. var file = event.target.files[0];
  10051. var credentials = {
  10052. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10053. secretAccessKey: "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",
  10054. }; //秘钥形式的登录上传
  10055. window.AWS.config.update(credentials);
  10056. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10057. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10058. var _this = this;
  10059. if (file) {
  10060. var params = {
  10061. Key:
  10062. file.name.split(".")[0] +
  10063. new Date().getTime() +
  10064. "." +
  10065. file.name.split(".")[file.name.split(".").length - 1],
  10066. ContentType: file.type,
  10067. Body: file,
  10068. "Access-Control-Allow-Credentials": "*",
  10069. ACL: "public-read",
  10070. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10071. var options = {
  10072. partSize: 2048 * 1024 * 1024,
  10073. queueSize: 2,
  10074. leavePartsOnError: true,
  10075. };
  10076. bucket
  10077. .upload(params, options)
  10078. .on("httpUploadProgress", function (evt) {
  10079. //这里可以写进度条
  10080. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10081. })
  10082. .send(function (err, data) {
  10083. loading.close();
  10084. if (err) {
  10085. _this.$message.error("上传失败");
  10086. } else {
  10087. if (_this.testJson.testJson[i].timuList) {
  10088. _this.testJson.testJson[i].timuList.push({
  10089. src: data.Location,
  10090. });
  10091. } else {
  10092. _this.testJson.testJson[i].timuList = [];
  10093. _this.testJson.testJson[i].timuList.push({
  10094. src: data.Location,
  10095. });
  10096. }
  10097. _this.imgChange3(i);
  10098. _this.$forceUpdate();
  10099. }
  10100. });
  10101. }
  10102. },
  10103. beforeUploadTi(event, i, j) {
  10104. const loading = this.openLoading();
  10105. var file = event.target.files[0];
  10106. var credentials = {
  10107. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10108. secretAccessKey: "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",
  10109. }; //秘钥形式的登录上传
  10110. window.AWS.config.update(credentials);
  10111. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10112. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10113. var _this = this;
  10114. if (file) {
  10115. var params = {
  10116. Key:
  10117. file.name.split(".")[0] +
  10118. new Date().getTime() +
  10119. "." +
  10120. file.name.split(".")[file.name.split(".").length - 1],
  10121. ContentType: file.type,
  10122. Body: file,
  10123. "Access-Control-Allow-Credentials": "*",
  10124. ACL: "public-read",
  10125. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10126. var options = {
  10127. partSize: 2048 * 1024 * 1024,
  10128. queueSize: 2,
  10129. leavePartsOnError: true,
  10130. };
  10131. bucket
  10132. .upload(params, options)
  10133. .on("httpUploadProgress", function (evt) {
  10134. //这里可以写进度条
  10135. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10136. })
  10137. .send(function (err, data) {
  10138. loading.close();
  10139. if (err) {
  10140. _this.$message.error("上传失败");
  10141. } else {
  10142. _this.testJson.testJson[i].checkList[j] = {};
  10143. _this.testJson.testJson[i].checkList[j].src = data.Location;
  10144. _this.testJson.testJson[i].checkList[j].imgType = 1;
  10145. _this.imgChange2(i, j);
  10146. _this.$forceUpdate();
  10147. }
  10148. });
  10149. }
  10150. },
  10151. beforeUpload1(event, type) {
  10152. // const loading = this.openLoading();
  10153. var file = event.target.files[0];
  10154. var credentials = {
  10155. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10156. secretAccessKey: "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",
  10157. }; //秘钥形式的登录上传
  10158. window.AWS.config.update(credentials);
  10159. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10160. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10161. var _this = this;
  10162. if (file) {
  10163. var params = {
  10164. Key:
  10165. file.name.split(".")[0] +
  10166. new Date().getTime() +
  10167. "." +
  10168. file.name.split(".")[file.name.split(".").length - 1],
  10169. ContentType: file.type,
  10170. Body: file,
  10171. "Access-Control-Allow-Credentials": "*",
  10172. ACL: "public-read",
  10173. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10174. var options = {
  10175. partSize: 2048 * 1024 * 1024,
  10176. queueSize: 2,
  10177. leavePartsOnError: true,
  10178. };
  10179. bucket
  10180. .upload(params, options)
  10181. .on("httpUploadProgress", function (evt) {
  10182. //这里可以写进度条
  10183. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10184. })
  10185. .send(function (err, data) {
  10186. // loading.close();
  10187. if (err) {
  10188. // var a = _this.$refs.upload1.uploadFiles;
  10189. // a.splice(a.length - 1, a.length);
  10190. _this.$message.error("上传失败");
  10191. } else {
  10192. // _this.cover.push({
  10193. // name: file.name,
  10194. // url: data.Location,
  10195. // uid: file.uid,
  10196. // });
  10197. _this.cover = [
  10198. {
  10199. name: file.name,
  10200. url: data.Location,
  10201. uid: file.uid,
  10202. },
  10203. ];
  10204. _this.imgChange1(null, null, 1, null);
  10205. _this.choosePicVisible = false;
  10206. console.log(data.Location);
  10207. }
  10208. });
  10209. }
  10210. },
  10211. beforeUploadSelect(event, type) {
  10212. // const loading = this.openLoading();
  10213. var file = event.target.files[0];
  10214. var credentials = {
  10215. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10216. secretAccessKey: "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",
  10217. }; //秘钥形式的登录上传
  10218. window.AWS.config.update(credentials);
  10219. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10220. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10221. var _this = this;
  10222. if (file) {
  10223. var params = {
  10224. Key:
  10225. file.name.split(".")[0] +
  10226. new Date().getTime() +
  10227. "." +
  10228. file.name.split(".")[file.name.split(".").length - 1],
  10229. ContentType: file.type,
  10230. Body: file,
  10231. "Access-Control-Allow-Credentials": "*",
  10232. ACL: "public-read",
  10233. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10234. var options = {
  10235. partSize: 2048 * 1024 * 1024,
  10236. queueSize: 2,
  10237. leavePartsOnError: true,
  10238. };
  10239. bucket
  10240. .upload(params, options)
  10241. .on("httpUploadProgress", function (evt) {
  10242. //这里可以写进度条
  10243. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10244. })
  10245. .send(function (err, data) {
  10246. // loading.close();
  10247. if (err) {
  10248. _this.$message.error("上传失败");
  10249. } else {
  10250. _this.selectJson.url = data.Location;
  10251. console.log(data.Location);
  10252. }
  10253. });
  10254. }
  10255. },
  10256. chooseSysPic(p) {
  10257. this.cover = [];
  10258. setTimeout(() => {
  10259. this.cover[0] = {
  10260. name: "系统图片.png",
  10261. url: p,
  10262. };
  10263. this.imgChange1(null, null, 1, null);
  10264. this.$forceUpdate();
  10265. }, 0);
  10266. this.isSysPic = true;
  10267. this.isSysPic2 = false;
  10268. this.sysPicVisible = false;
  10269. this.$forceUpdate();
  10270. },
  10271. chooseSysPic2(p) {
  10272. this.cover = [];
  10273. setTimeout(() => {
  10274. this.cover[0] = {
  10275. name: "网络图片.png",
  10276. url: p,
  10277. };
  10278. this.imgChange1(null, null, 1, null);
  10279. this.$forceUpdate();
  10280. }, 0);
  10281. this.isSysPic2 = true;
  10282. this.isSysPic = false;
  10283. this.sysPicVisible2 = false;
  10284. this.$forceUpdate();
  10285. },
  10286. beforeUpload(data) {
  10287. this.$refs.upload1.uploadFiles;
  10288. this.uploadLoading1 = true;
  10289. var file = data.file;
  10290. var credentials = {
  10291. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10292. secretAccessKey: "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",
  10293. }; //秘钥形式的登录上传
  10294. window.AWS.config.update(credentials);
  10295. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10296. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10297. var _this = this;
  10298. if (file) {
  10299. var params = {
  10300. Key:
  10301. file.name.split(".")[0] +
  10302. new Date().getTime() +
  10303. "." +
  10304. file.name.split(".")[file.name.split(".").length - 1],
  10305. ContentType: file.type,
  10306. Body: file,
  10307. "Access-Control-Allow-Credentials": "*",
  10308. ACL: "public-read",
  10309. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10310. var options = {
  10311. partSize: 2048 * 1024 * 1024,
  10312. queueSize: 2,
  10313. leavePartsOnError: true,
  10314. };
  10315. bucket
  10316. .upload(params, options)
  10317. .on("httpUploadProgress", function (evt) {
  10318. //这里可以写进度条
  10319. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10320. })
  10321. .send(function (err, data) {
  10322. _this.uploadLoading1 = false;
  10323. if (err) {
  10324. // var a = _this.$refs.upload1.uploadFiles;
  10325. // a.splice(a.length - 1, a.length);
  10326. _this.$message.error("上传失败");
  10327. } else {
  10328. //上传成功处理
  10329. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  10330. name: file.name,
  10331. url: data.Location,
  10332. uid: file.uid,
  10333. });
  10334. _this.imgChange();
  10335. console.log(data.Location);
  10336. }
  10337. });
  10338. }
  10339. },
  10340. onExceed() {
  10341. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  10342. },
  10343. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  10344. let file = "";
  10345. let cfindex2 = 0;
  10346. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10347. // var file = event.target.files[0];
  10348. file = event.target.files[cfindex];
  10349. let fileName = file.name
  10350. let fileUid = file.uid
  10351. // const loading = this.openLoading();
  10352. // var file = event.target.files[0];
  10353. var credentials = {
  10354. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10355. secretAccessKey: "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",
  10356. }; //秘钥形式的登录上传
  10357. window.AWS.config.update(credentials);
  10358. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10359. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10360. var _this = this;
  10361. if (type == 3) {
  10362. var b = [
  10363. "DOC",
  10364. "DOCX",
  10365. "DOCM",
  10366. "DOTM",
  10367. "DOTX",
  10368. "PPTX",
  10369. "PPSX",
  10370. "PPT",
  10371. "PPS",
  10372. "PPTM",
  10373. "POTM",
  10374. "PPAM",
  10375. "POTX",
  10376. "PPSM",
  10377. ];
  10378. if (
  10379. b.indexOf(
  10380. file.name
  10381. .split(".")
  10382. [file.name.split(".").length - 1].toLocaleUpperCase()
  10383. ) != -1
  10384. ) {
  10385. if (file.size / 1024 / 1024 > 80) {
  10386. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10387. this.inputShow = true;
  10388. // var a = _this.$refs.upload1.uploadFiles;
  10389. // a.splice(a.length - 1, a.length);
  10390. // loading.close();
  10391. return;
  10392. }
  10393. } else if (
  10394. file.name
  10395. .split(".")
  10396. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10397. ) {
  10398. if (file.size / 1024 / 1024 > 80) {
  10399. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10400. this.inputShow = true;
  10401. // var a = _this.$refs.upload1.uploadFiles;
  10402. // a.splice(a.length - 1, a.length);
  10403. // loading.close();
  10404. return;
  10405. }
  10406. }
  10407. }
  10408. this.inputShow = false;
  10409. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10410. // itemTaskIndex
  10411. // ].progress = 0;
  10412. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10413. itemTaskIndex
  10414. ].proVisible = true;
  10415. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10416. itemTaskIndex
  10417. ].isFinishSize = 0;
  10418. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10419. itemTaskIndex
  10420. ].isAllSize = event.target.files.length;
  10421. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10422. // itemTaskIndex
  10423. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10424. _this.$forceUpdate();
  10425. if (file) {
  10426. var params = {
  10427. Key:
  10428. file.name.split(".")[0] +
  10429. new Date().getTime() +
  10430. "." +
  10431. file.name.split(".")[file.name.split(".").length - 1],
  10432. ContentType: file.type,
  10433. Body: file,
  10434. "Access-Control-Allow-Credentials": "*",
  10435. ACL: "public-read",
  10436. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10437. var options = {
  10438. partSize: 2048 * 1024 * 1024,
  10439. queueSize: 2,
  10440. leavePartsOnError: true,
  10441. };
  10442. bucket
  10443. .upload(params, options)
  10444. .on("httpUploadProgress", function (evt) {
  10445. //这里可以写进度条
  10446. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10447. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10448. // itemTaskIndex
  10449. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  10450. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10451. // itemTaskIndex
  10452. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10453. // _this.$forceUpdate();
  10454. })
  10455. .send(function (err, data) {
  10456. cfindex2++
  10457. // loading.close();
  10458. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10459. // itemTaskIndex
  10460. // ].progress = 100;
  10461. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10462. itemTaskIndex
  10463. ].isFinishSize = cfindex2
  10464. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10465. // itemTaskIndex
  10466. // ].isAllSize;
  10467. _this.$forceUpdate();
  10468. setTimeout(() => {
  10469. if (
  10470. cfindex2 == event.target.files.length ||
  10471. cfindex2 > event.target.files.length
  10472. ) {
  10473. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10474. itemTaskIndex
  10475. ].proVisible = false;
  10476. }
  10477. _this.$forceUpdate();
  10478. }, 1000);
  10479. _this.inputShow = true;
  10480. if (err) {
  10481. // var a = _this.$refs.upload1.uploadFiles;
  10482. // a.splice(a.length - 1, a.length);
  10483. _this.$message.error("上传失败");
  10484. } else {
  10485. if (type == 13) {
  10486. let _type = 2;
  10487. var imgA = [
  10488. "png",
  10489. "jpg",
  10490. "jpeg",
  10491. "bmp",
  10492. "gif",
  10493. "webp",
  10494. "psd",
  10495. "svg",
  10496. "tiff",
  10497. ];
  10498. var fileA = [
  10499. "PDF",
  10500. "DOC",
  10501. "DOCX",
  10502. "DOCM",
  10503. "DOTM",
  10504. "DOTX",
  10505. "PPTX",
  10506. "PPSX",
  10507. "PPT",
  10508. "PPS",
  10509. "PPTM",
  10510. "POTM",
  10511. "PPAM",
  10512. "POTX",
  10513. "PPSM",
  10514. "XLSX",
  10515. "XLS",
  10516. ];
  10517. var videoA = [
  10518. "AVI",
  10519. "NAVI",
  10520. "MPEG",
  10521. "ASF",
  10522. "MOV",
  10523. "WMV",
  10524. "3GP",
  10525. "RM",
  10526. "RMVB",
  10527. "FLV",
  10528. "F4V",
  10529. "H.264",
  10530. "H.265",
  10531. "REAL VIDEO",
  10532. "MKV",
  10533. "WebM",
  10534. "HDDVD",
  10535. "MP4",
  10536. "MPG",
  10537. "M4V",
  10538. "MGV",
  10539. "OGV",
  10540. "QTM",
  10541. "STR",
  10542. "AMC",
  10543. "DVX",
  10544. "EVO",
  10545. "DAT",
  10546. "OGG",
  10547. "OGM",
  10548. ];
  10549. if (
  10550. fileA.indexOf(
  10551. data.Location.split(".")[
  10552. data.Location.split(".").length - 1
  10553. ].toLocaleUpperCase()
  10554. ) != -1
  10555. ) {
  10556. _type = 3;
  10557. } else if (
  10558. videoA.indexOf(
  10559. data.Location.split(".")[
  10560. data.Location.split(".").length - 1
  10561. ].toLocaleUpperCase()
  10562. ) != -1
  10563. ) {
  10564. _type = 2;
  10565. } else if (
  10566. imgA.indexOf(
  10567. data.Location.split(".")[
  10568. data.Location.split(".").length - 1
  10569. ].toLocaleLowerCase()
  10570. ) != -1
  10571. ) {
  10572. _type = 13;
  10573. } else {
  10574. _type = 12;
  10575. }
  10576. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10577. itemTaskIndex
  10578. ].chapterData.unshift({
  10579. name: fileName,
  10580. url: data.Location,
  10581. uid: fileUid,
  10582. type: _type,
  10583. });
  10584. _this.imgChange1(null, null, _type, itemTaskIndex);
  10585. } else if (type == 2 || type == 3 || type == 12) {
  10586. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10587. itemTaskIndex
  10588. ].chapterData.unshift({
  10589. name: fileName,
  10590. url: data.Location,
  10591. uid: fileUid,
  10592. type: type,
  10593. });
  10594. _this.imgChange1(null, null, type, itemTaskIndex);
  10595. } else if (type == 4) {
  10596. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10597. itemTaskIndex
  10598. ].fileList1.push({
  10599. name: fileName,
  10600. url: data.Location,
  10601. uid: fileUid,
  10602. });
  10603. _this.imgChange1(null, null, type, itemTaskIndex);
  10604. } else if (type == 5) {
  10605. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10606. itemTaskIndex
  10607. ].homeworkList.push({
  10608. name: fileName,
  10609. url: data.Location,
  10610. uid: fileUid,
  10611. });
  10612. _this.imgChange1(null, null, type, itemTaskIndex);
  10613. }
  10614. console.log(data.Location);
  10615. }
  10616. });
  10617. }
  10618. }
  10619. },
  10620. async beforeUploadInfo2(event, type, tindex) {
  10621. // const loading = this.openLoading();
  10622. let file = "";
  10623. let cfindex2 = 0;
  10624. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10625. // var file = event.target.files[0];
  10626. file = event.target.files[cfindex];
  10627. let fileName = file.name
  10628. let fileUid = file.uid
  10629. var credentials = {
  10630. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10631. secretAccessKey: "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",
  10632. }; //秘钥形式的登录上传
  10633. window.AWS.config.update(credentials);
  10634. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10635. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10636. var _this = this;
  10637. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  10638. if (
  10639. xianObj.indexOf(
  10640. file.name
  10641. .split(".")
  10642. [file.name.split(".").length - 1].toLocaleUpperCase()
  10643. ) == -1
  10644. ) {
  10645. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  10646. this.inputShow = true;
  10647. // var a = _this.$refs.upload1.uploadFiles;
  10648. // a.splice(a.length - 1, a.length);
  10649. // loading.close();
  10650. return;
  10651. }
  10652. if (
  10653. ['DOC'].indexOf(
  10654. file.name
  10655. .split(".")
  10656. [file.name.split(".").length - 1].toLocaleUpperCase()
  10657. ) !== -1
  10658. ) {
  10659. this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  10660. this.inputShow = true;
  10661. return;
  10662. }
  10663. if (type == 3) {
  10664. var b = [
  10665. "DOC",
  10666. "DOCX",
  10667. "DOCM",
  10668. "DOTM",
  10669. "DOTX",
  10670. "PPTX",
  10671. "PPSX",
  10672. "PPT",
  10673. "PPS",
  10674. "PPTM",
  10675. "POTM",
  10676. "PPAM",
  10677. "POTX",
  10678. "PPSM",
  10679. ];
  10680. if (
  10681. b.indexOf(
  10682. file.name
  10683. .split(".")
  10684. [file.name.split(".").length - 1].toLocaleUpperCase()
  10685. ) != -1
  10686. ) {
  10687. if (file.size / 1024 / 1024 > 80) {
  10688. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10689. this.inputShow = true;
  10690. // var a = _this.$refs.upload1.uploadFiles;
  10691. // a.splice(a.length - 1, a.length);
  10692. // loading.close();
  10693. return;
  10694. }
  10695. } else if (
  10696. file.name
  10697. .split(".")
  10698. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10699. ) {
  10700. if (file.size / 1024 / 1024 > 80) {
  10701. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10702. this.inputShow = true;
  10703. // var a = _this.$refs.upload1.uploadFiles;
  10704. // a.splice(a.length - 1, a.length);
  10705. // loading.close();
  10706. return;
  10707. }
  10708. }
  10709. }
  10710. this.inputShow = false;
  10711. if(type == 14){
  10712. // _this.teacherinfoprogress = 0;
  10713. _this.teacherinfoproVisible = true;
  10714. _this.teacherinfoisFinishSize = 0;
  10715. _this.teacherinfoisAllSize = event.target.files.length;
  10716. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  10717. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10718. }else if(type == 16){
  10719. _this.mubiaoinfoprogress = 0;
  10720. _this.mubiaoinfoproVisible = true;
  10721. _this.mubiaoinfoisFinishSize = 0;
  10722. _this.mubiaoinfoisAllSize = event.target.files.length;
  10723. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  10724. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10725. }else if(type == 17){
  10726. _this.xuanzeinfoprogress = 0;
  10727. _this.xuanzeinfoproVisible = true;
  10728. _this.xuanzeinfoisFinishSize = 0;
  10729. _this.xuanzeinfoisAllSize = event.target.files.length;
  10730. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10731. }else if(type == 18){
  10732. _this.pingjiainfoprogress[tindex] = 0;
  10733. _this.pingjiainfoproVisible[tindex] = true;
  10734. _this.pingjiainfoisFinishSize[tindex] = 0;
  10735. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  10736. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  10737. }else if(type == 19){
  10738. _this.knowinfoprogress = 0;
  10739. _this.knowinfoproVisible = true;
  10740. _this.knowinfoisFinishSize = 0;
  10741. _this.knowinfoisAllSize = event.target.files.length;
  10742. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  10743. }else if(type == 20){
  10744. _this.knowinfoprogress2 = 0;
  10745. _this.knowinfoproVisible2 = true;
  10746. _this.knowinfoisFinishSize2 = 0;
  10747. _this.knowinfoisAllSize2 = event.target.files.length;
  10748. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  10749. }else{
  10750. _this.infoprogress = 0;
  10751. _this.infoproVisible = true;
  10752. _this.infoisFinishSize = 0;
  10753. _this.infoisAllSize = event.target.files.length;
  10754. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10755. }
  10756. if (
  10757. ['DOC'].indexOf(
  10758. file.name
  10759. .split(".")
  10760. [file.name.split(".").length - 1].toLocaleUpperCase()
  10761. ) !== -1
  10762. ) {
  10763. // this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  10764. // this.inputShow = true;
  10765. let params = convertApi.createParams()
  10766. params.add('file', file)
  10767. try {
  10768. let result = await convertApi.convert('doc', 'docx', params);
  10769. // Get result file URL
  10770. file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
  10771. return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
  10772. });
  10773. console.log(result)
  10774. console.log(file)
  10775. } catch (error) {
  10776. cfindex2++;
  10777. if(type == 14){
  10778. _this.teacherinfoisFinishSize = cfindex2;
  10779. }else if(type == 16){
  10780. _this.mubiaoinfoisFinishSize = cfindex2;
  10781. }else if(type == 17){
  10782. _this.xuanzeinfoisFinishSize = cfindex2;
  10783. }else if(type == 18){
  10784. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10785. }else if(type == 19){
  10786. _this.knowinfoisFinishSize = cfindex2;
  10787. }else if(type == 20){
  10788. _this.knowinfoisFinishSize2 = cfindex2;
  10789. }else {
  10790. _this.infoisFinishSize = cfindex2;
  10791. }
  10792. setTimeout(() => {
  10793. if (
  10794. cfindex2 == event.target.files.length ||
  10795. cfindex2 > event.target.files.length
  10796. ) {
  10797. if(type == 14){
  10798. _this.teacherinfoproVisible = false;
  10799. }else if(type == 16){
  10800. _this.mubiaoinfoproVisible = false;
  10801. }else if(type == 17){
  10802. _this.xuanzeinfoproVisible = false;
  10803. }else if(type == 18){
  10804. _this.pingjiainfoproVisible[tindex] = false;
  10805. }else if(type == 19){
  10806. _this.knowinfoproVisible = false;
  10807. }else if(type == 20){
  10808. _this.knowinfoproVisible2 = false;
  10809. }else{
  10810. _this.infoproVisible = false;
  10811. }
  10812. }
  10813. _this.$forceUpdate();
  10814. }, 1000);
  10815. _this.inputShow = true;
  10816. _this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  10817. // 捕捉到这个convertApi.convert报错就不要往下走了
  10818. return; // 直接返回,不继续执行后续代码
  10819. }
  10820. // return;
  10821. }
  10822. _this.$forceUpdate();
  10823. if (file) {
  10824. var params = {
  10825. Key:
  10826. file.name.split(".")[0] +
  10827. new Date().getTime() +
  10828. "." +
  10829. file.name.split(".")[file.name.split(".").length - 1],
  10830. ContentType: file.type,
  10831. Body: file,
  10832. "Access-Control-Allow-Credentials": "*",
  10833. ACL: "public-read",
  10834. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10835. var options = {
  10836. partSize: 2048 * 1024 * 1024,
  10837. queueSize: 2,
  10838. leavePartsOnError: true,
  10839. };
  10840. bucket
  10841. .upload(params, options)
  10842. .on("httpUploadProgress", function (evt) {
  10843. //这里可以写进度条
  10844. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10845. // if(type == 14){
  10846. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10847. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10848. // }else if(type == 16){
  10849. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10850. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10851. // }else if(type == 17){
  10852. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10853. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10854. // }else if(type == 18){
  10855. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  10856. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  10857. // }else {
  10858. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  10859. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10860. // }
  10861. _this.$forceUpdate();
  10862. })
  10863. .send(async function (err, data) {
  10864. // loading.close();
  10865. // if(type == 14){
  10866. // _this.teacherinfoprogress = 100;
  10867. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  10868. // }else if(type == 16){
  10869. // _this.mubiaoinfoprogress = 100;
  10870. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  10871. // }else if(type == 17){
  10872. // _this.xuanzeinfoprogress = 100;
  10873. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  10874. // }else if(type == 18){
  10875. // _this.pingjiainfoprogress[tindex] = 100;
  10876. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  10877. // }else {
  10878. // _this.infoprogress = 100;
  10879. // _this.infoisFinishSize = _this.infoisAllSize;
  10880. // }
  10881. _this.$forceUpdate();
  10882. _this.inputShow = true;
  10883. if (err) {
  10884. cfindex2++;
  10885. if(type == 14){
  10886. _this.teacherinfoisFinishSize = cfindex2;
  10887. }else if(type == 16){
  10888. _this.mubiaoinfoisFinishSize = cfindex2;
  10889. }else if(type == 17){
  10890. _this.xuanzeinfoisFinishSize = cfindex2;
  10891. }else if(type == 18){
  10892. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10893. }else if(type == 19){
  10894. _this.knowinfoisFinishSize = cfindex2;
  10895. }else if(type == 20){
  10896. _this.knowinfoisFinishSize2 = cfindex2;
  10897. }else {
  10898. _this.infoisFinishSize = cfindex2;
  10899. }
  10900. setTimeout(() => {
  10901. if (
  10902. cfindex2 == event.target.files.length ||
  10903. cfindex2 > event.target.files.length
  10904. ) {
  10905. if(type == 14){
  10906. _this.teacherinfoproVisible = false;
  10907. }else if(type == 16){
  10908. _this.mubiaoinfoproVisible = false;
  10909. }else if(type == 17){
  10910. _this.xuanzeinfoproVisible = false;
  10911. }else if(type == 18){
  10912. _this.pingjiainfoproVisible[tindex] = false;
  10913. }else if(type == 19){
  10914. _this.knowinfoproVisible = false;
  10915. }else if(type == 20){
  10916. _this.knowinfoproVisible2 = false;
  10917. }else{
  10918. _this.infoproVisible = false;
  10919. }
  10920. }
  10921. _this.$forceUpdate();
  10922. }, 1000);
  10923. // var a = _this.$refs.upload1.uploadFiles;
  10924. // a.splice(a.length - 1, a.length);
  10925. _this.$message.error("上传失败");
  10926. } else {
  10927. let fileid = await _this.createFileid(data.Location)
  10928. if(fileid){
  10929. cfindex2++;
  10930. if(type == 14){
  10931. _this.teacherinfoisFinishSize = cfindex2;
  10932. }else if(type == 16){
  10933. _this.mubiaoinfoisFinishSize = cfindex2;
  10934. }else if(type == 17){
  10935. _this.xuanzeinfoisFinishSize = cfindex2;
  10936. }else if(type == 18){
  10937. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10938. }else if(type == 19){
  10939. _this.knowinfoisFinishSize = cfindex2;
  10940. }else if(type == 20){
  10941. _this.knowinfoisFinishSize2 = cfindex2;
  10942. }else {
  10943. _this.infoisFinishSize = cfindex2;
  10944. }
  10945. if (
  10946. cfindex2 == event.target.files.length ||
  10947. cfindex2 > event.target.files.length
  10948. ) {
  10949. if(type == 14){
  10950. _this.teacherinfoproVisible = false;
  10951. }else if(type == 16){
  10952. _this.mubiaoinfoproVisible = false;
  10953. }else if(type == 17){
  10954. _this.xuanzeinfoproVisible = false;
  10955. }else if(type == 18){
  10956. _this.pingjiainfoproVisible[tindex] = false;
  10957. }else if(type == 19){
  10958. _this.knowinfoproVisible = false;
  10959. }else if(type == 20){
  10960. _this.knowinfoproVisible2 = false;
  10961. }else{
  10962. _this.infoproVisible = false;
  10963. }
  10964. }
  10965. _this.$forceUpdate();
  10966. }
  10967. if(fileid == 1){
  10968. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  10969. return;
  10970. }
  10971. var imgA = [
  10972. "png",
  10973. "jpg",
  10974. "jpeg",
  10975. "bmp",
  10976. "gif",
  10977. "webp",
  10978. "psd",
  10979. "svg",
  10980. "tiff",
  10981. ];
  10982. var fileA = [
  10983. "PDF",
  10984. "DOC",
  10985. "DOCX",
  10986. "DOCM",
  10987. "DOTM",
  10988. "DOTX",
  10989. "PPTX",
  10990. "PPSX",
  10991. "PPT",
  10992. "PPS",
  10993. "PPTM",
  10994. "POTM",
  10995. "PPAM",
  10996. "POTX",
  10997. "PPSM",
  10998. "XLSX",
  10999. "XLS",
  11000. ];
  11001. var videoA = [
  11002. "AVI",
  11003. "NAVI",
  11004. "MPEG",
  11005. "ASF",
  11006. "MOV",
  11007. "WMV",
  11008. "3GP",
  11009. "RM",
  11010. "RMVB",
  11011. "FLV",
  11012. "F4V",
  11013. "H.264",
  11014. "H.265",
  11015. "REAL VIDEO",
  11016. "MKV",
  11017. "WebM",
  11018. "HDDVD",
  11019. "MP4",
  11020. "MPG",
  11021. "M4V",
  11022. "MGV",
  11023. "OGV",
  11024. "QTM",
  11025. "STR",
  11026. "AMC",
  11027. "DVX",
  11028. "EVO",
  11029. "DAT",
  11030. "OGG",
  11031. "OGM",
  11032. ];
  11033. let _type = 2;
  11034. if (
  11035. fileA.indexOf(
  11036. data.Location.split(".")[
  11037. data.Location.split(".").length - 1
  11038. ].toLocaleUpperCase()
  11039. ) != -1
  11040. ) {
  11041. _type = 3;
  11042. } else if (
  11043. videoA.indexOf(
  11044. data.Location.split(".")[
  11045. data.Location.split(".").length - 1
  11046. ].toLocaleUpperCase()
  11047. ) != -1
  11048. ) {
  11049. _type = 2;
  11050. } else if (
  11051. imgA.indexOf(
  11052. data.Location.split(".")[
  11053. data.Location.split(".").length - 1
  11054. ].toLocaleLowerCase()
  11055. ) != -1
  11056. ) {
  11057. _type = 13;
  11058. } else {
  11059. _type = 12;
  11060. }
  11061. if (type == 13) {
  11062. _this.infoData.push({
  11063. name: fileName,
  11064. url: data.Location,
  11065. uid: fileUid,
  11066. type: _type,
  11067. fileid: fileid == 1 ? '' : fileid,
  11068. });
  11069. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11070. name: fileName,
  11071. url: data.Location,
  11072. uid: fileUid,
  11073. type: _type,
  11074. fileid: fileid == 1 ? '' : fileid,
  11075. })
  11076. }else if (type == 14) {
  11077. _this.teacherInfoData.push({
  11078. name: fileName,
  11079. url: data.Location,
  11080. uid: fileUid,
  11081. type: _type,
  11082. fileid: fileid == 1 ? '' : fileid,
  11083. });
  11084. _this.infoData2.push({
  11085. name: fileName,
  11086. url: data.Location,
  11087. uid: fileUid,
  11088. type: _type,
  11089. fileid: fileid == 1 ? '' : fileid,
  11090. });
  11091. _this.infoData.push({
  11092. name: fileName,
  11093. url: data.Location,
  11094. uid: fileUid,
  11095. type: _type,
  11096. fileid: fileid == 1 ? '' : fileid,
  11097. });
  11098. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11099. name: fileName,
  11100. url: data.Location,
  11101. uid: fileUid,
  11102. type: _type,
  11103. fileid: fileid == 1 ? '' : fileid,
  11104. })
  11105. }else if (type == 15) {
  11106. _this.infoData2.push({
  11107. name: fileName,
  11108. url: data.Location,
  11109. uid: fileUid,
  11110. type: _type,
  11111. fileid: fileid == 1 ? '' : fileid,
  11112. });
  11113. _this.infoData.push({
  11114. name: fileName,
  11115. url: data.Location,
  11116. uid: fileUid,
  11117. type: _type,
  11118. fileid: fileid == 1 ? '' : fileid,
  11119. });
  11120. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  11121. name: fileName,
  11122. url: data.Location,
  11123. uid: fileUid,
  11124. type: _type,
  11125. fileid: fileid == 1 ? '' : fileid,
  11126. })
  11127. }else if (type == 16) {
  11128. _this.mubiaoInfoData.push({
  11129. name: fileName,
  11130. url: data.Location,
  11131. uid: fileUid,
  11132. type: _type,
  11133. fileid: fileid == 1 ? '' : fileid,
  11134. });
  11135. }else if (type == 17) {
  11136. _this.xuanzeInfoData.push({
  11137. name: fileName,
  11138. url: data.Location,
  11139. uid: fileUid,
  11140. type: _type,
  11141. fileid: fileid == 1 ? '' : fileid,
  11142. });
  11143. }else if (type == 18) {
  11144. if(!_this.pingjiaInfoData[tindex]){
  11145. _this.pingjiaInfoData[tindex] = []
  11146. }
  11147. _this.pingjiaInfoData[tindex].push({
  11148. name: fileName,
  11149. url: data.Location,
  11150. uid: fileUid,
  11151. type: _type,
  11152. fileid: fileid == 1 ? '' : fileid,
  11153. });
  11154. }else if (type == 19) {
  11155. _this.knowInfoData.push({
  11156. name: fileName,
  11157. url: data.Location,
  11158. uid: fileUid,
  11159. type: _type,
  11160. fileid: fileid == 1 ? '' : fileid,
  11161. });
  11162. if(fileid != 1){
  11163. _this.knowFileids.push(fileid)
  11164. }
  11165. }else if (type == 20) {
  11166. _this.knowInfoData2.push({
  11167. name: fileName,
  11168. url: data.Location,
  11169. uid: fileUid,
  11170. type: _type,
  11171. fileid: fileid == 1 ? '' : fileid,
  11172. });
  11173. if(fileid != 1){
  11174. _this.knowFileids2.push(fileid)
  11175. }
  11176. }
  11177. console.log(data.Location);
  11178. console.log(fileName,'----------',fileid);
  11179. }
  11180. });
  11181. }
  11182. }
  11183. },
  11184. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  11185. // const loading = this.openLoading();
  11186. var file = event.target.files[0];
  11187. var credentials = {
  11188. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  11189. secretAccessKey: "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",
  11190. }; //秘钥形式的登录上传
  11191. window.AWS.config.update(credentials);
  11192. window.AWS.config.region = "cn-northwest-1"; //设置区域
  11193. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  11194. var _this = this;
  11195. if (type == 3) {
  11196. var b = [
  11197. "DOC",
  11198. "DOCX",
  11199. "DOCM",
  11200. "DOTM",
  11201. "DOTX",
  11202. "PPTX",
  11203. "PPSX",
  11204. "PPT",
  11205. "PPS",
  11206. "PPTM",
  11207. "POTM",
  11208. "PPAM",
  11209. "POTX",
  11210. "PPSM",
  11211. ];
  11212. if (
  11213. b.indexOf(
  11214. file.name
  11215. .split(".")
  11216. [file.name.split(".").length - 1].toLocaleUpperCase()
  11217. ) != -1
  11218. ) {
  11219. if (file.size / 1024 / 1024 > 80) {
  11220. this.$message.error("上传文件大于80兆,请重新选择文件!");
  11221. this.inputShow = true;
  11222. // var a = _this.$refs.upload1.uploadFiles;
  11223. // a.splice(a.length - 1, a.length);
  11224. // loading.close();
  11225. return;
  11226. }
  11227. } else if (
  11228. file.name
  11229. .split(".")
  11230. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  11231. ) {
  11232. if (file.size / 1024 / 1024 > 80) {
  11233. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  11234. this.inputShow = true;
  11235. // var a = _this.$refs.upload1.uploadFiles;
  11236. // a.splice(a.length - 1, a.length);
  11237. // loading.close();
  11238. return;
  11239. }
  11240. }
  11241. }
  11242. this.inputShow = false;
  11243. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11244. itemTaskIndex
  11245. ].progress = 0;
  11246. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11247. itemTaskIndex
  11248. ].proVisible = true;
  11249. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11250. itemTaskIndex
  11251. ].isFinishSize = 0;
  11252. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11253. itemTaskIndex
  11254. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  11255. _this.$forceUpdate();
  11256. if (file) {
  11257. var params = {
  11258. Key:
  11259. file.name.split(".")[0] +
  11260. new Date().getTime() +
  11261. "." +
  11262. file.name.split(".")[file.name.split(".").length - 1],
  11263. ContentType: file.type,
  11264. Body: file,
  11265. "Access-Control-Allow-Credentials": "*",
  11266. ACL: "public-read",
  11267. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  11268. var options = {
  11269. partSize: 2048 * 1024 * 1024,
  11270. queueSize: 2,
  11271. leavePartsOnError: true,
  11272. };
  11273. bucket
  11274. .upload(params, options)
  11275. .on("httpUploadProgress", function (evt) {
  11276. //这里可以写进度条
  11277. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  11278. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11279. itemTaskIndex
  11280. ].progress = parseInt((evt.loaded / evt.total) * 100);
  11281. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11282. itemTaskIndex
  11283. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  11284. _this.$forceUpdate();
  11285. })
  11286. .send(function (err, data) {
  11287. // loading.close();
  11288. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11289. itemTaskIndex
  11290. ].progress = 100;
  11291. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11292. itemTaskIndex
  11293. ].isFinishSize =
  11294. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11295. itemTaskIndex
  11296. ].isAllSize;
  11297. _this.$forceUpdate();
  11298. setTimeout(() => {
  11299. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11300. itemTaskIndex
  11301. ].proVisible = false;
  11302. _this.$forceUpdate();
  11303. }, 1000);
  11304. _this.inputShow = true;
  11305. if (err) {
  11306. // var a = _this.$refs.upload1.uploadFiles;
  11307. // a.splice(a.length - 1, a.length);
  11308. _this.$message.error("上传失败");
  11309. } else {
  11310. if (type == 2 || type == 3) {
  11311. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11312. itemTaskIndex
  11313. ].chapterData.unshift({
  11314. name: file.name,
  11315. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11316. // itemTaskIndex
  11317. // ].chapterData.length+1),
  11318. url: data.Location,
  11319. uid: file.uid,
  11320. type: type,
  11321. text: string,
  11322. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  11323. // itemTaskIndex
  11324. // ].chapterData.length + 1),
  11325. });
  11326. _this.imgChange1(null, null, type, itemTaskIndex);
  11327. } else if (type == 4) {
  11328. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11329. itemTaskIndex
  11330. ].fileList1.push({
  11331. name: file.name,
  11332. url: data.Location,
  11333. uid: file.uid,
  11334. });
  11335. _this.imgChange1(null, null, type, itemTaskIndex);
  11336. } else if (type == 5) {
  11337. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  11338. itemTaskIndex
  11339. ].homeworkList.push({
  11340. name: file.name,
  11341. url: data.Location,
  11342. uid: file.uid,
  11343. });
  11344. _this.imgChange1(null, null, type, itemTaskIndex);
  11345. }
  11346. console.log(data.Location);
  11347. }
  11348. });
  11349. }
  11350. },
  11351. addunit() {
  11352. this.unitJson.push({
  11353. dyName: "", //单元标题
  11354. isUpdate: 1,
  11355. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  11356. chapterInfo: [
  11357. {
  11358. isread: false,
  11359. chapterid: this.guid(),
  11360. title: "",
  11361. courseName: "",
  11362. taskJson: [
  11363. {
  11364. task: "",
  11365. taskDetail: "",
  11366. chapterData: [],
  11367. toolText: "",
  11368. toolChoose: [
  11369. {
  11370. tool: [],
  11371. toolDetail: "",
  11372. toolType: 0,
  11373. askCount: 1,
  11374. askTitle: "",
  11375. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11376. },
  11377. ],
  11378. isShowTools: false,
  11379. askCount: 1,
  11380. isFold: 1,
  11381. askTitle: "",
  11382. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11383. checkJson: [{ checkCount: [], checkPerent: [] }],
  11384. homeworkList: [],
  11385. },
  11386. ],
  11387. itemCount: 1,
  11388. fileList1: [],
  11389. video: [],
  11390. testData: [],
  11391. pData: [],
  11392. templateArray: [],
  11393. },
  11394. ],
  11395. });
  11396. this.addindex = this.unitJson.length - 1;
  11397. setTimeout(() => {
  11398. this.unitIndex = this.unitJson.length - 1;
  11399. setTimeout(() => {
  11400. console.log(this.$refs.dyInput);
  11401. this.$refs.dyInput[0].focus();
  11402. }, 100);
  11403. this.unitSet(this.unitIndex);
  11404. }, 0);
  11405. },
  11406. addToolFun(itemTaskIndex) {
  11407. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11408. itemTaskIndex
  11409. ].toolChoose.push({
  11410. tool: [],
  11411. toolDetail: "",
  11412. toolType: 0,
  11413. askCount: 1,
  11414. askTitle: "",
  11415. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11416. });
  11417. },
  11418. addTaskBorder() {
  11419. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  11420. task: "",
  11421. taskDetail: "",
  11422. chapterData: [],
  11423. toolText: "",
  11424. toolChoose: [
  11425. {
  11426. tool: [],
  11427. toolDetail: "",
  11428. toolType: 0,
  11429. askCount: 1,
  11430. askTitle: "",
  11431. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11432. },
  11433. ],
  11434. isShowTools: false,
  11435. askCount: 1,
  11436. isFold: 1, //任务收起状态
  11437. askTitle: "",
  11438. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11439. checkJson: [{ checkCount: [], checkPerent: [] }],
  11440. homeworkList: [],
  11441. });
  11442. setTimeout(() => {
  11443. this.checkEva(this.checkId);
  11444. setTimeout(() => {
  11445. this.checkEva(this.checkId);
  11446. }, 100);
  11447. }, 100);
  11448. },
  11449. addTaskBorder2(type, index) {
  11450. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  11451. this.$message({
  11452. message: "有大纲在生成请生成完之后才能使用此功能",
  11453. type: "warning"
  11454. });
  11455. return;
  11456. }
  11457. if(type == 1){
  11458. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  11459. task: "",
  11460. isTask2: true,
  11461. isTask3: true,
  11462. taskDetail: "",
  11463. chapterData: [],
  11464. toolText: "",
  11465. toolChoose: [
  11466. {
  11467. tool: [],
  11468. toolDetail: "",
  11469. toolType: 0,
  11470. askCount: 1,
  11471. askTitle: "",
  11472. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11473. },
  11474. ],
  11475. isShowTools: false,
  11476. askCount: 1,
  11477. isFold: 0, //任务收起状态
  11478. askTitle: "",
  11479. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11480. checkJson: [{ checkCount: [], checkPerent: [] }],
  11481. homeworkList: [],
  11482. })
  11483. }else if(type == 2){
  11484. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  11485. task: "",
  11486. isTask2: true,
  11487. isTask3: true,
  11488. taskDetail: "",
  11489. chapterData: [],
  11490. toolText: "",
  11491. toolChoose: [
  11492. {
  11493. tool: [],
  11494. toolDetail: "",
  11495. toolType: 0,
  11496. askCount: 1,
  11497. askTitle: "",
  11498. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11499. },
  11500. ],
  11501. isShowTools: false,
  11502. askCount: 1,
  11503. isFold: 0, //任务收起状态
  11504. askTitle: "",
  11505. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11506. checkJson: [{ checkCount: [], checkPerent: [] }],
  11507. homeworkList: [],
  11508. })
  11509. }
  11510. setTimeout(() => {
  11511. this.checkEva(this.checkId);
  11512. setTimeout(() => {
  11513. this.checkEva(this.checkId);
  11514. }, 100);
  11515. }, 100);
  11516. },
  11517. add(e, i) {
  11518. var el = e.currentTarget;
  11519. el.getElementsByTagName("input")[0].click();
  11520. },
  11521. fold(i, e) {
  11522. if (
  11523. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  11524. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  11525. ) {
  11526. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  11527. } else {
  11528. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  11529. }
  11530. },
  11531. fold2(i) {
  11532. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  11533. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11534. i
  11535. ].isFold2 = false;
  11536. } else {
  11537. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  11538. }
  11539. this.$forceUpdate();
  11540. },
  11541. foldEva(i) {
  11542. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  11543. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11544. i
  11545. ].isEvaFold = false;
  11546. } else {
  11547. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11548. i
  11549. ].isEvaFold = true;
  11550. setTimeout(() => {
  11551. this.checkEva(this.checkId);
  11552. setTimeout(() => {
  11553. this.checkEva(this.checkId);
  11554. }, 500);
  11555. }, 0);
  11556. }
  11557. this.$forceUpdate();
  11558. },
  11559. foldC(i) {
  11560. if (
  11561. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  11562. ) {
  11563. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11564. i
  11565. ].isFoldchapter = false;
  11566. } else {
  11567. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11568. i
  11569. ].isFoldchapter = true;
  11570. }
  11571. this.$forceUpdate();
  11572. },
  11573. fold3(i, ti) {
  11574. if (
  11575. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  11576. .isFold3
  11577. ) {
  11578. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  11579. ti
  11580. ].isFold3 = false;
  11581. } else {
  11582. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  11583. ti
  11584. ].isFold3 = true;
  11585. }
  11586. this.$forceUpdate();
  11587. },
  11588. deleteHomeworkBox(unitIndex, index, i) {
  11589. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  11590. this.taskCount
  11591. ].homeworkList.splice(i, 1);
  11592. },
  11593. getStudent() {
  11594. let params = {
  11595. oid: this.oid,
  11596. cu: "",
  11597. cn: this.searchPeople,
  11598. };
  11599. this.ajax
  11600. .get(this.$store.state.api + "selectStudentAdd", params)
  11601. .then((res) => {
  11602. this.studentJuri = res.data[0];
  11603. })
  11604. .catch((err) => {
  11605. this.isLoading = false;
  11606. console.error(err);
  11607. });
  11608. },
  11609. // 添加协同成员其他选项按钮
  11610. getTeacherCopy(){
  11611. this.CollLoading=true
  11612. this.collid = ''
  11613. this.collid = '1xpz'
  11614. let params = {
  11615. oid:
  11616. this.org && this.org != "undefined" && this.org != "null"
  11617. ? this.org
  11618. : this.oid,
  11619. cu: "",
  11620. cn: this.searchTN,
  11621. coll: ''
  11622. };
  11623. this.ajax
  11624. .get(
  11625. this.$store.state.api +
  11626. (this.org && this.org != "undefined" && this.org != "null"
  11627. ? "selectCollaborativeMembersOrg"
  11628. : "selectCollaborativeMembers"),
  11629. params
  11630. )
  11631. .then((res) => {
  11632. let teacherJuri = res.data[0];
  11633. this.CollaborativeTeaList = res.data[1];
  11634. for (var i = 0; i < teacherJuri.length; i++) {
  11635. if (teacherJuri[i].userid == this.userid) {
  11636. teacherJuri.splice(i, 1);
  11637. break;
  11638. }
  11639. }
  11640. this.teacherJuri = teacherJuri.filter((i,index)=>{
  11641. return (i.cclassid == '' || i.cclassid == null)
  11642. })
  11643. console.log(' this.teacherJuri', this.teacherJuri);
  11644. let _check = [];
  11645. let _check2 = [];
  11646. for (var i = 0; i < this.teacherJuri.length; i++) {
  11647. var gid = this.teacherJuri[i].userid;
  11648. _check.push(gid);
  11649. }
  11650. for (var i = 0; i < this.checkboxList3.length; i++) {
  11651. var _id = this.checkboxList3[i];
  11652. if (_check.indexOf(_id) !== -1) {
  11653. _check2.push(_id);
  11654. }
  11655. }
  11656. if (_check2.length==0 && _check.length==0) {
  11657. }else{
  11658. this.checkAll2 = _check2.length === _check.length;
  11659. }
  11660. this.CollLoading=false
  11661. })
  11662. .catch((err) => {
  11663. console.error(err);
  11664. this.CollLoading=false
  11665. });
  11666. },
  11667. getTeacher(val) {
  11668. this.CollLoading=true
  11669. this.collid = ''
  11670. this.collid = !val ? '' : val
  11671. let params = {
  11672. oid:
  11673. this.org && this.org != "undefined" && this.org != "null"
  11674. ? this.org
  11675. : this.oid,
  11676. cu: "",
  11677. cn: this.searchTN,
  11678. coll: this.collid
  11679. };
  11680. this.ajax
  11681. .get(
  11682. this.$store.state.api +
  11683. (this.org && this.org != "undefined" && this.org != "null"
  11684. ? "selectCollaborativeMembersOrg"
  11685. : "selectCollaborativeMembers"),
  11686. params
  11687. )
  11688. .then((res) => {
  11689. let teacherJuri = res.data[0];
  11690. this.CollaborativeTeaList = res.data[1];
  11691. for (var i = 0; i < teacherJuri.length; i++) {
  11692. if (teacherJuri[i].userid == this.userid) {
  11693. teacherJuri.splice(i, 1);
  11694. break;
  11695. }
  11696. }
  11697. this.teacherJuri = teacherJuri;
  11698. let _check = [];
  11699. let _check2 = [];
  11700. for (var i = 0; i < this.teacherJuri.length; i++) {
  11701. var gid = this.teacherJuri[i].userid;
  11702. _check.push(gid);
  11703. }
  11704. for (var i = 0; i < this.checkboxList3.length; i++) {
  11705. var _id = this.checkboxList3[i];
  11706. if (_check.indexOf(_id) !== -1) {
  11707. _check2.push(_id);
  11708. }
  11709. }
  11710. if (_check2.length==0 && _check.length==0) {
  11711. }else{
  11712. this.checkAll2 = _check2.length === _check.length;
  11713. }
  11714. this.CollLoading=false
  11715. })
  11716. .catch((err) => {
  11717. console.error(err);
  11718. this.CollLoading=false
  11719. });
  11720. },
  11721. searchStudent() {
  11722. this.getStudent();
  11723. },
  11724. selectGrage() {
  11725. let params = {
  11726. oid: this.oid,
  11727. };
  11728. this.ajax
  11729. .get(this.$store.state.api + "selectGrageBySchool", params)
  11730. .then((res) => {
  11731. this.gradeList = res.data[0];
  11732. })
  11733. .catch((err) => {
  11734. this.isLoading = false;
  11735. console.error(err);
  11736. });
  11737. },
  11738. //获取班级列表
  11739. getClass() {
  11740. let params = {
  11741. oid: this.oid,
  11742. gid: this.gradeId,
  11743. cn: this.classSearch,
  11744. };
  11745. this.ajax
  11746. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  11747. .then((res) => {
  11748. if (!this.grade.length) {
  11749. this.grade = res.data[0];
  11750. }
  11751. this.grade2 = res.data[0];
  11752. this.classJuri = res.data[0];
  11753. let _check = [];
  11754. let _check2 = [];
  11755. for (var i = 0; i < this.grade2.length; i++) {
  11756. var gid = this.grade2[i].id;
  11757. _check.push(gid);
  11758. }
  11759. for (var i = 0; i < this.checkboxList2.length; i++) {
  11760. var _id = this.checkboxList2[i];
  11761. if (_check.indexOf(_id) !== -1) {
  11762. _check2.push(_id);
  11763. }
  11764. }
  11765. this.checkAll = _check2.length === _check.length;
  11766. })
  11767. .catch((err) => {
  11768. this.isLoading = false;
  11769. console.error(err);
  11770. });
  11771. },
  11772. CourseType2Change(val) {
  11773. this.pTypeCheck = [];
  11774. for (var i = 0; i < this.CourseType2.length; i++) {
  11775. let typeA = this.CourseType2[i];
  11776. if (val.indexOf(typeA.name) != -1) {
  11777. this.pTypeCheck.push(...typeA.id);
  11778. }
  11779. }
  11780. },
  11781. arrayToArray(arrayo, arrayt) {
  11782. let array1 = arrayo;
  11783. let array2 = arrayt;
  11784. let commonElements = [];
  11785. for (let i = 0; i < array1.length; i++) {
  11786. for (let j = 0; j < array2.length; j++) {
  11787. if (array1[i] === array2[j]) {
  11788. commonElements.push(array1[i]);
  11789. }
  11790. }
  11791. }
  11792. return commonElements;
  11793. },
  11794. typeChange(){
  11795. let courseInfo = ``
  11796. let sub = []
  11797. let mclass = []
  11798. let theme = []
  11799. if (this.courseTypeId.length) {
  11800. for (var i = 0; i < this.courseTypeId.length; i++) {
  11801. let _sid = this.courseTypeId[i]
  11802. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11803. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  11804. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  11805. }
  11806. }
  11807. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11808. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  11809. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  11810. }
  11811. }
  11812. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11813. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  11814. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  11815. }
  11816. }
  11817. }
  11818. }
  11819. sub = JSON.parse(converter(JSON.stringify(sub)))
  11820. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  11821. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  11822. let _file = this.knowFileArray[fi]
  11823. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  11824. let fileS = _file.name ? converter(_file.name).split('/') : 1
  11825. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  11826. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  11827. let fileids = this.knowInfoData.map((item) => item.fileid)
  11828. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11829. this.knowInfoData.push({
  11830. name: _file.filename,
  11831. url: _file.url,
  11832. uid: '',
  11833. type: 3,
  11834. fileid: _file.fileid,
  11835. });
  11836. this.knowFileids.push(_file.fileid)
  11837. }
  11838. fileids = this.knowInfoData.map((item) => item.fileid)
  11839. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11840. this.knowInfoData.push({
  11841. name: _file.filename,
  11842. url: _file.url,
  11843. uid: '',
  11844. type: 3,
  11845. fileid: _file.fileid,
  11846. });
  11847. this.knowFileids.push(_file.fileid)
  11848. }
  11849. fileids = this.knowInfoData.map((item) => item.fileid)
  11850. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11851. this.knowInfoData.push({
  11852. name: _file.filename,
  11853. url: _file.url,
  11854. uid: '',
  11855. type: 3,
  11856. fileid: _file.fileid,
  11857. });
  11858. this.knowFileids.push(_file.fileid)
  11859. }
  11860. fileids = this.knowInfoData.map((item) => item.fileid)
  11861. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11862. this.knowInfoData.push({
  11863. name: _file.filename,
  11864. url: _file.url,
  11865. uid: '',
  11866. type: 3,
  11867. fileid: _file.fileid,
  11868. });
  11869. this.knowFileids.push(_file.fileid)
  11870. }
  11871. fileids = this.knowInfoData.map((item) => item.fileid)
  11872. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  11873. this.knowInfoData.push({
  11874. name: _file.filename,
  11875. url: _file.url,
  11876. uid: '',
  11877. type: 3,
  11878. fileid: _file.fileid,
  11879. });
  11880. this.knowFileids.push(_file.fileid)
  11881. }
  11882. }
  11883. if(mclass.length){
  11884. courseInfo += `年级:${mclass.join(',')} `
  11885. }
  11886. if(sub.length){
  11887. courseInfo += `学科:${sub.join(',')} `
  11888. }
  11889. if(theme.length){
  11890. courseInfo += `主题:${theme.join(',')} `
  11891. }
  11892. this.addCourseBehavior('courseBehavior', `点击选择分类-${courseInfo}`)
  11893. },
  11894. getChapterData(e, i, j, ic, type) {
  11895. e.stopPropagation();
  11896. this.updataC = true;
  11897. this.icc = ic;
  11898. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  11899. console.log("还不能下载图片喔");
  11900. }
  11901. },
  11902. deleteChapterData(e, i, j, ic, taskI) {
  11903. e.stopPropagation();
  11904. let _this = this;
  11905. _this
  11906. .$confirm("确定删除此项?", "提示", {
  11907. confirmButtonText: "确定",
  11908. cancelButtonText: "取消",
  11909. type: "warning",
  11910. })
  11911. .then(() => {
  11912. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  11913. ic,
  11914. 1
  11915. );
  11916. })
  11917. .catch(() => {
  11918. return;
  11919. });
  11920. },
  11921. checkInfoData(fileid, file){
  11922. let type = 1
  11923. let index = 0
  11924. for(let i = 0; i < this.infoData.length; i++){
  11925. if(this.infoData[i].fileid == fileid){
  11926. type = 2
  11927. index = i
  11928. }
  11929. }
  11930. if(type == 2){
  11931. this.infoData.splice(index, 1)
  11932. }else {
  11933. this.infoData.push({...file})
  11934. }
  11935. },
  11936. checkKnowInfoData(fileid){
  11937. if(this.knowFileids.indexOf(fileid) == -1){
  11938. this.knowFileids.push(fileid)
  11939. }else {
  11940. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  11941. }
  11942. },
  11943. checkKnowInfoData2(fileid){
  11944. if(!fileid){
  11945. return
  11946. }
  11947. if(this.knowFileids2.indexOf(fileid) == -1){
  11948. this.knowFileids2.push(fileid)
  11949. }else {
  11950. this.knowFileids2.splice(this.knowFileids2.indexOf(fileid), 1)
  11951. }
  11952. },
  11953. checkKnowInfoData3(fileid){
  11954. if(this.knowFileids3.indexOf(fileid) == -1){
  11955. this.knowFileids3.push(fileid)
  11956. }else {
  11957. this.knowFileids3.splice(this.knowFileids3.indexOf(fileid), 1)
  11958. }
  11959. },
  11960. deleteInfoData(e, ic) {
  11961. e.stopPropagation();
  11962. let _this = this;
  11963. _this
  11964. .$confirm("确定删除此项?", "提示", {
  11965. confirmButtonText: "确定",
  11966. cancelButtonText: "取消",
  11967. type: "warning",
  11968. })
  11969. .then(() => {
  11970. _this.infoData.splice(
  11971. ic,
  11972. 1
  11973. );
  11974. })
  11975. .catch(() => {
  11976. return;
  11977. });
  11978. },
  11979. deleteInfoData2(e, ic) {
  11980. e.stopPropagation();
  11981. let _this = this;
  11982. _this
  11983. .$confirm("确定删除此项?", "提示", {
  11984. confirmButtonText: "确定",
  11985. cancelButtonText: "取消",
  11986. type: "warning",
  11987. })
  11988. .then(() => {
  11989. let fileid = _this.infoData2[ic].fileid;
  11990. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  11991. _this.infoData2.splice(
  11992. ic,
  11993. 1
  11994. );
  11995. })
  11996. .catch(() => {
  11997. return;
  11998. });
  11999. },
  12000. deleteKnowInfoData(e, ic) {
  12001. e.stopPropagation();
  12002. let _this = this;
  12003. _this
  12004. .$confirm("确定删除此项?", "提示", {
  12005. confirmButtonText: "确定",
  12006. cancelButtonText: "取消",
  12007. type: "warning",
  12008. })
  12009. .then(() => {
  12010. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12011. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  12012. }
  12013. _this.knowInfoData.splice(
  12014. ic,
  12015. 1
  12016. );
  12017. })
  12018. .catch(() => {
  12019. return;
  12020. });
  12021. },
  12022. deleteKnowInfoData2(e, ic) {
  12023. e.stopPropagation();
  12024. let _this = this;
  12025. _this
  12026. .$confirm("确定删除此项?", "提示", {
  12027. confirmButtonText: "确定",
  12028. cancelButtonText: "取消",
  12029. type: "warning",
  12030. })
  12031. .then(() => {
  12032. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  12033. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  12034. }
  12035. _this.knowInfoData2.splice(
  12036. ic,
  12037. 1
  12038. );
  12039. })
  12040. .catch(() => {
  12041. return;
  12042. });
  12043. },
  12044. deletemubiaoInfoData(e, ic) {
  12045. e.stopPropagation();
  12046. let _this = this;
  12047. _this
  12048. .$confirm("确定删除此项?", "提示", {
  12049. confirmButtonText: "确定",
  12050. cancelButtonText: "取消",
  12051. type: "warning",
  12052. })
  12053. .then(() => {
  12054. _this.mubiaoInfoData.splice(
  12055. ic,
  12056. 1
  12057. );
  12058. })
  12059. .catch(() => {
  12060. return;
  12061. });
  12062. },
  12063. deletexuanzeInfoData(e, ic) {
  12064. e.stopPropagation();
  12065. let _this = this;
  12066. _this
  12067. .$confirm("确定删除此项?", "提示", {
  12068. confirmButtonText: "确定",
  12069. cancelButtonText: "取消",
  12070. type: "warning",
  12071. })
  12072. .then(() => {
  12073. _this.xuanzeInfoData.splice(
  12074. ic,
  12075. 1
  12076. );
  12077. })
  12078. .catch(() => {
  12079. return;
  12080. });
  12081. },
  12082. deletepingjiaInfoData(e, ic, tindex) {
  12083. e.stopPropagation();
  12084. let _this = this;
  12085. _this
  12086. .$confirm("确定删除此项?", "提示", {
  12087. confirmButtonText: "确定",
  12088. cancelButtonText: "取消",
  12089. type: "warning",
  12090. })
  12091. .then(() => {
  12092. _this.pingjiaInfoData[tindex].splice(
  12093. ic,
  12094. 1
  12095. );
  12096. })
  12097. .catch(() => {
  12098. return;
  12099. });
  12100. },
  12101. deleteCankaoInfoData(e, ic) {
  12102. e.stopPropagation();
  12103. let _this = this;
  12104. _this
  12105. .$confirm("确定删除此项?", "提示", {
  12106. confirmButtonText: "确定",
  12107. cancelButtonText: "取消",
  12108. type: "warning",
  12109. })
  12110. .then(() => {
  12111. _this.cankaoInfoData.splice(
  12112. ic,
  12113. 1
  12114. );
  12115. })
  12116. .catch(() => {
  12117. return;
  12118. });
  12119. },
  12120. deleteTeacherInfoData(e, ic) {
  12121. e.stopPropagation();
  12122. let _this = this;
  12123. _this
  12124. .$confirm("确定删除此项?", "提示", {
  12125. confirmButtonText: "确定",
  12126. cancelButtonText: "取消",
  12127. type: "warning",
  12128. })
  12129. .then(() => {
  12130. _this.teacherInfoData.splice(
  12131. ic,
  12132. 1
  12133. );
  12134. })
  12135. .catch(() => {
  12136. return;
  12137. });
  12138. },
  12139. updataVideoT(e, i, j, ic) {
  12140. // e.stopPropagation();
  12141. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  12142. // ic
  12143. // ].name = JSON.parse(JSON.stringify(e.target.value));
  12144. this.line =
  12145. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  12146. this.taskCount = j;
  12147. this.lineCount = ic;
  12148. this.dialogVisibleupdataVideoT = true;
  12149. this.$forceUpdate();
  12150. },
  12151. checkChpater(e, i, j, ic){
  12152. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  12153. if(type == 3){
  12154. var fileA = [
  12155. "DOC",
  12156. "DOCX",
  12157. "DOCM",
  12158. "DOTM",
  12159. "DOTX",
  12160. "PPTX",
  12161. "PPSX",
  12162. "PPT",
  12163. "PPS",
  12164. "PPTM",
  12165. "POTM",
  12166. "PPAM",
  12167. "POTX",
  12168. "PPSM",
  12169. "XLSX",
  12170. "XLS"
  12171. ];
  12172. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  12173. if (
  12174. fileA.indexOf(
  12175. url.split(".")[
  12176. url.split(".").length - 1
  12177. ].toLocaleUpperCase()
  12178. ) != -1
  12179. ) {
  12180. this.dialogVisibleOffice = true
  12181. this.wurl = url
  12182. } else if (
  12183. "pdf".indexOf(
  12184. url.split(".")[
  12185. url.split(".").length - 1
  12186. ].toLocaleLowerCase()
  12187. ) != -1
  12188. ) {
  12189. this.dialogVisiblePdf = true
  12190. this.wurl = url
  12191. }
  12192. }
  12193. },
  12194. checkChpater2(e, ic){
  12195. let type = this.infoData2[ic].type
  12196. if(type == 3){
  12197. var fileA = [
  12198. "DOC",
  12199. "DOCX",
  12200. "DOCM",
  12201. "DOTM",
  12202. "DOTX",
  12203. "PPTX",
  12204. "PPSX",
  12205. "PPT",
  12206. "PPS",
  12207. "PPTM",
  12208. "POTM",
  12209. "PPAM",
  12210. "POTX",
  12211. "PPSM",
  12212. "XLSX",
  12213. "XLS"
  12214. ];
  12215. let url = this.infoData2[ic].url
  12216. if (
  12217. fileA.indexOf(
  12218. url.split(".")[
  12219. url.split(".").length - 1
  12220. ].toLocaleUpperCase()
  12221. ) != -1
  12222. ) {
  12223. this.dialogVisibleOffice = true
  12224. this.wurl = url
  12225. } else if (
  12226. "pdf".indexOf(
  12227. url.split(".")[
  12228. url.split(".").length - 1
  12229. ].toLocaleLowerCase()
  12230. ) != -1
  12231. ) {
  12232. this.dialogVisiblePdf = true
  12233. this.wurl = url
  12234. }
  12235. }
  12236. },
  12237. checkChpater3(e, ic, item){
  12238. let type = item.type
  12239. if(type == 3){
  12240. var fileA = [
  12241. "DOC",
  12242. "DOCX",
  12243. "DOCM",
  12244. "DOTM",
  12245. "DOTX",
  12246. "PPTX",
  12247. "PPSX",
  12248. "PPT",
  12249. "PPS",
  12250. "PPTM",
  12251. "POTM",
  12252. "PPAM",
  12253. "POTX",
  12254. "PPSM",
  12255. "XLSX",
  12256. "XLS"
  12257. ];
  12258. let url = item.url
  12259. if (
  12260. fileA.indexOf(
  12261. url.split(".")[
  12262. url.split(".").length - 1
  12263. ].toLocaleUpperCase()
  12264. ) != -1
  12265. ) {
  12266. this.dialogVisibleOffice = true
  12267. this.wurl = url
  12268. } else if (
  12269. "pdf".indexOf(
  12270. url.split(".")[
  12271. url.split(".").length - 1
  12272. ].toLocaleLowerCase()
  12273. ) != -1
  12274. ) {
  12275. this.dialogVisiblePdf = true
  12276. this.wurl = url
  12277. }
  12278. }
  12279. },
  12280. updataVideoC() {
  12281. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12282. this.taskCount
  12283. ].chapterData[this.lineCount].name = JSON.parse(
  12284. JSON.stringify(this.line)
  12285. );
  12286. this.dialogVisibleupdataVideoT = false;
  12287. this.$forceUpdate();
  12288. },
  12289. upCd(e, i, j, taskCount, ic) {
  12290. e.stopPropagation();
  12291. if (ic == 0) {
  12292. return;
  12293. }
  12294. var a = JSON.parse(
  12295. JSON.stringify(
  12296. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  12297. ic - 1
  12298. ]
  12299. )
  12300. );
  12301. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  12302. JSON.parse(
  12303. JSON.stringify(
  12304. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  12305. )
  12306. );
  12307. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  12308. this.$forceUpdate();
  12309. },
  12310. downCd(e, i, j, taskCount, ic) {
  12311. e.stopPropagation();
  12312. if (
  12313. ic ==
  12314. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  12315. 1
  12316. ) {
  12317. return;
  12318. }
  12319. var a = JSON.parse(
  12320. JSON.stringify(
  12321. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  12322. ic + 1
  12323. ]
  12324. )
  12325. );
  12326. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  12327. JSON.parse(
  12328. JSON.stringify(
  12329. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  12330. )
  12331. );
  12332. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  12333. this.$forceUpdate();
  12334. },
  12335. async upTool(e, i, j, tooli) {
  12336. e.stopPropagation();
  12337. if (tooli == 0) {
  12338. return;
  12339. }
  12340. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  12341. let count2 = await this.getWorksCount(3, i, j, tooli);
  12342. if (count1 > 0 || count2 > 0) {
  12343. this.$confirm(
  12344. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  12345. "提示",
  12346. {
  12347. confirmButtonText: "确定",
  12348. cancelButtonText: "取消",
  12349. type: "warning",
  12350. }
  12351. )
  12352. .then(() => {
  12353. var a = JSON.parse(
  12354. JSON.stringify(
  12355. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  12356. tooli - 1
  12357. ]
  12358. )
  12359. );
  12360. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  12361. JSON.parse(
  12362. JSON.stringify(
  12363. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12364. )
  12365. );
  12366. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12367. this.$forceUpdate();
  12368. })
  12369. .catch(() => {
  12370. return;
  12371. });
  12372. } else {
  12373. var a = JSON.parse(
  12374. JSON.stringify(
  12375. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  12376. )
  12377. );
  12378. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  12379. JSON.parse(
  12380. JSON.stringify(
  12381. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12382. )
  12383. );
  12384. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12385. this.$forceUpdate();
  12386. }
  12387. },
  12388. async downTool(e, i, j, tooli) {
  12389. e.stopPropagation();
  12390. if (
  12391. tooli ==
  12392. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  12393. ) {
  12394. return;
  12395. }
  12396. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  12397. let count2 = await this.getWorksCount(3, i, j, tooli);
  12398. if (count1 > 0 || count2 > 0) {
  12399. this.$confirm(
  12400. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  12401. "提示",
  12402. {
  12403. confirmButtonText: "确定",
  12404. cancelButtonText: "取消",
  12405. type: "warning",
  12406. }
  12407. )
  12408. .then(() => {
  12409. var a = JSON.parse(
  12410. JSON.stringify(
  12411. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  12412. tooli + 1
  12413. ]
  12414. )
  12415. );
  12416. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  12417. JSON.parse(
  12418. JSON.stringify(
  12419. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12420. )
  12421. );
  12422. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12423. this.$forceUpdate();
  12424. })
  12425. .catch(() => {
  12426. return;
  12427. });
  12428. } else {
  12429. var a = JSON.parse(
  12430. JSON.stringify(
  12431. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  12432. )
  12433. );
  12434. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  12435. JSON.parse(
  12436. JSON.stringify(
  12437. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  12438. )
  12439. );
  12440. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  12441. this.$forceUpdate();
  12442. }
  12443. },
  12444. addWork(type) {
  12445. if(type == 2 && this.courseName == "") {
  12446. this.$message.error("请补充填写课程名称");
  12447. return;
  12448. }
  12449. let cPan = 1;
  12450. for (var i = 0; i < this.unitJson.length; i++) {
  12451. for (
  12452. var j = 0;
  12453. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  12454. j++
  12455. ) {
  12456. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  12457. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  12458. if (
  12459. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  12460. ) {
  12461. for (
  12462. var z = 0;
  12463. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  12464. z++
  12465. ) {
  12466. if (
  12467. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  12468. .length
  12469. ) {
  12470. this.$message.error("请把工具添加完整");
  12471. cPan = 2;
  12472. break;
  12473. }
  12474. }
  12475. }
  12476. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  12477. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  12478. i
  12479. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  12480. return ele.value != "" || ele.detail != "" || ele.target != "";
  12481. });
  12482. }
  12483. }
  12484. }
  12485. this.inputShow = true;
  12486. if (cPan == 2) {
  12487. this.steps--;
  12488. return;
  12489. }
  12490. for (var i = 0; i < this.unitJson.length; i++) {
  12491. delete this.unitJson[i].isUpdate;
  12492. }
  12493. if(!this.targetCourseText2){
  12494. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  12495. }
  12496. let params = [
  12497. {
  12498. uid: this.userid,
  12499. title: this.courseName,
  12500. brief: this.courseText,
  12501. cover:
  12502. this.cover.length > 0
  12503. ? JSON.stringify(this.cover)
  12504. : JSON.stringify([
  12505. {
  12506. name: "noBanner.jpg",
  12507. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  12508. uid: 1656409780264,
  12509. status: "success",
  12510. },
  12511. ]),
  12512. evaId: this.evalua,
  12513. astudent:
  12514. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  12515. see: this.isTeacherSee == true ? 1 : 0,
  12516. chapters: JSON.stringify(this.unitJson),
  12517. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  12518. courseType: JSON.stringify(this.courseTypeId),
  12519. ateacher:
  12520. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  12521. inviteCode: JSON.stringify(this.inviteCode),
  12522. refile: JSON.stringify(this.infoData),
  12523. reBrief: this.courseText2,
  12524. cpote: JSON.stringify(this.cpote),
  12525. setting: JSON.stringify({
  12526. courseJie: this.courseJie,
  12527. courseTime: this.courseTime,
  12528. teacherInfoData: this.teacherInfoData,
  12529. teacherCourseText: this.teacherCourseText,
  12530. targetCourseText: this.targetCourseText,
  12531. cankaoInfoData: this.cankaoInfoData,
  12532. mubiaoInfoData: this.mubiaoInfoData,
  12533. xuanzeInfoData: this.xuanzeInfoData,
  12534. pingjiaInfoData: this.pingjiaInfoData,
  12535. infoData2: this.infoData2,
  12536. isuseT: this.isuseT,
  12537. mode: this.mode,
  12538. targetCourseText2: this.targetCourseText2,
  12539. chatid: this.chatid,
  12540. languageSetting: this.languageSetting,
  12541. knowInfoData: this.knowInfoData,
  12542. knowFileids: this.knowFileids,
  12543. knowInfoData2: this.knowInfoData2,
  12544. knowFileids2: this.knowFileids2,
  12545. recordVideoText: this.recordVideoText,
  12546. recordAudioUrl: this.recordAudioUrl,
  12547. }),
  12548. iresearch: this.isFileSearch ? 1 : 2,
  12549. },
  12550. ];
  12551. this.ajax
  12552. .post(this.$store.state.api + "addWorkNew2AI3", params)
  12553. .then((res) => {
  12554. console.log(this.steps);
  12555. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  12556. this.$message({
  12557. message: "新增成功",
  12558. type: "success",
  12559. });
  12560. }
  12561. this.number = res.data.ordernumber;
  12562. this.courseId = res.data.courseId;
  12563. this.cid = res.data.courseId;
  12564. this.courseUserid = this.userid;
  12565. this.islogin = true;
  12566. // this.updateCourseState(4);
  12567. this.updateCourseState(5);
  12568. this.addtips()
  12569. if(type == 2){
  12570. this.retrunCourse()
  12571. }
  12572. if(type == 3){
  12573. this.steps = 4
  12574. }
  12575. })
  12576. .catch((err) => {
  12577. this.$message.error("网络不佳");
  12578. console.error(err);
  12579. });
  12580. },
  12581. goCourse() {
  12582. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  12583. },
  12584. updateWork2() {
  12585. let _unitIndex = this.unitIndex;
  12586. let cPan = 1;
  12587. for (
  12588. var j = 0;
  12589. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  12590. j++
  12591. ) {
  12592. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  12593. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  12594. j
  12595. ].proVisible2 = false;
  12596. if (
  12597. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12598. .length > 1
  12599. ) {
  12600. for (
  12601. var z = 0;
  12602. z <
  12603. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12604. .length;
  12605. z++
  12606. ) {
  12607. if (
  12608. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  12609. z
  12610. ].tool.length
  12611. ) {
  12612. this.$message.error("请把工具添加完整");
  12613. cPan = 2;
  12614. break;
  12615. }
  12616. }
  12617. }
  12618. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  12619. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  12620. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  12621. (ele) => {
  12622. return ele.value != "" || ele.detail != "" || ele.target != "";
  12623. }
  12624. );
  12625. }
  12626. }
  12627. this.inputShow = true;
  12628. if (cPan == 2) {
  12629. this.steps--;
  12630. return;
  12631. }
  12632. let params = [
  12633. {
  12634. cid: this.cid,
  12635. chapters: JSON.stringify(this.unitJson),
  12636. uid: this.userid,
  12637. unitIndex: _unitIndex,
  12638. },
  12639. ];
  12640. this.ajax
  12641. .post(this.$store.state.api + "updateWorkNew4", params)
  12642. .then((res) => {
  12643. this.$message({
  12644. message: "修改成功",
  12645. type: "success",
  12646. });
  12647. this.courseId = this.cid;
  12648. this.addtips();
  12649. })
  12650. .catch((err) => {
  12651. this.$message.error("网络不佳");
  12652. console.error(err);
  12653. });
  12654. },
  12655. updateWork3(unitIndex) {
  12656. let _unitIndex = unitIndex;
  12657. let cPan = 1;
  12658. for (
  12659. var j = 0;
  12660. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  12661. j++
  12662. ) {
  12663. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  12664. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  12665. j
  12666. ].proVisible2 = false;
  12667. if (
  12668. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12669. .length > 1
  12670. ) {
  12671. for (
  12672. var z = 0;
  12673. z <
  12674. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12675. .length;
  12676. z++
  12677. ) {
  12678. if (
  12679. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  12680. z
  12681. ].tool.length
  12682. ) {
  12683. this.$message.error("请把工具添加完整");
  12684. cPan = 2;
  12685. break;
  12686. }
  12687. }
  12688. }
  12689. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  12690. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  12691. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  12692. (ele) => {
  12693. return ele.value != "" || ele.detail != "" || ele.target != "";
  12694. }
  12695. );
  12696. }
  12697. }
  12698. this.inputShow = true;
  12699. if (cPan == 2) {
  12700. this.steps--;
  12701. return;
  12702. }
  12703. let params = [
  12704. {
  12705. cid: this.cid,
  12706. chapters: JSON.stringify(this.unitJson),
  12707. uid: this.userid,
  12708. unitIndex: _unitIndex,
  12709. },
  12710. ];
  12711. this.ajax
  12712. .post(this.$store.state.api + "updateWorkNew4", params)
  12713. .then((res) => {
  12714. // this.$message({
  12715. // message: "修改成功",
  12716. // type: "success",
  12717. // });
  12718. this.courseId = this.cid;
  12719. this.addtips()
  12720. })
  12721. .catch((err) => {
  12722. this.$message.error("网络不佳");
  12723. console.error(err);
  12724. });
  12725. },
  12726. updateWork() {
  12727. let cPan = 1;
  12728. for (var i = 0; i < this.unitJson.length; i++) {
  12729. for (
  12730. var j = 0;
  12731. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  12732. j++
  12733. ) {
  12734. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  12735. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  12736. if (
  12737. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  12738. ) {
  12739. for (
  12740. var z = 0;
  12741. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  12742. z++
  12743. ) {
  12744. if (
  12745. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  12746. .length
  12747. ) {
  12748. this.$message.error("请把工具添加完整");
  12749. cPan = 2;
  12750. break;
  12751. }
  12752. }
  12753. }
  12754. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  12755. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  12756. i
  12757. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  12758. return ele.value != "" || ele.detail != "" || ele.target != "";
  12759. });
  12760. }
  12761. }
  12762. }
  12763. this.inputShow = true;
  12764. if (cPan == 2) {
  12765. this.steps--;
  12766. return;
  12767. }
  12768. for (var i = 0; i < this.unitJson.length; i++) {
  12769. delete this.unitJson[i].isUpdate;
  12770. }
  12771. if(!this.targetCourseText2){
  12772. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  12773. }
  12774. let params = [
  12775. {
  12776. cid: this.cid,
  12777. title: this.courseName,
  12778. brief: this.courseText,
  12779. cover:
  12780. this.cover.length > 0
  12781. ? JSON.stringify(this.cover)
  12782. : JSON.stringify([
  12783. {
  12784. name: "noBanner.jpg",
  12785. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  12786. uid: 1656409780264,
  12787. status: "success",
  12788. },
  12789. ]),
  12790. evaId: this.evalua,
  12791. astudent:
  12792. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  12793. see: this.isTeacherSee == true ? 1 : 0,
  12794. chapters: JSON.stringify(this.unitJson),
  12795. template: this.myWord != "undefined" ? this.myWord : [],
  12796. uid: this.userid,
  12797. courseType: JSON.stringify(this.courseTypeId),
  12798. ateacher:
  12799. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  12800. inviteCode: JSON.stringify(this.inviteCode),
  12801. refile: JSON.stringify(this.infoData),
  12802. reBrief: this.courseText2,
  12803. cpote: JSON.stringify(this.cpote),
  12804. setting: JSON.stringify({
  12805. courseJie: this.courseJie,
  12806. courseTime: this.courseTime,
  12807. teacherInfoData: this.teacherInfoData,
  12808. teacherCourseText: this.teacherCourseText,
  12809. targetCourseText: this.targetCourseText,
  12810. cankaoInfoData: this.cankaoInfoData,
  12811. mubiaoInfoData: this.mubiaoInfoData,
  12812. xuanzeInfoData: this.xuanzeInfoData,
  12813. pingjiaInfoData: this.pingjiaInfoData,
  12814. infoData2: this.infoData2,
  12815. isuseT: this.isuseT,
  12816. mode: this.mode,
  12817. targetCourseText2: this.targetCourseText2,
  12818. chatid: this.chatid,
  12819. languageSetting: this.languageSetting,
  12820. knowInfoData: this.knowInfoData,
  12821. knowFileids: this.knowFileids,
  12822. knowInfoData2: this.knowInfoData2,
  12823. knowFileids2: this.knowFileids2,
  12824. recordVideoText: this.recordVideoText,
  12825. recordAudioUrl: this.recordAudioUrl,
  12826. }),
  12827. iresearch: this.isFileSearch ? 1 : 2,
  12828. },
  12829. ];
  12830. this.ajax
  12831. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  12832. .then((res) => {
  12833. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  12834. if (this.cidType == 1) {
  12835. this.$message({
  12836. message: "修改成功",
  12837. type: "success",
  12838. });
  12839. } else {
  12840. this.$message({
  12841. message: "新增成功",
  12842. type: "success",
  12843. });
  12844. }
  12845. }
  12846. this.number = this.nbOrder;
  12847. this.courseId = this.cid;
  12848. this.addtips()
  12849. })
  12850. .catch((err) => {
  12851. this.$message.error("网络不佳");
  12852. console.error(err);
  12853. });
  12854. },
  12855. insertWord() {
  12856. this.dialogVisible1 = true;
  12857. this.updateBoolean2 = false;
  12858. this.tTitle = "";
  12859. this.tdetail = "";
  12860. },
  12861. addWord() {
  12862. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  12863. name: this.tTitle,
  12864. content: this.tdetail,
  12865. uid: this.guid(),
  12866. });
  12867. this.dialogVisible1 = false;
  12868. },
  12869. upWord() { },
  12870. selectWord(uid, i, c) {
  12871. this.dialogVisible1 = true;
  12872. this.updateBoolean2 = true;
  12873. if (
  12874. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  12875. ) {
  12876. this.tTitle =
  12877. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  12878. this.tdetail =
  12879. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  12880. }
  12881. },
  12882. isAddPP() {
  12883. if (this.checkboxList.length > 0) {
  12884. this.$message({
  12885. message: "添加成功",
  12886. type: "success",
  12887. });
  12888. this.dialogVisible3 = false;
  12889. } else {
  12890. this.$message({
  12891. message: "请添加课程成员",
  12892. type: "error",
  12893. });
  12894. }
  12895. },
  12896. isAddClass() {
  12897. this.dialogVisibleClass = false;
  12898. },
  12899. isAddPPTeacher() {
  12900. this.dialogVisibleMember = false;
  12901. this.setMan();
  12902. },
  12903. getTipsTemplate(){
  12904. if(this.templateid){
  12905. let params = {
  12906. id: this.templateid
  12907. }
  12908. this.ajax
  12909. .get(this.$store.state.api + "selectTipsTemplateById", params)
  12910. .then((res) => {
  12911. if(res.data[0].length){
  12912. this.tipsJson = res.data[0][0]
  12913. this.aiJson = JSON.parse(res.data[0][0].tips)
  12914. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12915. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12916. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12917. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12918. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12919. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12920. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12921. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12922. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12923. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12924. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12925. }
  12926. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  12927. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  12928. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  12929. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  12930. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  12931. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  12932. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  12933. - 我们的课程主题可以如何与学生的实际生活联系起来?
  12934. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  12935. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  12936. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  12937. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  12938. - 学生个人最终要完成什么?学生小组最终要完成什么?
  12939. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  12940. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  12941. 问题:<议程和问题引导>中的问题
  12942. 讨论:<转文本内容>`
  12943. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下<讨论>,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  12944. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  12945. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  12946. // }
  12947. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  12948. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12949. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12950. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12951. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  12952. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12953. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  12954. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12955. // }
  12956. this.$forceUpdate();
  12957. this.isDialog = res.data[0][0].isDialog
  12958. }
  12959. })
  12960. .catch((err) => { });
  12961. }
  12962. },
  12963. getTipsTemplateIsDialog(){
  12964. if(this.templateid){
  12965. let params = {
  12966. id: this.templateid
  12967. }
  12968. this.ajax
  12969. .get(this.$store.state.api + "selectTipsTemplateById", params)
  12970. .then((res) => {
  12971. if(res.data[0].length){
  12972. this.isDialog = res.data[0][0].isDialog
  12973. }
  12974. })
  12975. .catch((err) => { });
  12976. }
  12977. },
  12978. getTemplate() {
  12979. this.ajax
  12980. .get(this.$store.state.api + "getCourseTemplateT", "")
  12981. .then((res) => {
  12982. this.templateArray = res.data[0];
  12983. this.getTemplateOid();
  12984. this.$forceUpdate();
  12985. })
  12986. .catch((err) => { });
  12987. },
  12988. getTemplateOid() {
  12989. let params = {
  12990. oid: this.oid,
  12991. };
  12992. this.ajax
  12993. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  12994. .then((res) => {
  12995. if (res.data[0].length) {
  12996. this.templateArray = [...res.data[0], ...this.templateArray];
  12997. }
  12998. this.getTemplateOrg();
  12999. this.$forceUpdate();
  13000. })
  13001. .catch((err) => { });
  13002. },
  13003. getTemplateOrg() {
  13004. let params = {
  13005. oid: this.org,
  13006. };
  13007. this.ajax
  13008. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  13009. .then((res) => {
  13010. if (res.data[0].length) {
  13011. this.templateArray = [...res.data[0], ...this.templateArray];
  13012. }
  13013. this.$forceUpdate();
  13014. })
  13015. .catch((err) => { });
  13016. },
  13017. clearChoose() {
  13018. this.clearArray.splice(this.templateC.id, 1);
  13019. this.dialogVisible2 = false;
  13020. },
  13021. clearAttText() {
  13022. this.AttText = {
  13023. title: "",
  13024. text: "",
  13025. };
  13026. this.dialogVisible6 = false;
  13027. },
  13028. clearLine() {
  13029. this.line = "";
  13030. this.dialogVisible7 = false;
  13031. },
  13032. openTemplate() {
  13033. this.ctJson = {};
  13034. this.templateDialog = true;
  13035. },
  13036. checkctJson(json) {
  13037. if (this.ctJson.id == json.id) {
  13038. this.ctJson = {};
  13039. } else {
  13040. this.ctJson = json;
  13041. }
  13042. },
  13043. addTemplate(res) {
  13044. let _this = this;
  13045. let _res = [];
  13046. if (res.id == 1) {
  13047. _res = [
  13048. {
  13049. dyName: "", //单元标题
  13050. easy: 1,
  13051. chapterInfo: [
  13052. {
  13053. isread: false,
  13054. chapterid: this.guid(),
  13055. title: "",
  13056. courseName: "",
  13057. taskJson: [
  13058. {
  13059. task: "",
  13060. taskDetail: "",
  13061. chapterData: [],
  13062. toolText: "",
  13063. toolChoose: [
  13064. {
  13065. tool: [],
  13066. toolDetail: "",
  13067. toolType: 0,
  13068. askCount: 1,
  13069. askTitle: "",
  13070. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13071. },
  13072. ],
  13073. isShowTools: false,
  13074. askCount: 1,
  13075. isFold: 1,
  13076. askTitle: "",
  13077. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13078. checkJson: [{ checkCount: [], checkPerent: [] }],
  13079. homeworkList: [],
  13080. },
  13081. ],
  13082. itemCount: 1,
  13083. fileList1: [],
  13084. video: [],
  13085. testData: [],
  13086. pData: [],
  13087. templateArray: [],
  13088. },
  13089. ],
  13090. },
  13091. ];
  13092. this.updateCourseState(1);
  13093. } else if (res.id == 2) {
  13094. let stageData = [];
  13095. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13096. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13097. if (!iframe && !iframe2) {
  13098. this.$message.error("请使用AI共创生成");
  13099. return;
  13100. }
  13101. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13102. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13103. if (
  13104. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13105. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13106. ) {
  13107. this.$message.error("请使用AI共创生成");
  13108. return;
  13109. }
  13110. stageData = copyData
  13111. ? copyData.stageData
  13112. : copyData2
  13113. ? copyData2.stageData
  13114. : [""];
  13115. for (var i = 0; i < stageData.length; i++) {
  13116. _res.push({
  13117. dyName: stageData[i], //单元标题
  13118. chapterInfo: [
  13119. {
  13120. isread: false,
  13121. chapterid: this.guid(),
  13122. title: "",
  13123. courseName: "",
  13124. taskJson: [
  13125. {
  13126. task: "",
  13127. taskDetail: "",
  13128. chapterData: [],
  13129. toolText: "",
  13130. toolChoose: [
  13131. {
  13132. tool: [],
  13133. toolDetail: "",
  13134. toolType: 0,
  13135. askCount: 1,
  13136. askTitle: "",
  13137. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13138. },
  13139. ],
  13140. isShowTools: false,
  13141. askCount: 1,
  13142. isFold: 1,
  13143. askTitle: "",
  13144. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13145. checkJson: [{ checkCount: [], checkPerent: [] }],
  13146. homeworkList: [],
  13147. },
  13148. ],
  13149. itemCount: 1,
  13150. fileList1: [],
  13151. video: [],
  13152. testData: [],
  13153. pData: [],
  13154. templateArray: [],
  13155. },
  13156. ],
  13157. });
  13158. }
  13159. this.updateCourseState(1);
  13160. } else if (!Object.keys(res).length) {
  13161. this.$message.error("请选择模板");
  13162. retrun;
  13163. } else {
  13164. _res = JSON.parse(res.chapters);
  13165. this.updateCourseState(parseInt(res.state));
  13166. }
  13167. _this
  13168. .$confirm(
  13169. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13170. "提示",
  13171. {
  13172. confirmButtonText: "确定",
  13173. cancelButtonText: "取消",
  13174. type: "warning",
  13175. }
  13176. )
  13177. .then(() => {
  13178. _this.unitJson = _res;
  13179. _this.updateWork();
  13180. // _this.steps++;
  13181. _this.templateDialog = false;
  13182. setTimeout(() => {
  13183. this.checkEva(this.checkId);
  13184. setTimeout(() => {
  13185. this.checkEva(this.checkId);
  13186. }, 100);
  13187. }, 1000);
  13188. })
  13189. .catch(() => {
  13190. return;
  13191. });
  13192. },
  13193. checkTemplate(res) {
  13194. let _this = this;
  13195. _this
  13196. .$confirm(
  13197. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  13198. "提示",
  13199. {
  13200. confirmButtonText: "确定",
  13201. cancelButtonText: "取消",
  13202. type: "warning",
  13203. }
  13204. )
  13205. .then(() => {
  13206. _this.unitJson = JSON.parse(res.chapters);
  13207. _this.steps++;
  13208. setTimeout(() => {
  13209. this.checkEva(this.checkId);
  13210. setTimeout(() => {
  13211. this.checkEva(this.checkId);
  13212. }, 100);
  13213. }, 1000);
  13214. })
  13215. .catch(() => {
  13216. return;
  13217. });
  13218. },
  13219. checkTemplate1(w) {
  13220. this.steps++;
  13221. },
  13222. checkTemplate2() {
  13223. let _this = this;
  13224. _this
  13225. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  13226. confirmButtonText: "确定",
  13227. cancelButtonText: "取消",
  13228. type: "warning",
  13229. })
  13230. .then(() => {
  13231. _this.unitIndex = 0;
  13232. _this.unitJson = [
  13233. {
  13234. dyName: "", //单元标题
  13235. chapterInfo: [
  13236. {
  13237. isread: false,
  13238. chapterid: this.guid(),
  13239. title: "",
  13240. courseName: "",
  13241. taskJson: [
  13242. {
  13243. task: "",
  13244. taskDetail: "",
  13245. chapterData: [],
  13246. toolText: "",
  13247. toolChoose: [
  13248. {
  13249. tool: [],
  13250. toolDetail: "",
  13251. toolType: 0,
  13252. askCount: 1,
  13253. askTitle: "",
  13254. askJson: [
  13255. { askstitle: "", askItem: 1, checkList: [] },
  13256. ],
  13257. },
  13258. ],
  13259. isShowTools: false,
  13260. askCount: 1,
  13261. isFold: 1,
  13262. askTitle: "",
  13263. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13264. checkJson: [{ checkCount: [], checkPerent: [] }],
  13265. homeworkList: [],
  13266. },
  13267. ],
  13268. itemCount: 1,
  13269. fileList1: [],
  13270. video: [],
  13271. testData: [],
  13272. pData: [],
  13273. templateArray: [],
  13274. },
  13275. ],
  13276. },
  13277. ];
  13278. this.steps++;
  13279. setTimeout(() => {
  13280. this.checkEva(this.checkId);
  13281. setTimeout(() => {
  13282. this.checkEva(this.checkId);
  13283. }, 100);
  13284. }, 1000);
  13285. this.updateWork();
  13286. })
  13287. .catch(() => {
  13288. return;
  13289. });
  13290. },
  13291. checkTemplate3() {
  13292. let _this = this;
  13293. _this
  13294. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  13295. confirmButtonText: "确定",
  13296. cancelButtonText: "取消",
  13297. type: "warning",
  13298. })
  13299. .then(() => {
  13300. _this.unitIndex = 0;
  13301. _this.unitJson = [
  13302. {
  13303. dyName: "", //单元标题
  13304. easy: 1,
  13305. chapterInfo: [
  13306. {
  13307. isread: false,
  13308. chapterid: this.guid(),
  13309. title: "",
  13310. courseName: "",
  13311. taskJson: [
  13312. {
  13313. task: "",
  13314. taskDetail: "",
  13315. chapterData: [],
  13316. toolText: "",
  13317. toolChoose: [
  13318. {
  13319. tool: [],
  13320. toolDetail: "",
  13321. toolType: 0,
  13322. askCount: 1,
  13323. askTitle: "",
  13324. askJson: [
  13325. { askstitle: "", askItem: 1, checkList: [] },
  13326. ],
  13327. },
  13328. ],
  13329. isShowTools: false,
  13330. askCount: 1,
  13331. isFold: 1,
  13332. askTitle: "",
  13333. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13334. checkJson: [{ checkCount: [], checkPerent: [] }],
  13335. homeworkList: [],
  13336. },
  13337. ],
  13338. itemCount: 1,
  13339. fileList1: [],
  13340. video: [],
  13341. testData: [],
  13342. pData: [],
  13343. templateArray: [],
  13344. },
  13345. ],
  13346. },
  13347. ];
  13348. // this.steps++;
  13349. this.updateWork();
  13350. })
  13351. .catch(() => {
  13352. return;
  13353. });
  13354. },
  13355. checkTemplate4() {
  13356. let _this = this;
  13357. _this
  13358. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  13359. confirmButtonText: "确定",
  13360. cancelButtonText: "取消",
  13361. type: "warning",
  13362. })
  13363. .then(() => {
  13364. _this.unitIndex = 0;
  13365. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  13366. this.steps++;
  13367. this.updateWork();
  13368. })
  13369. .catch(() => {
  13370. return;
  13371. });
  13372. },
  13373. wordNext() {
  13374. this.dialogVisible2 = false;
  13375. },
  13376. isAddOrUpdateAttText() {
  13377. if (this.AttTextType == 0) {
  13378. this.addAttTextMessage();
  13379. } else {
  13380. this.updateAttText();
  13381. }
  13382. },
  13383. isAddOrUpdateLine() {
  13384. if (!this.lineTitle) {
  13385. this.$message.error("请填写链接标题");
  13386. return;
  13387. }
  13388. if (this.lineType == 0) {
  13389. this.addLine();
  13390. } else {
  13391. this.updateLine();
  13392. }
  13393. },
  13394. addAttTextMessage() {
  13395. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13396. this.taskCount
  13397. ].chapterData.unshift({
  13398. name: this.AttText.title,
  13399. url: this.AttText.text,
  13400. type: 6,
  13401. });
  13402. this.imgChange1(null, null, 6, this.taskCount);
  13403. this.dialogVisible6 = false;
  13404. },
  13405. selectAttText(itemTaskIndex, i) {
  13406. this.AttText.title =
  13407. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13408. itemTaskIndex
  13409. ].chapterData[i].name;
  13410. this.AttText.text =
  13411. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13412. itemTaskIndex
  13413. ].chapterData[i].url;
  13414. this.taskCount = itemTaskIndex;
  13415. this.AttTextIndex = i;
  13416. this.AttTextType = 1;
  13417. this.dialogVisible6 = true;
  13418. },
  13419. updateAttText() {
  13420. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13421. this.taskCount
  13422. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  13423. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13424. this.taskCount
  13425. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  13426. this.dialogVisible6 = false;
  13427. },
  13428. addLine() {
  13429. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13430. this.lineCount
  13431. ].chapterData.unshift({
  13432. name: "链接",
  13433. title: this.lineTitle,
  13434. url: this.line,
  13435. type: 8,
  13436. });
  13437. this.imgChange1(null, null, 8, this.lineCount);
  13438. this.dialogVisible7 = false;
  13439. },
  13440. selectLine(itemTaskIndex, i) {
  13441. this.line =
  13442. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13443. itemTaskIndex
  13444. ].chapterData[i].url;
  13445. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13446. itemTaskIndex
  13447. ].chapterData[i].title
  13448. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13449. .chapterData[i].title
  13450. : "";
  13451. this.taskCount = itemTaskIndex;
  13452. this.lineCount = i;
  13453. this.lineType = 1;
  13454. this.dialogVisible7 = true;
  13455. },
  13456. openUpdateSource(itemTaskIndex, i) {
  13457. this.sourceData = {};
  13458. let source =
  13459. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13460. .chapterData[i];
  13461. this.sourceData[source.id] = {};
  13462. this.sourceData[source.id].name = source.title;
  13463. this.sourceData[source.id].url = source.url;
  13464. this.dialogVisibleSource = true;
  13465. this.updateSourcePan = true;
  13466. this.taskCount = itemTaskIndex;
  13467. this.lineCount = i;
  13468. },
  13469. updateLine() {
  13470. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13471. this.taskCount
  13472. ].chapterData[this.lineCount].url = this.line;
  13473. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13474. this.taskCount
  13475. ].chapterData[this.lineCount].title = this.lineTitle;
  13476. this.dialogVisible7 = false;
  13477. },
  13478. addPP() {
  13479. this.dialogVisible3 = true;
  13480. },
  13481. goTo(path) {
  13482. this.$router.push(path);
  13483. },
  13484. openTools(itemTaskIndex, i, toolIndex) {
  13485. this.toolIndex = toolIndex;
  13486. this.taskCount = itemTaskIndex;
  13487. if (i == 4) {
  13488. if (toolIndex == null) {
  13489. var a =
  13490. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13491. .chapterData;
  13492. for (var i = 0; i < a.length; i++) {
  13493. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  13494. this.askJson =
  13495. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13496. itemTaskIndex
  13497. ].chapterData[i].askJson;
  13498. }
  13499. }
  13500. } else {
  13501. this.askJson = JSON.parse(
  13502. JSON.stringify(
  13503. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13504. itemTaskIndex
  13505. ].toolChoose[toolIndex]
  13506. )
  13507. );
  13508. }
  13509. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  13510. this.dialogVisible5 = true;
  13511. } else if (i == 45) {
  13512. if (
  13513. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13514. .toolChoose[toolIndex].testJson
  13515. ) {
  13516. this.testJson = JSON.parse(
  13517. JSON.stringify(
  13518. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13519. itemTaskIndex
  13520. ].toolChoose[toolIndex].testJson
  13521. )
  13522. );
  13523. } else {
  13524. var testJson = {
  13525. testCount: 1,
  13526. testTitle: "",
  13527. testJson: [
  13528. {
  13529. teststitle: "",
  13530. testItem: 1,
  13531. checkList: [],
  13532. timuList: [],
  13533. answer: [],
  13534. type: "1",
  13535. },
  13536. ],
  13537. };
  13538. this.testJson = testJson;
  13539. }
  13540. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  13541. this.dialogVisibleChoice = true;
  13542. } else if (i == 47) {
  13543. if (
  13544. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13545. .toolChoose[toolIndex].sentenceList
  13546. ) {
  13547. this.sentenceList = JSON.parse(
  13548. JSON.stringify(
  13549. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13550. itemTaskIndex
  13551. ].toolChoose[toolIndex].sentenceList
  13552. )
  13553. );
  13554. } else {
  13555. var sentenceList = [
  13556. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  13557. ];
  13558. this.sentenceList = sentenceList;
  13559. }
  13560. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  13561. this.dialogVisibleSentence = true;
  13562. } else if (i == 48) {
  13563. if (
  13564. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13565. .toolChoose[toolIndex].tableJson
  13566. ) {
  13567. this.tableJson = JSON.parse(
  13568. JSON.stringify(
  13569. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13570. itemTaskIndex
  13571. ].toolChoose[toolIndex].tableJson
  13572. )
  13573. );
  13574. } else {
  13575. var tableJson = { text: "" };
  13576. this.tableJson = tableJson;
  13577. }
  13578. this.dialogVisibleTable = true;
  13579. } else if (i == 52) {
  13580. if (
  13581. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13582. .toolChoose[toolIndex].wordJson
  13583. ) {
  13584. this.wordJson = JSON.parse(
  13585. JSON.stringify(
  13586. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13587. itemTaskIndex
  13588. ].toolChoose[toolIndex].wordJson
  13589. )
  13590. );
  13591. } else {
  13592. var wordJson = { text: "" };
  13593. this.wordJson = wordJson;
  13594. }
  13595. this.dialogVisibleWord = true;
  13596. // else if (i == 50) {
  13597. // if (
  13598. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13599. // .toolChoose[toolIndex].uploadJson
  13600. // ) {
  13601. // this.uploadJson = JSON.parse(
  13602. // JSON.stringify(
  13603. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13604. // itemTaskIndex
  13605. // ].toolChoose[toolIndex].uploadJson
  13606. // )
  13607. // );
  13608. // } else {
  13609. // var uploadJson = [];
  13610. // this.uploadJson = uploadJson;
  13611. // }
  13612. // this.dialogVisibleMoreUpload = true;
  13613. // }
  13614. } else if (i == 10) {
  13615. if (
  13616. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13617. .toolChoose[toolIndex].preTime
  13618. ) {
  13619. this.preTime = JSON.parse(
  13620. JSON.stringify(
  13621. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13622. itemTaskIndex
  13623. ].toolChoose[toolIndex].preTime
  13624. )
  13625. );
  13626. } else {
  13627. var preTime = 0;
  13628. this.preTime = preTime;
  13629. }
  13630. this.dialogVisiblePreTime = true;
  13631. } else if (i == 49) {
  13632. if (
  13633. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13634. .toolChoose[toolIndex].groupJson
  13635. ) {
  13636. this.groupJson = JSON.parse(
  13637. JSON.stringify(
  13638. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13639. itemTaskIndex
  13640. ].toolChoose[toolIndex].groupJson
  13641. )
  13642. );
  13643. } else {
  13644. var groupJson = {
  13645. group: [{ name: "第1组" }],
  13646. number: undefined,
  13647. islock: 1,
  13648. };
  13649. this.groupJson = groupJson;
  13650. }
  13651. this.dialogVisibleGroup = true;
  13652. } else if (i == 62) {
  13653. if (
  13654. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13655. .toolChoose[toolIndex].videoJson
  13656. ) {
  13657. this.videoJson = JSON.parse(
  13658. JSON.stringify(
  13659. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13660. itemTaskIndex
  13661. ].toolChoose[toolIndex].videoJson
  13662. )
  13663. );
  13664. } else {
  13665. var videoJson = {
  13666. video: "",
  13667. setting: [],
  13668. };
  13669. this.videoJson = videoJson;
  13670. }
  13671. this.dialogVisibleVideo = true;
  13672. } else if (i == 15) {
  13673. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13674. itemTaskIndex
  13675. ].toolChoose[toolIndex].answerQ
  13676. ? JSON.parse(
  13677. JSON.stringify(
  13678. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13679. itemTaskIndex
  13680. ].toolChoose[toolIndex].answerQ
  13681. )
  13682. )
  13683. : "";
  13684. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  13685. this.dialogVisible8 = true;
  13686. } else if (i == 40) {
  13687. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13688. itemTaskIndex
  13689. ].toolChoose[toolIndex].rateJson
  13690. ? JSON.parse(
  13691. JSON.stringify(
  13692. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13693. itemTaskIndex
  13694. ].toolChoose[toolIndex].rateJson
  13695. )
  13696. )
  13697. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  13698. this.selectSteps = 1;
  13699. this.dialogVisibleRate = true;
  13700. } else if (i == 42) {
  13701. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13702. itemTaskIndex
  13703. ].toolChoose[toolIndex].answerQ
  13704. ? JSON.parse(
  13705. JSON.stringify(
  13706. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13707. itemTaskIndex
  13708. ].toolChoose[toolIndex].answerQ
  13709. )
  13710. )
  13711. : "";
  13712. this.dialogVisibleMp3 = true;
  13713. } else if (i == 41) {
  13714. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13715. itemTaskIndex
  13716. ].toolChoose[toolIndex].selectJson
  13717. ? JSON.parse(
  13718. JSON.stringify(
  13719. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13720. itemTaskIndex
  13721. ].toolChoose[toolIndex].selectJson
  13722. )
  13723. )
  13724. : { url: "", select: [], answer: [] };
  13725. this.selectSteps = 1;
  13726. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  13727. this.dialogVisibleSelect = true;
  13728. } else if (i == 3) {
  13729. top.postMessage(
  13730. {
  13731. tools: "3y",
  13732. cid: this.cid,
  13733. stage: this.unitIndex,
  13734. task: itemTaskIndex,
  13735. tool: toolIndex,
  13736. },
  13737. "*"
  13738. );
  13739. } else if (i == 1) {
  13740. top.postMessage(
  13741. {
  13742. tools: "1y",
  13743. cid: this.cid,
  13744. stage: this.unitIndex,
  13745. task: itemTaskIndex,
  13746. tool: toolIndex,
  13747. },
  13748. "*"
  13749. );
  13750. } else if (i == 57) {
  13751. top.postMessage(
  13752. {
  13753. tools: "57y",
  13754. cid: this.cid,
  13755. stage: this.unitIndex,
  13756. task: itemTaskIndex,
  13757. tool: toolIndex,
  13758. },
  13759. "*"
  13760. );
  13761. } else if (i == 69) {
  13762. this.englishList = {};
  13763. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  13764. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  13765. ? JSON.parse(
  13766. JSON.stringify(
  13767. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13768. itemTaskIndex
  13769. ].toolChoose[toolIndex].englishList
  13770. )
  13771. )
  13772. : {};
  13773. this.$forceUpdate();
  13774. this.englishDialogVisible = true;
  13775. } else if (i == 70) {
  13776. this.englishVoiceJson = {};
  13777. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  13778. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  13779. ? JSON.parse(
  13780. JSON.stringify(
  13781. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13782. itemTaskIndex
  13783. ].toolChoose[toolIndex].englishVoiceJson
  13784. )
  13785. )
  13786. : {
  13787. title: '',
  13788. detail: '',
  13789. array: []
  13790. };
  13791. // {
  13792. // time: "",
  13793. // class: "",
  13794. // difficulty: 0,
  13795. // topic: "",
  13796. // isShow: false,
  13797. // eva: 0,
  13798. // aiEva: {
  13799. // isAiEva: false,
  13800. // aiEvaChoose: [],
  13801. // },
  13802. // allfType: [],
  13803. // englishJson: {},
  13804. // };
  13805. this.$forceUpdate();
  13806. this.EnglishVoiceDialog = true;
  13807. }
  13808. },
  13809. setEnglishVoiceJson(val) {
  13810. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13811. this.taskCount
  13812. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  13813. JSON.stringify(val)
  13814. );
  13815. this.$forceUpdate();
  13816. if (
  13817. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13818. .toolChoose[this.toolIndex].tool != 70
  13819. ) {
  13820. this.addTools(70, this.taskCount, this.toolIndex);
  13821. }
  13822. },
  13823. chapAddTools(i) {
  13824. if (this.chapTools[0].tools.length == 0) {
  13825. this.chapTools[0].tools.push(i);
  13826. } else {
  13827. if (this.chapTools[0].tools.indexOf(i) != -1) {
  13828. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  13829. } else {
  13830. this.chapTools[0].tools.push(i);
  13831. }
  13832. }
  13833. this.$forceUpdate();
  13834. },
  13835. addChaptersDataTools() {
  13836. if (this.chapTools[0].tools.indexOf(4) != -1) {
  13837. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13838. this.chapCount
  13839. ].chapterData.unshift({
  13840. name: this.chapTools[0].toolDetail,
  13841. url: this.chapTools[0].tools,
  13842. type: 7,
  13843. askJson: this.askJson,
  13844. });
  13845. } else {
  13846. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13847. this.chapCount
  13848. ].chapterData.unshift({
  13849. name: this.chapTools[0].toolDetail,
  13850. url: this.chapTools[0].tools,
  13851. type: 7,
  13852. });
  13853. }
  13854. this.imgChange1(null, null, 7, this.chapCount);
  13855. this.dialogVisible4 = false;
  13856. },
  13857. addTools(i, itemTaskIndex, toolIndex) {
  13858. // if (
  13859. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13860. // .toolChoose[toolIndex].tool.length == 0
  13861. // ) {
  13862. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13863. // itemTaskIndex
  13864. // ].toolChoose[toolIndex].tool.push(i);
  13865. // } else {
  13866. // if (
  13867. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13868. // itemTaskIndex
  13869. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  13870. // ) {
  13871. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13872. // itemTaskIndex
  13873. // ].toolChoose[toolIndex].tool.splice(
  13874. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13875. // itemTaskIndex
  13876. // ].toolChoose[toolIndex].tool.indexOf(i),
  13877. // 1
  13878. // );
  13879. // } else {
  13880. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13881. // itemTaskIndex
  13882. // ].toolChoose[toolIndex].tool.push(i);
  13883. // }
  13884. // console.log(
  13885. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13886. // .toolChoose[toolIndex].tool
  13887. // );
  13888. // }
  13889. if (i == 4) {
  13890. if (
  13891. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13892. .toolChoose[toolIndex].askJson.askTitle == "" ||
  13893. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13894. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  13895. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13896. .toolChoose[toolIndex].askJson[0].checkList < 2
  13897. ) {
  13898. this.openTools(itemTaskIndex, 4, toolIndex);
  13899. // this.$message({
  13900. // message: "请填写完整问卷内容",
  13901. // type: "error",
  13902. // });
  13903. return;
  13904. }
  13905. }
  13906. if (i == 45) {
  13907. if (
  13908. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13909. .toolChoose[toolIndex].testJson ||
  13910. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13911. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  13912. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13913. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  13914. ) {
  13915. this.openTools(itemTaskIndex, 45, toolIndex);
  13916. // this.$message({
  13917. // message: "请填写完整问卷内容",
  13918. // type: "error",
  13919. // });
  13920. return;
  13921. }
  13922. }
  13923. if (i == 47) {
  13924. if (
  13925. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13926. .toolChoose[toolIndex].sentenceList ||
  13927. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13928. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  13929. ) {
  13930. this.openTools(itemTaskIndex, 47, toolIndex);
  13931. return;
  13932. }
  13933. }
  13934. if (i == 69) {
  13935. if (
  13936. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13937. .toolChoose[toolIndex].englishList
  13938. ) {
  13939. this.openTools(itemTaskIndex, 69, toolIndex);
  13940. return;
  13941. }
  13942. }
  13943. if (i == 70) {
  13944. if (
  13945. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13946. .toolChoose[toolIndex].englishVoiceJson
  13947. ) {
  13948. this.openTools(itemTaskIndex, 70, toolIndex);
  13949. return;
  13950. }
  13951. }
  13952. // if (i == 48) {
  13953. // if (
  13954. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13955. // .toolChoose[toolIndex].tableJson
  13956. // ) {
  13957. // this.openTools(itemTaskIndex, 48, toolIndex);
  13958. // return;
  13959. // }
  13960. // }
  13961. // if (i == 50) {
  13962. // if (
  13963. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13964. // .toolChoose[toolIndex].uploadJson
  13965. // ) {
  13966. // this.openTools(itemTaskIndex, 50, toolIndex);
  13967. // return;
  13968. // }
  13969. // }
  13970. if (i == 49) {
  13971. if (
  13972. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13973. .toolChoose[toolIndex].groupJson
  13974. ) {
  13975. this.openTools(itemTaskIndex, 49, toolIndex);
  13976. return;
  13977. }
  13978. }
  13979. if (i == 62) {
  13980. if (
  13981. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13982. .toolChoose[toolIndex].videoJson
  13983. ) {
  13984. this.openTools(itemTaskIndex, 62, toolIndex);
  13985. return;
  13986. }
  13987. }
  13988. if (i == 15) {
  13989. if (
  13990. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13991. .toolChoose[toolIndex].answerQ ||
  13992. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13993. .toolChoose[toolIndex].answerQ == ""
  13994. ) {
  13995. this.openTools(itemTaskIndex, 15, toolIndex);
  13996. // this.$message({
  13997. // message: "请填写问答内容",
  13998. // type: "error",
  13999. // });
  14000. return;
  14001. }
  14002. }
  14003. if (i == 40) {
  14004. if (
  14005. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14006. .toolChoose[toolIndex].rateJson ||
  14007. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14008. .toolChoose[toolIndex].rateJson.length
  14009. ) {
  14010. this.openTools(itemTaskIndex, 40, toolIndex);
  14011. return;
  14012. }
  14013. }
  14014. if (i == 41) {
  14015. if (
  14016. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14017. .toolChoose[toolIndex].selectJson ||
  14018. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14019. .toolChoose[toolIndex].selectJson.url == "" ||
  14020. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14021. .toolChoose[toolIndex].selectJson.select.length ||
  14022. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14023. .toolChoose[toolIndex].selectJson.answer.length
  14024. ) {
  14025. this.openTools(itemTaskIndex, 41, toolIndex);
  14026. return;
  14027. }
  14028. }
  14029. if (i == 42) {
  14030. if (
  14031. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14032. .toolChoose[toolIndex].answerQ ||
  14033. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14034. .toolChoose[toolIndex].answerQ == ""
  14035. ) {
  14036. this.openTools(itemTaskIndex, 42, toolIndex);
  14037. return;
  14038. }
  14039. }
  14040. if (
  14041. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  14042. .toolChoose[toolIndex].tool.length > 0
  14043. ) {
  14044. if (
  14045. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14046. itemTaskIndex
  14047. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  14048. ) {
  14049. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14050. itemTaskIndex
  14051. ].toolChoose[toolIndex].tool.splice(
  14052. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14053. itemTaskIndex
  14054. ].toolChoose[toolIndex].tool.indexOf(i),
  14055. 1
  14056. );
  14057. } else {
  14058. // this.$message({
  14059. // message: "每个工具只能添加一个",
  14060. // type: "error",
  14061. // });
  14062. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14063. itemTaskIndex
  14064. ].toolChoose[toolIndex].tool = [];
  14065. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14066. itemTaskIndex
  14067. ].toolChoose[toolIndex].tool.push(i);
  14068. }
  14069. } else {
  14070. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14071. itemTaskIndex
  14072. ].toolChoose[toolIndex].tool.push(i);
  14073. }
  14074. this.$forceUpdate();
  14075. },
  14076. addAskList(index) {
  14077. this.askJson.askJson.splice(index + 1, 0, {
  14078. askstitle: "",
  14079. askItem: 1,
  14080. checkList: [],
  14081. });
  14082. this.askJson.askCount++;
  14083. },
  14084. addTestList(index) {
  14085. this.testJson.testJson.splice(index + 1, 0, {
  14086. teststitle: "",
  14087. testItem: 1,
  14088. checkList: [],
  14089. timuList: [],
  14090. answer: [],
  14091. type: "1",
  14092. });
  14093. this.testJson.testCount++;
  14094. },
  14095. deleteAskList(index) {
  14096. if (
  14097. !this.askJson.askJson[index].askstitle &&
  14098. this.askJson.askJson[index].askItem == 1 &&
  14099. !this.askJson.askJson[index].checkList[0]
  14100. ) {
  14101. this.askJson.askJson.splice(index, 1);
  14102. this.askJson.askCount--;
  14103. } else {
  14104. let _this = this;
  14105. _this
  14106. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14107. confirmButtonText: "确定",
  14108. cancelButtonText: "取消",
  14109. type: "warning",
  14110. })
  14111. .then(() => {
  14112. _this.askJson.askJson.splice(index, 1);
  14113. _this.askJson.askCount--;
  14114. })
  14115. .catch(() => {
  14116. return;
  14117. });
  14118. }
  14119. },
  14120. deleteTestList(index) {
  14121. if (
  14122. !this.testJson.testJson[index].teststitle &&
  14123. this.testJson.testJson[index].testItem == 1 &&
  14124. !this.testJson.testJson[index].checkList[0]
  14125. ) {
  14126. this.testJson.testJson.splice(index, 1);
  14127. this.testJson.testCount--;
  14128. } else {
  14129. let _this = this;
  14130. _this
  14131. .$confirm("此操作不可撤销,是否继续?", "提示", {
  14132. confirmButtonText: "确定",
  14133. cancelButtonText: "取消",
  14134. type: "warning",
  14135. })
  14136. .then(() => {
  14137. _this.testJson.testJson.splice(index, 1);
  14138. _this.testJson.testCount--;
  14139. })
  14140. .catch(() => {
  14141. return;
  14142. });
  14143. }
  14144. },
  14145. askMove(type, index) {
  14146. if (type == 1) {
  14147. if (index > 0) {
  14148. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  14149. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14150. this.askJson.askJson[index - 1] = b;
  14151. this.askJson.askJson[index] = a;
  14152. }
  14153. } else {
  14154. if (index < this.askJson.askJson.length - 1) {
  14155. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  14156. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  14157. this.askJson.askJson[index + 1] = b;
  14158. this.askJson.askJson[index] = a;
  14159. }
  14160. }
  14161. this.$forceUpdate();
  14162. },
  14163. checkMove(type, index, checkIndex) {
  14164. if (type == 1) {
  14165. if (checkIndex > 0) {
  14166. let a = JSON.parse(
  14167. JSON.stringify(
  14168. this.askJson.askJson[index].checkList[checkIndex - 1]
  14169. )
  14170. );
  14171. let b = JSON.parse(
  14172. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14173. );
  14174. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  14175. this.askJson.askJson[index].checkList[checkIndex] = a;
  14176. }
  14177. } else {
  14178. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  14179. let a = JSON.parse(
  14180. JSON.stringify(
  14181. this.askJson.askJson[index].checkList[checkIndex + 1]
  14182. )
  14183. );
  14184. let b = JSON.parse(
  14185. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  14186. );
  14187. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  14188. this.askJson.askJson[index].checkList[checkIndex] = a;
  14189. }
  14190. }
  14191. this.$forceUpdate();
  14192. },
  14193. testMove(type, index) {
  14194. if (type == 1) {
  14195. if (index > 0) {
  14196. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  14197. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14198. this.testJson.testJson[index - 1] = b;
  14199. this.testJson.testJson[index] = a;
  14200. }
  14201. } else {
  14202. if (index < this.testJson.testJson.length - 1) {
  14203. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  14204. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  14205. this.testJson.testJson[index + 1] = b;
  14206. this.testJson.testJson[index] = a;
  14207. }
  14208. }
  14209. this.$forceUpdate();
  14210. },
  14211. tcheckMove(type, index, checkIndex) {
  14212. if (type == 1) {
  14213. if (checkIndex > 0) {
  14214. let a = JSON.parse(
  14215. JSON.stringify(
  14216. this.testJson.testJson[index].checkList[checkIndex - 1]
  14217. )
  14218. );
  14219. let b = JSON.parse(
  14220. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14221. );
  14222. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  14223. this.testJson.testJson[index].checkList[checkIndex] = a;
  14224. }
  14225. } else {
  14226. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  14227. let a = JSON.parse(
  14228. JSON.stringify(
  14229. this.testJson.testJson[index].checkList[checkIndex + 1]
  14230. )
  14231. );
  14232. let b = JSON.parse(
  14233. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  14234. );
  14235. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  14236. this.testJson.testJson[index].checkList[checkIndex] = a;
  14237. }
  14238. }
  14239. this.$forceUpdate();
  14240. },
  14241. addcheckList(json, index) {
  14242. // json.checkList.length++;
  14243. json.checkList.splice(index + 1, 0, "");
  14244. json.askItem++;
  14245. this.$forceUpdate();
  14246. },
  14247. deletecheckList(json, index) {
  14248. // json.checkList.length--;
  14249. json.checkList.splice(index, 1);
  14250. json.askItem--;
  14251. this.$forceUpdate();
  14252. },
  14253. addTcheckList(json, index) {
  14254. // json.checkList.length++;
  14255. json.checkList.splice(index + 1, 0, "");
  14256. json.testItem++;
  14257. this.$forceUpdate();
  14258. },
  14259. deleteTcheckList(json, index) {
  14260. // json.checkList.length--;
  14261. json.checkList.splice(index, 1);
  14262. json.testItem--;
  14263. this.$forceUpdate();
  14264. },
  14265. checkTestType(type, json) {
  14266. json.type = type;
  14267. setTimeout(() => {
  14268. json.answer = [];
  14269. }, 100);
  14270. },
  14271. checkAskType(type, json) {
  14272. json.type = type;
  14273. // json.checkList = [];
  14274. this.$forceUpdate();
  14275. },
  14276. addSelectList(json) {
  14277. json.select.push("");
  14278. json.answer.push("");
  14279. },
  14280. deleteSelectList(json) {
  14281. // json.select.length--;
  14282. // json.answer.length--;
  14283. json.select.splice(json.select.length - 1, 1);
  14284. json.answer.splice(json.answer.length - 1, 1);
  14285. },
  14286. addAsk() {
  14287. if (this.askJson.askTitle === "") {
  14288. this.$message.error("标题不能为空!");
  14289. return;
  14290. }
  14291. var aj = this.askJson.askJson;
  14292. var b = 1;
  14293. for (var i = 0; i < aj.length; i++) {
  14294. if (aj[i].askstitle === "") {
  14295. var a = 1;
  14296. for (let index = 0; index < aj[i].askItem; index++) {
  14297. const element = aj[i].checkList[index]
  14298. ? aj[i].checkList[index]
  14299. : "";
  14300. if (element != "") {
  14301. b++;
  14302. this.$message.error(`请将题目${i + 1}填写完整。`);
  14303. return;
  14304. } else {
  14305. a++;
  14306. }
  14307. }
  14308. if (b == 1) {
  14309. this.$message.error("至少填写一个问题");
  14310. return;
  14311. }
  14312. } else if (aj[i].askstitle != "") {
  14313. for (let index = 0; index < aj[i].askItem; index++) {
  14314. const element = aj[i].checkList[index]
  14315. ? aj[i].checkList[index]
  14316. : "";
  14317. var index = 0;
  14318. for (var z = 0; z < aj[i].checkList.length; z++) {
  14319. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  14320. if (checkC != "") {
  14321. index++;
  14322. } else {
  14323. this.$message.error(`题目${i + 1}选项不能为空!`);
  14324. return;
  14325. }
  14326. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  14327. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  14328. if (checkC == checkC2) {
  14329. this.$message.error(
  14330. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  14331. );
  14332. return;
  14333. }
  14334. }
  14335. }
  14336. b++;
  14337. if (index < 2) {
  14338. this.$message.error("每道题目至少需要设置2个选项。");
  14339. return;
  14340. }
  14341. }
  14342. }
  14343. }
  14344. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  14345. var elc = el.checkList.filter((element) => {
  14346. return element != "";
  14347. });
  14348. return el.askstitle != "" && elc.length != 0;
  14349. });
  14350. if (!this.dialogVisible4) {
  14351. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14352. this.taskCount
  14353. ].toolChoose[this.toolIndex] = this.askJson;
  14354. }
  14355. this.dialogVisible5 = false;
  14356. if (
  14357. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14358. .toolChoose[this.toolIndex].tool != 4
  14359. ) {
  14360. this.addTools(4, this.taskCount, this.toolIndex);
  14361. }
  14362. },
  14363. addTest() {
  14364. // if (this.testJson.testTitle === "") {
  14365. // this.$message.error("标题不能为空!");
  14366. // return;
  14367. // }
  14368. var aj = this.testJson.testJson;
  14369. var b = 1;
  14370. for (var i = 0; i < aj.length; i++) {
  14371. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  14372. var a = 1;
  14373. for (let index = 0; index < aj[i].testItem; index++) {
  14374. const element = aj[i].checkList[index]
  14375. ? aj[i].checkList[index]
  14376. : "";
  14377. if (element != "") {
  14378. b++;
  14379. this.$message.error(`请将题目${i + 1}填写完整。`);
  14380. return;
  14381. } else {
  14382. a++;
  14383. }
  14384. }
  14385. if (b == 1) {
  14386. this.$message.error("至少填写一个问题");
  14387. return;
  14388. }
  14389. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  14390. for (let index = 0; index < aj[i].testItem; index++) {
  14391. const element = aj[i].checkList[index]
  14392. ? aj[i].checkList[index]
  14393. : "";
  14394. var index = 0;
  14395. for (var z = 0; z < aj[i].checkList.length; z++) {
  14396. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  14397. if (checkC != "") {
  14398. index++;
  14399. } else {
  14400. this.$message.error(`题目${i + 1}选项不能为空!`);
  14401. return;
  14402. }
  14403. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  14404. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  14405. if (checkC == checkC2) {
  14406. this.$message.error(
  14407. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  14408. );
  14409. return;
  14410. }
  14411. }
  14412. }
  14413. b++;
  14414. if (index < 2) {
  14415. this.$message.error("每道题目至少需要设置2个选项。");
  14416. return;
  14417. }
  14418. if (
  14419. (aj[i].type == "2" && !aj[i].answer.length) ||
  14420. (aj[i].type == "1" &&
  14421. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  14422. (aj[i].answer !== 0 && !aj[i].answer)))
  14423. ) {
  14424. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  14425. return;
  14426. }
  14427. }
  14428. }
  14429. }
  14430. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  14431. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  14432. var elc = el.checkList.filter((element) => {
  14433. return element != "";
  14434. });
  14435. return (
  14436. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  14437. );
  14438. });
  14439. isTestJson.testCount = isTestJson.testJson.length;
  14440. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14441. this.taskCount
  14442. ].toolChoose[this.toolIndex].testJson = isTestJson;
  14443. this.dialogVisibleChoice = false;
  14444. if (
  14445. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14446. .toolChoose[this.toolIndex].tool != 45
  14447. ) {
  14448. this.addTools(45, this.taskCount, this.toolIndex);
  14449. }
  14450. },
  14451. addVideoJson(videoJson) {
  14452. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14453. this.taskCount
  14454. ].toolChoose[this.toolIndex].videoJson = videoJson;
  14455. this.dialogVisibleVideo = false;
  14456. if (
  14457. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14458. .toolChoose[this.toolIndex].tool != 62
  14459. ) {
  14460. this.addTools(62, this.taskCount, this.toolIndex);
  14461. }
  14462. },
  14463. //自动获取剪贴板
  14464. pasteOption() {
  14465. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14466. if (!iframe) {
  14467. this.$message.error("请使用AI共创生成题目");
  14468. return;
  14469. }
  14470. let copyData = iframe.contentWindow.copyData;
  14471. if (!copyData || !copyData.selectData.length) {
  14472. this.$message.error("请使用AI共创生成题目");
  14473. return;
  14474. }
  14475. let selectData = copyData.selectData;
  14476. for (var i = 0; i < selectData.length; i++) {
  14477. let answer = 0;
  14478. switch (selectData[i].answer[0]) {
  14479. case "A":
  14480. answer = 0;
  14481. break;
  14482. case "B":
  14483. answer = 1;
  14484. break;
  14485. case "C":
  14486. answer = 2;
  14487. break;
  14488. case "D":
  14489. answer = 3;
  14490. break;
  14491. case "E":
  14492. answer = 4;
  14493. break;
  14494. default:
  14495. break;
  14496. }
  14497. this.testJson.testJson.push({
  14498. teststitle: selectData[i].subject,
  14499. testItem: selectData[i].options.length,
  14500. checkList: selectData[i].options,
  14501. timuList: [],
  14502. answer: answer,
  14503. type: "1",
  14504. });
  14505. this.testJson.testCount++;
  14506. }
  14507. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  14508. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  14509. var elc = el.checkList.filter((element) => {
  14510. return element != "";
  14511. });
  14512. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  14513. });
  14514. isTestJson.testCount = isTestJson.testJson.length;
  14515. if (!isTestJson.testCount) {
  14516. return;
  14517. }
  14518. this.testJson = isTestJson;
  14519. this.$forceUpdate();
  14520. },
  14521. pasteTask(taskJson) {
  14522. let stageTasksData = [];
  14523. if (taskJson) {
  14524. stageTasksData = taskJson;
  14525. } else {
  14526. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14527. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  14528. if (!iframe && !iframe2) {
  14529. this.$message.error("请使用AI共创生成");
  14530. return;
  14531. }
  14532. let copyData = iframe ? iframe.contentWindow.copyData : false;
  14533. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  14534. if (
  14535. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  14536. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  14537. ) {
  14538. this.$message.error("请使用AI共创生成");
  14539. return;
  14540. }
  14541. stageTasksData = copyData
  14542. ? copyData.tasksData
  14543. : copyData2
  14544. ? copyData2.tasksData
  14545. : [{ taskName: "", taskDecs: "" }];
  14546. }
  14547. let taskA = [];
  14548. let tasks = stageTasksData;
  14549. for (var j = 0; j < tasks.length; j++) {
  14550. taskA.push({
  14551. task: tasks[j].taskName,
  14552. taskDetail: tasks[j].taskDecs,
  14553. chapterData: [],
  14554. toolText: "",
  14555. toolChoose: [
  14556. {
  14557. tool: [],
  14558. toolDetail: "",
  14559. toolType: 0,
  14560. askCount: 1,
  14561. askTitle: "",
  14562. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14563. },
  14564. ],
  14565. isShowTools: false,
  14566. askCount: 1,
  14567. isFold: 1,
  14568. askTitle: "",
  14569. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14570. checkJson: [{ checkCount: [], checkPerent: [] }],
  14571. homeworkList: [],
  14572. });
  14573. }
  14574. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  14575. this.$forceUpdate();
  14576. },
  14577. pasteStage(stageJson) {
  14578. let stageData = [];
  14579. if (stageJson) {
  14580. stageData = stageJson;
  14581. } else {
  14582. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14583. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  14584. if (!iframe && !iframe2) {
  14585. this.$message.error("请使用AI共创生成");
  14586. return;
  14587. }
  14588. let copyData = iframe ? iframe.contentWindow.copyData : false;
  14589. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  14590. if (
  14591. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  14592. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  14593. ) {
  14594. this.$message.error("请使用AI共创生成");
  14595. return;
  14596. }
  14597. stageData = copyData
  14598. ? copyData.stageData
  14599. : copyData2
  14600. ? copyData2.stageData
  14601. : [""];
  14602. }
  14603. let stage = [];
  14604. for (var i = 0; i < stageData.length; i++) {
  14605. stage.push({
  14606. dyName: stageData[i], //单元标题
  14607. chapterInfo: [
  14608. {
  14609. isread: false,
  14610. chapterid: this.guid(),
  14611. title: "",
  14612. courseName: "",
  14613. taskJson: [
  14614. {
  14615. task: "",
  14616. taskDetail: "",
  14617. chapterData: [],
  14618. toolText: "",
  14619. toolChoose: [
  14620. {
  14621. tool: [],
  14622. toolDetail: "",
  14623. toolType: 0,
  14624. askCount: 1,
  14625. askTitle: "",
  14626. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14627. },
  14628. ],
  14629. isShowTools: false,
  14630. askCount: 1,
  14631. isFold: 1,
  14632. askTitle: "",
  14633. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14634. checkJson: [{ checkCount: [], checkPerent: [] }],
  14635. homeworkList: [],
  14636. },
  14637. ],
  14638. itemCount: 1,
  14639. fileList1: [],
  14640. video: [],
  14641. testData: [],
  14642. pData: [],
  14643. templateArray: [],
  14644. },
  14645. ],
  14646. });
  14647. }
  14648. let _this = this;
  14649. if (stageJson) {
  14650. if (!_this.cid) {
  14651. _this.unitJson = stage;
  14652. } else {
  14653. _this.unitIndex = 0;
  14654. _this.unitJson = stage;
  14655. _this.updateWork();
  14656. }
  14657. } else {
  14658. _this
  14659. .$confirm(
  14660. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  14661. "提示",
  14662. {
  14663. confirmButtonText: "确定",
  14664. cancelButtonText: "取消",
  14665. type: "warning",
  14666. }
  14667. )
  14668. .then(() => {
  14669. _this.unitIndex = 0;
  14670. _this.unitJson = stage;
  14671. // _this.steps++;
  14672. _this.updateWork();
  14673. })
  14674. .catch(() => {
  14675. return;
  14676. });
  14677. }
  14678. },
  14679. openStageBox() {
  14680. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  14681. this.dialogVisibleStageChange = true;
  14682. },
  14683. updateChange() {
  14684. this.$confirm(
  14685. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  14686. "提示",
  14687. {
  14688. confirmButtonText: "确定",
  14689. cancelButtonText: "取消",
  14690. type: "warning",
  14691. }
  14692. )
  14693. .then(() => {
  14694. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  14695. this.updateWork();
  14696. this.dialogVisibleStageChange = false;
  14697. })
  14698. .catch(() => {
  14699. return;
  14700. });
  14701. },
  14702. addAnswer() {
  14703. if (this.answerQ == "") {
  14704. this.$message.error("请输入您想要问的问题");
  14705. return;
  14706. }
  14707. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14708. this.taskCount
  14709. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  14710. this.dialogVisible8 = false;
  14711. if (
  14712. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14713. .toolChoose[this.toolIndex].tool != 15
  14714. ) {
  14715. this.addTools(15, this.taskCount, this.toolIndex);
  14716. }
  14717. },
  14718. addMp3Answer() {
  14719. if (this.answerQ == "") {
  14720. this.$message.error("请输入您想要回答的问题");
  14721. return;
  14722. }
  14723. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14724. this.taskCount
  14725. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  14726. this.dialogVisibleMp3 = false;
  14727. },
  14728. addRateAnswer() {
  14729. var a = 1;
  14730. for (var i = 0; i < this.rateJson.length; i++) {
  14731. if (this.rateJson[i].value == "") {
  14732. a = 2;
  14733. break;
  14734. }
  14735. }
  14736. if (a == 2) {
  14737. this.$message.error("请把评价信息填写完整");
  14738. return;
  14739. }
  14740. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14741. this.taskCount
  14742. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  14743. this.dialogVisibleRate = false;
  14744. if (
  14745. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14746. .toolChoose[this.toolIndex].tool != 40
  14747. ) {
  14748. this.addTools(40, this.taskCount, this.toolIndex);
  14749. }
  14750. },
  14751. addSelectAnswer() {
  14752. if (this.selectJson.url == "") {
  14753. this.$message.error("请上传题目");
  14754. return;
  14755. }
  14756. if (!this.selectJson.select.length) {
  14757. this.$message.error("请添加选项");
  14758. return;
  14759. }
  14760. if (!this.selectJson.answer.length) {
  14761. this.$message.error("请设置答案");
  14762. return;
  14763. }
  14764. var a = 1;
  14765. for (var i = 0; i < this.selectJson.answer.length; i++) {
  14766. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  14767. a = 2;
  14768. }
  14769. }
  14770. if (a == 2) {
  14771. this.$message.error("请设置答案");
  14772. return;
  14773. }
  14774. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14775. this.taskCount
  14776. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  14777. this.dialogVisibleSelect = false;
  14778. if (
  14779. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14780. .toolChoose[this.toolIndex].tool != 41
  14781. ) {
  14782. this.addTools(41, this.taskCount, this.toolIndex);
  14783. }
  14784. },
  14785. nextSelectSteps() {
  14786. if (this.selectJson.url == "") {
  14787. this.$message.error("请上传题目");
  14788. return;
  14789. }
  14790. if (!this.selectJson.select.length) {
  14791. this.$message.error("请添加选项");
  14792. return;
  14793. } else {
  14794. for (var z = 0; z < this.selectJson.select.length; z++) {
  14795. let checkC = this.selectJson.select[z];
  14796. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  14797. let checkC2 = this.selectJson.select[z2];
  14798. if (checkC == checkC2) {
  14799. this.$message.error(
  14800. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  14801. );
  14802. return;
  14803. }
  14804. }
  14805. }
  14806. }
  14807. var a = 1;
  14808. for (var i = 0; i < this.selectJson.select.length; i++) {
  14809. if (!this.selectJson.select[i]) {
  14810. a = 2;
  14811. }
  14812. }
  14813. if (a == 2) {
  14814. this.$message.error("添加的选项不能为空");
  14815. return;
  14816. }
  14817. this.selectSteps++;
  14818. },
  14819. selectCourseDetail() {
  14820. if (this.cid == "" || this.cid == undefined) {
  14821. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  14822. this.isTeacherSee = true;
  14823. }
  14824. console.log("这是新增课程");
  14825. this.selectAllType();
  14826. this.chatid = uuidv4();
  14827. // this.courseTextB = false
  14828. } else {
  14829. this.isOutline = true
  14830. this.isOutline2 = true
  14831. this.cpoteType = 4
  14832. this.cidType = 1;
  14833. let params = {
  14834. cid: this.cid,
  14835. };
  14836. this.ajax
  14837. .get(this.$store.state.api + "select_course_detail", params)
  14838. .then((res) => {
  14839. this.unitJson = JSON.parse(res.data[0][0].chapters);
  14840. this.courseState = res.data[0][0].state;
  14841. for (var j = 0; j < this.unitJson.length; j++) {
  14842. for (
  14843. var k = 0;
  14844. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  14845. k++
  14846. ) {
  14847. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  14848. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  14849. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  14850. : [];
  14851. let _chapterData = [];
  14852. for (
  14853. var c = 0;
  14854. c <
  14855. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  14856. .length;
  14857. c++
  14858. ) {
  14859. if (
  14860. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  14861. ) {
  14862. _chapterData.push(
  14863. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  14864. );
  14865. }
  14866. }
  14867. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  14868. _chapterData;
  14869. }
  14870. }
  14871. this.$forceUpdate();
  14872. this.courseName = res.data[0][0].title;
  14873. this.courseText = res.data[0][0].brief;
  14874. this.courseText2 = res.data[0][0].reBrief;
  14875. this.evalua = res.data[0][0].evaId;
  14876. this.cover = JSON.parse(res.data[0][0].cover);
  14877. this.noneBtnImg = this.cover.length >= 1;
  14878. if (res.data[0][0].refile) {
  14879. this.infoData = JSON.parse(res.data[0][0].refile)
  14880. }
  14881. // this.checkboxList =
  14882. // res.data[0][0].course_student.length > 0
  14883. // ? JSON.parse(res.data[0][0].course_student)
  14884. // : [];
  14885. this.checkboxList2 = res.data[0][0].juri
  14886. ? res.data[0][0].juri.split(",")
  14887. : [];
  14888. this.inviteCode = [];
  14889. for (var i = 0; i < res.data[2].length; i++) {
  14890. this.inviteCode.push({
  14891. cid: res.data[2][i].classid,
  14892. ic: res.data[2][i].code,
  14893. });
  14894. }
  14895. this.checkboxList3 = res.data[0][0].course_teacher
  14896. ? res.data[0][0].course_teacher.split(",")
  14897. : [];
  14898. // this.isTeacherSee =
  14899. // res.data[0][0].is_teacher_look == 0 ? true : false;
  14900. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  14901. this.myWord = res.data[0][0].template;
  14902. this.templateC.id = "123";
  14903. this.courseUserid = res.data[0][0].userid;
  14904. // if(this.courseUserid == this.userid){
  14905. // this.InviteChange(this.checkboxList2)
  14906. // }
  14907. this.nbOrder = res.data[0][0].ordernumber;
  14908. this.courseTypeId = [];
  14909. for (var i = 0; i < res.data[1].length; i++) {
  14910. this.courseTypeId.push(res.data[1][i].typeid);
  14911. }
  14912. console.log(this.courseTypeId);
  14913. // if (this.timer) clearInterval(this.timer);
  14914. if (this.timer) clearTimeout(this.timer);
  14915. this.timer = null;
  14916. // this.timer = setInterval(() => {
  14917. if(res.data[3].length){
  14918. try {
  14919. this.aiJson = JSON.parse(res.data[3][0].tips);
  14920. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  14921. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  14922. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14923. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  14924. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  14925. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14926. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  14927. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  14928. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  14929. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  14930. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  14931. }
  14932. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  14933. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  14934. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  14935. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  14936. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  14937. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  14938. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  14939. - 我们的课程主题可以如何与学生的实际生活联系起来?
  14940. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  14941. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  14942. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  14943. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  14944. - 学生个人最终要完成什么?学生小组最终要完成什么?
  14945. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  14946. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  14947. 讨论:<转文本内容>`
  14948. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  14949. this.templateid = res.data[3][0].template;
  14950. this.getTipsTemplateIsDialog()
  14951. }catch(error){
  14952. console.error(error)
  14953. }
  14954. }
  14955. if(res.data[0][0].cpote){
  14956. try {
  14957. this.cpote = JSON.parse(res.data[0][0].cpote);
  14958. }catch(error){
  14959. console.error(error)
  14960. }
  14961. }
  14962. if(res.data[0][0].setting){
  14963. try {
  14964. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  14965. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  14966. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  14967. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  14968. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  14969. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  14970. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  14971. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  14972. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  14973. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  14974. 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;
  14975. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  14976. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  14977. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  14978. 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;
  14979. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  14980. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  14981. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  14982. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  14983. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  14984. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  14985. if(this.targetCourseText2 || (!this.teacherCourseText)){
  14986. this.courseTextBool = true
  14987. }
  14988. // if(!this.teacherCourseText && !this.targetCourseText2){
  14989. // this.isuseT = 1
  14990. // }
  14991. }catch(error){
  14992. console.error(error)
  14993. }
  14994. }
  14995. if(this.courseText){
  14996. this.courseTextB = false
  14997. }
  14998. if(this.teacherCourseText){
  14999. this.teacherCourseTextB = false
  15000. }
  15001. if(this.targetCourseText){
  15002. this.targetCourseTextB = false
  15003. }
  15004. if(this.targetCourseText2){
  15005. this.targetCourseText2B = false
  15006. }
  15007. this.isFileSearch = res.data[0][0].iresearch == 1
  15008. // this.seleteCourseUpdate();
  15009. this.setMan();
  15010. this.selectAllType();
  15011. this.unitJson[
  15012. this.unitIndex
  15013. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15014. // }, 5000);
  15015. this.$forceUpdate();
  15016. setTimeout(() => {
  15017. this.checkEva(this.evalua);
  15018. setTimeout(() => {
  15019. this.checkEva(this.evalua);
  15020. }, 100);
  15021. }, 100);
  15022. })
  15023. .catch((err) => {
  15024. console.error(err);
  15025. });
  15026. }
  15027. if(this.aiId){
  15028. let params = {
  15029. cid: this.aiId,
  15030. };
  15031. this.ajax
  15032. .get(this.$store.state.api + "select_course_detail", params)
  15033. .then((res) => {
  15034. let _unitJson = JSON.parse(res.data[0][0].chapters);
  15035. let fileInfo = []
  15036. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  15037. for(var i = 0; i < _unitJson.length; i++){
  15038. let tasks = _unitJson[i].chapterInfo[0].taskJson
  15039. for(var j = 0; j < tasks.length; j++){
  15040. let _infoData = tasks[j].chapterData.filter(el => {
  15041. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  15042. })
  15043. if(_infoData.length){
  15044. fileInfo = [...fileInfo, ..._infoData]
  15045. }
  15046. }
  15047. }
  15048. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  15049. this.$forceUpdate();
  15050. this.courseName = res.data[0][0].title;
  15051. this.courseText = res.data[0][0].brief;
  15052. this.courseText2 = res.data[0][0].reBrief;
  15053. this.cover = JSON.parse(res.data[0][0].cover);
  15054. this.noneBtnImg = this.cover.length >= 1;
  15055. this.checkboxList2 = res.data[0][0].juri
  15056. ? res.data[0][0].juri.split(",")
  15057. : [];
  15058. this.inviteCode = [];
  15059. for (var i = 0; i < res.data[2].length; i++) {
  15060. this.inviteCode.push({
  15061. cid: res.data[2][i].classid,
  15062. ic: res.data[2][i].code,
  15063. });
  15064. }
  15065. this.checkboxList3 = res.data[0][0].course_teacher
  15066. ? res.data[0][0].course_teacher.split(",")
  15067. : [];
  15068. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  15069. this.myWord = res.data[0][0].template;
  15070. this.templateC.id = "123";
  15071. this.courseTypeId = [];
  15072. for (var i = 0; i < res.data[1].length; i++) {
  15073. this.courseTypeId.push(res.data[1][i].typeid);
  15074. }
  15075. console.log(this.courseTypeId);
  15076. if(res.data[3].length){
  15077. try {
  15078. this.aiJson = JSON.parse(res.data[3][0].tips);
  15079. this.templateid = res.data[3][0].template;
  15080. this.getTipsTemplateIsDialog()
  15081. }catch(error){
  15082. console.error(error)
  15083. }
  15084. }
  15085. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15086. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  15087. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15088. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  15089. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  15090. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  15091. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  15092. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  15093. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  15094. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  15095. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  15096. }
  15097. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  15098. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  15099. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  15100. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  15101. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  15102. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  15103. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  15104. - 我们的课程主题可以如何与学生的实际生活联系起来?
  15105. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  15106. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  15107. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  15108. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  15109. - 学生个人最终要完成什么?学生小组最终要完成什么?
  15110. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  15111. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  15112. 讨论:<转文本内容>`
  15113. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  15114. if(res.data[0][0].cpote){
  15115. try {
  15116. this.cpote = JSON.parse(res.data[0][0].cpote);
  15117. }catch(error){
  15118. console.error(error)
  15119. }
  15120. }
  15121. if(res.data[0][0].setting){
  15122. try {
  15123. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  15124. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  15125. 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];
  15126. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  15127. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  15128. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  15129. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  15130. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  15131. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  15132. 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];
  15133. 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;
  15134. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  15135. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  15136. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  15137. 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;
  15138. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  15139. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  15140. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  15141. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  15142. this.recordVideoText = (JSON.parse(res.data[0][0].setting).recordVideoText) ? JSON.parse(res.data[0][0].setting).recordVideoText : "";
  15143. this.recordAudioUrl = (JSON.parse(res.data[0][0].setting).recordAudioUrl) ? JSON.parse(res.data[0][0].setting).recordAudioUrl : "";
  15144. if(this.targetCourseText2 || (!this.teacherCourseText)){
  15145. this.courseTextBool = true
  15146. }
  15147. // if(!this.teacherCourseText && !this.targetCourseText2){
  15148. // this.isuseT = 1
  15149. // }
  15150. }catch(error){
  15151. console.error(error)
  15152. }
  15153. }
  15154. if(this.teacherInfoData.length){
  15155. this.isuseT = true
  15156. }
  15157. if(this.courseText){
  15158. this.courseTextB = false
  15159. }
  15160. if(this.teacherCourseText){
  15161. this.teacherCourseTextB = false
  15162. }
  15163. if(this.targetCourseText){
  15164. this.targetCourseTextB = false
  15165. }
  15166. if(this.targetCourseText2){
  15167. this.targetCourseText2B = false
  15168. }
  15169. this.setMan();
  15170. this.unitJson[
  15171. this.unitIndex
  15172. ].chapterInfo[0].taskJson[0].toolOpen = true;
  15173. this.$forceUpdate();
  15174. setTimeout(() => {
  15175. this.checkEva(this.evalua);
  15176. setTimeout(() => {
  15177. this.checkEva(this.evalua);
  15178. }, 100);
  15179. }, 100);
  15180. })
  15181. .catch((err) => {
  15182. console.error(err);
  15183. });
  15184. }
  15185. // if(this.cidType != 1 && this.templateid == ''){
  15186. // this.promptShow = true
  15187. // }
  15188. },
  15189. seleteCourseUpdate() {
  15190. let params = {
  15191. cid: this.cid,
  15192. };
  15193. this.ajax
  15194. .get(this.$store.state.api + "select_course_detail", params)
  15195. .then((res) => {
  15196. // console.log(this.unitJson);
  15197. let unitJson = JSON.parse(res.data[0][0].chapters);
  15198. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  15199. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  15200. let _unitJson = [];
  15201. let _chapAarry = [];
  15202. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  15203. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  15204. let index = 1;
  15205. let chapindex;
  15206. if (_unitJson2.length > unitJson.length) {
  15207. for (let c = 0; c < _unitJson2.length; c++) {
  15208. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  15209. }
  15210. for (let j = 0; j < unitJson.length; j++) {
  15211. let count = 0;
  15212. for (let k = 0; k < _unitJson2.length; k++) {
  15213. if (
  15214. unitJson[j].chapterInfo[0].chapterid ==
  15215. _unitJson2[k].chapterInfo[0].chapterid
  15216. ) {
  15217. count++;
  15218. _chapAarry.splice(
  15219. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15220. 1
  15221. );
  15222. _unitJson.push(unitJson[j]);
  15223. break;
  15224. }
  15225. }
  15226. // if(count === 0){
  15227. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  15228. // }
  15229. }
  15230. for (let k = 0; k < _unitJson2.length; k++) {
  15231. if (_unitJson2[k].isUpdate == 1) {
  15232. _chapAarry.splice(
  15233. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  15234. 1
  15235. );
  15236. _unitJson.push(_unitJson2[k]);
  15237. }
  15238. }
  15239. console.log(_chapAarry);
  15240. for (let d = 0; d < _unitJson2.length; d++) {
  15241. if (
  15242. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  15243. ) {
  15244. if (_unitIndex == d) {
  15245. index = 2;
  15246. }
  15247. chapindex = d;
  15248. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  15249. }
  15250. }
  15251. } else {
  15252. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  15253. }
  15254. for (let i = 0; i < unitJson.length; i++) {
  15255. if (
  15256. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  15257. _unitJson[i].chapterInfo[0].chapterid !=
  15258. unitJson[i].chapterInfo[0].chapterid
  15259. ) {
  15260. if (i == _unitJson.length - 1) {
  15261. // this.unitIndex++
  15262. _unitIndex2++;
  15263. }
  15264. _unitJson.splice(i, 0, unitJson[i]);
  15265. } else if (i > _unitJson.length - 1) {
  15266. _unitJson.push(unitJson[i]);
  15267. } else if (
  15268. _unitJson[i].chapterInfo[0].chapterid ==
  15269. unitJson[i].chapterInfo[0].chapterid
  15270. ) {
  15271. _unitJson[i] = unitJson[i];
  15272. }
  15273. // if (i == _unitIndex) {
  15274. // continue;
  15275. // } else
  15276. }
  15277. if (_chapAarry.length && index != 2) {
  15278. if (chapindex < _unitIndex) {
  15279. this.isDelete = 2;
  15280. // this.unitIndex--;
  15281. _unitIndex2--;
  15282. } else if (
  15283. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  15284. _unitJson[_unitIndex].chapterInfo[0].chapterid
  15285. ) {
  15286. this.isDelete = 2;
  15287. for (let n = 0; n < _unitJson.length; n++) {
  15288. if (
  15289. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  15290. _unitJson[n].chapterInfo[0].chapterid
  15291. ) {
  15292. // this.unitIndex = n;
  15293. _unitIndex2 = n;
  15294. _unitJson[n] = _unitJson2[_unitIndex];
  15295. break;
  15296. }
  15297. }
  15298. }
  15299. } else if (index != 2) {
  15300. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  15301. _unitJson2[_unitIndex];
  15302. for (
  15303. var ci = 0;
  15304. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  15305. ci++
  15306. ) {
  15307. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  15308. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  15309. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15310. .toolChoose
  15311. : [];
  15312. let _chapterData = [];
  15313. for (
  15314. var c = 0;
  15315. c <
  15316. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  15317. .length;
  15318. c++
  15319. ) {
  15320. if (
  15321. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15322. .chapterData[c]
  15323. ) {
  15324. _chapterData.push(
  15325. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  15326. .chapterData[c]
  15327. );
  15328. }
  15329. }
  15330. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  15331. _chapterData;
  15332. }
  15333. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  15334. }
  15335. if (index == 1) {
  15336. this.unitJson = _unitJson;
  15337. this.$forceUpdate();
  15338. setTimeout(() => {
  15339. if (this.unitIndex != _unitIndex2) {
  15340. this.isDelete = 2;
  15341. this.unitIndex = _unitIndex2;
  15342. }
  15343. }, 0);
  15344. this.timer = setTimeout(() => {
  15345. this.seleteCourseUpdate();
  15346. }, 1000);
  15347. } else if (index == 2) {
  15348. let _this = this;
  15349. _this
  15350. .$confirm(
  15351. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  15352. "提示",
  15353. {
  15354. confirmButtonText: "需要",
  15355. cancelButtonText: "取消",
  15356. type: "warning",
  15357. }
  15358. )
  15359. .then(() => {
  15360. if (_this.time()) {
  15361. _this.restoreWork(
  15362. _chapAarry[0],
  15363. _unitJson,
  15364. chapindex,
  15365. _unitJson2,
  15366. _unitIndex2
  15367. );
  15368. }
  15369. })
  15370. .catch(() => {
  15371. _this.unitJson = _unitJson;
  15372. _this.$forceUpdate();
  15373. setTimeout(() => {
  15374. if (this.unitIndex != _unitIndex2) {
  15375. this.isDelete = 2;
  15376. this.unitIndex = _unitIndex2;
  15377. }
  15378. }, 0);
  15379. _this.timer = setTimeout(() => {
  15380. _this.seleteCourseUpdate();
  15381. }, 1000);
  15382. });
  15383. }
  15384. // 在复制操作之前记录滚动位置
  15385. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  15386. // 执行复制操作
  15387. // 复制操作完成后恢复滚动位置
  15388. this.$nextTick(() => {
  15389. if (this.$refs.scrollContainer) {
  15390. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  15391. }
  15392. });
  15393. })
  15394. .catch((err) => {
  15395. console.error(err);
  15396. });
  15397. },
  15398. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  15399. let params = [
  15400. {
  15401. cid: this.cid,
  15402. chapters: JSON.stringify(this.unitJson),
  15403. uid: this.userid,
  15404. chapid: chapid,
  15405. },
  15406. ];
  15407. this.ajax
  15408. .post(this.$store.state.api + "restoreWork", params)
  15409. .then((res) => {
  15410. this.$message({
  15411. message: "恢复成功",
  15412. type: "success",
  15413. });
  15414. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  15415. this.unitJson = unitJson;
  15416. this.$forceUpdate();
  15417. setTimeout(() => {
  15418. if (this.unitIndex != unitIndex2) {
  15419. this.isDelete = 2;
  15420. this.unitIndex = unitIndex2;
  15421. }
  15422. }, 0);
  15423. this.timer = setTimeout(() => {
  15424. this.seleteCourseUpdate();
  15425. }, 1000);
  15426. })
  15427. .catch((err) => {
  15428. this.$message.error("网络不佳");
  15429. console.error(err);
  15430. });
  15431. },
  15432. getTypeName() {
  15433. console.log(this.courseTypeId);
  15434. this.$forceUpdate();
  15435. },
  15436. selectAllType() {
  15437. let params = {
  15438. org: this.org && this.org != "" ? this.org : "",
  15439. oid: this.oid && this.oid != "" ? this.oid : "",
  15440. stand: "cn"
  15441. };
  15442. this.ajax
  15443. .get(this.$store.state.api + "selectAllTypeStand", params)
  15444. .then((res) => {
  15445. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  15446. res.data[0] = [...res.data[0], ...res.data[4]];
  15447. }
  15448. this.CourseType = res.data;
  15449. this.CourseType2 = [
  15450. { name: "智见课程", id: [] },
  15451. { name: "智行课程", id: [] },
  15452. { name: "智创课程", id: [] },
  15453. ];
  15454. for (var cti = 0; cti < res.data[0].length; cti++) {
  15455. if (
  15456. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  15457. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  15458. ) {
  15459. this.CourseType2[0].id.push(res.data[0][cti].id);
  15460. } else if (
  15461. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  15462. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  15463. ) {
  15464. this.CourseType2[1].id.push(res.data[0][cti].id);
  15465. } else if (
  15466. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  15467. ) {
  15468. this.CourseType2[2].id.push(res.data[0][cti].id);
  15469. }
  15470. if (
  15471. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  15472. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  15473. ) {
  15474. res.data[0][cti].name = "年级";
  15475. } else if (
  15476. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  15477. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  15478. ) {
  15479. res.data[0][cti].name = "学科";
  15480. } else if (
  15481. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  15482. ) {
  15483. res.data[0][cti].name = "主题";
  15484. }
  15485. }
  15486. let _courseTypeId = [];
  15487. for (var i = 0; i < res.data[0].length; i++) {
  15488. if (!this.cid) {
  15489. this.courseTypeId[res.data[0][i].id] = [];
  15490. }
  15491. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  15492. // }
  15493. this.CourseTypeJson[res.data[0][i].id] = [];
  15494. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  15495. if (res.data[0][i].name == "栏目") {
  15496. this.CourseType[0][i].name = "主题";
  15497. }
  15498. }
  15499. if (res.data[2].length == 0 && res.data[3].length == 0) {
  15500. for (var j = 0; j < res.data[1].length; j++) {
  15501. if (
  15502. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  15503. _courseTypeId.indexOf(res.data[1][j].id) == -1
  15504. ) {
  15505. _courseTypeId.push(res.data[1][j].id);
  15506. }
  15507. if (res.data[0][i].id == res.data[1][j].pid) {
  15508. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  15509. }
  15510. }
  15511. } else {
  15512. if (res.data[2].length > 0) {
  15513. for (var j = 0; j < res.data[2].length; j++) {
  15514. if (
  15515. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  15516. _courseTypeId.indexOf(res.data[2][j].id) == -1
  15517. ) {
  15518. _courseTypeId.push(res.data[2][j].id);
  15519. }
  15520. if (res.data[0][i].id == res.data[2][j].pid) {
  15521. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  15522. }
  15523. }
  15524. }
  15525. if (res.data[3].length > 0) {
  15526. for (var j = 0; j < res.data[3].length; j++) {
  15527. if (
  15528. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  15529. _courseTypeId.indexOf(res.data[3][j].id) == -1
  15530. ) {
  15531. _courseTypeId.push(res.data[3][j].id);
  15532. }
  15533. if (res.data[0][i].id == res.data[3][j].pid) {
  15534. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  15535. }
  15536. }
  15537. }
  15538. }
  15539. }
  15540. this.courseTypeId = _courseTypeId;
  15541. })
  15542. .catch((err) => {
  15543. console.error(err);
  15544. });
  15545. },
  15546. selectType() {
  15547. this.ajax
  15548. .get(this.$store.state.api + "selectType")
  15549. .then((res) => {
  15550. this.CourseType = res.data;
  15551. for (var i = 0; i < res.data[0].length; i++) {
  15552. if (!this.cid) {
  15553. this.courseTypeId[res.data[0][i].id] = "";
  15554. }
  15555. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  15556. if (res.data[0][i].name == "栏目") {
  15557. this.CourseType[0][i].name = "主题";
  15558. }
  15559. }
  15560. for (var j = 0; j < res.data[1].length; j++) {
  15561. if (res.data[0][i].id == res.data[1][j].pid) {
  15562. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15563. this.CourseTypeJson[res.data[0][i].id] = [];
  15564. }
  15565. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  15566. }
  15567. }
  15568. }
  15569. this.selectTypeByOid();
  15570. this.selectTypeByOrg();
  15571. })
  15572. .catch((err) => {
  15573. console.error(err);
  15574. });
  15575. },
  15576. selectTypeByOid() {
  15577. let params = {
  15578. oid: this.oid,
  15579. };
  15580. this.ajax
  15581. .get(this.$store.state.api + "selectTypeByOid", params)
  15582. .then((res) => {
  15583. for (var i = 0; i < res.data[0].length; i++) {
  15584. for (var j = 0; j < res.data[1].length; j++) {
  15585. if (res.data[0][i].id == res.data[1][j].pid) {
  15586. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15587. this.CourseTypeJson[res.data[0][i].id] = [];
  15588. }
  15589. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  15590. }
  15591. }
  15592. }
  15593. })
  15594. .catch((err) => {
  15595. console.error(err);
  15596. });
  15597. },
  15598. selectTypeByOrg() {
  15599. let params = {
  15600. oid: this.org,
  15601. };
  15602. this.ajax
  15603. .get(this.$store.state.api + "selectTypeByOrg", params)
  15604. .then((res) => {
  15605. for (var i = 0; i < res.data[0].length; i++) {
  15606. for (var j = 0; j < res.data[1].length; j++) {
  15607. if (res.data[0][i].id == res.data[1][j].pid) {
  15608. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15609. this.CourseTypeJson[res.data[0][i].id] = [];
  15610. }
  15611. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  15612. }
  15613. }
  15614. }
  15615. this.$forceUpdate();
  15616. })
  15617. .catch((err) => {
  15618. console.error(err);
  15619. });
  15620. },
  15621. OtherMb(type, task) {
  15622. if (task === 0 || task) {
  15623. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15624. task
  15625. ].isEvaFold = true;
  15626. }
  15627. this.typeMode = type;
  15628. setTimeout(() => {
  15629. this.checkEva(this.checkId);
  15630. setTimeout(() => {
  15631. this.checkEva(this.checkId);
  15632. }, 100);
  15633. }, 100);
  15634. },
  15635. openMember() {
  15636. this.searchTN = "";
  15637. this.getTeacher();
  15638. this.dialogVisibleMember = true;
  15639. },
  15640. checkEva(id, type) {
  15641. this.dialogVisiblemb = false;
  15642. this.selectEva();
  15643. if (this.evalua != id && type == 2) {
  15644. this.$message.success("导入成功");
  15645. setTimeout(() => {
  15646. this.checkEva(id);
  15647. }, 100);
  15648. }
  15649. this.evalua = id;
  15650. this.checkId = id;
  15651. if (this.evalua != "") {
  15652. for (var i = 0; i < this.evaJuri.length; i++) {
  15653. if (this.evalua == this.evaJuri[i].id) {
  15654. this.eTitle = this.evaJuri[i].title;
  15655. this.eJson = JSON.parse(this.evaJuri[i].content);
  15656. }
  15657. }
  15658. this.data.data = [];
  15659. this.$forceUpdate();
  15660. setTimeout(() => {
  15661. this.setMindData();
  15662. }, 1000);
  15663. }
  15664. },
  15665. deleteEva() {
  15666. let _this = this;
  15667. if (_this.evalua == "") {
  15668. this.$message.warning("内容已经清空了,请勿重复清空");
  15669. return;
  15670. }
  15671. _this
  15672. .$confirm("确定删除此目标吗?", "提示", {
  15673. confirmButtonText: "确定",
  15674. cancelButtonText: "取消",
  15675. type: "warning",
  15676. })
  15677. .then(() => {
  15678. _this.evalua = "";
  15679. _this.checkId = "";
  15680. _this.eTitle = "";
  15681. let _unitJson = _this.unitJson;
  15682. for (var i = 0; i < _unitJson.length; i++) {
  15683. let _task = _unitJson[i].chapterInfo[0].taskJson;
  15684. for (var j = 0; j < _task.length; j++) {
  15685. let _eList = _task[j].eList;
  15686. for (var k = 0; k < _eList.length; k++) {
  15687. delete _eList[k].target;
  15688. }
  15689. }
  15690. }
  15691. _this.$forceUpdate();
  15692. if (_this.cid) {
  15693. _this.updateWork();
  15694. }
  15695. })
  15696. .catch(() => {
  15697. return;
  15698. });
  15699. },
  15700. selectEva() {
  15701. let params = {
  15702. oid: this.oid,
  15703. };
  15704. this.ajax
  15705. .get(this.$store.state.api + "selectAllEvaluation", params)
  15706. .then((res) => {
  15707. this.evaJuri = res.data[0];
  15708. // 在复制操作之前记录滚动位置
  15709. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  15710. // 执行复制操作
  15711. // 复制操作完成后恢复滚动位置
  15712. this.$nextTick(() => {
  15713. if (this.$refs.scrollContainer) {
  15714. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  15715. }
  15716. });
  15717. })
  15718. .catch((err) => {
  15719. console.error(err);
  15720. });
  15721. },
  15722. setMindData() {
  15723. let targetArray = [];
  15724. this.data.data = [];
  15725. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  15726. let _eJson = Object.keys(this.eJson);
  15727. let _e = this.eJson;
  15728. for (let i = 0; i < _eJson.length; i++) {
  15729. let element = _e[_eJson[i]];
  15730. this.data.data.push({
  15731. id: element.id,
  15732. parentid: "root",
  15733. topic: element.name,
  15734. });
  15735. // targetArray.push({
  15736. // id: element.id,
  15737. // parentid: "root",
  15738. // name: element.name,
  15739. // });
  15740. targetArray.push({
  15741. value: element.name,
  15742. label: element.name,
  15743. children: [],
  15744. });
  15745. let _eJsonc = Object.keys(element.child);
  15746. let _e2 = element.child;
  15747. for (let j = 0; j < _eJsonc.length; j++) {
  15748. let _ec = _e2[_eJsonc[j]];
  15749. this.data.data.push({
  15750. id: _ec.id,
  15751. parentid: element.id,
  15752. topic: _ec.name,
  15753. });
  15754. // targetArray.push({
  15755. // id: _ec.id,
  15756. // parentid: element.id,
  15757. // name: _ec.name,
  15758. // });
  15759. targetArray[i].children.push({
  15760. value: _ec.name,
  15761. label: _ec.name,
  15762. children: [],
  15763. });
  15764. let _eJsonz = Object.keys(_ec.child);
  15765. let _e3 = _ec.child;
  15766. for (let z = 0; z < _eJsonz.length; z++) {
  15767. let _ez = _e3[_eJsonz[z]];
  15768. this.data.data.push({
  15769. id: _ez.id,
  15770. parentid: _ec.id,
  15771. topic: _ez.name,
  15772. });
  15773. // targetArray.push({
  15774. // id: _ez.id,
  15775. // parentid: _ec.id,
  15776. // name: _ez.name,
  15777. // });
  15778. targetArray[i].children[j].children.push({
  15779. value: _ez.name,
  15780. label: _ez.name,
  15781. });
  15782. }
  15783. }
  15784. }
  15785. this.targetArray = targetArray;
  15786. this.$forceUpdate();
  15787. },
  15788. /*添加评价 */
  15789. addEList(index, tIndex) {
  15790. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  15791. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  15792. value: "",
  15793. detail: "",
  15794. score: 5,
  15795. isai: "1",
  15796. })
  15797. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  15798. { value: "", detail: "", score: 5,isai: "1", },
  15799. ]);
  15800. this.$forceUpdate();
  15801. },
  15802. openEList(index, tIndex) {
  15803. this.evaIndex = index;
  15804. this.evatIndex = tIndex;
  15805. this.evaBoxDialog = true;
  15806. },
  15807. addCET(index, tIndex) {
  15808. this.cetIndex = index;
  15809. this.cettIndex = tIndex;
  15810. this.selectAllType1();
  15811. },
  15812. addCETemplate() {
  15813. var array =
  15814. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  15815. .eList;
  15816. let params = [
  15817. {
  15818. uid: this.userid,
  15819. n: this.templateName,
  15820. json: JSON.stringify(array),
  15821. t: 1,
  15822. oid: this.oid,
  15823. },
  15824. ];
  15825. this.ajax
  15826. .post(this.$store.state.api + "addCETShare", params)
  15827. .then((res) => {
  15828. this.addTypeByCET(res.data[0][0].id);
  15829. })
  15830. .catch((err) => {
  15831. this.$message.error("网络不佳");
  15832. console.error(err);
  15833. });
  15834. },
  15835. addTypeByCET(id) {
  15836. if (this.setTypeJson.two == "") {
  15837. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  15838. return;
  15839. }
  15840. let params = {
  15841. cid: id,
  15842. };
  15843. this.ajax
  15844. .get(this.$store.state.api + "deleteCETLabel", params)
  15845. .then((res) => {
  15846. for (var i = 0; i < 2; i++) {
  15847. let tid = "";
  15848. if (i == 0) {
  15849. tid = this.setTypeJson.one;
  15850. } else {
  15851. tid = this.setTypeJson.two;
  15852. }
  15853. let params = [
  15854. {
  15855. cid: id,
  15856. tid: tid,
  15857. uid: this.userid,
  15858. },
  15859. ];
  15860. this.ajax
  15861. .post(this.$store.state.api + "addCETLabel", params)
  15862. .then((res) => {
  15863. this.$message({
  15864. message: "添加成功",
  15865. type: "success",
  15866. });
  15867. this.close();
  15868. })
  15869. .catch((err) => {
  15870. this.$message.error("网络不佳");
  15871. console.error(err);
  15872. });
  15873. }
  15874. })
  15875. .catch((err) => {
  15876. this.$message.error("网络不佳");
  15877. console.error(err);
  15878. });
  15879. },
  15880. updateEvaJson(array) {
  15881. array = array.filter((item) => {
  15882. item.isai = "1"
  15883. return item;
  15884. });
  15885. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  15886. this.evatIndex
  15887. ].eList = array;
  15888. },
  15889. forceUpdate() {
  15890. this.$forceUpdate();
  15891. },
  15892. forceUpdate2() {
  15893. setTimeout(() => {
  15894. this.courseText += "*0*%*";
  15895. setTimeout(() => {
  15896. this.courseText = this.courseText.replaceAll("*0*%*", "");
  15897. }, 0);
  15898. }, 100);
  15899. this.$forceUpdate();
  15900. },
  15901. deletEList(index, tIndex, eIndex) {
  15902. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  15903. eIndex,
  15904. 1
  15905. );
  15906. this.$forceUpdate();
  15907. },
  15908. getChoosePic(t) {
  15909. this.chooseType = t;
  15910. this.getAllBanner();
  15911. },
  15912. getAllBanner() {
  15913. this.sysPicVisible = true;
  15914. let params = {
  15915. t: this.chooseType,
  15916. };
  15917. this.ajax
  15918. .get(this.$store.state.api + "selectAllBanner", params)
  15919. .then((res) => {
  15920. this.sysPic = res.data[0];
  15921. })
  15922. .catch((err) => {
  15923. console.error(err);
  15924. });
  15925. },
  15926. // getClass() {
  15927. // let params = {
  15928. // oid: this.oid,
  15929. // };
  15930. // this.ajax
  15931. // .get(this.$store.state.api + "selectClassBySchool", params)
  15932. // .then((res) => {
  15933. // this.classJuri = res.data[0];
  15934. // })
  15935. // .catch((err) => {
  15936. // console.error(err);
  15937. // });
  15938. // },
  15939. deleteSysPic() {
  15940. this.cover = [];
  15941. this.isSysPic = false;
  15942. this.isSysPic2 = false;
  15943. },
  15944. deleteSelectPic() {
  15945. this.selectJson.url = "";
  15946. },
  15947. setEListStar() {
  15948. this.$forceUpdate();
  15949. },
  15950. deletRateList(i) {
  15951. this.rateJson.splice(i, 1);
  15952. },
  15953. addRateList() {
  15954. this.rateJson.push({ detail: "", score: 5, value: "" });
  15955. },
  15956. addSt() {
  15957. this.sentenceList.push({
  15958. sentenceTitle: "",
  15959. addSentence: [],
  15960. rightAnswer: [],
  15961. });
  15962. },
  15963. addSen(i) {
  15964. if (!this.sentenceList[i].sentenceTitle) {
  15965. this.$message.error("请填写卡片内容!");
  15966. return;
  15967. }
  15968. if (this.sentenceList[i].sentenceTitle.length > 10) {
  15969. this.$message.error("卡片内容字数不能超过10位");
  15970. return;
  15971. }
  15972. if (
  15973. this.sentenceList[i].addSentence.indexOf(
  15974. this.sentenceList[i].sentenceTitle
  15975. ) !== -1
  15976. ) {
  15977. this.$message.error("不能添加重复的卡片内容!");
  15978. return;
  15979. }
  15980. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  15981. // this.isPushTitleList.push(this.sentenceTitle);
  15982. this.sentenceList[i].sentenceTitle = "";
  15983. },
  15984. setRightAnswer(s, i, j) {
  15985. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  15986. this.sentenceList[i].rightAnswer.push(s);
  15987. }
  15988. },
  15989. returnCard(r, i, j) {
  15990. this.sentenceList[i].rightAnswer.splice(j, 1);
  15991. },
  15992. addSentenceTool() {
  15993. for (var i = 0; i < this.sentenceList.length; i++) {
  15994. if (this.sentenceList[i].rightAnswer.length == 0) {
  15995. this.$message.error(`请将题目${i + 1}设置完整。`);
  15996. return;
  15997. }
  15998. if (
  15999. this.sentenceList[i].addSentence.length !=
  16000. this.sentenceList[i].rightAnswer.length
  16001. ) {
  16002. this.$message.error(`请将题目${i + 1}设置完整。`);
  16003. return;
  16004. }
  16005. }
  16006. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16007. this.taskCount
  16008. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  16009. this.sentenceList = [
  16010. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  16011. ];
  16012. this.dialogVisibleSentence = false;
  16013. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16014. // itemTaskIndex
  16015. // ].toolChoose[toolIndex].tool = [];
  16016. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16017. // itemTaskIndex
  16018. // ].toolChoose[toolIndex].tool.push(i);
  16019. if (
  16020. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16021. .toolChoose[this.toolIndex].tool != 47
  16022. ) {
  16023. this.addTools(47, this.taskCount, this.toolIndex);
  16024. }
  16025. },
  16026. addTableJson() {
  16027. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  16028. // this.$message.error("请将信息填写完整!");
  16029. // return;
  16030. // }
  16031. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16032. this.taskCount
  16033. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  16034. // this.tableJson = [{ text: "" }];
  16035. // this.dialogVisibleTable = false;
  16036. this.$message.success("上传成功");
  16037. if (
  16038. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16039. .toolChoose[this.toolIndex].tool != 48
  16040. ) {
  16041. this.addTools(48, this.taskCount, this.toolIndex);
  16042. }
  16043. },
  16044. addWordJson() {
  16045. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16046. this.taskCount
  16047. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  16048. // this.wordJson = [{ text: "" }];
  16049. // this.dialogVisibleWord = false;
  16050. this.$message.success("上传成功");
  16051. if (
  16052. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16053. .toolChoose[this.toolIndex].tool != 52
  16054. ) {
  16055. this.addTools(52, this.taskCount, this.toolIndex);
  16056. }
  16057. },
  16058. addMoreUpload() {
  16059. if (this.uploadJson.length == 0) {
  16060. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16061. this.taskCount
  16062. ].toolChoose[this.toolIndex].uploadJson = [];
  16063. } else {
  16064. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16065. this.taskCount
  16066. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  16067. }
  16068. this.uploadJson = [];
  16069. this.dialogVisibleMoreUpload = false;
  16070. if (
  16071. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16072. .toolChoose[this.toolIndex].tool != 50
  16073. ) {
  16074. this.addTools(50, this.taskCount, this.toolIndex);
  16075. }
  16076. },
  16077. addPreTime() {
  16078. if (this.preTime == 0) {
  16079. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16080. this.taskCount
  16081. ].toolChoose[this.toolIndex].preTime = 0;
  16082. } else {
  16083. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16084. this.taskCount
  16085. ].toolChoose[this.toolIndex].preTime = this.preTime;
  16086. }
  16087. this.preTime = 0;
  16088. this.dialogVisiblePreTime = false;
  16089. if (
  16090. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16091. .toolChoose[this.toolIndex].tool != 10
  16092. ) {
  16093. this.addTools(10, this.taskCount, this.toolIndex);
  16094. }
  16095. },
  16096. goToTask(i) {
  16097. this.toolIndexType = "";
  16098. if (this.isClickColor == i + 1) {
  16099. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16100. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16101. // } else {
  16102. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16103. i
  16104. ].toolOpen = true;
  16105. // }
  16106. this.$forceUpdate();
  16107. return;
  16108. }
  16109. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16110. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16111. // } else {
  16112. document.querySelectorAll(".basic_box")[0].scrollTop =
  16113. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16114. this.isClickColor = i + 1;
  16115. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16116. // }
  16117. this.$forceUpdate();
  16118. },
  16119. taskScroll(){
  16120. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  16121. const sections = document.querySelectorAll('.taskBorder');
  16122. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  16123. sections.forEach((section, index) => {
  16124. const offsetTop = section.offsetTop;
  16125. const offsetHeight = section.offsetHeight;
  16126. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  16127. this.isClickColor = index +1;
  16128. }
  16129. });
  16130. },
  16131. taskOpen(i, stageIndex) {
  16132. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16133. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  16134. } else {
  16135. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16136. }
  16137. this.updateWork3(stageIndex);
  16138. this.$forceUpdate();
  16139. },
  16140. goToTask2(i, stage) {
  16141. this.toolIndexType = "";
  16142. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  16143. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16144. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16145. // } else {
  16146. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16147. i
  16148. ].toolOpen = true;
  16149. // }
  16150. this.$forceUpdate();
  16151. return;
  16152. }
  16153. if (this.unitIndex != stage) {
  16154. if (this.panUnitJson() == 2) {
  16155. return;
  16156. }
  16157. this.unitSet(stage);
  16158. }
  16159. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  16160. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  16161. // } else {
  16162. document.querySelectorAll(".basic_box")[0].scrollTop =
  16163. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  16164. this.isClickColor = i + 1;
  16165. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  16166. // }
  16167. this.$forceUpdate();
  16168. },
  16169. taskMove(type, index) {
  16170. this.$confirm(
  16171. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  16172. "提示",
  16173. {
  16174. confirmButtonText: "确定",
  16175. cancelButtonText: "取消",
  16176. type: "warning",
  16177. }
  16178. )
  16179. .then(() => {
  16180. if (type == 1) {
  16181. if (index > 0) {
  16182. let a = JSON.parse(
  16183. JSON.stringify(
  16184. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16185. index - 1
  16186. ]
  16187. )
  16188. );
  16189. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  16190. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16191. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16192. }
  16193. } else {
  16194. if (
  16195. index <
  16196. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  16197. ) {
  16198. let a = JSON.parse(
  16199. JSON.stringify(
  16200. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16201. index + 1
  16202. ]
  16203. )
  16204. );
  16205. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  16206. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  16207. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  16208. }
  16209. }
  16210. this.$forceUpdate();
  16211. })
  16212. .catch(() => {
  16213. return;
  16214. });
  16215. },
  16216. stageMove(type, index) {
  16217. if (type == 1) {
  16218. if (index > 0) {
  16219. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  16220. let acid = JSON.parse(
  16221. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  16222. );
  16223. let bcid = JSON.parse(
  16224. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  16225. );
  16226. this.unitJson3[index - 1] = this.unitJson3[index];
  16227. this.unitJson3[index] = a;
  16228. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  16229. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  16230. }
  16231. } else {
  16232. if (index < this.unitJson3.length - 1) {
  16233. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  16234. let acid = JSON.parse(
  16235. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  16236. );
  16237. let bcid = JSON.parse(
  16238. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  16239. );
  16240. this.unitJson3[index + 1] = this.unitJson3[index];
  16241. this.unitJson3[index] = a;
  16242. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  16243. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  16244. }
  16245. }
  16246. this.$forceUpdate();
  16247. },
  16248. addGroup(i) {
  16249. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  16250. this.groupJson.group.push({
  16251. name: "第" + (this.groupJson.group.length + 1) + "组",
  16252. });
  16253. },
  16254. deleteGroup(i) {
  16255. this.groupJson.group.splice(i, 1);
  16256. },
  16257. numberPan() {
  16258. if (
  16259. /[^\d]/.test(this.groupJson.number) ||
  16260. this.groupJson.number < 2 ||
  16261. this.groupJson.number > 10
  16262. ) {
  16263. this.$message.error("请输入2-10的数字");
  16264. this.groupJson.number = "";
  16265. }
  16266. },
  16267. numberPanJie() {
  16268. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  16269. this.$message.error('请输入大于1的数字')
  16270. this.courseJie = 1
  16271. }
  16272. },
  16273. numberPanTime() {
  16274. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  16275. this.$message.error('请输入大于1的数字')
  16276. this.courseTime = 1
  16277. }
  16278. },
  16279. addGroupJson() {
  16280. for (var i = 0; i < this.groupJson.group.length; i++) {
  16281. if (!this.groupJson.group[i].name) {
  16282. this.$message.error("请将信息填写完整!");
  16283. return;
  16284. }
  16285. }
  16286. if (!this.groupJson.number) {
  16287. this.$message.error("请将信息填写完整!");
  16288. return;
  16289. }
  16290. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16291. this.taskCount
  16292. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  16293. JSON.stringify(this.groupJson)
  16294. );
  16295. this.dialogVisibleGroup = false;
  16296. this.groupJson = {};
  16297. if (
  16298. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16299. .toolChoose[this.toolIndex].tool != 49
  16300. ) {
  16301. this.addTools(49, this.taskCount, this.toolIndex);
  16302. }
  16303. },
  16304. updateTime(preTime) {
  16305. this.preTime = preTime;
  16306. },
  16307. InviteChange(val) {
  16308. console.log(val);
  16309. let _check = [];
  16310. let _check2 = [];
  16311. for (var i = 0; i < this.grade2.length; i++) {
  16312. var gid = this.grade2[i].id;
  16313. _check.push(gid);
  16314. }
  16315. for (var i = 0; i < this.checkboxList2.length; i++) {
  16316. var _id = this.checkboxList2[i];
  16317. if (_check.indexOf(_id) !== -1) {
  16318. _check2.push(_id);
  16319. }
  16320. }
  16321. this.checkAll = _check2.length === _check.length;
  16322. return;
  16323. let array = JSON.parse(JSON.stringify(val));
  16324. this.inviteCode = this.inviteCode.filter((el) => {
  16325. if (val.indexOf(el.cid) != -1) {
  16326. array.splice(array.indexOf(el.cid), 1);
  16327. return el;
  16328. }
  16329. });
  16330. for (var i = 0; i < array.length; i++) {
  16331. this.getInviteCode(array[i]);
  16332. }
  16333. },
  16334. InviteChange2(val) {
  16335. console.log(val);
  16336. let _check = [];
  16337. let _check2 = [];
  16338. for (var i = 0; i < this.teacherJuri.length; i++) {
  16339. var gid = this.teacherJuri[i].userid;
  16340. _check.push(gid);
  16341. }
  16342. for (var i = 0; i < this.checkboxList3.length; i++) {
  16343. var _id = this.checkboxList3[i];
  16344. if (_check.indexOf(_id) !== -1) {
  16345. _check2.push(_id);
  16346. }
  16347. }
  16348. this.checkAll2 = _check2.length === _check.length;
  16349. this.setMan();
  16350. return;
  16351. let array = JSON.parse(JSON.stringify(val));
  16352. this.inviteCode = this.inviteCode.filter((el) => {
  16353. if (val.indexOf(el.cid) != -1) {
  16354. array.splice(array.indexOf(el.cid), 1);
  16355. return el;
  16356. }
  16357. });
  16358. for (var i = 0; i < array.length; i++) {
  16359. this.getInviteCode(array[i]);
  16360. }
  16361. },
  16362. handleCheckAllChange(val) {
  16363. if (val) {
  16364. for (var i = 0; i < this.grade2.length; i++) {
  16365. var gid = this.grade2[i].id;
  16366. if (this.checkboxList2.indexOf(gid) === -1) {
  16367. this.checkboxList2.push(gid);
  16368. }
  16369. }
  16370. } else {
  16371. let _check = [];
  16372. let _check2 = [];
  16373. for (var i = 0; i < this.grade2.length; i++) {
  16374. var gid = this.grade2[i].id;
  16375. _check.push(gid);
  16376. }
  16377. for (var i = 0; i < this.checkboxList2.length; i++) {
  16378. var _id = this.checkboxList2[i];
  16379. if (_check.indexOf(_id) === -1) {
  16380. _check2.push(_id);
  16381. }
  16382. }
  16383. this.checkboxList2 = _check2;
  16384. }
  16385. this.isIndeterminate = false;
  16386. },
  16387. handleCheckAllChange2(val) {
  16388. if (val) {
  16389. for (var i = 0; i < this.teacherJuri.length; i++) {
  16390. var gid = this.teacherJuri[i].userid;
  16391. if (this.checkboxList3.indexOf(gid) === -1) {
  16392. this.checkboxList3.push(gid);
  16393. }
  16394. }
  16395. } else {
  16396. let _check = [];
  16397. let _check2 = [];
  16398. for (var i = 0; i < this.teacherJuri.length; i++) {
  16399. var gid = this.teacherJuri[i].userid;
  16400. _check.push(gid);
  16401. }
  16402. for (var i = 0; i < this.checkboxList3.length; i++) {
  16403. var _id = this.checkboxList3[i];
  16404. if (_check.indexOf(_id) === -1) {
  16405. _check2.push(_id);
  16406. }
  16407. }
  16408. this.checkboxList3 = _check2;
  16409. }
  16410. this.isIndeterminate2 = false;
  16411. },
  16412. async getInviteCode(cid) {
  16413. let code = this.randomNumber();
  16414. let params = {
  16415. code: code,
  16416. oid: this.oid,
  16417. };
  16418. let type = 1;
  16419. for (var i = 0; i < this.inviteCode.length; i++) {
  16420. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  16421. type = 2;
  16422. }
  16423. }
  16424. if (type == 2) {
  16425. this.getInviteCode(cid);
  16426. return;
  16427. }
  16428. const res = await this.ajax.get(
  16429. this.$store.state.api + "selectInviteCode2",
  16430. params
  16431. );
  16432. if (
  16433. res.data.length &&
  16434. res.data[0].length &&
  16435. res.data[0][0].courseId != this.cid
  16436. ) {
  16437. this.getInviteCode(cid);
  16438. return;
  16439. }
  16440. let array = [];
  16441. for (var i = 0; i < this.inviteCode.length; i++) {
  16442. array.push(this.inviteCode[i].cid);
  16443. }
  16444. if (array.indexOf(cid) != -1) {
  16445. this.inviteCode[array.indexOf(cid)].ic = code;
  16446. } else {
  16447. this.inviteCode.push({ cid: cid, ic: code });
  16448. }
  16449. },
  16450. OpenInviteD(cid) {
  16451. let array = [];
  16452. this.icode = "";
  16453. for (var i = 0; i < this.inviteCode.length; i++) {
  16454. array.push(this.inviteCode[i].cid);
  16455. }
  16456. if (array.indexOf(cid) != -1) {
  16457. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  16458. }
  16459. this.inviteId = cid;
  16460. this.dialogVisibleInvite = true;
  16461. },
  16462. addInvite() {
  16463. let reg = /^[A-Za-z0-9]{4,}$/;
  16464. if (!reg.test(this.icode)) {
  16465. this.$message.error("请输入至少四位数字或英文组合的随机码");
  16466. return;
  16467. }
  16468. let type = 1;
  16469. for (var i = 0; i < this.inviteCode.length; i++) {
  16470. if (
  16471. this.inviteCode[i].cid != this.inviteId &&
  16472. this.icode == this.inviteCode[i].ic
  16473. ) {
  16474. type = 2;
  16475. }
  16476. }
  16477. if (type == 2) {
  16478. this.$message.error("已有此随机码,不能重复");
  16479. return;
  16480. }
  16481. let params = {
  16482. code: this.icode,
  16483. oid: this.oid,
  16484. };
  16485. this.ajax
  16486. .get(this.$store.state.api + "selectInviteCode", params)
  16487. .then((res) => {
  16488. if (
  16489. res.data.length &&
  16490. res.data[0].length &&
  16491. res.data[0][0].courseId != this.cid
  16492. ) {
  16493. this.$message.error("已有此随机码,不能重复");
  16494. return;
  16495. }
  16496. let array = [];
  16497. for (var i = 0; i < this.inviteCode.length; i++) {
  16498. array.push(this.inviteCode[i].cid);
  16499. }
  16500. if (array.indexOf(this.inviteId) != -1) {
  16501. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  16502. } else {
  16503. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  16504. }
  16505. this.icode = "";
  16506. this.dialogVisibleInvite = false;
  16507. })
  16508. .catch((err) => {
  16509. console.error(err);
  16510. });
  16511. },
  16512. randomNumber() {
  16513. // 随机生成两位数
  16514. // let num = Math.floor(Math.random() * 900) + 100;
  16515. // 生成 0 到 99 之间的随机整数
  16516. const randomNumber = Math.floor(Math.random() * 100);
  16517. // 如果随机数小于 10,补上前导零
  16518. const num =
  16519. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  16520. // 随机生成两个大写字母
  16521. let letters = "";
  16522. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  16523. for (let i = 0; i < 3; i++) {
  16524. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  16525. }
  16526. // 随机生成两位数字和字母的组合
  16527. let mix = "";
  16528. let chars =
  16529. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  16530. for (let i = 0; i < 3; i++) {
  16531. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  16532. mix += char;
  16533. }
  16534. // 随机选择一种类型
  16535. let type = Math.floor(Math.random() * 3);
  16536. return num;
  16537. // 根据类型输出结果
  16538. switch (type) {
  16539. case 0:
  16540. console.log(num); // 输出两位数
  16541. return num;
  16542. case 1:
  16543. console.log(letters); // 输出两个大写字母
  16544. return letters;
  16545. case 2:
  16546. console.log(mix); // 输出两位数字和字母的组合
  16547. return mix;
  16548. }
  16549. },
  16550. getPaste() {
  16551. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  16552. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  16553. if (!iframe && !iframe2) {
  16554. return;
  16555. }
  16556. let copyData = iframe ? iframe.contentWindow.copyData : false;
  16557. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  16558. if (copyData && copyData.stageData && copyData.stageData.length) {
  16559. this.isPasteStage = true;
  16560. }
  16561. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  16562. this.isPasteStage = true;
  16563. }
  16564. if (copyData && copyData.selectData.length) {
  16565. this.isPasteChoice = true;
  16566. }
  16567. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  16568. this.isPasteTask = true;
  16569. }
  16570. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  16571. this.isPasteTask = true;
  16572. }
  16573. },
  16574. getPaste2() {
  16575. let iframe = document.querySelectorAll(".interIframe")[0];
  16576. const turndownService = new TurndownService();
  16577. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  16578. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  16579. if(confirm_next_step){
  16580. this.courseText += turndownService.turndown(confirm_next_step)
  16581. iframe.contentWindow.confirm_next_step = ''
  16582. }
  16583. if(work_area_text && work_area_text.aiContent){
  16584. this.courseText += turndownService.turndown(work_area_text.aiContent)
  16585. iframe.contentWindow.work_area_text = ''
  16586. }
  16587. },
  16588. textAreaChange(type, index){
  16589. if(type == 'courseText'){
  16590. this.addCourseBehavior('courseBehavior', `手动修改课程概况信息-${this.courseText}`)
  16591. }
  16592. if(type == 'targetCourseText2'){
  16593. this.addCourseBehavior('courseBehavior', `手动修改课程目标信息-${this.targetCourseText2}`)
  16594. }
  16595. if(type == 'taskDetail2'){
  16596. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程大纲信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2}`)
  16597. }
  16598. if(type == 'taskDetail3'){
  16599. this.addCourseBehavior('courseBehavior', `手动修改任务${index+1}课程教案信息-${this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3}`)
  16600. }
  16601. },
  16602. setCourseInfo(type){
  16603. let courseInfo = ''
  16604. let sub = []
  16605. let mclass = []
  16606. if (this.courseTypeId.length) {
  16607. for (var i = 0; i < this.courseTypeId.length; i++) {
  16608. let _sid = this.courseTypeId[i]
  16609. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16610. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16611. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16612. }
  16613. }
  16614. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16615. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16616. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16617. }
  16618. }
  16619. }
  16620. }
  16621. if(this.courseName){
  16622. courseInfo = `课程名称:${this.courseName} `
  16623. }
  16624. if(mclass.length){
  16625. courseInfo += `年级:${mclass.join(',')} `
  16626. }
  16627. if(sub.length){
  16628. courseInfo += `学科:${sub.join(',')} `
  16629. }
  16630. console.log(courseInfo)
  16631. window.course_info = courseInfo
  16632. this.course_info = courseInfo
  16633. window.course_lang = this.languageSetting
  16634. },
  16635. saveCourse(){
  16636. if (this.cid == "" || this.cid == undefined) {
  16637. this.addWork();
  16638. } else {
  16639. if (this.userid != this.courseUserid && this.role != "1") {
  16640. this.updateWork2();
  16641. } else {
  16642. this.updateWork();
  16643. }
  16644. }
  16645. },
  16646. setCover($event, attempts = 0) {
  16647. var _this = this;
  16648. this.addCourseBehavior('courseBehavior', `修改课程名称-${this.courseName}`)
  16649. if (_this.cover.length || attempts >= 3) {
  16650. return;
  16651. }
  16652. _this.searchFileName = JSON.parse(JSON.stringify(_this.courseName))
  16653. _this.findMatchingContents()
  16654. _this.imageloading2 = true;
  16655. _this.ajax
  16656. .post("https://gpt.cocorobo.cn/search_image", {
  16657. page: _this.ppage,
  16658. pagesize: 9,
  16659. query: _this.courseName,
  16660. })
  16661. .then(function (response) {
  16662. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  16663. if(data){
  16664. _this.cover = [];
  16665. setTimeout(() => {
  16666. _this.cover[0] = {
  16667. name: "网络图片.png",
  16668. url: data[0].thumbnail,
  16669. };
  16670. _this.imgChange1(null, null, 1, null);
  16671. _this.$forceUpdate();
  16672. _this.saveCourse()
  16673. }, 0);
  16674. _this.imageloading2 = false;
  16675. }else {
  16676. _this.imageloading2 = false;
  16677. _this.setCover($event, attempts + 1);
  16678. }
  16679. })
  16680. .catch(function (error) {
  16681. _this.imageloading2 = false;
  16682. _this.setCover($event, attempts + 1);
  16683. console.log(error);
  16684. });
  16685. },
  16686. searchImage() {
  16687. var _this = this;
  16688. _this.imageList = [];
  16689. if (!_this.searchImageValue) {
  16690. _this.sysPicVisible2 = true;
  16691. return;
  16692. }
  16693. _this.imageloading = true;
  16694. _this.ajax
  16695. .post("https://gpt.cocorobo.cn/search_image", {
  16696. page: _this.ppage,
  16697. pagesize: 9,
  16698. query: _this.searchImageValue,
  16699. })
  16700. .then(function (response) {
  16701. // console.log(response.data.data);
  16702. var data = response.data.FunctionResponse.result;
  16703. for (var i = 0; i < data.length; i++) {
  16704. _this.imageList.push({ url: data[i].thumbnail });
  16705. }
  16706. _this.imageloading = false;
  16707. })
  16708. .catch(function (error) {
  16709. console.log(error);
  16710. });
  16711. _this.sysPicVisible2 = true;
  16712. },
  16713. changePicture() {
  16714. this.ppage++;
  16715. this.searchImage();
  16716. },
  16717. resetImage() {
  16718. this.ppage = 1;
  16719. this.searchImage();
  16720. },
  16721. jumpGj(i, j) {
  16722. if (i + 1 != this.isClickColor) {
  16723. this.isClickColor = i + 1;
  16724. }
  16725. var a = document.scrollingElement;
  16726. this.toolIndexType = `gj${i}${j}`;
  16727. let target = document.querySelector(`#gj${i}${j}`);
  16728. if (target) {
  16729. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  16730. setTimeout(() => {
  16731. target.scrollIntoView(true);
  16732. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  16733. j
  16734. ].isFold3 = false;
  16735. setTimeout(() => {
  16736. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  16737. }, 0);
  16738. }, 0);
  16739. }
  16740. },
  16741. jumpGj2(i, j, k) {
  16742. if (this.unitIndex != k) {
  16743. if (this.panUnitJson() == 2) {
  16744. return;
  16745. }
  16746. this.unitSet(k);
  16747. }
  16748. setTimeout(() => {
  16749. if (i + 1 != this.isClickColor) {
  16750. this.isClickColor = i + 1;
  16751. }
  16752. var a = document.scrollingElement;
  16753. this.toolIndexType = `gj${i}${j}${k}`;
  16754. let target = document.querySelector(`#gj${i}${j}`);
  16755. if (target) {
  16756. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  16757. setTimeout(() => {
  16758. target.scrollIntoView(true);
  16759. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  16760. j
  16761. ].isFold3 = false;
  16762. setTimeout(() => {
  16763. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  16764. }, 0);
  16765. }, 0);
  16766. }
  16767. }, 0);
  16768. },
  16769. dragStart(val, i, j) {
  16770. console.log(this.taskCount);
  16771. this.dragType = "drag";
  16772. this.taskCount = j;
  16773. this.oldIndex = i;
  16774. this.oldData = val;
  16775. },
  16776. dragOver(i, j) {
  16777. this.typeIndex = "chapter-" + j + "-" + i;
  16778. this.newIndex = i;
  16779. },
  16780. dragEnd() {
  16781. if (this.dragType != "drag") {
  16782. this.typeIndex = "";
  16783. this.newIndex = "";
  16784. this.dragType = "";
  16785. this.isdrag = "";
  16786. return;
  16787. }
  16788. console.log(this.taskCount);
  16789. let newItems = [
  16790. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16791. .chapterData,
  16792. ];
  16793. // 删除老的节点
  16794. newItems.splice(this.oldIndex, 1);
  16795. // 在列表中目标位置增加新的节点
  16796. newItems.splice(this.newIndex, 0, this.oldData);
  16797. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16798. this.taskCount
  16799. ].chapterData = [...newItems];
  16800. this.typeIndex = "";
  16801. this.newIndex = "";
  16802. this.dragType = "";
  16803. this.isdrag = "";
  16804. this.$forceUpdate();
  16805. },
  16806. dragTaskStart(val, i, j) {
  16807. this.dragType = "task";
  16808. this.oldIndex = i;
  16809. this.oldData = val;
  16810. this.oldUnitIndex = j;
  16811. },
  16812. dragTaskOver(i, j) {
  16813. this.typeIndex = "task-" + i;
  16814. this.newIndex = i;
  16815. this.checkUnitIndex = j;
  16816. },
  16817. async dragTaskEnd() {
  16818. if (this.dragType != "task") {
  16819. this.newIndex = "";
  16820. this.dragType = "";
  16821. this.typeIndex = "";
  16822. this.checkUnitIndex = "";
  16823. this.isdrag = "";
  16824. return;
  16825. }
  16826. if (
  16827. this.newIndex == this.oldIndex &&
  16828. this.oldUnitIndex == this.checkUnitIndex
  16829. ) {
  16830. this.newIndex = "";
  16831. this.dragType = "";
  16832. this.typeIndex = "";
  16833. this.checkUnitIndex = "";
  16834. this.isdrag = "";
  16835. return;
  16836. }
  16837. let count1 = await this.getWorksCount(
  16838. 2,
  16839. this.checkUnitIndex,
  16840. this.newIndex,
  16841. 0
  16842. );
  16843. let count2 = await this.getWorksCount(
  16844. 2,
  16845. this.oldUnitIndex,
  16846. this.oldIndex,
  16847. 0
  16848. );
  16849. if (count1 > 0 || count2 > 0) {
  16850. this.$confirm(
  16851. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  16852. "提示",
  16853. {
  16854. confirmButtonText: "确定",
  16855. cancelButtonText: "取消",
  16856. type: "warning",
  16857. }
  16858. )
  16859. .then(() => {
  16860. if (this.oldUnitIndex != this.checkUnitIndex) {
  16861. let newItems = [
  16862. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16863. ];
  16864. // 删除老的节点
  16865. newItems.splice(this.oldIndex, 1);
  16866. // 在列表中目标位置增加新的节点
  16867. let newItems2 = [
  16868. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  16869. ];
  16870. newItems2.splice(this.newIndex, 0, this.oldData);
  16871. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16872. ...newItems,
  16873. ];
  16874. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  16875. ...newItems2,
  16876. ];
  16877. } else {
  16878. let newItems = [
  16879. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16880. ];
  16881. let chapterData = []
  16882. if (this.oldIndex == 0) {
  16883. chapterData = newItems[this.oldIndex].chapterData
  16884. newItems[this.oldIndex].chapterData = []
  16885. } else if (this.newIndex == 0) {
  16886. chapterData = newItems[this.newIndex].chapterData
  16887. newItems[this.oldIndex].chapterData = []
  16888. }
  16889. // 删除老的节点
  16890. newItems.splice(this.oldIndex, 1);
  16891. // 在列表中目标位置增加新的节点
  16892. newItems.splice(this.newIndex, 0, this.oldData);
  16893. if (this.oldIndex == 0 || this.newIndex == 0) {
  16894. newItems[0].chapterData = chapterData
  16895. }
  16896. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16897. ...newItems,
  16898. ];
  16899. }
  16900. this.typeIndex = "";
  16901. this.newIndex = "";
  16902. this.dragType = "";
  16903. this.checkUnitIndex = "";
  16904. this.isdrag = "";
  16905. this.updateWork();
  16906. this.$forceUpdate();
  16907. })
  16908. .catch(() => {
  16909. this.newIndex = "";
  16910. this.dragType = "";
  16911. this.typeIndex = "";
  16912. this.checkUnitIndex = "";
  16913. this.isdrag = "";
  16914. return;
  16915. });
  16916. } else {
  16917. if (this.oldUnitIndex != this.checkUnitIndex) {
  16918. let newItems = [
  16919. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16920. ];
  16921. // 删除老的节点
  16922. newItems.splice(this.oldIndex, 1);
  16923. // 在列表中目标位置增加新的节点
  16924. let newItems2 = [
  16925. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  16926. ];
  16927. newItems2.splice(this.newIndex, 0, this.oldData);
  16928. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16929. ...newItems,
  16930. ];
  16931. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  16932. ...newItems2,
  16933. ];
  16934. } else {
  16935. let newItems = [
  16936. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16937. ];
  16938. let chapterData = []
  16939. if (this.oldIndex == 0) {
  16940. chapterData = newItems[this.oldIndex].chapterData
  16941. newItems[this.oldIndex].chapterData = []
  16942. } else if (this.newIndex == 0) {
  16943. chapterData = newItems[this.newIndex].chapterData
  16944. newItems[this.oldIndex].chapterData = []
  16945. }
  16946. // 删除老的节点
  16947. newItems.splice(this.oldIndex, 1);
  16948. // 在列表中目标位置增加新的节点
  16949. newItems.splice(this.newIndex, 0, this.oldData);
  16950. if (this.oldIndex == 0 || this.newIndex == 0) {
  16951. newItems[0].chapterData = chapterData
  16952. }
  16953. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16954. ...newItems,
  16955. ];
  16956. }
  16957. this.typeIndex = "";
  16958. this.newIndex = "";
  16959. this.dragType = "";
  16960. this.checkUnitIndex = "";
  16961. this.isdrag = "";
  16962. this.updateWork();
  16963. this.$forceUpdate();
  16964. }
  16965. },
  16966. dragUnitStart(val, i) {
  16967. this.dragType = "Unit";
  16968. this.oldIndex = i;
  16969. this.oldData = val;
  16970. },
  16971. dragUnitOver(i) {
  16972. this.typeIndex = "Unit-" + i;
  16973. this.newIndex = i;
  16974. console.log(i, this.unitJson[i].toolOpen);
  16975. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  16976. this.unitJson[i].toolOpen = true;
  16977. this.updateWork();
  16978. this.$forceUpdate();
  16979. }
  16980. },
  16981. async dragUnitEnd() {
  16982. if (this.dragType != "Unit") {
  16983. this.newIndex = "";
  16984. this.dragType = "";
  16985. this.typeIndex = "";
  16986. this.isdrag = "";
  16987. return;
  16988. }
  16989. if (this.newIndex == this.oldIndex) {
  16990. this.newIndex = "";
  16991. this.dragType = "";
  16992. this.typeIndex = "";
  16993. this.isdrag = "";
  16994. return;
  16995. }
  16996. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  16997. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  16998. console.log(count1, count2);
  16999. if (count1 > 0 || count2 > 0) {
  17000. this.$confirm(
  17001. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  17002. "提示",
  17003. {
  17004. confirmButtonText: "确定",
  17005. cancelButtonText: "取消",
  17006. type: "warning",
  17007. }
  17008. )
  17009. .then(() => {
  17010. let newItems = [...this.unitJson];
  17011. // 删除老的节点
  17012. newItems.splice(this.oldIndex, 1);
  17013. // 在列表中目标位置增加新的节点
  17014. newItems.splice(this.newIndex, 0, this.oldData);
  17015. this.unitJson = [...newItems];
  17016. this.typeIndex = "";
  17017. this.newIndex = "";
  17018. this.dragType = "";
  17019. this.isdrag = "";
  17020. this.updateWork();
  17021. this.$forceUpdate();
  17022. })
  17023. .catch(() => {
  17024. this.newIndex = "";
  17025. this.dragType = "";
  17026. this.typeIndex = "";
  17027. this.isdrag = "";
  17028. return;
  17029. });
  17030. } else {
  17031. let newItems = [...this.unitJson];
  17032. // 删除老的节点
  17033. newItems.splice(this.oldIndex, 1);
  17034. // 在列表中目标位置增加新的节点
  17035. newItems.splice(this.newIndex, 0, this.oldData);
  17036. this.unitJson = [...newItems];
  17037. this.typeIndex = "";
  17038. this.newIndex = "";
  17039. this.dragType = "";
  17040. this.isdrag = "";
  17041. this.updateWork();
  17042. this.$forceUpdate();
  17043. }
  17044. },
  17045. getWorksCount(type, stage, task, tool) {
  17046. return new Promise((resolve, reject) => {
  17047. let params = [
  17048. {
  17049. cid: this.cid,
  17050. stage: stage,
  17051. task: task,
  17052. tool: tool,
  17053. type: type,
  17054. },
  17055. ];
  17056. this.ajax
  17057. .post(this.$store.state.api + "getCourseWorkCount", params)
  17058. .then((res) => {
  17059. let count = res.data[0][0].count;
  17060. resolve(count);
  17061. })
  17062. .catch((err) => {
  17063. resolve(0);
  17064. this.$message.error("网络不佳");
  17065. console.error(err);
  17066. });
  17067. });
  17068. },
  17069. getTwoType(id) {
  17070. this.twoJson = [];
  17071. var array = this.CourseTypeJson1[
  17072. "3f8eed32-aba9-11ee-b534-005056b86db5"
  17073. ].filter((e) => {
  17074. return e.ppid == id;
  17075. });
  17076. this.twoJson = array;
  17077. this.$forceUpdate();
  17078. },
  17079. ctype() {
  17080. this.oneJson =
  17081. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  17082. },
  17083. selectAllType1() {
  17084. this.CourseType1 = [];
  17085. this.CourseTypeJson1 = {};
  17086. this.courseTypeId1 = {};
  17087. this.$forceUpdate();
  17088. let params = {
  17089. org: this.org && this.org != "" ? this.org : "",
  17090. oid: this.oid && this.oid != "" ? this.oid : "",
  17091. };
  17092. this.ajax
  17093. .get(this.$store.state.api + "selectAllEvaType", params)
  17094. .then((res) => {
  17095. this.CourseType1 = res.data;
  17096. for (var i = 0; i < res.data[0].length; i++) {
  17097. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  17098. res.data[0][i].name = "一级分类";
  17099. } else if (
  17100. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  17101. ) {
  17102. res.data[0][i].name = "二级分类";
  17103. }
  17104. if (!this.cid) {
  17105. this.courseTypeId1[res.data[0][i].id] = [];
  17106. }
  17107. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  17108. this.CourseTypeJson1[res.data[0][i].id] = [];
  17109. }
  17110. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  17111. for (var j = 0; j < res.data[1].length; j++) {
  17112. if (res.data[0][i].id == res.data[1][j].pid) {
  17113. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  17114. }
  17115. }
  17116. // } else {
  17117. if (res.data[2].length > 0) {
  17118. for (var j = 0; j < res.data[2].length; j++) {
  17119. if (res.data[0][i].id == res.data[2][j].pid) {
  17120. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  17121. }
  17122. }
  17123. }
  17124. if (res.data[3].length > 0) {
  17125. for (var j = 0; j < res.data[3].length; j++) {
  17126. if (res.data[0][i].id == res.data[3][j].pid) {
  17127. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  17128. }
  17129. }
  17130. }
  17131. // }
  17132. }
  17133. this.ctype();
  17134. this.cetBoxDialog = true;
  17135. })
  17136. .catch((err) => {
  17137. console.error(err);
  17138. });
  17139. },
  17140. allEvaCan() {
  17141. if (this.taskLoading.length) {
  17142. let _pan = 1
  17143. for (var k = 0; k < this.taskLoading.length; k++) {
  17144. if (this.taskLoading[k]) {
  17145. this.$message({
  17146. message: `请等待任务${k + 1}回答完毕后再继续`,
  17147. type: "warning"
  17148. });
  17149. _pan = 2
  17150. }
  17151. }
  17152. if (_pan == 2) {
  17153. return
  17154. }
  17155. }
  17156. if (this.taskGLoading.length) {
  17157. let _pan = 1
  17158. for (var k = 0; k < this.taskGLoading.length; k++) {
  17159. if (this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])) {
  17160. this.$message({
  17161. message: `请等待任务${k + 1}回答完毕后再继续`,
  17162. type: "warning"
  17163. });
  17164. _pan = 2
  17165. }
  17166. }
  17167. if (_pan == 2) {
  17168. return
  17169. }
  17170. }
  17171. this.$confirm("是否一键生成所有工具的评价设置?会占用您一些时间。", "提示", {
  17172. confirmButtonText: "确定",
  17173. cancelButtonText: "取消",
  17174. type: "warning",
  17175. customClass: 'custom-confirm-box'
  17176. })
  17177. .then(() => {
  17178. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17179. for (var index = 0; index < taskJson.length; index++) {
  17180. for (var j = 0; j < taskJson[index].toolChoose.length; j++) {
  17181. if (this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[index].toolChoose[j].tool[0]) != -1) {
  17182. this.$refs['evalist' + index + j][0].openAiDialog('elist');
  17183. }
  17184. }
  17185. }
  17186. })
  17187. .catch(() => {
  17188. });
  17189. setTimeout(() => {
  17190. this.setTipsIndex()
  17191. }, 500)
  17192. },
  17193. setAiJson(pan,string,string2,string3){
  17194. if(pan == 'aiTeacher2'){
  17195. this.aiJson['teacherDetail2'] = string
  17196. }else if(pan == 'aiRateRuleA'){
  17197. this.aiJson['aiRateRule'] = string
  17198. }else if(pan == 'aiOutline2'){
  17199. this.aiJson['aiOutlineTask'] = string
  17200. this.aiJson['aiOutlineDetail'] = string2
  17201. }else if(pan == 'aiTeacher3'){
  17202. this.aiJson['aiCpoteTask'] = string
  17203. this.aiJson['teacherDetail2'] = string2
  17204. }else if(pan == 'aiTask2'){
  17205. this.aiJson['aiTask'] = string
  17206. }else if(pan == 'aiTask3'){
  17207. this.aiJson['aiTaskG1'] = string
  17208. this.aiJson['aiTaskG2'] = string2
  17209. this.aiJson['aiTaskG3'] = string3
  17210. }else if(pan == 'aiteacherTextDetail'){
  17211. this.aiJson['aiAbstract'] = string
  17212. }else if(pan == 'aitargetTextDetail'){
  17213. this.aiJson['aiTarget'] = string
  17214. }else if(pan == 'aitargetTextDetail2'){
  17215. this.aiJson['aiTarget2'] = string
  17216. }else if(pan == 'aitargetTextDetail3'){
  17217. this.aiJson['aiTargetGet'] = string
  17218. this.aiJson['aiTarget2'] = string2
  17219. }else {
  17220. this.aiJson[pan] = string
  17221. }
  17222. this.aiText2 = ''
  17223. this.aiText3 = ''
  17224. this.$forceUpdate();
  17225. },
  17226. editTask3(index){
  17227. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  17228. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  17229. }else {
  17230. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  17231. }
  17232. setTimeout(() => {
  17233. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  17234. setTimeout(() => {
  17235. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  17236. }, 0);
  17237. }, 100);
  17238. this.$forceUpdate();
  17239. },
  17240. editTask2(index){
  17241. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  17242. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  17243. }else {
  17244. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  17245. }
  17246. setTimeout(() => {
  17247. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  17248. setTimeout(() => {
  17249. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  17250. }, 0);
  17251. }, 100);
  17252. this.$forceUpdate();
  17253. },
  17254. openRule(i, k){
  17255. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  17256. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  17257. }else {
  17258. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  17259. }
  17260. setTimeout(() => {
  17261. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  17262. setTimeout(() => {
  17263. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  17264. }, 0);
  17265. }, 200);
  17266. this.$forceUpdate();
  17267. },
  17268. editCpote(index){
  17269. if(this.cpote[index]){
  17270. this.cpote[index] = false
  17271. }else {
  17272. this.cpote[index] = true
  17273. }
  17274. setTimeout(() => {
  17275. this.cpote[index.replace('s','')] += "*0*%*";
  17276. setTimeout(() => {
  17277. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  17278. }, 0);
  17279. }, 100);
  17280. this.$forceUpdate();
  17281. },
  17282. clickGenTT(){
  17283. if(!this.teacherInfoData.length){
  17284. this.$message.error("请上传教案");
  17285. return;
  17286. }
  17287. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  17288. this.openAiDialog(2, 'aiteacherTextDetail',1)
  17289. setTimeout(() => {
  17290. this.openAiDialog(2, 'aitargetTextDetail',1)
  17291. }, 500);
  17292. },
  17293. async getUserName() {
  17294. let params = { uid: this.userid };
  17295. try {
  17296. let res = await this.ajax.get(
  17297. this.$store.state.api + "getUser",
  17298. params
  17299. );
  17300. return res.data[0][0].name;
  17301. } catch (err) {
  17302. console.error(err);
  17303. }
  17304. },
  17305. getCGN(type){
  17306. let sub = [] //学科
  17307. let mclass = [] //年纪
  17308. let theme = []
  17309. if (this.courseTypeId.length) {
  17310. for (var i = 0; i < this.courseTypeId.length; i++) {
  17311. let _sid = this.courseTypeId[i]
  17312. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17313. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17314. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17315. }
  17316. }
  17317. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17318. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17319. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17320. }
  17321. }
  17322. for (var j = 0; j < this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17323. if (_sid == this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].id) {
  17324. theme.push(this.CourseTypeJson['34629bcc-d02f-11ec-8c78-005056b86db5'][j].name)
  17325. }
  17326. }
  17327. }
  17328. if(type == 1){
  17329. return sub.join(",")
  17330. }else if(type == 2){
  17331. return mclass.join(",")
  17332. }else if(type == 3){
  17333. return theme.join(",")
  17334. }
  17335. }
  17336. },
  17337. async exportTeachPlan(){
  17338. this.loading = true
  17339. const zip = new JSZip();
  17340. let md = new MarkdownIt();
  17341. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  17342. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17343. let String = ''
  17344. String += `<h1 style="text-align: center;">${this.courseName}</h1>`
  17345. String += `<h2>课程基本信息</h2>`
  17346. String += `<div><strong>设计者:</strong><span>${await this.getUserName()}</span></div>`
  17347. String += `<div><strong>年级:</strong><span></span>${this.getCGN(2)}</div>`
  17348. String += `<div><strong>主题:</strong><span></span>${this.getCGN(3)}</div>`
  17349. String += `<div><strong>学科:</strong><span></span>${this.getCGN(1)}</div>`
  17350. if(courseText){
  17351. String += `<h2>课程概况</h2>`
  17352. String += md.render(courseText)
  17353. }
  17354. if(target){
  17355. String += `<h2>课程目标</h2>`
  17356. String += md.render(target)
  17357. }
  17358. String += `<h2>课程教案</h2>`
  17359. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17360. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  17361. // let name = _task.task+'-教案'
  17362. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  17363. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  17364. await this.generate(name, _html, i)
  17365. }
  17366. String += `<h3>任务${i+1}</h3>`
  17367. String += `<h4>${_task.task}</h4>`
  17368. String += _html
  17369. // let file = await this.generateExport(name, _html, i)
  17370. // zip.file(`${name}.docx`, file, { binary: true })
  17371. }
  17372. await this.generateExport(this.courseName, String, i)
  17373. setTimeout(() => {
  17374. this.loading = false
  17375. }, 2000);
  17376. // zip.generateAsync({ type: "blob" }).then((content) => {
  17377. // // 生成二进制流
  17378. // saveAs(
  17379. // content,
  17380. // this.courseName + "-" + "教案.zip"
  17381. // ); // 利用file-saver保存文件 自定义文件名
  17382. // setTimeout(() => {
  17383. // this.loading = false
  17384. // // if(!this.cid){
  17385. // // this.addWork(3)
  17386. // // }else{
  17387. // // this.updateWork();
  17388. // // this.steps = 4;
  17389. // // }
  17390. // }, 2000);
  17391. // });
  17392. },
  17393. async exportTaskEA(){
  17394. this.loading = true
  17395. const zip = new JSZip();
  17396. let md = new MarkdownIt();
  17397. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17398. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  17399. for(var j = 0; j < _task.chapterData.length; j++){
  17400. if(_task.chapterData[j].type == 3 && _task.chapterData[j].name.includes('学历案')){
  17401. let file = await getFile(_task.chapterData[j].url)
  17402. if (file.data != 1) {
  17403. // 下载文件, 并存成ArrayBuffer对象
  17404. const file_name = _task.chapterData[j].name; // 获取文件名
  17405. const fileExt = file_name.split('.').pop(); // 获取文件后缀
  17406. const fileNameWithoutExt = file_name.substring(0, file_name.length - fileExt.length - 1); // 获取文件名不包括后缀的部分
  17407. // 判断是否有重复的文件名字
  17408. if (!zip.file(file_name)) {
  17409. zip.file(file_name, file.data, { binary: true }); // 逐个添加文件
  17410. } else {
  17411. // 如果有重复的文件名,则在文件名后添加序号
  17412. let count = 1;
  17413. let newFileName = fileNameWithoutExt;
  17414. while (zip.file(`${newFileName}.${fileExt}`)) {
  17415. newFileName = `${fileNameWithoutExt}(${count})`;
  17416. count++;
  17417. }
  17418. zip.file(`${newFileName}.${fileExt}`, file.data, { binary: true });
  17419. }
  17420. }
  17421. }
  17422. }
  17423. for(var j = 0; j < _task.toolChoose.length; j++){
  17424. let tool = _task.toolChoose[j]
  17425. if(tool.eList && tool.eList.length){
  17426. let tableContent = '| 素养 | 评价标准 | 评价细则 |\n| --- | --- | --- |\n';
  17427. tool.eList.forEach(item => {
  17428. tableContent += `| ${item.target} | ${item.detail} | ${item.rule.replaceAll('\n', ' ')} |\n`;
  17429. });
  17430. let html = md.render(tableContent);
  17431. let name = `任务${i+1}工具${j+1}的评价`
  17432. let file = await this.generateExport2(name, html, i)
  17433. zip.file(`${name}.docx`, file, { binary: true })
  17434. }
  17435. }
  17436. // let file = await this.generateExport(name, _html, i)
  17437. // zip.file(`${name}.docx`, file, { binary: true })
  17438. }
  17439. zip.generateAsync({ type: "blob" }).then((content) => {
  17440. // 生成二进制流
  17441. saveAs(
  17442. content,
  17443. this.courseName + "-" + "评价和学历案.zip"
  17444. ); // 利用file-saver保存文件 自定义文件名
  17445. setTimeout(() => {
  17446. this.loading = false
  17447. }, 2000);
  17448. });
  17449. },
  17450. clickGenTT2(){
  17451. if (this.courseName == "") {
  17452. this.$message.error("请补充填写课程名称");
  17453. return;
  17454. }
  17455. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  17456. let functionA = ''
  17457. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  17458. // setTimeout(() => {
  17459. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  17460. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  17461. // }, 500);
  17462. functionA = ()=>{
  17463. this.openAiDialog(2, 'aitargetTextDetail3',1)
  17464. }
  17465. }
  17466. this.openAiDialog(2, 'aiDetail',1, functionA)
  17467. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  17468. // setTimeout(() => {
  17469. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  17470. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  17471. // }, 500);
  17472. }
  17473. this.courseTextBool = true
  17474. },
  17475. changeIsuseT(){
  17476. if(this.isuseT == 1){
  17477. this.courseTextB = false
  17478. }else if(this.isuseT == 2){
  17479. navigator.mediaDevices.getUserMedia({ audio: true })
  17480. .then(stream => {
  17481. console.log('获取录音权限成功');
  17482. })
  17483. .catch(err => {
  17484. this.$message.error('获取录音权限失败')
  17485. console.error('获取录音权限失败:', err);
  17486. });
  17487. }else{
  17488. if(this.courseText){
  17489. this.courseTextB = false
  17490. }else{
  17491. this.courseTextB = true
  17492. }
  17493. }
  17494. this.interSetting = false
  17495. this.interPan = true
  17496. },
  17497. changeLang(){
  17498. window.course_lang = this.languageSetting
  17499. },
  17500. openInterPanSetting(){
  17501. this.interSetting = !this.interSetting
  17502. if(this.interSetting){
  17503. if(this.istemplate == 1){
  17504. this.agentid = this.aiJson.agentid
  17505. }else {
  17506. this.agentid = this.aiJson.sagentid
  17507. }
  17508. }else {
  17509. this.agentid = ''
  17510. }
  17511. },
  17512. openInterPanSetting2(){
  17513. this.interSetting = !this.interSetting
  17514. if(this.interSetting){
  17515. this.r_agentid = this.aiJson.recordAgentid
  17516. }else {
  17517. this.r_agentid = ''
  17518. }
  17519. },
  17520. setAgentid(){
  17521. if(!this.agentid.trim()){
  17522. this.$message.error('请输入工作流链接')
  17523. return;
  17524. }
  17525. if(this.istemplate == 1){
  17526. this.aiJson.agentid = this.agentid.trim()
  17527. }else {
  17528. this.aiJson.sagentid = this.agentid.trim()
  17529. }
  17530. this.interFlash = false
  17531. setTimeout(() => {
  17532. this.interFlash = true
  17533. }, 100);
  17534. this.interSetting = false
  17535. },
  17536. setAgentid2(){
  17537. if(!this.r_agentid.trim()){
  17538. this.$message.error('请输入工作流链接')
  17539. return;
  17540. }
  17541. this.aiJson.recordAgentid = this.r_agentid.trim()
  17542. this.interSetting = false
  17543. },
  17544. rebuildAgentid(){
  17545. this.aiJson.sagentid = ''
  17546. this.interFlash = false
  17547. setTimeout(() => {
  17548. this.interFlash = true
  17549. }, 100);
  17550. this.interSetting = false
  17551. },
  17552. cancelInterSetting(){
  17553. this.agentid = ''
  17554. this.interSetting = false
  17555. },
  17556. cancelInterSetting2(){
  17557. this.r_agentid = ''
  17558. this.interSetting = false
  17559. },
  17560. openAiDialog2(clickType, type, callback, index, tindex){
  17561. if (this.taskLoading.length) {
  17562. let _pan = 1
  17563. for(var k = 0; k < this.taskLoading.length; k++){
  17564. if(this.taskLoading[k]){
  17565. this.$message({
  17566. message: `请等待任务${k+1}回答完毕后再继续`,
  17567. type: "warning"
  17568. });
  17569. _pan = 2
  17570. }
  17571. }
  17572. if(_pan == 2){
  17573. return
  17574. }
  17575. }
  17576. if(this.taskGLoading.length){
  17577. let _pan = 1
  17578. for(var k = 0; k < this.taskGLoading.length; k++){
  17579. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  17580. this.$message({
  17581. message: `请等待任务${k+1}回答完毕后再继续`,
  17582. type: "warning"
  17583. });
  17584. _pan = 2
  17585. }
  17586. }
  17587. if(_pan == 2){
  17588. return
  17589. }
  17590. }
  17591. let pan2 = 1
  17592. let taskJson = this.unitJson[0].chapterInfo[0].taskJson
  17593. for(var _index = 0; _index < taskJson.length; _index++){
  17594. for (var j = 0; j < taskJson[_index].toolChoose.length; j++) {
  17595. if(this.panTaskElist() == 0 && this.pjIndex.indexOf(taskJson[_index].toolChoose[j].tool[0]) != -1){
  17596. if(this.$refs['evalist'+_index+j] && this.$refs['evalist'+_index+j][0].loading){
  17597. this.$message({
  17598. message: `请等待任务${_index+1}回答完毕后再继续`,
  17599. type: "warning"
  17600. });
  17601. pan2 = 2
  17602. }
  17603. }
  17604. }
  17605. }
  17606. if(pan2 == 2){
  17607. return
  17608. }
  17609. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  17610. confirmButtonText: "确定",
  17611. cancelButtonText: "取消",
  17612. type: "warning",
  17613. customClass: 'custom-confirm-box'
  17614. })
  17615. .then(() => {
  17616. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  17617. // this.openAiDialog(clickType, 'aiTeacher')
  17618. // }else {
  17619. this.openAiDialog(clickType, type, callback, index, tindex)
  17620. // }
  17621. })
  17622. .catch(() => {
  17623. });
  17624. setTimeout(() => {
  17625. this.setTipsIndex()
  17626. }, 500)
  17627. },
  17628. async openAiDialog(clickType, type, callback, index, tindex) {
  17629. let fileid = this.isFileSearch ? [...this.fileIds] : []
  17630. fileid = [...fileid]
  17631. if (this.infoData.length) {
  17632. for (var i = 0; i < this.infoData.length; i++) {
  17633. if(this.infoData[i].fileid){
  17634. fileid.push(this.infoData[i].fileid)
  17635. }else {
  17636. let _fileid = await this.createFileid(this.infoData[i].url)
  17637. if(_fileid){
  17638. this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17639. _this.$forceUpdate();
  17640. if(_fileid != 1){
  17641. fileid.push(_fileid)
  17642. }
  17643. }
  17644. }
  17645. }
  17646. }
  17647. fileid = [...fileid, ...this.knowFileids, ...this.knowFileids2]
  17648. if(fileid.length > 30){
  17649. this.$message.error('目前检索文件不能超过30个噢,请减少一些')
  17650. return;
  17651. }
  17652. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  17653. this.$message.error("您没有权限修改/查看提示词");
  17654. return;
  17655. }
  17656. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  17657. this.$message.error("请上传教案");
  17658. return;
  17659. }
  17660. if (this.courseName == "") {
  17661. this.$message.error("请补充填写课程名称");
  17662. return;
  17663. }
  17664. this.aiText2 = ''
  17665. this.clickType = clickType
  17666. let sub = []
  17667. if (this.courseTypeId.length) {
  17668. for (var i = 0; i < this.courseTypeId.length; i++) {
  17669. let _sid = this.courseTypeId[i]
  17670. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17671. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17672. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17673. }
  17674. }
  17675. }
  17676. }
  17677. let mclass = []
  17678. if (this.courseTypeId.length) {
  17679. for (var i = 0; i < this.courseTypeId.length; i++) {
  17680. let _sid = this.courseTypeId[i]
  17681. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17682. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17683. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17684. }
  17685. }
  17686. }
  17687. }
  17688. if (type == "aiDetail") {
  17689. if (this.ttextLoading) {
  17690. this.$message({
  17691. message: "请回答完毕后再次发送",
  17692. type: "warning"
  17693. });
  17694. return;
  17695. }
  17696. this.aitype = "aiDetail"
  17697. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  17698. this.aiText = this.aiJson.aiDetail
  17699. this.aiCallBack = [callback, index]
  17700. } else if (type == "aiOutline") {
  17701. this.aitype = "aiOutline"
  17702. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  17703. this.aiText = this.aiJson.aiOutline
  17704. } else if (type == "aiOutline2") {
  17705. this.aitype = "aiOutline2"
  17706. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  17707. this.aiText = this.aiJson.aiOutlineTask
  17708. this.aiText2 = this.aiJson.aiOutlineDetail
  17709. } else if (type == "aiOutlineDetail2") {
  17710. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  17711. this.$message({
  17712. message: "请回答完毕后再次发送",
  17713. type: "warning"
  17714. });
  17715. return;
  17716. }
  17717. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  17718. this.$message.error('请输入任务名称')
  17719. return;
  17720. }
  17721. this.aitype = type
  17722. this.aiCallBack = callback
  17723. this.aiText = this.aiJson.aiOutlineDetail2
  17724. } else if (type == "aiTask") {
  17725. this.aitype = "aiTask"
  17726. var _text = ""
  17727. for (var i = 0; i < this.teacherText.length; i++) {
  17728. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  17729. }
  17730. // this.aiText = `请根据${_text}。`
  17731. this.aiText = this.aiJson.aiTask
  17732. this.aiCallBack = callback
  17733. } else if (type == "aiTask2") {
  17734. if (this.taskLoading[callback]) {
  17735. this.$message({
  17736. message: "请回答完毕后再次发送",
  17737. type: "warning"
  17738. });
  17739. return;
  17740. }
  17741. this.aitype = "aiTask2"
  17742. this.aiText = this.aiJson.aiTask
  17743. this.aiCallBack = [callback, index]
  17744. } else if (type == "aiTask3") {
  17745. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  17746. this.$message({
  17747. message: "请回答完毕后再次发送",
  17748. type: "warning"
  17749. });
  17750. return;
  17751. }
  17752. this.aitype = type
  17753. this.aiText = this.aiJson.aiTaskG1
  17754. this.aiText2 = this.aiJson.aiTaskG2
  17755. this.aiText3 = this.aiJson.aiTaskG3
  17756. this.aiCallBack = [callback, index]
  17757. } else if (type == "aiTaskG3") {
  17758. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][2])) {
  17759. this.$message({
  17760. message: "请回答完毕后再次发送",
  17761. type: "warning"
  17762. });
  17763. return;
  17764. }
  17765. this.aitype = type
  17766. this.aiText = this.aiJson.aiTaskG3
  17767. this.aiCallBack = callback
  17768. } else if (type == "aiTaskG2") {
  17769. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][1])) {
  17770. this.$message({
  17771. message: "请回答完毕后再次发送",
  17772. type: "warning"
  17773. });
  17774. return;
  17775. }
  17776. if(callback != 'all' && !this.unitJson[0].chapterInfo[0].taskJson[callback].taskDetail3){
  17777. this.$message({
  17778. message: `请先生成任务${callback}的教案在执行此操作`,
  17779. type: "warning"
  17780. });
  17781. return;
  17782. }
  17783. this.aitype = type
  17784. this.aiText = this.aiJson.aiTaskG2
  17785. this.aiCallBack = callback
  17786. } else if (type == "aiDetail1") {
  17787. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  17788. this.$message({
  17789. message: "请回答完毕后再次发送",
  17790. type: "warning"
  17791. });
  17792. return;
  17793. }
  17794. this.aitype = "aiDetail1"
  17795. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  17796. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  17797. this.aiText = this.aiJson.aiDetail1
  17798. this.aiCallBack = callback
  17799. this.aiIndex = index
  17800. } else if (type == "aiDetail2") {
  17801. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  17802. this.$message({
  17803. message: "请回答完毕后再次发送",
  17804. type: "warning"
  17805. });
  17806. return;
  17807. }
  17808. this.aitype = "aiDetail2"
  17809. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  17810. this.aiText = this.aiJson.aiDetail2
  17811. this.aiCallBack = callback
  17812. this.aiIndex = index
  17813. } else if (type == "aiDetail3") {
  17814. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  17815. this.$message({
  17816. message: "请回答完毕后再次发送",
  17817. type: "warning"
  17818. });
  17819. return;
  17820. }
  17821. this.aitype = "aiDetail3"
  17822. this.aiText = this.aiJson.aiDetail3
  17823. this.aiIndex = index + '-' + tindex
  17824. } else if (type == "aiDetail4") {
  17825. var _text = ""
  17826. if(callback && callback.length){
  17827. for (var i = 0; i < callback.length; i++) {
  17828. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  17829. }
  17830. }
  17831. this.aitype = "aiDetail4"
  17832. this.aiText = this.aiJson.aiDetail4
  17833. this.aiIndex = index
  17834. } else if (type == "aiTeacher") {
  17835. this.aitype = "aiTeacher"
  17836. var _text = ""
  17837. for (var i = 0; i < this.dArray.length; i++) {
  17838. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  17839. }
  17840. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17841. this.aiText = this.aiJson.aiTeacher
  17842. this.aiCallBack = callback
  17843. } else if (type == "aiTeacher2") {
  17844. if(this.ttaskDetailLoading5.length){
  17845. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  17846. this.$message({
  17847. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  17848. type: "warning"
  17849. });
  17850. return
  17851. }
  17852. this.aitype = "aiTeacher2"
  17853. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  17854. } else if (type == "aiTeacher3") {
  17855. this.aitype = type
  17856. this.aiText = this.aiJson.aiCpoteTask
  17857. this.aiText2 = this.aiJson.teacherDetail2
  17858. } else if (type == "teacherDetail") {
  17859. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  17860. this.$message({
  17861. message: "请回答完毕后再次发送",
  17862. type: "warning"
  17863. });
  17864. return;
  17865. }
  17866. this.aitype = "teacherDetail"
  17867. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17868. this.aiText = this.aiJson.teacherDetail
  17869. this.aiCallBack = callback
  17870. this.aiIndex = index
  17871. } else if (type == "teacherDetail2") {
  17872. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  17873. this.$message.error('请输入任务名称')
  17874. return;
  17875. }
  17876. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  17877. // this.$message({
  17878. // message: "请回答完毕后再次发送",
  17879. // type: "warning"
  17880. // });
  17881. // return;
  17882. this.$confirm("还未生成完毕,是否直接重新生成?", "提示", {
  17883. confirmButtonText: "确定重新生成",
  17884. cancelButtonText: "取消",
  17885. distinguishCancelAndClose: true,
  17886. type: "warning",
  17887. customClass: 'custom-confirm-box'
  17888. })
  17889. .then(() => {
  17890. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  17891. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  17892. this.isTeacherTaskCancelToken2[index] = null;
  17893. }
  17894. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  17895. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  17896. if(this.isTeacherTaskCancelSource[index]){
  17897. this.isTeacherTaskCancelSource[index].close()
  17898. this.isTeacherTaskCancelSource[index] = null
  17899. }
  17900. this.aitype = "teacherDetail2"
  17901. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17902. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  17903. this.aiCallBack = callback
  17904. this.aiIndex = index
  17905. this.dialogVisibleAiD = true
  17906. }).catch((v) => {
  17907. console.log(v);
  17908. })
  17909. setTimeout(() => {
  17910. this.setTipsIndex()
  17911. }, 500)
  17912. return;
  17913. }else {
  17914. this.aitype = "teacherDetail2"
  17915. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17916. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  17917. this.aiCallBack = callback
  17918. this.aiIndex = index
  17919. this.dialogVisibleAiD = true
  17920. }
  17921. } else if (type == "aiCpote1") {
  17922. if (this.cpotetLoading.cpote1) {
  17923. this.$message({
  17924. message: "请回答完毕后再次发送",
  17925. type: "warning"
  17926. });
  17927. return;
  17928. }
  17929. this.aitype = "aiCpote1"
  17930. this.aiText = this.aiJson.cpote1
  17931. this.aiCallBack = callback
  17932. } else if (type == "aiCpote2") {
  17933. if (this.cpotetLoading.cpote2) {
  17934. this.$message({
  17935. message: "请回答完毕后再次发送",
  17936. type: "warning"
  17937. });
  17938. return;
  17939. }
  17940. this.aitype = "aiCpote2"
  17941. this.aiText = this.aiJson.cpote2
  17942. this.aiCallBack = callback
  17943. } else if (type == "aiCpote3") {
  17944. if (this.cpotetLoading.cpote3) {
  17945. this.$message({
  17946. message: "请回答完毕后再次发送",
  17947. type: "warning"
  17948. });
  17949. return;
  17950. }
  17951. this.aitype = "aiCpote3"
  17952. this.aiText = this.aiJson.cpote3
  17953. this.aiCallBack = callback
  17954. } else if (type == "aiCpote4") {
  17955. if (this.cpotetLoading.cpote4) {
  17956. this.$message({
  17957. message: "请回答完毕后再次发送",
  17958. type: "warning"
  17959. });
  17960. return;
  17961. }
  17962. this.aitype = "aiCpote4"
  17963. this.aiText = this.aiJson.cpote4
  17964. this.aiCallBack = callback
  17965. } else if (type == 'aiteacherTextDetail'){
  17966. if (this.tteacherTextLoading) {
  17967. this.$message({
  17968. message: "请回答完毕后再次发送",
  17969. type: "warning"
  17970. });
  17971. return;
  17972. }
  17973. this.aitype = type
  17974. this.aiText = this.aiJson.aiAbstract
  17975. this.aiCallBack = callback
  17976. } else if (type == 'aitargetTextDetail'){
  17977. if (this.ttargetTextLoading) {
  17978. this.$message({
  17979. message: "请回答完毕后再次发送",
  17980. type: "warning"
  17981. });
  17982. return;
  17983. }
  17984. this.aitype = type
  17985. this.aiText = this.aiJson.aiTarget
  17986. this.aiCallBack = callback
  17987. } else if (type == 'aitargetTextDetail2'){
  17988. if (this.ttargetTextLoading2) {
  17989. this.$message({
  17990. message: "请回答完毕后再次发送",
  17991. type: "warning"
  17992. });
  17993. return;
  17994. }
  17995. this.aitype = type
  17996. this.aiText = this.aiJson.aiTarget2
  17997. this.aiCallBack = callback
  17998. } else if (type == 'aitargetTextDetail3'){
  17999. if (this.ttargetTextLoading2) {
  18000. this.$message({
  18001. message: "请回答完毕后再次发送",
  18002. type: "warning"
  18003. });
  18004. return;
  18005. }
  18006. if(!this.courseText){
  18007. this.$message.error("请生成简要描述后再生成目标");
  18008. return;
  18009. }
  18010. this.$nextTick(() => {
  18011. const targetDiv = this.$refs.aitargetTextDetail3;
  18012. if (targetDiv) {
  18013. targetDiv.scrollIntoView();
  18014. }
  18015. });
  18016. this.aitype = type
  18017. this.aiText = this.aiJson.aiTargetGet
  18018. this.aiText2 = this.aiJson.aiTarget2
  18019. this.aiCallBack= callback
  18020. } else if (type == 'aiSearchFile'){
  18021. if(this.fileSLoading) {
  18022. this.$message({
  18023. message: "请回答完毕后再次发送",
  18024. type: "warning"
  18025. });
  18026. return;
  18027. }
  18028. this.aitype = type
  18029. this.aiText = this.aiJson.aiSearchFile
  18030. } else if (type == 'aiSearchFile2'){
  18031. if(this.fileSLoading) {
  18032. this.$message({
  18033. message: "请回答完毕后再次发送",
  18034. type: "warning"
  18035. });
  18036. return;
  18037. }
  18038. this.aitype = type
  18039. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  18040. #输出样例
  18041. <学科1>:关键词
  18042. - 匹配到的内容1
  18043. - 匹配到的内容2
  18044. - 匹配到的内容3
  18045. - 匹配到的内容4
  18046. - 匹配到的内容5
  18047. <学科2>:关键词
  18048. - 匹配到的内容1
  18049. - 匹配到的内容2
  18050. - 匹配到的内容3
  18051. - 匹配到的内容4
  18052. - 匹配到的内容5
  18053. ...
  18054. <学科n>:关键词
  18055. - 匹配到的内容1
  18056. - 匹配到的内容2
  18057. - 匹配到的内容3
  18058. - 匹配到的内容4
  18059. - 匹配到的内容5
  18060. `
  18061. } else if (type == 'aiRateRule'){
  18062. this.aitype = type
  18063. this.aiText = this.aiJson.aiRateRule
  18064. this.aiCallBack = [callback, index]
  18065. } else if (type == 'aiRateRuleA'){
  18066. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  18067. confirmButtonText: "生成所有",
  18068. cancelButtonText: "仅生成该任务",
  18069. distinguishCancelAndClose: true,
  18070. type: "warning",
  18071. })
  18072. .then(() => {
  18073. this.aitype = type
  18074. this.aiText = this.aiJson.aiRateRule
  18075. this.aiCallBack = [1,callback]
  18076. this.dialogVisibleAiD = true
  18077. }).catch((v) => {
  18078. console.log(v);
  18079. if (v == "cancel") {
  18080. this.aitype = type
  18081. this.aiText = this.aiJson.aiRateRule
  18082. this.aiCallBack = [2,callback]
  18083. this.dialogVisibleAiD = true
  18084. }
  18085. })
  18086. }
  18087. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  18088. this.dialogVisibleAiD = true
  18089. }
  18090. },
  18091. async aiConfirm(msg,msg2,msg3) {
  18092. let sub = []
  18093. if (this.courseTypeId.length) {
  18094. for (var i = 0; i < this.courseTypeId.length; i++) {
  18095. let _sid = this.courseTypeId[i]
  18096. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18097. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18098. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18099. }
  18100. }
  18101. }
  18102. }
  18103. let mclass = []
  18104. if (this.courseTypeId.length) {
  18105. for (var i = 0; i < this.courseTypeId.length; i++) {
  18106. let _sid = this.courseTypeId[i]
  18107. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18108. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18109. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18110. }
  18111. }
  18112. }
  18113. }
  18114. let url = []
  18115. if (this.infoData.length) {
  18116. for (var i = 0; i < this.infoData.length; i++) {
  18117. url.push(this.infoData[i].url)
  18118. }
  18119. }
  18120. if (this.aitype == "aiDetail") {
  18121. this.detailYou(msg)
  18122. } else if (this.aitype == "aiOutline") {
  18123. this.loading = true
  18124. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18125. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  18126. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  18127. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18128. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18129. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18130. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18131. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18132. if(this.languageSetting == 2){
  18133. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18134. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18135. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  18136. }
  18137. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18138. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18139. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18140. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18141. let message = `NOTICE
  18142. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18143. Output: Provide your output in json format.
  18144. Language: ${this.getLang()}
  18145. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18146. Instruction: Based on the context, follow "Format example", write content.
  18147. # Context
  18148. ## 要求
  18149. ${msg} 以及##参考资料
  18150. ## 参考资料
  18151. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18152. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18153. detail至少输出300tokens,markdown格式输出。
  18154. detail包含子教学目标、过程性成果、子评价标准
  18155. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  18156. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  18157. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  18158. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  18159. # Format example`
  18160. message = message.replaceAll('\n', ' ')
  18161. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  18162. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  18163. // detail输出不要输出成json,文本或者markdown都可以
  18164. this.aiGet2(message, () => {
  18165. this.loading = false
  18166. this.isOutline = true
  18167. })
  18168. } else if (this.aitype == "aiOutline2") {
  18169. this.loading = true
  18170. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18171. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18172. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18173. let message = `NOTICE
  18174. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18175. Language: ${this.getLang()}
  18176. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18177. Instruction: Based on the context, follow "Format example", write content.
  18178. # Context
  18179. ## 要求
  18180. ${msg} 以及##参考资料
  18181. ## 参考资料
  18182. 课程名字:${this.courseName}
  18183. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  18184. ${sub.length ? '学科:' + sub.join(",") : ''}
  18185. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18186. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18187. # Format example
  18188. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  18189. this.aiGetTask2(message, () => {
  18190. this.loading = false
  18191. this.isOutline = true
  18192. })
  18193. } else if (this.aitype == "aiOutlineDetail2") {
  18194. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  18195. } else if (this.aitype == "aiTask") {
  18196. var _text = ""
  18197. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18198. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18199. }
  18200. let message = `NOTICE
  18201. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18202. Language: ${this.getLang()}
  18203. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18204. Instruction: Based on the context, follow "Format example", write content.
  18205. # Context
  18206. ## 要求
  18207. ${msg} 为**每个教学任务分别输出**以下内容。
  18208.  
  18209. ${(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','') : ''}
  18210. ## 参考资料
  18211. 教学任务教案:${_text}
  18212. ## 格式要求
  18213. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  18214. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18215. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  18216. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18217. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18218. 出现选择题和问答题的概率提高
  18219. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  18220.  
  18221. # Format example
  18222. [{"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":"工具描述"}]}]`
  18223. this.loading = true
  18224. this.aiGet3(message, this.aiCallBack)
  18225. } else if (this.aitype == "aiTask2") {
  18226. if(this.aiCallBack[0] == 'all'){
  18227. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18228. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18229. let message = `NOTICE
  18230. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18231. Language: ${this.getLang()}
  18232. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18233. Instruction: Based on the context, follow "Format example", write content.
  18234. # Context
  18235. ## 要求
  18236. ${msg} 为教学任务分别输出以下内容。
  18237.  
  18238. ${(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','') : ''}
  18239. ## 参考资料
  18240. 教学任务教案:${_text}
  18241. ## 格式要求
  18242. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18243. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  18244. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18245. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18246. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  18247.  
  18248. # Format example
  18249. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18250. this.taskLoading[_task] = true
  18251. this.aiGet32(message, _task)
  18252. }
  18253. }else{
  18254. 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`
  18255. let message = `NOTICE
  18256. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  18257. Language: ${this.getLang()}
  18258. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18259. Instruction: Based on the context, follow "Format example", write content.
  18260. # Context
  18261. ## 要求
  18262. ${msg} 为教学任务分别输出以下内容。
  18263.  
  18264. ${(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','') : ''}
  18265. ## 参考资料
  18266. 教学任务教案:${_text}
  18267. ## 格式要求
  18268. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  18269. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  18270. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  18271. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  18272. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  18273.  
  18274. # Format example
  18275. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18276. this.taskLoading[this.aiCallBack[0]] = true
  18277. this.aiGet32(message, this.aiCallBack[0])
  18278. }
  18279. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  18280. } else if (this.aitype == "aiTask3") {
  18281. if(this.aiCallBack[0] == 'all'){
  18282. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18283. if(!this.taskGLoading[_task]){
  18284. this.taskGLoading[_task] = []
  18285. }
  18286. this.taskGLoading[_task][0] = true
  18287. // this.taskGLoading[_task][1] = true
  18288. // this.taskGLoading[_task][2] = true
  18289. // this.aiGetG323(message3, _task)
  18290. }
  18291. let ij = 0;
  18292. let _this = this
  18293. function processNext() {
  18294. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18295. if(!_this.taskGLoading[ij][0]){
  18296. ij++;
  18297. processNext();
  18298. return;
  18299. }
  18300. let message1 = `NOTICE
  18301. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18302. Language: ${_this.getLang()}
  18303. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18304. Instruction: Based on the context, follow "Format example", write content.
  18305. # Context
  18306. ## 要求
  18307. ${msg}
  18308.  
  18309. ## 参考资料
  18310. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18311. # 输出格式与要求
  18312. 任务描述(告诉学生他们需要做什么):
  18313. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  18314. # 范例
  18315. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  18316. # Format example
  18317. { "detail":"任务描述" }`
  18318. let message2 = `NOTICE
  18319. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18320. Language: ${_this.getLang()}
  18321. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18322. Instruction: Based on the context, follow "Format example", write content.
  18323. # Context
  18324. ## 要求
  18325. ${msg2}
  18326.  
  18327. ## 参考资料
  18328. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18329. # 输出格式与要求
  18330. 互动工具列表
  18331. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  18332. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  18333. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  18334. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  18335. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  18336. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  18337. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  18338. # Format example
  18339. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18340. let message3 = `NOTICE
  18341. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18342. Language: ${_this.getLang()}
  18343. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18344. Instruction: Based on the context, follow "Format example", write content.
  18345. # Context
  18346. ## 要求
  18347. ${msg3}
  18348.  
  18349. ## 参考资料
  18350. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18351. # 输出格式与要求
  18352. 核心素养:从教案中提取
  18353. 目标:从教案中提取
  18354. 评价标准:从教案中提取评价标准
  18355. # Format example
  18356. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  18357. _this.aiGetG321(message1, ij, (callback2) => {
  18358. // _this.aiGetG322(message2, ij, callback2);
  18359. callback2 ? callback2() : ''
  18360. }, () => {
  18361. // 回调函数,当前任务完成后执行
  18362. ij++;
  18363. processNext(); // 处理下一个任务
  18364. });
  18365. }
  18366. }
  18367. processNext(); // 启动处理
  18368. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  18369. }else{
  18370. let message1 = `NOTICE
  18371. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18372. Language: ${this.getLang()}
  18373. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18374. Instruction: Based on the context, follow "Format example", write content.
  18375. # Context
  18376. ## 要求
  18377. ${msg}
  18378.  
  18379. ## 参考资料
  18380. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18381. # 输出格式与要求
  18382. 任务描述(告诉学生他们需要做什么):
  18383. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  18384. # 范例
  18385. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  18386. # Format example
  18387. { "detail":"任务描述" }`
  18388. let message2 = `NOTICE
  18389. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18390. Language: ${this.getLang()}
  18391. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18392. Instruction: Based on the context, follow "Format example", write content.
  18393. # Context
  18394. ## 要求
  18395. ${msg2}
  18396.  
  18397. ## 参考资料
  18398. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18399. # 输出格式与要求
  18400. 互动工具列表
  18401. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  18402. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  18403. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  18404. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  18405. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  18406. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  18407. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  18408. # Format example
  18409. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18410. let message3 = `NOTICE
  18411. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18412. Language: ${this.getLang()}
  18413. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18414. Instruction: Based on the context, follow "Format example", write content.
  18415. # Context
  18416. ## 要求
  18417. ${msg3}
  18418.  
  18419. ## 参考资料
  18420. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18421. # 输出格式与要求
  18422. 核心素养:从教案中提取
  18423. 目标:从教案中提取
  18424. 评价标准:从教案中提取评价标准
  18425. # Format example
  18426. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  18427. if(!this.taskGLoading[this.aiCallBack[0]]){
  18428. this.taskGLoading[this.aiCallBack[0]] = []
  18429. }
  18430. this.taskGLoading[this.aiCallBack[0]][0] = true
  18431. // this.taskGLoading[this.aiCallBack[0]][1] = true
  18432. // this.taskGLoading[this.aiCallBack[0]][2] = true
  18433. this.aiGetG321(message1, this.aiCallBack[0], () => {
  18434. // this.aiGetG322(message2, this.aiCallBack[0])
  18435. this.aiCallBack[0] ? this.aiCallBack[0]() : ''
  18436. })
  18437. // this.aiGetG323(message3, this.aiCallBack[0])
  18438. }
  18439. } else if (this.aitype == "aiTaskG3") {
  18440. let message3 = `NOTICE
  18441. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18442. Language: ${this.getLang()}
  18443. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18444. Instruction: Based on the context, follow "Format example", write content.
  18445. # Context
  18446. ## 要求
  18447. ${msg3}
  18448.  
  18449. ## 参考资料
  18450. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18451. # 输出格式与要求
  18452. 核心素养:从教案中提取
  18453. 目标:从教案中提取
  18454. 评价标准:从教案中提取评价标准
  18455. # Format example
  18456. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  18457. if(!this.taskGLoading[this.aiCallBack]){
  18458. this.taskGLoading[this.aiCallBack] = []
  18459. }
  18460. this.taskGLoading[this.aiCallBack][2] = true
  18461. this.aiGetG323(message3, this.aiCallBack)
  18462. } else if (this.aitype == "aiTaskG2") {
  18463. if(this.aiCallBack == 'all'){
  18464. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  18465. if(!this.taskGLoading[_task]){
  18466. this.taskGLoading[_task] = []
  18467. }
  18468. this.taskGLoading[_task][1] = true
  18469. }
  18470. let ij = 0;
  18471. let _this = this
  18472. function processNext() {
  18473. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18474. if(!_this.taskGLoading[ij][1] || !_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3){
  18475. _this.taskGLoading[ij][1] = false
  18476. ij++;
  18477. processNext();
  18478. return;
  18479. }
  18480. let message2 = `NOTICE
  18481. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18482. Language: ${_this.getLang()}
  18483. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18484. Instruction: Based on the context, follow "Format example", write content.
  18485. # Context
  18486. ## 要求
  18487. ${msg2}
  18488.  
  18489. ## 参考资料
  18490. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18491. # 输出格式与要求
  18492. 互动工具列表
  18493. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  18494. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  18495. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  18496. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  18497. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  18498. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  18499. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  18500. # Format example
  18501. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18502. _this.aiGetG322(message2, ij, () => {
  18503. // 回调函数,当前任务完成后执行
  18504. ij++;
  18505. processNext(); // 处理下一个任务
  18506. });
  18507. }
  18508. }
  18509. processNext(); // 启动处理
  18510. }else{
  18511. let message2 = `NOTICE
  18512. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  18513. Language: ${this.getLang()}
  18514. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18515. Instruction: Based on the context, follow "Format example", write content.
  18516. # Context
  18517. ## 要求
  18518. ${msg2}
  18519.  
  18520. ## 参考资料
  18521. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18522. # 输出格式与要求
  18523. 互动工具列表
  18524. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  18525. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  18526. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  18527. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  18528. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  18529. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  18530. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  18531. # Format example
  18532. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  18533. if(!this.taskGLoading[this.aiCallBack]){
  18534. this.taskGLoading[this.aiCallBack] = []
  18535. }
  18536. // this.taskGLoading[this.aiCallBack[0]][0] = true
  18537. // this.taskGLoading[this.aiCallBack[0]][1] = true
  18538. this.taskGLoading[this.aiCallBack][1] = true
  18539. this.aiGetG322(message2, this.aiCallBack)
  18540. }
  18541. } else if (this.aitype == "aiDetail1") {
  18542. this.aiDetail(msg, this.aiIndex)
  18543. } else if (this.aitype == "aiDetail2") {
  18544. this.aiDetail2(msg, this.aiIndex)
  18545. } else if (this.aitype == "aiDetail3") {
  18546. let _index = this.aiIndex.split('-')
  18547. this.aiDetail3(msg, _index[0], _index[1])
  18548. } else if (this.aitype == "aiDetail4") {
  18549. this.aiDetail4(msg, this.aiIndex)
  18550. } else if (this.aitype == "teacherDetail") {
  18551. this.aiDetail5(msg, this.aiIndex)
  18552. } else if (this.aitype == "teacherDetail2") {
  18553. this.aiDetail52(msg, this.aiIndex)
  18554. } else if (this.aitype == "aiCpote1") {
  18555. this.aiCpote(msg, this.aiCallBack)
  18556. } else if (this.aitype == "aiCpote2") {
  18557. this.aiCpote(msg, this.aiCallBack)
  18558. } else if (this.aitype == "aiCpote3") {
  18559. this.aiCpote(msg, this.aiCallBack)
  18560. } else if (this.aitype == "aiCpote4") {
  18561. this.aiCpote(msg, this.aiCallBack)
  18562. } else if (this.aitype == "aiTeacher") {
  18563. this.loading = true
  18564. var _text = ""
  18565. for (var i = 0; i < this.dArray.length; i++) {
  18566. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  18567. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  18568. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18569. let message = ` NOTICE
  18570. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18571. Language: ${this.getLang()}
  18572. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18573. Instruction: Based on the context, follow "Format example", write content.
  18574. # Context
  18575. ## 要求
  18576. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  18577. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  18578. ${(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','') : ''}
  18579. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18580. ## Format example
  18581. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  18582. this.aiGet4(message, () => {
  18583. this.loading = false
  18584. this.isOutline2 = true
  18585. })
  18586. } else if (this.aitype == "aiTeacher2"){
  18587. this.isOutline2 = true
  18588. let _this = this
  18589. setTimeout(()=>{
  18590. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18591. const _tindex = 'task-' + i;
  18592. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  18593. _this.taskDetailLoading5.push(_tindex)
  18594. }
  18595. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  18596. _this.ttaskDetailLoading5.push(_tindex)
  18597. }
  18598. // this.aiDetail52(msg, i)
  18599. }
  18600. let ij = 0;
  18601. function processNext() {
  18602. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18603. const _tindex = 'task-' + ij;
  18604. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  18605. ij++;
  18606. processNext();
  18607. return;
  18608. }
  18609. // 处理当前任务
  18610. _this.aiDetail52(msg, ij, function () {
  18611. // 回调函数,当前任务完成后执行
  18612. ij++;
  18613. processNext(); // 处理下一个任务
  18614. });
  18615. }
  18616. }
  18617. processNext(); // 启动处理
  18618. }, 0)
  18619. } else if (this.aitype == "aiTeacher3"){
  18620. this.loading = true
  18621. let message = `NOTICE
  18622. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18623. Language: ${this.getLang()}
  18624. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18625. Instruction: Based on the context, follow "Format example", write content.
  18626. # Context
  18627. ## 要求
  18628. ${msg} 以及##参考资料
  18629. ## 参考资料
  18630. 任务簇:${this.cpote.cpote4}
  18631. # Format example
  18632. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  18633. this.aiGetTask3(message, () => {
  18634. this.loading = false
  18635. this.isOutline2 = true
  18636. })
  18637. } else if (this.aitype == "aiteacherTextDetail") {
  18638. this.aiteacherTextDetail(msg)
  18639. } else if (this.aitype == "aitargetTextDetail") {
  18640. this.aitargetTextDetail(msg)
  18641. } else if (this.aitype == "aitargetTextDetail2") {
  18642. this.aitargetTextDetail2(msg)
  18643. } else if (this.aitype == "aitargetTextDetail3") {
  18644. this.aitargetTextDetail3(msg)
  18645. } else if (this.aitype == 'aiSearchFile'){
  18646. let messages = `NOTICE
  18647. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18648. Language: ${this.getLang()}
  18649. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18650. Instruction: Based on the context, follow "Format example", write content.
  18651. ## 参考资料
  18652. 关键词:${this.courseName}
  18653. # Context
  18654. ## 要求
  18655. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  18656. # Format example
  18657. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  18658. this.fileSLoading = true
  18659. this.aiSearchFile(messages,()=>{
  18660. this.fileSLoading = false
  18661. })
  18662. } else if (this.aitype == 'aiSearchFile2'){
  18663. let messages = `${msg}
  18664. 课程名字:${this.courseName}
  18665. ${sub.length ? '学科:' + sub.join(",") : ''}
  18666. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  18667. this.fileSLoading = true
  18668. this.aiSearchFile2(messages,()=>{
  18669. this.fileSLoading = false
  18670. })
  18671. } else if (this.aitype == 'aiRateRule'){
  18672. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  18673. } else if (this.aitype == 'aiRateRuleA'){
  18674. if(this.aiCallBack[0] == 1){
  18675. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18676. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  18677. for(var k = 0; k < task.eList.length; k++){
  18678. if(!task.eList[k].rule){
  18679. this.againEva(msg, i, k)
  18680. }
  18681. }
  18682. }
  18683. }else if(this.aiCallBack[0] == 2){
  18684. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  18685. for(var k = 0; k < task.eList.length; k++){
  18686. if(!task.eList[k].rule){
  18687. this.againEva(msg, this.aiCallBack[1], k)
  18688. }
  18689. }
  18690. }
  18691. }
  18692. this.setAiJson(this.aitype, msg, msg2, msg3)
  18693. },
  18694. getLang(){
  18695. let lang = ''
  18696. if(this.languageSetting == 0){
  18697. lang = 'Chinese.'
  18698. }else if(this.languageSetting == 1){
  18699. lang = 'Traditional Chinese.'
  18700. }else if(this.languageSetting == 2){
  18701. lang = 'English.'
  18702. }
  18703. return lang
  18704. },
  18705. detailYou(message) {
  18706. this.textLoading = true
  18707. this.ttextLoading = true
  18708. let sub = []
  18709. if (this.courseTypeId.length) {
  18710. for (var i = 0; i < this.courseTypeId.length; i++) {
  18711. let _sid = this.courseTypeId[i]
  18712. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18713. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18714. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18715. }
  18716. }
  18717. }
  18718. }
  18719. let mclass = []
  18720. if (this.courseTypeId.length) {
  18721. for (var i = 0; i < this.courseTypeId.length; i++) {
  18722. let _sid = this.courseTypeId[i]
  18723. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18724. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18725. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18726. }
  18727. }
  18728. }
  18729. }
  18730. let url = []
  18731. if (this.infoData.length) {
  18732. for (var i = 0; i < this.infoData.length; i++) {
  18733. url.push(this.infoData[i].url)
  18734. }
  18735. }
  18736. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18737. // --------
  18738. // ## 补充参考资料
  18739. // 补充资料:${url.join(",")}
  18740. // 补充描述:${this.courseText2} ##补充参考资料和
  18741. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18742. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18743. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18744. let msg = `NOTICE
  18745. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  18746. Language: ${this.getLang()}
  18747. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18748. Instruction: Based on the context, follow "Format example", write content.
  18749. #Context
  18750. ## 参考资料
  18751. 课程名字:${this.courseName}
  18752. ${sub.length ? '学科:' + sub.join(",") : ''}
  18753. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18754. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  18755. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  18756. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  18757. ## 要求
  18758. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  18759. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  18760. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  18761. this.aiGet(msg)
  18762. },
  18763. setUnitJson() {
  18764. 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 }] }
  18765. this.$forceUpdate()
  18766. },
  18767. async aiGet(messages) {
  18768. let _this = this
  18769. let fileid = []
  18770. if(!this.yiKeTemplateArray.includes(this.templateid)){
  18771. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  18772. if(_this.cankaoInfoData[i].fileid){
  18773. fileid.push(_this.cankaoInfoData[i].fileid)
  18774. }else {
  18775. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  18776. if(_fileid){
  18777. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  18778. _this.$forceUpdate();
  18779. if(_fileid != 1){
  18780. fileid.push(_fileid)
  18781. }
  18782. }
  18783. }
  18784. }
  18785. if(this.mode == 1){
  18786. for (var i = 0; i < _this.infoData.length; i++) {
  18787. if(_this.infoData[i].fileid){
  18788. fileid.push(_this.infoData[i].fileid)
  18789. }else {
  18790. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18791. if(_fileid){
  18792. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18793. _this.$forceUpdate();
  18794. if(_fileid != 1){
  18795. fileid.push(_fileid)
  18796. }
  18797. }
  18798. }
  18799. }
  18800. }
  18801. } else {
  18802. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18803. fileid = [...fileid]
  18804. if (_this.infoData.length) {
  18805. for (var i = 0; i < _this.infoData.length; i++) {
  18806. if(_this.infoData[i].fileid){
  18807. fileid.push(_this.infoData[i].fileid)
  18808. }else {
  18809. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18810. if(_fileid){
  18811. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18812. _this.$forceUpdate();
  18813. if(_fileid != 1){
  18814. fileid.push(_fileid)
  18815. }
  18816. }
  18817. }
  18818. }
  18819. }
  18820. }
  18821. _this.isTextCancelToken = _this.ajax.setCancelSource();
  18822. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  18823. let _uuid = uuidv4();
  18824. // let params = JSON.stringify({
  18825. // // "model": "Chat",
  18826. // model: 'gpt-3.5-turbo',
  18827. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18828. // max_tokens: 4096,
  18829. // top_p: 1,
  18830. // frequency_penalty: 0,
  18831. // presence_penalty: 0,
  18832. // messages: [{
  18833. // content: messages,
  18834. // role: 'user'
  18835. // }],
  18836. // uid: _uuid,
  18837. // mind_map_question: "",
  18838. // })
  18839. let params = {
  18840. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18841. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18842. session_name: _uuid,
  18843. userId: _this.userid,
  18844. uid: _uuid,
  18845. file_ids: fileid.length ? [...fileid] : '',
  18846. model: 'gpt-4o-2024-08-06',
  18847. temperature: this.mode == 3 ? 0.5 : 0.1,
  18848. }
  18849. // let params = JSON.stringify({
  18850. // message: {
  18851. // anthropic_version: "bedrock-2023-05-31",
  18852. // max_tokens: 4096,
  18853. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18854. // top_p: 1,
  18855. // messages: [{
  18856. // "role": "user",
  18857. // "content": messages
  18858. // }] ,
  18859. // },
  18860. // uid: _uuid,
  18861. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18862. // });
  18863. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18864. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  18865. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18866. console.log(response);
  18867. // let data = response.data.FunctionResponse
  18868. // if (data.choices && data.choices.length && data.choices[0].message) {
  18869. // _this.courseText = data.choices[0].message.content
  18870. // }
  18871. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18872. } else {
  18873. _this.$message.warning(response.data.FunctionResponse.result);
  18874. }
  18875. _this.isTextCancelToken = null
  18876. }).catch(function (error) {
  18877. _this.textLoading = false
  18878. _this.ttextLoading = false
  18879. _this.isTextCancelToken = null
  18880. if(error && error.message != 'Request canceled by the user.'){
  18881. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  18882. }
  18883. console.log(error);
  18884. });
  18885. await _this.aiGetgetAiContent(_uuid)
  18886. },
  18887. aiGetgetAiContent(_uid) {
  18888. try {
  18889. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18890. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18891. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18892. } catch(error){
  18893. console.log('EventSource error:', error);
  18894. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  18895. this.textLoading = false
  18896. this.ttextLoading = false
  18897. this.isTextCancelToken = null
  18898. return;
  18899. }
  18900. let _allText = "";
  18901. let _mdText = "";
  18902. let _iindex = 0
  18903. this.isTextCancelSource.onmessage = _e => {
  18904. let _eData = JSON.parse(_e.data).content;
  18905. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18906. //对话已经完成
  18907. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  18908. this.isTextCancelSource.close();
  18909. this.isTextCancelSource = null;
  18910. this.courseText = _mdText;
  18911. this.textLoading = false
  18912. this.ttextLoading = false
  18913. this.courseTextB = false
  18914. this.isTextCancelToken = null
  18915. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  18916. this.saveCourse()
  18917. return;
  18918. } else {
  18919. _iindex++
  18920. //对话还在继续
  18921. let _text = "";
  18922. _text = _eData.replaceAll("'", "");
  18923. if (_allText == "") {
  18924. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18925. } else {
  18926. _allText += _text;
  18927. }
  18928. _mdText = _allText + "_";
  18929. _mdText = _mdText.replace(/\\n/g, "\n");
  18930. _mdText = _mdText.replace(/\\/g, "");
  18931. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18932. //转化返回的回复流数据
  18933. if(_iindex == 10){
  18934. this.courseText = _mdText;
  18935. _iindex = 0
  18936. }
  18937. this.textLoading = false
  18938. // 处理流数据
  18939. }
  18940. // this.$forceUpdate();
  18941. };
  18942. let _this = this
  18943. this.isTextCancelSource.onerror = function(event) {
  18944. // 处理错误,可以尝试重新连接
  18945. console.log('EventSource error:', event);
  18946. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  18947. _this.textLoading = false
  18948. _this.ttextLoading = false
  18949. _this.isTextCancelToken = null
  18950. _this.isTextCancelSource.close();
  18951. _this.isTextCancelSource = null;
  18952. };
  18953. },
  18954. numberToChinese(number) {
  18955. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  18956. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  18957. let result = '';
  18958. let num = parseInt(number, 10);
  18959. let i = 0;
  18960. while (num > 0) {
  18961. result = chineseNum[num % 10] + chineseUnit[i] + result;
  18962. num = Math.floor(num / 10);
  18963. i++;
  18964. }
  18965. // 去除连续的零,保留一个零
  18966. result = result.replace(/零+/g, '零');
  18967. return result;
  18968. },
  18969. async aiGet2(messages, callback) {
  18970. let _this = this
  18971. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18972. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  18973. if (_this.infoData.length) {
  18974. for (var i = 0; i < _this.infoData.length; i++) {
  18975. if(_this.infoData[i].fileid){
  18976. fileid.push(_this.infoData[i].fileid)
  18977. }else {
  18978. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18979. if(_fileid){
  18980. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18981. _this.$forceUpdate();
  18982. if(_fileid != 1){
  18983. fileid.push(_fileid)
  18984. }
  18985. }
  18986. }
  18987. }
  18988. }
  18989. console.log('fileid=========',fileid)
  18990. // let params = JSON.stringify({
  18991. // // "model": "Chat",
  18992. // model: 'gpt-3.5-turbo',
  18993. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18994. // max_tokens: 4096,
  18995. // top_p: 1,
  18996. // frequency_penalty: 0,
  18997. // presence_penalty: 0,
  18998. // messages: [{
  18999. // content: messages,
  19000. // role: 'user'
  19001. // }],
  19002. // stream: false,
  19003. // uid: this.userid,
  19004. // mind_map_question: "",
  19005. // })
  19006. // // let params = JSON.stringify({
  19007. // // message: {
  19008. // // anthropic_version: "bedrock-2023-05-31",
  19009. // // max_tokens: 4096,
  19010. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19011. // // top_p: 1,
  19012. // // messages: [{
  19013. // // content: messages,
  19014. // // role: 'user'
  19015. // // }], //
  19016. // // },
  19017. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19018. // // });
  19019. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19020. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19021. // console.log(response);
  19022. // let data = response.data.FunctionResponse
  19023. // if (data.choices && data.choices.length && data.choices[0].message) {
  19024. // console.log(data.choices[0].message.content);
  19025. // let dArray = JSON.parse(data.choices[0].message.content)
  19026. // _this.dArray = dArray
  19027. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19028. // for (var i = 0; i < dArray.length; i++) {
  19029. // let _task = dArray[i]
  19030. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19031. // task: _task.task,
  19032. // taskDetail: "",
  19033. // taskDetail2: _task.detail,
  19034. // taskDetail3: "",
  19035. // chapterData: [],
  19036. // toolText: "",
  19037. // toolChoose: [
  19038. // {
  19039. // tool: [],
  19040. // toolDetail: "",
  19041. // toolType: 0,
  19042. // askCount: 1,
  19043. // askTitle: "",
  19044. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19045. // },
  19046. // ],
  19047. // isShowTools: false,
  19048. // askCount: 1,
  19049. // isFold: 0,
  19050. // askTitle: "",
  19051. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19052. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19053. // homeworkList: [],
  19054. // })
  19055. // }
  19056. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19057. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19058. // _this.$forceUpdate();
  19059. // }
  19060. // // if (data.result) {
  19061. // // console.log(data.result);
  19062. // // let dArray = JSON.parse(data.result)
  19063. // // _this.dArray = dArray
  19064. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19065. // // for (var i = 0; i < dArray.length; i++) {
  19066. // // let _task = dArray[i]
  19067. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19068. // // task: _task.task,
  19069. // // taskDetail: "",
  19070. // // taskDetail2: _task.detail,
  19071. // // taskDetail3: "",
  19072. // // chapterData: [],
  19073. // // toolText: "",
  19074. // // toolChoose: [
  19075. // // {
  19076. // // tool: [],
  19077. // // toolDetail: "",
  19078. // // toolType: 0,
  19079. // // askCount: 1,
  19080. // // askTitle: "",
  19081. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19082. // // },
  19083. // // ],
  19084. // // isShowTools: false,
  19085. // // askCount: 1,
  19086. // // isFold: 1,
  19087. // // askTitle: "",
  19088. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19089. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19090. // // homeworkList: [],
  19091. // // })
  19092. // // }
  19093. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19094. // // _this.$forceUpdate();
  19095. // // }
  19096. // callback ? callback() : ''
  19097. // }).catch(function (error) {
  19098. // _this.loading = false
  19099. // console.log(error);
  19100. // });
  19101. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19102. let parm = {
  19103. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  19104. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  19105. session_name: uuidv4(),
  19106. userId: this.userid,
  19107. file_ids: fileid.length ? [...fileid] : '',
  19108. model: 'gpt-4o-2024-08-06',
  19109. temperature: this.mode == 3 ? 0.5 : 0.1,
  19110. }
  19111. this.ajax
  19112. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19113. .then((response) => {
  19114. console.log(response);
  19115. let data = response.data.FunctionResponse
  19116. if (data.message) {
  19117. console.log(data.message);
  19118. let dArray = {}
  19119. try {
  19120. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19121. } catch (error) {
  19122. console.log("error_________________" + error);
  19123. try {
  19124. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19125. let match = data.message.match(regex);
  19126. dArray = JSON.parse(match[0]);
  19127. // var message = data.message;
  19128. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19129. // var jsonEnd = message.indexOf("```", jsonStart);
  19130. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19131. // dArray = JSON.parse(jsonString);
  19132. } catch (error) {
  19133. try {
  19134. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19135. let match = data.message.match(regex);
  19136. // eval("var aaa = " + match[0])
  19137. if(match && match[0]){
  19138. dArray = JSON.parse(match[0].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19139. }else {
  19140. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  19141. }
  19142. } catch (error) {
  19143. _this.$message.error('返回json格式不正确')
  19144. // _this.aiGet2(messages, callback);
  19145. console.log("error_________________" + error);
  19146. }
  19147. console.log("error_________________" + error);
  19148. }
  19149. }
  19150. _this.dArray = dArray
  19151. console.log(dArray)
  19152. if(_this.panOutline() > 0){
  19153. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19154. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19155. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19156. }
  19157. for (var i = 0; i < dArray.length; i++) {
  19158. let _task = dArray[i]
  19159. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19160. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  19161. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  19162. }else {
  19163. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19164. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19165. taskDetail: "",
  19166. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19167. taskDetail3: "",
  19168. chapterData: [],
  19169. toolText: "",
  19170. toolChoose: [
  19171. {
  19172. tool: [],
  19173. toolDetail: "",
  19174. toolType: 0,
  19175. askCount: 1,
  19176. askTitle: "",
  19177. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19178. },
  19179. ],
  19180. isShowTools: false,
  19181. askCount: 1,
  19182. isFold: 0,
  19183. askTitle: "",
  19184. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19185. checkJson: [{ checkCount: [], checkPerent: [] }],
  19186. homeworkList: [],
  19187. })
  19188. }
  19189. }
  19190. }else {
  19191. _this.unitJson[0].chapterInfo[0].taskJson = []
  19192. for (var i = 0; i < dArray.length; i++) {
  19193. let _task = dArray[i]
  19194. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19195. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  19196. taskDetail: "",
  19197. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  19198. taskDetail3: "",
  19199. chapterData: [],
  19200. toolText: "",
  19201. toolChoose: [
  19202. {
  19203. tool: [],
  19204. toolDetail: "",
  19205. toolType: 0,
  19206. askCount: 1,
  19207. askTitle: "",
  19208. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19209. },
  19210. ],
  19211. isShowTools: false,
  19212. askCount: 1,
  19213. isFold: 0,
  19214. askTitle: "",
  19215. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19216. checkJson: [{ checkCount: [], checkPerent: [] }],
  19217. homeworkList: [],
  19218. })
  19219. }
  19220. }
  19221. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19222. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19223. _this.$forceUpdate();
  19224. _this.saveCourse()
  19225. }
  19226. callback ? callback() : ''
  19227. _this.isOutlineCancelToken = null
  19228. })
  19229. .catch((error) => {
  19230. _this.loading = false
  19231. _this.isOutlineCancelToken = null
  19232. console.log(error);
  19233. });
  19234. },
  19235. cancelAjax(type, index){
  19236. if (this.isOutlineCancelToken && type == 'outline') {
  19237. this.$message.success("已经成功停止生成课程大纲")
  19238. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  19239. this.isOutlineCancelToken = null;
  19240. this.loading = false
  19241. }
  19242. if (this.isFileCancelToken && type == 'file') {
  19243. this.$message.success("已经成功停止智能生成检索资料")
  19244. this.isFileCancelToken.cancel('Request canceled by the user.');
  19245. this.isFileCancelToken = null;
  19246. this.fileSLoading = false
  19247. }
  19248. if(this.isTextCancelToken && type == 'text'){
  19249. this.$message.success("已经成功停止AI优化")
  19250. this.isTextCancelToken.cancel('Request canceled by the user.');
  19251. this.isTextCancelToken = null;
  19252. this.textLoading = false
  19253. this.ttextLoading = true
  19254. if(this.isTextCancelSource){
  19255. this.isTextCancelSource.close()
  19256. this.isTextCancelSource = null
  19257. }
  19258. }
  19259. if(this.isTargetCancelToken2 && type == 'target2'){
  19260. this.$message.success("已经成功停止生成目标")
  19261. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  19262. this.isTargetCancelToken2 = null;
  19263. this.targetTextLoading2 = false
  19264. this.ttargetTextLoading2 = false
  19265. if(this.isTargetCancelSource2){
  19266. this.isTargetCancelSource2.close()
  19267. this.isTargetCancelSource2 = null
  19268. }
  19269. this.$nextTick(() => {
  19270. const targetDiv = this.$refs.aitargetTextDetail3;
  19271. if (targetDiv) {
  19272. targetDiv.scrollIntoView();
  19273. }
  19274. });
  19275. }
  19276. if(this.isTargetCancelToken1 && type == 'target1'){
  19277. this.$message.success("已经成功停止生成目标")
  19278. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  19279. this.isTargetCancelToken1 = null;
  19280. this.targetTextLoading = false
  19281. this.ttargetTextLoading = false
  19282. if(this.isTargetCancelSource1){
  19283. this.isTargetCancelSource1.close()
  19284. this.isTargetCancelSource1 = null
  19285. }
  19286. }
  19287. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  19288. this.$message.success("已经成功停止提取摘要")
  19289. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  19290. this.isTeacherTextCancelToken = null;
  19291. this.teacherTextLoading = false
  19292. this.tteacherTextLoading = false
  19293. if(this.isTeacherTextCancelSource){
  19294. this.isTeacherTextCancelSource.close()
  19295. this.isTeacherTextCancelSource = null
  19296. }
  19297. }
  19298. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  19299. this.$message.success("已经成功停止生成教案")
  19300. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  19301. this.isTeacherTaskCancelToken = null;
  19302. this.loading = false
  19303. }
  19304. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  19305. this.$message.success("已经成功停止生成大纲")
  19306. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  19307. this.isOutlineTaskCancelToken[index] = null;
  19308. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  19309. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  19310. if(this.isOutlineTaskCancelSource[index]){
  19311. this.isOutlineTaskCancelSource[index].close()
  19312. this.isOutlineTaskCancelSource[index] = null
  19313. }
  19314. }
  19315. if(type == 'teacherDetail2'){
  19316. this.$message.success("已经成功停止生成教案")
  19317. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  19318. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  19319. this.isTeacherTaskCancelToken2[index] = null;
  19320. }
  19321. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  19322. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  19323. }
  19324. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  19325. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  19326. }
  19327. if(this.isTeacherTaskCancelSource[index]){
  19328. this.isTeacherTaskCancelSource[index].close()
  19329. this.isTeacherTaskCancelSource[index] = null
  19330. }
  19331. }
  19332. if(type == 'aiTaskGL1'){
  19333. this.$message.success("已经成功停止生成任务概述")
  19334. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  19335. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  19336. this.taskCancelToken1[index] = null;
  19337. }
  19338. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  19339. this.taskGLoading[index][0] = false
  19340. }
  19341. setTimeout(() => {
  19342. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  19343. this.cancelAjax('aiTaskGL2', index)
  19344. }
  19345. }, 1000)
  19346. this.$forceUpdate()
  19347. }
  19348. if(type == 'aiTaskGL2'){
  19349. this.$message.success("已经成功停止生成任务工具")
  19350. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  19351. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  19352. this.taskCancelToken2[index] = null;
  19353. }
  19354. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  19355. this.taskGLoading[index][1] = false
  19356. }
  19357. this.$forceUpdate()
  19358. }
  19359. if(type == 'taskAn'){
  19360. this.$message.success("已经成功停止生成任务概述")
  19361. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  19362. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  19363. this.taskAnCancelToken[index] = null;
  19364. }
  19365. if(this.taskAnLoading[index]){
  19366. this.taskAnLoading[index] = false
  19367. }
  19368. this.$forceUpdate()
  19369. }
  19370. if(type == 'findMatchingContents'){
  19371. this.$message.success("已经成功停止检索资料")
  19372. if(this.isfindMatchingContents){
  19373. this.isfindMatchingContents.cancel('Request canceled by the user.');
  19374. this.isfindMatchingContents = null;
  19375. }
  19376. if(this.knowInfoDataLoading){
  19377. this.knowInfoDataLoading = false
  19378. }
  19379. if(this.findMatchingContentsPage > 1){
  19380. this.findMatchingContentsPage --
  19381. }
  19382. this.$forceUpdate()
  19383. }
  19384. },
  19385. async aiGetTask2(messages, callback) {
  19386. let _this = this
  19387. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19388. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19389. if (_this.infoData.length) {
  19390. for (var i = 0; i < _this.infoData.length; i++) {
  19391. if(_this.infoData[i].fileid){
  19392. fileid.push(_this.infoData[i].fileid)
  19393. }else {
  19394. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19395. if(_fileid){
  19396. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19397. _this.$forceUpdate();
  19398. if(_fileid != 1){
  19399. fileid.push(_fileid)
  19400. }
  19401. }
  19402. }
  19403. }
  19404. }
  19405. console.log('fileid=========',fileid)
  19406. // let params = JSON.stringify({
  19407. // // "model": "Chat",
  19408. // model: 'gpt-3.5-turbo',
  19409. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19410. // max_tokens: 4096,
  19411. // top_p: 1,
  19412. // frequency_penalty: 0,
  19413. // presence_penalty: 0,
  19414. // messages: [{
  19415. // content: messages,
  19416. // role: 'user'
  19417. // }],
  19418. // stream: false,
  19419. // uid: this.userid,
  19420. // mind_map_question: "",
  19421. // })
  19422. // // let params = JSON.stringify({
  19423. // // message: {
  19424. // // anthropic_version: "bedrock-2023-05-31",
  19425. // // max_tokens: 4096,
  19426. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19427. // // top_p: 1,
  19428. // // messages: [{
  19429. // // content: messages,
  19430. // // role: 'user'
  19431. // // }], //
  19432. // // },
  19433. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19434. // // });
  19435. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19436. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19437. // console.log(response);
  19438. // let data = response.data.FunctionResponse
  19439. // if (data.choices && data.choices.length && data.choices[0].message) {
  19440. // console.log(data.choices[0].message.content);
  19441. // let dArray = JSON.parse(data.choices[0].message.content)
  19442. // _this.dArray = dArray
  19443. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19444. // for (var i = 0; i < dArray.length; i++) {
  19445. // let _task = dArray[i]
  19446. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19447. // task: _task.task,
  19448. // taskDetail: "",
  19449. // taskDetail2: _task.detail,
  19450. // taskDetail3: "",
  19451. // chapterData: [],
  19452. // toolText: "",
  19453. // toolChoose: [
  19454. // {
  19455. // tool: [],
  19456. // toolDetail: "",
  19457. // toolType: 0,
  19458. // askCount: 1,
  19459. // askTitle: "",
  19460. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19461. // },
  19462. // ],
  19463. // isShowTools: false,
  19464. // askCount: 1,
  19465. // isFold: 0,
  19466. // askTitle: "",
  19467. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19468. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19469. // homeworkList: [],
  19470. // })
  19471. // }
  19472. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19473. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19474. // _this.$forceUpdate();
  19475. // }
  19476. // // if (data.result) {
  19477. // // console.log(data.result);
  19478. // // let dArray = JSON.parse(data.result)
  19479. // // _this.dArray = dArray
  19480. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19481. // // for (var i = 0; i < dArray.length; i++) {
  19482. // // let _task = dArray[i]
  19483. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19484. // // task: _task.task,
  19485. // // taskDetail: "",
  19486. // // taskDetail2: _task.detail,
  19487. // // taskDetail3: "",
  19488. // // chapterData: [],
  19489. // // toolText: "",
  19490. // // toolChoose: [
  19491. // // {
  19492. // // tool: [],
  19493. // // toolDetail: "",
  19494. // // toolType: 0,
  19495. // // askCount: 1,
  19496. // // askTitle: "",
  19497. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19498. // // },
  19499. // // ],
  19500. // // isShowTools: false,
  19501. // // askCount: 1,
  19502. // // isFold: 1,
  19503. // // askTitle: "",
  19504. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19505. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19506. // // homeworkList: [],
  19507. // // })
  19508. // // }
  19509. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19510. // // _this.$forceUpdate();
  19511. // // }
  19512. // callback ? callback() : ''
  19513. // }).catch(function (error) {
  19514. // _this.loading = false
  19515. // console.log(error);
  19516. // });
  19517. this.isOutlineCancelToken = this.ajax.setCancelSource();
  19518. let parm = {
  19519. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19520. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19521. session_name: uuidv4(),
  19522. userId: this.userid,
  19523. file_ids: fileid.length ? [...fileid] : '',
  19524. model: 'gpt-4o-2024-08-06',
  19525. temperature: this.mode == 3 ? 0.5 : 0.1,
  19526. }
  19527. this.ajax
  19528. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  19529. .then((response) => {
  19530. console.log(response);
  19531. let data = response.data.FunctionResponse
  19532. if (data.message) {
  19533. console.log(data.message);
  19534. let dArray = {}
  19535. try {
  19536. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19537. } catch (error) {
  19538. console.log("error_________________" + error);
  19539. try {
  19540. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19541. let match = data.message.match(regex);
  19542. dArray = JSON.parse(match[0]);
  19543. // var message = data.message;
  19544. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19545. // var jsonEnd = message.indexOf("```", jsonStart);
  19546. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19547. // dArray = JSON.parse(jsonString);
  19548. } catch (error) {
  19549. try {
  19550. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19551. let match = data.message.match(regex);
  19552. // eval("var aaa = " + match[0])
  19553. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19554. } catch (error) {
  19555. console.log("error_________________" + error);
  19556. }
  19557. console.log("error_________________" + error);
  19558. }
  19559. }
  19560. _this.dArray = dArray
  19561. if(_this.panOutline() > 0){
  19562. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19563. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19564. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  19565. }
  19566. for (var i = 0; i < dArray.length; i++) {
  19567. let _task = dArray[i]
  19568. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19569. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  19570. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  19571. }else {
  19572. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19573. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19574. taskDetail: "",
  19575. taskDetail2: "",
  19576. taskDetail3: "",
  19577. chapterData: [],
  19578. toolText: "",
  19579. toolChoose: [
  19580. {
  19581. tool: [],
  19582. toolDetail: "",
  19583. toolType: 0,
  19584. askCount: 1,
  19585. askTitle: "",
  19586. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19587. },
  19588. ],
  19589. isShowTools: false,
  19590. askCount: 1,
  19591. isFold: 0,
  19592. askTitle: "",
  19593. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19594. checkJson: [{ checkCount: [], checkPerent: [] }],
  19595. homeworkList: [],
  19596. })
  19597. }
  19598. }
  19599. }else {
  19600. _this.unitJson[0].chapterInfo[0].taskJson = []
  19601. for (var i = 0; i < dArray.length; i++) {
  19602. let _task = dArray[i]
  19603. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19604. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19605. taskDetail: "",
  19606. taskDetail2: "",
  19607. taskDetail3: "",
  19608. chapterData: [],
  19609. toolText: "",
  19610. toolChoose: [
  19611. {
  19612. tool: [],
  19613. toolDetail: "",
  19614. toolType: 0,
  19615. askCount: 1,
  19616. askTitle: "",
  19617. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19618. },
  19619. ],
  19620. isShowTools: false,
  19621. askCount: 1,
  19622. isFold: 0,
  19623. askTitle: "",
  19624. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19625. checkJson: [{ checkCount: [], checkPerent: [] }],
  19626. homeworkList: [],
  19627. })
  19628. }
  19629. }
  19630. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19631. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19632. _this.$forceUpdate();
  19633. _this.saveCourse()
  19634. setTimeout(()=>{
  19635. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19636. this.aiOutlineDetail('', i)
  19637. }
  19638. }, 0)
  19639. }
  19640. callback ? callback() : ''
  19641. _this.isOutlineCancelToken = null
  19642. })
  19643. .catch((error) => {
  19644. _this.loading = false
  19645. _this.isOutlineCancelToken = null
  19646. console.log(error);
  19647. });
  19648. },
  19649. async aiGetTask3(messages, callback) {
  19650. let _this = this
  19651. // let params = JSON.stringify({
  19652. // // "model": "Chat",
  19653. // model: 'gpt-3.5-turbo',
  19654. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19655. // max_tokens: 4096,
  19656. // top_p: 1,
  19657. // frequency_penalty: 0,
  19658. // presence_penalty: 0,
  19659. // messages: [{
  19660. // content: messages,
  19661. // role: 'user'
  19662. // }],
  19663. // stream: false,
  19664. // uid: this.userid,
  19665. // mind_map_question: "",
  19666. // })
  19667. // // let params = JSON.stringify({
  19668. // // message: {
  19669. // // anthropic_version: "bedrock-2023-05-31",
  19670. // // max_tokens: 4096,
  19671. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19672. // // top_p: 1,
  19673. // // messages: [{
  19674. // // content: messages,
  19675. // // role: 'user'
  19676. // // }], //
  19677. // // },
  19678. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19679. // // });
  19680. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19681. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19682. // console.log(response);
  19683. // let data = response.data.FunctionResponse
  19684. // if (data.choices && data.choices.length && data.choices[0].message) {
  19685. // console.log(data.choices[0].message.content);
  19686. // let dArray = JSON.parse(data.choices[0].message.content)
  19687. // _this.dArray = dArray
  19688. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19689. // for (var i = 0; i < dArray.length; i++) {
  19690. // let _task = dArray[i]
  19691. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19692. // task: _task.task,
  19693. // taskDetail: "",
  19694. // taskDetail2: _task.detail,
  19695. // taskDetail3: "",
  19696. // chapterData: [],
  19697. // toolText: "",
  19698. // toolChoose: [
  19699. // {
  19700. // tool: [],
  19701. // toolDetail: "",
  19702. // toolType: 0,
  19703. // askCount: 1,
  19704. // askTitle: "",
  19705. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19706. // },
  19707. // ],
  19708. // isShowTools: false,
  19709. // askCount: 1,
  19710. // isFold: 0,
  19711. // askTitle: "",
  19712. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19713. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19714. // homeworkList: [],
  19715. // })
  19716. // }
  19717. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19718. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19719. // _this.$forceUpdate();
  19720. // }
  19721. // // if (data.result) {
  19722. // // console.log(data.result);
  19723. // // let dArray = JSON.parse(data.result)
  19724. // // _this.dArray = dArray
  19725. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19726. // // for (var i = 0; i < dArray.length; i++) {
  19727. // // let _task = dArray[i]
  19728. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19729. // // task: _task.task,
  19730. // // taskDetail: "",
  19731. // // taskDetail2: _task.detail,
  19732. // // taskDetail3: "",
  19733. // // chapterData: [],
  19734. // // toolText: "",
  19735. // // toolChoose: [
  19736. // // {
  19737. // // tool: [],
  19738. // // toolDetail: "",
  19739. // // toolType: 0,
  19740. // // askCount: 1,
  19741. // // askTitle: "",
  19742. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19743. // // },
  19744. // // ],
  19745. // // isShowTools: false,
  19746. // // askCount: 1,
  19747. // // isFold: 1,
  19748. // // askTitle: "",
  19749. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19750. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19751. // // homeworkList: [],
  19752. // // })
  19753. // // }
  19754. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19755. // // _this.$forceUpdate();
  19756. // // }
  19757. // callback ? callback() : ''
  19758. // }).catch(function (error) {
  19759. // _this.loading = false
  19760. // console.log(error);
  19761. // });
  19762. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  19763. let parm = {
  19764. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19765. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19766. session_name: uuidv4(),
  19767. userId: this.userid,
  19768. file_ids: '',
  19769. model: 'gpt-4o-2024-08-06',
  19770. temperature: this.mode == 3 ? 0.5 : 0.1,
  19771. }
  19772. this.ajax
  19773. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  19774. .then((response) => {
  19775. console.log(response);
  19776. let data = response.data.FunctionResponse
  19777. if (data.message) {
  19778. console.log(data.message);
  19779. let dArray = {}
  19780. try {
  19781. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19782. } catch (error) {
  19783. console.log("error_________________" + error);
  19784. try {
  19785. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19786. let match = data.message.match(regex);
  19787. dArray = JSON.parse(match[0]);
  19788. // var message = data.message;
  19789. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19790. // var jsonEnd = message.indexOf("```", jsonStart);
  19791. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19792. // dArray = JSON.parse(jsonString);
  19793. } catch (error) {
  19794. try {
  19795. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19796. let match = data.message.match(regex);
  19797. // eval("var aaa = " + match[0])
  19798. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19799. } catch (error) {
  19800. console.log("error_________________" + error);
  19801. }
  19802. console.log("error_________________" + error);
  19803. }
  19804. }
  19805. _this.dArray = dArray
  19806. if(_this.panOutline() > 0){
  19807. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19808. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19809. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  19810. }
  19811. for (var i = 0; i < dArray.length; i++) {
  19812. let _task = dArray[i]
  19813. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19814. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  19815. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  19816. }else {
  19817. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19818. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19819. taskDetail: "",
  19820. taskDetail2: "",
  19821. taskDetail3: "",
  19822. chapterData: [],
  19823. toolText: "",
  19824. toolChoose: [
  19825. {
  19826. tool: [],
  19827. toolDetail: "",
  19828. toolType: 0,
  19829. askCount: 1,
  19830. askTitle: "",
  19831. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19832. },
  19833. ],
  19834. isShowTools: false,
  19835. askCount: 1,
  19836. isFold: 0,
  19837. askTitle: "",
  19838. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19839. checkJson: [{ checkCount: [], checkPerent: [] }],
  19840. homeworkList: [],
  19841. })
  19842. }
  19843. }
  19844. }else {
  19845. _this.unitJson[0].chapterInfo[0].taskJson = []
  19846. for (var i = 0; i < dArray.length; i++) {
  19847. let _task = dArray[i]
  19848. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19849. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19850. taskDetail: "",
  19851. taskDetail2: "",
  19852. taskDetail3: "",
  19853. chapterData: [],
  19854. toolText: "",
  19855. toolChoose: [
  19856. {
  19857. tool: [],
  19858. toolDetail: "",
  19859. toolType: 0,
  19860. askCount: 1,
  19861. askTitle: "",
  19862. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19863. },
  19864. ],
  19865. isShowTools: false,
  19866. askCount: 1,
  19867. isFold: 0,
  19868. askTitle: "",
  19869. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19870. checkJson: [{ checkCount: [], checkPerent: [] }],
  19871. homeworkList: [],
  19872. })
  19873. }
  19874. }
  19875. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19876. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19877. _this.$forceUpdate();
  19878. _this.saveCourse()
  19879. // setTimeout(()=>{
  19880. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19881. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  19882. // }
  19883. // }, 0)
  19884. setTimeout(()=>{
  19885. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19886. const _tindex = 'task-' + i;
  19887. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19888. _this.taskDetailLoading5.push(_tindex)
  19889. }
  19890. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  19891. _this.ttaskDetailLoading5.push(_tindex)
  19892. }
  19893. }
  19894. let ij = 0;
  19895. function processNext() {
  19896. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  19897. const _tindex = 'task-' + ij;
  19898. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  19899. ij++;
  19900. processNext();
  19901. return;
  19902. }
  19903. // 处理当前任务
  19904. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  19905. // 回调函数,当前任务完成后执行
  19906. ij++;
  19907. processNext(); // 处理下一个任务
  19908. });
  19909. }
  19910. }
  19911. processNext(); // 启动处理
  19912. }, 0)
  19913. }
  19914. callback ? callback() : ''
  19915. _this.isTeacherTaskCancelToken = null
  19916. })
  19917. .catch((error) => {
  19918. _this.loading = false
  19919. _this.isTeacherTaskCancelToken = null
  19920. console.log(error);
  19921. });
  19922. },
  19923. async aiGet3(messages, callback) {
  19924. let _this = this
  19925. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19926. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19927. if (_this.infoData.length) {
  19928. for (var i = 0; i < _this.infoData.length; i++) {
  19929. if(_this.infoData[i].fileid){
  19930. fileid.push(_this.infoData[i].fileid)
  19931. }else {
  19932. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19933. if(_fileid){
  19934. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19935. _this.$forceUpdate();
  19936. if(_fileid != 1){
  19937. fileid.push(_fileid)
  19938. }
  19939. }
  19940. }
  19941. }
  19942. }
  19943. // let params = JSON.stringify({
  19944. // // "model": "Chat",
  19945. // model: 'gpt-3.5-turbo',
  19946. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19947. // max_tokens: 4096,
  19948. // top_p: 1,
  19949. // frequency_penalty: 0,
  19950. // presence_penalty: 0,
  19951. // messages: [{
  19952. // content: messages,
  19953. // role: 'user'
  19954. // }],
  19955. // stream: false,
  19956. // uid: this.userid,
  19957. // mind_map_question: "",
  19958. // })
  19959. // // let params = JSON.stringify({
  19960. // // message: {
  19961. // // anthropic_version: "bedrock-2023-05-31",
  19962. // // max_tokens: 4096,
  19963. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19964. // // top_p: 1,
  19965. // // messages: [{
  19966. // // content: messages,
  19967. // // role: 'user'
  19968. // // }], //
  19969. // // },
  19970. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19971. // // });
  19972. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19973. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19974. // console.log(response);
  19975. // let data = response.data.FunctionResponse
  19976. // if (data.choices && data.choices.length && data.choices[0].message) {
  19977. // console.log(data.choices[0].message.content);
  19978. // let tArray = JSON.parse(data.choices[0].message.content)
  19979. // // _this.unitJson[0].chapterInfo[0].task = []
  19980. // let toolsJson = {
  19981. // "电子白板": { tool: 1, type: 1 },
  19982. // "文档": { tool: 52, type: 1 },
  19983. // "思维导图": { tool: 3, type: 1 },
  19984. // "表格": { tool: 48, type: 1 },
  19985. // "作业提交": { tool: 16, type: 2 }
  19986. // }
  19987. // for (var i = 0; i < tArray.length; i++) {
  19988. // let _task = tArray[i]
  19989. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19990. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19991. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19992. // if (_task.toolChoose.length) {
  19993. // for (var j = 0; j < _task.toolChoose.length; j++) {
  19994. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19995. // {
  19996. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  19997. // toolDetail: _task.toolChoose[j].detail,
  19998. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  19999. // askCount: 1,
  20000. // askTitle: "",
  20001. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20002. // },
  20003. // )
  20004. // }
  20005. // } else {
  20006. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20007. // {
  20008. // tool: [],
  20009. // toolDetail: "",
  20010. // toolType: 0,
  20011. // askCount: 1,
  20012. // askTitle: "",
  20013. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20014. // },
  20015. // )
  20016. // }
  20017. // }
  20018. // // if (_this.infoData.length) {
  20019. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20020. // // }
  20021. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20022. // _this.$forceUpdate();
  20023. // }
  20024. // // if (data.result) {
  20025. // // console.log(data.result);
  20026. // // let tArray = JSON.parse(data.result)
  20027. // // // _this.unitJson[0].chapterInfo[0].task = []
  20028. // // let toolsJson = {
  20029. // // "电子白板": { tool: 1, type: 1 },
  20030. // // "文档": { tool: 52, type: 1 },
  20031. // // "思维导图": { tool: 3, type: 1 },
  20032. // // "表格": { tool: 48, type: 1 },
  20033. // // "作业提交": { tool: 16, type: 2 }
  20034. // // }
  20035. // // for (var i = 0; i < tArray.length; i++) {
  20036. // // let _task = tArray[i]
  20037. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20038. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20039. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20040. // // if (_task.toolChoose.length) {
  20041. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20042. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20043. // // {
  20044. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20045. // // toolDetail: _task.toolChoose[j].detail,
  20046. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20047. // // askCount: 1,
  20048. // // askTitle: "",
  20049. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20050. // // },
  20051. // // )
  20052. // // }
  20053. // // } else {
  20054. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20055. // // {
  20056. // // tool: [],
  20057. // // toolDetail: "",
  20058. // // toolType: 0,
  20059. // // askCount: 1,
  20060. // // askTitle: "",
  20061. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20062. // // },
  20063. // // )
  20064. // // }
  20065. // // }
  20066. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20067. // // _this.$forceUpdate();
  20068. // // }
  20069. // callback ? callback() : ''
  20070. // }).catch(function (error) {
  20071. // _this.loading = false
  20072. // console.log(error);
  20073. // });
  20074. let parm = {
  20075. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20076. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20077. session_name: uuidv4(),
  20078. userId: this.userid,
  20079. file_ids: fileid.length ? [...fileid] : '',
  20080. model: 'gpt-4o-2024-08-06',
  20081. temperature: this.mode == 3 ? 0.5 : 0.1,
  20082. }
  20083. this.ajax
  20084. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20085. .then(async (response) => {
  20086. console.log(response);
  20087. let data = response.data.FunctionResponse
  20088. if (data.message) {
  20089. console.log(data.message);
  20090. let tArray = {}
  20091. try {
  20092. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20093. } catch (error) {
  20094. console.log("error_________________" + error);
  20095. try {
  20096. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20097. let match = data.message.match(regex);
  20098. tArray = JSON.parse(match[0]);
  20099. // var message = data.message;
  20100. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20101. // var jsonEnd = message.indexOf("```", jsonStart);
  20102. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20103. // tArray = JSON.parse(jsonString);
  20104. } catch (error) {
  20105. try {
  20106. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20107. let match = data.message.match(regex);
  20108. // eval("var aaa = " + match[0])
  20109. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20110. } catch (error) {
  20111. console.log("error_________________" + error);
  20112. }
  20113. console.log("error_________________" + error);
  20114. }
  20115. }
  20116. let toolsJson = {
  20117. "电子白板": { tool: 1, type: 1 },
  20118. "文档": { tool: 52, type: 1 },
  20119. "思维导图": { tool: 3, type: 1 },
  20120. "表格": { tool: 48, type: 1 },
  20121. "作业提交": { tool: 16, type: 2 },
  20122. "问答": { tool: 15, type: 2 },
  20123. "选择题": { tool: 45, type: 2 },
  20124. }
  20125. // answerQ:"sssssssssssssss"
  20126. for (var i = 0; i < tArray.length; i++) {
  20127. let _task = tArray[i]
  20128. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20129. _task.elist = _task.elist.filter(el=>{
  20130. el.isai = "1"
  20131. return el
  20132. })
  20133. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20134. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20135. if (_task.toolChoose.length) {
  20136. for (var j = 0; j < _task.toolChoose.length; j++) {
  20137. let _json = {
  20138. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  20139. toolDetail: _task.toolChoose[j].detail,
  20140. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20141. askCount: 1,
  20142. askTitle: "",
  20143. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20144. }
  20145. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  20146. let answerQ = await _this.aiCreateQuestion(15, i)
  20147. _json.answerQ = answerQ.answerQ
  20148. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  20149. let testJson = await _this.aiCreateQuestion(45, i)
  20150. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20151. }
  20152. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  20153. }
  20154. } else {
  20155. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20156. {
  20157. tool: [],
  20158. toolDetail: "",
  20159. toolType: 0,
  20160. askCount: 1,
  20161. askTitle: "",
  20162. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20163. },
  20164. )
  20165. }
  20166. }
  20167. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20168. _this.$forceUpdate();
  20169. _this.createTeacherAn();
  20170. }
  20171. callback ? callback() : ''
  20172. })
  20173. .catch((error) => {
  20174. _this.loading = false
  20175. console.log(error);
  20176. });
  20177. },
  20178. async aiGet32(messages, index) {
  20179. let _this = this
  20180. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20181. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20182. if (_this.infoData.length) {
  20183. for (var i = 0; i < _this.infoData.length; i++) {
  20184. if(_this.infoData[i].fileid){
  20185. fileid.push(_this.infoData[i].fileid)
  20186. }else {
  20187. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20188. if(_fileid){
  20189. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20190. _this.$forceUpdate();
  20191. if(_fileid != 1){
  20192. fileid.push(_fileid)
  20193. }
  20194. }
  20195. }
  20196. }
  20197. }
  20198. // let params = JSON.stringify({
  20199. // // "model": "Chat",
  20200. // model: 'gpt-3.5-turbo',
  20201. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20202. // max_tokens: 4096,
  20203. // top_p: 1,
  20204. // frequency_penalty: 0,
  20205. // presence_penalty: 0,
  20206. // messages: [{
  20207. // content: messages,
  20208. // role: 'user'
  20209. // }],
  20210. // stream: false,
  20211. // uid: this.userid,
  20212. // mind_map_question: "",
  20213. // })
  20214. // // let params = JSON.stringify({
  20215. // // message: {
  20216. // // anthropic_version: "bedrock-2023-05-31",
  20217. // // max_tokens: 4096,
  20218. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20219. // // top_p: 1,
  20220. // // messages: [{
  20221. // // content: messages,
  20222. // // role: 'user'
  20223. // // }], //
  20224. // // },
  20225. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20226. // // });
  20227. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20228. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20229. // console.log(response);
  20230. // let data = response.data.FunctionResponse
  20231. // if (data.choices && data.choices.length && data.choices[0].message) {
  20232. // console.log(data.choices[0].message.content);
  20233. // let tArray = JSON.parse(data.choices[0].message.content)
  20234. // // _this.unitJson[0].chapterInfo[0].task = []
  20235. // let toolsJson = {
  20236. // "电子白板": { tool: 1, type: 1 },
  20237. // "文档": { tool: 52, type: 1 },
  20238. // "思维导图": { tool: 3, type: 1 },
  20239. // "表格": { tool: 48, type: 1 },
  20240. // "作业提交": { tool: 16, type: 2 }
  20241. // }
  20242. // for (var i = 0; i < tArray.length; i++) {
  20243. // let _task = tArray[i]
  20244. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20245. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20246. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20247. // if (_task.toolChoose.length) {
  20248. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20249. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20250. // {
  20251. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20252. // toolDetail: _task.toolChoose[j].detail,
  20253. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20254. // askCount: 1,
  20255. // askTitle: "",
  20256. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20257. // },
  20258. // )
  20259. // }
  20260. // } else {
  20261. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20262. // {
  20263. // tool: [],
  20264. // toolDetail: "",
  20265. // toolType: 0,
  20266. // askCount: 1,
  20267. // askTitle: "",
  20268. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20269. // },
  20270. // )
  20271. // }
  20272. // }
  20273. // // if (_this.infoData.length) {
  20274. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20275. // // }
  20276. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20277. // _this.$forceUpdate();
  20278. // }
  20279. // // if (data.result) {
  20280. // // console.log(data.result);
  20281. // // let tArray = JSON.parse(data.result)
  20282. // // // _this.unitJson[0].chapterInfo[0].task = []
  20283. // // let toolsJson = {
  20284. // // "电子白板": { tool: 1, type: 1 },
  20285. // // "文档": { tool: 52, type: 1 },
  20286. // // "思维导图": { tool: 3, type: 1 },
  20287. // // "表格": { tool: 48, type: 1 },
  20288. // // "作业提交": { tool: 16, type: 2 }
  20289. // // }
  20290. // // for (var i = 0; i < tArray.length; i++) {
  20291. // // let _task = tArray[i]
  20292. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  20293. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  20294. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  20295. // // if (_task.toolChoose.length) {
  20296. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  20297. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20298. // // {
  20299. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  20300. // // toolDetail: _task.toolChoose[j].detail,
  20301. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  20302. // // askCount: 1,
  20303. // // askTitle: "",
  20304. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20305. // // },
  20306. // // )
  20307. // // }
  20308. // // } else {
  20309. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  20310. // // {
  20311. // // tool: [],
  20312. // // toolDetail: "",
  20313. // // toolType: 0,
  20314. // // askCount: 1,
  20315. // // askTitle: "",
  20316. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20317. // // },
  20318. // // )
  20319. // // }
  20320. // // }
  20321. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20322. // // _this.$forceUpdate();
  20323. // // }
  20324. // callback ? callback() : ''
  20325. // }).catch(function (error) {
  20326. // _this.loading = false
  20327. // console.log(error);
  20328. // });
  20329. let parm = {
  20330. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20331. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20332. session_name: uuidv4(),
  20333. userId: this.userid,
  20334. file_ids: fileid.length ? [...fileid] : '',
  20335. model: 'gpt-4o-2024-08-06',
  20336. temperature: this.mode == 3 ? 0.5 : 0.1,
  20337. }
  20338. this.ajax
  20339. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20340. .then(async (response) => {
  20341. console.log(response);
  20342. let data = response.data.FunctionResponse
  20343. if (data.message) {
  20344. console.log(data.message);
  20345. let tArray = {}
  20346. try {
  20347. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20348. } catch (error) {
  20349. console.log("error_________________" + error);
  20350. try {
  20351. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20352. let match = data.message.match(regex);
  20353. tArray = JSON.parse(match[0]);
  20354. // var message = data.message;
  20355. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20356. // var jsonEnd = message.indexOf("```", jsonStart);
  20357. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20358. // tArray = JSON.parse(jsonString);
  20359. } catch (error) {
  20360. try {
  20361. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20362. let match = data.message.match(regex);
  20363. // eval("var aaa = " + match[0])
  20364. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20365. } catch (error) {
  20366. console.log("error_________________" + error);
  20367. }
  20368. console.log("error_________________" + error);
  20369. }
  20370. }
  20371. let toolsJson = {
  20372. "电子白板": { tool: 1, type: 1 },
  20373. "文档": { tool: 52, type: 1 },
  20374. "思维导图": { tool: 3, type: 1 },
  20375. "表格": { tool: 48, type: 1 },
  20376. "作业提交": { tool: 16, type: 2 },
  20377. "问答": { tool: 15, type: 2 },
  20378. "选择题": { tool: 45, type: 2 },
  20379. }
  20380. // answerQ:"sssssssssssssss"
  20381. // for (var i = 0; i < tArray.length; i++) {
  20382. let _task = tArray
  20383. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  20384. _task.elist = _task.elist.filter(el=>{
  20385. el.isai = 1
  20386. return el
  20387. })
  20388. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  20389. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  20390. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  20391. console.log("error_________________JSON不对重新生成");
  20392. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20393. _this.aiGet32(messages, index)
  20394. return;
  20395. }
  20396. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  20397. if (_task.toolChoose && _task.toolChoose.length) {
  20398. for (var j = 0; j < _task.toolChoose.length; j++) {
  20399. let _json = {
  20400. tool: [],
  20401. toolDetail: _task.toolChoose[j].detail,
  20402. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20403. askCount: 1,
  20404. askTitle: "",
  20405. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20406. }
  20407. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  20408. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  20409. let answerQ = await _this.aiCreateQuestion(15, index)
  20410. // _json.answerQ = answerQ.answerQ
  20411. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  20412. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  20413. let testJson = await _this.aiCreateQuestion(45, index)
  20414. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20415. _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}
  20416. }
  20417. _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]
  20418. _this.$forceUpdate();
  20419. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  20420. }
  20421. } else {
  20422. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  20423. {
  20424. tool: [],
  20425. toolDetail: "",
  20426. toolType: 0,
  20427. askCount: 1,
  20428. askTitle: "",
  20429. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20430. },
  20431. )
  20432. }
  20433. // }
  20434. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20435. _this.$forceUpdate();
  20436. _this.createTeacherAn(index);
  20437. }
  20438. // callback ? callback() : ''
  20439. _this.taskLoading[index] = false
  20440. })
  20441. .catch((error) => {
  20442. // _this.loading = false
  20443. _this.taskLoading[index] = false
  20444. console.log(error);
  20445. });
  20446. },
  20447. async aiGetG321(messages, index, callback, callback2) {
  20448. let _this = this
  20449. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20450. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20451. if (_this.infoData.length) {
  20452. for (var i = 0; i < _this.infoData.length; i++) {
  20453. if(_this.infoData[i].fileid){
  20454. fileid.push(_this.infoData[i].fileid)
  20455. }else {
  20456. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20457. if(_fileid){
  20458. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20459. _this.$forceUpdate();
  20460. if(_fileid != 1){
  20461. fileid.push(_fileid)
  20462. }
  20463. }
  20464. }
  20465. }
  20466. }
  20467. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  20468. let parm = {
  20469. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20470. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20471. session_name: uuidv4(),
  20472. userId: this.userid,
  20473. file_ids: fileid.length ? [...fileid] : '',
  20474. model: 'gpt-4o-2024-08-06',
  20475. temperature: this.mode == 3 ? 0.5 : 0.1,
  20476. }
  20477. this.ajax
  20478. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  20479. .then(async (response) => {
  20480. console.log(response);
  20481. let data = response.data.FunctionResponse
  20482. if (data.message) {
  20483. let tArray = {}
  20484. try {
  20485. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20486. } catch (error) {
  20487. console.log("error_________________" + error);
  20488. try {
  20489. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20490. let match = data.message.match(regex);
  20491. tArray = JSON.parse(match[0]);
  20492. } catch (error) {
  20493. try {
  20494. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20495. let match = data.message.match(regex);
  20496. // eval("var aaa = " + match[0])
  20497. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20498. } catch (error) {
  20499. console.log("error_________________" + error);
  20500. }
  20501. console.log("error_________________" + error);
  20502. }
  20503. }
  20504. console.log(data.message);
  20505. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  20506. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  20507. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20508. _this.$forceUpdate();
  20509. _this.createTeacherAn(index);
  20510. }
  20511. callback ? callback(callback2) : ''
  20512. _this.taskGLoading[index][0] = false
  20513. _this.taskCancelToken1[index] = null
  20514. _this.$forceUpdate();
  20515. })
  20516. .catch((error) => {
  20517. // _this.loading = false
  20518. callback ? callback(callback2) : ''
  20519. _this.taskGLoading[index][0] = false
  20520. _this.taskCancelToken1[index] = null
  20521. _this.$forceUpdate();
  20522. console.log(error);
  20523. });
  20524. },
  20525. async aiGetG322(messages, index, 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. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  20546. let parm = {
  20547. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20548. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20549. session_name: uuidv4(),
  20550. userId: this.userid,
  20551. file_ids: fileid.length ? [...fileid] : '',
  20552. model: 'gpt-4o-2024-08-06',
  20553. temperature: this.mode == 3 ? 0.5 : 0.1,
  20554. }
  20555. this.ajax
  20556. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  20557. .then(async (response) => {
  20558. console.log(response);
  20559. let data = response.data.FunctionResponse
  20560. if (data.message) {
  20561. console.log(data.message);
  20562. let tArray = {}
  20563. try {
  20564. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20565. } catch (error) {
  20566. console.log("error_________________" + error);
  20567. try {
  20568. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20569. let match = data.message.match(regex);
  20570. tArray = JSON.parse(match[0]);
  20571. } catch (error) {
  20572. try {
  20573. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20574. let match = data.message.match(regex);
  20575. // eval("var aaa = " + match[0])
  20576. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20577. } catch (error) {
  20578. console.log("error_________________" + error);
  20579. }
  20580. console.log("error_________________" + error);
  20581. }
  20582. }
  20583. let toolsJson = {
  20584. "电子白板": { tool: 1, type: 1 },
  20585. "文档": { tool: 52, type: 1 },
  20586. "思维导图": { tool: 3, type: 1 },
  20587. "表格": { tool: 48, type: 1 },
  20588. "作业提交": { tool: 16, type: 2 },
  20589. "问答": { tool: 15, type: 2 },
  20590. "选择题": { tool: 45, type: 2 },
  20591. }
  20592. if(_this.languageSetting == 1){
  20593. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  20594. }else if(_this.languageSetting == 2){
  20595. toolsJson = {
  20596. "Mind Map Tool": { tool: 1, type: 1 },
  20597. "Document tool": { tool: 52, type: 1 },
  20598. "Diagram Tool": { tool: 3, type: 1 },
  20599. "Spreadsheet tool": { tool: 48, type: 1 },
  20600. "作业提交": { tool: 16, type: 2 },
  20601. "Q&A Tool": { tool: 15, type: 2 },
  20602. "Choice tool": { tool: 45, type: 2 },
  20603. }
  20604. }
  20605. let _task = tArray
  20606. if(!_task.toolChoose){
  20607. console.log("error_________________JSON不对重新生成");
  20608. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20609. _this.aiGet322(messages, index)
  20610. return;
  20611. }
  20612. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  20613. if (_task.toolChoose && _task.toolChoose.length) {
  20614. for (var j = 0; j < _task.toolChoose.length; j++) {
  20615. let _json = {
  20616. tool: [],
  20617. toolDetail: _task.toolChoose[j].detail,
  20618. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  20619. askCount: 1,
  20620. askTitle: "",
  20621. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20622. }
  20623. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  20624. if(converter(_task.toolChoose[j].tool) == converter('问答') || _task.toolChoose[j].tool == 'Q&A Tool'){
  20625. let answerQ = await _this.aiCreateQuestion(15, index)
  20626. // _json.answerQ = answerQ.answerQ
  20627. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  20628. }else if(converter(_task.toolChoose[j].tool) == converter('选择题') || _task.toolChoose[j].tool == 'Choice tool'){
  20629. let testJson = await _this.aiCreateQuestion(45, index)
  20630. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  20631. _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}
  20632. }
  20633. _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]
  20634. _this.$forceUpdate();
  20635. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  20636. }
  20637. } else {
  20638. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  20639. {
  20640. tool: [],
  20641. toolDetail: "",
  20642. toolType: 0,
  20643. askCount: 1,
  20644. askTitle: "",
  20645. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20646. },
  20647. )
  20648. }
  20649. //
  20650. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20651. _this.$forceUpdate();
  20652. // _this.$nextTick(()=>{
  20653. // setTimeout(() => {
  20654. // for (var j = 0; j < _task.toolChoose.length; j++) {
  20655. // if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  20656. // _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  20657. // }
  20658. // }
  20659. // }, 2000);
  20660. // })
  20661. }
  20662. callback ? callback() : ''
  20663. _this.taskGLoading[index][1] = false
  20664. _this.taskCancelToken2[index] = null
  20665. _this.$forceUpdate();
  20666. })
  20667. .catch((error) => {
  20668. // _this.loading = false
  20669. callback ? callback() : ''
  20670. _this.taskGLoading[index][1] = false
  20671. _this.taskCancelToken2[index] = null
  20672. _this.$forceUpdate();
  20673. console.log(error);
  20674. });
  20675. },
  20676. async aiGetG323(messages, index) {
  20677. let _this = this
  20678. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20679. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20680. if (_this.infoData.length) {
  20681. for (var i = 0; i < _this.infoData.length; i++) {
  20682. if(_this.infoData[i].fileid){
  20683. fileid.push(_this.infoData[i].fileid)
  20684. }else {
  20685. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20686. if(_fileid){
  20687. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20688. _this.$forceUpdate();
  20689. if(_fileid != 1){
  20690. fileid.push(_fileid)
  20691. }
  20692. }
  20693. }
  20694. }
  20695. }
  20696. let parm = {
  20697. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20698. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20699. session_name: uuidv4(),
  20700. userId: this.userid,
  20701. file_ids: fileid.length ? [...fileid] : '',
  20702. model: 'gpt-4o-2024-08-06',
  20703. temperature: this.mode == 3 ? 0.5 : 0.1,
  20704. }
  20705. this.ajax
  20706. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20707. .then(async (response) => {
  20708. console.log(response);
  20709. let data = response.data.FunctionResponse
  20710. if (data.message) {
  20711. console.log(data.message);
  20712. let tArray = {}
  20713. try {
  20714. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20715. } catch (error) {
  20716. console.log("error_________________" + error);
  20717. try {
  20718. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20719. let match = data.message.match(regex);
  20720. tArray = JSON.parse(match[0]);
  20721. } catch (error) {
  20722. try {
  20723. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20724. let match = data.message.match(regex);
  20725. // eval("var aaa = " + match[0])
  20726. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20727. } catch (error) {
  20728. console.log("error_________________" + error);
  20729. }
  20730. console.log("error_________________" + error);
  20731. }
  20732. }
  20733. let _task = tArray
  20734. if(!_task.elist){
  20735. console.log("error_________________JSON不对重新生成");
  20736. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20737. _this.aiGet322(messages, index)
  20738. return;
  20739. }
  20740. _task.elist = _task.elist.filter(el=>{
  20741. el.isai = "1"
  20742. return el
  20743. })
  20744. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  20745. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20746. _this.$forceUpdate();
  20747. }
  20748. // callback ? callback() : ''
  20749. _this.taskGLoading[index][2] = false
  20750. })
  20751. .catch((error) => {
  20752. // _this.loading = false
  20753. _this.taskGLoading[index][2] = false
  20754. console.log(error);
  20755. });
  20756. },
  20757. async aiCreateQuestion(type, task) {
  20758. let _this = this
  20759. return new Promise((resolve, reject) => {
  20760. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20761. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20762. if (_this.infoData.length) {
  20763. for (var i = 0; i < _this.infoData.length; i++) {
  20764. if(_this.infoData[i].fileid){
  20765. fileid.push(_this.infoData[i].fileid)
  20766. }
  20767. }
  20768. }
  20769. let sub = []
  20770. let mclass = []
  20771. if (this.courseTypeId.length) {
  20772. for (var i = 0; i < this.courseTypeId.length; i++) {
  20773. let _sid = this.courseTypeId[i]
  20774. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20775. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20776. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20777. }
  20778. }
  20779. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20780. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20781. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20782. }
  20783. }
  20784. }
  20785. }
  20786. let messages = ""
  20787. if(type == 15){
  20788. messages = `NOTICE
  20789. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  20790. Language: ${this.getLang()}
  20791. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20792. Instruction: Based on the context, follow "Format example", write content.
  20793. # Context
  20794. ## 任务
  20795. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  20796. ## 限制
  20797. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  20798. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  20799. ## 课程简介
  20800. 课程名字:${_this.courseName}
  20801. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20802. ${sub.length ? '学科:' + sub.join(",") : ''}
  20803. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20804. ## 教案
  20805. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20806. # Format example
  20807. {"answerQ":"问题"}
  20808. `
  20809. }else if(type == 45){
  20810. messages = `NOTICE
  20811. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  20812. Language: ${this.getLang()}
  20813. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20814. Instruction: Based on the context, follow "Format example", write content.
  20815. # Context
  20816. ## 任务
  20817. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  20818. ## 限制
  20819. - 生成题目禁止重复。
  20820. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  20821. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  20822. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  20823. ## 课程简介
  20824. 课程名字:${_this.courseName}
  20825. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20826. ${sub.length ? '学科:' + sub.join(",") : ''}
  20827. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20828. ## 教案
  20829. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20830. # Format example
  20831. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  20832. `
  20833. }
  20834. let parm = {
  20835. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20836. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20837. session_name: uuidv4(),
  20838. userId: this.userid,
  20839. file_ids: fileid.length ? [...fileid] : '',
  20840. model: 'gpt-4o-2024-08-06',
  20841. temperature: this.mode == 3 ? 0.5 : 0.1,
  20842. }
  20843. this.ajax
  20844. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20845. .then((response) => {
  20846. console.log(response);
  20847. let data = response.data.FunctionResponse
  20848. if (data.message) {
  20849. console.log(data.message);
  20850. try {
  20851. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20852. let tArray = {}
  20853. try {
  20854. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20855. } catch (error) {
  20856. console.log("error_________________" + error);
  20857. try {
  20858. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20859. let match = data.message.match(regex);
  20860. tArray = JSON.parse(match[0]);
  20861. // var message = data.message;
  20862. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20863. // var jsonEnd = message.indexOf("```", jsonStart);
  20864. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20865. // tArray = JSON.parse(jsonString);
  20866. } catch (error) {
  20867. try {
  20868. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20869. let match = data.message.match(regex);
  20870. // eval("var aaa = " + match[0])
  20871. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20872. } catch (error) {
  20873. try {
  20874. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20875. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  20876. let match = data.message.match(regex.replace(regex2, '"$1"'));
  20877. // eval("var aaa = " + match[0])
  20878. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20879. } catch (error) {
  20880. console.log("error_________________" + error);
  20881. }
  20882. console.log("error_________________" + error);
  20883. }
  20884. console.log("error_________________" + error);
  20885. }
  20886. }
  20887. resolve(tArray)
  20888. } catch (error) {
  20889. if(type == 15){
  20890. resolve({answerQ: "题目"})
  20891. }else if(type == 45){
  20892. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  20893. }
  20894. }
  20895. }else if(type == 15){
  20896. resolve({answerQ: "题目"})
  20897. }else if(type == 45){
  20898. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  20899. }
  20900. })
  20901. .catch((error) => {
  20902. if(type == 15){
  20903. resolve({answerQ: "题目"})
  20904. }else if(type == 45){
  20905. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  20906. }
  20907. console.log(error);
  20908. });
  20909. });
  20910. },
  20911. async aiChoice(type){
  20912. if(type == 45){
  20913. this.choiceLoading = true
  20914. }
  20915. let _this = this
  20916. let fileid = []
  20917. if (_this.xuanzeInfoData.length) {
  20918. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  20919. if(_this.xuanzeInfoData[i].fileid){
  20920. fileid.push(_this.xuanzeInfoData[i].fileid)
  20921. }
  20922. }
  20923. }else{
  20924. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20925. if (_this.infoData.length) {
  20926. for (var i = 0; i < _this.infoData.length; i++) {
  20927. if(_this.infoData[i].fileid){
  20928. fileid.push(_this.infoData[i].fileid)
  20929. }
  20930. }
  20931. }
  20932. }
  20933. let sub = []
  20934. let mclass = []
  20935. if (this.courseTypeId.length) {
  20936. for (var i = 0; i < this.courseTypeId.length; i++) {
  20937. let _sid = this.courseTypeId[i]
  20938. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20939. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20940. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20941. }
  20942. }
  20943. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20944. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20945. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20946. }
  20947. }
  20948. }
  20949. }
  20950. let messages = ""
  20951. if(type == 15){
  20952. messages = `NOTICE
  20953. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  20954. Language: ${this.getLang()}
  20955. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20956. Instruction: Based on the context, follow "Format example", write content.
  20957. # Context
  20958. ## 任务
  20959. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  20960. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  20961. ## 限制
  20962. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  20963. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  20964. ## 课程简介
  20965. 课程名字:${_this.courseName}
  20966. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20967. ${sub.length ? '学科:' + sub.join(",") : ''}
  20968. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20969. ## 教案
  20970. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20971. # Format example
  20972. {"answerQ":"问题"}
  20973. `
  20974. }else if(type == 45){
  20975. messages = `NOTICE
  20976. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  20977. Language: ${this.getLang()}
  20978. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20979. Instruction: Based on the context, follow "Format example", write content.
  20980. # Context
  20981. ## 任务
  20982. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  20983. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  20984. ## 限制
  20985. - 生成题目禁止重复。
  20986. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  20987. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  20988. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  20989. ## 课程简介
  20990. 课程名字:${_this.courseName}
  20991. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20992. ${sub.length ? '学科:' + sub.join(",") : ''}
  20993. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20994. ## 教案
  20995. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20996. # Format example
  20997. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  20998. `
  20999. }
  21000. let parm = {
  21001. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21002. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21003. session_name: uuidv4(),
  21004. userId: this.userid,
  21005. file_ids: fileid.length ? [...fileid] : '',
  21006. model: 'gpt-4o-2024-08-06',
  21007. temperature: this.mode == 3 ? 0.5 : 0.1,
  21008. }
  21009. this.ajax
  21010. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21011. .then((response) => {
  21012. console.log(response);
  21013. let data = response.data.FunctionResponse
  21014. if (data.message) {
  21015. console.log(data.message);
  21016. try {
  21017. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21018. let tArray = {}
  21019. try {
  21020. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21021. } catch (error) {
  21022. console.log("error_________________" + error);
  21023. try {
  21024. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  21025. let match = data.message.match(regex);
  21026. tArray = JSON.parse(match[0]);
  21027. // var message = data.message;
  21028. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21029. // var jsonEnd = message.indexOf("```", jsonStart);
  21030. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21031. // tArray = JSON.parse(jsonString);
  21032. } catch (error) {
  21033. try {
  21034. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  21035. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  21036. let match = data.message.match(regex.replace(regex2, '"$1"'));
  21037. // eval("var aaa = " + match[0])
  21038. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  21039. } catch (error) {
  21040. console.log("error_________________" + error);
  21041. }
  21042. console.log("error_________________" + error);
  21043. }
  21044. }
  21045. if(type == 45){
  21046. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  21047. }
  21048. } catch (error) {
  21049. if(type == 15){
  21050. {answerQ: "题目"}
  21051. }else if(type == 45){
  21052. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21053. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21054. }
  21055. _this.choiceLoading = false
  21056. }
  21057. }else if(type == 15){
  21058. {answerQ: "题目"}
  21059. }else if(type == 45){
  21060. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21061. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21062. }
  21063. _this.choiceLoading = false
  21064. }).catch((error) => {
  21065. if(type == 15){
  21066. {answerQ: "题目"}
  21067. }else if(type == 45){
  21068. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  21069. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  21070. }
  21071. console.log(error);
  21072. _this.choiceLoading = false
  21073. });
  21074. },
  21075. async aiGet4(messages, callback, clickType) {
  21076. let _this = this
  21077. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21078. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21079. if (_this.infoData.length) {
  21080. for (var i = 0; i < _this.infoData.length; i++) {
  21081. if(_this.infoData[i].fileid){
  21082. fileid.push(_this.infoData[i].fileid)
  21083. }else {
  21084. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21085. if(_fileid){
  21086. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21087. _this.$forceUpdate();
  21088. if(_fileid != 1){
  21089. fileid.push(_fileid)
  21090. }
  21091. }
  21092. }
  21093. }
  21094. }
  21095. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  21096. if(_this.cankaoInfoData[i].fileid){
  21097. fileid.push(_this.cankaoInfoData[i].fileid)
  21098. }else {
  21099. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  21100. if(_fileid){
  21101. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21102. _this.$forceUpdate();
  21103. if(_fileid != 1){
  21104. fileid.push(_fileid)
  21105. }
  21106. }
  21107. }
  21108. }
  21109. // let params = JSON.stringify({
  21110. // // "model": "Chat",
  21111. // model: 'gpt-3.5-turbo',
  21112. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21113. // max_tokens: 4096,
  21114. // top_p: 1,
  21115. // frequency_penalty: 0,
  21116. // presence_penalty: 0,
  21117. // messages: [{
  21118. // content: messages,
  21119. // role: 'user'
  21120. // }],
  21121. // stream: false,
  21122. // uid: this.userid,
  21123. // mind_map_question: "",
  21124. // })
  21125. // // let params = JSON.stringify({
  21126. // // message: {
  21127. // // anthropic_version: "bedrock-2023-05-31",
  21128. // // max_tokens: 4096,
  21129. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  21130. // // top_p: 1,
  21131. // // messages: [{
  21132. // // content: messages,
  21133. // // role: 'user'
  21134. // // }], //
  21135. // // },
  21136. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21137. // // });
  21138. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21139. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21140. // console.log(response);
  21141. // let data = response.data.FunctionResponse
  21142. // if (data.choices && data.choices.length && data.choices[0].message) {
  21143. // console.log(data.choices[0].message.content);
  21144. // let dArray = JSON.parse(data.choices[0].message.content)
  21145. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  21146. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  21147. // _this.unitJson[0].chapterInfo[0].taskJson = []
  21148. // for (var i = 0; i < dArray.length; i++) {
  21149. // let _task = dArray[i]
  21150. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  21151. // task: _task.task,
  21152. // taskDetail: "",
  21153. // taskDetail2: "",
  21154. // taskDetail3: _task.detail,
  21155. // chapterData: [],
  21156. // toolText: "",
  21157. // toolChoose: [
  21158. // {
  21159. // tool: [],
  21160. // toolDetail: "",
  21161. // toolType: 0,
  21162. // askCount: 1,
  21163. // askTitle: "",
  21164. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21165. // },
  21166. // ],
  21167. // isShowTools: false,
  21168. // askCount: 1,
  21169. // isFold: 0,
  21170. // askTitle: "",
  21171. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21172. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21173. // homeworkList: [],
  21174. // })
  21175. // }
  21176. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  21177. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21178. // _this.$forceUpdate();
  21179. // } else {
  21180. // for (var i = 0; i < dArray.length; i++) {
  21181. // let _task = dArray[i]
  21182. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  21183. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21184. // }else {
  21185. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  21186. // task: _task.task,
  21187. // taskDetail: "",
  21188. // taskDetail2: "",
  21189. // taskDetail3: _task.detail,
  21190. // chapterData: [],
  21191. // toolText: "",
  21192. // toolChoose: [
  21193. // {
  21194. // tool: [],
  21195. // toolDetail: "",
  21196. // toolType: 0,
  21197. // askCount: 1,
  21198. // askTitle: "",
  21199. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21200. // },
  21201. // ],
  21202. // isShowTools: false,
  21203. // askCount: 1,
  21204. // isFold: 0,
  21205. // askTitle: "",
  21206. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21207. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21208. // homeworkList: [],
  21209. // }
  21210. // }
  21211. // }
  21212. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21213. // _this.$forceUpdate();
  21214. // }
  21215. // }
  21216. // // if (data.result) {
  21217. // // console.log(data.result);
  21218. // // let dArray = JSON.parse(data.result)
  21219. // // _this.teacherText = JSON.parse(data.result)
  21220. // // for (var i = 0; i < dArray.length; i++) {
  21221. // // let _task = dArray[i]
  21222. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21223. // // }
  21224. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21225. // // _this.$forceUpdate();
  21226. // // }
  21227. // callback ? callback() : ''
  21228. // _this.loading = false
  21229. // }).catch(function (error) {
  21230. // _this.loading = false
  21231. // console.log(error);
  21232. // });
  21233. let parm = {
  21234. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21235. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21236. session_name: uuidv4(),
  21237. userId: this.userid,
  21238. file_ids: fileid.length ? [...fileid] : '',
  21239. model: 'gpt-4o-2024-08-06',
  21240. temperature: this.mode == 3 ? 0.5 : 0.1,
  21241. }
  21242. this.ajax
  21243. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21244. .then((response) => {
  21245. console.log(response);
  21246. let data = response.data.FunctionResponse
  21247. if (data.message) {
  21248. console.log(data.message);
  21249. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21250. let dArray = []
  21251. try {
  21252. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  21253. } catch (error) {
  21254. console.log("error_________________" + error);
  21255. try {
  21256. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  21257. let match = data.message.match(regex);
  21258. dArray = JSON.parse(match[0]);
  21259. // var message = data.message;
  21260. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21261. // var jsonEnd = message.indexOf("```", jsonStart);
  21262. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  21263. // dArray = JSON.parse(jsonString);
  21264. } catch (error) {
  21265. _this.aiGet4(messages, callback)
  21266. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21267. console.log("error_________________" + error);
  21268. return;
  21269. console.log("error_________________" + error);
  21270. _this.loading = false
  21271. }
  21272. }
  21273. try {
  21274. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  21275. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  21276. if(_this.panTeacher() > 0){
  21277. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  21278. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  21279. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  21280. }
  21281. for (var i = 0; i < dArray.length; i++) {
  21282. let _task = dArray[i]
  21283. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  21284. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  21285. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21286. }else {
  21287. _this.unitJson[0].chapterInfo[0].taskJson.push({
  21288. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  21289. taskDetail: "",
  21290. taskDetail2: "",
  21291. taskDetail3: _task.detail,
  21292. chapterData: [],
  21293. toolText: "",
  21294. toolChoose: [
  21295. {
  21296. tool: [],
  21297. toolDetail: "",
  21298. toolType: 0,
  21299. askCount: 1,
  21300. askTitle: "",
  21301. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21302. },
  21303. ],
  21304. isShowTools: false,
  21305. askCount: 1,
  21306. isFold: 0,
  21307. askTitle: "",
  21308. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21309. checkJson: [{ checkCount: [], checkPerent: [] }],
  21310. homeworkList: [],
  21311. })
  21312. }
  21313. }
  21314. }else {
  21315. _this.unitJson[0].chapterInfo[0].taskJson = []
  21316. for (var i = 0; i < dArray.length; i++) {
  21317. let _task = dArray[i]
  21318. _this.unitJson[0].chapterInfo[0].taskJson.push({
  21319. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  21320. taskDetail: "",
  21321. taskDetail2: "",
  21322. taskDetail3: _task.detail,
  21323. chapterData: [],
  21324. toolText: "",
  21325. toolChoose: [
  21326. {
  21327. tool: [],
  21328. toolDetail: "",
  21329. toolType: 0,
  21330. askCount: 1,
  21331. askTitle: "",
  21332. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21333. },
  21334. ],
  21335. isShowTools: false,
  21336. askCount: 1,
  21337. isFold: 0,
  21338. askTitle: "",
  21339. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21340. checkJson: [{ checkCount: [], checkPerent: [] }],
  21341. homeworkList: [],
  21342. })
  21343. }
  21344. }
  21345. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  21346. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21347. _this.$forceUpdate();
  21348. } else {
  21349. for (var i = 0; i < dArray.length; i++) {
  21350. let _task = dArray[i]
  21351. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  21352. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  21353. }else {
  21354. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  21355. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  21356. taskDetail: "",
  21357. taskDetail2: "",
  21358. taskDetail3: _task.detail,
  21359. chapterData: [],
  21360. toolText: "",
  21361. toolChoose: [
  21362. {
  21363. tool: [],
  21364. toolDetail: "",
  21365. toolType: 0,
  21366. askCount: 1,
  21367. askTitle: "",
  21368. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21369. },
  21370. ],
  21371. isShowTools: false,
  21372. askCount: 1,
  21373. isFold: 0,
  21374. askTitle: "",
  21375. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21376. checkJson: [{ checkCount: [], checkPerent: [] }],
  21377. homeworkList: [],
  21378. }
  21379. }
  21380. }
  21381. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  21382. _this.$forceUpdate();
  21383. }
  21384. } catch (error) {
  21385. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  21386. _this.aiGet4(messages, callback)
  21387. console.log("error_________________" + error);
  21388. return;
  21389. // _this.loading = false
  21390. }
  21391. }
  21392. callback ? callback() : ''
  21393. })
  21394. .catch((error) => {
  21395. _this.loading = false
  21396. console.log(error);
  21397. });
  21398. },
  21399. async aiDetail(msg, index) {
  21400. let _this = this
  21401. const _tindex = 'task-' + index
  21402. const _tindex2 = index
  21403. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21404. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21405. if (_this.infoData.length) {
  21406. for (var i = 0; i < _this.infoData.length; i++) {
  21407. if(_this.infoData[i].fileid){
  21408. fileid.push(_this.infoData[i].fileid)
  21409. }else {
  21410. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21411. if(_fileid){
  21412. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21413. _this.$forceUpdate();
  21414. if(_fileid != 1){
  21415. fileid.push(_fileid)
  21416. }
  21417. }
  21418. }
  21419. }
  21420. }
  21421. let url = []
  21422. if (this.infoData.length) {
  21423. for (var i = 0; i < this.infoData.length; i++) {
  21424. url.push(this.infoData[i].url)
  21425. }
  21426. }
  21427. let messages = `NOTICE
  21428. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21429. Language: ${this.getLang()}
  21430. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21431. Instruction: Based on the context, follow "Format example", write content.
  21432. #Context
  21433. ## 要求
  21434. ${msg}
  21435. ## 参考信息
  21436. 任务名称:${_this.aiCallBack.task}
  21437. ## 优化内容
  21438. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  21439. // -------- #补充参考资料和
  21440. // ## 补充参考资料
  21441. // - 补充资料:${url.join(",")}
  21442. // - 补充描述:${_this.courseText2}
  21443. _this.taskDetailLoading.push(_tindex)
  21444. _this.ttaskDetailLoading.push(_tindex)
  21445. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  21446. let _uuid = uuidv4();
  21447. // let params = JSON.stringify({
  21448. // // "model": "Chat",
  21449. // model: 'gpt-3.5-turbo',
  21450. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21451. // max_tokens: 4096,
  21452. // top_p: 1,
  21453. // frequency_penalty: 0,
  21454. // presence_penalty: 0,
  21455. // messages: [{
  21456. // content: messages,
  21457. // role: 'user'
  21458. // }],
  21459. // uid: _uuid,
  21460. // mind_map_question: "",
  21461. // })
  21462. let params = {
  21463. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21464. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  21465. session_name: _uuid,
  21466. userId: _this.userid,
  21467. uid: _uuid,
  21468. file_ids: fileid.length ? [...fileid] : '',
  21469. model: 'gpt-4o-2024-08-06',
  21470. temperature: this.mode == 3 ? 0.5 : 0.1,
  21471. }
  21472. // let params = JSON.stringify({
  21473. // message: {
  21474. // anthropic_version: "bedrock-2023-05-31",
  21475. // max_tokens: 4096,
  21476. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21477. // top_p: 1,
  21478. // messages: [{
  21479. // "role": "user",
  21480. // "content": messages
  21481. // }] ,
  21482. // },
  21483. // uid: _uuid,
  21484. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21485. // });
  21486. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21487. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  21488. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21489. console.log(response);
  21490. // let data = response.data.FunctionResponse
  21491. // if (data.choices && data.choices.length && data.choices[0].message) {
  21492. // console.log(data.choices[0].message.content);
  21493. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  21494. // _this.$forceUpdate()
  21495. // }
  21496. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21497. } else {
  21498. _this.$message.warning(response.data.FunctionResponse.result);
  21499. }
  21500. _this.isOutlineTaskCancelToken[index] = null
  21501. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21502. }).catch(function (error) {
  21503. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21504. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  21505. _this.isOutlineTaskCancelToken[index] = null
  21506. if(error && error.message != 'Request canceled by the user.'){
  21507. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21508. }
  21509. console.log(error);
  21510. });
  21511. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  21512. },
  21513. aiDetailgetAiContent(_uid, loading, _tindex2) {
  21514. try {
  21515. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21516. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21517. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21518. } catch(error){
  21519. console.log('EventSource error:', error);
  21520. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21521. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21522. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  21523. this.isOutlineTaskCancelToken[_tindex2] = null
  21524. return;
  21525. }
  21526. let _allText = "";
  21527. let _mdText = "";
  21528. let _iindex = 0
  21529. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  21530. let _eData = JSON.parse(_e.data).content;
  21531. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21532. //对话已经完成
  21533. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21534. this.isOutlineTaskCancelSource[_tindex2].close();
  21535. this.isOutlineTaskCancelSource[_tindex2] = null;
  21536. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  21537. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21538. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  21539. this.isOutlineTaskCancelToken[_tindex2] = null
  21540. return;
  21541. } else {
  21542. _iindex++
  21543. //对话还在继续
  21544. let _text = "";
  21545. _text = _eData.replaceAll("'", "");
  21546. if (_allText == "") {
  21547. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21548. } else {
  21549. _allText += _text;
  21550. }
  21551. _mdText = _allText + "_";
  21552. _mdText = _mdText.replace(/\\n/g, "\n");
  21553. _mdText = _mdText.replace(/\\/g, "");
  21554. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21555. //转化返回的回复流数据.
  21556. if(_iindex == 10){
  21557. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  21558. _iindex = 0
  21559. }
  21560. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21561. // 处理流数据
  21562. }
  21563. // this.$forceUpdate();
  21564. };
  21565. let _this = _this
  21566. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  21567. // 处理错误,可以尝试重新连接
  21568. console.log('EventSource error:', event);
  21569. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21570. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  21571. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  21572. _this.isOutlineTaskCancelToken[_tindex2] = null
  21573. _this.isOutlineTaskCancelSource[_tindex2].close();
  21574. _this.isOutlineTaskCancelSource[_tindex2] = null;
  21575. };
  21576. },
  21577. async aiOutlineDetail(msg, index) {
  21578. let _this = this
  21579. const _tindex = 'task-' + index
  21580. const _tindex2 = index
  21581. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21582. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21583. if (_this.infoData.length) {
  21584. for (var i = 0; i < _this.infoData.length; i++) {
  21585. if(_this.infoData[i].fileid){
  21586. fileid.push(_this.infoData[i].fileid)
  21587. }else {
  21588. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21589. if(_fileid){
  21590. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21591. _this.$forceUpdate();
  21592. if(_fileid != 1){
  21593. fileid.push(_fileid)
  21594. }
  21595. }
  21596. }
  21597. }
  21598. }
  21599. let url = []
  21600. if (this.infoData.length) {
  21601. for (var i = 0; i < this.infoData.length; i++) {
  21602. url.push(this.infoData[i].url)
  21603. }
  21604. }
  21605. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  21606. let messages = `NOTICE
  21607. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  21608. Language: ${this.getLang()}
  21609. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21610. Instruction: Based on the context, follow "Format example", write content.
  21611. #Context
  21612. ## 要求
  21613. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  21614. ## 参考信息
  21615. 课程名字:${_this.courseName}
  21616. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21617. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21618. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21619. # Format example
  21620. 子任务名称:名称应该总结了该任务是在做什么,
  21621. 子任务设计:任务设计。
  21622. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  21623. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  21624. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  21625. `
  21626. // 教学目标:教学目标。
  21627. // 任务设计:任务设计。
  21628. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  21629. // -------- #补充参考资料和
  21630. // ## 补充参考资料
  21631. // - 补充资料:${url.join(",")}
  21632. // - 补充描述:${_this.courseText2}
  21633. _this.taskDetailLoading.push(_tindex)
  21634. _this.ttaskDetailLoading.push(_tindex)
  21635. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  21636. let _uuid = uuidv4();
  21637. // let params = JSON.stringify({
  21638. // // "model": "Chat",
  21639. // model: 'gpt-3.5-turbo',
  21640. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21641. // max_tokens: 4096,
  21642. // top_p: 1,
  21643. // frequency_penalty: 0,
  21644. // presence_penalty: 0,
  21645. // messages: [{
  21646. // content: messages,
  21647. // role: 'user'
  21648. // }],
  21649. // uid: _uuid,
  21650. // mind_map_question: "",
  21651. // })
  21652. let params = {
  21653. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21654. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21655. session_name: _uuid,
  21656. userId: _this.userid,
  21657. uid: _uuid,
  21658. file_ids: fileid.length ? [...fileid] : '',
  21659. model: 'gpt-4o-2024-08-06',
  21660. temperature: this.mode == 3 ? 0.5 : 0.1,
  21661. }
  21662. // let params = JSON.stringify({
  21663. // message: {
  21664. // anthropic_version: "bedrock-2023-05-31",
  21665. // max_tokens: 4096,
  21666. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21667. // top_p: 1,
  21668. // messages: [{
  21669. // "role": "user",
  21670. // "content": messages
  21671. // }] ,
  21672. // },
  21673. // uid: _uuid,
  21674. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21675. // });
  21676. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21677. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  21678. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21679. console.log(response);
  21680. // let data = response.data.FunctionResponse
  21681. // if (data.choices && data.choices.length && data.choices[0].message) {
  21682. // console.log(data.choices[0].message.content);
  21683. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  21684. // _this.$forceUpdate()
  21685. // }
  21686. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21687. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  21688. } else {
  21689. _this.$message.warning(response.data.FunctionResponse.result);
  21690. }
  21691. _this.isOutlineTaskCancelToken[index] = null
  21692. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21693. }).catch(function (error) {
  21694. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21695. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  21696. _this.isOutlineTaskCancelToken[index] = null
  21697. if(error && error.message != 'Request canceled by the user.'){
  21698. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21699. }
  21700. console.log(error);
  21701. });
  21702. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  21703. },
  21704. async aiOutlineDetail2(msg, index) {
  21705. let _this = this
  21706. const _tindex = 'task-' + index
  21707. const _tindex2 = index
  21708. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21709. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21710. if (_this.infoData.length) {
  21711. for (var i = 0; i < _this.infoData.length; i++) {
  21712. if(_this.infoData[i].fileid){
  21713. fileid.push(_this.infoData[i].fileid)
  21714. }else {
  21715. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21716. if(_fileid){
  21717. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21718. _this.$forceUpdate();
  21719. if(_fileid != 1){
  21720. fileid.push(_fileid)
  21721. }
  21722. }
  21723. }
  21724. }
  21725. }
  21726. let url = []
  21727. if (this.infoData.length) {
  21728. for (var i = 0; i < this.infoData.length; i++) {
  21729. url.push(this.infoData[i].url)
  21730. }
  21731. }
  21732. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  21733. let taskArray = []
  21734. let taskArrayD = []
  21735. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  21736. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  21737. if(k != index){
  21738. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  21739. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  21740. }
  21741. }
  21742. let messages = `NOTICE
  21743. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  21744. Language: ${this.getLang()}
  21745. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21746. Instruction: Based on the context, follow "Format example", write content.
  21747. #Context
  21748. ## 要求
  21749. ${msg}
  21750. ## 参考信息
  21751. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21752. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  21753. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21754. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  21755. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  21756. # Format example
  21757. **子任务标题**:环节+子任务名称
  21758. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  21759. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  21760. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  21761. `
  21762. // 教学目标:教学目标。
  21763. // 任务设计:任务设计。
  21764. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  21765. // -------- #补充参考资料和
  21766. // ## 补充参考资料
  21767. // - 补充资料:${url.join(",")}
  21768. // - 补充描述:${_this.courseText2}
  21769. _this.taskDetailLoading.push(_tindex)
  21770. _this.ttaskDetailLoading.push(_tindex)
  21771. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  21772. let _uuid = uuidv4();
  21773. // let params = JSON.stringify({
  21774. // // "model": "Chat",
  21775. // model: 'gpt-3.5-turbo',
  21776. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21777. // max_tokens: 4096,
  21778. // top_p: 1,
  21779. // frequency_penalty: 0,
  21780. // presence_penalty: 0,
  21781. // messages: [{
  21782. // content: messages,
  21783. // role: 'user'
  21784. // }],
  21785. // uid: _uuid,
  21786. // mind_map_question: "",
  21787. // })
  21788. let params = {
  21789. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21790. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  21791. session_name: _uuid,
  21792. userId: _this.userid,
  21793. uid: _uuid,
  21794. file_ids: fileid.length ? [...fileid] : '',
  21795. model: 'gpt-4o-2024-08-06',
  21796. temperature: this.mode == 3 ? 0.5 : 0.1,
  21797. }
  21798. // let params = JSON.stringify({
  21799. // message: {
  21800. // anthropic_version: "bedrock-2023-05-31",
  21801. // max_tokens: 4096,
  21802. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21803. // top_p: 1,
  21804. // messages: [{
  21805. // "role": "user",
  21806. // "content": messages
  21807. // }] ,
  21808. // },
  21809. // uid: _uuid,
  21810. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21811. // });
  21812. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21813. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  21814. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21815. console.log(response);
  21816. // let data = response.data.FunctionResponse
  21817. // if (data.choices && data.choices.length && data.choices[0].message) {
  21818. // console.log(data.choices[0].message.content);
  21819. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  21820. // _this.$forceUpdate()
  21821. // }
  21822. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21823. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  21824. } else {
  21825. _this.$message.warning(response.data.FunctionResponse.result);
  21826. }
  21827. _this.isOutlineTaskCancelToken[index] = null
  21828. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21829. }).catch(function (error) {
  21830. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21831. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  21832. _this.isOutlineTaskCancelToken[index] = null
  21833. if(error && error.message != 'Request canceled by the user.'){
  21834. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21835. }
  21836. console.log(error);
  21837. });
  21838. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  21839. },
  21840. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  21841. try {
  21842. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21843. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21844. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21845. } catch(error) {
  21846. console.log('EventSource error:', error);
  21847. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21848. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21849. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  21850. this.isOutlineTaskCancelToken[_tindex2] = null
  21851. return;
  21852. }
  21853. let _allText = "";
  21854. let _mdText = "";
  21855. let _iindex = 0
  21856. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  21857. let _eData = JSON.parse(_e.data).content;
  21858. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21859. //对话已经完成
  21860. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21861. this.isOutlineTaskCancelSource[_tindex2].close();
  21862. this.isOutlineTaskCancelSource[_tindex2] = null;
  21863. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  21864. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  21865. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  21866. }
  21867. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21868. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  21869. this.isOutlineTaskCancelToken[_tindex2] = null
  21870. return;
  21871. } else {
  21872. _iindex++
  21873. //对话还在继续
  21874. let _text = "";
  21875. _text = _eData.replaceAll("'", "");
  21876. if (_allText == "") {
  21877. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21878. } else {
  21879. _allText += _text;
  21880. }
  21881. _mdText = _allText + "_";
  21882. _mdText = _mdText.replace(/\\n/g, "\n");
  21883. _mdText = _mdText.replace(/\\/g, "");
  21884. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21885. //转化返回的回复流数据.
  21886. if(_iindex == 10){
  21887. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  21888. _iindex = 0
  21889. }
  21890. if(this.taskDetailLoading.indexOf(loading) !== -1){
  21891. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  21892. }
  21893. // 处理流数据
  21894. }
  21895. // this.$forceUpdate();
  21896. };
  21897. let _this = this
  21898. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  21899. // 处理错误,可以尝试重新连接
  21900. console.log('EventSource error:', event);
  21901. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21902. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  21903. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  21904. _this.isOutlineTaskCancelToken[_tindex2] = null
  21905. _this.isOutlineTaskCancelSource[_tindex2].close();
  21906. _this.isOutlineTaskCancelSource[_tindex2] = null;
  21907. };
  21908. },
  21909. async aiDetail2(msg, index) {
  21910. let _this = this
  21911. const _tindex = 'task-' + index
  21912. const _tindex2 = index
  21913. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21914. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21915. if (_this.infoData.length) {
  21916. for (var i = 0; i < _this.infoData.length; i++) {
  21917. if(_this.infoData[i].fileid){
  21918. fileid.push(_this.infoData[i].fileid)
  21919. }else {
  21920. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21921. if(_fileid){
  21922. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21923. _this.$forceUpdate();
  21924. if(_fileid != 1){
  21925. fileid.push(_fileid)
  21926. }
  21927. }
  21928. }
  21929. }
  21930. }
  21931. let messages = `NOTICE
  21932. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  21933. Language: ${this.getLang()}
  21934. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21935. Instruction: Based on the context, follow "Format example", write content.
  21936. #Context
  21937. ## 要求
  21938. ${msg}
  21939. ## 参考资料
  21940. 任务名字: ${_this.aiCallBack.task}
  21941. ## 优化信息
  21942. ${_this.aiCallBack.taskDetail}
  21943. # Format example
  21944. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  21945. _this.taskDetailLoading2.push(_tindex)
  21946. _this.ttaskDetailLoading2.push(_tindex)
  21947. let _uuid = uuidv4();
  21948. // let params = JSON.stringify({
  21949. // // "model": "Chat",
  21950. // model: 'gpt-3.5-turbo',
  21951. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21952. // max_tokens: 4096,
  21953. // top_p: 1,
  21954. // frequency_penalty: 0,
  21955. // presence_penalty: 0,
  21956. // messages: [{
  21957. // content: messages,
  21958. // role: 'user'
  21959. // }],
  21960. // uid: _uuid,
  21961. // mind_map_question: "",
  21962. // })
  21963. let params = {
  21964. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21965. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  21966. session_name: _uuid,
  21967. userId: _this.userid,
  21968. uid: _uuid,
  21969. file_ids: fileid.length ? [...fileid] : '',
  21970. model: 'gpt-4o-2024-08-06',
  21971. temperature: this.mode == 3 ? 0.5 : 0.1,
  21972. }
  21973. // let params = JSON.stringify({
  21974. // message: {
  21975. // anthropic_version: "bedrock-2023-05-31",
  21976. // max_tokens: 4096,
  21977. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21978. // top_p: 1,
  21979. // messages: [{
  21980. // "role": "user",
  21981. // "content": messages
  21982. // }] ,
  21983. // },
  21984. // uid: _uuid,
  21985. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21986. // });
  21987. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21988. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21989. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21990. console.log(response);
  21991. // let data = response.data.FunctionResponse
  21992. // if (data.choices && data.choices.length && data.choices[0].message) {
  21993. // console.log(data.choices[0].message.content);
  21994. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21995. // _this.$forceUpdate()
  21996. // }
  21997. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21998. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21999. } else {
  22000. _this.$message.warning(response.data.FunctionResponse.result);
  22001. }
  22002. }).catch(function (error) {
  22003. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  22004. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  22005. if(error && error.message != 'Request canceled by the user.'){
  22006. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22007. }
  22008. console.log(error);
  22009. });
  22010. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  22011. },
  22012. aiDetail2getAiContent(_uid, loading, _tindex2) {
  22013. let _source;
  22014. try {
  22015. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22016. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22017. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22018. } catch(error) {
  22019. console.log('EventSource error:', error);
  22020. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22021. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22022. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22023. return;
  22024. }
  22025. let _allText = "";
  22026. let _mdText = "";
  22027. let _iindex = 0
  22028. _source.onmessage = _e => {
  22029. let _eData = JSON.parse(_e.data).content;
  22030. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22031. //对话已经完成
  22032. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22033. _source.close();
  22034. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22035. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22036. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  22037. return;
  22038. } else {
  22039. _iindex++
  22040. //对话还在继续
  22041. let _text = "";
  22042. _text = _eData.replaceAll("'", "");
  22043. if (_allText == "") {
  22044. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22045. } else {
  22046. _allText += _text;
  22047. }
  22048. _mdText = _allText + "_";
  22049. _mdText = _mdText.replace(/\\n/g, "\n");
  22050. _mdText = _mdText.replace(/\\/g, "");
  22051. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22052. //转化返回的回复流数据
  22053. if(_iindex == 10){
  22054. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  22055. _iindex = 0
  22056. }
  22057. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  22058. // 处理流数据
  22059. }
  22060. // this.$forceUpdate();
  22061. };
  22062. let _this = this
  22063. _source.onerror = function(event) {
  22064. // 处理错误,可以尝试重新连接
  22065. console.log('EventSource error:', event);
  22066. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22067. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  22068. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  22069. _source.close();
  22070. };
  22071. },
  22072. async aiDetail3(msg, index, tindex) {
  22073. let _this = this
  22074. const _tindex = 'task-' + index + tindex
  22075. const _tindex2 = index
  22076. const _tindex3 = tindex
  22077. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22078. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22079. if (_this.infoData.length) {
  22080. for (var i = 0; i < _this.infoData.length; i++) {
  22081. if(_this.infoData[i].fileid){
  22082. fileid.push(_this.infoData[i].fileid)
  22083. }else {
  22084. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22085. if(_fileid){
  22086. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22087. _this.$forceUpdate();
  22088. if(_fileid != 1){
  22089. fileid.push(_fileid)
  22090. }
  22091. }
  22092. }
  22093. }
  22094. }
  22095. // **重点考虑该任务及工具名和工具内容的情况下*
  22096. let messages = `NOTICE
  22097. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  22098. Language: ${this.getLang()}
  22099. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22100. Instruction: Based on the context, follow "Format example", write content.
  22101. #Context
  22102. ## 参考内容
  22103. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22104. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22105. 工具名称:${_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 : '无'}
  22106. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  22107. ## 要求
  22108. ${msg} 输出格式和内容要求参考#格式与要求
  22109. # Format example
  22110. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  22111. _this.taskDetailLoading3.push(_tindex)
  22112. _this.ttaskDetailLoading3.push(_tindex)
  22113. let _uuid = uuidv4();
  22114. // let params = JSON.stringify({
  22115. // // "model": "Chat",
  22116. // model: 'gpt-3.5-turbo',
  22117. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22118. // max_tokens: 4096,
  22119. // top_p: 1,
  22120. // frequency_penalty: 0,
  22121. // presence_penalty: 0,
  22122. // messages: [{
  22123. // content: messages,
  22124. // role: 'user'
  22125. // }],
  22126. // uid: _uuid,
  22127. // mind_map_question: "",
  22128. // })
  22129. let params = {
  22130. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22131. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22132. session_name: _uuid,
  22133. userId: _this.userid,
  22134. uid: _uuid,
  22135. file_ids: fileid.length ? [...fileid] : '',
  22136. model: 'gpt-4o-2024-08-06',
  22137. temperature: this.mode == 3 ? 0.5 : 0.1,
  22138. }
  22139. // let params = JSON.stringify({
  22140. // message: {
  22141. // anthropic_version: "bedrock-2023-05-31",
  22142. // max_tokens: 4096,
  22143. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22144. // top_p: 1,
  22145. // messages: [{
  22146. // "role": "user",
  22147. // "content": messages
  22148. // }] ,
  22149. // },
  22150. // uid: _uuid,
  22151. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22152. // });
  22153. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22154. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22155. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22156. console.log(response);
  22157. let data = response.data.FunctionResponse
  22158. // if (data.choices && data.choices.length && data.choices[0].message) {
  22159. // console.log(data.choices[0].message.content);
  22160. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  22161. // _this.$forceUpdate()
  22162. // }
  22163. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  22164. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22165. } else {
  22166. _this.$message.warning(response.data.FunctionResponse.result);
  22167. }
  22168. }).catch(function (error) {
  22169. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  22170. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  22171. if(error && error.message != 'Request canceled by the user.'){
  22172. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22173. }
  22174. console.log(error);
  22175. });
  22176. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  22177. },
  22178. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  22179. let _source;
  22180. try {
  22181. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22182. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22183. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22184. } catch(error) {
  22185. console.log('EventSource error:', event);
  22186. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22187. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22188. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  22189. return;
  22190. }
  22191. let _allText = "";
  22192. let _mdText = "";
  22193. let _iindex = 0
  22194. _source.onmessage = _e => {
  22195. let _eData = JSON.parse(_e.data).content;
  22196. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22197. //对话已经完成
  22198. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22199. _source.close();
  22200. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  22201. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22202. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  22203. return;
  22204. } else {
  22205. _iindex++
  22206. //对话还在继续
  22207. let _text = "";
  22208. _text = _eData.replaceAll("'", "");
  22209. if (_allText == "") {
  22210. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22211. } else {
  22212. _allText += _text;
  22213. }
  22214. _mdText = _allText + "_";
  22215. _mdText = _mdText.replace(/\\n/g, "\n");
  22216. _mdText = _mdText.replace(/\\/g, "");
  22217. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22218. //转化返回的回复流数据
  22219. if(_iindex == 10){
  22220. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  22221. _iindex = 0
  22222. }
  22223. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  22224. // 处理流数据
  22225. }
  22226. // this.$forceUpdate();
  22227. };
  22228. let _this = this
  22229. _source.onerror = function(event) {
  22230. // 处理错误,可以尝试重新连接
  22231. console.log('EventSource error:', event);
  22232. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22233. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  22234. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  22235. _source.close();
  22236. };
  22237. },
  22238. async aiDetail4(msg, index) {
  22239. if (!msg.length) {
  22240. this.$message.error("请添加评价后才能优化")
  22241. return
  22242. }
  22243. let _this = this
  22244. const _tindex = 'task-' + index
  22245. const _tindex2 = index
  22246. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22247. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22248. if (_this.infoData.length) {
  22249. for (var i = 0; i < _this.infoData.length; i++) {
  22250. if(_this.infoData[i].fileid){
  22251. fileid.push(_this.infoData[i].fileid)
  22252. }else {
  22253. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22254. if(_fileid){
  22255. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22256. _this.$forceUpdate();
  22257. if(_fileid != 1){
  22258. fileid.push(_fileid)
  22259. }
  22260. }
  22261. }
  22262. }
  22263. }
  22264. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  22265. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  22266. if(_this.pingjiaInfoData[index][i].fileid){
  22267. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  22268. }
  22269. }
  22270. }
  22271. var _text = ""
  22272. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  22273. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  22274. // _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 : ''} `
  22275. _text += `目标:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].value} 评价标准:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].detail} 核心素养:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].target ? _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].target : ''} `
  22276. }
  22277. }
  22278. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  22279. // **重点考虑该任务详情**
  22280. // let messages = `
  22281. // Language: ${this.getLang()}
  22282. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  22283. // #Context
  22284. // ## 参考内容
  22285. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22286. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22287. // 评价设计:${_text}
  22288. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  22289. // ## 要求
  22290. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  22291. // # 格式与要求
  22292. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  22293. // # Format example
  22294. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  22295. let messages = `
  22296. Language: ${this.getLang()}
  22297. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  22298. #Context
  22299. ## 参考内容
  22300. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22301. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  22302. ${_text ? '评价设计:'+_text : ''}
  22303. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  22304. ## 要求
  22305. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  22306. # 格式与要求
  22307. 核心素养:从教案中提取
  22308. 目标:从教案中提取
  22309. 评价标准:从教案中提取评价标准
  22310. # Format example
  22311. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  22312. _this.taskDetailLoading4.push(_tindex)
  22313. // let params = JSON.stringify({
  22314. // // "model": "Chat",
  22315. // model: 'gpt-3.5-turbo',
  22316. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22317. // max_tokens: 4096,
  22318. // top_p: 1,
  22319. // frequency_penalty: 0,
  22320. // presence_penalty: 0,
  22321. // messages: [{
  22322. // content: messages,
  22323. // role: 'user'
  22324. // }],
  22325. // stream: false,
  22326. // uid: this.userid,
  22327. // mind_map_question: "",
  22328. // })
  22329. let params = {
  22330. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22331. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22332. session_name: uuidv4(),
  22333. userId: _this.userid,
  22334. file_ids: fileid.length ? [...fileid] : '',
  22335. model: 'gpt-4o-2024-08-06',
  22336. temperature: this.mode == 3 ? 0.5 : 0.1,
  22337. }
  22338. // let params = JSON.stringify({
  22339. // message: {
  22340. // anthropic_version: "bedrock-2023-05-31",
  22341. // max_tokens: 4096,
  22342. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22343. // top_p: 1,
  22344. // messages: [{
  22345. // content: messages,
  22346. // role: 'user'
  22347. // }], //
  22348. // },
  22349. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22350. // });
  22351. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22352. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  22353. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  22354. console.log(response);
  22355. let data = response.data.FunctionResponse
  22356. // if (data.choices && data.choices.length && data.choices[0].message) {
  22357. // console.log(data.choices[0].message.content);
  22358. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  22359. // _this.$forceUpdate()
  22360. // }
  22361. if (data.message) {
  22362. console.log(data.message);
  22363. try {
  22364. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  22365. } catch (e) {
  22366. console.log("error_________________" + e);
  22367. // _this.$message.error(data.message)
  22368. try {
  22369. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  22370. let match = data.message.match(regex);
  22371. let elist = JSON.parse(match[0])
  22372. elist = elist.filter(el=>{
  22373. el.isai = 1
  22374. return el
  22375. })
  22376. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  22377. // var message = data.message;
  22378. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  22379. // var jsonEnd = message.indexOf("```", jsonStart);
  22380. // if (jsonStart !== -1 && jsonEnd !== -1) {
  22381. // var jsonString = message
  22382. // .substring(jsonStart, jsonEnd)
  22383. // .trim();
  22384. // var _data2 = JSON.parse(jsonString);
  22385. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  22386. // }
  22387. } catch (error) {
  22388. }
  22389. }
  22390. _this.$forceUpdate()
  22391. }
  22392. // if (data.result) {
  22393. // console.log(data.result);
  22394. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  22395. // _this.$forceUpdate()
  22396. // }
  22397. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22398. }).catch(function (error) {
  22399. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22400. if(error && error.message != 'Request canceled by the user.'){
  22401. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22402. }
  22403. console.log(error);
  22404. });
  22405. },
  22406. async aiDetail5(msg, index) {
  22407. let _this = this
  22408. const _tindex = 'task-' + index
  22409. const _tindex2 = index
  22410. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22411. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22412. if (_this.infoData.length) {
  22413. for (var i = 0; i < _this.infoData.length; i++) {
  22414. if(_this.infoData[i].fileid){
  22415. fileid.push(_this.infoData[i].fileid)
  22416. }else {
  22417. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22418. if(_fileid){
  22419. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22420. _this.$forceUpdate();
  22421. if(_fileid != 1){
  22422. fileid.push(_fileid)
  22423. }
  22424. }
  22425. }
  22426. }
  22427. }
  22428. let url = []
  22429. if (this.infoData.length) {
  22430. for (var i = 0; i < this.infoData.length; i++) {
  22431. url.push(this.infoData[i].url)
  22432. }
  22433. }
  22434. var _text = ""
  22435. var _text2 = ""
  22436. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  22437. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  22438. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  22439. }
  22440. let messages = `
  22441. Language: ${this.getLang()}
  22442. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  22443. --------
  22444. ## 要求
  22445. ${msg}
  22446. -------
  22447. ## 本教案描述
  22448. ${_this.aiCallBack}
  22449. -------
  22450. ## 课程大纲
  22451. ${_text}
  22452. -------
  22453. ## 其他教学任务教案
  22454. ${_text2}`
  22455. // ## 补充参考资料
  22456. // - 补充资料:${url.join(",")}
  22457. // - 补充描述:${this.courseText2}
  22458. _this.taskDetailLoading5.push(_tindex)
  22459. _this.ttaskDetailLoading5.push(_tindex)
  22460. let _uuid = uuidv4();
  22461. // let params = JSON.stringify({
  22462. // // "model": "Chat",
  22463. // model: 'gpt-3.5-turbo',
  22464. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22465. // max_tokens: 4096,
  22466. // top_p: 1,
  22467. // frequency_penalty: 0,
  22468. // presence_penalty: 0,
  22469. // messages: [{
  22470. // content: messages,
  22471. // role: 'user'
  22472. // }],
  22473. // uid: _uuid,
  22474. // mind_map_question: "",
  22475. // })
  22476. let params = {
  22477. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22478. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22479. session_name: _uuid,
  22480. userId: _this.userid,
  22481. uid: _uuid,
  22482. file_ids: fileid.length ? [...fileid] : '',
  22483. model: 'gpt-4o-2024-08-06',
  22484. temperature: this.mode == 3 ? 0.5 : 0.1,
  22485. }
  22486. // let params = JSON.stringify({
  22487. // message: {
  22488. // anthropic_version: "bedrock-2023-05-31",
  22489. // max_tokens: 4096,
  22490. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22491. // top_p: 1,
  22492. // messages: [{
  22493. // "role": "user",
  22494. // "content": messages
  22495. // }] ,
  22496. // },
  22497. // uid: _uuid,
  22498. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22499. // });
  22500. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22501. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22502. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22503. console.log(response);
  22504. // let data = response.data.FunctionResponse
  22505. // if (data.choices && data.choices.length && data.choices[0].message) {
  22506. // console.log(data.choices[0].message.content);
  22507. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22508. // _this.$forceUpdate()
  22509. // }
  22510. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22511. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22512. } else {
  22513. _this.$message.warning(response.data.FunctionResponse.result);
  22514. }
  22515. }).catch(function (error) {
  22516. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  22517. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  22518. }
  22519. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  22520. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  22521. }
  22522. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  22523. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  22524. if(error && error.message != 'Request canceled by the user.'){
  22525. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22526. }
  22527. console.log(error);
  22528. });
  22529. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  22530. },
  22531. aiDetail5getAiContent(_uid, loading, _tindex2) {
  22532. let _source;
  22533. try {
  22534. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22535. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22536. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22537. } catch(error){
  22538. console.log('EventSource error:', error);
  22539. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22540. if(this.taskDetailLoading5.indexOf(loading) != -1){
  22541. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22542. }
  22543. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  22544. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22545. }
  22546. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22547. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22548. return;
  22549. }
  22550. let _allText = "";
  22551. let _mdText = "";
  22552. let _iindex = 0
  22553. _source.onmessage = _e => {
  22554. let _eData = JSON.parse(_e.data).content;
  22555. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22556. //对话已经完成
  22557. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22558. _source.close();
  22559. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  22560. if(this.taskDetailLoading5.indexOf(loading) != -1){
  22561. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22562. }
  22563. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  22564. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22565. }
  22566. return;
  22567. } else {
  22568. _iindex++
  22569. //对话还在继续
  22570. let _text = "";
  22571. _text = _eData.replaceAll("'", "");
  22572. if (_allText == "") {
  22573. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22574. } else {
  22575. _allText += _text;
  22576. }
  22577. _mdText = _allText + "_";
  22578. _mdText = _mdText.replace(/\\n/g, "\n");
  22579. _mdText = _mdText.replace(/\\/g, "");
  22580. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22581. //转化返回的回复流数据
  22582. if(_iindex == 10){
  22583. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  22584. _iindex = 0
  22585. }
  22586. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  22587. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22588. }
  22589. // 处理流数据
  22590. }
  22591. // this.$forceUpdate();
  22592. };
  22593. let _this = this
  22594. _source.onerror = function(event) {
  22595. // 处理错误,可以尝试重新连接
  22596. console.log('EventSource error:', event);
  22597. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22598. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  22599. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  22600. }
  22601. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  22602. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  22603. }
  22604. _source.close();
  22605. };
  22606. },
  22607. async aiDetail52(msg, index, callback) {
  22608. let _this = this
  22609. const _tindex = 'task-' + index
  22610. const _tindex2 = index
  22611. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22612. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22613. if (_this.infoData.length) {
  22614. for (var i = 0; i < _this.infoData.length; i++) {
  22615. if(_this.infoData[i].fileid){
  22616. fileid.push(_this.infoData[i].fileid)
  22617. }else {
  22618. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22619. if(_fileid){
  22620. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22621. _this.$forceUpdate();
  22622. if(_fileid != 1){
  22623. fileid.push(_fileid)
  22624. }
  22625. }
  22626. }
  22627. }
  22628. }
  22629. let url = []
  22630. if (this.infoData.length) {
  22631. for (var i = 0; i < this.infoData.length; i++) {
  22632. url.push(this.infoData[i].url)
  22633. }
  22634. }
  22635. let taskN = []
  22636. let taskD = []
  22637. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  22638. if(_tindex2 != ti){
  22639. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  22640. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  22641. }
  22642. }
  22643. let messages = `NOTICE
  22644. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  22645. Language: ${this.getLang()}
  22646. ATTENTION: follow "Language"
  22647. #Context
  22648. ## 要求
  22649. ${msg}
  22650. ## 补充描述
  22651. 课程简要描述:${_this.courseText}
  22652. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  22653. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  22654. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  22655. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22656. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  22657. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22658. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22659. `
  22660. // ## 补充参考资料
  22661. // - 补充资料:${url.join(",")}
  22662. // - 补充描述:${this.courseText2}
  22663. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  22664. _this.taskDetailLoading5.push(_tindex)
  22665. }
  22666. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  22667. _this.ttaskDetailLoading5.push(_tindex)
  22668. }
  22669. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  22670. let _uuid = uuidv4();
  22671. // let params = JSON.stringify({
  22672. // // "model": "Chat",
  22673. // model: 'gpt-3.5-turbo',
  22674. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22675. // max_tokens: 4096,
  22676. // top_p: 1,
  22677. // frequency_penalty: 0,
  22678. // presence_penalty: 0,
  22679. // messages: [{
  22680. // content: messages,
  22681. // role: 'user'
  22682. // }],
  22683. // uid: _uuid,
  22684. // mind_map_question: "",
  22685. // })
  22686. let params = {
  22687. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22688. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22689. session_name: _uuid,
  22690. userId: _this.userid,
  22691. uid: _uuid,
  22692. file_ids: fileid.length ? [...fileid] : '',
  22693. model: 'gpt-4o-2024-08-06',
  22694. temperature: this.mode == 3 ? 0.5 : 0.1,
  22695. }
  22696. // let params = JSON.stringify({
  22697. // message: {
  22698. // anthropic_version: "bedrock-2023-05-31",
  22699. // max_tokens: 4096,
  22700. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22701. // top_p: 1,
  22702. // messages: [{
  22703. // "role": "user",
  22704. // "content": messages
  22705. // }] ,
  22706. // },
  22707. // uid: _uuid,
  22708. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22709. // });
  22710. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22711. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  22712. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22713. console.log(response);
  22714. // let data = response.data.FunctionResponse
  22715. // if (data.choices && data.choices.length && data.choices[0].message) {
  22716. // console.log(data.choices[0].message.content);
  22717. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22718. // _this.$forceUpdate()
  22719. // }
  22720. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22721. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22722. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  22723. } else {
  22724. _this.$message.warning(response.data.FunctionResponse.result);
  22725. }
  22726. _this.isTeacherTaskCancelToken2[index] = null
  22727. }).catch(function (error) {
  22728. if(error && error.message != 'Request canceled by the user.'){
  22729. _this.isTeacherTaskCancelToken2[index] = null
  22730. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  22731. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  22732. }
  22733. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  22734. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  22735. }
  22736. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  22737. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  22738. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22739. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  22740. confirmButtonText: "确定",
  22741. cancelButtonText: "取消",
  22742. distinguishCancelAndClose: true,
  22743. type: "warning",
  22744. customClass: 'custom-confirm-box'
  22745. })
  22746. .then(() => {
  22747. _this.aiDetail52(msg, index, callback)
  22748. }).catch((v) => {
  22749. console.log(v);
  22750. callback ? callback() : ''
  22751. })
  22752. setTimeout(() => {
  22753. _this.setTipsIndex()
  22754. }, 500)
  22755. }
  22756. console.log(error);
  22757. });
  22758. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  22759. },
  22760. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  22761. try {
  22762. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22763. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22764. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22765. } catch(error) {
  22766. console.log('EventSource error:', error);
  22767. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22768. if(this.taskDetailLoading5.indexOf(loading) != -1){
  22769. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22770. }
  22771. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  22772. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22773. }
  22774. this.isTeacherTaskCancelToken2[_tindex2] = null
  22775. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  22776. confirmButtonText: "确定",
  22777. cancelButtonText: "取消",
  22778. distinguishCancelAndClose: true,
  22779. type: "warning",
  22780. customClass: 'custom-confirm-box'
  22781. })
  22782. .then(() => {
  22783. _this.aiDetail52(msg, _tindex2, callback)
  22784. }).catch((v) => {
  22785. console.log(v);
  22786. callback ? callback() : ''
  22787. })
  22788. setTimeout(() => {
  22789. _this.setTipsIndex()
  22790. }, 500)
  22791. return;
  22792. }
  22793. let _allText = "";
  22794. let _mdText = "";
  22795. this.allTextArray[_tindex2] = ""
  22796. let _iindex = 0
  22797. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  22798. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  22799. let _eData = JSON.parse(_e.data).content;
  22800. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22801. //对话已经完成
  22802. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22803. this.isTeacherTaskCancelSource[_tindex2].close();
  22804. this.isTeacherTaskCancelSource[_tindex2] = null;
  22805. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  22806. if(this.taskDetailLoading5.indexOf(loading) != -1){
  22807. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22808. }
  22809. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  22810. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22811. }
  22812. this.isTeacherTaskCancelToken2[_tindex2] = null
  22813. callback ? callback() : ''
  22814. this.saveCourse()
  22815. return;
  22816. } else {
  22817. _iindex++
  22818. //对话还在继续
  22819. let _text = "";
  22820. _text = _eData.replaceAll("'", "");
  22821. if (_allText == "") {
  22822. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22823. } else {
  22824. _allText += _text;
  22825. }
  22826. _mdText = _allText + "_";
  22827. _mdText = _mdText.replace(/\\n/g, "\n");
  22828. _mdText = _mdText.replace(/\\/g, "");
  22829. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22830. //转化返回的回复流数据
  22831. if(_iindex == 10){
  22832. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  22833. _iindex = 0
  22834. }
  22835. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  22836. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22837. }
  22838. // 处理流数据
  22839. }
  22840. };
  22841. let _this = this
  22842. _this.isTeacherTaskCancelSource.onerror = function(event) {
  22843. // 处理错误,可以尝试重新连接
  22844. console.log('EventSource error:', event);
  22845. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22846. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  22847. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  22848. }
  22849. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  22850. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  22851. }
  22852. _this.isTeacherTaskCancelSource[_tindex2].close();
  22853. _this.isTeacherTaskCancelSource[_tindex2] = null;
  22854. _this.isTeacherTaskCancelToken2[_tindex2] = null
  22855. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  22856. confirmButtonText: "确定",
  22857. cancelButtonText: "取消",
  22858. distinguishCancelAndClose: true,
  22859. type: "warning",
  22860. customClass: 'custom-confirm-box'
  22861. })
  22862. .then(() => {
  22863. _this.aiDetail52(msg, _tindex2, callback)
  22864. }).catch((v) => {
  22865. console.log(v);
  22866. callback ? callback() : ''
  22867. })
  22868. setTimeout(() => {
  22869. _this.setTipsIndex()
  22870. }, 500)
  22871. };
  22872. },
  22873. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  22874. let _mdText = "";
  22875. let _eData = JSON.parse(_e.data).content;
  22876. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22877. //对话已经完成
  22878. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22879. _source.close();
  22880. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22881. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  22882. return;
  22883. } else {
  22884. //对话还在继续
  22885. let _text = "";
  22886. _text = _eData.replaceAll("'", "");
  22887. if (this.allTextArray[_tindex2] == "") {
  22888. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22889. } else {
  22890. this.allTextArray[_tindex2] += _text;
  22891. }
  22892. _mdText = this.allTextArray[_tindex2] + "_";
  22893. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  22894. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  22895. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  22896. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  22897. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  22898. // 处理流数据
  22899. }
  22900. },
  22901. async aiCpote(msg, callback) {
  22902. let _this = this
  22903. let _index = _this.aitype.replace("aiC","c")
  22904. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22905. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22906. if (_this.infoData.length) {
  22907. for (var i = 0; i < _this.infoData.length; i++) {
  22908. if(_this.infoData[i].fileid){
  22909. fileid.push(_this.infoData[i].fileid)
  22910. }else {
  22911. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22912. if(_fileid){
  22913. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22914. _this.$forceUpdate();
  22915. if(_fileid != 1){
  22916. fileid.push(_fileid)
  22917. }
  22918. }
  22919. }
  22920. }
  22921. }
  22922. let sub = []
  22923. if (this.courseTypeId.length) {
  22924. for (var i = 0; i < this.courseTypeId.length; i++) {
  22925. let _sid = this.courseTypeId[i]
  22926. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22927. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22928. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22929. }
  22930. }
  22931. }
  22932. }
  22933. let mclass = []
  22934. if (this.courseTypeId.length) {
  22935. for (var i = 0; i < this.courseTypeId.length; i++) {
  22936. let _sid = this.courseTypeId[i]
  22937. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22938. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22939. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22940. }
  22941. }
  22942. }
  22943. }
  22944. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  22945. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  22946. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  22947. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  22948. let messages = `NOTICE
  22949. Role: 你是创建课程的老师,可以参考知识库的内容去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  22950. Language: ${this.getLang()}
  22951. ATTENTION: follow "Language"
  22952. ${msg}
  22953. ## 课程简介
  22954. 课程名字:${this.courseName}
  22955. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22956. ${sub.length ? '学科:' + sub.join(",") : ''}
  22957. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22958. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  22959. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  22960. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  22961. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  22962. _this.cpoteLoading[_index] = true
  22963. _this.cpotetLoading[_index] = true
  22964. let _uuid = uuidv4();
  22965. // let params = JSON.stringify({
  22966. // // "model": "Chat",
  22967. // model: 'gpt-3.5-turbo',
  22968. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22969. // max_tokens: 4096,
  22970. // top_p: 1,
  22971. // frequency_penalty: 0,
  22972. // presence_penalty: 0,
  22973. // messages: [{
  22974. // content: messages,
  22975. // role: 'user'
  22976. // }],
  22977. // uid: _uuid,
  22978. // mind_map_question: "",
  22979. // })
  22980. let params = {
  22981. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22982. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22983. session_name: _uuid,
  22984. userId: _this.userid,
  22985. uid: _uuid,
  22986. file_ids: fileid.length ? [...fileid] : '',
  22987. model: 'gpt-4o-2024-08-06',
  22988. temperature: this.mode == 3 ? 0.5 : 0.1,
  22989. }
  22990. // let params = JSON.stringify({
  22991. // message: {
  22992. // anthropic_version: "bedrock-2023-05-31",
  22993. // max_tokens: 4096,
  22994. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22995. // top_p: 1,
  22996. // messages: [{
  22997. // "role": "user",
  22998. // "content": messages
  22999. // }] ,
  23000. // },
  23001. // uid: _uuid,
  23002. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23003. // });
  23004. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23005. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  23006. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23007. console.log(response);
  23008. // let data = response.data.FunctionResponse
  23009. // if (data.choices && data.choices.length && data.choices[0].message) {
  23010. // console.log(data.choices[0].message.content);
  23011. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  23012. // _this.$forceUpdate()
  23013. // }
  23014. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  23015. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23016. } else {
  23017. _this.$message.warning(response.data.FunctionResponse.result);
  23018. }
  23019. }).catch(function (error) {
  23020. _this.cpoteLoading[_index] = false
  23021. _this.cpotetLoading[_index] = false
  23022. callback ? callback() : ''
  23023. if(error && error.message != 'Request canceled by the user.'){
  23024. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23025. }
  23026. console.log(error);
  23027. });
  23028. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  23029. },
  23030. aiCpotegetAiContent(_uid, loading, callback) {
  23031. let _source;
  23032. try {
  23033. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23034. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23035. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23036. } catch(error){
  23037. console.log('EventSource error:', error);
  23038. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23039. this.cpoteLoading[loading] = false
  23040. this.cpotetLoading[loading] = false
  23041. return;
  23042. }
  23043. let _allText = "";
  23044. let _mdText = "";
  23045. let _iindex = 0
  23046. _source.onmessage = _e => {
  23047. let _eData = JSON.parse(_e.data).content;
  23048. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23049. //对话已经完成
  23050. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23051. _source.close();
  23052. this.cpote[loading] = _mdText;
  23053. this.cpoteLoading[loading] = false
  23054. this.cpotetLoading[loading] = false
  23055. callback ? callback() : ''
  23056. this.saveCourse()
  23057. return;
  23058. } else {
  23059. _iindex++
  23060. //对话还在继续
  23061. let _text = "";
  23062. _text = _eData.replaceAll("'", "");
  23063. if (_allText == "") {
  23064. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23065. } else {
  23066. _allText += _text;
  23067. }
  23068. _mdText = _allText + "_";
  23069. _mdText = _mdText.replace(/\\n/g, "\n");
  23070. _mdText = _mdText.replace(/\\/g, "");
  23071. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23072. //转化返回的回复流数据
  23073. if(_iindex == 10){
  23074. this.cpote[loading] = _mdText;
  23075. _iindex = 0
  23076. }
  23077. this.cpoteLoading[loading] = false
  23078. // 处理流数据
  23079. }
  23080. // this.$forceUpdate();
  23081. };
  23082. let _this = this
  23083. _source.onerror = function(event) {
  23084. // 处理错误,可以尝试重新连接
  23085. console.log('EventSource error:', event);
  23086. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23087. _this.cpoteLoading[loading] = false
  23088. _this.cpotetLoading[loading] = false
  23089. _source.close();
  23090. };
  23091. },
  23092. async aiteacherTextDetail(msg) {
  23093. let _this = this
  23094. let fileid = []
  23095. if (_this.teacherInfoData.length) {
  23096. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  23097. if(_this.teacherInfoData[i].fileid){
  23098. fileid.push(_this.teacherInfoData[i].fileid)
  23099. }else {
  23100. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  23101. if(_fileid){
  23102. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23103. _this.$forceUpdate();
  23104. if(_fileid != 1){
  23105. fileid.push(_fileid)
  23106. }
  23107. }
  23108. }
  23109. }
  23110. }
  23111. _this.teacherTextLoading = true
  23112. _this.tteacherTextLoading = true
  23113. let sub = []
  23114. if (_this.courseTypeId.length) {
  23115. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23116. let _sid = _this.courseTypeId[i]
  23117. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23118. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23119. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23120. }
  23121. }
  23122. }
  23123. }
  23124. let mclass = []
  23125. if (_this.courseTypeId.length) {
  23126. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23127. let _sid = _this.courseTypeId[i]
  23128. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23129. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23130. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23131. }
  23132. }
  23133. }
  23134. }
  23135. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  23136. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  23137. let messages = `NOTICE
  23138. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23139. Language: ${this.getLang()}
  23140. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23141. Instruction: Based on the context, follow "Format example", write content.
  23142. #Context
  23143. ## 参考资料
  23144. 课程名字:${this.courseName}
  23145. ${sub.length ? '学科:' + sub.join(",") : ''}
  23146. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23147. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  23148. ## 要求
  23149. ${msg}
  23150. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23151. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  23152. let _uuid = uuidv4();
  23153. // let params = JSON.stringify({
  23154. // // "model": "Chat",
  23155. // model: 'gpt-3.5-turbo',
  23156. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23157. // max_tokens: 4096,
  23158. // top_p: 1,
  23159. // frequency_penalty: 0,
  23160. // presence_penalty: 0,
  23161. // messages: [{
  23162. // content: messages,
  23163. // role: 'user'
  23164. // }],
  23165. // uid: _uuid,
  23166. // mind_map_question: "",
  23167. // })
  23168. let params = {
  23169. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23170. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23171. session_name: _uuid,
  23172. userId: _this.userid,
  23173. uid: _uuid,
  23174. file_ids: fileid.length ? [...fileid] : '',
  23175. model: 'gpt-4o-2024-08-06',
  23176. temperature: this.mode == 3 ? 0.5 : 0.1,
  23177. }
  23178. // let params = JSON.stringify({
  23179. // message: {
  23180. // anthropic_version: "bedrock-2023-05-31",
  23181. // max_tokens: 4096,
  23182. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23183. // top_p: 1,
  23184. // messages: [{
  23185. // "role": "user",
  23186. // "content": messages
  23187. // }] ,
  23188. // },
  23189. // uid: _uuid,
  23190. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23191. // });
  23192. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23193. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  23194. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23195. console.log(response);
  23196. // let data = response.data.FunctionResponse
  23197. // if (data.choices && data.choices.length && data.choices[0].message) {
  23198. // _this.courseText = data.choices[0].message.content
  23199. // }
  23200. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23201. } else {
  23202. _this.$message.warning(response.data.FunctionResponse.result);
  23203. }
  23204. _this.isTeacherTextCancelToken = null
  23205. }).catch(function (error) {
  23206. _this.teacherTextLoading = false
  23207. _this.tteacherTextLoading = false
  23208. _this.isTeacherTextCancelToken = null
  23209. if(error && error.message != 'Request canceled by the user.'){
  23210. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23211. }
  23212. console.log(error);
  23213. });
  23214. await _this.aiteacherTextDetailgetAiContent(_uuid)
  23215. },
  23216. aiteacherTextDetailgetAiContent(_uid) {
  23217. try {
  23218. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23219. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23220. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23221. } catch(error) {
  23222. console.log('EventSource error:', event);
  23223. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23224. this.teacherTextLoading = false
  23225. this.tteacherTextLoading = false
  23226. this.isTeacherTextCancelToken = null
  23227. return;
  23228. }
  23229. let _allText = "";
  23230. let _mdText = "";
  23231. let _iindex = 0
  23232. this.isTeacherTextCancelSource.onmessage = _e => {
  23233. let _eData = JSON.parse(_e.data).content;
  23234. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23235. //对话已经完成
  23236. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23237. this.isTeacherTextCancelSource.close();
  23238. this.isTeacherTextCancelSource = null;
  23239. this.teacherCourseText = _mdText;
  23240. this.teacherTextLoading = false
  23241. this.tteacherTextLoading = false
  23242. this.teacherCourseTextB = false
  23243. this.isTeacherTextCancelToken = null
  23244. return;
  23245. } else {
  23246. _iindex++
  23247. //对话还在继续
  23248. let _text = "";
  23249. _text = _eData.replaceAll("'", "");
  23250. if (_allText == "") {
  23251. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23252. } else {
  23253. _allText += _text;
  23254. }
  23255. _mdText = _allText + "_";
  23256. _mdText = _mdText.replace(/\\n/g, "\n");
  23257. _mdText = _mdText.replace(/\\/g, "");
  23258. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23259. //转化返回的回复流数据
  23260. if(_iindex == 10){
  23261. this.teacherCourseText = _mdText;
  23262. _iindex = 0
  23263. }
  23264. if(this.teacherTextLoading){
  23265. this.teacherTextLoading = false
  23266. }
  23267. // 处理流数据
  23268. }
  23269. // this.$forceUpdate();
  23270. };
  23271. let _this = this
  23272. this.isTeacherTextCancelSource.onerror = function(event) {
  23273. // 处理错误,可以尝试重新连接
  23274. console.log('EventSource error:', event);
  23275. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23276. _this.teacherTextLoading = false
  23277. _this.tteacherTextLoading = false
  23278. _this.isTeacherTextCancelToken = null
  23279. _this.isTeacherTextCancelSource.close();
  23280. _this.isTeacherTextCancelSource = null;
  23281. };
  23282. },
  23283. async aitargetTextDetail(msg) {
  23284. let _this = this
  23285. let fileid = []
  23286. if (_this.teacherInfoData.length) {
  23287. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  23288. if(_this.teacherInfoData[i].fileid){
  23289. fileid.push(_this.teacherInfoData[i].fileid)
  23290. }else {
  23291. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  23292. if(_fileid){
  23293. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23294. _this.$forceUpdate();
  23295. if(_fileid != 1){
  23296. fileid.push(_fileid)
  23297. }
  23298. }
  23299. }
  23300. }
  23301. }
  23302. _this.targetTextLoading = true
  23303. _this.ttargetTextLoading = true
  23304. let sub = []
  23305. if (_this.courseTypeId.length) {
  23306. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23307. let _sid = _this.courseTypeId[i]
  23308. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23309. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23310. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23311. }
  23312. }
  23313. }
  23314. }
  23315. let mclass = []
  23316. if (_this.courseTypeId.length) {
  23317. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23318. let _sid = _this.courseTypeId[i]
  23319. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23320. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23321. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23322. }
  23323. }
  23324. }
  23325. }
  23326. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  23327. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  23328. let messages = `NOTICE
  23329. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23330. Language: ${this.getLang()}
  23331. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23332. Instruction: Based on the context, follow "Format example", write content.
  23333. #Context
  23334. ## 参考资料
  23335. 课程名字:${this.courseName}
  23336. ${sub.length ? '学科:' + sub.join(",") : ''}
  23337. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23338. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  23339. ## 要求
  23340. ${msg}
  23341. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23342. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  23343. let _uuid = uuidv4();
  23344. // let params = JSON.stringify({
  23345. // // "model": "Chat",
  23346. // model: 'gpt-3.5-turbo',
  23347. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23348. // max_tokens: 4096,
  23349. // top_p: 1,
  23350. // frequency_penalty: 0,
  23351. // presence_penalty: 0,
  23352. // messages: [{
  23353. // content: messages,
  23354. // role: 'user'
  23355. // }],
  23356. // uid: _uuid,
  23357. // mind_map_question: "",
  23358. // })
  23359. let params = {
  23360. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23361. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23362. session_name: _uuid,
  23363. userId: _this.userid,
  23364. uid: _uuid,
  23365. file_ids: fileid.length ? [...fileid] : '',
  23366. model: 'gpt-4o-2024-08-06',
  23367. temperature: this.mode == 3 ? 0.5 : 0.1,
  23368. }
  23369. // let params = JSON.stringify({
  23370. // message: {
  23371. // anthropic_version: "bedrock-2023-05-31",
  23372. // max_tokens: 4096,
  23373. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23374. // top_p: 1,
  23375. // messages: [{
  23376. // "role": "user",
  23377. // "content": messages
  23378. // }] ,
  23379. // },
  23380. // uid: _uuid,
  23381. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23382. // });
  23383. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23384. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  23385. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23386. console.log(response);
  23387. // let data = response.data.FunctionResponse
  23388. // if (data.choices && data.choices.length && data.choices[0].message) {
  23389. // _this.courseText = data.choices[0].message.content
  23390. // }
  23391. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23392. } else {
  23393. _this.$message.warning(response.data.FunctionResponse.result);
  23394. }
  23395. _this.isTargetCancelToken1 = null
  23396. }).catch(function (error) {
  23397. _this.targetTextLoading = false
  23398. _this.ttargetTextLoading = false
  23399. _this.isTargetCancelToken1 = null
  23400. if(error && error.message != 'Request canceled by the user.'){
  23401. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23402. }
  23403. console.log(error);
  23404. });
  23405. await _this.aitargetTextDetailgetAiContent(_uuid)
  23406. },
  23407. aitargetTextDetailgetAiContent(_uid) {
  23408. try {
  23409. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23410. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23411. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23412. } catch (error) {
  23413. console.log('EventSource error:', error);
  23414. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23415. this.targetTextLoading = false
  23416. this.ttargetTextLoading = false
  23417. this.isTargetCancelToken1 = null
  23418. return;
  23419. }
  23420. let _allText = "";
  23421. let _mdText = "";
  23422. let _iindex = 0
  23423. this.isTargetCancelSource1.onmessage = _e => {
  23424. let _eData = JSON.parse(_e.data).content;
  23425. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23426. //对话已经完成
  23427. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23428. this.isTargetCancelSource1.close();
  23429. this.isTargetCancelSource1 = null;
  23430. this.targetCourseText = _mdText;
  23431. this.targetTextLoading = false
  23432. this.ttargetTextLoading = false
  23433. this.targetCourseTextB = false
  23434. this.isTargetCancelToken1 = null
  23435. return;
  23436. } else {
  23437. _iindex++
  23438. //对话还在继续
  23439. let _text = "";
  23440. _text = _eData.replaceAll("'", "");
  23441. if (_allText == "") {
  23442. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23443. } else {
  23444. _allText += _text;
  23445. }
  23446. _mdText = _allText + "_";
  23447. _mdText = _mdText.replace(/\\n/g, "\n");
  23448. _mdText = _mdText.replace(/\\/g, "");
  23449. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23450. //转化返回的回复流数据
  23451. if(_iindex == 10){
  23452. this.targetCourseText = _mdText;
  23453. _iindex = 0
  23454. }
  23455. if(this.targetTextLoading){
  23456. this.targetTextLoading = false
  23457. }
  23458. // 处理流数据
  23459. }
  23460. // this.$forceUpdate();
  23461. };
  23462. let _this = this
  23463. this.isTargetCancelSource1.onerror = function(event) {
  23464. // 处理错误,可以尝试重新连接
  23465. console.log('EventSource error:', event);
  23466. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23467. _this.targetTextLoading = false
  23468. _this.ttargetTextLoading = false
  23469. _this.isTargetCancelToken1 = null
  23470. _this.isTargetCancelSource1.close();
  23471. _this.isTargetCancelSource1 = null;
  23472. };
  23473. },
  23474. async aitargetTextDetail2(msg) {
  23475. let _this = this
  23476. let fileid = []
  23477. if(_this.mubiaoInfoData.length){
  23478. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  23479. if(_this.mubiaoInfoData[i].fileid){
  23480. fileid.push(_this.mubiaoInfoData[i].fileid)
  23481. }else {
  23482. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  23483. if(_fileid){
  23484. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23485. _this.$forceUpdate();
  23486. if(_fileid != 1){
  23487. fileid.push(_fileid)
  23488. }
  23489. }
  23490. }
  23491. }
  23492. }
  23493. _this.targetTextLoading2 = true
  23494. _this.ttargetTextLoading2 = true
  23495. let sub = []
  23496. if (_this.courseTypeId.length) {
  23497. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23498. let _sid = _this.courseTypeId[i]
  23499. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23500. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23501. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23502. }
  23503. }
  23504. }
  23505. }
  23506. let mclass = []
  23507. if (_this.courseTypeId.length) {
  23508. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23509. let _sid = _this.courseTypeId[i]
  23510. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23511. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23512. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23513. }
  23514. }
  23515. }
  23516. }
  23517. if(sub.length){
  23518. let _fileid = _this.importFileid(sub)
  23519. fileid = [...fileid, ..._fileid]
  23520. }
  23521. let messages = `NOTICE
  23522. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23523. Language: ${this.getLang()}
  23524. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23525. Instruction: Based on the context, follow "Format example", write content.
  23526. #Context
  23527. ## 参考资料
  23528. 课程标题:${this.courseName}
  23529. ${sub.length ? '学科:' + sub.join(",") : ''}
  23530. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23531. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  23532. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  23533. ## 要求
  23534. ${msg}
  23535. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23536. let _uuid = uuidv4();
  23537. // let params = JSON.stringify({
  23538. // // "model": "Chat",
  23539. // model: 'gpt-3.5-turbo',
  23540. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23541. // max_tokens: 4096,
  23542. // top_p: 1,
  23543. // frequency_penalty: 0,
  23544. // presence_penalty: 0,
  23545. // messages: [{
  23546. // content: messages,
  23547. // role: 'user'
  23548. // }],
  23549. // uid: _uuid,
  23550. // mind_map_question: "",
  23551. // })
  23552. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  23553. let params = {
  23554. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23555. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23556. session_name: _uuid,
  23557. userId: _this.userid,
  23558. uid: _uuid,
  23559. file_ids: fileid.length ? [...fileid] : '',
  23560. model: 'gpt-4o-2024-08-06',
  23561. temperature: this.mode == 3 ? 0.5 : 0.1,
  23562. }
  23563. // let params = JSON.stringify({
  23564. // message: {
  23565. // anthropic_version: "bedrock-2023-05-31",
  23566. // max_tokens: 4096,
  23567. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23568. // top_p: 1,
  23569. // messages: [{
  23570. // "role": "user",
  23571. // "content": messages
  23572. // }] ,
  23573. // },
  23574. // uid: _uuid,
  23575. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23576. // });
  23577. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23578. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  23579. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23580. console.log(response);
  23581. // let data = response.data.FunctionResponse
  23582. // if (data.choices && data.choices.length && data.choices[0].message) {
  23583. // _this.courseText = data.choices[0].message.content
  23584. // }
  23585. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23586. } else {
  23587. _this.$message.warning(response.data.FunctionResponse.result);
  23588. }
  23589. _this.isTargetCancelToken2 = null
  23590. }).catch(function (error) {
  23591. _this.targetTextLoading2 = false
  23592. _this.ttargetTextLoading2 = false
  23593. _this.isTargetCancelToken2 = null
  23594. if(error && error.message != 'Request canceled by the user.'){
  23595. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23596. }
  23597. console.log(error);
  23598. });
  23599. await _this.aitargetTextDetail2getAiContent(_uuid)
  23600. },
  23601. importFileid(sub){
  23602. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  23603. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  23604. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  23605. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  23606. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  23607. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  23608. let _sub = converter(sub.join(","))
  23609. let fileid = []
  23610. for(var i = 0; i < this.fileidArray.length; i++){
  23611. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  23612. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  23613. fileid.push(this.fileidArray[i].fileid)
  23614. }
  23615. }
  23616. }
  23617. return fileid
  23618. },
  23619. selectFileid(){
  23620. let params = {
  23621. oid: this.oid,
  23622. };
  23623. this.ajax
  23624. .get(this.$store.state.api + "selectFileid", params)
  23625. .then((res) => {
  23626. this.fileidArray = res.data[0]
  23627. if(res.data[1].length){
  23628. this.fileidArray = res.data[1]
  23629. }
  23630. if(res.data[2].length){
  23631. this.fileidArray = res.data[2]
  23632. }
  23633. })
  23634. .catch((err) => {
  23635. console.error(err);
  23636. });
  23637. },
  23638. selectAiFileid(){
  23639. let params = {
  23640. oid: this.oid,
  23641. };
  23642. this.ajax
  23643. .get(this.$store.state.api + "selectAiFileid", params)
  23644. .then((res) => {
  23645. let fileIds = []
  23646. for(var i = 0; i < res.data[0].length; i++){
  23647. fileIds.push(res.data[0][i].fileid)
  23648. }
  23649. this.fileIds = fileIds
  23650. if(res.data[1].length){
  23651. fileIds = []
  23652. for(var i = 0; i < res.data[1].length; i++){
  23653. fileIds.push(res.data[0][i].fileid)
  23654. }
  23655. this.fileIds = fileIds
  23656. }
  23657. if(res.data[2].length){
  23658. fileIds = []
  23659. for(var i = 0; i < res.data[2].length; i++){
  23660. fileIds.push(res.data[0][i].fileid)
  23661. }
  23662. this.fileIds = fileIds
  23663. }
  23664. })
  23665. .catch((err) => {
  23666. console.error(err);
  23667. });
  23668. },
  23669. selectKnowFileid(){
  23670. let params = {
  23671. oid: this.oid,
  23672. sta: 'cn'
  23673. };
  23674. this.ajax
  23675. .get(this.$store.state.api + "selectKnowFileid", params)
  23676. .then((res) => {
  23677. this.knowFileArray = res.data[0]
  23678. if(res.data[1].length){
  23679. this.knowFileArray = res.data[1]
  23680. }
  23681. if(res.data[2].length){
  23682. this.knowFileArray = res.data[2]
  23683. }
  23684. })
  23685. .catch((err) => {
  23686. console.error(err);
  23687. });
  23688. },
  23689. async aitargetTextDetail22(msg,msg2) {
  23690. let _this = this
  23691. let fileid = []
  23692. _this.targetTextLoading2 = true
  23693. _this.ttargetTextLoading2 = true
  23694. let sub = []
  23695. if (_this.courseTypeId.length) {
  23696. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23697. let _sid = _this.courseTypeId[i]
  23698. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23699. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23700. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23701. }
  23702. }
  23703. }
  23704. }
  23705. let mclass = []
  23706. if (_this.courseTypeId.length) {
  23707. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23708. let _sid = _this.courseTypeId[i]
  23709. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23710. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23711. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23712. }
  23713. }
  23714. }
  23715. }
  23716. if(!msg2 && sub.length){
  23717. // let _fileid = _this.importFileid(sub)
  23718. // fileid = [...fileid, ..._fileid]
  23719. }
  23720. let messages = `NOTICE
  23721. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  23722. Language: ${this.getLang()}
  23723. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23724. Instruction: Based on the context, follow "Format example", write content.
  23725. #Context
  23726. ## 参考资料
  23727. 课程标题:${this.courseName}
  23728. ${sub.length ? '学科:' + sub.join(",") : ''}
  23729. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  23730. 课程目标:${msg2}
  23731. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  23732. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  23733. ## 要求
  23734. ${msg}
  23735. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  23736. let _uuid = uuidv4();
  23737. // let params = JSON.stringify({
  23738. // // "model": "Chat",
  23739. // model: 'gpt-3.5-turbo',
  23740. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23741. // max_tokens: 4096,
  23742. // top_p: 1,
  23743. // frequency_penalty: 0,
  23744. // presence_penalty: 0,
  23745. // messages: [{
  23746. // content: messages,
  23747. // role: 'user'
  23748. // }],
  23749. // uid: _uuid,
  23750. // mind_map_question: "",
  23751. // })
  23752. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  23753. let params = {
  23754. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  23755. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23756. session_name: _uuid,
  23757. userId: _this.userid,
  23758. uid: _uuid,
  23759. file_ids: fileid.length ? [...fileid] : '',
  23760. model: 'gpt-4o-2024-08-06',
  23761. temperature: this.mode == 3 ? 0.5 : 0.1,
  23762. }
  23763. // let params = JSON.stringify({
  23764. // message: {
  23765. // anthropic_version: "bedrock-2023-05-31",
  23766. // max_tokens: 4096,
  23767. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23768. // top_p: 1,
  23769. // messages: [{
  23770. // "role": "user",
  23771. // "content": messages
  23772. // }] ,
  23773. // },
  23774. // uid: _uuid,
  23775. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23776. // });
  23777. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23778. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  23779. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23780. console.log(response);
  23781. // let data = response.data.FunctionResponse
  23782. // if (data.choices && data.choices.length && data.choices[0].message) {
  23783. // _this.courseText = data.choices[0].message.content
  23784. // }
  23785. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  23786. } else {
  23787. _this.$message.warning(response.data.FunctionResponse.result);
  23788. }
  23789. _this.isTargetCancelToken2 = null
  23790. }).catch(function (error) {
  23791. _this.targetTextLoading2 = false
  23792. _this.ttargetTextLoading2 = false
  23793. _this.isTargetCancelToken2 = null
  23794. if(error && error.message != 'Request canceled by the user.'){
  23795. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23796. }
  23797. console.log(error);
  23798. });
  23799. await _this.aitargetTextDetail2getAiContent(_uuid)
  23800. },
  23801. aitargetTextDetail2getAiContent(_uid) {
  23802. try {
  23803. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23804. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23805. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  23806. } catch(error) {
  23807. console.log('EventSource error:', error);
  23808. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23809. this.targetTextLoading2 = false
  23810. this.ttargetTextLoading2 = false
  23811. this.isTargetCancelToken2 = null
  23812. return;
  23813. }
  23814. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  23815. let _allText = "";
  23816. let _mdText = "";
  23817. let _iindex = 0
  23818. this.isTargetCancelSource2.onmessage = _e => {
  23819. let _eData = JSON.parse(_e.data).content;
  23820. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  23821. //对话已经完成
  23822. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  23823. this.isTargetCancelSource2.close();
  23824. this.isTargetCancelSource2 = null;
  23825. this.targetCourseText2 = text1+' \n '+_mdText;
  23826. this.targetTextLoading2 = false
  23827. this.ttargetTextLoading2 = false
  23828. this.targetCourseText2B = false
  23829. this.isTargetCancelToken2 = null
  23830. this.saveCourse()
  23831. return;
  23832. } else {
  23833. _iindex++
  23834. //对话还在继续
  23835. let _text = "";
  23836. _text = _eData.replaceAll("'", "");
  23837. if (_allText == "") {
  23838. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  23839. } else {
  23840. _allText += _text;
  23841. }
  23842. _mdText = _allText + "_";
  23843. _mdText = _mdText.replace(/\\n/g, "\n");
  23844. _mdText = _mdText.replace(/\\/g, "");
  23845. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  23846. //转化返回的回复流数据
  23847. if(_iindex == 10){
  23848. this.targetCourseText2 = text1+' \n '+_mdText;
  23849. _iindex = 0
  23850. }
  23851. if(this.targetTextLoading2){
  23852. this.targetTextLoading2 = false
  23853. }
  23854. // 处理流数据
  23855. }
  23856. // this.$forceUpdate();
  23857. };
  23858. let _this = this
  23859. this.isTargetCancelSource2.onerror = function(event) {
  23860. // 处理错误,可以尝试重新连接
  23861. console.log('EventSource error:', event);
  23862. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23863. _this.targetTextLoading2 = false
  23864. _this.ttargetTextLoading2 = false
  23865. _this.isTargetCancelToken2 = null
  23866. _this.isTargetCancelSource2.close();
  23867. _this.isTargetCancelSource2 = null;
  23868. };
  23869. },
  23870. async aitargetTextDetail3(msg) {
  23871. let _this = this
  23872. let fileid = []
  23873. if(_this.mubiaoInfoData.length){
  23874. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  23875. if(_this.mubiaoInfoData[i].fileid){
  23876. fileid.push(_this.mubiaoInfoData[i].fileid)
  23877. }else {
  23878. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  23879. if(_fileid){
  23880. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  23881. _this.$forceUpdate();
  23882. if(_fileid != 1){
  23883. fileid.push(_fileid)
  23884. }
  23885. }
  23886. }
  23887. }
  23888. }
  23889. _this.targetTextLoading2 = true
  23890. _this.ttargetTextLoading2 = true
  23891. let sub = []
  23892. if (_this.courseTypeId.length) {
  23893. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23894. let _sid = _this.courseTypeId[i]
  23895. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23896. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23897. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23898. }
  23899. }
  23900. }
  23901. }
  23902. let mclass = []
  23903. if (_this.courseTypeId.length) {
  23904. for (var i = 0; i < _this.courseTypeId.length; i++) {
  23905. let _sid = _this.courseTypeId[i]
  23906. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23907. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  23908. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  23909. }
  23910. }
  23911. }
  23912. }
  23913. // if(sub.length){
  23914. // let _fileid = _this.importFileid(sub)
  23915. // fileid = [...fileid, ..._fileid]
  23916. // }
  23917. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23918. if (_this.infoData.length) {
  23919. for (var i = 0; i < _this.infoData.length; i++) {
  23920. if(_this.infoData[i].fileid){
  23921. fileid.push(_this.infoData[i].fileid)
  23922. }else {
  23923. let _fileid = await _this.createFileid(_this.infoData[i].url)
  23924. if(_fileid){
  23925. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  23926. _this.$forceUpdate();
  23927. if(_fileid != 1){
  23928. fileid.push(_fileid)
  23929. }
  23930. }
  23931. }
  23932. }
  23933. }
  23934. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  23935. let messages = `Language: ${this.getLang()}
  23936. ${msg}
  23937. ## 课程信息
  23938. 课程名字:${this.courseName}
  23939. 课程概况:${this.courseText}
  23940. ${sub.length ? '学科:' + sub.join(",") : ''}
  23941. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  23942. let _uuid = uuidv4();
  23943. // let params = JSON.stringify({
  23944. // // "model": "Chat",
  23945. // model: 'gpt-3.5-turbo',
  23946. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23947. // max_tokens: 4096,
  23948. // top_p: 1,
  23949. // frequency_penalty: 0,
  23950. // presence_penalty: 0,
  23951. // messages: [{
  23952. // content: messages,
  23953. // role: 'user'
  23954. // }],
  23955. // uid: _uuid,
  23956. // mind_map_question: "",
  23957. // })
  23958. let params = {
  23959. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23960. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23961. session_name: _uuid,
  23962. userId: _this.userid,
  23963. uid: _uuid,
  23964. file_ids: fileid.length ? [...fileid] : '',
  23965. model: 'gpt-4o-2024-08-06',
  23966. temperature: this.mode == 3 ? 0.5 : 0.1,
  23967. }
  23968. // let params = JSON.stringify({
  23969. // message: {
  23970. // anthropic_version: "bedrock-2023-05-31",
  23971. // max_tokens: 4096,
  23972. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23973. // top_p: 1,
  23974. // messages: [{
  23975. // "role": "user",
  23976. // "content": messages
  23977. // }] ,
  23978. // },
  23979. // uid: _uuid,
  23980. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23981. // });
  23982. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23983. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  23984. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23985. console.log(response);
  23986. // let data = response.data.FunctionResponse
  23987. // if (data.choices && data.choices.length && data.choices[0].message) {
  23988. // _this.courseText = data.choices[0].message.content
  23989. // }
  23990. console.log(response);
  23991. let data = response.data.FunctionResponse
  23992. // if (data.choices && data.choices.length && data.choices[0].message) {
  23993. // console.log(data.choices[0].message.content);
  23994. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  23995. // _this.$forceUpdate()
  23996. // }
  23997. if (data.message) {
  23998. console.log('返回回来的目标:',data.message);
  23999. _this.targetCourseText2 = data.message
  24000. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  24001. }
  24002. _this.isTargetCancelToken2 = null
  24003. }).catch(function (error) {
  24004. _this.targetTextLoading2 = false
  24005. _this.ttargetTextLoading2 = false
  24006. _this.isTargetCancelToken2 = null
  24007. if(error && error.message != 'Request canceled by the user.'){
  24008. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  24009. }
  24010. console.log(error);
  24011. });
  24012. },
  24013. againEva(msg, i, k) {
  24014. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  24015. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  24016. return;
  24017. }
  24018. if (this.ruleLoading[i]) {
  24019. this.ruleLoading[i][k] = true
  24020. } else {
  24021. this.ruleLoading[i] = []
  24022. this.ruleLoading[i][k] = true
  24023. }
  24024. let message = `NOTICE
  24025. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  24026. Language: ${this.getLang()}
  24027. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  24028. Instruction: Based on the context, follow "Format example", write content.
  24029. #Context
  24030. ##要求
  24031. ${msg}
  24032. ##制定标准资料
  24033. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  24034. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  24035. # Format example
  24036. ==
  24037. 0 星,作业内容与作业要求无关;
  24038. 1 星,没有识别问题和需求;
  24039. 2 星,问题或需求没有被清晰理解或准确识别;
  24040. 3 星,问题或需求的一部分被识别;
  24041. 4 星,问题或需求的大部分被识别;
  24042. 5 星,问题或需求都被识别。
  24043. ==
  24044. `
  24045. // let params = {
  24046. // // "model": "Chat",
  24047. // model: 'gpt-4o-2024-08-06',
  24048. // // model: "gpt-4o",
  24049. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24050. // max_tokens: 4096,
  24051. // top_p: 1,
  24052. // frequency_penalty: 0,
  24053. // presence_penalty: 0,
  24054. // messages: [
  24055. // {
  24056. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  24057. // role: "user"
  24058. // }
  24059. // ],
  24060. // stream: false,
  24061. // uid: this.userid,
  24062. // mind_map_question: ""
  24063. // };
  24064. // this.ajax
  24065. // .post("https://gpt4.cocorobo.cn/chat", params)
  24066. // .then(response => {
  24067. // let data = response.data.FunctionResponse;
  24068. // console.log("data", data);
  24069. // if (data.choices && data.choices.length && data.choices[0].message) {
  24070. // let content = data.choices[0].message.content;
  24071. // var regex = new RegExp('==([^=]+)==');
  24072. // let match = content.match(regex);
  24073. // if (match) {
  24074. // content = match[1].trim().replaceAll(' ', '');
  24075. // // 获取匹配到的内容并去除两端空格
  24076. // console.log('contentInsideDoubleEquals', content);
  24077. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24078. // console.log("未有星级。");
  24079. // this.againEva(msg, i, k)
  24080. // return
  24081. // }
  24082. // //  return
  24083. // } else {
  24084. // console.log("未找到匹配的内容。");
  24085. // this.againEva(msg, i, k)
  24086. // return
  24087. // }
  24088. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  24089. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24090. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24091. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  24092. // this.$forceUpdate();
  24093. // this.ruleLoading[i][k] = false
  24094. // }else{
  24095. // this.ruleLoading[i][k] = false
  24096. // }
  24097. // })
  24098. // .catch(error => {
  24099. // console.log(error);
  24100. // this.ruleLoading[i][k] = false
  24101. // });
  24102. let parm = {
  24103. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24104. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  24105. session_name: uuidv4(),
  24106. userId: this.userid,
  24107. file_ids: [],
  24108. model: 'gpt-4o-2024-08-06',
  24109. temperature: this.mode == 3 ? 0.5 : 0.1,
  24110. }
  24111. this.ajax
  24112. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  24113. .then(async (response) => {
  24114. console.log(response);
  24115. let data = response.data.FunctionResponse
  24116. if (data.message) {
  24117. console.log(data.message);
  24118. let content = data.message;
  24119. var regex = new RegExp('==([^=]+)==');
  24120. let match = content.match(regex);
  24121. if (match) {
  24122. content = match[1].trim().replaceAll(' ', '');
  24123. // 获取匹配到的内容并去除两端空格
  24124. console.log('contentInsideDoubleEquals', content);
  24125. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  24126. console.log("未有星级。");
  24127. this.againEva(msg, i, k)
  24128. return
  24129. }
  24130. //  return
  24131. } else {
  24132. console.log("未找到匹配的内容。");
  24133. this.againEva(msg, i, k)
  24134. return
  24135. }
  24136. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  24137. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24138. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  24139. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  24140. this.$forceUpdate();
  24141. this.ruleLoading[i][k] = false
  24142. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  24143. }else {
  24144. this.ruleLoading[i][k] = false
  24145. }
  24146. })
  24147. .catch((error) => {
  24148. this.ruleLoading[i][k] = false
  24149. console.log(error);
  24150. });
  24151. },
  24152. async aiSearchFile(messages, callback) {
  24153. let _this = this
  24154. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  24155. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  24156. console.log('fileid=========',fileid)
  24157. // let params = JSON.stringify({
  24158. // // "model": "Chat",
  24159. // model: 'gpt-3.5-turbo',
  24160. // temperature: this.mode == 3 ? 0.5 : 0.1,
  24161. // max_tokens: 4096,
  24162. // top_p: 1,
  24163. // frequency_penalty: 0,
  24164. // presence_penalty: 0,
  24165. // messages: [{
  24166. // content: messages,
  24167. // role: 'user'
  24168. // }],
  24169. // stream: false,
  24170. // uid: this.userid,
  24171. // mind_map_question: "",
  24172. // })
  24173. // // let params = JSON.stringify({
  24174. // // message: {
  24175. // // anthropic_version: "bedrock-2023-05-31",
  24176. // // max_tokens: 4096,
  24177. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  24178. // // top_p: 1,
  24179. // // messages: [{
  24180. // // content: messages,
  24181. // // role: 'user'
  24182. // // }], //
  24183. // // },
  24184. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  24185. // // });
  24186. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  24187. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  24188. // console.log(response);
  24189. // let data = response.data.FunctionResponse
  24190. // if (data.choices && data.choices.length && data.choices[0].message) {
  24191. // console.log(data.choices[0].message.content);
  24192. // let dArray = JSON.parse(data.choices[0].message.content)
  24193. // _this.dArray = dArray
  24194. // _this.unitJson[0].chapterInfo[0].taskJson = []
  24195. // for (var i = 0; i < dArray.length; i++) {
  24196. // let _task = dArray[i]
  24197. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  24198. // task: _task.task,
  24199. // taskDetail: "",
  24200. // taskDetail2: _task.detail,
  24201. // taskDetail3: "",
  24202. // chapterData: [],
  24203. // toolText: "",
  24204. // toolChoose: [
  24205. // {
  24206. // tool: [],
  24207. // toolDetail: "",
  24208. // toolType: 0,
  24209. // askCount: 1,
  24210. // askTitle: "",
  24211. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24212. // },
  24213. // ],
  24214. // isShowTools: false,
  24215. // askCount: 1,
  24216. // isFold: 0,
  24217. // askTitle: "",
  24218. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24219. // checkJson: [{ checkCount: [], checkPerent: [] }],
  24220. // homeworkList: [],
  24221. // })
  24222. // }
  24223. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  24224. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  24225. // _this.$forceUpdate();
  24226. // }
  24227. // // if (data.result) {
  24228. // // console.log(data.result);
  24229. // // let dArray = JSON.parse(data.result)
  24230. // // _this.dArray = dArray
  24231. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  24232. // // for (var i = 0; i < dArray.length; i++) {
  24233. // // let _task = dArray[i]
  24234. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  24235. // // task: _task.task,
  24236. // // taskDetail: "",
  24237. // // taskDetail2: _task.detail,
  24238. // // taskDetail3: "",
  24239. // // chapterData: [],
  24240. // // toolText: "",
  24241. // // toolChoose: [
  24242. // // {
  24243. // // tool: [],
  24244. // // toolDetail: "",
  24245. // // toolType: 0,
  24246. // // askCount: 1,
  24247. // // askTitle: "",
  24248. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24249. // // },
  24250. // // ],
  24251. // // isShowTools: false,
  24252. // // askCount: 1,
  24253. // // isFold: 1,
  24254. // // askTitle: "",
  24255. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  24256. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  24257. // // homeworkList: [],
  24258. // // })
  24259. // // }
  24260. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  24261. // // _this.$forceUpdate();
  24262. // // }
  24263. // callback ? callback() : ''
  24264. // }).catch(function (error) {
  24265. // _this.loading = false
  24266. // console.log(error);
  24267. // });
  24268. this.isFileCancelToken = this.ajax.setCancelSource();
  24269. let parm = {
  24270. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  24271. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24272. session_name: uuidv4(),
  24273. userId: this.userid,
  24274. file_ids: fileid.length ? [...fileid] : '',
  24275. model: 'gpt-4o-2024-08-06',
  24276. temperature: this.mode == 3 ? 0.5 : 0.1,
  24277. }
  24278. this.ajax
  24279. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  24280. .then((response) => {
  24281. console.log(response);
  24282. let data = response.data.FunctionResponse
  24283. if (data.message) {
  24284. console.log(data.message);
  24285. let dArray = []
  24286. try {
  24287. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  24288. let regex3 = new RegExp('(?<!")content(?!")','g')
  24289. //
  24290. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  24291. } catch (error) {
  24292. // callback ? callback() : ''
  24293. console.log("error_________________" + error);
  24294. try {
  24295. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  24296. let match = data.message.match(regex);
  24297. dArray = JSON.parse(match[0]);
  24298. } catch (error) {
  24299. // callback ? callback() : ''
  24300. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  24301. console.log("error_________________" + error);
  24302. _this.isFileCancelToken = null;
  24303. _this.aiSearchFile(messages, callback)
  24304. return
  24305. }
  24306. }
  24307. for(let i = 0; i < dArray.length; i++){
  24308. let content = dArray[i].content
  24309. let name = '参考资料'+(i+1)
  24310. let md = new MarkdownIt();
  24311. let _html = content ? md.render(content) : ''
  24312. setTimeout(()=>{
  24313. if(i == (dArray.length - 1)){
  24314. _this.generate2(name, _html, i, callback)
  24315. }else {
  24316. _this.generate2(name, _html, i)
  24317. }
  24318. }, 500 * i)
  24319. }
  24320. _this.isFileCancelToken = null
  24321. _this.$forceUpdate();
  24322. }
  24323. })
  24324. .catch((error) => {
  24325. callback ? callback() : ''
  24326. _this.isFileCancelToken = null
  24327. console.log(error);
  24328. });
  24329. },
  24330. async aiSearchFile2(messages, callback) {
  24331. let _this = this
  24332. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  24333. console.log('fileid=========',fileid)
  24334. this.isFileCancelToken = this.ajax.setCancelSource();
  24335. let parm = {
  24336. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  24337. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  24338. session_name: uuidv4(),
  24339. userId: this.userid,
  24340. file_ids: fileid.length ? [...fileid] : '',
  24341. model: 'gpt-4o-2024-08-06',
  24342. temperature: this.mode == 3 ? 0.5 : 0.1,
  24343. }
  24344. this.ajax
  24345. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  24346. .then((response) => {
  24347. console.log(response);
  24348. let data = response.data.FunctionResponse
  24349. if (data.message) {
  24350. console.log(data.message);
  24351. let content = data.message
  24352. let name = '参考资料'
  24353. let md = new MarkdownIt();
  24354. let _html = content ? md.render(content) : ''
  24355. _this.generate2(name, _html, 0, callback)
  24356. _this.isFileCancelToken = null
  24357. _this.$forceUpdate();
  24358. }
  24359. })
  24360. .catch((error) => {
  24361. callback ? callback() : ''
  24362. _this.isFileCancelToken = null
  24363. console.log(error);
  24364. });
  24365. },
  24366. createFileid(url) {
  24367. let _this = this
  24368. return new Promise((resolve, reject) => {
  24369. try {
  24370. _this.ajax
  24371. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  24372. url: url,
  24373. })
  24374. .then((res) => {
  24375. let _data = res.data.FunctionResponse;
  24376. if (_data.result && _data.result.id) {
  24377. resolve(_data.result.id)
  24378. }else {
  24379. resolve(1)
  24380. }
  24381. }).catch(function (error) {
  24382. resolve(1)
  24383. });
  24384. }catch (e){
  24385. resolve(1)
  24386. }
  24387. });
  24388. },
  24389. handleSwitchChange(string){
  24390. // let area = ''
  24391. // let text = ''
  24392. // if(string == 'aiteacherTextDetail'){
  24393. // area = '已有教案摘要'
  24394. // text = this.teacherCourseText
  24395. // }else if(string == 'aitargetTextDetail'){
  24396. // area = '课程目标'
  24397. // text = this.targetCourseText
  24398. // }else if(string == 'aiDetail'){
  24399. // area = '课程简要描述'
  24400. // text = this.courseText
  24401. // }else if(string == 'aitargetTextDetail2'){
  24402. // area = '课程目标'
  24403. // text = this.targetCourseText2
  24404. // }else if(string.indexOf('aiDetail1') != -1){
  24405. // let index = parseInt(string.split('aiDetail1-')[1])
  24406. // area = `任务${index+1}课程大纲`
  24407. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  24408. // }else if(string == 'aiCpote1'){
  24409. // area = '概念群'
  24410. // text = this.cpote.cpote1
  24411. // }else if(string == 'aiCpote2'){
  24412. // area = '问题链'
  24413. // text = this.cpote.cpote2
  24414. // }else if(string == 'aiCpote3'){
  24415. // area = '目标层'
  24416. // text = this.cpote.cpote3
  24417. // }else if(string == 'aiCpote4'){
  24418. // area = '任务簇'
  24419. // text = this.cpote.cpote4
  24420. // }else if(string.indexOf('teacherDetail2') != -1){
  24421. // let index = parseInt(string.split('teacherDetail2-')[1])
  24422. // area = `任务${index+1}教案`
  24423. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  24424. // }else if(string.indexOf('aiDetail2') != -1){
  24425. // let index = parseInt(string.split('aiDetail2-')[1])
  24426. // area = `任务${index+1}任务描述`
  24427. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  24428. // }else if(string.indexOf('aiDetail3') != -1){
  24429. // let index = parseInt(string.split('-')[1])
  24430. // let index2 = parseInt(string.split('-')[2])
  24431. // area = `任务${index+1}工具${index2+1}的工具描述`
  24432. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  24433. // }
  24434. // if(this.isQuote[string] && text){
  24435. // this.quoteArray.push({
  24436. // string,
  24437. // area,
  24438. // value: text
  24439. // })
  24440. // }
  24441. console.log(this.isQuote)
  24442. },
  24443. setIsQuote(string){
  24444. this.isQuote[string] = false
  24445. },
  24446. setEvaList(task, tool, elist){
  24447. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  24448. this.$forceUpdate()
  24449. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  24450. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  24451. }
  24452. },
  24453. closeRight(){
  24454. this.isDisplay = !this.isDisplay;
  24455. },
  24456. addCourseBehavior(type, _html) { // 保存行为操作
  24457. let params = [{
  24458. uid: this.userid,
  24459. courseId: '',
  24460. type: type,
  24461. content: _html,
  24462. }];
  24463. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  24464. if (res.data == 1) {
  24465. console.log('保存操作成功');
  24466. } else {
  24467. console.log('保存操作失败');
  24468. }
  24469. }).catch(e => {
  24470. console.log('保存操作失败');
  24471. console.log(e);
  24472. });
  24473. },
  24474. async useUrl(){
  24475. if(!this.knowFileids3.length){
  24476. this.$message.error('请选择要使用的检索资料')
  24477. return
  24478. }
  24479. let array = []
  24480. for(var i = 0; i < this.knowFileids3.length; i++){
  24481. let item = this.knowFileids3[i]
  24482. for(var j = 0; j < this.knowInfoData3.length; j++){
  24483. if(item == this.knowInfoData3[j].url){
  24484. let isExist = this.knowInfoData2.some(item => item.name === this.knowInfoData3[j].name);
  24485. if (!isExist) {
  24486. this.knowInfoData2.push(this.knowInfoData3[j]);
  24487. }
  24488. }
  24489. }
  24490. }
  24491. this.$nextTick(() => {
  24492. this.$refs.rightKnow.scrollTop = this.$refs.rightKnow.scrollHeight;
  24493. });
  24494. this.knowFileids3 = []
  24495. for (let i = 0; i < this.knowInfoData2.length; i++) {
  24496. if (!this.knowInfoData2[i].fileid) {
  24497. let fileid = await this.createFileid(this.knowInfoData2[i].url)
  24498. this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  24499. console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  24500. if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  24501. this.knowFileids2.push(fileid)
  24502. }
  24503. }
  24504. }
  24505. },
  24506. panFind(event) {
  24507. if(!this.findMatchingContentsFinish){
  24508. const { scrollTop, clientHeight, scrollHeight } = event.target;
  24509. // 判断是否触底
  24510. if (scrollTop + clientHeight >= scrollHeight - 5 && !this.knowInfoDataLoading) {
  24511. this.findMatchingContentsPage++
  24512. this.findMatchingContents(); // 调用下拉刷新方法
  24513. }
  24514. }
  24515. },
  24516. startFindMatchingContents(){
  24517. if(!this.searchFileName){
  24518. this.$message.error('请输入检索关键词')
  24519. return
  24520. }
  24521. if(this.knowInfoDataLoading){
  24522. this.$message.error('检索中请稍后')
  24523. return
  24524. }
  24525. this.findMatchingContentsFinish = false
  24526. this.findMatchingContentsPage = 1
  24527. this.knowInfoData3 = []
  24528. this.findMatchingContents(); // 调用下拉刷新方法
  24529. },
  24530. findMatchingContents(){
  24531. if(!this.searchFileName){
  24532. this.$message.error('请输入检索关键词')
  24533. return
  24534. }
  24535. if(this.knowInfoDataLoading){
  24536. this.$message.error('检索中请稍后')
  24537. return
  24538. }
  24539. let sub = []
  24540. if (this.courseTypeId.length) {
  24541. for (var i = 0; i < this.courseTypeId.length; i++) {
  24542. let _sid = this.courseTypeId[i]
  24543. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  24544. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  24545. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  24546. }
  24547. }
  24548. }
  24549. }
  24550. this.knowInfoDataLoading = true
  24551. let params = {
  24552. type: sub.join(","),
  24553. string: this.searchFileName,
  24554. page: this.findMatchingContentsPage
  24555. };
  24556. let md = new MarkdownIt();
  24557. this.isfindMatchingContents = this.ajax.setCancelSource()
  24558. this.ajax.get(this.$store.state.api + 'findMatchingContentsPage', params, this.isfindMatchingContents).then(async res => {
  24559. console.log(res)
  24560. this.isfindMatchingContents = null
  24561. this.knowInfoDataLoading = false
  24562. if(res.data.length){
  24563. let files = []
  24564. // let knowFile = JSON.parse(JSON.stringify(this.knowFileids2))
  24565. for (var i = 0; i < res.data.length; i++) {
  24566. // files.push(await this.generateExport2(el.title, md.render(el.content)));
  24567. let el = res.data[i];
  24568. let url = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn' + el.file_url;
  24569. let extension = url.split('.').pop().toLowerCase();
  24570. let _type = 2; // 默认类型为2
  24571. // 定义文件类型数组
  24572. let imgA = ["png", "jpg", "jpeg", "bmp", "gif", "webp", "psd", "svg", "tiff"];
  24573. let fileA = ["PDF", "DOC", "DOCX", "DOCM", "DOTM", "DOTX", "PPTX", "PPSX", "PPT", "PPS", "PPTM", "POTM", "PPAM", "POTX", "PPSM", "XLSX", "XLS"];
  24574. 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"];
  24575. // 根据文件扩展名判断文件类型
  24576. if (fileA.includes(extension.toUpperCase())) {
  24577. _type = 3;
  24578. } else if (videoA.includes(extension.toUpperCase())) {
  24579. _type = 2;
  24580. } else if (imgA.includes(extension)) {
  24581. _type = 13;
  24582. } else {
  24583. _type = 12;
  24584. }
  24585. let isExist = this.knowInfoData3.some(item => item.name === el.title);
  24586. if (!isExist) {
  24587. // let fileid = await this.createFileid(url)
  24588. this.knowInfoData3.push({
  24589. name: el.title,
  24590. url: url,
  24591. uid: '',
  24592. type: _type,
  24593. fileid: '',
  24594. // fileid == 1 ? '' : fileid
  24595. });
  24596. // if(fileid != 1){
  24597. // this.knowFileids2.push(fileid)
  24598. // }
  24599. }
  24600. }
  24601. // for (let i = 0; i < this.knowInfoData3.length; i++) {
  24602. // if (!this.knowInfoData2[i].fileid) {
  24603. // let fileid = await this.createFileid(this.knowInfoData2[i].url)
  24604. // this.knowInfoData2[i].fileid = (fileid == 1 ? '' : fileid)
  24605. // console.log(`文件 ${this.knowInfoData2[i].name} 的fileid为空`);
  24606. // if(fileid != 1 && this.knowFileids2.indexOf(fileid) == -1){
  24607. // this.knowFileids2.push(fileid)
  24608. // }
  24609. // }
  24610. // }
  24611. // let data = {
  24612. // target:{
  24613. // files: files
  24614. // }
  24615. // }
  24616. // console.log(data)
  24617. // this.beforeUploadInfo2(data, 20)
  24618. }else{
  24619. if(this.findMatchingContentsPage == 1){
  24620. this.$message.error('未检索出内容')
  24621. }else {
  24622. this.findMatchingContentsFinish = true
  24623. }
  24624. }
  24625. }).catch(e => {
  24626. console.log('查询失败');
  24627. this.isfindMatchingContents = null
  24628. this.knowInfoDataLoading = false
  24629. console.log(e);
  24630. });
  24631. }
  24632. },
  24633. beforeDestroy() {
  24634. // clearTimeout(this.timer);
  24635. // this.timer = null;
  24636. // clearInterval(this.timer2);
  24637. // this.timer2 = null;
  24638. clearInterval(this.pasteTimer);
  24639. this.pasteTimer = null;
  24640. },
  24641. beforeRouteLeave(to, from, next) {
  24642. // clearTimeout(this.timer);
  24643. // this.timer = null;
  24644. // clearInterval(this.timer2);
  24645. // this.timer2 = null;
  24646. clearInterval(this.pasteTimer);
  24647. this.pasteTimer = null;
  24648. next();
  24649. },
  24650. mounted(){
  24651. let _this = this
  24652. // 监听浏览器后退或者刷新等离开页面的操作
  24653. window.onbeforeunload = function(event) {
  24654. // 检查是否有未保存的更改
  24655. const message = "你有未保存的更改,确定要离开吗?";
  24656. // 现代浏览器通常会显示一个默认的提示信息,不能完全自定义提示内容
  24657. event.returnValue = message; // 兼容大部分浏览器
  24658. console.log(message)
  24659. return message; // 兼容部分浏览器
  24660. };
  24661. const resizable = this.$el.querySelector('.resizable');
  24662. const resizer = this.$el.querySelector('.resizer');
  24663. const maxWidth = document.body.offsetWidth / 2;
  24664. const maxWidth2 = window.innerWidth / 2;
  24665. let startX, startWidth;
  24666. const mouseMoveHandler = (e) => {
  24667. e.preventDefault(); // 添加此行以防止选中其他文本
  24668. const dx = startX - e.clientX;
  24669. const newWidth = startWidth + dx;
  24670. if (newWidth >= 350 && newWidth <= maxWidth) {
  24671. resizable.style.minWidth = `${newWidth}px`;
  24672. }
  24673. };
  24674. const mouseUpHandler = () => {
  24675. document.removeEventListener('mousemove', mouseMoveHandler);
  24676. document.removeEventListener('mouseup', mouseUpHandler);
  24677. document.body.style.cursor = 'default';
  24678. };
  24679. const mouseDownHandler = (e) => {
  24680. e.preventDefault(); // 添加此行以防止选中其他文本
  24681. startX = e.clientX;
  24682. startWidth = resizable.getBoundingClientRect().width;
  24683. document.addEventListener('mousemove', mouseMoveHandler);
  24684. document.addEventListener('mouseup', mouseUpHandler);
  24685. document.body.style.cursor = 'ew-resize';
  24686. };
  24687. resizer.addEventListener('mousedown', mouseDownHandler);
  24688. const touchMoveHandler = (e) => {
  24689. e.preventDefault(); // 添加此行以防止选中其他文本
  24690. const dx = startX - e.touches[0].clientX;
  24691. const newWidth = startWidth + dx;
  24692. if (newWidth >= 350 && newWidth <= maxWidth2) {
  24693. resizable.style.minWidth = `${newWidth}px`;
  24694. }
  24695. };
  24696. const touchEndHandler = () => {
  24697. document.removeEventListener('touchmove', touchMoveHandler);
  24698. document.removeEventListener('touchend', touchEndHandler);
  24699. document.body.style.cursor = 'default';
  24700. };
  24701. const touchStartHandler = (e) => {
  24702. e.preventDefault(); // 添加此行以防止选中其他文本
  24703. startX = e.touches[0].clientX;
  24704. startWidth = resizable.getBoundingClientRect().width;
  24705. document.addEventListener('touchmove', touchMoveHandler);
  24706. document.addEventListener('touchend', touchEndHandler);
  24707. document.body.style.cursor = 'ew-resize';
  24708. };
  24709. resizer.addEventListener('touchstart', touchStartHandler);
  24710. },
  24711. created() {
  24712. this.selectFileid();
  24713. // this.selectAiFileid();
  24714. this.selectKnowFileid();
  24715. this.getStudent();
  24716. this.getTeacher();
  24717. this.getClass();
  24718. this.selectGrage();
  24719. this.getTemplate();
  24720. this.getTipsTemplate();
  24721. // this.selectType();
  24722. this.selectEva();
  24723. if(this.istemplate == 1){
  24724. this.isOutline = true
  24725. this.isOutline2 = true
  24726. this.courseTextBool = true
  24727. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  24728. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  24729. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  24730. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  24731. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  24732. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  24733. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  24734. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  24735. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  24736. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  24737. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  24738. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  24739. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  24740. this.aiJson.recordAgentid = this.aiJson.recordAgentid ? this.aiJson.recordAgentid : 'eb6c7ca4-9684-11ef-a04e-12e77c4cb76b'
  24741. this.aiJson.recordstart = this.aiJson.recordstart ? this.aiJson.recordstart : `今天我们聚在一起,围绕采用{课程模板名字}模板的课程的设计展开讨论,而对于这堂课程,我这里有一些建议讨论的问题,供大家参考:
  24742. - 我们的课程主题可以如何与学生的实际生活联系起来?
  24743. - 围绕该课程主题,我们可以设计什么样的问题来引导学生进行深入思考?
  24744. - 这些问题是否能引导学生应用他们在课堂上学习到的知识,并结合实际情况进行探究?
  24745. - 学生在项目中可以参与哪些具体的任务或活动,以便更好地理解和解决驱动问题?
  24746. - 在这些任务和活动中,学生将学到哪些学科核心知识和技能?
  24747. - 学生个人最终要完成什么?学生小组最终要完成什么?
  24748. - 我们可以如何设计评价标准,既关注学习结果又关注过程?`
  24749. this.aiJson.recordCheckJindu = this.aiJson.recordCheckJindu ? this.aiJson.recordCheckJindu : `检查以下讨论,查看用户是否讨论了以下问题?如果讨论了,请总结其讨论结果,如果没有,请提醒用户有哪些问题还没有讨论到。
  24750. 讨论:<转文本内容>`
  24751. this.aiJson.recordCourseD = this.aiJson.recordCourseD ? this.aiJson.recordCourseD : `根据以下讨论,为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准`
  24752. }
  24753. this.loading = false;
  24754. // this.timer2 = setInterval(() => {
  24755. // this.selectEva();
  24756. // }, 5000);
  24757. // this.pasteTimer = setInterval(() => {
  24758. // this.getPaste();
  24759. // }, 1000);
  24760. this.pasteTimer = setInterval(() => {
  24761. this.getPaste2();
  24762. }, 500);
  24763. setTimeout(() => {
  24764. // this.selectAllType();
  24765. this.selectCourseDetail();
  24766. }, 500);
  24767. let _this = this;
  24768. window.pasteStage = function (json) {
  24769. _this.pasteStage(json);
  24770. };
  24771. window.pasteTask = function (json) {
  24772. _this.pasteTask(json);
  24773. };
  24774. },
  24775. };
  24776. </script>
  24777. <style scoped>
  24778. @media screen and (max-width: 1280px) {
  24779. .mbCss {
  24780. flex-direction: column !important;
  24781. }
  24782. .pjCss {
  24783. width: 100% !important;
  24784. }
  24785. .evaCss {
  24786. width: 100% !important;
  24787. margin-top: 10px;
  24788. }
  24789. }
  24790. .el-table>>>.even_row {
  24791. background-color: #f1f1f1 !important;
  24792. }
  24793. .dialog_diy>>>.el-dialog__header {
  24794. background: #3c3c3c !important;
  24795. padding: 15px 20px;
  24796. }
  24797. .dialog_diy>>>.el-dialog__title {
  24798. color: #fff;
  24799. }
  24800. .dialog_diy>>>.el-dialog__headerbtn {
  24801. top: 19px;
  24802. }
  24803. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  24804. color: #fff;
  24805. }
  24806. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  24807. color: #fff;
  24808. }
  24809. .dialog_diy>>>.el-dialog__body,
  24810. .dialog_diy>>>.el-dialog__footer {
  24811. background: #fafafa;
  24812. }
  24813. .dialog_diy3>>>.el-dialog__body,
  24814. .dialog_diy3>>>.el-dialog__footer {
  24815. background: #eee !important;
  24816. }
  24817. .dialog_diy3>>>.el-dialog__body {
  24818. padding: 20px 20px;
  24819. }
  24820. .dialog_diyStage>>>.el-dialog__body {
  24821. padding: 10px;
  24822. }
  24823. .source_diy>>>.el-dialog {
  24824. height: 100% !important;
  24825. margin: 0 auto !important;
  24826. }
  24827. .source_diy>>>.el-dialog__body {
  24828. height: calc(100% - 185px);
  24829. overflow: auto;
  24830. background: #e6eaf0;
  24831. }
  24832. .source_diy>>>.el-dialog__footer {
  24833. background: #e6eaf0 !important;
  24834. }
  24835. .left {
  24836. border-right: 1px solid rgb(60, 94, 143);
  24837. display: flex;
  24838. flex-direction: column;
  24839. align-items: center;
  24840. min-height: 600px;
  24841. width: 385px;
  24842. height: 80%;
  24843. }
  24844. .tips {
  24845. color: rgb(128, 128, 128);
  24846. font-size: 12px;
  24847. width: 270px;
  24848. margin: 40px;
  24849. }
  24850. .pb_content {
  24851. height: 100% !important;
  24852. /* margin: 0 20px 0 20px; */
  24853. }
  24854. .pb_content_body {
  24855. width: 100% !important;
  24856. height: 100%;
  24857. display: flex;
  24858. }
  24859. .info_solid {
  24860. width: 270px;
  24861. height: 30px;
  24862. border-left: 1px solid #bdbdbd;
  24863. margin: 10px 0px 10px 30px;
  24864. }
  24865. .info_steps {
  24866. width: 270px;
  24867. font-size: 0.875rem;
  24868. display: flex;
  24869. align-items: center;
  24870. }
  24871. .info_steps span:nth-child(1) {
  24872. width: 30px;
  24873. height: 30px;
  24874. background: rgba(0, 0, 0, 0.38);
  24875. display: block;
  24876. color: #fff;
  24877. border-radius: 40px;
  24878. text-align: center;
  24879. line-height: 30px;
  24880. }
  24881. .steps_active {
  24882. background: #3d67bc !important;
  24883. }
  24884. .info_steps span:nth-child(2) {
  24885. margin-left: 5px;
  24886. }
  24887. .right {
  24888. height: 100%;
  24889. width: 100%;
  24890. display: flex;
  24891. overflow: hidden;
  24892. flex-direction: column;
  24893. }
  24894. .leftBar{
  24895. width: 290px;
  24896. height: calc(100% - 50px);
  24897. overflow: auto;
  24898. border-radius: 5px;
  24899. margin: 25px auto;
  24900. box-sizing: border-box;
  24901. margin-right: 10px;
  24902. }
  24903. .leftBar2{
  24904. width: 400px;
  24905. min-width: 400px;
  24906. height: calc(100% - 50px);
  24907. overflow: auto;
  24908. border-radius: 5px;
  24909. margin: 25px auto;
  24910. box-sizing: border-box;
  24911. margin-right: 10px;
  24912. background: #fff;
  24913. padding: 5px;
  24914. border-radius: 5px;
  24915. }
  24916. .basic_box {
  24917. margin: 0 auto;
  24918. position: relative;
  24919. padding: 0 20px 0 20px;
  24920. }
  24921. .basic_box_success {
  24922. width: 100%;
  24923. min-height: 455px;
  24924. padding: 50px 0;
  24925. position: relative;
  24926. text-align: center;
  24927. border-bottom: 1px solid #bfbfbf;
  24928. box-sizing: border-box;
  24929. display: flex;
  24930. align-items: center;
  24931. flex-direction: column;
  24932. justify-content: center;
  24933. }
  24934. .info_title {
  24935. font-size: 1.5em;
  24936. margin-right: 25px;
  24937. /* margin: 20px 30px 20px 30px; */
  24938. }
  24939. .bInfo_title {
  24940. text-align: left;
  24941. margin: 10px 0;
  24942. }
  24943. .small_title {
  24944. font-size: 14px;
  24945. line-height: 40px;
  24946. }
  24947. .chapter_beizhu {
  24948. font-size: 12px;
  24949. font-weight: bold;
  24950. float: right;
  24951. color: rgb(128, 128, 128);
  24952. margin-top: 5px;
  24953. }
  24954. .chapter_uploadBox1 {
  24955. text-align: left;
  24956. background-color: rgb(242, 242, 242);
  24957. width: 100%;
  24958. height: 67px;
  24959. padding: 0px 15px;
  24960. border-radius: 8px;
  24961. overflow: hidden;
  24962. font-size: 16px;
  24963. box-sizing: border-box;
  24964. position: relative;
  24965. }
  24966. .chapter_add {
  24967. width: 100%;
  24968. height: 32px;
  24969. margin-top: 15px;
  24970. cursor: pointer;
  24971. }
  24972. .chapter_add_l {
  24973. margin-left: 5px;
  24974. width: 30px;
  24975. height: 30px;
  24976. float: left;
  24977. border: 1px solid #aaa;
  24978. color: #aaa;
  24979. border-radius: 50%;
  24980. font-size: 25px;
  24981. text-align: center;
  24982. }
  24983. .chapter_add_r {
  24984. font-size: 18px;
  24985. height: 40px;
  24986. line-height: 30px;
  24987. text-indent: 10px;
  24988. color: #aaa;
  24989. }
  24990. .chapter_add_r span {
  24991. font-size: 12px;
  24992. color: rgb(204, 204, 204);
  24993. }
  24994. .chapter_add_input {
  24995. display: none;
  24996. }
  24997. .line {
  24998. width: 85%;
  24999. margin: 0 auto;
  25000. border-top: 1px solid #e5e5e5;
  25001. margin-top: 20px;
  25002. }
  25003. .info_btnBox {
  25004. width: calc(100%);
  25005. display: flex;
  25006. justify-content: center;
  25007. height: 80px;
  25008. align-items: center;
  25009. background: #fff;
  25010. margin: 0 auto;
  25011. border-top: 2px solid rgb(228, 232, 237);
  25012. box-sizing: border-box;
  25013. }
  25014. .info_btnBox2 {
  25015. width: calc(100%);
  25016. display: flex;
  25017. justify-content: center;
  25018. height: 20px;
  25019. align-items: center;
  25020. background: #fff;
  25021. margin: 0 auto;
  25022. border-top: 2px solid rgb(228, 232, 237);
  25023. box-sizing: border-box;
  25024. overflow: hidden;
  25025. cursor: pointer;
  25026. }
  25027. .info_btnBox3 {
  25028. width: calc(100%);
  25029. display: flex;
  25030. justify-content: flex-end;
  25031. padding: 0 20px;
  25032. height: 60px;
  25033. align-items: center;
  25034. background: unset;
  25035. margin: 0 auto;
  25036. /* border-top: 1px solid rgb(228, 232, 237); */
  25037. box-sizing: border-box;
  25038. overflow: hidden;
  25039. cursor: pointer;
  25040. background: #fff;
  25041. border-radius: 10px;
  25042. }
  25043. .info_btn+.info_btn {
  25044. margin-left: 15px;
  25045. }
  25046. .info_btn,
  25047. .teacherWord {
  25048. color: #fff;
  25049. background-color: #0f7eff;
  25050. padding: 8px 24px;
  25051. font-size: 0.9375rem;
  25052. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  25053. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  25054. min-width: 64px;
  25055. font-weight: 500;
  25056. border-radius: 4px;
  25057. box-sizing: border-box;
  25058. border: none;
  25059. cursor: pointer;
  25060. }
  25061. .teacherWord {
  25062. width: 105px !important;
  25063. text-align: center !important;
  25064. line-height: 36px !important;
  25065. padding: 0 !important;
  25066. font-size: 14px !important;
  25067. margin: 10px 0 !important;
  25068. }
  25069. .template_box {
  25070. display: flex;
  25071. flex-wrap: wrap;
  25072. }
  25073. .wordTeacher {
  25074. display: flex;
  25075. flex-direction: column;
  25076. width: 100px;
  25077. height: 100px;
  25078. text-align: center;
  25079. font-size: 13px;
  25080. margin: 0 20px 20px 0;
  25081. background: #f0f4fa;
  25082. position: relative;
  25083. border-radius: 5px;
  25084. align-items: center;
  25085. justify-content: center;
  25086. border: 1px solid #cad1dc;
  25087. color: #0e1e33;
  25088. /* padding: 25px 0px; */
  25089. cursor: pointer;
  25090. }
  25091. .wordTeacher::after {
  25092. content: "";
  25093. display: block;
  25094. position: absolute;
  25095. width: 15px;
  25096. height: 15px;
  25097. right: 10px;
  25098. top: 10px;
  25099. background-image: url(../../../assets/icon/new/choose_a.png);
  25100. background-size: 100% 100%;
  25101. }
  25102. .wordTeacherA::after {
  25103. background-image: url(../../../assets/icon/new/choose_b.png);
  25104. }
  25105. .wordTeacher:nth-child(5n) {
  25106. margin-right: 0px;
  25107. }
  25108. .wordPic {
  25109. margin: 0 auto;
  25110. width: 30px;
  25111. height: 30px;
  25112. cursor: pointer;
  25113. }
  25114. .deleteWord {
  25115. width: 22px;
  25116. height: 22px;
  25117. position: absolute;
  25118. right: 5px;
  25119. top: -15px;
  25120. cursor: pointer;
  25121. display: none;
  25122. z-index: 999;
  25123. }
  25124. .wordPic>img,
  25125. .deleteWord>img,
  25126. .addToolImg>img {
  25127. width: 100%;
  25128. height: 100%;
  25129. }
  25130. .info_btn:hover {
  25131. background-color: #4f7cd5 !important;
  25132. }
  25133. .cru_selectBox {
  25134. display: flex;
  25135. margin: 15px 0;
  25136. flex-wrap: nowrap;
  25137. white-space: nowrap;
  25138. overflow: auto;
  25139. position: relative;
  25140. height: 40px;
  25141. max-width: calc(100% - 175px);
  25142. }
  25143. .cru_selectBox::-webkit-scrollbar {
  25144. /*滚动条整体样式*/
  25145. width: 6px;
  25146. /*高宽分别对应横竖滚动条的尺寸*/
  25147. height: 6px;
  25148. }
  25149. /*定义滚动条轨道 内阴影+圆角*/
  25150. .cru_selectBox::-webkit-scrollbar-track {
  25151. border-radius: 10px;
  25152. background-color: #eee;
  25153. }
  25154. /*定义滑块 内阴影+圆角*/
  25155. .cru_selectBox::-webkit-scrollbar-thumb {
  25156. border-radius: 10px;
  25157. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  25158. background-color: rgba(0, 0, 0, 0.1);
  25159. }
  25160. .cru_line {
  25161. position: absolute;
  25162. bottom: 0px;
  25163. transition: all 0.5s;
  25164. left: 0px;
  25165. width: 50px;
  25166. height: 4px;
  25167. left: 10px;
  25168. border-radius: 2px;
  25169. background: #3681fc;
  25170. }
  25171. .cru_select {
  25172. font-size: 18px;
  25173. margin-right: 20px;
  25174. margin-left: 5px;
  25175. cursor: pointer;
  25176. color: #0e1e33;
  25177. }
  25178. .cru_select:hover {
  25179. color: #3681fc !important;
  25180. }
  25181. .cru_selected {
  25182. color: #3681fc !important;
  25183. font-weight: bold;
  25184. }
  25185. .chapter_box {
  25186. margin-top: 10px;
  25187. width: 100%;
  25188. padding: 10px 20px;
  25189. background: #fff;
  25190. border-radius: 8px;
  25191. box-sizing: border-box;
  25192. }
  25193. .chapter_contentbox {
  25194. display: flex;
  25195. align-items: center;
  25196. /* margin-top: 15px; */
  25197. }
  25198. .chapter_contentbox .cc_title {
  25199. margin: 0px;
  25200. color: black;
  25201. display: block;
  25202. white-space: nowrap;
  25203. overflow: hidden;
  25204. text-overflow: ellipsis;
  25205. margin-right: 20px;
  25206. font-size: 18px;
  25207. height: 20px;
  25208. line-height: 22px;
  25209. min-width: fit-content;
  25210. display: flex;
  25211. }
  25212. .chapter_contentbox .cc_title::before {
  25213. content: "";
  25214. height: 100%;
  25215. width: 3px;
  25216. background: #3681fc;
  25217. border-radius: 3px;
  25218. opacity: 1;
  25219. display: block;
  25220. margin-right: 10px;
  25221. }
  25222. .chapter_contentbox .cc_input {
  25223. width: 100%;
  25224. display: flex;
  25225. }
  25226. .show_taskD {
  25227. min-width: fit-content;
  25228. margin-left: 10px;
  25229. display: flex;
  25230. align-items: center;
  25231. font-size: 14px;
  25232. cursor: pointer;
  25233. color: #717c8d;
  25234. }
  25235. .show_taskD>img {
  25236. width: 15px;
  25237. margin-right: 5px;
  25238. transition: 0.2s all;
  25239. transform: rotate(-90deg);
  25240. }
  25241. .show_taskD.show>img {
  25242. transform: rotate(0deg);
  25243. }
  25244. .show_toolD {
  25245. min-width: fit-content;
  25246. margin-left: 10px;
  25247. display: flex;
  25248. align-items: center;
  25249. font-size: 14px;
  25250. cursor: pointer;
  25251. color: #717c8d;
  25252. /* position: absolute;
  25253. right: 45px;
  25254. top: 5px; */
  25255. }
  25256. .show_toolD>img {
  25257. width: 15px;
  25258. margin-right: 5px;
  25259. transition: 0.2s all;
  25260. transform: rotate(-90deg);
  25261. }
  25262. .show_toolD.show>img {
  25263. transform: rotate(0deg);
  25264. }
  25265. .remove {
  25266. background-image: url("../../../assets/icon/new/delete_u.png");
  25267. cursor: pointer;
  25268. opacity: 0.5;
  25269. width: 30px;
  25270. min-width: 30px;
  25271. height: 30px;
  25272. background-size: 100% 100%;
  25273. background-repeat: no-repeat;
  25274. margin-left: 10px;
  25275. }
  25276. .remove1 {
  25277. background-image: url("../../../assets/remove1.png");
  25278. background-repeat: no-repeat;
  25279. background-position: 5px 10px;
  25280. width: 40px;
  25281. height: 50px;
  25282. cursor: pointer;
  25283. margin-left: 10px;
  25284. }
  25285. .binfo_input {
  25286. width: 100%;
  25287. margin: 0;
  25288. padding: 12px 14px;
  25289. display: block;
  25290. min-width: 0;
  25291. outline: none;
  25292. box-sizing: border-box;
  25293. background: none;
  25294. border: none;
  25295. border-radius: 4px;
  25296. background: #fff;
  25297. font-size: 16px;
  25298. resize: none;
  25299. font-family: "Microsoft YaHei";
  25300. min-height: 48px;
  25301. /* border: 1px solid #3682fc00; */
  25302. border: 1.5px solid #cad1dc;
  25303. }
  25304. .binfo_textarea {
  25305. border: 1.5px solid #cad1dc;
  25306. font-size: 16px;
  25307. resize: none;
  25308. /* background: #f6f6f6; */
  25309. font-family: "Microsoft YaHei";
  25310. }
  25311. .binfo_input:focus-visible {
  25312. border: 1.5px solid #3681fc !important;
  25313. }
  25314. .time {
  25315. display: flex;
  25316. margin: 35px 0 80px 0;
  25317. }
  25318. .chapter_btnbox {
  25319. width: 160px;
  25320. border-radius: 5px;
  25321. border: 2px dashed gray;
  25322. display: flex;
  25323. padding: 8px 50px;
  25324. align-items: center;
  25325. justify-content: center;
  25326. margin: 30px auto 0;
  25327. cursor: pointer;
  25328. }
  25329. .icon_add {
  25330. position: relative;
  25331. width: 24px;
  25332. padding-top: 20px;
  25333. border-radius: 100%;
  25334. border-width: 2px;
  25335. border-style: solid;
  25336. border-color: gray;
  25337. }
  25338. .icon_add i:nth-child(1) {
  25339. position: absolute;
  25340. left: 50%;
  25341. top: 50%;
  25342. height: 60%;
  25343. transform: translate(-50%, -50%);
  25344. border-width: 1px;
  25345. border-style: solid;
  25346. border-color: inherit;
  25347. }
  25348. .icon_add i:nth-child(2) {
  25349. position: absolute;
  25350. top: 50%;
  25351. left: 50%;
  25352. width: 60%;
  25353. transform: translate(-50%, -50%);
  25354. border-width: 1px;
  25355. border-style: solid;
  25356. border-color: inherit;
  25357. }
  25358. .chapter_btn_w {
  25359. font-size: 0.9375rem;
  25360. font-weight: bold;
  25361. color: gray;
  25362. margin-left: 20px;
  25363. }
  25364. .disUoloadSty>>>.el-icon-plus {
  25365. display: none !important;
  25366. /* 上传按钮隐藏 */
  25367. }
  25368. .imgLeft {
  25369. margin: 15px 0;
  25370. }
  25371. .add_info_box {
  25372. margin: 0 0 0 auto;
  25373. display: flex;
  25374. flex-wrap: wrap;
  25375. }
  25376. .add_info_box button {
  25377. margin: 0 5px 10px 0;
  25378. }
  25379. .add_info_box2 {
  25380. display: flex;
  25381. align-items: center;
  25382. flex-wrap: wrap;
  25383. }
  25384. .add_info_box2::after {
  25385. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  25386. color: red;
  25387. font-size: 14px;
  25388. margin-bottom: 10px;
  25389. }
  25390. .add_chapters_box {
  25391. text-align: left;
  25392. background-color: #fff;
  25393. width: 100%;
  25394. border-radius: 4px;
  25395. font-size: 16px;
  25396. box-sizing: border-box;
  25397. position: relative;
  25398. padding: 0 15px;
  25399. height: auto;
  25400. overflow-y: auto;
  25401. overflow-x: hidden;
  25402. border: 1px solid #cad1dc;
  25403. }
  25404. .add_chapters_box.add_c_none {
  25405. display: flex;
  25406. justify-content: center;
  25407. align-items: center;
  25408. padding: 15px;
  25409. }
  25410. .add_c_none>img {
  25411. width: 25px;
  25412. }
  25413. .add_chapters_box.add_c_none>span {
  25414. font-size: 14px;
  25415. font-weight: 400;
  25416. margin: 0 0 5px 5px;
  25417. }
  25418. .homework_box {
  25419. display: flex;
  25420. align-items: flex-start;
  25421. flex-wrap: wrap;
  25422. margin: 15px 0 0 0;
  25423. flex-direction: column;
  25424. align-content: flex-start;
  25425. }
  25426. .course_homework {
  25427. display: flex;
  25428. justify-content: center;
  25429. flex-direction: row;
  25430. align-items: center;
  25431. margin: 0 10px 0 0;
  25432. }
  25433. .course_homework>>>.el-input__inner {
  25434. width: 140px;
  25435. margin-left: 15px;
  25436. }
  25437. .chapter_upload_move {
  25438. position: relative;
  25439. background-color: #fff;
  25440. position: absolute;
  25441. width: 100%;
  25442. top: 0px;
  25443. left: 0px;
  25444. border: 1px solid #eee;
  25445. border-radius: 5px;
  25446. transition: width 2s;
  25447. -moz-transition: width 2s;
  25448. -webkit-transition: width 2s;
  25449. -o-transition: width 2s;
  25450. }
  25451. .chapter_upload_l_i {
  25452. background-image: url("../../../assets/icon.png");
  25453. background-position: 3px -165px;
  25454. width: 30px;
  25455. height: 30px;
  25456. margin: 10px auto 0 auto;
  25457. }
  25458. .course_input_box {
  25459. display: flex;
  25460. margin-right: 20px;
  25461. min-width: 400px;
  25462. width: calc(100% - 350px);
  25463. align-items: center;
  25464. position: relative;
  25465. margin-bottom: 15px;
  25466. }
  25467. .course_input_box2 {
  25468. display: flex;
  25469. width: 100%;
  25470. align-items: center;
  25471. position: relative;
  25472. flex-wrap: wrap;
  25473. }
  25474. .course_input_box>.binfo_input {
  25475. width: calc(100%);
  25476. margin: 0;
  25477. border: 1.5px solid rgb(202, 209, 220);
  25478. border-radius: 5px;
  25479. font-weight: 600;
  25480. padding: 12px 14px 12px 71px;
  25481. }
  25482. .bb_courseIcon {
  25483. width: 57px;
  25484. height: 45px;
  25485. background: #f0f4fa;
  25486. border-radius: 5px 0px 0px 5px;
  25487. display: flex;
  25488. align-items: center;
  25489. justify-content: center;
  25490. border-right: 1.5px solid rgb(202, 209, 220);
  25491. box-sizing: border-box;
  25492. position: absolute;
  25493. left: 1.5px;
  25494. }
  25495. .bb_courseIcon>img {
  25496. width: 25px;
  25497. height: auto;
  25498. }
  25499. .big_box {
  25500. /* margin-top: 20px; */
  25501. display: flex;
  25502. justify-content: space-between;
  25503. /* border-bottom: 1px solid #E0E2ED; */
  25504. }
  25505. .left_first {
  25506. display: flex;
  25507. flex-direction: column;
  25508. flex-wrap: nowrap;
  25509. width: calc(100% - 310px);
  25510. padding: 20px;
  25511. box-sizing: border-box;
  25512. background: #fff;
  25513. border-radius: 5px;
  25514. }
  25515. .right_first {
  25516. width: 300px;
  25517. display: flex;
  25518. align-items: center;
  25519. justify-content: center;
  25520. /* border-left: 1px solid #E0E2ED; */
  25521. box-sizing: border-box;
  25522. padding: 20px;
  25523. flex-direction: column;
  25524. background: #fff;
  25525. border-radius: 5px;
  25526. }
  25527. .ai_box {
  25528. width: 204px;
  25529. display: flex;
  25530. justify-content: flex-end;
  25531. margin-bottom: 15px;
  25532. }
  25533. .ai_content {
  25534. display: flex;
  25535. align-items: center;
  25536. font-size: 14px;
  25537. padding: 7px 20px;
  25538. box-sizing: border-box;
  25539. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  25540. border-radius: 12px;
  25541. font-weight: 700;
  25542. cursor: pointer;
  25543. }
  25544. .ai_content>img {
  25545. width: 40px;
  25546. margin-right: 5px;
  25547. }
  25548. .c_info_title {
  25549. padding: 15px 0 15px 0;
  25550. font-size: 16px;
  25551. font-weight: bold;
  25552. margin: 0 0 0 20px;
  25553. box-sizing: border-box;
  25554. display: flex;
  25555. align-items: center;
  25556. line-height: 20px;
  25557. }
  25558. .c_info_title::before {
  25559. content: "";
  25560. display: block;
  25561. width: 3px;
  25562. height: 20px;
  25563. background: #0061ff;
  25564. border-radius: 3px;
  25565. margin: 0 5px 0 0;
  25566. }
  25567. .right_title {
  25568. height: 30px;
  25569. padding: 15px 0 15px 20px;
  25570. border-bottom: 1px solid #f2f2f2;
  25571. font-size: 1.5em;
  25572. font-weight: bold;
  25573. color: #0f7eff;
  25574. margin: 0 auto;
  25575. }
  25576. .people {
  25577. border: 1px solid rgb(229 229 229);
  25578. /* height: 495px; */
  25579. height: 350px;
  25580. border-radius: 5px;
  25581. width: 100%;
  25582. overflow: auto;
  25583. }
  25584. .people_top {
  25585. display: flex;
  25586. width: 100%;
  25587. /* justify-content: space-between; */
  25588. /* align-items: center; */
  25589. flex-direction: column;
  25590. padding: 10px 10px 0;
  25591. box-sizing: border-box;
  25592. }
  25593. .people_nav,
  25594. .people_top_right {
  25595. /* padding: 20px 0 0 20px; */
  25596. }
  25597. .people_top_right {
  25598. height: 40px;
  25599. margin-bottom: 10px;
  25600. }
  25601. .people_search {
  25602. display: flex;
  25603. position: relative;
  25604. }
  25605. .people_search>>>.el-input__inner {
  25606. /* height: 25px; */
  25607. width: 100%;
  25608. }
  25609. .search_img {
  25610. width: 20px;
  25611. height: 20px;
  25612. position: absolute;
  25613. right: 10px;
  25614. top: 50%;
  25615. transform: translateY(-50%);
  25616. }
  25617. .search_img>img {
  25618. width: 100%;
  25619. height: 100%;
  25620. }
  25621. .people_name {
  25622. display: flex;
  25623. justify-content: flex-start;
  25624. padding: 20px 10px;
  25625. flex-direction: column;
  25626. flex-wrap: wrap;
  25627. }
  25628. .p_box {
  25629. position: relative;
  25630. }
  25631. .people_name>>>.el-checkbox {
  25632. width: 100%;
  25633. display: flex;
  25634. align-items: center;
  25635. margin-bottom: 10px;
  25636. }
  25637. .people_name>>>.el-checkbox__label {
  25638. text-overflow: ellipsis;
  25639. overflow: hidden;
  25640. width: calc(100%);
  25641. }
  25642. .people_name2>>>.el-checkbox__label {
  25643. width: calc(100% - 130px);
  25644. }
  25645. .inviteCode {
  25646. position: absolute;
  25647. right: 30px;
  25648. color: #237ade;
  25649. top: 0;
  25650. cursor: pointer;
  25651. font-size: 13px;
  25652. }
  25653. .noneInvite {
  25654. color: #a8a8a8;
  25655. }
  25656. .inviteImg {
  25657. position: absolute;
  25658. right: 5px;
  25659. top: 0;
  25660. width: 20px;
  25661. }
  25662. .right_img {
  25663. width: 150px;
  25664. height: 150px;
  25665. margin: 0 auto;
  25666. }
  25667. .right_img>img {
  25668. width: 100%;
  25669. height: 100%;
  25670. }
  25671. .number {
  25672. margin-top: 20px;
  25673. color: #4aa6ff;
  25674. text-decoration: underline;
  25675. }
  25676. .success_button {
  25677. display: flex;
  25678. text-align: center;
  25679. margin: 5% 0 auto;
  25680. flex-direction: row;
  25681. justify-content: center;
  25682. }
  25683. .look_course {
  25684. margin-right: 40px;
  25685. background: #3d67bc;
  25686. width: 200px;
  25687. height: 35px;
  25688. line-height: 35px;
  25689. color: #fff;
  25690. text-align: center;
  25691. font-size: 14px;
  25692. border-radius: 5px;
  25693. cursor: pointer;
  25694. }
  25695. .attend_others {
  25696. width: 250px;
  25697. background: #4fb13c;
  25698. height: 35px;
  25699. line-height: 35px;
  25700. color: #fff;
  25701. text-align: center;
  25702. font-size: 14px;
  25703. border-radius: 5px;
  25704. cursor: pointer;
  25705. }
  25706. .dialog_diy2>>>.el-dialog__body {
  25707. text-align: center;
  25708. }
  25709. .write_togother {
  25710. position: absolute;
  25711. right: 45px;
  25712. display: flex;
  25713. top: 5%;
  25714. }
  25715. .write_people {
  25716. font-size: 14px;
  25717. line-height: 50px;
  25718. padding-right: 10px;
  25719. }
  25720. .end_write {
  25721. background: #3d67bc;
  25722. color: #fff;
  25723. width: 100px;
  25724. height: 35px;
  25725. line-height: 35px;
  25726. text-align: center;
  25727. font-size: 14px;
  25728. border-radius: 5px;
  25729. cursor: pointer;
  25730. }
  25731. .chapter_upload+.chapter_upload {
  25732. /* margin-top: 15px; */
  25733. border-top: 1px solid #e7ebf1;
  25734. }
  25735. .chapter_upload {
  25736. height: 45px;
  25737. position: relative;
  25738. display: flex;
  25739. align-items: center;
  25740. width: 100%;
  25741. min-height: 45px;
  25742. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  25743. /* border-radius: 4px; */
  25744. /* overflow: hidden; */
  25745. box-sizing: border-box;
  25746. }
  25747. .chapter_upload_drag {
  25748. position: absolute;
  25749. cursor: pointer;
  25750. width: 16px;
  25751. height: 16px;
  25752. left: -9px;
  25753. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  25754. background-size: 100% 100%;
  25755. z-index: 10;
  25756. display: none;
  25757. }
  25758. .isNavStage>.chapter_upload_drag {
  25759. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  25760. }
  25761. .chapter_upload_t {
  25762. background-color: #fff;
  25763. position: absolute;
  25764. height: 100%;
  25765. top: 0px;
  25766. left: 0px;
  25767. box-sizing: border-box;
  25768. }
  25769. .chapter_upload_o {
  25770. width: 100%;
  25771. height: 100%;
  25772. position: relative;
  25773. z-index: 1;
  25774. }
  25775. .chapter_upload_ic {
  25776. margin: 0 15px 0px auto;
  25777. display: flex;
  25778. align-items: center;
  25779. }
  25780. .chapter_upload_ic_l {
  25781. width: 50px;
  25782. height: 50px;
  25783. float: left;
  25784. }
  25785. .chapter_upload_ic_l div {
  25786. width: 30px;
  25787. height: 35px;
  25788. background: url("../../../assets/icon/icon.png");
  25789. }
  25790. .chapter_upload_ic_edit {
  25791. height: 100%;
  25792. display: flex;
  25793. align-items: center;
  25794. cursor: pointer;
  25795. margin: 0 10px 0 0;
  25796. }
  25797. .chapter_upload_ic_edit div {
  25798. width: 18px;
  25799. height: 18px;
  25800. background-image: url("../../../assets/icon/new/edit_u.png");
  25801. background-size: 100% 100%;
  25802. }
  25803. .chapter_upload_ic_check {
  25804. height: 100%;
  25805. display: flex;
  25806. align-items: center;
  25807. cursor: pointer;
  25808. margin: 0 10px 0 0;
  25809. }
  25810. .chapter_upload_ic_check div {
  25811. width: 18px;
  25812. height: 18px;
  25813. background-image: url("../../../assets/icon/course/lookeye.svg");
  25814. background-size: 100% 100%;
  25815. }
  25816. .chapter_upload_ic_r {
  25817. height: 100%;
  25818. display: flex;
  25819. align-items: center;
  25820. cursor: pointer;
  25821. }
  25822. .chapter_upload_ic_r div {
  25823. width: 18px;
  25824. height: 18px;
  25825. background-image: url("../../../assets/icon/new/delete_u.png");
  25826. background-size: 100% 100%;
  25827. }
  25828. .chapter_upload_n {
  25829. display: flex;
  25830. text-indent: 10px;
  25831. text-decoration: none;
  25832. text-overflow: ellipsis;
  25833. white-space: nowrap;
  25834. overflow: hidden;
  25835. width: 55%;
  25836. margin-left: 10px;
  25837. cursor: pointer;
  25838. margin-top: 2px;
  25839. align-items: center;
  25840. }
  25841. .chapter_upload_l_i2,
  25842. .chapter_upload_l_i3,
  25843. .chapter_upload_l_i8,
  25844. .chapter_upload_l_i6,
  25845. .chapter_upload_l_i12,
  25846. .chapter_upload_l_i14,
  25847. .chapter_upload_l_i13 {
  25848. width: 15px;
  25849. height: 15px;
  25850. background-size: 100% 100%;
  25851. }
  25852. .chapter_upload_l_i2 {
  25853. background-image: url("../../../assets/icon/new/u_word.png");
  25854. }
  25855. .chapter_upload_l_i3 {
  25856. background-image: url("../../../assets/icon/new/u_video.png");
  25857. }
  25858. .chapter_upload_l_i8 {
  25859. background-image: url("../../../assets/icon/new/u_url.png");
  25860. }
  25861. .chapter_upload_l_i14 {
  25862. background-image: url("../../../assets/icon/new/u_source.png");
  25863. }
  25864. .chapter_upload_l_i6 {
  25865. background-image: url("../../../assets/icon/new/u_picture.png");
  25866. }
  25867. .chapter_upload_l_i12 {
  25868. background-image: url("../../../assets/icon/new/u_word.png");
  25869. }
  25870. .chapter_upload_l_i13 {
  25871. background-image: url("../../../assets/icon/new/u_img.png");
  25872. }
  25873. .chapter_upload_noSee {
  25874. background-image: url("../../../assets/icon/new/u_noUpload.png");
  25875. width: 18px;
  25876. height: 18px;
  25877. background-size: 100% 100%;
  25878. display: block;
  25879. margin-right: 10px;
  25880. }
  25881. .chapter_upload_ud {
  25882. display: flex;
  25883. flex-direction: row;
  25884. justify-content: center;
  25885. margin: 0 10px 0 0;
  25886. }
  25887. .chapter_upload_ud>.chapter_upload_up {
  25888. margin-bottom: 0;
  25889. margin-right: 10px;
  25890. }
  25891. .chapter_upload_down,
  25892. .chapter_upload_up {
  25893. width: 20px;
  25894. height: 20px;
  25895. background: #e4eaf2;
  25896. cursor: pointer;
  25897. margin: 0 auto;
  25898. border-radius: 5px;
  25899. display: flex;
  25900. justify-content: center;
  25901. align-items: center;
  25902. }
  25903. .chapter_upload_up::after,
  25904. .chapter_upload_down::after {
  25905. content: "";
  25906. background-image: url("../../../assets/icon/new/downBtn.png");
  25907. width: 13px;
  25908. height: 13px;
  25909. background-size: 100% 100%;
  25910. display: block;
  25911. }
  25912. .chapter_upload_up::after {
  25913. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  25914. }
  25915. .chapter_upload_up {
  25916. margin-bottom: 5px;
  25917. }
  25918. .chapter_upload_ud2 {
  25919. display: flex;
  25920. flex-direction: row;
  25921. justify-content: center;
  25922. margin: 0 10px 0 0;
  25923. }
  25924. .chapter_upload_ud2>.chapter_upload_up2 {
  25925. margin-bottom: 0;
  25926. margin-right: 10px;
  25927. }
  25928. .chapter_upload_down2,
  25929. .chapter_upload_up2 {
  25930. cursor: pointer;
  25931. margin: 0 auto;
  25932. border-radius: 5px;
  25933. display: flex;
  25934. justify-content: center;
  25935. align-items: center;
  25936. color: #717c8d;
  25937. font-size: 14px;
  25938. }
  25939. .chapter_upload_up2 {
  25940. margin-right: 10px;
  25941. }
  25942. .chapter_upload_up2::before,
  25943. .chapter_upload_down2::before {
  25944. content: "";
  25945. background-image: url("../../../assets/icon/new/c_down.png");
  25946. width: 14px;
  25947. height: 14px;
  25948. background-size: 100% 100%;
  25949. display: block;
  25950. margin-right: 5px;
  25951. }
  25952. .chapter_upload_up2::before {
  25953. background-image: url("../../../assets/icon/new/c_up.png") !important;
  25954. }
  25955. .addWordStyle {
  25956. display: flex;
  25957. flex-direction: row;
  25958. justify-content: flex-start;
  25959. overflow-x: auto;
  25960. white-space: nowrap;
  25961. flex-wrap: wrap;
  25962. }
  25963. /* table 样式 */
  25964. .cont>>>table {
  25965. border-top: 1px solid #ccc;
  25966. border-left: 1px solid #ccc;
  25967. }
  25968. .cont>>>table td,
  25969. .cont>>>table th {
  25970. border-bottom: 1px solid #ccc;
  25971. border-right: 1px solid #ccc;
  25972. /* padding: 20px 5px; */
  25973. padding: 5px 10px;
  25974. max-width: 0px;
  25975. height: 30px;
  25976. vertical-align: baseline;
  25977. }
  25978. .cont>>>table th {
  25979. border-bottom: 2px solid #ccc;
  25980. text-align: center;
  25981. }
  25982. /* blockquote 样式 */
  25983. .cont>>>blockquote {
  25984. display: block;
  25985. border-left: 8px solid #d0e5f2;
  25986. padding: 5px 10px;
  25987. margin: 10px 0;
  25988. line-height: 1.4;
  25989. font-size: 100%;
  25990. background-color: #f1f1f1;
  25991. }
  25992. /* code 样式 */
  25993. .cont>>>code {
  25994. display: inline-block;
  25995. /* *display: inline; */
  25996. zoom: 1;
  25997. background-color: #f1f1f1;
  25998. border-radius: 3px;
  25999. padding: 3px 5px;
  26000. margin: 0 3px;
  26001. }
  26002. .cont>>>pre code {
  26003. display: block;
  26004. }
  26005. /* ul ol 样式 */
  26006. .cont>>>ul,
  26007. ol {
  26008. margin: 10px 0 10px 20px;
  26009. }
  26010. .wordbox {
  26011. display: flex;
  26012. flex-wrap: wrap;
  26013. cursor: pointer;
  26014. width: 100%;
  26015. }
  26016. .checkword {
  26017. width: 22px;
  26018. height: 22px;
  26019. margin: 10px auto 0;
  26020. cursor: pointer;
  26021. }
  26022. .checkword img {
  26023. width: 100%;
  26024. }
  26025. .stepBg {
  26026. display: flex;
  26027. justify-content: space-between;
  26028. align-items: center;
  26029. background: #fff;
  26030. width: calc(100%);
  26031. margin: 0 auto;
  26032. }
  26033. .stepBorder {
  26034. height: 3px !important;
  26035. background: #cad1dc;
  26036. width: 100px !important;
  26037. margin: 0 15px !important;
  26038. position: relative;
  26039. }
  26040. .border-active {
  26041. background: #3681fc !important;
  26042. }
  26043. .border-active::before,
  26044. .border-active::after {
  26045. border-color: #3681fc !important;
  26046. }
  26047. .stepBorder::before,
  26048. .stepBorder::after {
  26049. content: "";
  26050. width: 9px;
  26051. height: 9px;
  26052. background: #ffffff;
  26053. opacity: 1;
  26054. border: 2px solid #acb4bf;
  26055. display: block;
  26056. box-sizing: border-box;
  26057. border-radius: 50%;
  26058. position: absolute;
  26059. top: 50%;
  26060. transform: translateY(-50%);
  26061. }
  26062. .stepBorder::after {
  26063. right: -9px;
  26064. }
  26065. .stepTop {
  26066. width: 100%;
  26067. /* border-radius: 10px; */
  26068. display: flex;
  26069. justify-content: center;
  26070. align-items: center;
  26071. flex-wrap: nowrap;
  26072. background: #fff;
  26073. /* top: 18%; */
  26074. height: 80px;
  26075. border-bottom: 2px solid rgb(228, 232, 237);
  26076. box-sizing: border-box;
  26077. }
  26078. .stepTop2 {
  26079. width: 100%;
  26080. /* border-radius: 10px; */
  26081. display: flex;
  26082. justify-content: center;
  26083. align-items: center;
  26084. flex-wrap: nowrap;
  26085. background: #fff;
  26086. /* top: 18%; */
  26087. height: 20px;
  26088. border-bottom: 2px solid rgb(228, 232, 237);
  26089. box-sizing: border-box;
  26090. overflow: hidden;
  26091. cursor: pointer;
  26092. }
  26093. .stepTop>div img {
  26094. width: 100%;
  26095. }
  26096. .stepTop>div {
  26097. height: 50px;
  26098. width: 180px;
  26099. cursor: pointer;
  26100. margin: 10px 0;
  26101. border-radius: 10px;
  26102. }
  26103. .first,
  26104. .second,
  26105. .third,
  26106. .four {
  26107. background: #3681fc;
  26108. height: 90px;
  26109. color: #fff;
  26110. display: flex;
  26111. flex-direction: row;
  26112. align-items: center;
  26113. justify-content: center;
  26114. }
  26115. .first>div:nth-child(1),
  26116. .second>div:nth-child(1),
  26117. .third>div:nth-child(1),
  26118. .four>div:nth-child(1) {
  26119. margin: 5px 10px 0 0;
  26120. width: 2rem;
  26121. }
  26122. .firstNo,
  26123. .secondNo,
  26124. .thirdNo,
  26125. .fourNo {
  26126. background: #e7e7e7;
  26127. color: #adadad;
  26128. display: flex;
  26129. flex-direction: row;
  26130. align-items: center;
  26131. justify-content: center;
  26132. }
  26133. .firstNo>div:nth-child(1),
  26134. .secondNo>div:nth-child(1),
  26135. .thirdNo>div:nth-child(1),
  26136. .fourNo>div:nth-child(1) {
  26137. margin: 5px 10px 0 0;
  26138. width: 2rem;
  26139. }
  26140. .uploadWidth>>>.el-upload {
  26141. width: 60px;
  26142. height: 60px;
  26143. position: relative;
  26144. }
  26145. .addPeople {
  26146. background: #fa6060;
  26147. width: 150px;
  26148. height: 40px;
  26149. color: #fff;
  26150. border-radius: 5px;
  26151. text-align: center;
  26152. line-height: 40px;
  26153. font-size: 14px;
  26154. cursor: pointer;
  26155. }
  26156. .kcImg {
  26157. width: 60px;
  26158. margin-left: 10px;
  26159. }
  26160. .zyImg {
  26161. width: 55px;
  26162. margin: 0 10px;
  26163. }
  26164. .deleteZy {
  26165. width: 20px;
  26166. position: absolute;
  26167. top: 5px;
  26168. right: 5px;
  26169. cursor: pointer;
  26170. }
  26171. .kcImg>img,
  26172. .zyImg>img,
  26173. .deleteZy>img {
  26174. width: 100%;
  26175. height: 100%;
  26176. }
  26177. .zyBox {
  26178. display: flex;
  26179. flex-direction: row;
  26180. align-items: center;
  26181. background: #67d37d;
  26182. color: #fff;
  26183. width: 210px;
  26184. margin: 20px 20px 0 0;
  26185. border-radius: 10px;
  26186. height: 70px;
  26187. position: relative;
  26188. }
  26189. .upCss {
  26190. display: flex;
  26191. flex-direction: row;
  26192. justify-content: flex-start;
  26193. }
  26194. .upCss>>>.el-icon-plus {
  26195. position: none !important;
  26196. width: 200px;
  26197. height: 100px;
  26198. display: flex;
  26199. flex-wrap: nowrap;
  26200. flex-direction: column;
  26201. align-items: center;
  26202. justify-content: center;
  26203. border: 1px dashed #ccc;
  26204. min-width: 78px;
  26205. min-height: 100px;
  26206. z-index: 999;
  26207. }
  26208. .upCss>>>.el-upload-list__item-name {
  26209. width: 100px;
  26210. white-space: nowrap;
  26211. overflow: hidden;
  26212. text-overflow: ellipsis;
  26213. }
  26214. .upCss>>>.el-upload-list__item .el-icon-close {
  26215. font-size: 20px;
  26216. z-index: 9999;
  26217. }
  26218. .addStageImg {
  26219. min-width: 20px;
  26220. min-height: 20px;
  26221. width: 20px;
  26222. height: 20px;
  26223. cursor: pointer;
  26224. }
  26225. .addHW {
  26226. width: 28px;
  26227. height: 28px;
  26228. cursor: pointer;
  26229. }
  26230. .addStageImg>img,
  26231. .addHW>img {
  26232. width: 100%;
  26233. height: 100%;
  26234. }
  26235. .addNewPP>>>.el-dialog__body {
  26236. padding: 5px 20px;
  26237. }
  26238. .addNewPP>>>.el-dialog {
  26239. margin-top: 5vh !important;
  26240. }
  26241. .addNewPP2>>>.el-dialog__body {
  26242. padding: 5px 0;
  26243. }
  26244. .addNewPP2>>>.el-dialog {
  26245. margin-top: 5vh !important;
  26246. }
  26247. .isHeight {
  26248. height: 680px;
  26249. }
  26250. .toolChoose {
  26251. display: flex;
  26252. /* width: 100%; */
  26253. flex-direction: row;
  26254. flex-wrap: wrap;
  26255. }
  26256. .tool,
  26257. .isToolChoose {
  26258. display: flex;
  26259. flex-direction: column;
  26260. flex-wrap: nowrap;
  26261. width: fit-content;
  26262. margin: 10px 0 10px 0;
  26263. align-items: center;
  26264. border: 2px solid #dbdbdb00;
  26265. padding: 10px 20px;
  26266. border-radius: 5px;
  26267. cursor: pointer;
  26268. /* box-shadow: 0 0 2px 0px #dedede; */
  26269. position: relative;
  26270. box-sizing: border-box;
  26271. }
  26272. .tool:hover {
  26273. border: 2px solid #a5c7ff;
  26274. }
  26275. .tool:hover>.noCTool {
  26276. display: block;
  26277. opacity: 0.5;
  26278. }
  26279. .isToolChoose {
  26280. border: 2px solid #438aff !important;
  26281. box-shadow: 0 0 2px 0px #438aff;
  26282. opacity: 1 !important;
  26283. }
  26284. .isCTool,
  26285. .noCTool {
  26286. width: 30px;
  26287. height: 30px;
  26288. position: absolute;
  26289. top: -4px;
  26290. right: -4px;
  26291. }
  26292. .noCTool {
  26293. display: none;
  26294. }
  26295. .isCTool>img,
  26296. .noCTool>img {
  26297. width: 100%;
  26298. height: 100%;
  26299. }
  26300. .tool+.tool {
  26301. margin-right: 10px;
  26302. }
  26303. .whiteBIcon {
  26304. width: 60px;
  26305. cursor: pointer;
  26306. display: flex;
  26307. flex-direction: column;
  26308. flex-wrap: nowrap;
  26309. align-items: center;
  26310. font-size: 14px;
  26311. }
  26312. .whiteBIcon>img,
  26313. .toolIcon>img,
  26314. .arrow>img {
  26315. width: 100%;
  26316. height: 100%;
  26317. }
  26318. .check img {
  26319. width: 20px;
  26320. height: 20px;
  26321. }
  26322. .whiteBIcon>img {
  26323. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  26324. border-radius: 15px;
  26325. }
  26326. .whiteBIcon>div:nth-child(2) {
  26327. height: 20px;
  26328. line-height: 20px;
  26329. text-align: center;
  26330. }
  26331. .check {
  26332. /* width: 20px;
  26333. height: 20px; */
  26334. cursor: pointer;
  26335. margin: 10px 0 0;
  26336. }
  26337. .checkDiv {
  26338. display: flex;
  26339. align-items: center;
  26340. }
  26341. .checkDiv span {
  26342. margin-left: 5px;
  26343. color: #858585;
  26344. }
  26345. .customWidth>>>.el-dialog {
  26346. min-width: 600px !important;
  26347. }
  26348. .CollaborativeCss {
  26349. width: 100%;
  26350. display: flex;
  26351. justify-content: center;
  26352. align-items: center;
  26353. box-sizing: border-box;
  26354. padding: 10px 0;
  26355. cursor: pointer;
  26356. }
  26357. .CollaborativeCss >>> .el-tooltip {
  26358. overflow: hidden;
  26359. white-space: nowrap;
  26360. text-overflow: ellipsis;
  26361. }
  26362. .CollaborativeCss2 {
  26363. background: #e0eafb;
  26364. color: #3681fc;
  26365. font-weight: 700;
  26366. border-radius: 5px;
  26367. }
  26368. .a_addBox {
  26369. margin: 10px 0;
  26370. background: #fff;
  26371. padding: 15px;
  26372. /* max-height: 600px; */
  26373. overflow: auto;
  26374. }
  26375. .a_add_box {
  26376. border-bottom: 2px solid #eee;
  26377. padding-bottom: 25px;
  26378. }
  26379. .a_add_head {
  26380. display: flex;
  26381. align-items: center;
  26382. justify-content: space-between;
  26383. margin: 10px 0 0 0;
  26384. font-size: 18px;
  26385. }
  26386. .a_add_checkType {
  26387. margin-top: 10px;
  26388. display: flex;
  26389. font-size: 14px;
  26390. align-items: center;
  26391. }
  26392. .a_add_checkType span {
  26393. box-sizing: border-box;
  26394. padding: 0 0 5px 0;
  26395. cursor: pointer;
  26396. }
  26397. .a_add_checkType span+span {
  26398. margin-left: 10px;
  26399. }
  26400. .a_add_checkType .active {
  26401. border-bottom: 2px solid #409eff;
  26402. color: #409eff;
  26403. }
  26404. .a_add_head .a_add_head_input {
  26405. /* width: 540px; */
  26406. width: 100%;
  26407. }
  26408. .a_add_head .a_add_head_div {
  26409. display: flex;
  26410. align-items: center;
  26411. justify-content: space-between;
  26412. }
  26413. .a_add_body {
  26414. display: flex;
  26415. /* align-items: center; */
  26416. align-items: flex-end;
  26417. }
  26418. .a_add_input {
  26419. display: flex;
  26420. align-items: center;
  26421. flex-wrap: wrap;
  26422. }
  26423. .a_add_input_choice {
  26424. flex-direction: column;
  26425. margin-right: 10px;
  26426. }
  26427. .a_add_input_choice>>>.el-radio {
  26428. display: flex;
  26429. align-items: center;
  26430. flex-direction: row-reverse;
  26431. margin: 30px 0 0 0;
  26432. position: relative;
  26433. }
  26434. .a_add_input_choice>>>.el-checkbox {
  26435. display: flex;
  26436. align-items: center;
  26437. flex-direction: row-reverse;
  26438. margin: 30px 0 0 0;
  26439. position: relative;
  26440. }
  26441. .width100 {
  26442. width: 100%;
  26443. }
  26444. .a_add_input .a_add_persent {
  26445. width: 100%;
  26446. }
  26447. .a_add_persent_div {
  26448. width: 100%;
  26449. display: flex;
  26450. align-items: center;
  26451. }
  26452. .a_add_persent_div span {
  26453. margin: 5px 0;
  26454. }
  26455. .a_add_persent_div span:nth-child(1) {
  26456. width: 30%;
  26457. }
  26458. .a_add_persent_div span:nth-child(2) {
  26459. width: 7%;
  26460. }
  26461. .a_add_persent_div span:nth-child(3) {
  26462. width: 40%;
  26463. }
  26464. .a_add_body_div {
  26465. display: flex;
  26466. align-items: center;
  26467. justify-content: center;
  26468. /* flex-direction: column; */
  26469. position: absolute;
  26470. right: -20px;
  26471. transform: translateX(100%);
  26472. }
  26473. .a_add_body_div>>>.el-button--primary {
  26474. background: #466b99;
  26475. border: none;
  26476. }
  26477. .all_choose {
  26478. display: flex;
  26479. flex-direction: row;
  26480. align-items: flex-start;
  26481. width: 100%;
  26482. }
  26483. .all_choose+.all_choose {
  26484. /* margin-top: 10px */
  26485. }
  26486. .all_choose>span {
  26487. min-width: fit-content;
  26488. display: block;
  26489. white-space: nowrap;
  26490. overflow: hidden;
  26491. text-overflow: ellipsis;
  26492. margin-right: 20px;
  26493. font-weight: bold;
  26494. font-size: 14px;
  26495. }
  26496. .all_choose>>>.el-checkbox-group {
  26497. display: flex;
  26498. flex-direction: row;
  26499. width: 100%;
  26500. flex-wrap: wrap;
  26501. align-content: center;
  26502. justify-content: flex-start;
  26503. align-items: center;
  26504. margin-top: 3px;
  26505. }
  26506. .all_choose>.el-checkbox-group>>>.el-checkbox {
  26507. margin-bottom: 10px;
  26508. display: flex;
  26509. flex-direction: row;
  26510. align-items: center;
  26511. margin-right: 10px;
  26512. }
  26513. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  26514. min-width: 80px;
  26515. overflow: hidden;
  26516. width: 80px;
  26517. text-overflow: ellipsis;
  26518. white-space: nowrap;
  26519. }
  26520. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  26521. width: auto;
  26522. }
  26523. .choose>div:nth-child(3)>span {
  26524. /* letter-spacing: 0 !important; */
  26525. }
  26526. .choose {
  26527. display: flex;
  26528. flex-direction: column;
  26529. flex-wrap: nowrap;
  26530. height: 100%;
  26531. justify-content: space-evenly;
  26532. align-items: flex-start;
  26533. }
  26534. .both {
  26535. display: flex;
  26536. flex-direction: row;
  26537. flex-wrap: wrap;
  26538. width: 100%;
  26539. align-items: center;
  26540. justify-content: flex-start;
  26541. margin: 0 0 15px;
  26542. }
  26543. .notice>>>.el-dialog {
  26544. width: 500px !important;
  26545. text-align: center;
  26546. }
  26547. .notice>>>.el-button {
  26548. margin-top: 20px;
  26549. }
  26550. .whiteBg {
  26551. /* background: #fff; */
  26552. border-radius: 10px;
  26553. }
  26554. .wb_j_box {
  26555. display: flex;
  26556. width: 100%;
  26557. padding: 0 20px 0;
  26558. box-sizing: border-box;
  26559. }
  26560. .wb_j_box_content {
  26561. width: calc(100% - 55% - 100px);
  26562. display: flex;
  26563. align-items: center;
  26564. }
  26565. .wb_j_box_p_box {
  26566. max-width: calc(100% - 200px);
  26567. word-break: break-all;
  26568. overflow: hidden;
  26569. margin: 0 0 0 10px;
  26570. font-size: 14px;
  26571. color: #6e6e6e;
  26572. z-index: 999;
  26573. }
  26574. .chooseWho {
  26575. display: flex;
  26576. width: 410px;
  26577. flex-direction: row;
  26578. flex-wrap: nowrap;
  26579. justify-content: space-between;
  26580. padding-bottom: 10px;
  26581. }
  26582. .chooseWho>div {
  26583. cursor: pointer;
  26584. padding-bottom: 10px;
  26585. font-weight: bold;
  26586. }
  26587. .isChooseActive {
  26588. color: #3e88f4;
  26589. border-bottom: 2px solid #2f80f3;
  26590. }
  26591. .toolSort {
  26592. display: flex;
  26593. flex-direction: row;
  26594. flex-wrap: wrap;
  26595. justify-content: flex-start;
  26596. align-items: flex-start;
  26597. }
  26598. .toolSort>div {
  26599. margin-right: 10px;
  26600. }
  26601. .tools {
  26602. width: 100%;
  26603. display: flex;
  26604. flex-direction: column;
  26605. flex-wrap: nowrap;
  26606. align-items: flex-start;
  26607. }
  26608. .leftTools,
  26609. .rightTools {
  26610. width: 50%;
  26611. }
  26612. .leftTools+.leftTools {
  26613. border-top: 1px solid #dbdbdb;
  26614. padding-top: 30px;
  26615. }
  26616. .rightTools {
  26617. display: flex;
  26618. flex-direction: row;
  26619. flex-wrap: nowrap;
  26620. justify-content: space-around;
  26621. }
  26622. .firstToolList {
  26623. display: flex;
  26624. flex-direction: column;
  26625. flex-wrap: nowrap;
  26626. align-items: center;
  26627. }
  26628. .iconList {
  26629. display: flex;
  26630. flex-direction: row;
  26631. flex-wrap: wrap;
  26632. justify-content: flex-start;
  26633. align-items: center;
  26634. margin: 20px 0 5px 0;
  26635. width: 240px;
  26636. min-width: 240px;
  26637. }
  26638. .iconTool {
  26639. display: flex;
  26640. flex-direction: column;
  26641. flex-wrap: nowrap;
  26642. align-items: center;
  26643. justify-content: flex-start;
  26644. margin: 15px 10px;
  26645. }
  26646. .toolIcon {
  26647. width: 50px;
  26648. }
  26649. .taskBorder {
  26650. /* border: 1px solid #CAD1DC; */
  26651. border-radius: 10px;
  26652. margin-top: 10px;
  26653. min-height: 670px;
  26654. position: relative;
  26655. background: #fff;
  26656. padding: 20px;
  26657. overflow: hidden;
  26658. box-sizing: border-box;
  26659. }
  26660. .smallTaskBorder {
  26661. height: 405px;
  26662. min-height: 405px !important;
  26663. overflow: hidden;
  26664. }
  26665. /* .taskBorder>div {
  26666. padding: 30px 30px 10px;
  26667. } */
  26668. .addTaskBorder {
  26669. /* border: 2px solid #5E9AFC; */
  26670. border-radius: 8px;
  26671. margin-top: 10px;
  26672. cursor: pointer;
  26673. /* height: 50px;
  26674. line-height: 50px; */
  26675. background: #fff;
  26676. padding: 15px 0;
  26677. display: flex;
  26678. align-items: center;
  26679. justify-content: center;
  26680. }
  26681. /* .addTaskBorder>div {
  26682. margin: 0 auto;
  26683. display: flex;
  26684. align-items: center;
  26685. justify-content: center;
  26686. }
  26687. .addTaskBorder>div>img {
  26688. width: 20px;
  26689. }
  26690. .addTaskBorder>div>span {
  26691. font-size: 16px;
  26692. margin-left: 10px;
  26693. color: #5E9AFC;
  26694. } */
  26695. .funBlock {
  26696. display: flex;
  26697. padding: 15px 0;
  26698. flex-direction: row;
  26699. justify-content: center;
  26700. align-items: center;
  26701. position: absolute;
  26702. right: 0;
  26703. bottom: 0;
  26704. background: #fff;
  26705. width: 100%;
  26706. height: 60px;
  26707. z-index: 9;
  26708. }
  26709. .fold {
  26710. display: flex;
  26711. margin: 0 20px;
  26712. flex-direction: row;
  26713. align-items: center;
  26714. cursor: pointer;
  26715. color: #2b7bff;
  26716. }
  26717. .arrow {
  26718. margin-right: 8px;
  26719. width: 16px;
  26720. height: 16px;
  26721. min-width: 16px;
  26722. min-height: 16px;
  26723. background-size: 100% 100%;
  26724. display: block;
  26725. background-image: url(../../../assets/icon/new/u_up.png);
  26726. /* border-left: 7px solid transparent;
  26727. border-bottom: 7px solid #717C8D;
  26728. border-top: 0px solid transparent;
  26729. border-right: 7px solid transparent; */
  26730. /* box-sizing: border-box; */
  26731. transition: all 0.3s;
  26732. }
  26733. .arrowZ {
  26734. transform: rotate(180deg);
  26735. }
  26736. .addToolFun {
  26737. display: flex;
  26738. width: 150px;
  26739. flex-direction: row;
  26740. align-items: center;
  26741. justify-content: center;
  26742. border: 2px dashed #cad1dc;
  26743. border-radius: 5px;
  26744. height: 50px;
  26745. margin: 35px auto 0;
  26746. cursor: pointer;
  26747. }
  26748. .addToolFun2 {
  26749. display: flex;
  26750. width: 150px;
  26751. border: 2px dashed #cad1dc;
  26752. flex-direction: row;
  26753. align-items: center;
  26754. justify-content: center;
  26755. border-radius: 5px;
  26756. height: 50px;
  26757. margin: 0 auto 0;
  26758. cursor: pointer;
  26759. }
  26760. .addToolFun2>div,
  26761. .addToolFun>div {
  26762. display: flex;
  26763. line-height: 50px;
  26764. }
  26765. .addToolImg {
  26766. width: 20px;
  26767. height: 20px;
  26768. margin-right: 10px;
  26769. }
  26770. .addToolsDia>>>.el-dialog__body {
  26771. padding: 20px;
  26772. }
  26773. .addToolsDia>>>.el-dialog__body>.toolChoose {
  26774. padding: 0;
  26775. }
  26776. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  26777. padding: 0;
  26778. border-bottom: none;
  26779. margin-bottom: 0;
  26780. }
  26781. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  26782. width: 100%;
  26783. }
  26784. .lineCss>>>.el-form-item__label {
  26785. width: auto !important;
  26786. }
  26787. .lineCss>>>.el-form-item__content {
  26788. margin-left: 50px !important;
  26789. }
  26790. .newSteps {
  26791. display: flex;
  26792. width: 100% !important;
  26793. /* height: 80px; */
  26794. cursor: pointer;
  26795. margin: 10px 0;
  26796. border-radius: 10px;
  26797. flex-direction: row;
  26798. align-content: center;
  26799. justify-content: center;
  26800. align-items: center;
  26801. margin: 0 !important;
  26802. }
  26803. /* 评价样式 */
  26804. .elist_css {
  26805. padding-bottom: 75px !important;
  26806. }
  26807. .elist_title {
  26808. margin-bottom: 10px;
  26809. }
  26810. .elist_input {
  26811. width: 100%;
  26812. }
  26813. .elist_input_box {
  26814. display: flex;
  26815. align-items: center;
  26816. flex-wrap: wrap;
  26817. }
  26818. .elist_input_box+.elist_input_box {
  26819. margin-top: 30px;
  26820. }
  26821. .elist_input .elist_input_box input {
  26822. font: inherit;
  26823. color: currentColor;
  26824. width: 100%;
  26825. /* max-width: calc(100% - 385px); */
  26826. max-width: calc(100% - 150px);
  26827. padding: 8px 14px;
  26828. display: block;
  26829. min-width: 0;
  26830. outline: none;
  26831. border: 1px solid rgba(0, 0, 0, 0.23);
  26832. border-radius: 4px;
  26833. box-sizing: border-box;
  26834. background: #fff;
  26835. margin: 0 20px 0 0;
  26836. }
  26837. .elist_input .elist_input_box span {
  26838. height: 36px;
  26839. line-height: 36px;
  26840. color: rgb(82, 82, 82);
  26841. min-width: 80px;
  26842. }
  26843. .elist_input .elist_input_box .remove {
  26844. height: 20px;
  26845. width: 20px;
  26846. min-height: 20px;
  26847. min-width: 20px;
  26848. background-size: 100% 100%;
  26849. background-position: unset;
  26850. margin-left: 5px;
  26851. }
  26852. .elist_input_box>>>.el-rate {
  26853. display: flex;
  26854. height: 36px;
  26855. align-items: center;
  26856. }
  26857. .elist_input_box .elist_inptu_text {
  26858. width: 100%;
  26859. display: flex;
  26860. align-items: center;
  26861. margin-top: 10px;
  26862. }
  26863. .elist_input_box .elist_inptu_text input {
  26864. /* width: 500px; */
  26865. width: 100%;
  26866. max-width: unset;
  26867. }
  26868. .elist_input_box>>>.el-rate__icon {
  26869. font-size: 24px;
  26870. }
  26871. .elist_btn {
  26872. margin-top: 10px;
  26873. }
  26874. .lineTitle {
  26875. /* margin-top: 15px; */
  26876. width: 110px;
  26877. font-size: 16px;
  26878. display: flex;
  26879. align-items: center;
  26880. line-height: 20px;
  26881. }
  26882. .lineTitle::before {
  26883. content: "";
  26884. display: block;
  26885. width: 3px;
  26886. height: 20px;
  26887. background: #0061ff;
  26888. border-radius: 3px;
  26889. margin: 0 5px 0 0;
  26890. }
  26891. .clineTitle::before {
  26892. content: "";
  26893. display: block;
  26894. min-width: 10px;
  26895. width: 10px;
  26896. height: 10px;
  26897. background: #0061ff;
  26898. border-radius: 50%;
  26899. margin: 0 5px 0 0;
  26900. }
  26901. .courseTop {
  26902. display: flex;
  26903. flex-direction: row;
  26904. justify-content: space-between;
  26905. align-items: center;
  26906. width: calc(100%);
  26907. margin: 0 auto;
  26908. padding: 10px 20px;
  26909. box-sizing: border-box;
  26910. position: absolute;
  26911. top: 0;
  26912. }
  26913. .stepsNav {
  26914. display: flex;
  26915. flex-direction: row;
  26916. justify-content: flex-start;
  26917. align-items: center;
  26918. }
  26919. .stepsWord {
  26920. font-size: 18px;
  26921. color: #fff;
  26922. font-weight: bold;
  26923. margin-left: auto;
  26924. background: rgb(15, 126, 255);
  26925. border-radius: 5px;
  26926. padding: 3px 25px;
  26927. box-sizing: border-box;
  26928. }
  26929. .stepBox {
  26930. width: calc(100% - 40px);
  26931. height: calc(100%);
  26932. overflow: hidden;
  26933. border-radius: 5px;
  26934. margin: 0 auto;
  26935. }
  26936. .rightBox {
  26937. width: calc(100%);
  26938. background: #f0f2f5;
  26939. /* border-radius: 10px; */
  26940. overflow: auto;
  26941. height: calc(100% - 150px);
  26942. margin: 0 auto;
  26943. position: relative;
  26944. box-sizing: border-box;
  26945. }
  26946. .e_add_top {
  26947. display: flex;
  26948. justify-content: space-between;
  26949. background: #fff;
  26950. position: absolute;
  26951. right: 20px;
  26952. height: 50px;
  26953. align-items: center;
  26954. }
  26955. .e_add_title2 {
  26956. display: flex;
  26957. align-items: center;
  26958. }
  26959. .e_add_title2 span {
  26960. width: 40px;
  26961. }
  26962. .e_add_title {
  26963. display: flex;
  26964. align-items: center;
  26965. color: #b8b8b8;
  26966. font-size: 18px;
  26967. position: relative;
  26968. height: 40px;
  26969. }
  26970. .e_add_title span {
  26971. margin-right: 10px;
  26972. }
  26973. .e_add_title .el_input {
  26974. width: 300px;
  26975. }
  26976. .e_add_title>>>.el-input__inner {
  26977. width: 400px;
  26978. }
  26979. .e_add_btn {}
  26980. .e_add_content {
  26981. display: flex;
  26982. width: 100%;
  26983. }
  26984. .e_add_list {
  26985. background: #fff;
  26986. height: 500px;
  26987. width: 210px;
  26988. position: relative;
  26989. margin: 15px 5px 0 0;
  26990. flex-shrink: 0;
  26991. display: flex;
  26992. flex-direction: column;
  26993. }
  26994. .e_add_list_title {
  26995. font-size: 20px;
  26996. width: 100%;
  26997. box-sizing: border-box;
  26998. padding: 15px 40px;
  26999. text-align: center;
  27000. border-bottom: 1px solid #eaeaea;
  27001. position: relative;
  27002. display: flex;
  27003. align-items: center;
  27004. justify-content: center;
  27005. height: 57px;
  27006. background: #f6f6f6;
  27007. }
  27008. .e_add_list_title span {
  27009. overflow: hidden;
  27010. white-space: nowrap;
  27011. text-overflow: ellipsis;
  27012. }
  27013. .e_add_list_title img {
  27014. position: absolute;
  27015. right: 15px;
  27016. width: 25px;
  27017. cursor: pointer;
  27018. top: 50%;
  27019. transform: translateY(-50%);
  27020. }
  27021. .e_add_list_body {
  27022. height: calc(100% - 187px);
  27023. overflow: auto;
  27024. }
  27025. .e_add_list_child {
  27026. width: 100%;
  27027. display: flex;
  27028. align-items: center;
  27029. justify-content: center;
  27030. position: relative;
  27031. box-sizing: border-box;
  27032. padding: 15px 40px;
  27033. text-align: center;
  27034. }
  27035. .e_add_list_child span {
  27036. overflow: hidden;
  27037. white-space: nowrap;
  27038. text-overflow: ellipsis;
  27039. cursor: pointer;
  27040. }
  27041. .e_add_list_child img {
  27042. position: absolute;
  27043. right: 10px;
  27044. width: 21px;
  27045. cursor: pointer;
  27046. top: 50%;
  27047. transform: translateY(-50%);
  27048. }
  27049. .e_add_list_child+.e_add_list_child {
  27050. border-top: 1px solid #eaeaea;
  27051. }
  27052. .e_add_list_child .active {
  27053. color: #409eff;
  27054. }
  27055. .e_add_list_btn {
  27056. position: absolute;
  27057. bottom: 0;
  27058. height: 50px;
  27059. background: rgb(120, 120, 254);
  27060. width: 100%;
  27061. color: #fff;
  27062. font-size: 16px;
  27063. text-align: center;
  27064. line-height: 50px;
  27065. cursor: pointer;
  27066. }
  27067. .e_add_list_detail {
  27068. position: absolute;
  27069. bottom: 0;
  27070. height: 130px;
  27071. background: rgb(120, 120, 254);
  27072. width: 100%;
  27073. color: #fff;
  27074. font-size: 16px;
  27075. display: flex;
  27076. align-items: center;
  27077. justify-content: center;
  27078. }
  27079. .e_add_list_detail textarea {
  27080. height: 90%;
  27081. width: 95%;
  27082. border: none;
  27083. resize: none;
  27084. outline: none;
  27085. padding: 5px;
  27086. box-sizing: border-box;
  27087. }
  27088. .e_add_list_pbox {
  27089. width: 100%;
  27090. }
  27091. .e_add_list_pbox_title {
  27092. height: 50px;
  27093. background: #fff;
  27094. display: flex;
  27095. align-items: center;
  27096. width: 100%;
  27097. box-sizing: border-box;
  27098. padding: 0 20px;
  27099. flex-direction: row;
  27100. flex-wrap: wrap;
  27101. }
  27102. .type_title {
  27103. font-size: 18px;
  27104. font-weight: 700;
  27105. }
  27106. .type_content {
  27107. font-size: 16px;
  27108. margin-left: 30px;
  27109. }
  27110. .type_content span+span {
  27111. margin-left: 20px;
  27112. }
  27113. .type_content span {
  27114. cursor: pointer;
  27115. padding-bottom: 5px;
  27116. box-sizing: border-box;
  27117. }
  27118. .type_content .active {
  27119. color: #409eff;
  27120. border-bottom: 2px solid #409eff;
  27121. }
  27122. .e_add_list_pbox_content {
  27123. height: calc(100% - 50px);
  27124. display: flex;
  27125. align-items: center;
  27126. width: 100%;
  27127. background: #fff;
  27128. }
  27129. .mbCss {
  27130. width: 100%;
  27131. display: flex;
  27132. flex-direction: row;
  27133. flex-wrap: nowrap;
  27134. align-content: center;
  27135. align-items: flex-start;
  27136. justify-content: flex-start;
  27137. }
  27138. .pjCss {
  27139. /* width: 42%; */
  27140. width: calc(100% - 55%);
  27141. display: flex;
  27142. flex-direction: column;
  27143. flex-wrap: nowrap;
  27144. align-items: flex-start;
  27145. }
  27146. .e_box {
  27147. /* display: flex; */
  27148. flex-wrap: wrap;
  27149. max-height: 500px;
  27150. align-items: flex-start;
  27151. overflow: auto;
  27152. width: 100%;
  27153. }
  27154. .e_card {
  27155. border: 1px solid #ccc;
  27156. background: #fff;
  27157. margin-right: 20px;
  27158. width: 270px;
  27159. display: flex;
  27160. flex-direction: column;
  27161. align-items: center;
  27162. border-radius: 5px;
  27163. margin-top: 10px;
  27164. text-align: center;
  27165. }
  27166. .e_card_picture {
  27167. margin: 10px 0;
  27168. }
  27169. .e_card_picture>img {
  27170. width: 50px;
  27171. }
  27172. .e_card_name {
  27173. width: 100%;
  27174. padding: 0 10px;
  27175. box-sizing: border-box;
  27176. margin-bottom: 10px;
  27177. overflow: hidden;
  27178. text-overflow: ellipsis;
  27179. white-space: nowrap;
  27180. }
  27181. .e_card_time {
  27182. width: 100%;
  27183. padding: 0 10px;
  27184. box-sizing: border-box;
  27185. font-size: 15px;
  27186. color: #c3c3c3;
  27187. margin-bottom: 10px;
  27188. }
  27189. .e_card_btn {
  27190. height: 40px;
  27191. display: flex;
  27192. align-items: center;
  27193. width: 100%;
  27194. background: rgb(244, 244, 244);
  27195. }
  27196. .e_card_btn:hover {
  27197. background: rgb(221 221 221);
  27198. }
  27199. .e_card_btn span {
  27200. flex: 1 1 auto;
  27201. text-align: center;
  27202. cursor: pointer;
  27203. }
  27204. .addEva {
  27205. border: 1px solid #ccc;
  27206. background: #fff;
  27207. margin-right: 20px;
  27208. width: 270px;
  27209. height: 149px;
  27210. display: flex;
  27211. flex-direction: column;
  27212. align-items: center;
  27213. border-radius: 5px;
  27214. margin-top: 10px;
  27215. text-align: center;
  27216. cursor: pointer;
  27217. justify-content: center;
  27218. }
  27219. .addEva>img {
  27220. width: 50px;
  27221. object-fit: cover;
  27222. }
  27223. .uploadFm {
  27224. border: 1px dashed #ccc;
  27225. width: 100%;
  27226. height: 140px;
  27227. position: relative;
  27228. cursor: pointer;
  27229. display: flex;
  27230. flex-direction: column;
  27231. justify-content: center;
  27232. align-items: center;
  27233. font-size: 14px;
  27234. color: #6e6e6e;
  27235. position: relative;
  27236. }
  27237. .cover_p {
  27238. width: 100% !important;
  27239. height: 100%;
  27240. object-fit: cover;
  27241. }
  27242. .uploadFm2:hover .cover_mask {
  27243. display: flex !important;
  27244. }
  27245. .cover_mask {
  27246. display: none;
  27247. width: 100%;
  27248. height: 100%;
  27249. position: absolute;
  27250. background: #00000054;
  27251. align-items: center;
  27252. justify-content: center;
  27253. flex-direction: column;
  27254. }
  27255. .cover_mask>img {
  27256. width: 30px;
  27257. }
  27258. .cover_mask>span {
  27259. color: #fff;
  27260. font-size: 12px;
  27261. }
  27262. .uploadFm>img {
  27263. width: 50px;
  27264. }
  27265. .fileCss {
  27266. width: 100%;
  27267. display: flex;
  27268. flex-direction: row;
  27269. flex-wrap: nowrap;
  27270. justify-content: space-around;
  27271. align-items: center;
  27272. padding-top: 15px;
  27273. }
  27274. .fileCss>div {
  27275. display: flex;
  27276. flex-direction: column;
  27277. align-items: center;
  27278. }
  27279. .fileCss .spanName {
  27280. margin-top: 10px;
  27281. }
  27282. .sysPicBox {
  27283. display: flex;
  27284. flex-direction: row;
  27285. flex-wrap: wrap;
  27286. align-content: flex-start;
  27287. height: 435px;
  27288. overflow: auto;
  27289. position: relative;
  27290. }
  27291. .picNone {
  27292. position: absolute;
  27293. left: 50%;
  27294. top: 45%;
  27295. transform: translate(-50%, -50%);
  27296. width: fit-content;
  27297. color: #9c9c9c;
  27298. }
  27299. .sysPic {
  27300. width: 200px;
  27301. height: 115px;
  27302. margin: 0 20px 20px 0;
  27303. cursor: pointer;
  27304. }
  27305. .sysPic>img,
  27306. .isSysPic>img,
  27307. .deletePic>img {
  27308. width: 100%;
  27309. height: 100%;
  27310. object-fit: cover;
  27311. }
  27312. .isSysPic {
  27313. width: 200px;
  27314. height: 115px;
  27315. position: relative;
  27316. }
  27317. .deletePic {
  27318. width: 20px;
  27319. height: 20px;
  27320. position: absolute;
  27321. top: 0;
  27322. right: 0;
  27323. cursor: pointer;
  27324. }
  27325. .select_box1 {
  27326. height: 100%;
  27327. }
  27328. .select_box1_img {
  27329. background: #fff;
  27330. border-radius: 5px;
  27331. padding: 15px;
  27332. box-sizing: border-box;
  27333. margin-bottom: 20px;
  27334. }
  27335. .select_box1_title {
  27336. padding: 0 0 15px 0;
  27337. border-bottom: 1px solid #eee;
  27338. margin-bottom: 15px;
  27339. }
  27340. .select_box1_title span:nth-child(1) {
  27341. font-size: 16px;
  27342. margin-right: 20px;
  27343. color: #000;
  27344. }
  27345. .select_box1_title span:nth-child(2) {
  27346. font-size: 14px;
  27347. color: rgb(112, 112, 112);
  27348. }
  27349. .select_box1_add_img {}
  27350. .select_box1_select {
  27351. background: #fff;
  27352. border-radius: 5px;
  27353. padding: 15px;
  27354. box-sizing: border-box;
  27355. height: calc(100% - 200px);
  27356. overflow: auto;
  27357. }
  27358. .select_box2 {
  27359. height: 100%;
  27360. }
  27361. .select_box2_title {
  27362. background: #fff;
  27363. border-radius: 5px;
  27364. padding: 5px 10px;
  27365. box-sizing: border-box;
  27366. margin-bottom: 10px;
  27367. }
  27368. .select_box2_box {
  27369. display: flex;
  27370. height: calc(100% - 30px);
  27371. }
  27372. .select_box2_img {
  27373. width: calc(100% - 310px);
  27374. height: 100%;
  27375. overflow: auto;
  27376. background: #fff;
  27377. border-radius: 5px;
  27378. }
  27379. .select_box2_img img {
  27380. width: 100%;
  27381. }
  27382. .select_box2_answer {
  27383. background: #fff;
  27384. margin-left: 10px;
  27385. border-radius: 5px;
  27386. width: 300px;
  27387. overflow: auto;
  27388. height: 100%;
  27389. display: flex;
  27390. flex-direction: column;
  27391. align-items: center;
  27392. padding-top: 10px;
  27393. box-sizing: border-box;
  27394. }
  27395. .select_box2_answer_box {
  27396. margin: 0 0 10px 0;
  27397. width: 85%;
  27398. }
  27399. .rate_textarea {
  27400. font: inherit;
  27401. color: currentColor;
  27402. width: 100%;
  27403. padding: 8px 14px;
  27404. display: block;
  27405. min-width: 0;
  27406. outline: none;
  27407. border: 1px solid rgba(0, 0, 0, 0.23);
  27408. border-radius: 4px;
  27409. box-sizing: border-box;
  27410. background: #fff;
  27411. margin: 0 20px 0 0;
  27412. resize: none;
  27413. }
  27414. .select_answer_title {
  27415. text-align: left;
  27416. width: 85%;
  27417. margin-bottom: 10px;
  27418. font-size: 18px;
  27419. color: #8e8e8e;
  27420. }
  27421. .mask {
  27422. background-color: rgb(0 0 0 / 30%);
  27423. /* position: fixed; */
  27424. position: absolute;
  27425. top: 0;
  27426. left: 0;
  27427. width: 100%;
  27428. height: 100%;
  27429. z-index: 90;
  27430. display: flex;
  27431. align-items: center;
  27432. justify-content: center;
  27433. }
  27434. .progressBox {
  27435. width: 300px;
  27436. height: 150px;
  27437. background: #fff;
  27438. border-radius: 10px;
  27439. box-shadow: 0 0 6px 1px #bfbfbf;
  27440. display: flex;
  27441. align-items: center;
  27442. justify-content: center;
  27443. flex-direction: column;
  27444. position: relative;
  27445. color: #6c6c6c;
  27446. }
  27447. .progressBox>>>.el-progress-bar__outer {
  27448. background-color: #d1dfff !important;
  27449. }
  27450. .progressBox .lbox {
  27451. height: 50px;
  27452. font-size: 19px;
  27453. display: flex;
  27454. align-items: center;
  27455. color: #747474;
  27456. }
  27457. .progressBox .lbox img {
  27458. width: 40px;
  27459. margin-right: 20px;
  27460. }
  27461. .closeCss {
  27462. position: absolute;
  27463. top: 8px;
  27464. right: 8px;
  27465. cursor: pointer;
  27466. width: 20px;
  27467. height: 20px;
  27468. }
  27469. .closeCss>img {
  27470. width: 100%;
  27471. height: 100%;
  27472. }
  27473. .updateTips::before {
  27474. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  27475. font-size: 14px;
  27476. margin-left: 20px;
  27477. font-weight: 400;
  27478. color: #ff3a3a;
  27479. margin-bottom: 10px;
  27480. display: block;
  27481. }
  27482. .updateMask {
  27483. width: 100%;
  27484. z-index: 3;
  27485. top: 0;
  27486. position: absolute;
  27487. /* background-color: rgba(0,0,0,.3); */
  27488. }
  27489. .t_j_box {
  27490. display: flex;
  27491. }
  27492. .t_j_box span:nth-child(1) {
  27493. width: 15%;
  27494. overflow: hidden;
  27495. margin-right: 10px;
  27496. text-overflow: ellipsis;
  27497. white-space: nowrap;
  27498. }
  27499. .t_j_box span:nth-child(2) {
  27500. width: 30%;
  27501. overflow: hidden;
  27502. text-overflow: ellipsis;
  27503. margin-right: 10px;
  27504. }
  27505. .t_j_box span:nth-child(3) {
  27506. max-width: calc(55% - 20px);
  27507. overflow: hidden;
  27508. text-overflow: ellipsis;
  27509. }
  27510. .sentenBox {
  27511. background: #fff;
  27512. height: 600px;
  27513. overflow: auto;
  27514. background-image: url("../../../assets/icon/conSentences/csBg.png");
  27515. background-position: 102%;
  27516. background-repeat: no-repeat;
  27517. background-size: 60%;
  27518. }
  27519. .sentenBox>.sentenContent {
  27520. padding-bottom: 10px;
  27521. width: 97%;
  27522. margin: 0 auto;
  27523. }
  27524. .sentenBox>.sentenContent+.sentenContent {
  27525. border-top: 1px solid #cbcbcb;
  27526. }
  27527. .addSen {
  27528. background: #409efe;
  27529. width: 90px;
  27530. color: #fff;
  27531. height: 35px;
  27532. text-align: center;
  27533. line-height: 35px;
  27534. border-radius: 5px;
  27535. float: right;
  27536. margin: 10px 20px 0 0;
  27537. cursor: pointer;
  27538. }
  27539. .sentenTop {
  27540. display: flex;
  27541. flex-direction: row;
  27542. flex-wrap: nowrap;
  27543. align-items: center;
  27544. }
  27545. .sentenTop::before {
  27546. content: attr(index);
  27547. background: #3681fc;
  27548. border-radius: 50%;
  27549. color: #fff;
  27550. width: 25px;
  27551. height: 25px;
  27552. min-width: 25px;
  27553. min-height: 25px;
  27554. text-align: center;
  27555. line-height: 25px;
  27556. margin-right: 5px;
  27557. }
  27558. .sentenTop>div:nth-child(2) {
  27559. width: 300px;
  27560. margin: 0 15px;
  27561. }
  27562. .sentenTop>div:nth-child(3) {
  27563. background: #409efe;
  27564. color: #fff;
  27565. width: 65px;
  27566. height: 35px;
  27567. text-align: center;
  27568. line-height: 35px;
  27569. border-radius: 5px;
  27570. cursor: pointer;
  27571. }
  27572. .cardList {
  27573. padding: 30px 0 20px 0;
  27574. display: flex;
  27575. flex-direction: row;
  27576. flex-wrap: wrap;
  27577. align-items: center;
  27578. box-sizing: border-box;
  27579. border-bottom: 1px solid #f4f4f4;
  27580. width: 98%;
  27581. margin: 0 auto;
  27582. }
  27583. .rightCardList {
  27584. display: flex;
  27585. flex-wrap: wrap;
  27586. }
  27587. .cardBox {
  27588. display: flex;
  27589. flex-direction: row;
  27590. flex-wrap: wrap;
  27591. align-items: center;
  27592. align-content: center;
  27593. }
  27594. .isCard,
  27595. .isCard1 {
  27596. width: auto;
  27597. padding: 0 20px;
  27598. height: 65px;
  27599. text-align: center;
  27600. line-height: 65px;
  27601. font-size: 14px;
  27602. cursor: pointer;
  27603. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  27604. background-size: 100% 100%;
  27605. position: relative;
  27606. z-index: 99;
  27607. }
  27608. .isCard1 {
  27609. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  27610. }
  27611. .isCard:hover .deleteWord {
  27612. display: block;
  27613. }
  27614. .isCard>div:nth-child(1),
  27615. .isCard1>div:nth-child(1) {
  27616. white-space: nowrap;
  27617. overflow: hidden;
  27618. text-overflow: ellipsis;
  27619. width: 100%;
  27620. margin: 0 auto;
  27621. }
  27622. .card {
  27623. width: 140px;
  27624. height: 65px;
  27625. }
  27626. .card>img {
  27627. width: 100%;
  27628. height: 100%;
  27629. }
  27630. .rightCardBox {
  27631. width: 98%;
  27632. margin: 10px auto 0;
  27633. }
  27634. .rightCardBox>div:nth-child(1) {
  27635. margin-bottom: 10px;
  27636. }
  27637. .cardCss {
  27638. display: flex;
  27639. flex-direction: column;
  27640. flex-wrap: nowrap;
  27641. align-items: center;
  27642. border-bottom: 3px solid #b4c3d3;
  27643. padding: 0 0 5px 0;
  27644. /* margin-right: 10px; */
  27645. }
  27646. .cardCss>div:nth-child(2) {
  27647. background: #5b7b9d;
  27648. color: #fff;
  27649. width: 20px;
  27650. height: 20px;
  27651. border-radius: 50%;
  27652. text-align: center;
  27653. line-height: 20px;
  27654. }
  27655. .sentenTopBox {
  27656. display: flex;
  27657. flex-direction: row;
  27658. flex-wrap: nowrap;
  27659. align-items: center;
  27660. justify-content: space-between;
  27661. padding: 55px 0 0 20px;
  27662. box-sizing: border-box;
  27663. width: 85%;
  27664. }
  27665. .rb_c_ai_box,
  27666. .stepsBottom {
  27667. width: 100%;
  27668. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  27669. /* background: #f7f7f7; */
  27670. border-radius: 10px;
  27671. overflow: hidden;
  27672. /* height: 100%; */
  27673. height: calc(100% - 55px);
  27674. }
  27675. .navTop {
  27676. background: #53749b;
  27677. color: #fff;
  27678. height: 40px;
  27679. line-height: 40px;
  27680. padding-left: 15px;
  27681. font-size: 18px;
  27682. }
  27683. .navBottom {
  27684. /* background: #6b91b7; */
  27685. height: 100%;
  27686. overflow: auto;
  27687. padding: 10px 0;
  27688. }
  27689. .navStage {
  27690. display: flex;
  27691. flex-direction: row;
  27692. flex-wrap: nowrap;
  27693. align-items: center;
  27694. padding: 10px 10px 10px 0;
  27695. cursor: pointer;
  27696. background: #ffffff;
  27697. width: 95%;
  27698. margin: 5px auto 5px;
  27699. box-sizing: border-box;
  27700. border-radius: 5px;
  27701. flex-wrap: wrap;
  27702. position: relative;
  27703. }
  27704. .navStage:hover>.chapter_upload_drag {
  27705. display: block;
  27706. }
  27707. .navTask:hover>.chapter_upload_drag {
  27708. display: block;
  27709. }
  27710. .chapter_upload:hover>.chapter_upload_drag {
  27711. display: block;
  27712. }
  27713. .navStage::before {
  27714. content: "";
  27715. display: block;
  27716. width: 16px;
  27717. height: 16px;
  27718. background-image: url(../../../assets/icon/new/icon_stage.png);
  27719. background-size: 100%;
  27720. margin-left: 25px;
  27721. }
  27722. .navStage .chapter_unit_open {
  27723. content: "";
  27724. display: block;
  27725. width: 16px;
  27726. height: 16px;
  27727. background-image: url(../../../assets/icon/new/down.png);
  27728. transform: rotate(-90deg);
  27729. background-size: 100%;
  27730. margin-left: 10px;
  27731. transition: all 0.5s;
  27732. }
  27733. .isNavStageOpen .chapter_unit_open {
  27734. transform: rotate(0deg);
  27735. }
  27736. .isNavStage {
  27737. background: #0061ff;
  27738. }
  27739. .isNavStage::before {
  27740. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  27741. }
  27742. .isNavStage .chapter_unit_open {
  27743. background-image: url(../../../assets/icon/new/downC.png);
  27744. }
  27745. .isNavStage .nt_taskName {
  27746. font-weight: bold !important;
  27747. color: #ffffff !important;
  27748. }
  27749. .isNavStage .nt_taskTitle {
  27750. font-weight: bold !important;
  27751. color: #fff !important;
  27752. }
  27753. .navStage .nt_taskBox {
  27754. width: calc(100% - 68px);
  27755. padding: 0 0 0 5px;
  27756. box-sizing: border-box;
  27757. box-sizing: border-box;
  27758. display: flex;
  27759. flex-direction: row;
  27760. flex-wrap: nowrap;
  27761. align-items: baseline;
  27762. }
  27763. .navStage .nt_taskTitle {
  27764. color: #060e17;
  27765. line-height: 25px;
  27766. font-size: 16px;
  27767. }
  27768. .navStage .nt_taskName {
  27769. max-width: calc(100% - 82px);
  27770. white-space: nowrap;
  27771. overflow: hidden;
  27772. text-overflow: ellipsis;
  27773. font-size: 16px;
  27774. color: #060e17;
  27775. }
  27776. .navTask {
  27777. display: flex;
  27778. flex-direction: row;
  27779. flex-wrap: nowrap;
  27780. align-items: center;
  27781. padding: 10px 10px 10px 0;
  27782. cursor: pointer;
  27783. background: #ffffff;
  27784. width: 95%;
  27785. margin: 5px auto 5px;
  27786. box-sizing: border-box;
  27787. border-radius: 5px;
  27788. flex-wrap: wrap;
  27789. position: relative;
  27790. }
  27791. .navTask .chapter_upload_open {
  27792. content: "";
  27793. display: block;
  27794. width: 16px;
  27795. height: 16px;
  27796. background-image: url(../../../assets/icon/new/icon_arrow.png);
  27797. background-size: 100%;
  27798. margin-left: 23px;
  27799. }
  27800. .noImage .chapter_upload_open {
  27801. display: none;
  27802. background-image: unset !important;
  27803. }
  27804. .isNavOpen .chapter_upload_open {
  27805. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  27806. transform: rotate(90deg);
  27807. }
  27808. .isNavTask .chapter_upload_open {
  27809. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  27810. transform: rotate(-90deg);
  27811. }
  27812. .isNavTask.isNavOpen .chapter_upload_open {
  27813. transform: rotate(0deg);
  27814. }
  27815. .dragOverTop {
  27816. border-top: 2px solid #0061ff !important;
  27817. border-radius: 0 !important;
  27818. margin-top: 10px;
  27819. }
  27820. .dragOverBottom {
  27821. border-bottom: 2px solid #0061ff !important;
  27822. border-radius: 0 !important;
  27823. margin-top: 10px;
  27824. }
  27825. .dragOverTop2 {
  27826. border-top: 2px solid #0061ff !important;
  27827. border-radius: 0 !important;
  27828. }
  27829. .dragOverBottom2 {
  27830. border-bottom: 2px solid #0061ff !important;
  27831. border-radius: 0 !important;
  27832. }
  27833. .isNavTask {
  27834. /* background: #3681FC; */
  27835. background: #eef3fb;
  27836. }
  27837. .isNavTask>.chapter_upload_drag {
  27838. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  27839. }
  27840. .isNavTask .nt_taskName {
  27841. /* color: #fff !important; */
  27842. font-weight: bold !important;
  27843. color: #0061ff !important;
  27844. }
  27845. .isNavTask .nt_taskTitle {
  27846. /* color: #AECCFE !important; */
  27847. font-weight: bold !important;
  27848. color: #0061ff !important;
  27849. }
  27850. .navTask .nt_taskBox {
  27851. width: calc(100% - 40px);
  27852. padding: 0 0 0 5px;
  27853. box-sizing: border-box;
  27854. box-sizing: border-box;
  27855. display: flex;
  27856. flex-direction: row;
  27857. flex-wrap: nowrap;
  27858. align-items: baseline;
  27859. }
  27860. .navTask .nt_taskTitle {
  27861. /* color: #717C8D; */
  27862. color: #060e17;
  27863. line-height: 25px;
  27864. font-size: 16px;
  27865. /* min-width: 66px; */
  27866. }
  27867. .navTask .nt_taskName {
  27868. /* color: #fff; */
  27869. /* max-width: 130px; */
  27870. /* width: 100%; */
  27871. max-width: calc(100% - 66px);
  27872. font-size: 16px;
  27873. color: #060e17;
  27874. /* color: #0E1E33; */
  27875. }
  27876. .navTask .nt_taskName span {
  27877. width: 100%;
  27878. white-space: nowrap;
  27879. overflow: hidden;
  27880. text-overflow: ellipsis;
  27881. display: block;
  27882. }
  27883. .gjBox {
  27884. width: calc(100% - 25px);
  27885. padding: 0 0 0 0;
  27886. box-sizing: border-box;
  27887. border-left: 1px solid #cad1dc;
  27888. margin-left: 25px;
  27889. }
  27890. .gjBox>div {
  27891. display: flex;
  27892. align-items: center;
  27893. }
  27894. .gjBox>div::before {
  27895. content: "";
  27896. height: 1px;
  27897. width: 10px;
  27898. background: #cad1dc;
  27899. display: block;
  27900. margin-right: 5px;
  27901. }
  27902. .gjCss {
  27903. display: flex;
  27904. flex-direction: row;
  27905. flex-wrap: nowrap;
  27906. align-items: center;
  27907. padding: 15px 0;
  27908. box-sizing: border-box;
  27909. font-size: 14px;
  27910. cursor: pointer;
  27911. }
  27912. .isGjCss {
  27913. color: #0061ff;
  27914. }
  27915. .groupBox {}
  27916. .groupContent+.groupContent {
  27917. margin-top: 30px;
  27918. }
  27919. .groupTitle {
  27920. font-size: 24px;
  27921. color: rgb(80, 80, 80);
  27922. margin-bottom: 20px;
  27923. }
  27924. .groupName {
  27925. display: flex;
  27926. align-items: center;
  27927. }
  27928. .groupn {
  27929. font-size: 15px;
  27930. margin-right: 10px;
  27931. }
  27932. .groupName+.groupName {
  27933. margin-top: 15px;
  27934. }
  27935. .groupBtn {
  27936. margin-left: 10px;
  27937. }
  27938. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  27939. text-align: left;
  27940. }
  27941. .radioBox>div {
  27942. margin: 10px 0 0 10px;
  27943. }
  27944. .radioBox>>>.el-radio__input,
  27945. .radioBox>>>.el-checkbox__inner {
  27946. margin-left: 10px;
  27947. }
  27948. .radioBox>>>.el-radio__label,
  27949. .radioBox>>>.el-checkbox__label {
  27950. display: flex;
  27951. align-items: center;
  27952. }
  27953. .inImg {
  27954. width: 50px;
  27955. }
  27956. .inImg>img {
  27957. width: 100%;
  27958. height: 100%;
  27959. object-fit: cover;
  27960. }
  27961. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  27962. height: auto;
  27963. padding: 10px;
  27964. margin: 0;
  27965. }
  27966. .upCss>>>.el-upload-list {
  27967. width: 100%;
  27968. }
  27969. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  27970. width: 100%;
  27971. height: 120px;
  27972. object-fit: contain;
  27973. background: unset;
  27974. margin-left: 0;
  27975. }
  27976. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  27977. display: none;
  27978. }
  27979. .tcMember+.tcMember::before {
  27980. content: "、";
  27981. }
  27982. .xzUpImg {
  27983. width: 25px;
  27984. height: 25px;
  27985. min-width: 25px;
  27986. min-height: 25px;
  27987. cursor: pointer;
  27988. margin: 0 10px;
  27989. }
  27990. .xzUpImg>img {
  27991. width: 100%;
  27992. height: 100%;
  27993. }
  27994. .closeCss {
  27995. position: absolute;
  27996. top: 8px;
  27997. right: 8px;
  27998. cursor: pointer;
  27999. width: 20px;
  28000. height: 20px;
  28001. }
  28002. .closeCss>img {
  28003. width: 100%;
  28004. height: 100%;
  28005. }
  28006. .moveBtn {
  28007. display: flex;
  28008. flex-direction: row;
  28009. flex-wrap: nowrap;
  28010. align-items: center;
  28011. width: 55px;
  28012. }
  28013. .timuUpImg {
  28014. display: flex;
  28015. flex-direction: row;
  28016. align-items: center;
  28017. width: 100%;
  28018. margin-right: 10px;
  28019. }
  28020. .timuUpImg>div:nth-child(1) {
  28021. margin-right: 10px;
  28022. display: flex;
  28023. align-items: center;
  28024. width: 100%;
  28025. }
  28026. .timuImgBox {
  28027. margin: 10px 0;
  28028. display: flex;
  28029. flex-direction: column;
  28030. flex-wrap: wrap;
  28031. align-items: flex-start;
  28032. }
  28033. .timuImg {
  28034. width: 100px;
  28035. margin: 5px 0;
  28036. cursor: pointer;
  28037. position: relative;
  28038. }
  28039. .timuImg:hover .deleteWord {
  28040. display: block;
  28041. }
  28042. .deleteWord {
  28043. width: 25px;
  28044. height: 25px;
  28045. position: absolute;
  28046. right: -5px;
  28047. top: -5px;
  28048. cursor: pointer;
  28049. display: none;
  28050. }
  28051. .timuImg>img,
  28052. .deleteWord>img {
  28053. width: 100%;
  28054. height: 100%;
  28055. object-fit: cover;
  28056. }
  28057. .e_add_delete {
  28058. cursor: pointer;
  28059. margin-left: 10px;
  28060. }
  28061. .pType_box {
  28062. margin: 15px 0;
  28063. align-items: flex-end;
  28064. }
  28065. .noneBox {
  28066. height: 200px;
  28067. width: 100%;
  28068. display: flex;
  28069. align-items: center;
  28070. justify-content: center;
  28071. flex-direction: column;
  28072. /* margin-top: 150px; */
  28073. }
  28074. .noneBox>img {
  28075. width: 95px;
  28076. }
  28077. .noneBox>span {
  28078. margin-top: 10px;
  28079. color: #717c8d;
  28080. }
  28081. .rb_c_box {
  28082. width: 100%;
  28083. height: 100%;
  28084. display: flex;
  28085. /* padding: 20px; */
  28086. box-sizing: border-box;
  28087. justify-content: space-between;
  28088. }
  28089. .rb_c_box_left {
  28090. height: 100%;
  28091. background: #fff;
  28092. width: 270px;
  28093. min-width: 270px;
  28094. border-radius: 8px;
  28095. margin-right: 10px;
  28096. }
  28097. .rb_c_box_right {
  28098. height: 100%;
  28099. width: calc(100%);
  28100. overflow: hidden;
  28101. }
  28102. .rb_c_box_btn {
  28103. display: flex;
  28104. justify-content: flex-start;
  28105. height: 50px;
  28106. align-items: center;
  28107. background: #fff;
  28108. padding: 0 20px;
  28109. border-radius: 10px 10px 0px 0px;
  28110. border-bottom: 1px solid #cad1dc;
  28111. }
  28112. .rb_c_box_btn > .title{
  28113. font-size: 24px;
  28114. font-weight: bold;
  28115. display: flex;
  28116. align-items: center;
  28117. }
  28118. .rb_c_box_btn > .title:before{
  28119. content: '';
  28120. background-image: url(../../../assets/icon/course/courseName.png);
  28121. width: 24px;
  28122. height: 24px;
  28123. background-size: 100% 100%;
  28124. margin-right: 10px;
  28125. }
  28126. .rb_c_box_right>.basic_box {
  28127. /* background: #fff; */
  28128. border-radius: 0;
  28129. height: calc(100% - 50px);
  28130. overflow: auto;
  28131. padding: 0;
  28132. }
  28133. .textarea_css {
  28134. display: block;
  28135. resize: none;
  28136. padding: 10px 15px;
  28137. line-height: 1.5;
  28138. box-sizing: border-box;
  28139. width: 100%;
  28140. font-size: 14px;
  28141. color: #606266;
  28142. background-color: #fff;
  28143. background-image: none;
  28144. border: 1px solid #dcdfe6;
  28145. border-radius: 4px;
  28146. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  28147. outline: none;
  28148. overflow: hidden;
  28149. height: 46px;
  28150. font-family: "Microsoft YaHei";
  28151. }
  28152. .textarea_css::-webkit-input-placeholder {
  28153. color: #c0c4cc;
  28154. }
  28155. .textarea_css:focus {
  28156. border-color: #409eff;
  28157. outline: 0;
  28158. }
  28159. .addEditor>>>.text {
  28160. height: auto;
  28161. min-height: 100px;
  28162. }
  28163. .addEditor>>>.w-e-text-container {
  28164. min-height: 100px;
  28165. }
  28166. .moveBtn2 {
  28167. flex-direction: column;
  28168. width: fit-content;
  28169. margin: 0 10px 0 10px;
  28170. }
  28171. .moveBtn2 .chapter_upload_down,
  28172. .moveBtn2 .chapter_upload_up {
  28173. width: 16px;
  28174. height: 16px;
  28175. }
  28176. .moveBtn2 .chapter_upload_up::after,
  28177. .moveBtn2 .chapter_upload_down::after {
  28178. width: 10px;
  28179. height: 10px;
  28180. }
  28181. .fullStyle>>>.el-dialog__body {
  28182. height: calc(100% - 125px) !important;
  28183. box-sizing: border-box;
  28184. }
  28185. .fullStyle1>>>.el-dialog__body {
  28186. height: auto !important;
  28187. }
  28188. .fullStyle>>>.el-dialog {
  28189. width: 100% !important;
  28190. max-width: 100% !important;
  28191. height: 100% !important;
  28192. margin: 0 !important;
  28193. }
  28194. .fullStyle {
  28195. width: 100% !important;
  28196. max-width: 100% !important;
  28197. height: 100% !important;
  28198. margin: 0 auto !important;
  28199. }
  28200. .wb_j_box_btn {
  28201. width: calc(100% - 30px);
  28202. display: flex;
  28203. height: 40px;
  28204. border: 1.5px solid #cad1dc;
  28205. border-radius: 4px;
  28206. box-sizing: border-box;
  28207. align-items: center;
  28208. font-size: 14px;
  28209. cursor: pointer;
  28210. overflow: hidden;
  28211. }
  28212. .wb_j_box_btn:hover {
  28213. border: 1.5px solid #0061ff;
  28214. }
  28215. .wb_j_box_title {
  28216. background: #f0f4fa;
  28217. height: 100%;
  28218. line-height: 40px;
  28219. width: 90px;
  28220. text-align: center;
  28221. color: #060e17;
  28222. border-right: 1.5px solid #cad1dc;
  28223. box-sizing: border-box;
  28224. }
  28225. .wb_j_box_btn_c {
  28226. width: calc(100% - 90px);
  28227. padding: 0 35px 0 10px;
  28228. box-sizing: border-box;
  28229. position: relative;
  28230. }
  28231. .wb_j_box_span {
  28232. width: 100%;
  28233. overflow: hidden;
  28234. white-space: nowrap;
  28235. text-overflow: ellipsis;
  28236. word-wrap: break-word;
  28237. color: #717c8d;
  28238. }
  28239. .wb_j_box_arrow {
  28240. content: "";
  28241. width: 14px;
  28242. height: 14px;
  28243. background: url(../../../assets/icon/new/u_arrow.png);
  28244. background-size: 100% 100%;
  28245. position: absolute;
  28246. right: 12px;
  28247. top: 50%;
  28248. transform: translateY(-50%);
  28249. }
  28250. .check_classBox {
  28251. height: 400px;
  28252. display: flex;
  28253. border-top: 1.5px solid #e7ebf1;
  28254. border-bottom: 1.5px solid #e7ebf1;
  28255. }
  28256. .check_class_right {
  28257. width: 130px;
  28258. border-right: 1px solid #e7ebf1;
  28259. display: flex;
  28260. align-items: center;
  28261. flex-direction: column;
  28262. height: 100%;
  28263. overflow: auto;
  28264. padding: 15px 0;
  28265. box-sizing: border-box;
  28266. }
  28267. .check_class {
  28268. width: 85%;
  28269. border-radius: 5px;
  28270. height: 30px;
  28271. min-height: 30px;
  28272. line-height: 30px;
  28273. text-align: center;
  28274. padding: 0 10px;
  28275. box-sizing: border-box;
  28276. cursor: pointer;
  28277. white-space: nowrap;
  28278. overflow: hidden;
  28279. text-overflow: ellipsis;
  28280. }
  28281. .check_class.activeX {
  28282. background: #e0eafb;
  28283. color: #3681fc;
  28284. font-weight: 700;
  28285. }
  28286. .check_class+.check_class {
  28287. margin-top: 15px;
  28288. }
  28289. .check_class_left {
  28290. background: #fafafa;
  28291. width: calc(100% - 130px);
  28292. padding: 15px;
  28293. box-sizing: border-box;
  28294. }
  28295. .check_class_all_box {
  28296. display: flex;
  28297. margin-bottom: 10px;
  28298. }
  28299. .all_check {
  28300. display: flex;
  28301. align-items: center;
  28302. padding: 2px 0 0;
  28303. margin-left: 10px;
  28304. }
  28305. .all_check>>>.el-checkbox__label {
  28306. line-height: 18px;
  28307. }
  28308. .check_class_left_title {
  28309. font-size: 16px;
  28310. font-weight: 700;
  28311. }
  28312. .check_class_item {
  28313. display: flex;
  28314. flex-wrap: wrap;
  28315. height: calc(100% - 45px);
  28316. overflow: auto;
  28317. justify-content: flex-start;
  28318. align-items: flex-start;
  28319. align-content: flex-start;
  28320. }
  28321. .class_item:first-child {
  28322. /* margin: 0 15px 15px 67px; */
  28323. }
  28324. .class_item {
  28325. margin: 0 15px 15px 0;
  28326. }
  28327. .class_item:hover>>>.el-checkbox__label {
  28328. color: #409eff;
  28329. }
  28330. .class_item>>>.el-checkbox__label {
  28331. color: #0e1e33;
  28332. }
  28333. .class_item:hover>>>.el-checkbox__inner {
  28334. border-color: #409eff;
  28335. }
  28336. .class_item>>>.el-checkbox,
  28337. .class_item>>>.el-checkbox__input {
  28338. display: flex;
  28339. align-items: center;
  28340. }
  28341. .taskTitle {
  28342. font-size: 20px;
  28343. font-weight: bold;
  28344. margin-bottom: 35px;
  28345. }
  28346. .taskTitle:after {
  28347. content: "";
  28348. width: 100%;
  28349. display: block;
  28350. height: 1px;
  28351. background: #cad1dc;
  28352. position: absolute;
  28353. left: 0;
  28354. margin: 15px 0 0;
  28355. }
  28356. .eva_btn_box {
  28357. margin: 20px 0px 0 0;
  28358. display: flex;
  28359. flex-direction: row;
  28360. flex-wrap: nowrap;
  28361. align-items: center;
  28362. justify-content: space-between;
  28363. width: 100%;
  28364. }
  28365. .eva_btn_left_box {
  28366. display: flex;
  28367. flex-direction: row;
  28368. flex-wrap: nowrap;
  28369. align-items: center;
  28370. }
  28371. .addTypeChoose {
  28372. display: flex;
  28373. flex-direction: row;
  28374. flex-wrap: nowrap;
  28375. align-items: center;
  28376. margin: 15px 0;
  28377. }
  28378. .addTypeBox {
  28379. display: flex;
  28380. flex-direction: column;
  28381. flex-wrap: nowrap;
  28382. align-items: center;
  28383. }
  28384. .addTypeChoose {
  28385. display: flex;
  28386. flex-direction: row;
  28387. flex-wrap: nowrap;
  28388. align-items: center;
  28389. margin: 15px 0;
  28390. }
  28391. .buchong_box {
  28392. background: #E0EAFB66;
  28393. width: calc(100% - 20px);
  28394. min-height: 50px;
  28395. display: flex;
  28396. align-items: center;
  28397. justify-content: center;
  28398. margin: 0 auto;
  28399. }
  28400. .outline {
  28401. width: calc(100% - 40px);
  28402. margin: 0 auto;
  28403. }
  28404. .task_outline {
  28405. width: calc(100% - 40px);
  28406. margin: 0 auto;
  28407. }
  28408. .outline_box+.outline_box {
  28409. margin: 30px 0 0px;
  28410. }
  28411. .outline_task {
  28412. display: flex;
  28413. align-items: center;
  28414. margin-bottom: 10px;
  28415. }
  28416. .outline_btn{
  28417. display: flex;
  28418. align-items: center;
  28419. min-width: fit-content;
  28420. margin-left: 10px;
  28421. }
  28422. .outline_task .title {
  28423. font-size: 18px;
  28424. font-weight: bold;
  28425. min-width: 80px;
  28426. }
  28427. .op_task_box,
  28428. .op_tool_box,
  28429. .outline_detail {
  28430. position: relative;
  28431. }
  28432. .op_task_box:hover .op_box,
  28433. .op_tool_box:hover .op_box,
  28434. .outline_detail:hover .op_box {
  28435. display: flex
  28436. }
  28437. .op_box {
  28438. position: absolute;
  28439. bottom: 10px;
  28440. display: none;
  28441. align-items: center;
  28442. justify-content: space-between;
  28443. width: calc(100% - 20px);
  28444. left: 50%;
  28445. transform: translateX(-50%);
  28446. }
  28447. .op_box .op_remark {
  28448. color: #8E8E8E;
  28449. font-size: 14px;
  28450. }
  28451. .op_box_right{
  28452. display: flex;
  28453. }
  28454. .op_box_isquote{
  28455. display: flex;
  28456. }
  28457. .op_box_isquote *{
  28458. display: none;
  28459. }
  28460. .op_box_isquote .op_box_right,
  28461. .op_box_isquote .custom-switch{
  28462. display: flex;
  28463. margin-left: auto;
  28464. }
  28465. .op_task_box:hover .op_box_isquote *{
  28466. display: flex;
  28467. }
  28468. .op_task_box:hover .op_box_isquote .op_box_right,
  28469. .op_task_box:hover .op_box_isquote .custom-switch{
  28470. display: flex;
  28471. margin-left: unset;
  28472. }
  28473. .rb_c_nav {
  28474. width: calc(100% - 20px);
  28475. margin: 15px auto 0;
  28476. font-size: 18px;
  28477. display: flex;
  28478. align-items: center;
  28479. }
  28480. .rb_c_nav span {
  28481. cursor: pointer;
  28482. }
  28483. .rb_c_nav span+span {
  28484. margin-left: 10px;
  28485. }
  28486. .rb_c_nav span.active {
  28487. color: #0061FF
  28488. }
  28489. .text_panel>>>.text {
  28490. height: 400px;
  28491. }
  28492. .markBox{
  28493. padding: 20px 14px;
  28494. line-height: 29px;
  28495. font-size: 16px;
  28496. background: #f4f4f4;
  28497. border-radius: 5px;
  28498. word-break: break-word;
  28499. }
  28500. .info_box_t {
  28501. display: flex;
  28502. align-items: center;
  28503. flex-wrap: wrap;
  28504. }
  28505. .info_box_t + .info_box_t {
  28506. margin-top: 10px;
  28507. }
  28508. .info_box_t_box {
  28509. display: flex;
  28510. align-items: center;
  28511. flex-wrap: wrap;
  28512. margin-bottom: 5px;
  28513. }
  28514. .info_box_t_box + .info_box_t_box{
  28515. margin-left: 10px;
  28516. }
  28517. .info_box_t_box > span{
  28518. width: fit-content;
  28519. font-weight: bold;
  28520. font-size: 14px;
  28521. }
  28522. .info_box_t_box > input{
  28523. width: 150px !important;
  28524. margin: 0 5px 0 0;
  28525. }
  28526. .info_radio >>> .el-radio, .el-radio__input{
  28527. line-height: 18px;
  28528. height: 18px;
  28529. }
  28530. .mode_box{
  28531. display: flex;
  28532. align-items: center;
  28533. }
  28534. .mode_box > span{
  28535. padding: 0px 5px;
  28536. cursor: pointer;
  28537. }
  28538. .mode_box > span.active{
  28539. color: #409eff;
  28540. }
  28541. .chapter_upload_check {
  28542. width: 15px;
  28543. height: 15px;
  28544. cursor: pointer;
  28545. background-image: url('../../../assets/icon/check.png');
  28546. background-size: 100% 100%;
  28547. }
  28548. .chapter_upload_check.checked{
  28549. background-image: url('../../../assets/icon/checked.png');
  28550. }
  28551. .ruleBtn {
  28552. width: fit-content;
  28553. height: 36px;
  28554. line-height: 36px;
  28555. cursor: pointer;
  28556. color: #0061FF;
  28557. }
  28558. .stopBtn{
  28559. z-index: 999999;
  28560. position: absolute;
  28561. left: 50%;
  28562. top: calc(50% + 70px);
  28563. transform: translateX(-50%);
  28564. }
  28565. .rateSwitch >>> .el-switch__label.is-active {
  28566. color: #0061FF;
  28567. }
  28568. .rateSwitch >>> .el-switch__label--right{
  28569. display: flex;
  28570. align-items: center;
  28571. }
  28572. .rateSwitch >>> .el-switch__label--right::before{
  28573. content: "";
  28574. width: 14px;
  28575. height: 14px;
  28576. min-width: 14px;
  28577. min-height: 14px;
  28578. background-size: 100% 100%;
  28579. display: block;
  28580. margin-right: 7px;
  28581. background-image: url(../../../assets/icon/new/u_op2.png);
  28582. }
  28583. .rateSwitch >>> .el-switch__label--right.is-active::before{
  28584. background-image: url(../../../assets/icon/new/u_op.png);
  28585. }
  28586. .inter_box{
  28587. min-width: calc(50%);
  28588. min-height: 500px;
  28589. margin-right: 10px;
  28590. border: 1px solid #c7c7c7;
  28591. border-radius: 0px 5px 5px 5px;
  28592. overflow: hidden;
  28593. position: relative;
  28594. box-sizing: border-box;
  28595. }
  28596. .inter_box::before{
  28597. content:'对话区';
  28598. position: absolute;
  28599. left: 0;
  28600. top: 0;
  28601. display: block;
  28602. padding: 8px 10px;
  28603. background: #e0eafb;
  28604. color: #98a0ac;
  28605. font-size: 14px;
  28606. border-radius: 0 15px 15px 0;
  28607. }
  28608. .inter_voiceBox,
  28609. .inter_Detailbox{
  28610. border: 1px solid #c7c7c7;
  28611. border-radius: 0px 5px 5px 5px;
  28612. overflow: hidden;
  28613. position: relative;
  28614. box-sizing: border-box;
  28615. }
  28616. .inter_Detailbox::before{
  28617. content:'编辑区';
  28618. position: absolute;
  28619. left: 0;
  28620. top: 0;
  28621. display: block;
  28622. padding: 8px 10px;
  28623. background: #e0eafb;
  28624. color: #98a0ac;
  28625. font-size: 14px;
  28626. border-radius: 0 15px 15px 0;
  28627. }
  28628. .inter_voiceBox::before{
  28629. content:'录音区';
  28630. position: absolute;
  28631. left: 0;
  28632. top: 0;
  28633. display: block;
  28634. padding: 8px 10px;
  28635. background: #e0eafb;
  28636. color: #98a0ac;
  28637. font-size: 14px;
  28638. border-radius: 0 15px 15px 0;
  28639. z-index: 999;
  28640. }
  28641. .inter_box > iframe{
  28642. width: 100%;
  28643. height: 100%;
  28644. border: none;
  28645. }
  28646. .inter_setting{
  28647. display: block;
  28648. background-image: url(../../../assets/icon/course/setting.svg);
  28649. background-size: 100% 100%;
  28650. width: 20px;
  28651. height: 20px;
  28652. cursor: pointer;
  28653. margin-left: 10px;
  28654. }
  28655. .inter_setting_panel{
  28656. position: absolute;
  28657. left: 110px;
  28658. top: 30px;
  28659. background: #fff;
  28660. border-radius: 5px;
  28661. box-shadow: 0px 0px 2px 1px #00000017;
  28662. padding: 10px;
  28663. z-index: 999;
  28664. }
  28665. .panel_title{
  28666. text-align: center;
  28667. font-size: 18px;
  28668. margin-bottom: 10px;
  28669. }
  28670. .panel_tips{
  28671. font-weight: 500;
  28672. font-size: 14px;
  28673. text-align: center;
  28674. margin-bottom: 10px;
  28675. color: #6d6d6d;
  28676. }
  28677. .panel_input{
  28678. margin-bottom: 10px;
  28679. }
  28680. .panel_button{
  28681. display: flex;
  28682. justify-content: space-between;
  28683. }
  28684. .panel_input_record {
  28685. margin-top: 10px;
  28686. }
  28687. .panel_input_record > span{
  28688. margin-bottom: 5px;
  28689. display: block;
  28690. }
  28691. .custom-switch >>> .el-switch__label.is-active {
  28692. color: #0061FF;
  28693. }
  28694. .close_btn{
  28695. position: absolute;
  28696. top: 40px;
  28697. right: 10px;
  28698. box-shadow: 0 0 4px 2px #00000033;
  28699. border-radius: 70px 0 0 70px;
  28700. display: flex;
  28701. align-items: center;
  28702. padding-left: 5px;
  28703. padding: 10px 7px 10px 12px;
  28704. background: #fff;
  28705. cursor: pointer;
  28706. }
  28707. .close_btn > img {
  28708. width: 15px;
  28709. transition: 0.3s;
  28710. transform: rotate(0deg);
  28711. }
  28712. .close_btn_voice > img{
  28713. transform: rotate(180deg);
  28714. }
  28715. .resizable {
  28716. position: relative;
  28717. min-width: 350px; /* 最小宽度 */
  28718. max-width: 50%; /* 最大宽度 */
  28719. }
  28720. .resizer {
  28721. width: 12.8px;
  28722. height: 28.8px;
  28723. /* background: #ccc; */
  28724. position: absolute;
  28725. top: 50%;
  28726. left: 0;
  28727. cursor: ew-resize;
  28728. transform: translateY(-50%);
  28729. /* border-radius: 43px; */
  28730. background-image: url(../../../assets/icon/course/course_slide.png);
  28731. background-size: 100% 100%;
  28732. }
  28733. .pptBox{
  28734. position: fixed;
  28735. bottom: 10px;
  28736. left: 20px;
  28737. padding: 10px;
  28738. }
  28739. .pptBox > .box > div + div{
  28740. margin-top: 10px;
  28741. }
  28742. .ppClass{
  28743. background: #fff;
  28744. border-radius: 5px;
  28745. box-shadow: 0 0 6px 3px #00000030;
  28746. overflow: hidden;
  28747. }
  28748. .file-loading-class >>> .el-loading-spinner{
  28749. margin-top: -10px;
  28750. }
  28751. .file-loading-class >>> .el-loading-spinner .circular{
  28752. height: 20px;
  28753. width: 20px;
  28754. }
  28755. .button-toggle {
  28756. color: #007bff; /* 文本颜色 */
  28757. cursor: pointer; /* 鼠标悬停时显示手型 */
  28758. transition: color 0.2s; /* 文字颜色过渡效果 */
  28759. font-size: 14px;
  28760. }
  28761. .button-toggle:hover {
  28762. color: #0056b3; /* 悬停时的文字颜色 */
  28763. }
  28764. .button-toggle:focus {
  28765. outline: none; /* 去掉聚焦时的边框 */
  28766. }
  28767. .right_icon{
  28768. width: 12px;
  28769. height: 12px;
  28770. margin-left: 5px;
  28771. }
  28772. .buttonBoxB{
  28773. position: relative;
  28774. margin: 0 0 0 10px;
  28775. }
  28776. .buttonBoxB::after{
  28777. content: '';
  28778. display: block;
  28779. background-image: url(../../../assets/icon/course/downArrow.svg);
  28780. background-size: 100% 100%;
  28781. width: 15px;
  28782. height: 15px;
  28783. cursor: pointer;
  28784. margin-left: 5px;
  28785. }
  28786. .buttonBoxB:hover .buttonBox{
  28787. display: block;
  28788. }
  28789. .buttonBox {
  28790. position: absolute;
  28791. bottom: -0;
  28792. left: 0;
  28793. transform: translateY(100%);
  28794. background: #fff;
  28795. border-radius: 5px;
  28796. box-shadow: 0 0 3px 1px #e3e3e3;
  28797. width: 155px;
  28798. display: none;
  28799. z-index: 99999;
  28800. }
  28801. .buttonBox>div {
  28802. height: 40px;
  28803. line-height: 40px;
  28804. width: 100%;
  28805. text-align: center;
  28806. color: #000;
  28807. box-sizing: border-box;
  28808. }
  28809. .buttonBox>div+div {
  28810. border-top: 1px solid #e0e0e0;
  28811. }
  28812. .buttonBox>div:hover {
  28813. background: #f6f8ff;
  28814. }
  28815. </style>